Bug 1315256 - Add branch64 stub for arm64 to benefit wasm baseline. r=h4writer
--- a/js/src/jit/MacroAssembler.h
+++ b/js/src/jit/MacroAssembler.h
@@ -960,17 +960,17 @@ class MacroAssembler : public MacroAssem
inline void branch32(Condition cond, wasm::SymbolicAddress lhs, Imm32 rhs, Label* label)
DEFINED_ON(arm, arm64, mips_shared, x86, x64);
// The supported condition are Equal, NotEqual, LessThan(orEqual), GreaterThan(orEqual),
// Below(orEqual) and Above(orEqual).
// When a fail label is not defined it will fall through to next instruction,
// else jump to the fail label.
inline void branch64(Condition cond, Register64 lhs, Imm64 val, Label* success,
- Label* fail = nullptr) DEFINED_ON(x86, x64, arm, mips32, mips64);
+ Label* fail = nullptr) PER_ARCH;
inline void branch64(Condition cond, Register64 lhs, Register64 rhs, Label* success,
Label* fail = nullptr) DEFINED_ON(x86, x64, arm, mips32, mips64);
// On x86 and x64 NotEqual and Equal conditions are allowed for the branch64 variants
// with Address as lhs. On others only the NotEqual condition.
inline void branch64(Condition cond, const Address& lhs, Imm64 val, Label* label) PER_ARCH;
// Compare the value at |lhs| with the value at |rhs|. The scratch
// register *must not* be the base of |lhs| or |rhs|.
--- a/js/src/jit/arm64/MacroAssembler-arm64-inl.h
+++ b/js/src/jit/arm64/MacroAssembler-arm64-inl.h
@@ -825,16 +825,22 @@ MacroAssembler::branch32(Condition cond,
{
vixl::UseScratchRegisterScope temps(this);
const Register scratch = temps.AcquireX().asUnsized();
movePtr(lhs, scratch);
branch32(cond, Address(scratch, 0), rhs, label);
}
void
+MacroAssembler::branch64(Condition cond, Register64 lhs, Imm64 val, Label* success, Label* fail)
+{
+ MOZ_CRASH("NYI: branch64 reg-imm");
+}
+
+void
MacroAssembler::branch64(Condition cond, const Address& lhs, Imm64 val, Label* label)
{
MOZ_ASSERT(cond == Assembler::NotEqual,
"other condition codes not supported");
branchPtr(cond, lhs, ImmWord(val.value), label);
}