winch: Small clean-up for x64 (#5691)
This commit contains a small set of clean up items for x64. Notably: * Adds filetests * Documents why 16 for the arg base offset abi implementation, for clarity. * Fixes a bug in the spill implementation caught while anlyzing the filetests results. The fix consists of emitting a load instead of a store into the scratch register before spiiling its value. * Remove dead code for pretty printing registers which is not needed anymore since we now have proper disassembly.
This commit is contained in:
@@ -134,9 +134,7 @@ impl RegAlloc {
|
||||
.get_local(*index)
|
||||
.expect("valid local at slot");
|
||||
let addr = context.masm.local_address(&slot);
|
||||
context
|
||||
.masm
|
||||
.store(RegImm::reg(self.scratch), addr, slot.ty.into());
|
||||
context.masm.load(addr, self.scratch, slot.ty.into());
|
||||
let offset = context.masm.push(self.scratch);
|
||||
*v = Val::Memory(offset);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user