Merge pull request #2833 from abrown/2826

x64: fix Inst::store to understand all scalar types
This commit is contained in:
Chris Fallin
2021-04-13 15:36:41 -07:00
committed by GitHub
2 changed files with 5 additions and 31 deletions

View File

@@ -1126,16 +1126,7 @@ impl Inst {
pub(crate) fn store(ty: Type, from_reg: Reg, to_addr: impl Into<SyntheticAmode>) -> Inst {
let rc = from_reg.get_class();
match rc {
RegClass::I64 => Inst::mov_r_m(
match ty {
types::B1 => OperandSize::Size8,
types::I32 | types::R32 => OperandSize::Size32,
types::I64 | types::R64 => OperandSize::Size64,
_ => unimplemented!("integer store of type: {}", ty),
},
from_reg,
to_addr,
),
RegClass::I64 => Inst::mov_r_m(OperandSize::from_ty(ty), from_reg, to_addr),
RegClass::V128 => {
let opcode = match ty {
types::F32 => SseOpcode::Movss,