From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2093) id EBFA93858430; Fri, 19 Jan 2024 08:05:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EBFA93858430 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705651519; bh=UMtbZpGOhjnl0LMXGQq6Rt/S9KngXA7p1PfN6Zj6mTY=; h=From:To:Subject:Date:From; b=WEz+EVaMCQHKGVhCAUYPvxaVvOZPIE2CDlacR9ez7ltXawjcFiMAJZfaA4VojQFlk RBIQfk6RycLz67RZdnmN0wSzi9RMzTElLyXnQ6pNqYAHd80AnZ/fHQTVlFshiTwfEt 7BDQycajHBeyAnbEPwBDEfz9e4BwMxi2SoO4RkcA= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Kito Cheng To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-8274] RISC-V: Add the Zihpm and Zicntr extensions X-Act-Checkin: gcc X-Git-Author: Palmer Dabbelt X-Git-Refname: refs/heads/master X-Git-Oldrev: 5a22bb250d8f4ad239e12fea9828c18a0aa23e38 X-Git-Newrev: 730a801f950e7817696067906cf40d590688387a Message-Id: <20240119080519.EBFA93858430@sourceware.org> Date: Fri, 19 Jan 2024 08:05:19 +0000 (GMT) List-Id: https://gcc.gnu.org/g:730a801f950e7817696067906cf40d590688387a commit r14-8274-g730a801f950e7817696067906cf40d590688387a Author: Palmer Dabbelt Date: Tue Nov 8 19:00:36 2022 -0800 RISC-V: Add the Zihpm and Zicntr extensions These extensions were recently frozen [1]. As per Andrew's post [2] we're meant to ignore these in software, this just adds them to the list of allowed extensions and otherwise ignores them. I added these under SPEC_CLASS_NONE even though the PDF lists them as 20190614 because it seems pointless to add another spec class just to accept two extensions we then ignore. 1: https://groups.google.com/a/groups.riscv.org/g/isa-dev/c/HZGoqP1eyps/m/GTNKRLJoAQAJ 2: https://groups.google.com/a/groups.riscv.org/g/sw-dev/c/QKjQhChrq9Q/m/7gqdkctgAgAJ gcc/ChangeLog * common/config/riscv/riscv-common.cc: Add Zihpm and Zicnttr extensions. Diff: --- gcc/common/config/riscv/riscv-common.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc index 958a6925a6d..4da7f37303b 100644 --- a/gcc/common/config/riscv/riscv-common.cc +++ b/gcc/common/config/riscv/riscv-common.cc @@ -279,6 +279,9 @@ static const struct riscv_ext_version riscv_ext_version_table[] = {"zicbom",ISA_SPEC_CLASS_NONE, 1, 0}, {"zicbop",ISA_SPEC_CLASS_NONE, 1, 0}, + {"zicntr", ISA_SPEC_CLASS_NONE, 2, 0}, + {"zihpm", ISA_SPEC_CLASS_NONE, 2, 0}, + {"zk", ISA_SPEC_CLASS_NONE, 1, 0}, {"zkn", ISA_SPEC_CLASS_NONE, 1, 0}, {"zks", ISA_SPEC_CLASS_NONE, 1, 0},