示例#1
0
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));
}
示例#2
0
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));
}
示例#3
0
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));
}
示例#4
0
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));
}
示例#5
0
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;
}
示例#6
0
void
MozBaseAssembler::SetNextLink(BufferOffset cur, BufferOffset next)
{
    Instruction* link = getInstructionAt(cur);
    link->SetImmPCRawOffset(EncodeOffset(cur, next));
}