Skip to content

Commit 55e196e

Browse files
[RISCV] Add sifive-x280 processor with all of its extensions
Add sifive-x280 processor that uses the SiFive7 scheduler model. Differential Revision: https://reviews.llvm.org/D149710
1 parent 30af2fb commit 55e196e

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

clang/test/Driver/riscv-cpus.c

+14
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,20 @@
167167
// MTUNE-E31-MCPU-E76-SAME: "-target-feature" "+zicsr" "-target-feature" "+zifencei"
168168
// MTUNE-E31-MCPU-E76-SAME: "-tune-cpu" "sifive-e76"
169169

170+
// mcpu with default march include experimental extensions
171+
// RUN: %clang -target riscv64 -### -c %s 2>&1 -menable-experimental-extensions -mcpu=sifive-x280 | FileCheck -check-prefix=MCPU-SIFIVE-X280 %s
172+
// MCPU-SIFIVE-X280: "-nostdsysteminc" "-target-cpu" "sifive-x280"
173+
// MCPU-SIFIVE-X280-SAME: "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+f" "-target-feature" "+d"
174+
// MCPU-SIFIVE-X280-SAME: "-target-feature" "+c" "-target-feature" "+v"
175+
// MCPU-SIFIVE-X280-SAME: "-target-feature" "+zicsr" "-target-feature" "+zifencei"
176+
// MCPU-SIFIVE-X280-SAME: "-target-feature" "+zfh"
177+
// MCPU-SIFIVE-X280-SAME: "-target-feature" "+zba" "-target-feature" "+zbb"
178+
// MCPU-SIFIVE-X280-SAME: "-target-feature" "+experimental-zvfh"
179+
// MCPU-SIFIVE-X280-SAME: "-target-feature" "+zvl128b"
180+
// MCPU-SIFIVE-X280-SAME: "-target-feature" "+zvl256b" "-target-feature" "+zvl32b"
181+
// MCPU-SIFIVE-X280-SAME: "-target-feature" "+zvl512b" "-target-feature" "+zvl64b"
182+
// MCPU-SIFIVE-X280-SAME: "-target-abi" "lp64d"
183+
170184
// Check failed cases
171185

172186
// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mcpu=generic-rv321 | FileCheck -check-prefix=FAIL-MCPU-NAME %s

llvm/docs/ReleaseNotes.rst

+1
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ Changes to the RISC-V Backend
175175
``RISCV::parseCPU``. The ``CPUKind`` enum is no longer part of the
176176
RISCVTargetParser.h interface. Similar for ``parseTuneCPUkind`` and
177177
``checkTuneCPUKind``.
178+
* Add sifive-x280 processor.
178179

179180
Changes to the WebAssembly Backend
180181
----------------------------------

llvm/lib/Target/RISCV/RISCVProcessors.td

+16
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,22 @@ def SIFIVE_U74 : RISCVProcessorModel<"sifive-u74",
166166
FeatureStdExtC],
167167
[TuneSiFive7]>;
168168

169+
def SIFIVE_X280 : RISCVProcessorModel<"sifive-x280", SiFive7Model,
170+
[Feature64Bit,
171+
FeatureStdExtZifencei,
172+
FeatureStdExtM,
173+
FeatureStdExtA,
174+
FeatureStdExtF,
175+
FeatureStdExtD,
176+
FeatureStdExtC,
177+
FeatureStdExtV,
178+
FeatureStdExtZvl512b,
179+
FeatureStdExtZfh,
180+
FeatureStdExtZvfh,
181+
FeatureStdExtZba,
182+
FeatureStdExtZbb],
183+
[TuneSiFive7]>;
184+
169185
def SYNTACORE_SCR1_BASE : RISCVProcessorModel<"syntacore-scr1-base",
170186
SyntacoreSCR1Model,
171187
[Feature32Bit,

0 commit comments

Comments
 (0)