54c54
< struct InstRegIndex
---
> struct InstRegIndex : public RegId
56,58c56,74
< RegIndex idx;
< explicit InstRegIndex(RegIndex _idx) : idx(_idx)
< {}
---
> explicit InstRegIndex(RegIndex _idx) :
> RegId(computeRegClass(_idx), _idx) {}
>
> private:
> // TODO: As X86 register index definition is highly built on the
> // unified space concept, it is easier for the moment to rely on
> // an helper function to compute the RegClass. It would be nice
> // to fix those definition and get rid of this.
> RegClass computeRegClass(RegIndex _idx) {
> if (_idx < FP_Reg_Base) {
> return IntRegClass;
> } else if (_idx < CC_Reg_Base) {
> return FloatRegClass;
> } else if (_idx < Misc_Reg_Base) {
> return CCRegClass;
> } else {
> return MiscRegClass;
> }
> }
84c100
< void printReg(std::ostream &os, int reg, int size) const;
---
> void printReg(std::ostream &os, RegId reg, int size) const;
94c110
< if (_destRegIdx[0] & IntFoldBit)
---
> if (_destRegIdx[0].regIdx & IntFoldBit)
125c141
< if (_srcRegIdx[idx] & IntFoldBit)
---
> if (_srcRegIdx[idx].regIdx & IntFoldBit)
146c162
< if (_srcRegIdx[idx] & IntFoldBit)
---
> if (_srcRegIdx[idx].regIdx & IntFoldBit)