Commit 7a7cfa62 authored by Lu Yahan's avatar Lu Yahan Committed by Yahan Lu

[riscv64] Fix codegen error of Simd128_AndNot

should using scratch register to hold intermediate result.

Change-Id: I08e2236fd0a491398ffaa15c4fd9ae3d0e9ef535
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596441Reviewed-by: 's avatarji qiu <qiuji@iscas.ac.cn>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#80103}
parent 827e5237
......@@ -2074,9 +2074,9 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
}
case kRiscvS128AndNot: {
(__ VU).set(kScratchReg, VSew::E8, Vlmul::m1);
__ vnot_vv(i.OutputSimd128Register(), i.InputSimd128Register(1));
__ vnot_vv(kSimd128ScratchReg, i.InputSimd128Register(1));
__ vand_vv(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.OutputSimd128Register());
kSimd128ScratchReg);
break;
}
case kRiscvS128Const: {
......
......@@ -2454,8 +2454,8 @@ void LiftoffAssembler::emit_s128_and_not(LiftoffRegister dst,
LiftoffRegister lhs,
LiftoffRegister rhs) {
VU.set(kScratchReg, E8, m1);
vnot_vv(dst.fp().toV(), rhs.fp().toV());
vand_vv(dst.fp().toV(), lhs.fp().toV(), dst.fp().toV());
vnot_vv(kSimd128ScratchReg, rhs.fp().toV());
vand_vv(dst.fp().toV(), lhs.fp().toV(), kSimd128ScratchReg);
}
void LiftoffAssembler::emit_s128_select(LiftoffRegister dst,
......
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