* config/tc-arm.c (md_apply_fix): Check if widened add, sub are
flag-setting and handle accordingly. * gas/arm/addsw-bad.s: New file. * gas/arm/addsw-bad.l: New file. * gas/arm/addsw-bad.d: New file.
This commit is contained in:
parent
95b75c0115
commit
40f246e36c
|
@ -1,3 +1,8 @@
|
|||
2010-09-09 Tejas Belagod <tejas.belagod@arm.com>
|
||||
|
||||
* config/tc-arm.c (md_apply_fix): Check if widened add, sub are
|
||||
flag-setting and handle accordingly.
|
||||
|
||||
2010-09-09 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR gas/11972
|
||||
|
|
|
@ -20252,17 +20252,20 @@ md_apply_fix (fixS * fixP,
|
|||
/* Turn add/sum into addw/subw. */
|
||||
if (fixP->fx_r_type == BFD_RELOC_ARM_T32_ADD_IMM)
|
||||
newval = (newval & 0xfeffffff) | 0x02000000;
|
||||
|
||||
/* 12 bit immediate for addw/subw. */
|
||||
if (value < 0)
|
||||
/* No flat 12-bit imm encoding for addsw/subsw. */
|
||||
if ((newval & 0x00100000) == 0)
|
||||
{
|
||||
value = -value;
|
||||
newval ^= 0x00a00000;
|
||||
/* 12 bit immediate for addw/subw. */
|
||||
if (value < 0)
|
||||
{
|
||||
value = -value;
|
||||
newval ^= 0x00a00000;
|
||||
}
|
||||
if (value > 0xfff)
|
||||
newimm = (unsigned int) FAIL;
|
||||
else
|
||||
newimm = value;
|
||||
}
|
||||
if (value > 0xfff)
|
||||
newimm = (unsigned int) FAIL;
|
||||
else
|
||||
newimm = value;
|
||||
}
|
||||
|
||||
if (newimm == (unsigned int)FAIL)
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2010-09-09 Tejas Belagod <tejas.belagod@arm.com>
|
||||
|
||||
* gas/arm/addsw-bad.s: New file.
|
||||
* gas/arm/addsw-bad.l: New file.
|
||||
* gas/arm/addsw-bad.d: New file.
|
||||
|
||||
2010-09-03 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR gas/11974
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
#name: Invalid Immediate field for flag-setting add,sub
|
||||
#skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd
|
||||
#error-output: addsw-bad.l
|
|
@ -0,0 +1,3 @@
|
|||
[^:]*: Assembler messages:
|
||||
[^:]*:5: Error: invalid constant \(496\) after fixup
|
||||
[^:]*:6: Error: invalid constant \(496\) after fixup
|
|
@ -0,0 +1,6 @@
|
|||
.text
|
||||
.thumb
|
||||
.cpu cortex-a8
|
||||
.syntax unified
|
||||
subs r4, r6, #0x496
|
||||
adds r4, r6, #0x496
|
Loading…
Reference in New Issue