Skip to content

Commit

Permalink
impl mov reg, imm(rsp)
Browse files Browse the repository at this point in the history
  • Loading branch information
yurydelendik committed Oct 23, 2020
1 parent bb48f6a commit d80737d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions cranelift/codegen/src/isa/x64/inst/unwind/systemv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,17 @@ pub(crate) fn create_unwind_info(
codes.push(UnwindCode::StackAlloc { offset, size: imm });
}
Inst::MovRM {
src: _,
dst: SyntheticAmode::Real(Amode::ImmReg { simm32: _, base }),
src,
dst: SyntheticAmode::Real(Amode::ImmReg { simm32, base }),
..
} if *base == regs::rsp() => {
// `mov reg, imm(rsp)` -- similar to push
// builder.store_reg_at(offset, *simm32, *src)
// `mov reg, imm(rsp)`
let imm = *simm32;
codes.push(UnwindCode::SaveRegister {
offset,
reg: *src,
stack_offset: imm,
});
}
Inst::AluRmiR {
is_64: true,
Expand Down

0 comments on commit d80737d

Please sign in to comment.