diff options
| author | chenx97 <chenx97@aosc.io> | 2023-06-28 13:35:39 +0800 |
|---|---|---|
| committer | chenx97 <chenx97@aosc.io> | 2023-07-18 18:58:18 +0800 |
| commit | d3727148a0cb2ddf5f3d9c3af7f6caf5bc032e9d (patch) | |
| tree | a30bd28dc7cc98b31be8c8cff63bbdea94eba09f /src | |
| parent | a132b3ec03f3ddab35fdc2d0c3bfbda951956db5 (diff) | |
| download | rust-d3727148a0cb2ddf5f3d9c3af7f6caf5bc032e9d.tar.gz rust-d3727148a0cb2ddf5f3d9c3af7f6caf5bc032e9d.zip | |
support for mips32r6 as a target_arch value
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/lib.rs | 8 | ||||
| -rw-r--r-- | src/librustdoc/clean/cfg.rs | 1 | ||||
| -rw-r--r-- | src/tools/miri/src/shims/foreign_items.rs | 5 |
3 files changed, 10 insertions, 4 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index a25e3c15f6d..059eb9ffc7b 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -133,8 +133,12 @@ const EXTRA_CHECK_CFGS: &[(Option<Mode>, &'static str, Option<&[&'static str]>)] /* Extra values not defined in the built-in targets yet, but used in std */ (Some(Mode::Std), "target_env", Some(&["libnx"])), // (Some(Mode::Std), "target_os", Some(&[])), - // #[cfg(bootstrap)] mips64r6 - (Some(Mode::Std), "target_arch", Some(&["asmjs", "spirv", "nvptx", "xtensa", "mips64r6"])), + // #[cfg(bootstrap)] mips32r6, mips64r6 + ( + Some(Mode::Std), + "target_arch", + Some(&["asmjs", "spirv", "nvptx", "xtensa", "mips32r6", "mips64r6"]), + ), /* Extra names used by dependencies */ // FIXME: Used by serde_json, but we should not be triggering on external dependencies. (Some(Mode::Rustc), "no_btreemap_remove_entry", None), diff --git a/src/librustdoc/clean/cfg.rs b/src/librustdoc/clean/cfg.rs index 6e168460f2b..83886dd42aa 100644 --- a/src/librustdoc/clean/cfg.rs +++ b/src/librustdoc/clean/cfg.rs @@ -520,6 +520,7 @@ impl<'a> fmt::Display for Display<'a> { "loongarch64" => "LoongArch LA64", "m68k" => "M68k", "mips" => "MIPS", + "mips32r6" => "MIPS Release 6", "mips64" => "MIPS-64", "mips64r6" => "MIPS-64 Release 6", "msp430" => "MSP430", diff --git a/src/tools/miri/src/shims/foreign_items.rs b/src/tools/miri/src/shims/foreign_items.rs index 3cf38dc8f7b..72a4adba8d4 100644 --- a/src/tools/miri/src/shims/foreign_items.rs +++ b/src/tools/miri/src/shims/foreign_items.rs @@ -45,8 +45,9 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { // List taken from `library/std/src/sys/common/alloc.rs`. // This list should be kept in sync with the one from libstd. let min_align = match this.tcx.sess.target.arch.as_ref() { - "x86" | "arm" | "mips" | "powerpc" | "powerpc64" | "asmjs" | "wasm32" => 8, - "x86_64" | "aarch64" | "mips64" | "mips64r6" | "s390x" | "sparc64" | "loongarch64" => 16, + "x86" | "arm" | "mips" | "mips32r6" | "powerpc" | "powerpc64" | "asmjs" | "wasm32" => 8, + "x86_64" | "aarch64" | "mips64" | "mips64r6" | "s390x" | "sparc64" | "loongarch64" => + 16, arch => bug!("unsupported target architecture for malloc: `{}`", arch), }; // Windows always aligns, even small allocations. |
