File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,14 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
1515 // This is given by `alignof(max_align_t)`. The following list is taken from
1616 // `library/std/src/sys/alloc/mod.rs` (where this is called `MIN_ALIGN`) and should
1717 // be kept in sync.
18+ let os = this. tcx . sess . target . os . as_ref ( ) ;
1819 let max_fundamental_align = match this. tcx . sess . target . arch . as_ref ( ) {
19- "x86" | "arm" | "loongarch32" | "mips" | "mips32r6" | "powerpc" | "powerpc64"
20- | "wasm32" => 8 ,
21- "x86_64" | "aarch64" | "mips64" | "mips64r6" | "s390x" | "sparc64" | "loongarch64" =>
22- 16 ,
20+ "riscv32" if matches ! ( os, "espidf" | "zkvm" ) => 4 ,
21+ "xtensa" if matches ! ( os, "espidf" ) => 4 ,
22+ "x86" | "arm" | "m68k" | "csky" | "loongarch32" | "mips" | "mips32r6" | "powerpc"
23+ | "powerpc64" | "sparc" | "wasm32" | "hexagon" | "riscv32" | "xtensa" => 8 ,
24+ "x86_64" | "aarch64" | "arm64ec" | "loongarch64" | "mips64" | "mips64r6" | "s390x"
25+ | "sparc64" | "riscv64" | "wasm64" => 16 ,
2326 arch => bug ! ( "unsupported target architecture for malloc: `{}`" , arch) ,
2427 } ;
2528 // The C standard only requires sufficient alignment for any *type* with size less than or
You can’t perform that action at this time.
0 commit comments