summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Stubbs <andrew.stubbs@st.com>2009-01-26 14:36:43 +0000
committerAndrew Stubbs <andrew.stubbs@st.com>2009-01-26 14:36:43 +0000
commitee3c0378c3af1a2a248430691635a46663cc9976 (patch)
tree80a0aceb16916d6e30bc36b407878b235d801362
parent17f4880d2fc4a2758951631692072c9fb0147301 (diff)
downloadbinutils-ee3c0378c3af1a2a248430691635a46663cc9976.tar.gz
binutils-ee3c0378c3af1a2a248430691635a46663cc9976.tar.bz2
binutils-ee3c0378c3af1a2a248430691635a46663cc9976.zip
2009-01-26 Andrew Stubbs <ams@codesourcery.com>
gas/ * config/tc-arm.c (attributes_set_explicitly): New array. (s_arm_eabi_attribute): Check return value from s_vendor_attribute. (cpu_arch): Add ARM_ARCH_V5T. (aeabi_set_attribute_int): New function. (aeabi_set_attribute_string): New function. (aeabi_set_public_attributes): Set attributes according to the user's intentions, rather than the actual state of the binary. Use aeabi_set_attribute_int and aeabi_set_attribute_string instead of bfd_elf_add_proc_attr_int and bfd_elf_add_proc_attr_string. Support WMMXv2. Use attribute names instead of numbers. * read.c (s_vendor_attribute): Change return type to int. Return the tag number that was set. * read.h (s_vendor_attribute): Change return type to int. gas/testsuite/ * gas/arm/attr-cpu-directive.d: New file. * gas/arm/attr-cpu-directive.s: New file. * gas/arm/attr-default.d: New file. * gas/arm/attr-march-all.d: New file. * gas/arm/attr-march-armv1.d: New file. * gas/arm/attr-march-armv2.d: New file. * gas/arm/attr-march-armv2a.d: New file. * gas/arm/attr-march-armv2s.d: New file. * gas/arm/attr-march-armv3.d: New file. * gas/arm/attr-march-armv3m.d: New file. * gas/arm/attr-march-armv4.d: New file. * gas/arm/attr-march-armv4t.d: New file. * gas/arm/attr-march-armv4txm.d: New file. * gas/arm/attr-march-armv4xm.d: New file. * gas/arm/attr-march-armv5.d: New file. * gas/arm/attr-march-armv5t.d: New file. * gas/arm/attr-march-armv5te.d: New file. * gas/arm/attr-march-armv5tej.d: New file. * gas/arm/attr-march-armv5texp.d: New file. * gas/arm/attr-march-armv5txm.d: New file. * gas/arm/attr-march-armv6-m.d: New file. * gas/arm/attr-march-armv6.d: New file. * gas/arm/attr-march-armv6j.d: New file. * gas/arm/attr-march-armv6k.d: New file. * gas/arm/attr-march-armv6kt2.d: New file. * gas/arm/attr-march-armv6t2.d: New file. * gas/arm/attr-march-armv6z.d: New file. * gas/arm/attr-march-armv6zk.d: New file. * gas/arm/attr-march-armv6zkt2.d: New file. * gas/arm/attr-march-armv6zt2.d: New file. * gas/arm/attr-march-armv7-a.d: New file. * gas/arm/attr-march-armv7-m.d: New file. * gas/arm/attr-march-armv7-r.d: New file. * gas/arm/attr-march-armv7.d: New file. * gas/arm/attr-march-armv7a.d: New file. * gas/arm/attr-march-armv7m.d: New file. * gas/arm/attr-march-armv7r.d: New file. * gas/arm/attr-march-iwmmxt.d: New file. * gas/arm/attr-march-iwmmxt2.d: New file. * gas/arm/attr-march-xscale.d: New file. * gas/arm/attr-mcpu.d: New file. * gas/arm/attr-mfpu-arm1020e.d: New file. * gas/arm/attr-mfpu-arm1020t.d: New file. * gas/arm/attr-mfpu-arm1136jf-s.d: New file. * gas/arm/attr-mfpu-arm1136jfs.d: New file. * gas/arm/attr-mfpu-arm7500fe.d: New file. * gas/arm/attr-mfpu-fpa.d: New file. * gas/arm/attr-mfpu-fpa10.d: New file. * gas/arm/attr-mfpu-fpa11.d: New file. * gas/arm/attr-mfpu-fpe.d: New file. * gas/arm/attr-mfpu-fpe2.d: New file. * gas/arm/attr-mfpu-fpe3.d: New file. * gas/arm/attr-mfpu-maverick.d: New file. * gas/arm/attr-mfpu-neon-fp16.d: New file. * gas/arm/attr-mfpu-neon.d: New file. * gas/arm/attr-mfpu-softfpa.d: New file. * gas/arm/attr-mfpu-softvfp+vfp.d: New file. * gas/arm/attr-mfpu-softvfp.d: New file. * gas/arm/attr-mfpu-vfp.d: New file. * gas/arm/attr-mfpu-vfp10-r0.d: New file. * gas/arm/attr-mfpu-vfp10.d: New file. * gas/arm/attr-mfpu-vfp3.d: New file. * gas/arm/attr-mfpu-vfp9.d: New file. * gas/arm/attr-mfpu-vfpv2.d: New file. * gas/arm/attr-mfpu-vfpv3-d16.d: New file. * gas/arm/attr-mfpu-vfpv3.d: New file. * gas/arm/attr-mfpu-vfpxd.d: New file. * gas/arm/attr-order.d: Update Tag_ARM_ISA_use and Tag_THUMB_ISA_use. * gas/arm/attr-override-cpu-directive.d: New file. * gas/arm/attr-override-cpu-directive.s: New file. * gas/arm/attr-override-mcpu.d: New file. * gas/arm/attr-override-mcpu.s: New file. * gas/arm/blank.s: New file. * gas/arm/eabi_attr_1.d: Update Tag_ARM_ISA_use and Tag_THUMB_ISA_use. ld/testsuite/ * ld-arm/attr-merge-3.attr: Update following gas change. * ld-arm/attr-merge-2.attr: Update Tag_ARM_ISA_use and Tag_THUMB_ISA_use following gas changes. * ld-arm/attr-merge-4.attr: Likewise. * ld-arm/attr-merge-5.attr: Likewise. * ld-arm/attr-merge-arch-1.attr: Likewise. * ld-arm/attr-merge-arch-2.attr: Likewise. * ld-arm/attr-merge-unknown-2.d: Likewise. * ld-arm/attr-merge-unknown-2r.d: Likewise. * ld-arm/attr-merge-unknown-3.d: Likewise. * ld-arm/attr-merge-wchar-00-nowarn.d: Likewise. * ld-arm/attr-merge-wchar-00.d: Likewise. * ld-arm/attr-merge-wchar-02-nowarn.d: Likewise. * ld-arm/attr-merge-wchar-02.d: Likewise. * ld-arm/attr-merge-wchar-04-nowarn.d: Likewise. * ld-arm/attr-merge-wchar-04.d: Likewise. * ld-arm/attr-merge-wchar-20-nowarn.d: Likewise. * ld-arm/attr-merge-wchar-20.d: Likewise. * ld-arm/attr-merge-wchar-22-nowarn.d: Likewise. * ld-arm/attr-merge-wchar-22.d: Likewise. * ld-arm/attr-merge-wchar-24-nowarn.d: Likewise. * ld-arm/attr-merge-wchar-40-nowarn.d: Likewise. * ld-arm/attr-merge-wchar-40.d: Likewise. * ld-arm/attr-merge-wchar-42-nowarn.d: Likewise. * ld-arm/attr-merge-wchar-44-nowarn.d: Likewise. * ld-arm/attr-merge-wchar-44.d: Likewise. * ld-arm/attr-merge.attr: Likewise.
-rw-r--r--gas/ChangeLog16
-rw-r--r--gas/config/tc-arm.c87
-rw-r--r--gas/read.c16
-rw-r--r--gas/read.h2
-rw-r--r--gas/testsuite/ChangeLog77
-rw-r--r--gas/testsuite/gas/arm/attr-cpu-directive.d14
-rw-r--r--gas/testsuite/gas/arm/attr-cpu-directive.s1
-rw-r--r--gas/testsuite/gas/arm/attr-default.d11
-rw-r--r--gas/testsuite/gas/arm/attr-march-all.d14
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv1.d12
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv2.d12
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv2a.d12
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv2s.d12
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv3.d12
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv3m.d12
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv4.d12
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv4t.d13
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv4txm.d13
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv4xm.d12
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv5.d12
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv5t.d13
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv5te.d13
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv5tej.d13
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv5texp.d13
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv5txm.d13
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv6-m.d13
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv6.d13
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv6j.d13
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv6k.d13
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv6kt2.d13
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv6t2.d13
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv6z.d13
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv6zk.d13
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv6zkt2.d13
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv6zt2.d13
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv7-a.d14
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv7-m.d13
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv7-r.d14
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv7.d12
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv7a.d14
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv7m.d13
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv7r.d14
-rw-r--r--gas/testsuite/gas/arm/attr-march-iwmmxt.d14
-rw-r--r--gas/testsuite/gas/arm/attr-march-iwmmxt2.d14
-rw-r--r--gas/testsuite/gas/arm/attr-march-xscale.d13
-rw-r--r--gas/testsuite/gas/arm/attr-mcpu.d16
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-arm1020e.d12
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-arm1020t.d12
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-arm1136jf-s.d12
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-arm1136jfs.d12
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-arm7500fe.d11
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-fpa.d11
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-fpa10.d11
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-fpa11.d11
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-fpe.d11
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-fpe2.d11
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-fpe3.d11
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-maverick.d11
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-neon-fp16.d14
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-neon.d13
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-softfpa.d11
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-softvfp+vfp.d12
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-softvfp.d11
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-vfp.d12
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-vfp10-r0.d12
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-vfp10.d12
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-vfp3.d12
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-vfp9.d12
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-vfpv2.d12
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-vfpv3-d16.d12
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-vfpv3.d12
-rw-r--r--gas/testsuite/gas/arm/attr-mfpu-vfpxd.d12
-rw-r--r--gas/testsuite/gas/arm/attr-order.d2
-rw-r--r--gas/testsuite/gas/arm/attr-override-cpu-directive.d12
-rw-r--r--gas/testsuite/gas/arm/attr-override-cpu-directive.s5
-rw-r--r--gas/testsuite/gas/arm/attr-override-mcpu.d13
-rw-r--r--gas/testsuite/gas/arm/attr-override-mcpu.s2
-rw-r--r--gas/testsuite/gas/arm/blank.s1
-rw-r--r--gas/testsuite/gas/arm/eabi_attr_1.d1
-rw-r--r--ld/testsuite/ChangeLog30
-rw-r--r--ld/testsuite/ld-arm/attr-merge-2.attr2
-rw-r--r--ld/testsuite/ld-arm/attr-merge-3.attr2
-rw-r--r--ld/testsuite/ld-arm/attr-merge-4.attr2
-rw-r--r--ld/testsuite/ld-arm/attr-merge-5.attr2
-rw-r--r--ld/testsuite/ld-arm/attr-merge-arch-1.attr2
-rw-r--r--ld/testsuite/ld-arm/attr-merge-arch-2.attr2
-rw-r--r--ld/testsuite/ld-arm/attr-merge-unknown-2.d4
-rw-r--r--ld/testsuite/ld-arm/attr-merge-unknown-2r.d4
-rw-r--r--ld/testsuite/ld-arm/attr-merge-unknown-3.d4
-rw-r--r--ld/testsuite/ld-arm/attr-merge-wchar-00-nowarn.d4
-rw-r--r--ld/testsuite/ld-arm/attr-merge-wchar-00.d4
-rw-r--r--ld/testsuite/ld-arm/attr-merge-wchar-02-nowarn.d4
-rw-r--r--ld/testsuite/ld-arm/attr-merge-wchar-02.d4
-rw-r--r--ld/testsuite/ld-arm/attr-merge-wchar-04-nowarn.d4
-rw-r--r--ld/testsuite/ld-arm/attr-merge-wchar-04.d4
-rw-r--r--ld/testsuite/ld-arm/attr-merge-wchar-20-nowarn.d4
-rw-r--r--ld/testsuite/ld-arm/attr-merge-wchar-20.d4
-rw-r--r--ld/testsuite/ld-arm/attr-merge-wchar-22-nowarn.d4
-rw-r--r--ld/testsuite/ld-arm/attr-merge-wchar-22.d4
-rw-r--r--ld/testsuite/ld-arm/attr-merge-wchar-24-nowarn.d4
-rw-r--r--ld/testsuite/ld-arm/attr-merge-wchar-40-nowarn.d4
-rw-r--r--ld/testsuite/ld-arm/attr-merge-wchar-40.d4
-rw-r--r--ld/testsuite/ld-arm/attr-merge-wchar-42-nowarn.d4
-rw-r--r--ld/testsuite/ld-arm/attr-merge-wchar-44-nowarn.d4
-rw-r--r--ld/testsuite/ld-arm/attr-merge-wchar-44.d4
-rw-r--r--ld/testsuite/ld-arm/attr-merge.attr2
106 files changed, 1138 insertions, 41 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index f8669b5b21b..1ac99b96dba 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,19 @@
+2009-01-26 Andrew Stubbs <ams@codesourcery.com>
+
+ * config/tc-arm.c (attributes_set_explicitly): New array.
+ (s_arm_eabi_attribute): Check return value from s_vendor_attribute.
+ (cpu_arch): Add ARM_ARCH_V5T.
+ (aeabi_set_attribute_int): New function.
+ (aeabi_set_attribute_string): New function.
+ (aeabi_set_public_attributes): Set attributes according to the user's
+ intentions, rather than the actual state of the binary.
+ Use aeabi_set_attribute_int and aeabi_set_attribute_string instead of
+ bfd_elf_add_proc_attr_int and bfd_elf_add_proc_attr_string.
+ Support WMMXv2. Use attribute names instead of numbers.
+ * read.c (s_vendor_attribute): Change return type to int.
+ Return the tag number that was set.
+ * read.h (s_vendor_attribute): Change return type to int.
+
2009-01-26 Eric B. Weddington <eric.weddington@atmel.com>
PR 9789
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 0cefbdb007a..e97e0a3c697 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -241,6 +241,8 @@ static int meabi_flags = EABI_DEFAULT;
static int meabi_flags = EF_ARM_EABI_UNKNOWN;
# endif
+static int attributes_set_explicitly[NUM_KNOWN_OBJ_ATTRIBUTES];
+
bfd_boolean
arm_is_eabi (void)
{
@@ -3884,7 +3886,10 @@ s_arm_unwind_raw (int ignored ATTRIBUTE_UNUSED)
static void
s_arm_eabi_attribute (int ignored ATTRIBUTE_UNUSED)
{
- s_vendor_attribute (OBJ_ATTR_PROC);
+ int tag = s_vendor_attribute (OBJ_ATTR_PROC);
+
+ if (tag < NUM_KNOWN_OBJ_ATTRIBUTES)
+ attributes_set_explicitly[tag] = 1;
}
#endif /* OBJ_ELF */
@@ -20716,6 +20721,7 @@ static const cpu_arch_ver_table cpu_arch_ver[] =
{1, ARM_ARCH_V4},
{2, ARM_ARCH_V4T},
{3, ARM_ARCH_V5},
+ {3, ARM_ARCH_V5T},
{4, ARM_ARCH_V5TE},
{5, ARM_ARCH_V5TEJ},
{6, ARM_ARCH_V6},
@@ -20729,6 +20735,25 @@ static const cpu_arch_ver_table cpu_arch_ver[] =
{0, ARM_ARCH_NONE}
};
+/* Set an attribute if it has not already been set by the user. */
+static void
+aeabi_set_attribute_int (int tag, int value)
+{
+ if (tag < 1
+ || tag >= NUM_KNOWN_OBJ_ATTRIBUTES
+ || !attributes_set_explicitly[tag])
+ bfd_elf_add_proc_attr_int (stdoutput, tag, value);
+}
+
+static void
+aeabi_set_attribute_string (int tag, const char *value)
+{
+ if (tag < 1
+ || tag >= NUM_KNOWN_OBJ_ATTRIBUTES
+ || !attributes_set_explicitly[tag])
+ bfd_elf_add_proc_attr_string (stdoutput, tag, value);
+}
+
/* Set the public EABI object attributes. */
static void
aeabi_set_public_attributes (void)
@@ -20775,49 +20800,47 @@ aeabi_set_public_attributes (void)
for (i = 0; p[i]; i++)
p[i] = TOUPPER (p[i]);
}
- bfd_elf_add_proc_attr_string (stdoutput, 5, p);
+ aeabi_set_attribute_string (Tag_CPU_name, p);
}
/* Tag_CPU_arch. */
- bfd_elf_add_proc_attr_int (stdoutput, 6, arch);
+ aeabi_set_attribute_int (Tag_CPU_arch, arch);
/* Tag_CPU_arch_profile. */
if (ARM_CPU_HAS_FEATURE (flags, arm_ext_v7a))
- bfd_elf_add_proc_attr_int (stdoutput, 7, 'A');
+ aeabi_set_attribute_int (Tag_CPU_arch_profile, 'A');
else if (ARM_CPU_HAS_FEATURE (flags, arm_ext_v7r))
- bfd_elf_add_proc_attr_int (stdoutput, 7, 'R');
+ aeabi_set_attribute_int (Tag_CPU_arch_profile, 'R');
else if (ARM_CPU_HAS_FEATURE (flags, arm_ext_m))
- bfd_elf_add_proc_attr_int (stdoutput, 7, 'M');
+ aeabi_set_attribute_int (Tag_CPU_arch_profile, 'M');
/* Tag_ARM_ISA_use. */
- if (ARM_CPU_HAS_FEATURE (arm_arch_used, arm_arch_full))
- bfd_elf_add_proc_attr_int (stdoutput, 8, 1);
+ if (ARM_CPU_HAS_FEATURE (flags, arm_ext_v1)
+ || arch == 0)
+ aeabi_set_attribute_int (Tag_ARM_ISA_use, 1);
/* Tag_THUMB_ISA_use. */
- if (ARM_CPU_HAS_FEATURE (thumb_arch_used, arm_arch_full))
- bfd_elf_add_proc_attr_int (stdoutput, 9,
- ARM_CPU_HAS_FEATURE (thumb_arch_used, arm_arch_t2) ? 2 : 1);
+ if (ARM_CPU_HAS_FEATURE (flags, arm_ext_v4t)
+ || arch == 0)
+ aeabi_set_attribute_int (Tag_THUMB_ISA_use,
+ ARM_CPU_HAS_FEATURE (flags, arm_arch_t2) ? 2 : 1);
/* Tag_VFP_arch. */
- if (ARM_CPU_HAS_FEATURE (thumb_arch_used, fpu_vfp_ext_d32)
- || ARM_CPU_HAS_FEATURE (arm_arch_used, fpu_vfp_ext_d32))
- bfd_elf_add_proc_attr_int (stdoutput, 10, 4);
- else if (ARM_CPU_HAS_FEATURE (thumb_arch_used, fpu_vfp_ext_v3)
- || ARM_CPU_HAS_FEATURE (arm_arch_used, fpu_vfp_ext_v3))
- bfd_elf_add_proc_attr_int (stdoutput, 10, 3);
- else if (ARM_CPU_HAS_FEATURE (thumb_arch_used, fpu_vfp_ext_v2)
- || ARM_CPU_HAS_FEATURE (arm_arch_used, fpu_vfp_ext_v2))
- bfd_elf_add_proc_attr_int (stdoutput, 10, 2);
- else if (ARM_CPU_HAS_FEATURE (thumb_arch_used, fpu_vfp_ext_v1)
- || ARM_CPU_HAS_FEATURE (arm_arch_used, fpu_vfp_ext_v1)
- || ARM_CPU_HAS_FEATURE (thumb_arch_used, fpu_vfp_ext_v1xd)
- || ARM_CPU_HAS_FEATURE (arm_arch_used, fpu_vfp_ext_v1xd))
- bfd_elf_add_proc_attr_int (stdoutput, 10, 1);
+ if (ARM_CPU_HAS_FEATURE (flags, fpu_vfp_ext_d32))
+ aeabi_set_attribute_int (Tag_VFP_arch, 3);
+ else if (ARM_CPU_HAS_FEATURE (flags, fpu_vfp_ext_v3))
+ aeabi_set_attribute_int (Tag_VFP_arch, 4);
+ else if (ARM_CPU_HAS_FEATURE (flags, fpu_vfp_ext_v2))
+ aeabi_set_attribute_int (Tag_VFP_arch, 2);
+ else if (ARM_CPU_HAS_FEATURE (flags, fpu_vfp_ext_v1)
+ || ARM_CPU_HAS_FEATURE (flags, fpu_vfp_ext_v1xd))
+ aeabi_set_attribute_int (Tag_VFP_arch, 1);
/* Tag_WMMX_arch. */
- if (ARM_CPU_HAS_FEATURE (thumb_arch_used, arm_cext_iwmmxt)
- || ARM_CPU_HAS_FEATURE (arm_arch_used, arm_cext_iwmmxt))
- bfd_elf_add_proc_attr_int (stdoutput, 11, 1);
- /* Tag_NEON_arch. */
+ if (ARM_CPU_HAS_FEATURE (flags, arm_cext_iwmmxt2))
+ aeabi_set_attribute_int (Tag_WMMX_arch, 2);
+ else if (ARM_CPU_HAS_FEATURE (flags, arm_cext_iwmmxt))
+ aeabi_set_attribute_int (Tag_WMMX_arch, 1);
+ /* Tag_Advanced_SIMD_arch (formerly Tag_NEON_arch). */
if (ARM_CPU_HAS_FEATURE (flags, fpu_neon_ext_v1))
- bfd_elf_add_proc_attr_int (stdoutput, 12, 1);
- /* Tag_NEON_FP16_arch. */
+ aeabi_set_attribute_int (Tag_Advanced_SIMD_arch, 1);
+ /* Tag_VFP_HP_extension (formerly Tag_NEON_FP16_arch). */
if (ARM_CPU_HAS_FEATURE (flags, fpu_neon_fp16))
- bfd_elf_add_proc_attr_int (stdoutput, 36, 1);
+ aeabi_set_attribute_int (Tag_VFP_HP_extension, 1);
}
/* Add the default contents for the .ARM.attributes section. */
diff --git a/gas/read.c b/gas/read.c
index db0cc876151..15ae78085fc 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -2060,8 +2060,9 @@ skip_past_char (char ** str, char c)
}
#define skip_past_comma(str) skip_past_char (str, ',')
-/* Parse an attribute directive for VENDOR. */
-void
+/* Parse an attribute directive for VENDOR.
+ Returns the attribute number read, or zero on error. */
+int
s_vendor_attribute (int vendor)
{
expressionS exp;
@@ -2104,7 +2105,7 @@ s_vendor_attribute (int vendor)
{
as_bad (_("Attribute name not recognised: %s"), name);
ignore_rest_of_line ();
- return;
+ return 0;
}
}
@@ -2119,7 +2120,7 @@ s_vendor_attribute (int vendor)
{
as_bad (_("expected numeric constant"));
ignore_rest_of_line ();
- return;
+ return 0;
}
i = exp.X_add_number;
}
@@ -2128,7 +2129,7 @@ s_vendor_attribute (int vendor)
{
as_bad (_("expected comma"));
ignore_rest_of_line ();
- return;
+ return 0;
}
if (type & 2)
{
@@ -2156,14 +2157,15 @@ s_vendor_attribute (int vendor)
}
demand_empty_rest_of_line ();
- return;
+ return tag;
bad_string:
as_bad (_("bad string constant"));
ignore_rest_of_line ();
- return;
+ return 0;
bad:
as_bad (_("expected <tag> , <value>"));
ignore_rest_of_line ();
+ return 0;
}
/* Parse a .gnu_attribute directive. */
diff --git a/gas/read.h b/gas/read.h
index 9974d741d2e..fa888adc37f 100644
--- a/gas/read.h
+++ b/gas/read.h
@@ -186,5 +186,5 @@ extern void stringer (int append_zero);
extern void s_xstab (int what);
extern void s_rva (int);
extern void s_incbin (int);
-extern void s_vendor_attribute (int);
+extern int s_vendor_attribute (int);
extern void s_weakref (int);
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 2b1ddb0bb2c..a1ebfbdd0a6 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,80 @@
+2009-01-26 Andrew Stubbs <ams@codesourcery.com>
+
+ * gas/arm/attr-cpu-directive.d: New file.
+ * gas/arm/attr-cpu-directive.s: New file.
+ * gas/arm/attr-default.d: New file.
+ * gas/arm/attr-march-all.d: New file.
+ * gas/arm/attr-march-armv1.d: New file.
+ * gas/arm/attr-march-armv2.d: New file.
+ * gas/arm/attr-march-armv2a.d: New file.
+ * gas/arm/attr-march-armv2s.d: New file.
+ * gas/arm/attr-march-armv3.d: New file.
+ * gas/arm/attr-march-armv3m.d: New file.
+ * gas/arm/attr-march-armv4.d: New file.
+ * gas/arm/attr-march-armv4t.d: New file.
+ * gas/arm/attr-march-armv4txm.d: New file.
+ * gas/arm/attr-march-armv4xm.d: New file.
+ * gas/arm/attr-march-armv5.d: New file.
+ * gas/arm/attr-march-armv5t.d: New file.
+ * gas/arm/attr-march-armv5te.d: New file.
+ * gas/arm/attr-march-armv5tej.d: New file.
+ * gas/arm/attr-march-armv5texp.d: New file.
+ * gas/arm/attr-march-armv5txm.d: New file.
+ * gas/arm/attr-march-armv6-m.d: New file.
+ * gas/arm/attr-march-armv6.d: New file.
+ * gas/arm/attr-march-armv6j.d: New file.
+ * gas/arm/attr-march-armv6k.d: New file.
+ * gas/arm/attr-march-armv6kt2.d: New file.
+ * gas/arm/attr-march-armv6t2.d: New file.
+ * gas/arm/attr-march-armv6z.d: New file.
+ * gas/arm/attr-march-armv6zk.d: New file.
+ * gas/arm/attr-march-armv6zkt2.d: New file.
+ * gas/arm/attr-march-armv6zt2.d: New file.
+ * gas/arm/attr-march-armv7-a.d: New file.
+ * gas/arm/attr-march-armv7-m.d: New file.
+ * gas/arm/attr-march-armv7-r.d: New file.
+ * gas/arm/attr-march-armv7.d: New file.
+ * gas/arm/attr-march-armv7a.d: New file.
+ * gas/arm/attr-march-armv7m.d: New file.
+ * gas/arm/attr-march-armv7r.d: New file.
+ * gas/arm/attr-march-iwmmxt.d: New file.
+ * gas/arm/attr-march-iwmmxt2.d: New file.
+ * gas/arm/attr-march-xscale.d: New file.
+ * gas/arm/attr-mcpu.d: New file.
+ * gas/arm/attr-mfpu-arm1020e.d: New file.
+ * gas/arm/attr-mfpu-arm1020t.d: New file.
+ * gas/arm/attr-mfpu-arm1136jf-s.d: New file.
+ * gas/arm/attr-mfpu-arm1136jfs.d: New file.
+ * gas/arm/attr-mfpu-arm7500fe.d: New file.
+ * gas/arm/attr-mfpu-fpa.d: New file.
+ * gas/arm/attr-mfpu-fpa10.d: New file.
+ * gas/arm/attr-mfpu-fpa11.d: New file.
+ * gas/arm/attr-mfpu-fpe.d: New file.
+ * gas/arm/attr-mfpu-fpe2.d: New file.
+ * gas/arm/attr-mfpu-fpe3.d: New file.
+ * gas/arm/attr-mfpu-maverick.d: New file.
+ * gas/arm/attr-mfpu-neon-fp16.d: New file.
+ * gas/arm/attr-mfpu-neon.d: New file.
+ * gas/arm/attr-mfpu-softfpa.d: New file.
+ * gas/arm/attr-mfpu-softvfp+vfp.d: New file.
+ * gas/arm/attr-mfpu-softvfp.d: New file.
+ * gas/arm/attr-mfpu-vfp.d: New file.
+ * gas/arm/attr-mfpu-vfp10-r0.d: New file.
+ * gas/arm/attr-mfpu-vfp10.d: New file.
+ * gas/arm/attr-mfpu-vfp3.d: New file.
+ * gas/arm/attr-mfpu-vfp9.d: New file.
+ * gas/arm/attr-mfpu-vfpv2.d: New file.
+ * gas/arm/attr-mfpu-vfpv3-d16.d: New file.
+ * gas/arm/attr-mfpu-vfpv3.d: New file.
+ * gas/arm/attr-mfpu-vfpxd.d: New file.
+ * gas/arm/attr-order.d: Update Tag_ARM_ISA_use and Tag_THUMB_ISA_use.
+ * gas/arm/attr-override-cpu-directive.d: New file.
+ * gas/arm/attr-override-cpu-directive.s: New file.
+ * gas/arm/attr-override-mcpu.d: New file.
+ * gas/arm/attr-override-mcpu.s: New file.
+ * gas/arm/blank.s: New file.
+ * gas/arm/eabi_attr_1.d: Update Tag_ARM_ISA_use and Tag_THUMB_ISA_use.
+
2009-01-26 Nick Clifton <nickc@redhat.com>
* gas/arm/attr-order.d: Do not run this test for non-ELF based ARM
diff --git a/gas/testsuite/gas/arm/attr-cpu-directive.d b/gas/testsuite/gas/arm/attr-cpu-directive.d
new file mode 100644
index 00000000000..357e8046c38
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-cpu-directive.d
@@ -0,0 +1,14 @@
+# name: EABI attributes from directives
+# source: attr-cpu-directive.s
+# as:
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "CORTEX-A8"
+ Tag_CPU_arch: v7
+ Tag_CPU_arch_profile: Application
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-2
diff --git a/gas/testsuite/gas/arm/attr-cpu-directive.s b/gas/testsuite/gas/arm/attr-cpu-directive.s
new file mode 100644
index 00000000000..ced1ff41427
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-cpu-directive.s
@@ -0,0 +1 @@
+ .cpu cortex-a8
diff --git a/gas/testsuite/gas/arm/attr-default.d b/gas/testsuite/gas/arm/attr-default.d
new file mode 100644
index 00000000000..fca3597d932
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-default.d
@@ -0,0 +1,11 @@
+# name: EABI attribute defaults
+# source: blank.s
+# as:
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-march-all.d b/gas/testsuite/gas/arm/attr-march-all.d
new file mode 100644
index 00000000000..66f2f79e81a
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-all.d
@@ -0,0 +1,14 @@
+# name: attributes for -march=all
+# source: blank.s
+# as: -march=all
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "all"
+ Tag_CPU_arch: v7
+ Tag_CPU_arch_profile: Application
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-2
diff --git a/gas/testsuite/gas/arm/attr-march-armv1.d b/gas/testsuite/gas/arm/attr-march-armv1.d
new file mode 100644
index 00000000000..d81b3e9c8d9
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv1.d
@@ -0,0 +1,12 @@
+# name: attributes for -march=armv1
+# source: blank.s
+# as: -march=armv1
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "1"
+ Tag_CPU_arch: v4
+ Tag_ARM_ISA_use: Yes
diff --git a/gas/testsuite/gas/arm/attr-march-armv2.d b/gas/testsuite/gas/arm/attr-march-armv2.d
new file mode 100644
index 00000000000..3c59db98096
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv2.d
@@ -0,0 +1,12 @@
+# name: attributes for -march=armv2
+# source: blank.s
+# as: -march=armv2
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "2"
+ Tag_CPU_arch: v4
+ Tag_ARM_ISA_use: Yes
diff --git a/gas/testsuite/gas/arm/attr-march-armv2a.d b/gas/testsuite/gas/arm/attr-march-armv2a.d
new file mode 100644
index 00000000000..1e6bcd003ed
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv2a.d
@@ -0,0 +1,12 @@
+# name: attributes for -march=armv2a
+# source: blank.s
+# as: -march=armv2a
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "2A"
+ Tag_CPU_arch: v4
+ Tag_ARM_ISA_use: Yes
diff --git a/gas/testsuite/gas/arm/attr-march-armv2s.d b/gas/testsuite/gas/arm/attr-march-armv2s.d
new file mode 100644
index 00000000000..5dd6e898b78
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv2s.d
@@ -0,0 +1,12 @@
+# name: attributes for -march=armv2s
+# source: blank.s
+# as: -march=armv2s
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "2S"
+ Tag_CPU_arch: v4
+ Tag_ARM_ISA_use: Yes
diff --git a/gas/testsuite/gas/arm/attr-march-armv3.d b/gas/testsuite/gas/arm/attr-march-armv3.d
new file mode 100644
index 00000000000..e34b83dd33d
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv3.d
@@ -0,0 +1,12 @@
+# name: attributes for -march=armv3
+# source: blank.s
+# as: -march=armv3
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "3"
+ Tag_CPU_arch: v4
+ Tag_ARM_ISA_use: Yes
diff --git a/gas/testsuite/gas/arm/attr-march-armv3m.d b/gas/testsuite/gas/arm/attr-march-armv3m.d
new file mode 100644
index 00000000000..f911c70c544
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv3m.d
@@ -0,0 +1,12 @@
+# name: attributes for -march=armv3m
+# source: blank.s
+# as: -march=armv3m
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "3M"
+ Tag_CPU_arch: v4
+ Tag_ARM_ISA_use: Yes
diff --git a/gas/testsuite/gas/arm/attr-march-armv4.d b/gas/testsuite/gas/arm/attr-march-armv4.d
new file mode 100644
index 00000000000..283cd70f7a7
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv4.d
@@ -0,0 +1,12 @@
+# name: attributes for -march=armv4
+# source: blank.s
+# as: -march=armv4
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "4"
+ Tag_CPU_arch: v4
+ Tag_ARM_ISA_use: Yes
diff --git a/gas/testsuite/gas/arm/attr-march-armv4t.d b/gas/testsuite/gas/arm/attr-march-armv4t.d
new file mode 100644
index 00000000000..fb860af69fd
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv4t.d
@@ -0,0 +1,13 @@
+# name: attributes for -march=armv4t
+# source: blank.s
+# as: -march=armv4t
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "4T"
+ Tag_CPU_arch: v4T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-march-armv4txm.d b/gas/testsuite/gas/arm/attr-march-armv4txm.d
new file mode 100644
index 00000000000..5995f291ecc
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv4txm.d
@@ -0,0 +1,13 @@
+# name: attributes for -march=armv4txm
+# source: blank.s
+# as: -march=armv4txm
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "4TXM"
+ Tag_CPU_arch: v4T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-march-armv4xm.d b/gas/testsuite/gas/arm/attr-march-armv4xm.d
new file mode 100644
index 00000000000..3ece89852f8
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv4xm.d
@@ -0,0 +1,12 @@
+# name: attributes for -march=armv4xm
+# source: blank.s
+# as: -march=armv4xm
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "4XM"
+ Tag_CPU_arch: v4
+ Tag_ARM_ISA_use: Yes
diff --git a/gas/testsuite/gas/arm/attr-march-armv5.d b/gas/testsuite/gas/arm/attr-march-armv5.d
new file mode 100644
index 00000000000..7ca0c76f036
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv5.d
@@ -0,0 +1,12 @@
+# name: attributes for -march=armv5
+# source: blank.s
+# as: -march=armv5
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "5"
+ Tag_CPU_arch: v5T
+ Tag_ARM_ISA_use: Yes
diff --git a/gas/testsuite/gas/arm/attr-march-armv5t.d b/gas/testsuite/gas/arm/attr-march-armv5t.d
new file mode 100644
index 00000000000..1d4d64d10dc
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv5t.d
@@ -0,0 +1,13 @@
+# name: attributes for -march=armv5t
+# source: blank.s
+# as: -march=armv5t
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "5T"
+ Tag_CPU_arch: v5T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-march-armv5te.d b/gas/testsuite/gas/arm/attr-march-armv5te.d
new file mode 100644
index 00000000000..311296dbe93
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv5te.d
@@ -0,0 +1,13 @@
+# name: attributes for -march=armv5te
+# source: blank.s
+# as: -march=armv5te
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "5TE"
+ Tag_CPU_arch: v5TE
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-march-armv5tej.d b/gas/testsuite/gas/arm/attr-march-armv5tej.d
new file mode 100644
index 00000000000..2ec8865ad5a
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv5tej.d
@@ -0,0 +1,13 @@
+# name: attributes for -march=armv5tej
+# source: blank.s
+# as: -march=armv5tej
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "5TEJ"
+ Tag_CPU_arch: v5TEJ
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-march-armv5texp.d b/gas/testsuite/gas/arm/attr-march-armv5texp.d
new file mode 100644
index 00000000000..29fd3b325a2
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv5texp.d
@@ -0,0 +1,13 @@
+# name: attributes for -march=armv5texp
+# source: blank.s
+# as: -march=armv5texp
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "5TEXP"
+ Tag_CPU_arch: v5TE
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-march-armv5txm.d b/gas/testsuite/gas/arm/attr-march-armv5txm.d
new file mode 100644
index 00000000000..c21a0ef4848
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv5txm.d
@@ -0,0 +1,13 @@
+# name: attributes for -march=armv5txm
+# source: blank.s
+# as: -march=armv5txm
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "5TXM"
+ Tag_CPU_arch: v5T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-march-armv6-m.d b/gas/testsuite/gas/arm/attr-march-armv6-m.d
new file mode 100644
index 00000000000..b5abfbd4c4c
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv6-m.d
@@ -0,0 +1,13 @@
+# name: attributes for -march=armv6-m
+# source: blank.s
+# as: -march=armv6-m
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "6-M"
+ Tag_CPU_arch: v6-M
+ Tag_CPU_arch_profile: Microcontroller
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-march-armv6.d b/gas/testsuite/gas/arm/attr-march-armv6.d
new file mode 100644
index 00000000000..87afc901bd6
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv6.d
@@ -0,0 +1,13 @@
+# name: attributes for -march=armv6
+# source: blank.s
+# as: -march=armv6
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "6"
+ Tag_CPU_arch: v6
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-march-armv6j.d b/gas/testsuite/gas/arm/attr-march-armv6j.d
new file mode 100644
index 00000000000..2d9ec70ca0d
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv6j.d
@@ -0,0 +1,13 @@
+# name: attributes for -march=armv6j
+# source: blank.s
+# as: -march=armv6j
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "6J"
+ Tag_CPU_arch: v6
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-march-armv6k.d b/gas/testsuite/gas/arm/attr-march-armv6k.d
new file mode 100644
index 00000000000..2bb0ba893e9
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv6k.d
@@ -0,0 +1,13 @@
+# name: attributes for -march=armv6k
+# source: blank.s
+# as: -march=armv6k
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "6K"
+ Tag_CPU_arch: v6K
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-march-armv6kt2.d b/gas/testsuite/gas/arm/attr-march-armv6kt2.d
new file mode 100644
index 00000000000..305040f4a0a
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv6kt2.d
@@ -0,0 +1,13 @@
+# name: attributes for -march=armv6kt2
+# source: blank.s
+# as: -march=armv6kt2
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "6KT2"
+ Tag_CPU_arch: v6T2
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-2
diff --git a/gas/testsuite/gas/arm/attr-march-armv6t2.d b/gas/testsuite/gas/arm/attr-march-armv6t2.d
new file mode 100644
index 00000000000..641ed9c0fa9
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv6t2.d
@@ -0,0 +1,13 @@
+# name: attributes for -march=armv6t2
+# source: blank.s
+# as: -march=armv6t2
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "6T2"
+ Tag_CPU_arch: v6T2
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-2
diff --git a/gas/testsuite/gas/arm/attr-march-armv6z.d b/gas/testsuite/gas/arm/attr-march-armv6z.d
new file mode 100644
index 00000000000..98704626e9a
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv6z.d
@@ -0,0 +1,13 @@
+# name: attributes for -march=armv6z
+# source: blank.s
+# as: -march=armv6z
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "6Z"
+ Tag_CPU_arch: v6KZ
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-march-armv6zk.d b/gas/testsuite/gas/arm/attr-march-armv6zk.d
new file mode 100644
index 00000000000..bec40e5a6cb
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv6zk.d
@@ -0,0 +1,13 @@
+# name: attributes for -march=armv6zk
+# source: blank.s
+# as: -march=armv6zk
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "6ZK"
+ Tag_CPU_arch: v6K
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-march-armv6zkt2.d b/gas/testsuite/gas/arm/attr-march-armv6zkt2.d
new file mode 100644
index 00000000000..672acd8e609
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv6zkt2.d
@@ -0,0 +1,13 @@
+# name: attributes for -march=armv6zkt2
+# source: blank.s
+# as: -march=armv6zkt2
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "6ZKT2"
+ Tag_CPU_arch: v6T2
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-2
diff --git a/gas/testsuite/gas/arm/attr-march-armv6zt2.d b/gas/testsuite/gas/arm/attr-march-armv6zt2.d
new file mode 100644
index 00000000000..e88d7ebf94c
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv6zt2.d
@@ -0,0 +1,13 @@
+# name: attributes for -march=armv6zt2
+# source: blank.s
+# as: -march=armv6zt2
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "6ZT2"
+ Tag_CPU_arch: v6T2
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-2
diff --git a/gas/testsuite/gas/arm/attr-march-armv7-a.d b/gas/testsuite/gas/arm/attr-march-armv7-a.d
new file mode 100644
index 00000000000..6074a1012c6
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv7-a.d
@@ -0,0 +1,14 @@
+# name: attributes for -march=armv7-a
+# source: blank.s
+# as: -march=armv7-a
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "7-A"
+ Tag_CPU_arch: v7
+ Tag_CPU_arch_profile: Application
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-2
diff --git a/gas/testsuite/gas/arm/attr-march-armv7-m.d b/gas/testsuite/gas/arm/attr-march-armv7-m.d
new file mode 100644
index 00000000000..e768201282d
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv7-m.d
@@ -0,0 +1,13 @@
+# name: attributes for -march=armv7-m
+# source: blank.s
+# as: -march=armv7-m
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "7-M"
+ Tag_CPU_arch: v7
+ Tag_CPU_arch_profile: Microcontroller
+ Tag_THUMB_ISA_use: Thumb-2
diff --git a/gas/testsuite/gas/arm/attr-march-armv7-r.d b/gas/testsuite/gas/arm/attr-march-armv7-r.d
new file mode 100644
index 00000000000..3bfeb2b3512
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv7-r.d
@@ -0,0 +1,14 @@
+# name: attributes for -march=armv7-r
+# source: blank.s
+# as: -march=armv7-r
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "7-R"
+ Tag_CPU_arch: v7
+ Tag_CPU_arch_profile: Realtime
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-2
diff --git a/gas/testsuite/gas/arm/attr-march-armv7.d b/gas/testsuite/gas/arm/attr-march-armv7.d
new file mode 100644
index 00000000000..ffb3dc1b1cb
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv7.d
@@ -0,0 +1,12 @@
+# name: attributes for -march=armv7
+# source: blank.s
+# as: -march=armv7
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "7"
+ Tag_CPU_arch: v7
+ Tag_THUMB_ISA_use: Thumb-2
diff --git a/gas/testsuite/gas/arm/attr-march-armv7a.d b/gas/testsuite/gas/arm/attr-march-armv7a.d
new file mode 100644
index 00000000000..053c99f149e
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv7a.d
@@ -0,0 +1,14 @@
+# name: attributes for -march=armv7a
+# source: blank.s
+# as: -march=armv7a
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "7A"
+ Tag_CPU_arch: v7
+ Tag_CPU_arch_profile: Application
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-2
diff --git a/gas/testsuite/gas/arm/attr-march-armv7m.d b/gas/testsuite/gas/arm/attr-march-armv7m.d
new file mode 100644
index 00000000000..ae0a7678c2d
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv7m.d
@@ -0,0 +1,13 @@
+# name: attributes for -march=armv7m
+# source: blank.s
+# as: -march=armv7m
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "7M"
+ Tag_CPU_arch: v7
+ Tag_CPU_arch_profile: Microcontroller
+ Tag_THUMB_ISA_use: Thumb-2
diff --git a/gas/testsuite/gas/arm/attr-march-armv7r.d b/gas/testsuite/gas/arm/attr-march-armv7r.d
new file mode 100644
index 00000000000..b7aa0940e83
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv7r.d
@@ -0,0 +1,14 @@
+# name: attributes for -march=armv7r
+# source: blank.s
+# as: -march=armv7r
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "7R"
+ Tag_CPU_arch: v7
+ Tag_CPU_arch_profile: Realtime
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-2
diff --git a/gas/testsuite/gas/arm/attr-march-iwmmxt.d b/gas/testsuite/gas/arm/attr-march-iwmmxt.d
new file mode 100644
index 00000000000..1d0358b51bc
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-iwmmxt.d
@@ -0,0 +1,14 @@
+# name: attributes for -march=iwmmxt
+# source: blank.s
+# as: -march=iwmmxt
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "iwmmxt"
+ Tag_CPU_arch: v5TE
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
+ Tag_WMMX_arch: WMMXv1
diff --git a/gas/testsuite/gas/arm/attr-march-iwmmxt2.d b/gas/testsuite/gas/arm/attr-march-iwmmxt2.d
new file mode 100644
index 00000000000..28b799ab427
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-iwmmxt2.d
@@ -0,0 +1,14 @@
+# name: attributes for -march=iwmmxt2
+# source: blank.s
+# as: -march=iwmmxt2
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "iwmmxt2"
+ Tag_CPU_arch: v5TE
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
+ Tag_WMMX_arch: WMMXv2
diff --git a/gas/testsuite/gas/arm/attr-march-xscale.d b/gas/testsuite/gas/arm/attr-march-xscale.d
new file mode 100644
index 00000000000..b723f50547d
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-xscale.d
@@ -0,0 +1,13 @@
+# name: attributes for -march=xscale
+# source: blank.s
+# as: -march=xscale
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "xscale"
+ Tag_CPU_arch: v5TE
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-mcpu.d b/gas/testsuite/gas/arm/attr-mcpu.d
new file mode 100644
index 00000000000..1a1c07f59f5
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mcpu.d
@@ -0,0 +1,16 @@
+# name: EABI attributes from command line
+# source: blank.s
+# as: -mcpu=cortex-a8
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "CORTEX-A8"
+ Tag_CPU_arch: v7
+ Tag_CPU_arch_profile: Application
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-2
+ Tag_VFP_arch: VFPv3
+ Tag_Advanced_SIMD_arch: NEONv1
diff --git a/gas/testsuite/gas/arm/attr-mfpu-arm1020e.d b/gas/testsuite/gas/arm/attr-mfpu-arm1020e.d
new file mode 100644
index 00000000000..bbdd244e3a3
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-arm1020e.d
@@ -0,0 +1,12 @@
+# name: attributes for -mfpu=arm1020e
+# source: blank.s
+# as: -mfpu=arm1020e
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
+ Tag_VFP_arch: VFPv2
diff --git a/gas/testsuite/gas/arm/attr-mfpu-arm1020t.d b/gas/testsuite/gas/arm/attr-mfpu-arm1020t.d
new file mode 100644
index 00000000000..5a5e4137820
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-arm1020t.d
@@ -0,0 +1,12 @@
+# name: attributes for -mfpu=arm1020t
+# source: blank.s
+# as: -mfpu=arm1020t
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
+ Tag_VFP_arch: VFPv1
diff --git a/gas/testsuite/gas/arm/attr-mfpu-arm1136jf-s.d b/gas/testsuite/gas/arm/attr-mfpu-arm1136jf-s.d
new file mode 100644
index 00000000000..1523c296e4a
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-arm1136jf-s.d
@@ -0,0 +1,12 @@
+# name: attributes for -mfpu=arm1136jf-s
+# source: blank.s
+# as: -mfpu=arm1136jf-s
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
+ Tag_VFP_arch: VFPv2
diff --git a/gas/testsuite/gas/arm/attr-mfpu-arm1136jfs.d b/gas/testsuite/gas/arm/attr-mfpu-arm1136jfs.d
new file mode 100644
index 00000000000..745a913a885
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-arm1136jfs.d
@@ -0,0 +1,12 @@
+# name: attributes for -mfpu=arm1136jfs
+# source: blank.s
+# as: -mfpu=arm1136jfs
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
+ Tag_VFP_arch: VFPv2
diff --git a/gas/testsuite/gas/arm/attr-mfpu-arm7500fe.d b/gas/testsuite/gas/arm/attr-mfpu-arm7500fe.d
new file mode 100644
index 00000000000..8f789e2ebcf
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-arm7500fe.d
@@ -0,0 +1,11 @@
+# name: attributes for -mfpu=arm7500fe
+# source: blank.s
+# as: -mfpu=arm7500fe
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-mfpu-fpa.d b/gas/testsuite/gas/arm/attr-mfpu-fpa.d
new file mode 100644
index 00000000000..196a0d0107f
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-fpa.d
@@ -0,0 +1,11 @@
+# name: attributes for -mfpu=fpa
+# source: blank.s
+# as: -mfpu=fpa
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-mfpu-fpa10.d b/gas/testsuite/gas/arm/attr-mfpu-fpa10.d
new file mode 100644
index 00000000000..23373b6b5ac
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-fpa10.d
@@ -0,0 +1,11 @@
+# name: attributes for -mfpu=fpa10
+# source: blank.s
+# as: -mfpu=fpa10
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-mfpu-fpa11.d b/gas/testsuite/gas/arm/attr-mfpu-fpa11.d
new file mode 100644
index 00000000000..c8928dd22e7
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-fpa11.d
@@ -0,0 +1,11 @@
+# name: attributes for -mfpu=fpa11
+# source: blank.s
+# as: -mfpu=fpa11
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-mfpu-fpe.d b/gas/testsuite/gas/arm/attr-mfpu-fpe.d
new file mode 100644
index 00000000000..a4b485a6ee9
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-fpe.d
@@ -0,0 +1,11 @@
+# name: attributes for -mfpu=fpe
+# source: blank.s
+# as: -mfpu=fpe
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-mfpu-fpe2.d b/gas/testsuite/gas/arm/attr-mfpu-fpe2.d
new file mode 100644
index 00000000000..e8480561b27
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-fpe2.d
@@ -0,0 +1,11 @@
+# name: attributes for -mfpu=fpe2
+# source: blank.s
+# as: -mfpu=fpe2
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-mfpu-fpe3.d b/gas/testsuite/gas/arm/attr-mfpu-fpe3.d
new file mode 100644
index 00000000000..108625c8ef4
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-fpe3.d
@@ -0,0 +1,11 @@
+# name: attributes for -mfpu=fpe3
+# source: blank.s
+# as: -mfpu=fpe3
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-mfpu-maverick.d b/gas/testsuite/gas/arm/attr-mfpu-maverick.d
new file mode 100644
index 00000000000..9ea4854a528
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-maverick.d
@@ -0,0 +1,11 @@
+# name: attributes for -mfpu=maverick
+# source: blank.s
+# as: -mfpu=maverick
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-mfpu-neon-fp16.d b/gas/testsuite/gas/arm/attr-mfpu-neon-fp16.d
new file mode 100644
index 00000000000..818982dfcbb
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-neon-fp16.d
@@ -0,0 +1,14 @@
+# name: attributes for -mfpu=neon-fp16
+# source: blank.s
+# as: -mfpu=neon-fp16
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
+ Tag_VFP_arch: VFPv3
+ Tag_Advanced_SIMD_arch: NEONv1
+ Tag_VFP_HP_extension: Allowed
diff --git a/gas/testsuite/gas/arm/attr-mfpu-neon.d b/gas/testsuite/gas/arm/attr-mfpu-neon.d
new file mode 100644
index 00000000000..1480962e1f5
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-neon.d
@@ -0,0 +1,13 @@
+# name: attributes for -mfpu=neon
+# source: blank.s
+# as: -mfpu=neon
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
+ Tag_VFP_arch: VFPv3
+ Tag_Advanced_SIMD_arch: NEONv1
diff --git a/gas/testsuite/gas/arm/attr-mfpu-softfpa.d b/gas/testsuite/gas/arm/attr-mfpu-softfpa.d
new file mode 100644
index 00000000000..5a0fa17114f
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-softfpa.d
@@ -0,0 +1,11 @@
+# name: attributes for -mfpu=softfpa
+# source: blank.s
+# as: -mfpu=softfpa
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-mfpu-softvfp+vfp.d b/gas/testsuite/gas/arm/attr-mfpu-softvfp+vfp.d
new file mode 100644
index 00000000000..7b21310559e
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-softvfp+vfp.d
@@ -0,0 +1,12 @@
+# name: attributes for -mfpu=softvfp+vfp
+# source: blank.s
+# as: -mfpu=softvfp+vfp
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
+ Tag_VFP_arch: VFPv2
diff --git a/gas/testsuite/gas/arm/attr-mfpu-softvfp.d b/gas/testsuite/gas/arm/attr-mfpu-softvfp.d
new file mode 100644
index 00000000000..c44dda5144e
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-softvfp.d
@@ -0,0 +1,11 @@
+# name: attributes for -mfpu=softvfp
+# source: blank.s
+# as: -mfpu=softvfp
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-mfpu-vfp.d b/gas/testsuite/gas/arm/attr-mfpu-vfp.d
new file mode 100644
index 00000000000..49ae2b3a4c2
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-vfp.d
@@ -0,0 +1,12 @@
+# name: attributes for -mfpu=vfp
+# source: blank.s
+# as: -mfpu=vfp
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
+ Tag_VFP_arch: VFPv2
diff --git a/gas/testsuite/gas/arm/attr-mfpu-vfp10-r0.d b/gas/testsuite/gas/arm/attr-mfpu-vfp10-r0.d
new file mode 100644
index 00000000000..1f6cb2b5af8
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-vfp10-r0.d
@@ -0,0 +1,12 @@
+# name: attributes for -mfpu=vfp10-r0
+# source: blank.s
+# as: -mfpu=vfp10-r0
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
+ Tag_VFP_arch: VFPv1
diff --git a/gas/testsuite/gas/arm/attr-mfpu-vfp10.d b/gas/testsuite/gas/arm/attr-mfpu-vfp10.d
new file mode 100644
index 00000000000..e72bcfaa02d
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-vfp10.d
@@ -0,0 +1,12 @@
+# name: attributes for -mfpu=vfp10
+# source: blank.s
+# as: -mfpu=vfp10
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
+ Tag_VFP_arch: VFPv2
diff --git a/gas/testsuite/gas/arm/attr-mfpu-vfp3.d b/gas/testsuite/gas/arm/attr-mfpu-vfp3.d
new file mode 100644
index 00000000000..8512e9d5428
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-vfp3.d
@@ -0,0 +1,12 @@
+# name: attributes for -mfpu=vfp3
+# source: blank.s
+# as: -mfpu=vfp3
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
+ Tag_VFP_arch: VFPv3
diff --git a/gas/testsuite/gas/arm/attr-mfpu-vfp9.d b/gas/testsuite/gas/arm/attr-mfpu-vfp9.d
new file mode 100644
index 00000000000..35f53bb8afa
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-vfp9.d
@@ -0,0 +1,12 @@
+# name: attributes for -mfpu=vfp9
+# source: blank.s
+# as: -mfpu=vfp9
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
+ Tag_VFP_arch: VFPv2
diff --git a/gas/testsuite/gas/arm/attr-mfpu-vfpv2.d b/gas/testsuite/gas/arm/attr-mfpu-vfpv2.d
new file mode 100644
index 00000000000..4091e4c6c8f
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-vfpv2.d
@@ -0,0 +1,12 @@
+# name: attributes for -mfpu=vfpv2
+# source: blank.s
+# as: -mfpu=vfpv2
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
+ Tag_VFP_arch: VFPv2
diff --git a/gas/testsuite/gas/arm/attr-mfpu-vfpv3-d16.d b/gas/testsuite/gas/arm/attr-mfpu-vfpv3-d16.d
new file mode 100644
index 00000000000..5542ee6a207
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-vfpv3-d16.d
@@ -0,0 +1,12 @@
+# name: attributes for -mfpu=vfpv3-d16
+# source: blank.s
+# as: -mfpu=vfpv3-d16
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
+ Tag_VFP_arch: VFPv3-D16
diff --git a/gas/testsuite/gas/arm/attr-mfpu-vfpv3.d b/gas/testsuite/gas/arm/attr-mfpu-vfpv3.d
new file mode 100644
index 00000000000..a5e4b7e84b8
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-vfpv3.d
@@ -0,0 +1,12 @@
+# name: attributes for -mfpu=vfpv3
+# source: blank.s
+# as: -mfpu=vfpv3
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
+ Tag_VFP_arch: VFPv3
diff --git a/gas/testsuite/gas/arm/attr-mfpu-vfpxd.d b/gas/testsuite/gas/arm/attr-mfpu-vfpxd.d
new file mode 100644
index 00000000000..6c1154caeb8
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-mfpu-vfpxd.d
@@ -0,0 +1,12 @@
+# name: attributes for -mfpu=vfpxd
+# source: blank.s
+# as: -mfpu=vfpxd
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
+ Tag_VFP_arch: VFPv1
diff --git a/gas/testsuite/gas/arm/attr-order.d b/gas/testsuite/gas/arm/attr-order.d
index eee7153d4a3..2d58ec40c2c 100644
--- a/gas/testsuite/gas/arm/attr-order.d
+++ b/gas/testsuite/gas/arm/attr-order.d
@@ -11,6 +11,8 @@ File Attributes
Tag_nodefaults: True
Tag_CPU_name: "ARM7TDMI"
Tag_CPU_arch: v4T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
Tag_unknown_63: "val"
Tag_also_compatible_with: v6-M
Tag_T2EE_use: Allowed
diff --git a/gas/testsuite/gas/arm/attr-override-cpu-directive.d b/gas/testsuite/gas/arm/attr-override-cpu-directive.d
new file mode 100644
index 00000000000..c8e0831168e
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-override-cpu-directive.d
@@ -0,0 +1,12 @@
+# name: EABI attributes .eabi_attribute overrides .cpu
+# source: attr-override-cpu-directive.s
+# as:
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "custom name"
+ Tag_CPU_arch: v7
+ Tag_THUMB_ISA_use: \?\?\? \(10\)
diff --git a/gas/testsuite/gas/arm/attr-override-cpu-directive.s b/gas/testsuite/gas/arm/attr-override-cpu-directive.s
new file mode 100644
index 00000000000..21a28122afd
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-override-cpu-directive.s
@@ -0,0 +1,5 @@
+ .cpu arm7tdmi
+ .eabi_attribute Tag_CPU_name, "custom name"
+ .eabi_attribute Tag_CPU_arch, 10
+ .eabi_attribute Tag_ARM_ISA_use, 0
+ .eabi_attribute Tag_THUMB_ISA_use, 10
diff --git a/gas/testsuite/gas/arm/attr-override-mcpu.d b/gas/testsuite/gas/arm/attr-override-mcpu.d
new file mode 100644
index 00000000000..31da04c213a
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-override-mcpu.d
@@ -0,0 +1,13 @@
+# name: EABI attributes .cpu overrides -mcpu
+# source: attr-override-mcpu.s
+# as: -mcpu=cortex-a8
+# readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "ARM7TDMI"
+ Tag_CPU_arch: v4T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/gas/testsuite/gas/arm/attr-override-mcpu.s b/gas/testsuite/gas/arm/attr-override-mcpu.s
new file mode 100644
index 00000000000..bc7a04c8d60
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-override-mcpu.s
@@ -0,0 +1,2 @@
+ .cpu arm7tdmi
+ .fpu softfpa
diff --git a/gas/testsuite/gas/arm/blank.s b/gas/testsuite/gas/arm/blank.s
new file mode 100644
index 00000000000..1d220541e82
--- /dev/null
+++ b/gas/testsuite/gas/arm/blank.s
@@ -0,0 +1 @@
+@ this file left intentionally blank
diff --git a/gas/testsuite/gas/arm/eabi_attr_1.d b/gas/testsuite/gas/arm/eabi_attr_1.d
index 0e97addb494..e3e3982d419 100644
--- a/gas/testsuite/gas/arm/eabi_attr_1.d
+++ b/gas/testsuite/gas/arm/eabi_attr_1.d
@@ -7,6 +7,7 @@ File Attributes
Tag_CPU_name: "ARM1136JF-S"
Tag_CPU_arch: v6
Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
Tag_ABI_VFP_args: VFP registers
Tag_compatibility: flag = 3, vendor = GNU
Tag_unknown_128: 1234 \(0x4d2\)
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index c996f513e44..b708780deef 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,33 @@
+2009-01-26 Andrew Stubbs <ams@codesourcery.com>
+
+ * ld-arm/attr-merge-3.attr: Update following gas change.
+ * ld-arm/attr-merge-2.attr: Update Tag_ARM_ISA_use and
+ Tag_THUMB_ISA_use following gas changes.
+ * ld-arm/attr-merge-4.attr: Likewise.
+ * ld-arm/attr-merge-5.attr: Likewise.
+ * ld-arm/attr-merge-arch-1.attr: Likewise.
+ * ld-arm/attr-merge-arch-2.attr: Likewise.
+ * ld-arm/attr-merge-unknown-2.d: Likewise.
+ * ld-arm/attr-merge-unknown-2r.d: Likewise.
+ * ld-arm/attr-merge-unknown-3.d: Likewise.
+ * ld-arm/attr-merge-wchar-00-nowarn.d: Likewise.
+ * ld-arm/attr-merge-wchar-00.d: Likewise.
+ * ld-arm/attr-merge-wchar-02-nowarn.d: Likewise.
+ * ld-arm/attr-merge-wchar-02.d: Likewise.
+ * ld-arm/attr-merge-wchar-04-nowarn.d: Likewise.
+ * ld-arm/attr-merge-wchar-04.d: Likewise.
+ * ld-arm/attr-merge-wchar-20-nowarn.d: Likewise.
+ * ld-arm/attr-merge-wchar-20.d: Likewise.
+ * ld-arm/attr-merge-wchar-22-nowarn.d: Likewise.
+ * ld-arm/attr-merge-wchar-22.d: Likewise.
+ * ld-arm/attr-merge-wchar-24-nowarn.d: Likewise.
+ * ld-arm/attr-merge-wchar-40-nowarn.d: Likewise.
+ * ld-arm/attr-merge-wchar-40.d: Likewise.
+ * ld-arm/attr-merge-wchar-42-nowarn.d: Likewise.
+ * ld-arm/attr-merge-wchar-44-nowarn.d: Likewise.
+ * ld-arm/attr-merge-wchar-44.d: Likewise.
+ * ld-arm/attr-merge.attr: Likewise.
+
2009-01-21 Alan Modra <amodra@bigpond.net.au>
* ld-spu/icache1.d: Add --non-ia-text to ld options.
diff --git a/ld/testsuite/ld-arm/attr-merge-2.attr b/ld/testsuite/ld-arm/attr-merge-2.attr
index 341e6d1e412..98faefa9517 100644
--- a/ld/testsuite/ld-arm/attr-merge-2.attr
+++ b/ld/testsuite/ld-arm/attr-merge-2.attr
@@ -2,6 +2,8 @@ Attribute Section: aeabi
File Attributes
Tag_CPU_name: "ARM7TDMI"
Tag_CPU_arch: v4T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
diff --git a/ld/testsuite/ld-arm/attr-merge-3.attr b/ld/testsuite/ld-arm/attr-merge-3.attr
index b5391325073..e4e06e19838 100644
--- a/ld/testsuite/ld-arm/attr-merge-3.attr
+++ b/ld/testsuite/ld-arm/attr-merge-3.attr
@@ -2,7 +2,7 @@ Attribute Section: aeabi
File Attributes
Tag_nodefaults: True
Tag_CPU_name: "ARM9E"
- Tag_CPU_arch: v5TE
+ Tag_CPU_arch: v5T
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-2
Tag_VFP_arch: VFPv3
diff --git a/ld/testsuite/ld-arm/attr-merge-4.attr b/ld/testsuite/ld-arm/attr-merge-4.attr
index e2a4cb9df78..75fd063117d 100644
--- a/ld/testsuite/ld-arm/attr-merge-4.attr
+++ b/ld/testsuite/ld-arm/attr-merge-4.attr
@@ -3,4 +3,6 @@ File Attributes
Tag_CPU_name: "ARM7TDMI"
Tag_CPU_arch: v4T
Tag_CPU_arch_profile: Microcontroller
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
Tag_also_compatible_with: v6-M
diff --git a/ld/testsuite/ld-arm/attr-merge-5.attr b/ld/testsuite/ld-arm/attr-merge-5.attr
index 9f0e0b2f4b6..9d3e97100b5 100644
--- a/ld/testsuite/ld-arm/attr-merge-5.attr
+++ b/ld/testsuite/ld-arm/attr-merge-5.attr
@@ -1,3 +1,5 @@
Attribute Section: aeabi
File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
Tag_compatibility: flag = 1, vendor = gnu
diff --git a/ld/testsuite/ld-arm/attr-merge-arch-1.attr b/ld/testsuite/ld-arm/attr-merge-arch-1.attr
index b08f14fc1d5..f69f1e76c28 100644
--- a/ld/testsuite/ld-arm/attr-merge-arch-1.attr
+++ b/ld/testsuite/ld-arm/attr-merge-arch-1.attr
@@ -2,3 +2,5 @@ Attribute Section: aeabi
File Attributes
Tag_CPU_name: "ARM v7"
Tag_CPU_arch: v7
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-2
diff --git a/ld/testsuite/ld-arm/attr-merge-arch-2.attr b/ld/testsuite/ld-arm/attr-merge-arch-2.attr
index 9d6a7bd6206..ac7679c8153 100644
--- a/ld/testsuite/ld-arm/attr-merge-arch-2.attr
+++ b/ld/testsuite/ld-arm/attr-merge-arch-2.attr
@@ -3,3 +3,5 @@ File Attributes
Tag_CPU_raw_name: "arch_v6k"
Tag_CPU_name: "MPCORE"
Tag_CPU_arch: v6K
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/ld/testsuite/ld-arm/attr-merge-unknown-2.d b/ld/testsuite/ld-arm/attr-merge-unknown-2.d
index 7d185717bf6..851b2afc746 100644
--- a/ld/testsuite/ld-arm/attr-merge-unknown-2.d
+++ b/ld/testsuite/ld-arm/attr-merge-unknown-2.d
@@ -4,7 +4,11 @@
#ld:
#warning: Unknown EABI object attribute 82
#readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
Attribute Section: aeabi
File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/ld/testsuite/ld-arm/attr-merge-unknown-2r.d b/ld/testsuite/ld-arm/attr-merge-unknown-2r.d
index 82402b30ce6..49141967f98 100644
--- a/ld/testsuite/ld-arm/attr-merge-unknown-2r.d
+++ b/ld/testsuite/ld-arm/attr-merge-unknown-2r.d
@@ -4,7 +4,11 @@
#ld:
#warning: Unknown EABI object attribute 82
#readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
Attribute Section: aeabi
File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
diff --git a/ld/testsuite/ld-arm/attr-merge-unknown-3.d b/ld/testsuite/ld-arm/attr-merge-unknown-3.d
index b09fcc901a7..1d08bff0602 100644
--- a/ld/testsuite/ld-arm/attr-merge-unknown-3.d
+++ b/ld/testsuite/ld-arm/attr-merge-unknown-3.d
@@ -4,8 +4,12 @@
#ld:
#warning: Unknown EABI object attribute 82
#readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
Attribute Section: aeabi
File Attributes
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
Tag_unknown_82: 1 \(0x1\)
diff --git a/ld/testsuite/ld-arm/attr-merge-wchar-00-nowarn.d b/ld/testsuite/ld-arm/attr-merge-wchar-00-nowarn.d
index e850c6438ee..922ea4034af 100644
--- a/ld/testsuite/ld-arm/attr-merge-wchar-00-nowarn.d
+++ b/ld/testsuite/ld-arm/attr-merge-wchar-00-nowarn.d
@@ -3,11 +3,15 @@
#as:
#ld: -r --no-wchar-size-warning
#readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "ARM7TDMI"
Tag_CPU_arch: v4T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
Tag_ABI_FP_number_model: IEEE 754
diff --git a/ld/testsuite/ld-arm/attr-merge-wchar-00.d b/ld/testsuite/ld-arm/attr-merge-wchar-00.d
index 1fcf7c0fe92..af296875026 100644
--- a/ld/testsuite/ld-arm/attr-merge-wchar-00.d
+++ b/ld/testsuite/ld-arm/attr-merge-wchar-00.d
@@ -3,11 +3,15 @@
#as:
#ld: -r
#readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "ARM7TDMI"
Tag_CPU_arch: v4T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
Tag_ABI_FP_number_model: IEEE 754
diff --git a/ld/testsuite/ld-arm/attr-merge-wchar-02-nowarn.d b/ld/testsuite/ld-arm/attr-merge-wchar-02-nowarn.d
index f6b7a68da73..09f815a057c 100644
--- a/ld/testsuite/ld-arm/attr-merge-wchar-02-nowarn.d
+++ b/ld/testsuite/ld-arm/attr-merge-wchar-02-nowarn.d
@@ -3,11 +3,15 @@
#as:
#ld: -r --no-wchar-size-warning
#readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "ARM7TDMI"
Tag_CPU_arch: v4T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
Tag_ABI_PCS_wchar_t: 2
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
diff --git a/ld/testsuite/ld-arm/attr-merge-wchar-02.d b/ld/testsuite/ld-arm/attr-merge-wchar-02.d
index dc907eef781..1c48b00f874 100644
--- a/ld/testsuite/ld-arm/attr-merge-wchar-02.d
+++ b/ld/testsuite/ld-arm/attr-merge-wchar-02.d
@@ -3,11 +3,15 @@
#as:
#ld: -r
#readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "ARM7TDMI"
Tag_CPU_arch: v4T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
Tag_ABI_PCS_wchar_t: 2
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
diff --git a/ld/testsuite/ld-arm/attr-merge-wchar-04-nowarn.d b/ld/testsuite/ld-arm/attr-merge-wchar-04-nowarn.d
index b369b78b729..2bdbab40ea7 100644
--- a/ld/testsuite/ld-arm/attr-merge-wchar-04-nowarn.d
+++ b/ld/testsuite/ld-arm/attr-merge-wchar-04-nowarn.d
@@ -3,11 +3,15 @@
#as:
#ld: -r --no-wchar-size-warning
#readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "ARM7TDMI"
Tag_CPU_arch: v4T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
diff --git a/ld/testsuite/ld-arm/attr-merge-wchar-04.d b/ld/testsuite/ld-arm/attr-merge-wchar-04.d
index 9aa3c4702d0..8ea16469b32 100644
--- a/ld/testsuite/ld-arm/attr-merge-wchar-04.d
+++ b/ld/testsuite/ld-arm/attr-merge-wchar-04.d
@@ -3,11 +3,15 @@
#as:
#ld: -r
#readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "ARM7TDMI"
Tag_CPU_arch: v4T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
diff --git a/ld/testsuite/ld-arm/attr-merge-wchar-20-nowarn.d b/ld/testsuite/ld-arm/attr-merge-wchar-20-nowarn.d
index 8cfb68226ba..d0c8634f403 100644
--- a/ld/testsuite/ld-arm/attr-merge-wchar-20-nowarn.d
+++ b/ld/testsuite/ld-arm/attr-merge-wchar-20-nowarn.d
@@ -3,11 +3,15 @@
#as:
#ld: -r --no-wchar-size-warning
#readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "ARM7TDMI"
Tag_CPU_arch: v4T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
Tag_ABI_PCS_wchar_t: 2
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
diff --git a/ld/testsuite/ld-arm/attr-merge-wchar-20.d b/ld/testsuite/ld-arm/attr-merge-wchar-20.d
index 1ba47f19cc7..6e02df9eece 100644
--- a/ld/testsuite/ld-arm/attr-merge-wchar-20.d
+++ b/ld/testsuite/ld-arm/attr-merge-wchar-20.d
@@ -3,11 +3,15 @@
#as:
#ld: -r
#readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "ARM7TDMI"
Tag_CPU_arch: v4T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
Tag_ABI_PCS_wchar_t: 2
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
diff --git a/ld/testsuite/ld-arm/attr-merge-wchar-22-nowarn.d b/ld/testsuite/ld-arm/attr-merge-wchar-22-nowarn.d
index 4a3d37e892e..17b288d62d9 100644
--- a/ld/testsuite/ld-arm/attr-merge-wchar-22-nowarn.d
+++ b/ld/testsuite/ld-arm/attr-merge-wchar-22-nowarn.d
@@ -3,11 +3,15 @@
#as:
#ld: -r --no-wchar-size-warning
#readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "ARM7TDMI"
Tag_CPU_arch: v4T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
Tag_ABI_PCS_wchar_t: 2
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
diff --git a/ld/testsuite/ld-arm/attr-merge-wchar-22.d b/ld/testsuite/ld-arm/attr-merge-wchar-22.d
index 23c072662fd..d1c790319a3 100644
--- a/ld/testsuite/ld-arm/attr-merge-wchar-22.d
+++ b/ld/testsuite/ld-arm/attr-merge-wchar-22.d
@@ -3,11 +3,15 @@
#as:
#ld: -r
#readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "ARM7TDMI"
Tag_CPU_arch: v4T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
Tag_ABI_PCS_wchar_t: 2
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
diff --git a/ld/testsuite/ld-arm/attr-merge-wchar-24-nowarn.d b/ld/testsuite/ld-arm/attr-merge-wchar-24-nowarn.d
index cadd7da5c4a..48825e54470 100644
--- a/ld/testsuite/ld-arm/attr-merge-wchar-24-nowarn.d
+++ b/ld/testsuite/ld-arm/attr-merge-wchar-24-nowarn.d
@@ -3,11 +3,15 @@
#as:
#ld: -r --no-wchar-size-warning
#readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "ARM7TDMI"
Tag_CPU_arch: v4T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
Tag_ABI_PCS_wchar_t: 2
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
diff --git a/ld/testsuite/ld-arm/attr-merge-wchar-40-nowarn.d b/ld/testsuite/ld-arm/attr-merge-wchar-40-nowarn.d
index 9d6e04099c2..8b4b1811adc 100644
--- a/ld/testsuite/ld-arm/attr-merge-wchar-40-nowarn.d
+++ b/ld/testsuite/ld-arm/attr-merge-wchar-40-nowarn.d
@@ -3,11 +3,15 @@
#as:
#ld: -r --no-wchar-size-warning
#readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "ARM7TDMI"
Tag_CPU_arch: v4T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
diff --git a/ld/testsuite/ld-arm/attr-merge-wchar-40.d b/ld/testsuite/ld-arm/attr-merge-wchar-40.d
index fcf9b547e66..e77c13b0b0d 100644
--- a/ld/testsuite/ld-arm/attr-merge-wchar-40.d
+++ b/ld/testsuite/ld-arm/attr-merge-wchar-40.d
@@ -3,11 +3,15 @@
#as:
#ld: -r
#readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "ARM7TDMI"
Tag_CPU_arch: v4T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
diff --git a/ld/testsuite/ld-arm/attr-merge-wchar-42-nowarn.d b/ld/testsuite/ld-arm/attr-merge-wchar-42-nowarn.d
index 8dbc4421864..dbd4e4d68c4 100644
--- a/ld/testsuite/ld-arm/attr-merge-wchar-42-nowarn.d
+++ b/ld/testsuite/ld-arm/attr-merge-wchar-42-nowarn.d
@@ -3,11 +3,15 @@
#as:
#ld: -r --no-wchar-size-warning
#readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "ARM7TDMI"
Tag_CPU_arch: v4T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
diff --git a/ld/testsuite/ld-arm/attr-merge-wchar-44-nowarn.d b/ld/testsuite/ld-arm/attr-merge-wchar-44-nowarn.d
index 7566d2aebbc..7e54473c22c 100644
--- a/ld/testsuite/ld-arm/attr-merge-wchar-44-nowarn.d
+++ b/ld/testsuite/ld-arm/attr-merge-wchar-44-nowarn.d
@@ -3,11 +3,15 @@
#as:
#ld: -r --no-wchar-size-warning
#readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "ARM7TDMI"
Tag_CPU_arch: v4T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
diff --git a/ld/testsuite/ld-arm/attr-merge-wchar-44.d b/ld/testsuite/ld-arm/attr-merge-wchar-44.d
index 430de30d218..c3c52f0283e 100644
--- a/ld/testsuite/ld-arm/attr-merge-wchar-44.d
+++ b/ld/testsuite/ld-arm/attr-merge-wchar-44.d
@@ -3,11 +3,15 @@
#as:
#ld: -r
#readelf: -A
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "ARM7TDMI"
Tag_CPU_arch: v4T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
diff --git a/ld/testsuite/ld-arm/attr-merge.attr b/ld/testsuite/ld-arm/attr-merge.attr
index 341e6d1e412..98faefa9517 100644
--- a/ld/testsuite/ld-arm/attr-merge.attr
+++ b/ld/testsuite/ld-arm/attr-merge.attr
@@ -2,6 +2,8 @@ Attribute Section: aeabi
File Attributes
Tag_CPU_name: "ARM7TDMI"
Tag_CPU_arch: v4T
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed