From patchwork Mon Nov 7 18:58:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 16639 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2233711wru; Mon, 7 Nov 2022 11:01:42 -0800 (PST) X-Google-Smtp-Source: AMsMyM6fnIRWtuVahnyE8e2T0YIAj9OdnhdQwtHnPOIokWasTQ/6bAUcS+nsQv0yEim4kPC8n6p3 X-Received: by 2002:a05:6402:164d:b0:464:4ac8:d269 with SMTP id s13-20020a056402164d00b004644ac8d269mr23146105edx.394.1667847702310; Mon, 07 Nov 2022 11:01:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667847702; cv=none; d=google.com; s=arc-20160816; b=xDp+NgGTpyWKo8AE8QVkq5cuG5jr66oKSfdTB7L0smpQxEdKNsetVdNLPetUk0i8dT mRdD30zgSpb3gpBiFdrssb7olQkZ0Mi1rBR59qkcqnmOeFB13/tosarL30Qboskkv5yr iItVYQfa2ROhvS0tVHcZ1qou7NsTYA7iQ7z/wFR+tVjWcOkbswxbbWILWHilVtibQuWB W3YA5GGt5XbQLdOyTafeXCeDEGhCNzQSvV9lTj15+D8dO2WEwgNrscxssvqOIKEHWFhx cOCmzSH03JkS3z7je9vBL5cGvk1DpcrkBah5f+L+VAoehRwC/fOzJQ/3fHIQRCjPV/TL 4MXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:to:from:cc :content-transfer-encoding:mime-version:message-id:date:subject :dkim-signature:dmarc-filter:delivered-to; bh=yzkGR4+iAlMP0CtnhBr3vzjKHdsuYDazO+qJYCCVrbg=; b=rAmmTQVBate7qBDHdiNrUg/hcIdbOzTe/OeSsGstXMSfoQxpUPq2HC1C8IpjFniQja EFMbJQ8jk43uN4HpTq3yp/Zq2JKqq0SGIoaCPyr2ZIjqvBvDgLxM5BDfscVpUvgVdTw3 OmESYI3n4bvERPVq1hEd9gxUxfL3s5avkmgNQlZu3G30B7KK2fwSxOLCaonTPI8u3AFd RlGQzER08xM0jKlbVZIWSwNeOzVJeklNbqMqU3uparxCq/AbkXhu7AYs54PeiQgVAdhx xfJeoS6+1EvjHRhtjjebZ2r3UJxIjUkFq3BlNyV9xE4Nkg6ofi8pTIP3WXYdZ1SzCvi/ Eo8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=7Qr5OUhm; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id ga38-20020a1709070c2600b0078cc4a8a956si10893788ejc.881.2022.11.07.11.01.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 11:01:42 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=7Qr5OUhm; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 56B2C385843A for ; Mon, 7 Nov 2022 19:01:37 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by sourceware.org (Postfix) with ESMTPS id 2E8D23858D26 for ; Mon, 7 Nov 2022 19:01:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2E8D23858D26 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pj1-x1035.google.com with SMTP id m14-20020a17090a3f8e00b00212dab39bcdso15598864pjc.0 for ; Mon, 07 Nov 2022 11:01:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:from:to:cc:subject:date:message-id:reply-to; bh=yzkGR4+iAlMP0CtnhBr3vzjKHdsuYDazO+qJYCCVrbg=; b=7Qr5OUhmDXq1jGUU35MtiLX6NL8/6wH+i8T0wBF2BoEoYlZ6sn/auU1KSa773S5RyH 3Iug2vI8E9g4FlbvdT+7LyOuqa1dcfBuuBWWZnOces48oIJsHAb7myEj1PaRT2IC2F5U a4v4P1Rt4xfSJYkBcOEiF+wz3mDEC3J120C3SFbChaPo9zMRPokjPrsrFV+Rv4yu3BX4 pA9pIK0pEqKQKxr8ddoS7fCK7bFp7LW8VB5Jtn6A5xR8llXPm4mH6YbMK4v97FGpu7A+ 85jVQ939AIQG9dmRcSdBudPKDiUSWucOvMY/lqA9ch/HOu/Mt+YVeAdZ5U0jyvhS6HIZ OVkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yzkGR4+iAlMP0CtnhBr3vzjKHdsuYDazO+qJYCCVrbg=; b=GX//wepWIK1BCZDWmwjQ88QJ88ShLX77gb/g505/bessaaur8/RzAAUxRthAih03o3 81P/tfUfSTfyUpXlJS1l+sJpj/OjEKHqtjwb0oIbnrE2wRLiMe/uT8zGETCbB1qBAO77 lpd5QnuGzieBcPz3hlaVd+N5kfEnUH37SkEu/BBRXNJzttbdj9hduHnFiXEcKNP0Llrs 4OtW53/ckC9f/xct1JHx/UeySJDG6RFJxrD8VawfFxUxJhNsPxKdKlKHgtsSdCHOkFxx U0BhTVrHoob0tDRVsj2QKxjEd17MDIfPl3TRX8yb4aRIVQsMvMukOGMCD6bMvcTKS/AE oHhQ== X-Gm-Message-State: ACrzQf0qXUQlFhOMsuiH+ur4NUxHGkKIXIwXMiLetA9Xc6YFb2ryoRy/ Y4z1PJgXwcUcFu3J41tQaxbVssj+2j9ZcQ== X-Received: by 2002:a17:902:b190:b0:186:b9b2:9268 with SMTP id s16-20020a170902b19000b00186b9b29268mr51431088plr.32.1667847663575; Mon, 07 Nov 2022 11:01:03 -0800 (PST) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id m3-20020a170902db0300b0017d7e5a9fa7sm5346688plx.92.2022.11.07.11.01.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 11:01:03 -0800 (PST) Subject: [PATCH] invoke: RISC-V's -march doesn't take ISA strings Date: Mon, 7 Nov 2022 10:58:01 -0800 Message-Id: <20221107185801.326-1-palmer@rivosinc.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Cc: Palmer Dabbelt From: Palmer Dabbelt To: gcc-patches@gcc.gnu.org X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748865072116704260?= X-GMAIL-MSGID: =?utf-8?q?1748865072116704260?= The docs say we take ISA strings, but that's never really been the case: at a bare minimum we've required lower case strings, but there's generally been some subtle differences as well in things like version handling and such. We talked about removing the lower case requirement in the last GNU toolchain meeting and we've always called other differences just bugs. We don't have profile support yet, but based on the discussions on the RISC-V lists it looks like we're going to have some differences there as well. So let's just stop pretending these are ISA strings. That's been a headache for years now, if we're meant to just be ISA-string-like here then we don't have to worry about all these long-tail ISA string parsing issues. Link: https://lists.riscv.org/g/sig-toolchains/message/486 gcc/ChangeLog doc/invoke.texi (RISC-V): -march doesn't take ISA strings. --- This is now woefully under-documented, as we can't even fall back on the "it's just an ISA string" excuse any more. I'm happy to go document that, but figured I'd just send this along now so we can have the discussion. --- gcc/doc/invoke.texi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 94a2e20cfc1..780b0364c52 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -28617,11 +28617,11 @@ Produce code conforming to version 20191213. The default is @option{-misa-spec=20191213} unless GCC has been configured with @option{--with-isa-spec=} specifying a different default version. -@item -march=@var{ISA-string} +@item -march=@var{target-string} @opindex march -Generate code for given RISC-V ISA (e.g.@: @samp{rv64im}). ISA strings must be -lower-case. Examples include @samp{rv64i}, @samp{rv32g}, @samp{rv32e}, and -@samp{rv32imaf}. +Generate code for given target (e.g.@: @samp{rv64im}). Target strings are +similar to ISA strings, but must be lower-case. Examples include @samp{rv64i}, +@samp{rv32g}, @samp{rv32e}, and @samp{rv32imaf}. When @option{-march=} is not specified, use the setting from @option{-mcpu}.