Skip to content

Commit c6e03cd

Browse files
committed
support for mips64r6 as a target_arch value
1 parent c44324a commit c6e03cd

File tree

18 files changed

+20
-10
lines changed

18 files changed

+20
-10
lines changed

compiler/rustc_codegen_cranelift/example/float-minmax-pass.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fn main() {
2222

2323
#[cfg(not(any(target_arch = "mips", target_arch = "mips64")))]
2424
let nan = f32::NAN;
25-
// MIPS hardware treats f32::NAN as SNAN. Clear the signaling bit.
25+
// MIPS hardware except MIPS R6 treats f32::NAN as SNAN. Clear the signaling bit.
2626
// See https://github.com/rust-lang/rust/issues/52746.
2727
#[cfg(any(target_arch = "mips", target_arch = "mips64"))]
2828
let nan = f32::from_bits(f32::NAN.to_bits() - 1);

compiler/rustc_codegen_gcc/example/alloc_system.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const MIN_ALIGN: usize = 8;
1717
target_arch = "aarch64",
1818
target_arch = "loongarch64",
1919
target_arch = "mips64",
20+
target_arch = "mips64r6",
2021
target_arch = "s390x",
2122
target_arch = "sparc64"))]
2223
const MIN_ALIGN: usize = 16;

compiler/rustc_codegen_ssa/src/back/metadata.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ pub(crate) fn create_object_file(sess: &Session) -> Option<write::Object<'static
195195
"s390x" => Architecture::S390x,
196196
"mips" => Architecture::Mips,
197197
"mips64" => Architecture::Mips64,
198+
"mips64r6" => Architecture::Mips64,
198199
"x86_64" => {
199200
if sess.target.pointer_width == 32 {
200201
Architecture::X86_64_X32

compiler/rustc_codegen_ssa/src/target_features.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ pub fn supported_target_features(sess: &Session) -> &'static [(&'static str, Opt
321321
"aarch64" => AARCH64_ALLOWED_FEATURES,
322322
"x86" | "x86_64" => X86_ALLOWED_FEATURES,
323323
"hexagon" => HEXAGON_ALLOWED_FEATURES,
324-
"mips" | "mips64" => MIPS_ALLOWED_FEATURES,
324+
"mips" | "mips64" | "mips64r6" => MIPS_ALLOWED_FEATURES,
325325
"powerpc" | "powerpc64" => POWERPC_ALLOWED_FEATURES,
326326
"riscv32" | "riscv64" => RISCV_ALLOWED_FEATURES,
327327
"wasm32" | "wasm64" => WASM_ALLOWED_FEATURES,

compiler/rustc_target/src/abi/call/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,7 @@ impl<'a, Ty> FnAbi<'a, Ty> {
695695
"m68k" => m68k::compute_abi_info(self),
696696
"mips" => mips::compute_abi_info(cx, self),
697697
"mips64" => mips64::compute_abi_info(cx, self),
698+
"mips64r6" => mips64::compute_abi_info(cx, self),
698699
"powerpc" => powerpc::compute_abi_info(self),
699700
"powerpc64" => powerpc64::compute_abi_info(cx, self),
700701
"s390x" => s390x::compute_abi_info(cx, self),

compiler/rustc_target/src/asm/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ impl FromStr for InlineAsmArch {
240240
"loongarch64" => Ok(Self::LoongArch64),
241241
"mips" => Ok(Self::Mips),
242242
"mips64" => Ok(Self::Mips64),
243+
"mips64r6" => Ok(Self::Mips64),
243244
"s390x" => Ok(Self::S390x),
244245
"spirv" => Ok(Self::SpirV),
245246
"wasm32" => Ok(Self::Wasm32),

compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub fn target() -> Target {
66
llvm_target: "mipsisa64r6-unknown-linux-gnuabi64".into(),
77
pointer_width: 64,
88
data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".into(),
9-
arch: "mips64".into(),
9+
arch: "mips64r6".into(),
1010
options: TargetOptions {
1111
abi: "abi64".into(),
1212
endian: Endian::Big,

compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub fn target() -> Target {
55
llvm_target: "mipsisa64r6el-unknown-linux-gnuabi64".into(),
66
pointer_width: 64,
77
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".into(),
8-
arch: "mips64".into(),
8+
arch: "mips64r6".into(),
99
options: TargetOptions {
1010
abi: "abi64".into(),
1111
// NOTE(mips64r6) matches C toolchain

library/std/src/os/linux/raw.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ mod arch {
233233
#[cfg(any(
234234
target_arch = "loongarch64",
235235
target_arch = "mips64",
236+
target_arch = "mips64r6",
236237
target_arch = "s390x",
237238
target_arch = "sparc64",
238239
target_arch = "riscv64",

library/std/src/sync/mpmc/utils.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ use crate::ops::{Deref, DerefMut};
3636
target_arch = "arm",
3737
target_arch = "mips",
3838
target_arch = "mips64",
39+
target_arch = "mips64r6",
3940
target_arch = "riscv64",
4041
),
4142
repr(align(32))
@@ -60,6 +61,7 @@ use crate::ops::{Deref, DerefMut};
6061
target_arch = "arm",
6162
target_arch = "mips",
6263
target_arch = "mips64",
64+
target_arch = "mips64r6",
6365
target_arch = "riscv64",
6466
target_arch = "s390x",
6567
)),

0 commit comments

Comments
 (0)