diff options
author | Nick Clifton <nickc@redhat.com> | 2009-01-15 12:33:46 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2009-01-15 12:33:46 +0000 |
commit | bc2d180888f7f4efabce7eccf95088a540bc4fcb (patch) | |
tree | 48ee5c344e8c822e744ff06ed513d0993afc8318 /gas/config | |
parent | 21169fcfadfac63f7c02e33e19301cf375930b5e (diff) | |
download | gdb-bc2d180888f7f4efabce7eccf95088a540bc4fcb.zip gdb-bc2d180888f7f4efabce7eccf95088a540bc4fcb.tar.gz gdb-bc2d180888f7f4efabce7eccf95088a540bc4fcb.tar.bz2 |
PR 9722
* config/tc-arm.c (do_t_nop): Check for availability of Thumb2
instructions before generating a Thumb2 nop.
* gas/testsuite/gas/arm/archv6m.d: Update expected NOP opcode.
* gas/testsuite/gas/arm/pr9722.s: New test.
* gas/testsuite/gas/arm/pr9722.d: Expected disassembly.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-arm.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 37f8112..5998e55 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -9927,8 +9927,15 @@ do_t_nop (void) } else { - inst.instruction = THUMB_OP16 (inst.instruction); - inst.instruction |= inst.operands[0].imm << 4; + /* PR9722: Check for Thumb2 availability before + generating a thumb2 nop instruction. */ + if (ARM_CPU_HAS_FEATURE (cpu_variant, arm_arch_t2)) + { + inst.instruction = THUMB_OP16 (inst.instruction); + inst.instruction |= inst.operands[0].imm << 4; + } + else + inst.instruction = 0x46c0; } } else |