diff options
author | Vinay Kumar G <Vinay.G@kpit.com> | 2016-02-15 16:34:34 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2016-02-15 16:34:34 +0000 |
commit | 6439ea1a8827247110cb50f4b4fc4ca489af6578 (patch) | |
tree | fb98c8e77cb0328143861bde61c4cb6a8a6e1996 /gas/config/rx-parse.y | |
parent | 9fb71ee49fc37163697e4f34e16097928eb83d66 (diff) | |
download | fsf-binutils-gdb-6439ea1a8827247110cb50f4b4fc4ca489af6578.zip fsf-binutils-gdb-6439ea1a8827247110cb50f4b4fc4ca489af6578.tar.gz fsf-binutils-gdb-6439ea1a8827247110cb50f4b4fc4ca489af6578.tar.bz2 |
Correct opcode generated for RX indirect MOVs without an offset.
PR gas/19665
* config/rx-parse.y (MOV): Opcode generation for index
register addressing mode.
* testsuite/gas/rx/rx.exp: Updated for new testcase.
* testsuite/gas/rx/pr19665.s: New file.
* testsuite/gas/rx/pr19665.s: New file.
* testsuite/gas/rx/mov.d: Update expected output.
Diffstat (limited to 'gas/config/rx-parse.y')
-rw-r--r-- | gas/config/rx-parse.y | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gas/config/rx-parse.y b/gas/config/rx-parse.y index 4c99fab..7a7eb70 100644 --- a/gas/config/rx-parse.y +++ b/gas/config/rx-parse.y @@ -274,6 +274,15 @@ statement : /* ---------------------------------------------------------------------- */ + | MOV DOT_B '#' EXPR ',' '[' REG ']' + { B2 (0xf8, 0x04); F ($7, 8, 4); IMMB ($4, 12);} + + | MOV DOT_W '#' EXPR ',' '[' REG ']' + { B2 (0xf8, 0x01); F ($7, 8, 4); IMMW ($4, 12);} + + | MOV DOT_L '#' EXPR ',' '[' REG ']' + { B2 (0xf8, 0x02); F ($7, 8, 4); IMM ($4, 12);} + | MOV DOT_B '#' EXPR ',' disp '[' REG ']' /* rx_disp5op changes the value if it succeeds, so keep it last. */ { if ($8 <= 7 && rx_uintop ($4, 8) && rx_disp5op0 (&$6, BSIZE)) |