Lib/Target/instr/Reg.cpp
/**
 * Determine reg file of current register
 */
Determine reg file of current register
Determine reg file of current register
RegTag Reg::regfile() const {
  if (!Platform::compiling_for_vc4()) return REG_A;  
  assert(tag <= SPECIAL);
  if (tag == REG_A) return REG_A;
  if (tag == REG_B) return REG_B;
  if (tag == SPECIAL) {
    switch(regId) {
    case SPECIAL_ELEM_NUM:
    case SPECIAL_RD_SETUP:
    case SPECIAL_DMA_LD_WAIT:
    case SPECIAL_DMA_LD_ADDR:
      return REG_A;
    case SPECIAL_QPU_NUM:
    case SPECIAL_WR_SETUP:
    case SPECIAL_DMA_ST_WAIT:
    case SPECIAL_DMA_ST_ADDR:
      return REG_B;
    default:
      break;
    }
  }
  return NONE;
}
RegTag Reg :: regfile ( ) const { if ( ! Platform :: compiling_for_vc4 ( ) ) return REG_A ; assert ( tag <= SPECIAL ) ; if ( tag == REG_A ) return REG_A ; if ( tag == REG_B ) return REG_B ; if ( tag == SPECIAL ) { switch ( regId ) { case SPECIAL_ELEM_NUM : case SPECIAL_RD_SETUP : case SPECIAL_DMA_LD_WAIT : case SPECIAL_DMA_LD_ADDR : return REG_A ; case SPECIAL_QPU_NUM : case SPECIAL_WR_SETUP : case SPECIAL_DMA_ST_WAIT : case SPECIAL_DMA_ST_ADDR : return REG_B ; default : break ; } } return NONE ; }
Determine reg file of current register
Determine reg file of current register
// There is no REG_B for v3d, only REG_A