Always use 16B alignment for 128-bit ints

This commit is contained in:
Richard Feldman 2022-05-07 10:52:31 -04:00
parent 7c043e2039
commit b9dbfa8c33
No known key found for this signature in database
GPG key ID: 7E4127D1E4241798

View file

@ -132,11 +132,11 @@ impl IntWidth {
| Architecture::Wasm32 => 8, | Architecture::Wasm32 => 8,
Architecture::X86_32 => 4, Architecture::X86_32 => 4,
}, },
U128 | I128 => match target_info.architecture { U128 | I128 => {
Architecture::Aarch64 => 16, // the C ABI defines 128-bit integers to always be 16B aligned,
Architecture::X86_64 | Architecture::Arm | Architecture::Wasm32 => 8, // according to https://reviews.llvm.org/D28990#655487
Architecture::X86_32 => 4, 16
}, }
} }
} }