* 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.
This commit is contained in:
Nick Clifton 2009-01-15 12:33:46 +00:00
parent 21169fcfad
commit bc2d180888
6 changed files with 41 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2009-01-15 Nick Clifton <nickc@redhat.com>
PR 9722
* config/tc-arm.c (do_t_nop): Check for availability of Thumb2
instructions before generating a Thumb2 nop.
2009-01-14 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* config/tc-s390.h: Define LOCAL_LABEL_PREFIX.

View File

@ -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

View File

@ -1,3 +1,10 @@
2009-01-15 Nick Clifton <nickc@redhat.com>
PR 9722
* 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.
2009-01-14 Peter Bergner <bergner@vnet.ibm.com>
* gas/ppc/power6.s ("mtfsf", "mtfsf.", "mtfsfi", "mtfsfi."): Add tests.

View File

@ -12,4 +12,4 @@ Disassembly of section .text:
0[0-9a-f]+ <[^>]+> bf30 wfi
0[0-9a-f]+ <[^>]+> bf40 sev
0[0-9a-f]+ <[^>]+> 4408 add r0, r1
0[0-9a-f]+ <[^>]+> bf00 nop
0[0-9a-f]+ <[^>]+> 46c0 nop.*

View File

@ -0,0 +1,10 @@
#skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* *-*-vxworks
#objdump: -dr --prefix-addresses --show-raw-insn
#name: PR9722: Generation of Thumb NOP instruction
.*: +file format .*arm.*
Disassembly of section .text:
0+0 <.*> 46c0[ ]+nop.*
0+2 <.*> 46c0[ ]+nop.*
0+4 <.*> bf00[ ]+nop

View File

@ -0,0 +1,8 @@
.thumb
.text
.arch armv4t
nop
.syntax unified
nop
.arch armv6t2
nop