Commit 34afea56 authored by Lu Yahan's avatar Lu Yahan Committed by V8 LUCI CQ

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

Change-Id: I2e217b5b403db9fb8504a9c81040d8fe893b37d3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3740486Reviewed-by: 's avatarji 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}
parent e46e603a
...@@ -1052,17 +1052,19 @@ void LiftoffAssembler::Spill(int offset, WasmValue value) { ...@@ -1052,17 +1052,19 @@ void LiftoffAssembler::Spill(int offset, WasmValue value) {
MemOperand dst = liftoff::GetStackSlot(offset); MemOperand dst = liftoff::GetStackSlot(offset);
switch (value.type().kind()) { switch (value.type().kind()) {
case kI32: { case kI32: {
LiftoffRegister tmp = GetUnusedRegister(kGpReg, {}); UseScratchRegisterScope temps(this);
TurboAssembler::li(tmp.gp(), Operand(value.to_i32())); Register tmp = temps.Acquire();
Sw(tmp.gp(), dst); TurboAssembler::li(tmp, Operand(value.to_i32()));
Sw(tmp, dst);
break; break;
} }
case kI64: case kI64:
case kRef: case kRef:
case kOptRef: { case kOptRef: {
LiftoffRegister tmp = GetUnusedRegister(kGpReg, {}); UseScratchRegisterScope temps(this);
TurboAssembler::li(tmp.gp(), value.to_i64()); Register tmp = temps.Acquire();
Sd(tmp.gp(), dst); TurboAssembler::li(tmp, value.to_i64());
Sd(tmp, dst);
break; break;
} }
default: default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment