This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Accept ARM IT on all cores


The ARM assembler accepts the IT instruction in ARM mode to allow the same 
assembly to be used for both ARM and Thumb-2. As it assembles to nothing it 
should be accepted on all cpus, not just those that support Thumb-2.

Tested with cross to arm-none-eabi.
Ok?

Paul

2006-09-07  Paul Brook  <paul@codesourcery.com>

	gas/
	* config/tc-arm.c (insns): Allow ARM IT pseudo-insn on all cores.

	gas/testsuite/
	* gas/arm/arm-it.s: New test.
	* gas/arm/arm-it.d: New test.

Index: gas/config/tc-arm.c
===================================================================
RCS file: /var/cvsroot/src-cvs/src/gas/config/tc-arm.c,v
retrieving revision 1.250.2.30
diff -u -p -r1.250.2.30 tc-arm.c
--- gas/config/tc-arm.c	6 Sep 2006 16:35:21 -0000	1.250.2.30
+++ gas/config/tc-arm.c	7 Sep 2006 19:11:54 -0000
@@ -14815,7 +14815,9 @@ static const struct asm_opcode insns[] =
 
   UT(cbnz,      b900,    2, (RR, EXP), t_czb),
   UT(cbz,       b100,    2, (RR, EXP), t_czb),
- /* ARM does not really have an IT instruction.  */
+ /* ARM does not really have an IT instruction, so always allow it.  */
+#undef ARM_VARIANT
+#define ARM_VARIANT &arm_ext_v1
  TUE(it,        0, bf08, 1, (COND),    it, t_it),
  TUE(itt,       0, bf0c, 1, (COND),    it, t_it),
  TUE(ite,       0, bf04, 1, (COND),    it, t_it),
Index: gas/testsuite/gas/arm/arm-it.d
===================================================================
RCS file: gas/testsuite/gas/arm/arm-it.d
diff -N gas/testsuite/gas/arm/arm-it.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/arm/arm-it.d	7 Sep 2006 19:24:26 -0000
@@ -0,0 +1,9 @@
+#name: ARM IT instruction
+#objdump: -dr --prefix-addresses --show-raw-insn
+#skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+.*: +file format .*arm.*
+
+Disassembly of section .text:
+0+000 <[^>]*> 03a00000 ?	moveq	r0, #0	; 0x0
+0+004 <[^>]*> e1a0f00e ?	mov	pc, lr
Index: gas/testsuite/gas/arm/arm-it.s
===================================================================
RCS file: gas/testsuite/gas/arm/arm-it.s
diff -N gas/testsuite/gas/arm/arm-it.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/arm/arm-it.s	7 Sep 2006 19:22:35 -0000
@@ -0,0 +1,8 @@
+	# Check that IT is accepted in ARM mode on older architectures
+	.text
+	.syntax unified
+	.arch armv4
+label1:
+	it	eq
+	moveq	r0, #0
+	mov	pc, lr


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]