S12Z: GAS: Allow #_symbol operands as mov source
authorJohn Darrington <john@darrington.wattle.id.au>
Fri, 1 Feb 2019 16:42:54 +0000 (17:42 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Fri, 1 Feb 2019 17:08:08 +0000 (18:08 +0100)
commitc6f14c0d2ca4d68308f967c446277789047a980a
treec07f41f2cd76f9b11458e80f73568fca72a06b2c
parent91bae99160e9d81cfe340b937f9613d43dc90293
S12Z: GAS: Allow #_symbol operands as mov source

mov.l, mov.p and mov.w (but not mov.b) when called with an immediate source
operand should be accepted a relocatable expression.  This change makes that
possible.

gas/
* config/tc-s12z.c (lex_imm): Add new argument exp_o.
(emit_reloc): New function.
(md_apply_fix): [BFD_RELOC_S12Z_OPR] Recognise that it
can be either 2 bytes or 3 bytes long.
* testsuite/gas/s12z/mov-imm-reloc.d: New file.
* testsuite/gas/s12z/mov-imm-reloc.s: New file.
* testsuite/gas/s12z/s12z.exp: Add them.
gas/ChangeLog
gas/config/tc-s12z.c
gas/testsuite/gas/s12z/mov-imm-reloc.d [new file with mode: 0644]
gas/testsuite/gas/s12z/mov-imm-reloc.s [new file with mode: 0644]
gas/testsuite/gas/s12z/s12z.exp
This page took 0.029693 seconds and 4 git commands to generate.