deps: Update cranelift-* to 0.43.1

This commit is contained in:
Nick Fitzgerald
2019-09-23 15:24:43 -07:00
committed by Dan Gohman
parent dde1c6ba58
commit 1848cc0868
18 changed files with 102 additions and 60 deletions

View File

@@ -1260,6 +1260,7 @@ fn initialize_globals(instance: &mut Instance) {
GlobalInit::I64Const(x) => *unsafe { (*to).as_i64_mut() } = x,
GlobalInit::F32Const(x) => *unsafe { (*to).as_f32_bits_mut() } = x,
GlobalInit::F64Const(x) => *unsafe { (*to).as_f64_bits_mut() } = x,
GlobalInit::V128Const(x) => *unsafe { (*to).as_u128_bits_mut() } = x.0,
GlobalInit::GetGlobal(x) => {
let from = if let Some(def_x) = module.defined_global_index(x) {
instance.global_mut(def_x)

View File

@@ -382,6 +382,30 @@ impl VMGlobalDefinition {
pub unsafe fn as_f64_bits_mut(&mut self) -> &mut u64 {
&mut *(self.storage.as_mut().as_mut_ptr() as *mut u64)
}
/// Return a reference to the value as an u128.
#[allow(clippy::cast_ptr_alignment)]
pub unsafe fn as_u128(&self) -> &u128 {
&*(self.storage.as_ref().as_ptr() as *const u128)
}
/// Return a mutable reference to the value as an u128.
#[allow(clippy::cast_ptr_alignment)]
pub unsafe fn as_u128_mut(&mut self) -> &mut u128 {
&mut *(self.storage.as_mut().as_mut_ptr() as *mut u128)
}
/// Return a reference to the value as u128 bits.
#[allow(clippy::cast_ptr_alignment)]
pub unsafe fn as_u128_bits(&self) -> &[u8; 16] {
&*(self.storage.as_ref().as_ptr() as *const [u8; 16])
}
/// Return a mutable reference to the value as u128 bits.
#[allow(clippy::cast_ptr_alignment)]
pub unsafe fn as_u128_bits_mut(&mut self) -> &mut [u8; 16] {
&mut *(self.storage.as_mut().as_mut_ptr() as *mut [u8; 16])
}
}
/// An index into the shared signature registry, usable for checking signatures