@@ -99,6 +99,7 @@ static inline bool inheritsFrom(InstructionContext child,
9999 (noPrefix && inheritsFrom (child, IC_XS, noPrefix)));
100100 case IC_64BIT:
101101 return (inheritsFrom (child, IC_64BIT_REXW) ||
102+ inheritsFrom (child, IC_64BIT_REX2) ||
102103 (noPrefix && inheritsFrom (child, IC_64BIT_OPSIZE, noPrefix)) ||
103104 (!AdSize64 && inheritsFrom (child, IC_64BIT_ADSIZE)) ||
104105 (noPrefix && inheritsFrom (child, IC_64BIT_XD, noPrefix)) ||
@@ -151,8 +152,10 @@ static inline bool inheritsFrom(InstructionContext child,
151152 case IC_64BIT_REXW_XS:
152153 case IC_64BIT_REXW_OPSIZE:
153154 case IC_64BIT_REXW_ADSIZE:
154- case IC_64BIT_REX2 :
155+ case IC_64BIT_REX2_REXW :
155156 return false ;
157+ case IC_64BIT_REX2:
158+ return inheritsFrom (child, IC_64BIT_REX2_REXW);
156159 case IC_VEX:
157160 return (VEX_LIG && WIG && inheritsFrom (child, IC_VEX_L_W)) ||
158161 (WIG && inheritsFrom (child, IC_VEX_W)) ||
@@ -980,9 +983,11 @@ void DisassemblerTables::emitContextTable(raw_ostream &o, unsigned &i) const {
980983 if ((index & ATTR_EVEXB) && (index & ATTR_EVEXU))
981984 o << " _U" ;
982985 }
983- } else if ((index & ATTR_64BIT) && (index & ATTR_REX2))
986+ } else if ((index & ATTR_64BIT) && (index & ATTR_REX2)) {
984987 o << " IC_64BIT_REX2" ;
985- else if ((index & ATTR_64BIT) && (index & ATTR_REXW) && (index & ATTR_XS))
988+ if (index & ATTR_REXW)
989+ o << " _REXW" ;
990+ } else if ((index & ATTR_64BIT) && (index & ATTR_REXW) && (index & ATTR_XS))
986991 o << " IC_64BIT_REXW_XS" ;
987992 else if ((index & ATTR_64BIT) && (index & ATTR_REXW) && (index & ATTR_XD))
988993 o << " IC_64BIT_REXW_XD" ;
0 commit comments