cranelift: Align Scalar and SIMD shift semantics (#4520)
* cranelift: Reorganize test suite Group some SIMD operations by instruction. * cranelift: Deduplicate some shift tests Also, new tests with the mod behaviour * aarch64: Lower shifts with mod behaviour * x64: Lower shifts with mod behaviour * wasmtime: Don't mask SIMD shifts
This commit is contained in:
@@ -229,6 +229,11 @@ where
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn shift_mask(&mut self, ty: Type) -> u32 {
|
||||
ty.lane_bits() - 1
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn simm32_from_value(&mut self, val: Value) -> Option<GprMemImm> {
|
||||
let inst = self.lower_ctx.dfg().value_def(val).inst()?;
|
||||
@@ -415,6 +420,11 @@ where
|
||||
Writable::from_reg(Xmm::new(self.temp_writable_reg(I8X16).to_reg()).unwrap())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn reg_to_reg_mem_imm(&mut self, reg: Reg) -> RegMemImm {
|
||||
RegMemImm::Reg { reg }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn reg_mem_to_xmm_mem(&mut self, rm: &RegMem) -> XmmMem {
|
||||
XmmMem::new(rm.clone()).unwrap()
|
||||
|
||||
Reference in New Issue
Block a user