Bug 1284784 - implement "void br(Instruction* at, const Register& xn)". r=sstangl
authorsk <sk.alvin.x>
Wed, 06 Jul 2016 00:06:00 +0200
changeset 384989 6a563ce546e20e23053eb621c3412470827b55e8
parent 384988 a96f09f90b2f5c670a6f7975b4b7045ea68dcd41
child 384990 9d60e3945663e9339248bac77474f634e7b8d900
push id22385
push userbmo:wpan@mozilla.com
push dateThu, 07 Jul 2016 12:18:17 +0000
reviewerssstangl
bugs1284784
milestone50.0a1
Bug 1284784 - implement "void br(Instruction* at, const Register& xn)". r=sstangl
js/src/jit/arm64/vixl/MozAssembler-vixl.cpp
--- a/js/src/jit/arm64/vixl/MozAssembler-vixl.cpp
+++ b/js/src/jit/arm64/vixl/MozAssembler-vixl.cpp
@@ -222,16 +222,22 @@ BufferOffset Assembler::b(Label* label) 
 }
 
 
 BufferOffset Assembler::b(Label* label, Condition cond) {
   // Encode the relative offset from the inserted branch to the label.
   return b(LinkAndGetInstructionOffsetTo(nextInstrOffset(), CondBranchRangeType, label), cond);
 }
 
+void Assembler::br(Instruction* at, const Register& xn) {
+  VIXL_ASSERT(xn.Is64Bits());
+  // No need for EmitBranch(): no immediate offset needs fixing.
+  Emit(at, BR | Rn(xn));
+}
+
 
 void Assembler::blr(Instruction* at, const Register& xn) {
   VIXL_ASSERT(xn.Is64Bits());
   // No need for EmitBranch(): no immediate offset needs fixing.
   Emit(at, BLR | Rn(xn));
 }