std::string getFloatRegName(RegIndex);
//Each 128 bit xmm register is broken into two effective 64 bit registers.
- const int NumFloatArchRegs = NumMMXRegs + 2 * NumXMMRegs;
+ const int NumFloatArchRegs = NumMMXRegs + 2 * NumXMMRegs + NumMicroFpRegs;
const int NumFloatRegs = NumFloatArchRegs;
class FloatRegFile
FLOATREG_XMM15_LOW,
FLOATREG_XMM15_HIGH,
- NUM_FLOATREGS = FLOATREG_XMM_BASE + 2 * NumXMMRegs
+ FLOATREG_MICROFP_BASE = FLOATREG_XMM_BASE + 2 * NumXMMRegs,
+ FLOATREG_MICROFP0 = FLOATREG_MICROFP_BASE,
+ FLOATREG_MICROFP1,
+ FLOATREG_MICROFP2,
+ FLOATREG_MICROFP3,
+ FLOATREG_MICROFP4,
+ FLOATREG_MICROFP5,
+ FLOATREG_MICROFP6,
+ FLOATREG_MICROFP7,
+
+ NUM_FLOATREGS = FLOATREG_MICROFP_BASE + NumMicroFpRegs
};
static inline FloatRegIndex
{
return (FloatRegIndex)(FLOATREG_XMM_BASE + 2 * index + 1);
}
+
+ static inline FloatRegIndex
+ FLOATREG_MICROFP(int index)
+ {
+ return (FloatRegIndex)(FLOATREG_MICROFP_BASE + index);
+ }
};
#endif // __ARCH_X86_FLOATREGS_HH__
}
ccprintf(os, suffix);
} else if (reg < Ctrl_Base_DepTag) {
- ccprintf(os, "%%f%d", reg - FP_Base_DepTag);
+ int fpindex = reg - FP_Base_DepTag;
+ if(fpindex < NumMMXRegs) {
+ ccprintf(os, "%%mmx%d", reg - FP_Base_DepTag);
+ return;
+ }
+ fpindex -= NumMMXRegs;
+ if(fpindex < NumXMMRegs) {
+ ccprintf(os, "%%xmm%d_%s", fpindex / 2,
+ (fpindex % 2) ? "high": "low");
+ return;
+ }
+ fpindex -= NumXMMRegs;
+ ccprintf(os, "%%ufp%d", fpindex);
} else {
switch (reg - Ctrl_Base_DepTag) {
default:
# Add in symbols for the microcode registers
for num in range(15):
assembler.symbols["t%d" % num] = "NUM_INTREGS+%d" % num
+ for num in range(7):
+ assembler.symbols["ufp%d" % num] = "FLOATREG_MICROFP(%d)" % num
# Add in symbols for the segment descriptor registers
for letter in ("C", "D", "E", "F", "G", "S"):
assembler.symbols["%ss" % letter.lower()] = "SEGMENT_REG_%sS" % letter
const int NumMMXRegs = 8;
const int NumXMMRegs = 16;
+ const int NumMicroFpRegs = 8;
const int NumCRegs = 16;
const int NumDRegs = 8;