Skip to content

Commit bec3a54

Browse files
committed
Add support for MIPS VZ ISA extension
1 parent ed91732 commit bec3a54

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

compiler/rustc_codegen_llvm/src/llvm_util.rs

+4
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ pub fn time_trace_profiler_finish(file_name: &Path) {
165165
//
166166
// To find a list of LLVM's names, check llvm-project/llvm/include/llvm/Support/*TargetParser.def
167167
// where the * matches the architecture's name
168+
//
169+
// For targets not present in the above location, see llvm-project/llvm/lib/Target/{ARCH}/*.td
170+
// where `{ARCH}` is the architecture name. Look for instances of `SubtargetFeature`.
171+
//
168172
// Beware to not use the llvm github project for this, but check the git submodule
169173
// found in src/llvm-project
170174
// Though note that Rust can also be build with an external precompiled version of LLVM

compiler/rustc_codegen_ssa/src/target_features.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,11 @@ const POWERPC_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
210210
("vsx", Some(sym::powerpc_target_feature)),
211211
];
212212

213-
const MIPS_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] =
214-
&[("fp64", Some(sym::mips_target_feature)), ("msa", Some(sym::mips_target_feature))];
213+
const MIPS_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
214+
("fp64", Some(sym::mips_target_feature)),
215+
("msa", Some(sym::mips_target_feature)),
216+
("virt", Some(sym::mips_target_feature)),
217+
];
215218

216219
const RISCV_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
217220
("m", Some(sym::riscv_target_feature)),

0 commit comments

Comments
 (0)