+2007-04-19 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (md_assemble): Only allow 16-bit instructions on
+ Thumb-1. Add sanity check for bogus relaxations.
+
2007-04-19 Paul Brook <paul@codesourcery.com>
* config/tc-arm.c (insns): Allow rsb and rsbs on Thumb-1.
return;
}
+ if (!ARM_CPU_HAS_FEATURE (variant, arm_ext_v6t2) && !inst.size_req)
+ {
+ /* Implicit require narrow instructions on Thumb-1. This avoids
+ relaxation accidentally introducing Thumb-2 instructions. */
+ if (opcode->tencode != do_t_blx && opcode->tencode != do_t_branch23)
+ inst.size_req = 2;
+ }
+
/* Check conditional suffixes. */
if (current_it_mask)
{
return;
}
}
+
+ /* Something has gone badly wrong if we try to relax a fixed size
+ instruction. */
+ assert (inst.size_req == 0 || !inst.relax);
+
ARM_MERGE_FEATURE_SETS (thumb_arch_used, thumb_arch_used,
*opcode->tvariant);
/* Many Thumb-2 instructions also have Thumb-1 variants, so explicitly
+2007-04-19 Paul Brook <paul@codesourcery.com>
+
+ * gas/arm/thumb1_unified.d: New test.
+ * gas/arm/thumb1_unified.s: New test.
+
2007-04-19 Nathan Froyd <froydnj@codesourcery.com>
* gas/ppc/booke.s: Add tlbsx, tlbsxe.
--- /dev/null
+# name: Thumb-1 unified
+# objdump: -dr --prefix-addresses --show-raw-insn
+
+.*: +file format .*arm.*
+
+Disassembly of section .text:
+0[0-9a-f]+ <[^>]+> 200c movs r0, #12
+0[0-9a-f]+ <[^>]+> 1cd1 adds r1, r2, #3
+0[0-9a-f]+ <[^>]+> 1ed1 subs r1, r2, #3
+0[0-9a-f]+ <[^>]+> 3364 adds r3, #100
+0[0-9a-f]+ <[^>]+> 3c83 subs r4, #131
+0[0-9a-f]+ <[^>]+> 2d27 cmp r5, #39
+0[0-9a-f]+ <[^>]+> a103 add r1, pc, #12 \(adr [^)]*\)
+0[0-9a-f]+ <[^>]+> 4a03 ldr r2, \[pc, #12\] \([^)]*\)
+0[0-9a-f]+ <[^>]+> 6863 ldr r3, \[r4, #4\]
+0[0-9a-f]+ <[^>]+> 9d01 ldr r5, \[sp, #4\]
+0[0-9a-f]+ <[^>]+> b001 add sp, #4
+0[0-9a-f]+ <[^>]+> b081 sub sp, #4
+0[0-9a-f]+ <[^>]+> af01 add r7, sp, #4
+0[0-9a-f]+ <[^>]+> 4251 negs r1, r2