diff options
author | John Darrington <john@darrington.wattle.id.au> | 2018-11-20 18:50:30 +0100 |
---|---|---|
committer | John Darrington <john@darrington.wattle.id.au> | 2018-11-21 21:34:47 +0100 |
commit | 27f42a4ddb28514fde3d01083120674fc8c0c107 (patch) | |
tree | 3e064190c801dd9e278edcdfa81481133f620968 /gas | |
parent | 51534d7ab8c77fdf2af52f409cc4e348e4213bb7 (diff) | |
download | gdb-27f42a4ddb28514fde3d01083120674fc8c0c107.zip gdb-27f42a4ddb28514fde3d01083120674fc8c0c107.tar.gz gdb-27f42a4ddb28514fde3d01083120674fc8c0c107.tar.bz2 |
S12Z opcodes: Fix bug disassembling certain shift instructions.
Shift and rotate instructions when the number of bit positions
was an immediate value greater than 1 were incorrectly disassembled.
This change fixes that problem and extends the test to check for
it.
gas/ChangeLog:
testsuite/gas/s12z/shift.s: Add new test case.
testsuite/gas/s12z/shift.d: Add expected result.
opcodes/ChangeLog:
s12z-dis.c (print_insn_shift) [SB_REG_REG_N]: Enter special case
if the postbyte matches the appropriate pattern.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/s12z/shift.d | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/s12z/shift.s | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index c1d207d..1c99079 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,10 @@ 2018-11-21 John Darrington <john@darrington.wattle.id.au> + * testsuite/gas/s12z/shift.s: Add new test case. + * testsuite/gas/s12z/shift.d: Add expected result. + +2018-11-21 John Darrington <john@darrington.wattle.id.au> + * config/tc-s12z.c (opcodes): bhs, blo: New members. * testsuite/gas/s12z/bra.d: Add tests for aliases. * testsuite/gas/s12z/bra.s: Add tests for aliases. diff --git a/gas/testsuite/gas/s12z/shift.d b/gas/testsuite/gas/s12z/shift.d index c3244c4..f4747c9 100644 --- a/gas/testsuite/gas/s12z/shift.d +++ b/gas/testsuite/gas/s12z/shift.d @@ -1,5 +1,5 @@ #objdump: -d -#name: +#name: Tests for shift and rotate instructions #source: shift.s @@ -20,3 +20,5 @@ Disassembly of section .text: 17: 10 3e 8e lsr.p \(d6,x\), #2 1a: 10 f4 bf asl d7, #1 1d: 10 bc bd asr d1, #2 + 20: 16 de 78 asl d6, d6, #17 + 23: 16 d6 78 asl d6, d6, #16 diff --git a/gas/testsuite/gas/s12z/shift.s b/gas/testsuite/gas/s12z/shift.s index cb41f3c..bf39580 100644 --- a/gas/testsuite/gas/s12z/shift.s +++ b/gas/testsuite/gas/s12z/shift.s @@ -9,3 +9,5 @@ lsr.p (d6,x), #2 asl d7, #1 asr d1, #2 + asl d6, d6, #17 + asl d6, d6, #16 |