From patchwork Thu Jul 23 11:04:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrylo Tkachov X-Patchwork-Id: 499336 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B4E9D140D2E for ; Thu, 23 Jul 2015 21:04:25 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=SsuI9pDD; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; q=dns; s= default; b=Yl4w79sUJySQs3MO7KgjSIvutrfT76aqpdYNVegIpt6m3m9NbaMFN 8qcnhEsmzgH60uH/13Yv+VzsR8O3pBWR+D3FvT5WPsKpw7oroEnwNllor326sAUu 86ajecfp5YBLkzMOQ/obzZrqBsDeilIW6vN86x+8kO9KipBPnLSd8s= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; s=default; bh=NwBt7PgWHEOyn3NWKbCIP0wjjCY=; b=SsuI9pDDQ/I4wp9cdoGWrGd+ESKR hHq6NWPoK77GsC+U1bNImSKN9+7rY6fg1Y1zT5RDK8f5TXgcJdglbICGyp1pXuZ7 zrQ4Wjm2rXkbEuHaGJ/IKBt9uet+GowkgajW5tPc+yDfW4cvapnJtyHJKRYWofD8 bIUNMf82tLWxrns= Received: (qmail 49602 invoked by alias); 23 Jul 2015 11:04:18 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 49590 invoked by uid 89); 23 Jul 2015 11:04:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Jul 2015 11:04:17 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-24-DzOzkLoaS76EyE5p3Sqisg-1; Thu, 23 Jul 2015 12:04:12 +0100 Received: from [10.2.207.50] ([10.1.2.79]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 23 Jul 2015 12:04:12 +0100 Message-ID: <55B0CA2C.7050307@arm.com> Date: Thu, 23 Jul 2015 12:04:12 +0100 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Matthew Wahab , "gcc-patches@gcc.gnu.org" Subject: Re: [ARM] Correct spelling of references to ARMv6KZ References: <558A777F.4020209@arm.com> <55B0C7CB.9090607@foss.arm.com> In-Reply-To: <55B0C7CB.9090607@foss.arm.com> X-MC-Unique: DzOzkLoaS76EyE5p3Sqisg-1 X-IsSubscribed: yes 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 > > * 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 >> >> * 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 --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"},