Skip to content

Commit 7157431

Browse files
committed
deps: backport d7b5bc2 from upstream v8
Original commit message: ``` [riscv] Fix incorrect check supports_wasm_simd_128 Change-Id: I3ee389a3036fddc6807cef18abea553d3861ad07 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7087478 Commit-Queue: Yahan Lu (LuYahan) <yahan@iscas.ac.cn> Reviewed-by: Florian Loitsch <floitsch@rivosinc.com> Reviewed-by: Kasper Lund <kasperl@rivosinc.com> Auto-Submit: Yahan Lu (LuYahan) <yahan@iscas.ac.cn> Cr-Commit-Position: refs/heads/main@{#103365} ```
1 parent 0c08835 commit 7157431

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

deps/v8/src/builtins/riscv/builtins-riscv.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3188,7 +3188,10 @@ static void SaveVectorRegisters(MacroAssembler* masm,
31883188
// Check if the machine has simd128 support. Otherwise, the
31893189
// vector registers might not exist and accessing them would SIGILL.
31903190
Label done;
3191+
3192+
ASM_CODE_COMMENT(masm);
31913193
__ li(kScratchReg, ExternalReference::supports_wasm_simd_128_address());
3194+
__ Lb(kScratchReg, MemOperand(kScratchReg, 0));
31923195
// If != 0, then simd is available.
31933196
__ Branch(&done, eq, kScratchReg, Operand(zero_reg), Label::Distance::kNear);
31943197

@@ -3210,7 +3213,9 @@ static void RestoreVectorRegisters(MacroAssembler* masm,
32103213
// Check if the machine has simd128 support. Otherwise, the
32113214
// vector registers might not exist and accessing them would SIGILL.
32123215
Label done;
3216+
ASM_CODE_COMMENT(masm);
32133217
__ li(kScratchReg, ExternalReference::supports_wasm_simd_128_address());
3218+
__ Lb(kScratchReg, MemOperand(kScratchReg, 0));
32143219
// If != 0, then simd is available.
32153220
__ Branch(&done, eq, kScratchReg, Operand(zero_reg), Label::Distance::kNear);
32163221

0 commit comments

Comments
 (0)