Issue #3049 - Adapt loongarch64 JIT glue to older JS APIs

This commit is contained in:
Basilisk-Dev 2026-04-23 19:21:46 -04:00 committed by wuggy
commit 9533e7734c
6 changed files with 33 additions and 16 deletions

View file

@ -6570,7 +6570,7 @@ CodeGenerator::visitAbsI(LAbsI* ins)
masm.branchTest32(Assembler::NotSigned, input, input, &positive);
masm.neg32(input);
LSnapshot* snapshot = ins->snapshot();
#if defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_MIPS64)
#if defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_MIPS64) || defined(JS_CODEGEN_LOONGARCH64)
if (snapshot)
bailoutCmp32(Assembler::Equal, input, Imm32(INT32_MIN), snapshot);
#else
@ -8428,7 +8428,7 @@ CodeGenerator::visitOutOfLineStoreElementHole(OutOfLineStoreElementHole* ool)
// If index > initializedLength, call a stub. Note that this relies on the
// condition flags sticking from the incoming branch.
Label callStub;
#if defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_MIPS64)
#if defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_MIPS64) || defined(JS_CODEGEN_LOONGARCH64)
// Had to reimplement for MIPS because there are no flags.
if (unboxedType == JSVAL_TYPE_MAGIC) {
Address initLength(elements, ObjectElements::offsetOfInitializedLength());