Correct wasm32 alignment for 128bit types

This commit is contained in:
Brendan Hansknecht 2024-01-30 16:53:42 -08:00
parent 90a1468e37
commit a925478f8d
No known key found for this signature in database
GPG key ID: 0EA784685083E75B

View file

@ -22,8 +22,21 @@ macro_rules! wasm32_sized_primitive {
}
}
wasm32_sized_primitive!(u8, i8, u16, i16, u32, i32, char, u64, i64, u128, i128, f32, f64, bool,);
wasm32_sized_primitive!(RocDec, RocOrder, I128, U128,);
wasm32_sized_primitive!(u8, i8, u16, i16, u32, i32, char, u64, i64, f32, f64, bool,);
wasm32_sized_primitive!(RocOrder,);
macro_rules! wasm32_16byte_aligned8 {
($($type_name:ident ,)+) => {
$(
impl Wasm32Sized for $type_name {
const SIZE_OF_WASM: usize = 16;
const ALIGN_OF_WASM: usize = 8;
}
)*
}
}
wasm32_16byte_aligned8!(i128, u128, I128, U128, RocDec,);
impl Wasm32Sized for () {
const SIZE_OF_WASM: usize = 0;