mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 1233863 - ARM64: Record the correct branch offset. r=sstangl
Don't depend on nextOffset() to get the address of the next inserted instruction. Adding a single instruction could cause a constant pool to be emitted first. The b() method assembles a branch and returns its offset. Use this return value when recording the location of a pending jump. This fixes the MOZ_CRASH(Unrecognized jump instruction.) crashes.
This commit is contained in:
parent
d9a7e9b459
commit
9dce194b45
@ -1346,8 +1346,8 @@ class MacroAssemblerCompat : public vixl::MacroAssembler
|
||||
}
|
||||
void branch(JitCode* target) {
|
||||
syncStackPtr();
|
||||
addPendingJump(nextOffset(), ImmPtr(target->raw()), Relocation::JITCODE);
|
||||
b(-1); // The jump target will be patched by executableCopy().
|
||||
BufferOffset loc = b(-1); // The jump target will be patched by executableCopy().
|
||||
addPendingJump(loc, ImmPtr(target->raw()), Relocation::JITCODE);
|
||||
}
|
||||
|
||||
void branch32(Condition cond, const Operand& lhs, Register rhs, Label* label) {
|
||||
|
Loading…
Reference in New Issue
Block a user