Rollup merge of #142053 - heiher:loong32-none, r=wesleywiser
Add new Tier-3 targets: `loongarch32-unknown-none*` MCP: https://github.com/rust-lang/compiler-team/issues/865 NOTE: LoongArch32 ELF object support is available starting with object v0.37.0.
This commit is contained in:
commit
840baa46ff
34 changed files with 181 additions and 53 deletions
|
|
@ -113,6 +113,8 @@ static TARGETS: &[&str] = &[
|
|||
"i686-unknown-uefi",
|
||||
"loongarch64-unknown-linux-gnu",
|
||||
"loongarch64-unknown-linux-musl",
|
||||
"loongarch32-unknown-none",
|
||||
"loongarch32-unknown-none-softfloat",
|
||||
"loongarch64-unknown-none",
|
||||
"loongarch64-unknown-none-softfloat",
|
||||
"m68k-unknown-linux-gnu",
|
||||
|
|
|
|||
|
|
@ -495,6 +495,7 @@ impl Config {
|
|||
"arm64ec",
|
||||
"riscv32",
|
||||
"riscv64",
|
||||
"loongarch32",
|
||||
"loongarch64",
|
||||
"s390x",
|
||||
// These targets require an additional asm_experimental_arch feature.
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
|
|||
"ignore-linux",
|
||||
"ignore-lldb",
|
||||
"ignore-llvm-version",
|
||||
"ignore-loongarch32",
|
||||
"ignore-loongarch64",
|
||||
"ignore-macabi",
|
||||
"ignore-macos",
|
||||
|
|
@ -196,6 +197,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
|
|||
"only-i686-unknown-linux-gnu",
|
||||
"only-ios",
|
||||
"only-linux",
|
||||
"only-loongarch32",
|
||||
"only-loongarch64",
|
||||
"only-loongarch64-unknown-linux-gnu",
|
||||
"only-macos",
|
||||
|
|
|
|||
|
|
@ -13,10 +13,11 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
|
|||
// alignment requirement and size less than or equal to the size requested."
|
||||
// So first we need to figure out what the limits are for "fundamental alignment".
|
||||
// This is given by `alignof(max_align_t)`. The following list is taken from
|
||||
// `library/std/src/sys/pal/common/alloc.rs` (where this is called `MIN_ALIGN`) and should
|
||||
// `library/std/src/sys/alloc/mod.rs` (where this is called `MIN_ALIGN`) and should
|
||||
// be kept in sync.
|
||||
let max_fundamental_align = match this.tcx.sess.target.arch.as_ref() {
|
||||
"x86" | "arm" | "mips" | "mips32r6" | "powerpc" | "powerpc64" | "wasm32" => 8,
|
||||
"x86" | "arm" | "loongarch32" | "mips" | "mips32r6" | "powerpc" | "powerpc64"
|
||||
| "wasm32" => 8,
|
||||
"x86_64" | "aarch64" | "mips64" | "mips64r6" | "s390x" | "sparc64" | "loongarch64" =>
|
||||
16,
|
||||
arch => bug!("unsupported target architecture for malloc: `{}`", arch),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue