public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [patch] Accept ARM IT on all cores
@ 2006-09-07 20:02 Paul Brook
  2006-09-08  8:29 ` Richard Earnshaw
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Brook @ 2006-09-07 20:02 UTC (permalink / raw)
  To: binutils

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] Accept ARM IT on all cores
  2006-09-07 20:02 [patch] Accept ARM IT on all cores Paul Brook
@ 2006-09-08  8:29 ` Richard Earnshaw
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Earnshaw @ 2006-09-08  8:29 UTC (permalink / raw)
  To: Paul Brook; +Cc: binutils

On Thu, 2006-09-07 at 21:02, Paul Brook wrote:
> 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.

OK.

R.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-09-08  8:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-07 20:02 [patch] Accept ARM IT on all cores Paul Brook
2006-09-08  8:29 ` Richard Earnshaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).