From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8260 invoked by alias); 21 Jul 2015 11:14:56 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 8249 invoked by uid 89); 21 Jul 2015 11:14:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: e06smtp17.uk.ibm.com Received: from e06smtp17.uk.ibm.com (HELO e06smtp17.uk.ibm.com) (195.75.94.113) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Tue, 21 Jul 2015 11:14:51 +0000 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 21 Jul 2015 12:14:47 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp17.uk.ibm.com (192.168.101.147) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 21 Jul 2015 12:14:45 +0100 X-MailFrom: uweigand@de.ibm.com X-RcptTo: gcc-patches@gcc.gnu.org Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 3EF8917D8042 for ; Tue, 21 Jul 2015 12:16:07 +0100 (BST) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t6LBEiwI14221514 for ; Tue, 21 Jul 2015 11:14:44 GMT Received: from d06av01.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t6LBEiiq007376 for ; Tue, 21 Jul 2015 05:14:44 -0600 Received: from oc7340732750.ibm.com (dyn-9-152-213-24.boeblingen.de.ibm.com [9.152.213.24]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t6LBEis2007371; Tue, 21 Jul 2015 05:14:44 -0600 Received: by oc7340732750.ibm.com (Postfix, from userid 500) id 8195C8A41; Tue, 21 Jul 2015 13:14:44 +0200 (CEST) Subject: Re: [PATCH 3/4] S390 -march=native related fixes To: vogt@linux.vnet.ibm.com Date: Tue, 21 Jul 2015 11:23:00 -0000 From: "Ulrich Weigand" Cc: gcc-patches@gcc.gnu.org In-Reply-To: <20150720155810.GA24028@linux.vnet.ibm.com> from "Dominik Vogt" at Jul 20, 2015 04:58:10 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20150721111444.8195C8A41@oc7340732750.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15072111-0029-0000-0000-0000058DD207 X-SW-Source: 2015-07/txt/msg01738.txt.bz2 Dominik Vogt wrote: > * config/s390/driver-native.c (s390_host_detect_local_cpu): Handle > processor capabilities with -march=native. > * config/s390/s390.h (MARCH_MTUNE_NATIVE_SPECS): Likewise. > (DRIVER_SELF_SPECS): Likewise. Join specs for 31 and 64 bit. > * (S390_TARGET_BITS_STRING): Macro to simplify specs. This version is looking good, except for one problem: > - "%{!m31:%{!m64:-m64}}", \ > - "%{!mesa:%{!mzarch:%{m31:-mesa}%{m64:-mzarch}}}", \ > - "%{!march=*:%{mesa:-march=g5}%{mzarch:-march=z900}}", \ There's a reason for this particular sequence. The first line ensures that one of -m64 or -m31 is present. The second line ensures that one of -mesa or -mzarch is present, but this works only if already one of -m64 or -m31 is present, so it needs to come *after* the first line. The third line ensures that some -march= switch is present, but this works only if already one of -mesa or -mzarch is present, so it needs to comer *after* the second line. > +#define DRIVER_SELF_SPECS \ > + "%{!m31:%{!m64:-m" S390_TARGET_BITS_STRING "}} " \ > + "%{!march=*:%{mesa:-march=g5}%{mzarch:-march=z900}} " \ > + MARCH_MTUNE_NATIVE_SPECS \ > + "%{!mesa:%{!mzarch:%{m31:-mesa}%{m64:-mzarch}}} " This inverts the order of the second and third lines, so it is now no longer guaranteed that at least one -march= switch is present. I understand that you need to move MARCH_MTUNE_NATIVE_SPECS ahead of the -mesa/-mzarch defaulting rule, but it should be possible to do that without changing the sequence of the three existing rules. Why not just move MARCH_MTUNE_NATIVE_SPECS first? Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com