diff options
author | Nick Clifton <nickc@redhat.com> | 2016-01-14 16:23:35 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2016-01-14 16:23:35 +0000 |
commit | 4d82fe66e8d38b20ad429cb99a99ed8741336d72 (patch) | |
tree | 56de9e0bebe4497372817e943c106ccdb8124aa1 /gas | |
parent | e7cf25a8ab54cd02b48e7443ef25764475f02315 (diff) | |
download | gdb-4d82fe66e8d38b20ad429cb99a99ed8741336d72.zip gdb-4d82fe66e8d38b20ad429cb99a99ed8741336d72.tar.gz gdb-4d82fe66e8d38b20ad429cb99a99ed8741336d72.tar.bz2 |
Fix display of RL78 MOVW instructions that use the stack pointer.
* rl78-decode.opc (rl78_decode_opcode): Add 's' operand to movw
instructions that can support stack pointer operations.
* rl78-decode.c: Regenerate.
* rl78-dis.c: Fix display of stack pointer in MOVW based
instructions.
* testsuite/gas/rl78/sp-relative-movw.s: New test.
* testsuite/gas/rl78/sp-relative-movw.d: Expected disassembly.
* testsuite/gas/rl78/rl78.exp: Run the new test.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/rl78/rl78.exp | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/rl78/sp-relative-movw.d | 14 | ||||
-rw-r--r-- | gas/testsuite/gas/rl78/sp-relative-movw.s | 9 |
4 files changed, 30 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 97f3a03..59e31a7 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2016-01-14 Nick Clifton <nickc@redhat.com> + + * testsuite/gas/rl78/sp-relative-movw.s: New test. + * testsuite/gas/rl78/sp-relative-movw.d: Expected disassembly. + * testsuite/gas/rl78/rl78.exp: Run the new test. + 2016-01-14 Matthew Wahab <matthew.wahab@arm.com> * testsuite/gas/aarch64/illegal-sysreg-2.l: New. diff --git a/gas/testsuite/gas/rl78/rl78.exp b/gas/testsuite/gas/rl78/rl78.exp index f03056b..d9d0ced 100644 --- a/gas/testsuite/gas/rl78/rl78.exp +++ b/gas/testsuite/gas/rl78/rl78.exp @@ -22,4 +22,5 @@ if [expr [istarget "rl78-*-*"]] then { run_dump_test "pr19157" run_dump_test "pr19158" run_dump_test "pr19159" + run_dump_test "sp-relative-movw" } diff --git a/gas/testsuite/gas/rl78/sp-relative-movw.d b/gas/testsuite/gas/rl78/sp-relative-movw.d new file mode 100644 index 0000000..b05f09d --- /dev/null +++ b/gas/testsuite/gas/rl78/sp-relative-movw.d @@ -0,0 +1,14 @@ +#objdump: -d --prefix-addresses --show-raw-insn +#name: RL78: correct display of SP-relative movw instructions + +.*: +file format .*rl78.* + +Disassembly of section .text: +0x0+000 cb f8 34 12[ ]+movw sp, #0x1234 +0x0+004 ae f8[ ]+movw ax, sp +0x0+006 be f8[ ]+movw sp, ax +0x0+008 af f8 ff[ ]+movw ax, !0x000ffff8 +0x0+00b bf f8 ff[ ]+movw !0x000ffff8, ax +0x0+00e fb f8 ff[ ]+movw hl, sp +0x0+011 db f8 ff[ ]+movw bc, sp +0x0+014 eb f8 ff[ ]+movw de, sp diff --git a/gas/testsuite/gas/rl78/sp-relative-movw.s b/gas/testsuite/gas/rl78/sp-relative-movw.s new file mode 100644 index 0000000..b6ace3d --- /dev/null +++ b/gas/testsuite/gas/rl78/sp-relative-movw.s @@ -0,0 +1,9 @@ + movw sp, #0x1234 + movw ax, sp + movw sp, ax + movw ax, !0xffff8 + movw !0xffff8, ax + movw hl, sp + movw bc, sp + movw de, sp +
\ No newline at end of file |