!10257 Bugfix for baselinejit in arm64

Merge pull request !10257 from huangyan/baseline_bugfix_for_arm64
This commit is contained in:
openharmony_ci 2024-11-21 15:57:21 +00:00 committed by Gitee
commit 7076c4d1bc
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 7 additions and 2 deletions

View File

@ -1631,7 +1631,12 @@ void AsmInterpreterCall::PushVregs(ExtendedAssembler *assembler,
__ Cmp(tempRegister, Immediate(JSTaggedValue::VALUE_HOLE));
__ B(Condition::EQ, &baselineCodeUndefined);
__ Ldr(tempRegister, MemoryOperand(tempRegister, MachineCode::FUNCADDR_OFFSET));
if (MachineCode::FUNCADDR_OFFSET % 8 == 0) { // 8: imm in 64-bit ldr insn must be a multiple of 8
__ Ldr(tempRegister, MemoryOperand(tempRegister, MachineCode::FUNCADDR_OFFSET));
} else {
ASSERT(MachineCode::FUNCADDR_OFFSET < 256); // 256: imm in ldur insn must be in the range -256 to 255
__ Ldur(tempRegister, MemoryOperand(tempRegister, MachineCode::FUNCADDR_OFFSET));
}
if (glue != X19) {
__ Mov(X19, glue);
}

View File

@ -496,7 +496,7 @@ TaggedObject *Heap::AllocateMachineCodeObject(JSHClass *hclass, size_t size, Mac
// Jit Fort enabled
ASSERT(GetEcmaVM()->GetJSOptions().GetEnableJitFort());
if (!GetEcmaVM()->GetJSOptions().GetEnableAsyncCopyToFort() || !desc->isAsyncCompileMode) {
if (!GetEcmaVM()->GetJSOptions().GetEnableAsyncCopyToFort()) {
desc->instructionsAddr = 0;
if (size <= MAX_REGULAR_HEAP_OBJECT_SIZE) {
// for non huge code cache obj, allocate fort space before allocating the code object