Issue #3049 - Fix loongarch64 wasm profiling integration

This commit is contained in:
Basilisk-Dev 2026-04-25 02:47:57 -04:00 committed by wuggy
commit c0be6cfc60
2 changed files with 4 additions and 3 deletions

View file

@ -2880,7 +2880,7 @@ class BaseCompiler
};
#if defined(JS_CODEGEN_LOONGARCH64)
void branchDoubleToTrap(DoubleCondition cond, FloatRegister lhs,
void branchDoubleToTrap(Assembler::DoubleCondition cond, FloatRegister lhs,
FloatRegister rhs, Trap trapKind) {
Label trapLabel;
masm.branchDouble(cond, lhs, rhs, &trapLabel);

View file

@ -246,9 +246,7 @@ static const unsigned PostStorePrePopFP = 4;
static const unsigned PushedRetAddr = 8;
static const unsigned PushedFP = 36;
static const unsigned StoredFP = 40;
# if defined(DEBUG)
static const unsigned PostStorePrePopFP = 0;
# endif
#elif defined(JS_CODEGEN_NONE)
# if defined(DEBUG)
static const unsigned PushedRetAddr = 0;
@ -657,12 +655,15 @@ ProfilingFrameIterator::ProfilingFrameIterator(const WasmActivation& activation,
callerPC_ = state.lr;
callerFP_ = fp;
AssertMatchesCallSite(*activation_, callerPC_, callerFP_, sp - 2);
# if defined(JS_CODEGEN_ARM) || defined(JS_CODEGEN_MIPS32) || \
defined(JS_CODEGEN_MIPS64)
} else if (offsetInModule == codeRange->profilingReturn() - PostStorePrePopFP) {
// Second-to-last instruction of the ARM/MIPS function; fp points to
// the caller's fp; have not yet popped Frame.
callerPC_ = ReturnAddressFromFP(sp);
callerFP_ = CallerFPFromFP(sp);
AssertMatchesCallSite(*activation_, callerPC_, callerFP_, sp);
# endif
} else
#endif
if (offsetInCodeRange < PushedFP || offsetInModule == codeRange->profilingReturn() ||