This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[ARM] Support correctly spelled ARMv6KZ architecture names
- From: Matthew Wahab <matthew dot wahab at arm dot com>
- To: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Wed, 24 Jun 2015 09:37:27 +0100
- Subject: [ARM] Support correctly spelled ARMv6KZ architecture names
- Authentication-results: sourceware.org; auth=none
Hello,
GAS supports ARM architecture ARMv6KZ but misspells the name as ARMv6ZK. This is
made visible by the command line options -march=armv6zk, -march=armv6zkt2 and by
the value set for the Tag_CPU_name file attribute when -march is given but -mcpu
is not. (The value set for the Tag_CPU_arch is the correctly spelled 'v6KZ').
This patch fixes the name where it is used internally and adds "armv6kz" and
"armv6zkt2" to the list of supported architectures. To preserve existing
behaviour, "armv6zk" and "armv6zkt2" are kept as command line options. This
makes the value set for Tag_CPU_name follow the name given on the command line.
Tested for arm-none-linux-gnueabihf with check-binutils and check-gas.
Ok for trunk?
Matthew
gas/
2015-06-24 Matthew Wahab <matthew.wahab@arm.com>
* NEWS: Mention corrected spelling of armv6kz.
* config/tc-arm.c (arm_cpus): Replace ARM_ARCH_V6ZK with
ARM_ARCH_V6KZ.
(arm_archs): Likewise. Also add "armv6kz" and "armv6kzt2".
* doc/c-arm.texi: Replace "armv6zk" with "armv6kz".
gas/testsuite
2015-06-24 Matthew Wahab <matthew.wahab@arm.com>
* gas/arm/attr-march-armv6kz.d: New.
* gas/arm/attr-march-armv6kzt2.d: New.
include/opcode
2015-06-24 Matthew Wahab <matthew.wahab@arm.com>
* arm.h (ARM_AEXT_V6ZK): Rename to ARM_AEXT_V6KZ.
(ARM_AEXT_V6ZKT2): Rename to ARM_AEXT_V6KZT2.
(ARM_ARCH_V6ZK): Rename to ARM_ARCH_V6KZ.
(ARM_ARCH_V6ZKT2): Rename to ARM_ARCH_V6KZT2.
diff --git a/gas/NEWS b/gas/NEWS
index 986325d..02a8d00 100644
--- a/gas/NEWS
+++ b/gas/NEWS
@@ -2,6 +2,9 @@
Changes in 2.26:
+* Added the correctly spelled -march=armv6kz, for ARMv6KZ support. The
+ previous spelling, -march=armv6zk, is still accepted.
+
* Support for the ARMv8.1 architecture has been added to the Aarch64 port.
Support for the individual ARMv8.1 Adv.SIMD, LOR and PAN architecture
extensions has also been added to the Aarch64 port.
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 1793965..ea83cc9 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -24748,8 +24748,8 @@ static const struct arm_cpu_option_table arm_cpus[] =
ARM_CPU_OPT ("mpcorenovfp", ARM_ARCH_V6K, FPU_NONE, "MPCore"),
ARM_CPU_OPT ("arm1156t2-s", ARM_ARCH_V6T2, FPU_NONE, NULL),
ARM_CPU_OPT ("arm1156t2f-s", ARM_ARCH_V6T2, FPU_ARCH_VFP_V2, NULL),
- ARM_CPU_OPT ("arm1176jz-s", ARM_ARCH_V6ZK, FPU_NONE, NULL),
- ARM_CPU_OPT ("arm1176jzf-s", ARM_ARCH_V6ZK, FPU_ARCH_VFP_V2, NULL),
+ ARM_CPU_OPT ("arm1176jz-s", ARM_ARCH_V6KZ, FPU_NONE, NULL),
+ ARM_CPU_OPT ("arm1176jzf-s", ARM_ARCH_V6KZ, FPU_ARCH_VFP_V2, NULL),
ARM_CPU_OPT ("cortex-a5", ARM_ARCH_V7A_MP_SEC,
FPU_NONE, "Cortex-A5"),
ARM_CPU_OPT ("cortex-a7", ARM_ARCH_V7VE, FPU_ARCH_NEON_VFP_V4,
@@ -24851,11 +24851,17 @@ static const struct arm_arch_option_table arm_archs[] =
ARM_ARCH_OPT ("armv6j", ARM_ARCH_V6, FPU_ARCH_VFP),
ARM_ARCH_OPT ("armv6k", ARM_ARCH_V6K, FPU_ARCH_VFP),
ARM_ARCH_OPT ("armv6z", ARM_ARCH_V6Z, FPU_ARCH_VFP),
- ARM_ARCH_OPT ("armv6zk", ARM_ARCH_V6ZK, FPU_ARCH_VFP),
+ /* The official spelling of this variant is ARMv6KZ, the name "armv6zk" is
+ kept to preserve existing behaviour. */
+ ARM_ARCH_OPT ("armv6kz", ARM_ARCH_V6KZ, FPU_ARCH_VFP),
+ ARM_ARCH_OPT ("armv6zk", ARM_ARCH_V6KZ, FPU_ARCH_VFP),
ARM_ARCH_OPT ("armv6t2", ARM_ARCH_V6T2, FPU_ARCH_VFP),
ARM_ARCH_OPT ("armv6kt2", ARM_ARCH_V6KT2, FPU_ARCH_VFP),
ARM_ARCH_OPT ("armv6zt2", ARM_ARCH_V6ZT2, FPU_ARCH_VFP),
- ARM_ARCH_OPT ("armv6zkt2", ARM_ARCH_V6ZKT2, FPU_ARCH_VFP),
+ /* The official spelling of this variant is ARMv6KZ, the name "armv6zkt2" is
+ kept to preserve existing behaviour. */
+ ARM_ARCH_OPT ("armv6kzt2", ARM_ARCH_V6KZT2, FPU_ARCH_VFP),
+ ARM_ARCH_OPT ("armv6zkt2", ARM_ARCH_V6KZT2, FPU_ARCH_VFP),
ARM_ARCH_OPT ("armv6-m", ARM_ARCH_V6M, FPU_ARCH_VFP),
ARM_ARCH_OPT ("armv6s-m", ARM_ARCH_V6SM, FPU_ARCH_VFP),
ARM_ARCH_OPT ("armv7", ARM_ARCH_V7, FPU_ARCH_VFP),
diff --git a/gas/doc/c-arm.texi b/gas/doc/c-arm.texi
index 0c3b9f9..739f86b 100644
--- a/gas/doc/c-arm.texi
+++ b/gas/doc/c-arm.texi
@@ -210,7 +210,7 @@ names are recognized:
@code{armv6j},
@code{armv6k},
@code{armv6z},
-@code{armv6zk},
+@code{armv6kz},
@code{armv6-m},
@code{armv6s-m},
@code{armv7},
diff --git a/gas/testsuite/gas/arm/attr-march-armv6kz.d b/gas/testsuite/gas/arm/attr-march-armv6kz.d
new file mode 100644
index 0000000..fa0b5a0
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv6kz.d
@@ -0,0 +1,14 @@
+# name: attributes for -march=armv6kz
+# source: blank.s
+# as: -march=armv6kz
+# readelf: -A
+# This test is only valid on EABI based ports.
+# target: *-*-*eabi* *-*-nacl*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "6KZ"
+ Tag_CPU_arch: v6KZ
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-1
+ Tag_Virtualization_use: TrustZone
diff --git a/gas/testsuite/gas/arm/attr-march-armv6kzt2.d b/gas/testsuite/gas/arm/attr-march-armv6kzt2.d
new file mode 100644
index 0000000..1672a1f
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv6kzt2.d
@@ -0,0 +1,14 @@
+# name: attributes for -march=armv6kzt2
+# source: blank.s
+# as: -march=armv6kzt2
+# readelf: -A
+# This test is only valid on EABI based ports.
+# target: *-*-*eabi* *-*-nacl*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "6KZT2"
+ Tag_CPU_arch: v6T2
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-2
+ Tag_Virtualization_use: TrustZone
diff --git a/include/opcode/arm.h b/include/opcode/arm.h
index a5aa3a1..41f0564 100644
--- a/include/opcode/arm.h
+++ b/include/opcode/arm.h
@@ -111,13 +111,13 @@
#define ARM_AEXT_V6 (ARM_AEXT_V5TEJ | ARM_EXT_V6)
#define ARM_AEXT_V6K (ARM_AEXT_V6 | ARM_EXT_V6K)
#define ARM_AEXT_V6Z (ARM_AEXT_V6K | ARM_EXT_SEC)
-#define ARM_AEXT_V6ZK (ARM_AEXT_V6K | ARM_EXT_SEC)
+#define ARM_AEXT_V6KZ (ARM_AEXT_V6K | ARM_EXT_SEC)
#define ARM_AEXT_V6T2 (ARM_AEXT_V6 \
| ARM_EXT_V6T2 | ARM_EXT_V6_NOTM | ARM_EXT_THUMB_MSR \
| ARM_EXT_V6_DSP )
#define ARM_AEXT_V6KT2 (ARM_AEXT_V6T2 | ARM_EXT_V6K)
#define ARM_AEXT_V6ZT2 (ARM_AEXT_V6T2 | ARM_EXT_SEC)
-#define ARM_AEXT_V6ZKT2 (ARM_AEXT_V6T2 | ARM_EXT_V6K | ARM_EXT_SEC)
+#define ARM_AEXT_V6KZT2 (ARM_AEXT_V6T2 | ARM_EXT_V6K | ARM_EXT_SEC)
#define ARM_AEXT_V7_ARM (ARM_AEXT_V6KT2 | ARM_EXT_V7 | ARM_EXT_BARRIER)
#define ARM_AEXT_V7A (ARM_AEXT_V7_ARM | ARM_EXT_V7A)
#define ARM_AEXT_V7VE (ARM_AEXT_V7A | ARM_EXT_DIV | ARM_EXT_ADIV \
@@ -236,11 +236,11 @@
#define ARM_ARCH_V6 ARM_FEATURE_CORE_LOW (ARM_AEXT_V6)
#define ARM_ARCH_V6K ARM_FEATURE_CORE_LOW (ARM_AEXT_V6K)
#define ARM_ARCH_V6Z ARM_FEATURE_CORE_LOW (ARM_AEXT_V6Z)
-#define ARM_ARCH_V6ZK ARM_FEATURE_CORE_LOW (ARM_AEXT_V6ZK)
+#define ARM_ARCH_V6KZ ARM_FEATURE_CORE_LOW (ARM_AEXT_V6KZ)
#define ARM_ARCH_V6T2 ARM_FEATURE_CORE_LOW (ARM_AEXT_V6T2)
#define ARM_ARCH_V6KT2 ARM_FEATURE_CORE_LOW (ARM_AEXT_V6KT2)
#define ARM_ARCH_V6ZT2 ARM_FEATURE_CORE_LOW (ARM_AEXT_V6ZT2)
-#define ARM_ARCH_V6ZKT2 ARM_FEATURE_CORE_LOW (ARM_AEXT_V6ZKT2)
+#define ARM_ARCH_V6KZT2 ARM_FEATURE_CORE_LOW (ARM_AEXT_V6KZT2)
#define ARM_ARCH_V6M ARM_FEATURE_CORE_LOW (ARM_AEXT_V6M)
#define ARM_ARCH_V6SM ARM_FEATURE_CORE_LOW (ARM_AEXT_V6SM)
#define ARM_ARCH_V7 ARM_FEATURE_CORE_LOW (ARM_AEXT_V7)