Lib/Target/instr/Instr.cpp
/**
 * Convert branch label to branch target
 * 
 * Convert branch label (BRL) instruction to branch instruction with offset (BR).
 * 
 * @param offset  offset to the label from current instruction
 */
Convert branch label to branch target

Convert branch label (BRL) instruction to branch instruction with offset (BR).

@param offset  offset to the label from current instruction
Convert branch label to branch target Convert branch label ( BRL ) instruction to branch instruction with offset ( BR ) . @param offset offset to the label from current instruction
void Instr::label_to_target(int offset) {
  assert(tag == InstrTag::BRL);
  BranchTarget t;
  t.relative       = true;
  t.useRegOffset   = false;
  t.immOffset      = offset - 4;  
  tag = InstrTag::BR;
  m_branch_target = t;
}
void Instr :: label_to_target ( int offset ) { assert ( tag == InstrTag :: BRL ) ; BranchTarget t ; t . relative = true ; t . useRegOffset = false ; t . immOffset = offset - 4 ; tag = InstrTag :: BR ; m_branch_target = t ; }
Convert branch label to branch target
Convert branch label to branch target
// Compensate for the 4-op delay for executing a branch