From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by sourceware.org (Postfix) with ESMTPS id 106F03858006 for ; Mon, 24 Jan 2022 13:49:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 106F03858006 Received: by mail-ed1-x533.google.com with SMTP id u18so42432427edt.6 for ; Mon, 24 Jan 2022 05:49:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc :content-transfer-encoding; bh=PDlRKMHl7GugFy5S9tQt7w/NIMxpnumttbOD/F0NTf0=; b=As7f240ARO5gNWJLx5goVnJp8BMsWELNQNcfIGzNDi10qBZE8OXH/mCSV+R8pB2W4f B1nAmnQEMjZXmGOMG5sV8Q+9mbBBAYwGhXQ75D5V50+zhPwMR5YiX8qJ4pnneIyZ+uvD e4jZxpBKeYqqKHPMv5Xnxdg2zl4d492a69UoVQZrUvTNDGmOdJHJZ5FtKShiQC6lJX8w TJCPsgbu7R9D/KbR35RWWhN/YBwaImDEN+F/sJDgWSqhktIuHgw6kt9OPLxOSBgQp5re lbTuq4TmVq1Wg5E1CEGTF2yRn2yDqLtSqXw1eFrQP5+zUNrtkqmMo4pX9VSjvFdBOacu JI3A== X-Gm-Message-State: AOAM533JdlnkUGBAV9nEi4/6Ns2lnshMzZl49G0EVUbZltFQjEP3ihy3 frtumDmgUnI1chgrV6lvZBy+MpKuARFnu46qdCZhoplTqrE= X-Google-Smtp-Source: ABdhPJz2lI3uV72/YzEe0Iq+CQjGOfdL6eCu5pNzUTliLx4v2wE2M+pfZl/CBziqnfyvhXrrsOM4S5jo6gQbJGSxH6E= X-Received: by 2002:a05:6402:518c:: with SMTP id q12mr15905624edd.312.1643032174802; Mon, 24 Jan 2022 05:49:34 -0800 (PST) MIME-Version: 1.0 From: Kito Cheng Date: Mon, 24 Jan 2022 21:49:23 +0800 Message-ID: Subject: RISC-V GNU toolchain bumping default ISA spec to 20191213 To: libc-alpha@sourceware.org Cc: jim.wilson.gcc@gmail.com, Andrew Waterman , Palmer Dabbelt , Nelson Chu Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_ASCII_DIVIDERS, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jan 2022 13:49:37 -0000 Hi It=E2=80=99s Kito Cheng from the RISC-V GCC community, just sharing some ne= ws about the default ISA spec version that has been bumped to 20191213 on both RISC-V GCC and binutils recently, and that has one major incompatibility issue between current default ISA spec versions. The major incompatibility issue is the csr read/write (csrr*/csrw*) instructions and fence.i instruction has separated from the `I` extension, become two standalone extensions: Zicsr and Zifencei; so you might get error messages like that: unrecognized opcode `csrr`. ---------------------------------- # How to resolve those issues? Here is two solution to resolve: - First one is what we recommend, adding zicsr and/or zifencei to your -march option, e.g. -march=3Drv64imac become -march=3Drv64imac_zicsr_zifencei - The second one is a kind of workaround, using -misa-spec=3D2.2 to force RISC-V GCC using the older ISA spec version, however this is strongly *NOT* recommended. In case you want everything like before, you can add --with-isa-spec=3D2.2 build option for GCC and binutils, then the toolchain will default using the old version and work as an older GNU toolchain release. ---------------------------------- # Why GCC/binutils bump that? The default ISA spec version was set to 2.2 for long time, however the spec is released at May, 2017, which is 5 years ago, and RISC-V has at least two ISA spec release after that, so we believe that=E2=80=99s time to bump, and we also raise the discussion on the RISC-V BoF at Linux plumber, we reach a consensus is that we should moving forward even that having incompatible issue. ---------------------------------- # Why bump that so late? We worried about the incompatibility issue, but we realized that is unavoidable, and RISC-V is growing very quickly in the past year, so we believe it would be better to move forward now. # Why is there an incompatibility issue there? Why can't you avoid that? That is because the RISC-V ISA spec has changed, we believe the toolchain should honor what spec written. ---------------------------------- # Which ISA spec versions are supported by GNU toolchain now? Currently we support 2.2 20190608 and 20191213. 2.2: https://github.com/riscv/riscv-isa-manual/releases/tag/riscv-user-2.2 20190608: https://github.com/riscv/riscv-isa-manual/releases/tag/Ratified-IMFDQC-and-= Priv-v1.11 20191213: https://github.com/riscv/riscv-isa-manual/releases/tag/Ratified-IMAFDQC ---------------------------------- # Is there any newer ISA spec supported? It=E2=80=99s 2022! 20191213 is already 2 years ago, but RISC-V didn=E2=80=99t have further for= mal ISA spec release after that, what we can promise is that RISC-V GNU toolchain will support soon if ISA spec has newer release.