From: Richard Earnshaw Date: Mon, 5 Dec 2011 15:43:53 +0000 (+0000) Subject: * tc-arm.c (aeabi_set_public_attributes): Correctly set X-Git-Tag: gdb_7_4-2011-12-13-branchpoint~90 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ddd7f988d414805a92d470b9ae6cf46390033d92;p=platform%2Fupstream%2Fbinutils.git * tc-arm.c (aeabi_set_public_attributes): Correctly set Tag_ARM_ISA_use and Tag_Thumb_ISA_use. * gas/arm/attr-any-armv4t.d: New test. * gas/arm/attr-any-armv4t.s: New file. * gas/arm/attr-any-thumbv6.d: New test. * gas/arm/attr-any-thumbv6.s: New file. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 2d0b419..cb38a19 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2011-12-05 Richard Earnshaw + + * tc-arm.c (aeabi_set_public_attributes): Correctly set + Tag_ARM_ISA_use and Tag_Thumb_ISA_use. + 2011-11-30 Matthew Gretton-Dann * config/tc-arm.c (arm_cpu_option_table): Add name_len field. diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 9111019..e521689 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -23666,7 +23666,14 @@ aeabi_set_public_attributes (void) ARM_MERGE_FEATURE_SETS (flags, arm_arch_used, thumb_arch_used); ARM_MERGE_FEATURE_SETS (flags, flags, *mfpu_opt); ARM_MERGE_FEATURE_SETS (flags, flags, selected_cpu); - /*Allow the user to override the reported architecture. */ + + if (ARM_CPU_HAS_FEATURE (arm_arch_used, arm_arch_any)) + ARM_MERGE_FEATURE_SETS (flags, flags, arm_ext_v1); + + if (ARM_CPU_HAS_FEATURE (thumb_arch_used, arm_arch_any)) + ARM_MERGE_FEATURE_SETS (flags, flags, arm_ext_v4t); + + /* Allow the user to override the reported architecture. */ if (object_arch) { ARM_CLEAR_FEATURE (flags, flags, arm_arch_any); diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index deb4360..1879288 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2011-12-05 Richard Earnshaw + + * gas/arm/attr-any-armv4t.d: New test. + * gas/arm/attr-any-armv4t.s: New file. + * gas/arm/attr-any-thumbv6.d: New test. + * gas/arm/attr-any-thumbv6.s: New file. + 2011-11-30 Matthew Gretton-Dann * gas/arm/cmdline-bad-arch.d: New test case. diff --git a/gas/testsuite/gas/arm/attr-any-armv4t.d b/gas/testsuite/gas/arm/attr-any-armv4t.d new file mode 100644 index 0000000..14be589 --- /dev/null +++ b/gas/testsuite/gas/arm/attr-any-armv4t.d @@ -0,0 +1,13 @@ +# name: attributes for 'any' cpu v4t ARM insn +# source: attr-any-armv4t.s +# as: +# readelf: -A +# This test is only valid on EABI based ports. +# target: *-*-*eabi + +Attribute Section: aeabi +File Attributes + Tag_CPU_arch: v4T + Tag_ARM_ISA_use: Yes + Tag_THUMB_ISA_use: Thumb-1 + Tag_DIV_use: Not allowed diff --git a/gas/testsuite/gas/arm/attr-any-armv4t.s b/gas/testsuite/gas/arm/attr-any-armv4t.s new file mode 100644 index 0000000..290e531 --- /dev/null +++ b/gas/testsuite/gas/arm/attr-any-armv4t.s @@ -0,0 +1 @@ + bx lr diff --git a/gas/testsuite/gas/arm/attr-any-thumbv6.d b/gas/testsuite/gas/arm/attr-any-thumbv6.d new file mode 100644 index 0000000..be8ec46 --- /dev/null +++ b/gas/testsuite/gas/arm/attr-any-thumbv6.d @@ -0,0 +1,12 @@ +# name: attributes for 'any' cpu v6 thumb insn +# source: attr-any-thumbv6.s +# as: +# readelf: -A +# This test is only valid on EABI based ports. +# target: *-*-*eabi + +Attribute Section: aeabi +File Attributes + Tag_CPU_arch: v6 + Tag_THUMB_ISA_use: Thumb-1 + Tag_DIV_use: Not allowed diff --git a/gas/testsuite/gas/arm/attr-any-thumbv6.s b/gas/testsuite/gas/arm/attr-any-thumbv6.s new file mode 100644 index 0000000..ed019c8 --- /dev/null +++ b/gas/testsuite/gas/arm/attr-any-thumbv6.s @@ -0,0 +1,2 @@ + .thumb + cpy r0, r1