S12Z opcodes: Fix bug disassembling certain shift instructions.
authorJohn Darrington <john@darrington.wattle.id.au>
Tue, 20 Nov 2018 17:50:30 +0000 (18:50 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Wed, 21 Nov 2018 20:34:47 +0000 (21:34 +0100)
commit27f42a4ddb28514fde3d01083120674fc8c0c107
tree3e064190c801dd9e278edcdfa81481133f620968
parent51534d7ab8c77fdf2af52f409cc4e348e4213bb7
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.
gas/ChangeLog
gas/testsuite/gas/s12z/shift.d
gas/testsuite/gas/s12z/shift.s
opcodes/ChangeLog
opcodes/s12z-dis.c