GitLab will be upgraded on June 2nd 2020 at 2.00 pm (AEDT) to 3.00 pm (AEDT) due to Critical Security Patch Availability. During the update, GitLab and Mattermost services will not be available. If you have any concerns with this, please talk to local Gitlab admin team.

Commit 0454a7fa authored by Pavel Zakopaylo's avatar Pavel Zakopaylo

Added support for more integer sizes

This is mostly in service of implementing TagRef64, which can
now be initialized by a bundle (but is as of yet not properly
implemented).
parent 5bdbeb56
......@@ -186,14 +186,13 @@ pub fn resolve_backend_type_info (ty: &MuType, vm: &VM) -> BackendTypeInfo {
size: 8, alignment: 8, struct_layout: None, elem_padded_size: None,
gc_type: mm::add_gc_type(GCType::new_noreftype(8, 8))
},
// tagref
MuType_::Tagref64 => unimplemented!(),
// floating point
MuType_::Float => BackendTypeInfo{
size: 4, alignment: 4, struct_layout: None, elem_padded_size: None,
gc_type: mm::add_gc_type(GCType::new_noreftype(4, 4))
},
MuType_::Double => BackendTypeInfo {
// tagref or floating point
MuType_::Tagref64 | MuType_::Double => BackendTypeInfo {
size: 8, alignment: 8, struct_layout: None, elem_padded_size: None,
gc_type: mm::add_gc_type(GCType::new_noreftype(8, 8))
},
......
......@@ -1411,9 +1411,12 @@ impl <'a> VM {
match val.v {
APIHandleValue::Int(ival, bits) => {
match bits {
1 => addr.store::<u8>((ival as u8) & 0b1u8),
6 => addr.store::<u8>((ival as u8) & 0b111111u8),
8 => addr.store::<u8>(ival as u8),
16 => addr.store::<u16>(ival as u16),
32 => addr.store::<u32>(ival as u32),
52 => addr.store::<u64>(ival & ((1 << 51)-1)),
64 => addr.store::<u64>(ival),
_ => panic!("unimplemented int length")
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment