void Assembler::tbnz(const Register& rt, unsigned bit_pos, Label* label) { // Flush the instruction buffer if necessary before getting an offset. BufferOffset branch = b(0); Instruction* ins = getInstructionAt(branch); // Encode the relative offset. tbnz(ins, rt, bit_pos, LinkAndGetInstructionOffsetTo(branch, label)); }
void Assembler::bl(Label* label) { // Flush the instruction buffer if necessary before getting an offset. BufferOffset branch = b(0); Instruction* ins = getInstructionAt(branch); // Encode the relative offset. bl(ins, LinkAndGetInstructionOffsetTo(branch, label)); }
void Assembler::adr(const Register& rd, Label* label) { // Flush the instruction buffer if necessary before getting an offset. // Note that ADR is not a branch, but it encodes an offset like a branch. BufferOffset offset = Emit(0); Instruction* ins = getInstructionAt(offset); // Encode the relative offset. adr(ins, rd, LinkAndGetByteOffsetTo(offset, label)); }
void Assembler::adrp(const Register& rd, Label* label) { VIXL_ASSERT(AllowPageOffsetDependentCode()); // Flush the instruction buffer if necessary before getting an offset. BufferOffset offset = Emit(0); Instruction* ins = getInstructionAt(offset); // Encode the relative offset. adrp(ins, rd, LinkAndGetPageOffsetTo(offset, label)); }
BufferOffset Assembler::b(Label* label, Condition cond) { // Flush the instruction buffer if necessary before getting an offset. BufferOffset branch = b(0, Always); Instruction* ins = getInstructionAt(branch); VIXL_ASSERT(ins->IsCondBranchImm()); // Encode the relative offset. b(ins, LinkAndGetInstructionOffsetTo(branch, label), cond); return branch; }
void MozBaseAssembler::SetNextLink(BufferOffset cur, BufferOffset next) { Instruction* link = getInstructionAt(cur); link->SetImmPCRawOffset(EncodeOffset(cur, next)); }