[riscv64] Fix wasm-spec-tests/tests/func

Change-Id: I2e217b5b403db9fb8504a9c81040d8fe893b37d3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3740486
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#81485}
This commit is contained in:
Lu Yahan 2022-07-01 16:30:34 +08:00 committed by V8 LUCI CQ
parent e46e603ae1
commit 34afea56b6

View File

@ -1052,17 +1052,19 @@ void LiftoffAssembler::Spill(int offset, WasmValue value) {
MemOperand dst = liftoff::GetStackSlot(offset);
switch (value.type().kind()) {
case kI32: {
LiftoffRegister tmp = GetUnusedRegister(kGpReg, {});
TurboAssembler::li(tmp.gp(), Operand(value.to_i32()));
Sw(tmp.gp(), dst);
UseScratchRegisterScope temps(this);
Register tmp = temps.Acquire();
TurboAssembler::li(tmp, Operand(value.to_i32()));
Sw(tmp, dst);
break;
}
case kI64:
case kRef:
case kOptRef: {
LiftoffRegister tmp = GetUnusedRegister(kGpReg, {});
TurboAssembler::li(tmp.gp(), value.to_i64());
Sd(tmp.gp(), dst);
UseScratchRegisterScope temps(this);
Register tmp = temps.Acquire();
TurboAssembler::li(tmp, value.to_i64());
Sd(tmp, dst);
break;
}
default: