This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Fix ARM GAS tests for non-ELF based ports
- From: Paul Brook <paul at codesourcery dot com>
- To: binutils at sourceware dot org
- Cc: Nick Clifton <nickc at redhat dot com>
- Date: Wed, 19 Apr 2006 17:59:49 +0100
- Subject: Re: Fix ARM GAS tests for non-ELF based ports
- References: <m3mzel68xg.fsf@redhat.com>
On Sunday 16 April 2006 12:45, Nick Clifton wrote:
> Hi Guys,
>
> A number of the new ARM GAS tests are failing for non-ELF based
> targets (eg: arm-pe) because they use ELF specific pseudo-ops,
> usually .arch. I am applying the attached patch to ensure that
> these tests are skipped for such targets.
There's no good reason why .arch is ELF specific.
The patch below makes the .arch, .cpu and .fpu directives for all targets, and
removes the corresponding skips.
Tested with cross to arm-eabi and arm-pe.
Ok?
Paul
2005-04-19 Paul Brook <paul@codesourcery.com>
gas/
* config/tc-arm.c (s_arm_arch, s_arm_cpu, s_arm_fpu): Enable for
all targets.
(md_pseudo_table): Enable .arch, .cpu and .fpu for all targets.
gas/testsuite/
* gas/arm/arch7.d: Remove skip.
* gas/arm/svc.d: Ditto.
* gas/arm/thumb2_bcond.d: Ditto.
* gas/arm/thumb2_it_bad.d: Ditto.
Index: gas/config/tc-arm.c
===================================================================
RCS file: /var/cvsroot/src-cvs/src/gas/config/tc-arm.c,v
retrieving revision 1.256
diff -u -p -r1.256 tc-arm.c
--- gas/config/tc-arm.c 7 Apr 2006 15:11:19 -0000 1.256
+++ gas/config/tc-arm.c 19 Apr 2006 15:04:36 -0000
@@ -2956,11 +2956,11 @@ bad:
as_bad (_("expected <tag> , <value>"));
ignore_rest_of_line ();
}
+#endif /* OBJ_ELF */
static void s_arm_arch (int);
static void s_arm_cpu (int);
static void s_arm_fpu (int);
-#endif /* OBJ_ELF */
/* This table describes all the machine specific pseudo-ops the assembler
has to support. The fields are:
@@ -2985,6 +2985,9 @@ const pseudo_typeS md_pseudo_table[] =
{ "ltorg", s_ltorg, 0 },
{ "pool", s_ltorg, 0 },
{ "syntax", s_syntax, 0 },
+ { "cpu", s_arm_cpu, 0 },
+ { "arch", s_arm_arch, 0 },
+ { "fpu", s_arm_fpu, 0 },
#ifdef OBJ_ELF
{ "word", s_arm_elf_cons, 4 },
{ "long", s_arm_elf_cons, 4 },
@@ -3000,9 +3003,6 @@ const pseudo_typeS md_pseudo_table[] =
{ "pad", s_arm_unwind_pad, 0 },
{ "setfp", s_arm_unwind_setfp, 0 },
{ "unwind_raw", s_arm_unwind_raw, 0 },
- { "cpu", s_arm_cpu, 0 },
- { "arch", s_arm_arch, 0 },
- { "fpu", s_arm_fpu, 0 },
{ "eabi_attribute", s_arm_eabi_attribute, 0 },
#else
{ "word", cons, 4},
@@ -13909,6 +13909,7 @@ arm_md_end (void)
p = frag_more (size);
elf32_arm_set_eabi_attr_contents (stdoutput, (bfd_byte *)p, size);
}
+#endif /* OBJ_ELF */
/* Parse a .cpu directive. */
@@ -14015,5 +14016,4 @@ s_arm_fpu (int ignored ATTRIBUTE_UNUSED)
*input_line_pointer = saved_char;
ignore_rest_of_line ();
}
-#endif /* OBJ_ELF */
Index: gas/testsuite/gas/arm/arch7.d
===================================================================
RCS file: /var/cvsroot/src-cvs/src/gas/testsuite/gas/arm/arch7.d,v
retrieving revision 1.2
diff -u -p -r1.2 arch7.d
--- gas/testsuite/gas/arm/arch7.d 16 Apr 2006 11:53:00 -0000 1.2
+++ gas/testsuite/gas/arm/arch7.d 19 Apr 2006 16:30:20 -0000
@@ -1,6 +1,5 @@
#name: ARM V7 instructions
#as: -march=armv7r
-#skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
#objdump: -dr --prefix-addresses --show-raw-insn
.*: +file format .*arm.*
Index: gas/testsuite/gas/arm/svc.d
===================================================================
RCS file: /var/cvsroot/src-cvs/src/gas/testsuite/gas/arm/svc.d,v
retrieving revision 1.2
diff -u -p -r1.2 svc.d
--- gas/testsuite/gas/arm/svc.d 16 Apr 2006 11:53:00 -0000 1.2
+++ gas/testsuite/gas/arm/svc.d 19 Apr 2006 16:30:20 -0000
@@ -1,6 +1,5 @@
# name: SWI/SVC instructions
# objdump: -dr --prefix-addresses --show-raw-insn
-# skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
.*: +file format .*arm.*
Index: gas/testsuite/gas/arm/thumb2_bcond.d
===================================================================
RCS file: /var/cvsroot/src-cvs/src/gas/testsuite/gas/arm/thumb2_bcond.d,v
retrieving revision 1.2
diff -u -p -r1.2 thumb2_bcond.d
--- gas/testsuite/gas/arm/thumb2_bcond.d 16 Apr 2006 11:53:00 -0000 1.2
+++ gas/testsuite/gas/arm/thumb2_bcond.d 19 Apr 2006 16:30:20 -0000
@@ -1,6 +1,5 @@
# as:
# objdump: -dr --prefix-addresses --show-raw-insn
-# skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
.*: +file format .*arm.*
Index: gas/testsuite/gas/arm/thumb2_it_bad.d
===================================================================
RCS file: /var/cvsroot/src-cvs/src/gas/testsuite/gas/arm/thumb2_it_bad.d,v
retrieving revision 1.2
diff -u -p -r1.2 thumb2_it_bad.d
--- gas/testsuite/gas/arm/thumb2_it_bad.d 16 Apr 2006 11:53:00 -0000 1.2
+++ gas/testsuite/gas/arm/thumb2_it_bad.d 19 Apr 2006 16:30:20 -0000
@@ -1,4 +1,3 @@
#name: Invalid IT instructions
#as:
-#skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
#error-output: thumb2_it_bad.l