diff options
author | Matthew Gretton-Dann <matthew.gretton-dann@arm.com> | 2012-08-24 07:50:38 +0000 |
---|---|---|
committer | Matthew Gretton-Dann <matthew.gretton-dann@arm.com> | 2012-08-24 07:50:38 +0000 |
commit | bca3892142429f819023a157be90c4d855cf93f8 (patch) | |
tree | 76e277e2b62f2589618489e945121e66bac4abbb /bfd/elf32-arm.c | |
parent | ecfb0d68c570de8a5e29858d104d82a76982de15 (diff) | |
download | gdb-bca3892142429f819023a157be90c4d855cf93f8.zip gdb-bca3892142429f819023a157be90c4d855cf93f8.tar.gz gdb-bca3892142429f819023a157be90c4d855cf93f8.tar.bz2 |
* bfd/elf32-arm.c (v8): New array.
(tag_cpu_arch_combine): Add support for ARMv8 attributes.
(elf32_arm_merge_eabi_attributes): Likewise.
(VFP_VERSION_COUNT): New define.
* binutils/readelf.c (arm_attr_tag_CPU_arch): Update for ARMv8.
(arm_attr_tag_FP_arch): Likewise.
(arm_attr_tag_Advanced_SIMD_arch): Likewise.
* gas/config/tc-arm.h (arm_ext_v8): New variable.
(fpu_vfp_ext_armv8): Likewise.
(fpu_neon_ext_armv8): Likewise.
(fpu_crypto_ext_armv8): Likewise.
(arm_archs): Add armv8-a.
(arm_extensions): Add crypto, fp, and simd.
(arm_fpus): Add fp-armv8, neon-fp-armv8, crypto-neon-fp-armv8.
(cpu_arch_ver): Add support for ARMv8.
(aeabi_set_public_sttributes): Likewise.
* gas/doc/c-arm.texi (ARM Options): Document new architecture and
extension options for ARMv8.
* gas/testsuite/gas/arm/attr-march-all.d: Update for change in expected
output.
* gas/testsuite/gas/arm/attr-mfpu-vfpv4-d16.d: Likewise.
* gas/testsuite/gas/arm/attr-mfpu-vfpv4.d: Likewise.
* gas/testsuite/gas/arm/attr-march-armv8-a+crypto.d: New testcase.
* gas/testsuite/gas/arm/attr-march-armv8-a+fp.d: Likewise.
* gas/testsuite/gas/arm/attr-march-armv8-a+simd.d: Likewise.
* gas/testsuite/gas/arm/attr-march-armv8-a.d: Likewise.
* include/elf/arm.h (TAG_CPU_ARCH_V8): New define.
(MAX_TAG_CPU_ARCH): Update.
* include/opcode/arm.h (ARM_EXT_V8): New define.
(FPU_VFP_EXT_ARMV8): Likewise.
(FPU_NEON_EXT_ARMV8): Likewise.
(FPU_CRYPTO_EXT_ARMV8): Likewise.
(ARM_AEXT_V8A): Likewise.
(FPU_VFP_ARMV8): Likwise.
(FPU_NEON_ARMV8): Likewise.
(FPU_CRYPTO_ARMV8): Likewise.
(FPU_ARCH_VFP_ARMV8): Likewise.
(FPU_ARCH_NEON_VFP_ARMV8): Likewise.
(FPU_ARCH_CRYPTO_NEON_VFP_ARMV8): Likewise.
(ARM_ARCH_V8A): Likwise.
(ARM_ARCH_V8A_FP): Likewise.
(ARM_ARCH_V8A_SIMD): Likewise.
(ARM_ARCH_V8A_CRYPTO): Likewise.
* ld/testsuite/ld-arm/arm-elf.exp: Add new testcases.
* ld/testsuite/ld-arm/attr-merge-vfp-3.d: Update for change in expected
output.
* ld/testsuite/ld-arm/attr-merge-vfp-3r.d: Likewise.
* ld/testsuite/ld-arm/attr-merge-vfp-4.d: Likewise.
* ld/testsuite/ld-arm/attr-merge-vfp-4r.d: Likewise.
* ld/testsuite/ld-arm/attr-merge-vfp-5.d: Likewise.
* ld/testsuite/ld-arm/attr-merge-vfp-5r.d: Likewise.
* ld/testsuite/ld-arm/attr-merge-vfp-7.d: New testcase.
* ld/testsuite/ld-arm/attr-merge-vfp-7r.d: Likewise.
* ld/testsuite/ld-arm/attr-merge-vfp-armv8-hard.s: Likewise.
* ld/testsuite/ld-arm/attr-merge-vfp-armv8.s: Likewise.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r-- | bfd/elf32-arm.c | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 4f2d00e..a287fbb 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -11327,6 +11327,24 @@ tag_cpu_arch_combine (bfd *ibfd, int oldtag, int *secondary_compat_out, T(V7E_M), /* V6S_M. */ T(V7E_M) /* V7E_M. */ }; + const int v8[] = + { + T(V8), /* PRE_V4. */ + T(V8), /* V4. */ + T(V8), /* V4T. */ + T(V8), /* V5T. */ + T(V8), /* V5TE. */ + T(V8), /* V5TEJ. */ + T(V8), /* V6. */ + T(V8), /* V6KZ. */ + T(V8), /* V6T2. */ + T(V8), /* V6K. */ + T(V8), /* V7. */ + T(V8), /* V6_M. */ + T(V8), /* V6S_M. */ + T(V8), /* V7E_M. */ + T(V8) /* V8. */ + }; const int v4t_plus_v6_m[] = { -1, /* PRE_V4. */ @@ -11343,6 +11361,7 @@ tag_cpu_arch_combine (bfd *ibfd, int oldtag, int *secondary_compat_out, T(V6_M), /* V6_M. */ T(V6S_M), /* V6S_M. */ T(V7E_M), /* V7E_M. */ + T(V8), /* V8. */ T(V4T_PLUS_V6_M) /* V4T plus V6_M. */ }; const int *comb[] = @@ -11353,6 +11372,7 @@ tag_cpu_arch_combine (bfd *ibfd, int oldtag, int *secondary_compat_out, v6_m, v6s_m, v7e_m, + v8, /* Pseudo-architecture. */ v4t_plus_v6_m }; @@ -11554,7 +11574,8 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd) "ARM v6K", "ARM v7", "ARM v6-M", - "ARM v6S-M" + "ARM v6S-M", + "ARM v8" }; /* Merge Tag_CPU_arch and Tag_also_compatible_with. */ @@ -11699,11 +11720,12 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd) when it's 0. It might mean absence of FP hardware if Tag_FP_arch is zero, otherwise it is effectively SP + DP. */ +#define VFP_VERSION_COUNT 8 static const struct { int ver; int regs; - } vfp_versions[7] = + } vfp_versions[VFP_VERSION_COUNT] = { {0, 0}, {1, 16}, @@ -11711,7 +11733,8 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd) {3, 32}, {3, 16}, {4, 32}, - {4, 16} + {4, 16}, + {8, 32} }; int ver; int regs; @@ -11751,9 +11774,10 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd) /* Now we can handle Tag_FP_arch. */ - /* Values greater than 6 aren't defined, so just pick the - biggest */ - if (in_attr[i].i > 6 && in_attr[i].i > out_attr[i].i) + /* Values of VFP_VERSION_COUNT or more aren't defined, so just + pick the biggest. */ + if (in_attr[i].i >= VFP_VERSION_COUNT + && in_attr[i].i > out_attr[i].i) { out_attr[i] = in_attr[i]; break; @@ -11768,7 +11792,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd) regs = vfp_versions[out_attr[i].i].regs; /* This assumes all possible supersets are also a valid options. */ - for (newval = 6; newval > 0; newval--) + for (newval = VFP_VERSION_COUNT - 1; newval > 0; newval--) { if (regs == vfp_versions[newval].regs && ver == vfp_versions[newval].ver) |