mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
std.Target: fix cMaxIntAlignment() for a few architectures
This commit is contained in:
parent
45b80f2e41
commit
dda05b29c0
@ -3377,32 +3377,40 @@ pub fn cMaxIntAlignment(target: *const Target) u16 {
|
|||||||
|
|
||||||
.msp430 => 2,
|
.msp430 => 2,
|
||||||
|
|
||||||
.xcore,
|
.arc,
|
||||||
|
.csky,
|
||||||
|
.kalimba,
|
||||||
|
.or1k,
|
||||||
.propeller,
|
.propeller,
|
||||||
|
.xcore,
|
||||||
=> 4,
|
=> 4,
|
||||||
|
|
||||||
.amdgcn,
|
|
||||||
.arm,
|
.arm,
|
||||||
.armeb,
|
.armeb,
|
||||||
.thumb,
|
|
||||||
.thumbeb,
|
|
||||||
.lanai,
|
|
||||||
.hexagon,
|
.hexagon,
|
||||||
|
.lanai,
|
||||||
|
.loongarch32,
|
||||||
|
.m68k,
|
||||||
.mips,
|
.mips,
|
||||||
.mipsel,
|
.mipsel,
|
||||||
.or1k,
|
|
||||||
.powerpc,
|
.powerpc,
|
||||||
.powerpcle,
|
.powerpcle,
|
||||||
.riscv32,
|
.riscv32,
|
||||||
.riscv32be,
|
.riscv32be,
|
||||||
.s390x,
|
.s390x,
|
||||||
|
.sparc,
|
||||||
|
.thumb,
|
||||||
|
.thumbeb,
|
||||||
|
.x86,
|
||||||
|
.xtensa,
|
||||||
=> 8,
|
=> 8,
|
||||||
|
|
||||||
// Even LLVMABIAlignmentOfType(i128) agrees on these targets.
|
|
||||||
.aarch64,
|
.aarch64,
|
||||||
.aarch64_be,
|
.aarch64_be,
|
||||||
|
.amdgcn,
|
||||||
.bpfel,
|
.bpfel,
|
||||||
.bpfeb,
|
.bpfeb,
|
||||||
|
.loongarch64,
|
||||||
.mips64,
|
.mips64,
|
||||||
.mips64el,
|
.mips64el,
|
||||||
.nvptx,
|
.nvptx,
|
||||||
@ -3411,26 +3419,13 @@ pub fn cMaxIntAlignment(target: *const Target) u16 {
|
|||||||
.powerpc64le,
|
.powerpc64le,
|
||||||
.riscv64,
|
.riscv64,
|
||||||
.riscv64be,
|
.riscv64be,
|
||||||
.sparc,
|
|
||||||
.sparc64,
|
.sparc64,
|
||||||
.wasm32,
|
|
||||||
.wasm64,
|
|
||||||
.x86,
|
|
||||||
.x86_64,
|
|
||||||
=> 16,
|
|
||||||
|
|
||||||
// Below this comment are unverified but based on the fact that C requires
|
|
||||||
// int128_t to be 16 bytes aligned, it's a safe default.
|
|
||||||
.arc,
|
|
||||||
.csky,
|
|
||||||
.kalimba,
|
|
||||||
.loongarch32,
|
|
||||||
.loongarch64,
|
|
||||||
.m68k,
|
|
||||||
.spirv32,
|
.spirv32,
|
||||||
.spirv64,
|
.spirv64,
|
||||||
.ve,
|
.ve,
|
||||||
.xtensa,
|
.wasm32,
|
||||||
|
.wasm64,
|
||||||
|
.x86_64,
|
||||||
=> 16,
|
=> 16,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user