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) {
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:
......
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