mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 06:15:33 +00:00
Add missing .rev()
on parameter list and simulate "red zone".
This commit is contained in:
parent
e63d7fd531
commit
46fb72af9d
@ -1063,7 +1063,7 @@ impl X64FunctionCode {
|
||||
let mut call_movs: Vec<(Location, GPR)> = vec![];
|
||||
|
||||
// Prepare register & stack parameters.
|
||||
for (i, param) in params.iter().enumerate() {
|
||||
for (i, param) in params.iter().enumerate().rev() {
|
||||
let loc = Machine::get_param_location(1 + i);
|
||||
match loc {
|
||||
Location::GPR(x) => {
|
||||
@ -1396,6 +1396,8 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
|
||||
.machine
|
||||
.init_locals(a, self.num_locals, self.num_params);
|
||||
|
||||
a.emit_sub(Size::S64, Location::Imm32(32), Location::GPR(GPR::RSP)); // simulate "red zone" if not supported by the platform
|
||||
|
||||
self.control_stack.push(ControlFrame {
|
||||
label: a.get_label(),
|
||||
loop_like: false,
|
||||
|
Loading…
Reference in New Issue
Block a user