summaryrefslogtreecommitdiff
path: root/src/arch/x86/insts/static_inst.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/insts/static_inst.cc')
-rw-r--r--src/arch/x86/insts/static_inst.cc17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/arch/x86/insts/static_inst.cc b/src/arch/x86/insts/static_inst.cc
index b9c5486ed..28c268d4e 100644
--- a/src/arch/x86/insts/static_inst.cc
+++ b/src/arch/x86/insts/static_inst.cc
@@ -132,10 +132,9 @@ namespace X86ISA
static const char * microFormats[9] =
{"", "t%db", "t%dw", "", "t%dd", "", "", "", "t%d"};
- RegIndex reg_idx = reg.regIdx;
+ RegIndex reg_idx = reg.index();
- switch (reg.regClass) {
- case IntRegClass: {
+ if (reg.isIntReg()) {
const char * suffix = "";
bool fold = reg_idx & IntFoldBit;
reg_idx &= ~IntFoldBit;
@@ -198,10 +197,8 @@ namespace X86ISA
ccprintf(os, microFormats[size], reg_idx - NUM_INTREGS);
}
ccprintf(os, suffix);
- break;
- }
- case FloatRegClass: {
+ } else if (reg.isFloatReg()) {
if (reg_idx < NumMMXRegs) {
ccprintf(os, "%%mmx%d", reg_idx);
return;
@@ -219,19 +216,15 @@ namespace X86ISA
}
reg_idx -= NumMicroFpRegs;
ccprintf(os, "%%st(%d)", reg_idx);
- break;
- }
- case CCRegClass:
+ } else if (reg.isCCReg()) {
ccprintf(os, "%%cc%d", reg_idx);
- break;
- case MiscRegClass:
+ } else if (reg.isMiscReg()) {
switch (reg_idx) {
default:
ccprintf(os, "%%ctrl%d", reg_idx);
}
- break;
}
}