diff mbox

[ARM] Correct spelling of references to ARMv6KZ

Message ID 55B0CA2C.7050307@arm.com
State New
Headers show

Commit Message

Kyrylo Tkachov July 23, 2015, 11:04 a.m. UTC
Hi Matthew,

On 23/07/15 11:54, Matthew Wahab wrote:
> On 24/06/15 10:25, Matthew Wahab wrote:
>
> Ping. Attached updated patch which also actually removes "armv6zk" from
> doc/invoke.texi.
>
> Also, retested:
> - arm-none-linux-gnueabihf native bootstrap and cross-compiled make checck.
> - arm-none-eabi: cross-compiled make check.
>
>
> gcc/
> 2015-07-23  Matthew Wahab  <matthew.wahab@arm.com>
>
> 	* config/arm/arm-arches.def: Add "armv6kz". Replace 6ZK with 6KZ
> 	and FL_FOR_ARCH6ZK with FL_FOR_ARCH6KZ.
> 	* config/arm/arm-c.c (arm_cpu_builtins): Emit "__ARM_ARCH_6ZK__"
> 	for armv6kz targets.
> 	* config/arm/arm-cores.def: Replace 6ZK with 6KZ.
> 	* config/arm/arm-protos.h (FL_ARCH6KZ): New.
> 	(FL_FOR_ARCH6ZK): Remove.
> 	(FL_FOR_ARCH6KZ): New.
> 	(arm_arch6zk): New declaration.
> 	* config/arm/arm-tables.opt: Regenerate.
> 	* config/arm/arm.c (arm_arch6kz): New.
> 	(arm_option_override): Set arm_arch6kz.
> 	* config/arm/arm.h (BASE_ARCH_6ZK): Rename to BASE_ARCH_6KZ.
> 	* config/arm/driver-arm.c: Add "armv6kz".
>           * doc/invoke.texi: Replace "armv6zk" with "armv6kz".
>
>
>> Hello,
>>
>> GCC supports ARM architecture ARMv6KZ but refers to it as ARMv6ZK. This is made
>> visible by the command line option -march=armv6zk and by the predefined macro
>> __ARM_ARCH_6ZK__.
>>
>> This patch corrects the spelling internally and adds -march=armv6kz. To preserve
>> existing behaviour, -march=armv6zk is kept as an alias of -march=armv6kz and
>> both __ARM_ARCH_6KZ__ and __ARM_ARCH_6ZK__ macros are defined for the
>> architecture.
>>
>> Use of -march=arm6kz will need to wait for binutils to be updated, a patch has
>> been submitted (https://sourceware.org/ml/binutils/2015-06/msg00236.html). Use
>> of the existing spelling, -march=arm6zk, still works with current binutils.
>>
>> Tested arm-none-linux-gnueabihf with check-gcc.
>>
>> Ok for trunk?
>> Matthew
>>
>> gcc/
>> 2015-15-24  Matthew Wahab  <matthew.wahab@arm.com>
>>
>> 	* config/arm/arm-arches.def: Add "armv6kz". Replace 6ZK with 6KZ
>> 	and FL_FOR_ARCH6ZK with FL_FOR_ARCH6KZ.
>> 	* config/arm/arm-c.c (arm_cpu_builtins): Emit "__ARM_ARCH_6ZK__"
>> 	for armv6kz targets.
>> 	* config/arm/arm-cores.def: Replace 6ZK with 6KZ.
>> 	* config/arm/arm-protos.h (FL_ARCH6KZ): New.
>> 	(FL_FOR_ARCH6ZK): Remove.
>> 	(FL_FOR_ARCH6KZ): New.
>> 	(arm_arch6zk): New declaration.
>> 	* config/arm/arm-tables.opt: Regenerate.
>> 	* config/arm/arm.c (arm_arch6kz): New.
>> 	(arm_option_override): Set arm_arch6kz.
>> 	* config/arm/arm.h (BASE_ARCH_6ZK): Rename to BASE_ARCH_6KZ.
>> 	* config/arm/driver-arm.c: Add "armv6kz".
>>            * doc/invoke.texi: Replace "armv6zk" with "armv6kz" and
>> 	"armv6zkt2" with "armv6kzt2".
>>


This table is scanned from beginning to end, checking for the first field.
You introduce a duplicate here, so the second form will never be reached.
I'd suggest removing the wrong spelling from here, but the re-written march string
will be passed to the assembler, so if the assembler is old and doesn't support the
correct spelling we'll get errors. So it seems like in order to preserve backwards
compatibility we don't want to put the correctly spelled entry here :(
But definitely add a comment here mentioning the deliberate oversight.

Kyrill
diff mbox

Patch

diff --git a/gcc/config/arm/driver-arm.c b/gcc/config/arm/driver-arm.c
index c715bb7..7873606 100644
--- a/gcc/config/arm/driver-arm.c
+++ b/gcc/config/arm/driver-arm.c
@@ -35,6 +35,7 @@  static struct vendor_cpu arm_cpu_table[] = {
      {"0xb02", "armv6k", "mpcore"},
      {"0xb36", "armv6j", "arm1136j-s"},
      {"0xb56", "armv6t2", "arm1156t2-s"},
+    {"0xb76", "armv6kz", "arm1176jz-s"},
      {"0xb76", "armv6zk", "arm1176jz-s"},
      {"0xc05", "armv7-a", "cortex-a5"},
      {"0xc07", "armv7ve", "cortex-a7"},