int regnum; switch (num) { case 64: regnum = gdbarch_tdep (current_gdbarch)->ppc_mq_regnum; break; case 65: regnum = gdbarch_tdep (current_gdbarch)->ppc_lr_regnum; break; case 66: regnum = gdbarch_tdep (current_gdbarch)->ppc_ctr_regnum; break; case 76: regnum = gdbarch_tdep (current_gdbarch)->ppc_xer_regnum; break; default: regnum = num; break; } return regnum;
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);  if (0 <= num && num <= 31) return tdep->ppc_gp0_regnum + num; else if (32 <= num && num <= 63)  return tdep->ppc_fp0_regnum + (num - 32); else if (77 <= num && num <= 108) return tdep->ppc_vr0_regnum + (num - 77); else if (1200 <= num && num < 1200 + 32) return tdep->ppc_ev0_regnum + (num - 1200); else switch (num) { case 64: return tdep->ppc_mq_regnum; case 65: return tdep->ppc_lr_regnum; case 66: return tdep->ppc_ctr_regnum; case 76: return tdep->ppc_xer_regnum; case 109: return tdep->ppc_vrsave_regnum; case 110: return tdep->ppc_vrsave_regnum - 1;  case 111: return tdep->ppc_acc_regnum; case 112: return tdep->ppc_spefscr_regnum; default: return num; }
rs6000_stab_reg_to_regnum (int num){  int regnum;  switch (num)    {    case 64:       regnum = gdbarch_tdep (current_gdbarch)->ppc_mq_regnum;      break;    case 65:       regnum = gdbarch_tdep (current_gdbarch)->ppc_lr_regnum;      break;    case 66:       regnum = gdbarch_tdep (current_gdbarch)->ppc_ctr_regnum;      break;    case 76:       regnum = gdbarch_tdep (current_gdbarch)->ppc_xer_regnum;      break;    default:       regnum = num;      break;    }  return regnum;}