void SharedInfo::set_regName() {
  Register reg = GR0;
  for (uint i = 0;
       i < RegisterImpl::number_of_registers;
       ++i, reg = reg->successor()) {
    regName[i] = reg->name();
  }

#ifdef COMPILER1
  uint fbase = RegisterImpl::number_of_registers;
  FloatRegister freg = FR0;
  for (uint i = 0;
       i < FloatRegisterImpl::number_of_registers;
       ++i, freg = freg->successor()) {
    regName[fbase+i] = freg->name();
  }

  uint pbase = RegisterImpl::number_of_registers +
               FloatRegisterImpl::number_of_registers;
  PredicateRegister preg = PR0;
  for (uint i = 0;
       i < PredicateRegisterImpl::number_of_registers;
       ++i, preg = preg->successor()) {
    regName[pbase+i] = preg->name();
  }

  uint bbase = RegisterImpl::number_of_registers +
               FloatRegisterImpl::number_of_registers +
               PredicateRegisterImpl::number_of_registers;
  BranchRegister breg = BR0;
  for (uint i = 0;
       i < BranchRegisterImpl::number_of_registers;
       ++i, breg = breg->successor()) {
    regName[bbase+i] = breg->name();
  }

  uint abase = RegisterImpl::number_of_registers +
               FloatRegisterImpl::number_of_registers +
               PredicateRegisterImpl::number_of_registers +
               BranchRegisterImpl::number_of_registers;
  ApplicationRegister areg = AR0;
  for (uint i = 0;
       i < ApplicationRegisterImpl::number_of_registers;
       ++i, areg = areg->successor()) {
    regName[abase+i] = areg->name();
  }
#endif
}
Exemple #2
0
void VMRegImpl::set_regName() {
  Register reg = ::as_Register(0);
  int i;
  for (i = 0; i < ConcreteRegisterImpl::max_gpr ; ) {
    regName[i++  ] = reg->name();
    regName[i++  ] = reg->name();
    reg = reg->successor();
  }

  FloatRegister freg = ::as_FloatRegister(0);
  for ( ; i < ConcreteRegisterImpl::max_fpr ; ) {
    regName[i++] = freg->name();
    regName[i++] = freg->name();
    freg = freg->successor();
  }

  for ( ; i < ConcreteRegisterImpl::number_of_registers ; i++ ) {
    regName[i] = "NON-GPR-FPR";
  }

}