mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 20:28:02 +00:00
Correct wasm32 alignment for 128bit types
This commit is contained in:
parent
90a1468e37
commit
a925478f8d
1 changed files with 15 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue