x64: Ensure that constants are always 16 bytes for XmmMem (#4790)

Ensure that constants generated for the memory case of XmmMem values are always 16 bytes, ensuring that we don't accidantally perform an unaligned load.

Fixes #4761
This commit is contained in:
Trevor Elliott
2022-08-26 13:04:38 -07:00
committed by GitHub
parent 7a9078d9cc
commit ca6d648e37
5 changed files with 73 additions and 4 deletions

View File

@@ -804,6 +804,12 @@ macro_rules! isle_prelude_methods {
self.lower_ctx.use_constant(data)
}
#[inline]
fn emit_u128_le_const(&mut self, value: u128) -> VCodeConstant {
let data = VCodeConstantData::Generated(value.to_le_bytes().as_slice().into());
self.lower_ctx.use_constant(data)
}
#[inline]
fn const_to_vconst(&mut self, constant: Constant) -> VCodeConstant {
self.lower_ctx.use_constant(VCodeConstantData::Pool(