aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@rivosinc.com>2022-11-08 19:00:36 -0800
committerKito Cheng <kito.cheng@sifive.com>2024-01-19 16:02:51 +0800
commit730a801f950e7817696067906cf40d590688387a (patch)
tree3485e77c31e8d8e368d6b8a643e53cdd516d0c60 /gcc
parent5a22bb250d8f4ad239e12fea9828c18a0aa23e38 (diff)
downloadgcc-730a801f950e7817696067906cf40d590688387a.zip
gcc-730a801f950e7817696067906cf40d590688387a.tar.gz
gcc-730a801f950e7817696067906cf40d590688387a.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/common/config/riscv/riscv-common.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc
index 958a692..4da7f37 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},