Browse Source

machinst x64: fix sign-extension at boundary

pull/2034/head
Benjamin Bouvier 4 years ago
parent
commit
f932bccaf8
  1. 4
      cranelift/codegen/src/isa/x64/abi.rs

4
cranelift/codegen/src/isa/x64/abi.rs

@ -295,14 +295,14 @@ impl ABIBody for X64ABIBody {
(ArgumentExtension::Uext, Some(ext_mode)) => {
ret.push(Inst::movzx_rm_r(
ext_mode,
RegMem::reg(r.to_reg()),
RegMem::reg(from_reg.to_reg()),
dest_reg,
));
}
(ArgumentExtension::Sext, Some(ext_mode)) => {
ret.push(Inst::movsx_rm_r(
ext_mode,
RegMem::reg(r.to_reg()),
RegMem::reg(from_reg.to_reg()),
dest_reg,
));
}

Loading…
Cancel
Save