mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 09:18:42 +09:00
Issue #3049 - Fix loongarch64 baseline IC integer compare stub
This commit is contained in:
parent
38ebcb17c9
commit
54e75a53d3
1 changed files with 8 additions and 1 deletions
|
|
@ -8,6 +8,7 @@
|
|||
#include "jit/BaselineJIT.h"
|
||||
#include "jit/Linker.h"
|
||||
#include "jit/SharedICHelpers.h"
|
||||
#include "jit/MacroAssembler-inl.h"
|
||||
|
||||
using namespace js;
|
||||
using namespace js::jit;
|
||||
|
|
@ -23,6 +24,7 @@ ICCompare_Int32::Compiler::generateStubCode(MacroAssembler& masm)
|
|||
// Guard that R0 is an integer and R1 is an integer.
|
||||
Label failure;
|
||||
Label conditionTrue;
|
||||
Label done;
|
||||
masm.branchTestInt32(Assembler::NotEqual, R0, &failure);
|
||||
masm.branchTestInt32(Assembler::NotEqual, R1, &failure);
|
||||
|
||||
|
|
@ -30,7 +32,12 @@ ICCompare_Int32::Compiler::generateStubCode(MacroAssembler& masm)
|
|||
masm.unboxInt32(R0, ExtractTemp0);
|
||||
masm.unboxInt32(R1, ExtractTemp1);
|
||||
Assembler::Condition cond = JSOpToCondition(op, /* signed = */true);
|
||||
masm.ma_cmp_set(R0.valueReg(), ExtractTemp0, ExtractTemp1, cond);
|
||||
masm.move32(Imm32(0), R0.valueReg());
|
||||
masm.branch32(cond, ExtractTemp0, ExtractTemp1, &conditionTrue);
|
||||
masm.jump(&done);
|
||||
masm.bind(&conditionTrue);
|
||||
masm.move32(Imm32(1), R0.valueReg());
|
||||
masm.bind(&done);
|
||||
|
||||
masm.tagValue(JSVAL_TYPE_BOOLEAN, R0.valueReg(), R0);
|
||||
EmitReturnFromIC(masm);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue