Skip to content

Commit

Permalink
Auto merge of rust-lang#2852 - loongarch-rs:master, r=RalfJung
Browse files Browse the repository at this point in the history
Add minimum alignment support for loongarch64

The [loongarch64-unknown-linux-gnu](rust-lang#96971) was added as a tier 3 target, add minimum alignment support for loongarch64 now.

Thanks
  • Loading branch information
bors committed Apr 24, 2023
2 parents 0fc2d1a + 585a329 commit 197f3a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/miri/src/shims/foreign_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
// 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" | "s390x" | "sparc64" => 16,
"x86_64" | "aarch64" | "mips64" | "s390x" | "sparc64" | "loongarch64" => 16,
arch => bug!("unsupported target architecture for malloc: `{}`", arch),
};
// Windows always aligns, even small allocations.
Expand Down

0 comments on commit 197f3a0

Please sign in to comment.