From: Nathan Sidwell Date: Thu, 6 Jan 2011 14:30:43 +0000 (+0000) Subject: gas/testsuite/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=639e30d29765fab6d78246ce4bb0d7a0f893d85d;p=binutils-gdb.git gas/testsuite/ * gas/arm/blx-bad.s: New. * gas/arm/blx-bad.d: New. opcodes/ * arm-dis.c (thumb32_opcodes): BLX must have bit zero clear. --- diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index b8ad2c3aa04..a5581024b9f 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-01-05 Nathan Sidwell + + * gas/arm/blx-bad.s: New. + * gas/arm/blx-bad.d: New. + 2011-01-04 H.J. Lu * gas/i386/bmi-intel.d: New. diff --git a/gas/testsuite/gas/arm/blx-bad.d b/gas/testsuite/gas/arm/blx-bad.d new file mode 100644 index 00000000000..34f70cce1e0 --- /dev/null +++ b/gas/testsuite/gas/arm/blx-bad.d @@ -0,0 +1,21 @@ +#objdump: -drw --show-raw-insn +#name: BLX encoding + +.*: file format .*arm.* + + +Disassembly of section .text: + +00000000 : + 0: e1a00000 nop ; \(mov r0, r0\) + +00000004 : + 4: f7ff effc blx 0 + 8: 46c0 nop ; \(mov r8, r8\) + a: f7ff effa blx 0 + e: 46c0 nop ; \(mov r8, r8\) + 10: f7ff eff6 blx 0 + 14: f7ff eff5 ; instruction: 0xf7ffeff5 + 18: 46c0 nop ; \(mov r8, r8\) + 1a: f7ff eff1 ; instruction: 0xf7ffeff1 + 1e: f7ff eff0 blx 0 diff --git a/gas/testsuite/gas/arm/blx-bad.s b/gas/testsuite/gas/arm/blx-bad.s new file mode 100644 index 00000000000..cbc9c5376d4 --- /dev/null +++ b/gas/testsuite/gas/arm/blx-bad.s @@ -0,0 +1,16 @@ + .arm + .func ARM +ARM: nop + + .thumb + .thumb_func +THUMB: + blx ARM + nop + blx ARM + nop + .inst 0xf7ffeff6 + .inst 0xf7ffeff5 + nop + .inst 0xf7ffeff1 + .inst 0xf7ffeff0 diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 5284ba4ee9e..2083200ec92 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,7 @@ +2011-01-05 Nathan Sidwell + + * arm-dis.c (thumb32_opcodes): BLX must have bit zero clear. + 2011-01-04 H.J. Lu * i386-dis.c (REG_VEX_38F3): New. diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c index b8d02e55dce..91eba51da28 100644 --- a/opcodes/arm-dis.c +++ b/opcodes/arm-dis.c @@ -1563,7 +1563,7 @@ static const struct opcode32 thumb32_opcodes[] = {ARM_EXT_V6T2, 0xf0009000, 0xf800d000, "b%c.w\t%B%x"}, /* These have been 32-bit since the invention of Thumb. */ - {ARM_EXT_V4T, 0xf000c000, 0xf800d000, "blx%c\t%B%x"}, + {ARM_EXT_V4T, 0xf000c000, 0xf800d001, "blx%c\t%B%x"}, {ARM_EXT_V4T, 0xf000d000, 0xf800d000, "bl%c\t%B%x"}, /* Fallback. */