Differential Revision: https://reviews.llvm.org/D38786
llvm-svn: 316319
case TYPE_MM64: \
return prefix##_MM0 + (index & 0x7); \
case TYPE_SEGMENTREG: \
- if (index > 5) \
+ if ((index & 7) > 5) \
*valid = 0; \
- return prefix##_ES + index; \
+ return prefix##_ES + (index & 7); \
case TYPE_DEBUGREG: \
return prefix##_DR0 + index; \
case TYPE_CONTROLREG: \
# CHECK: xchgw %di, %ax
0x66 0x3e 0x97
+# CHECK: movq %rdx, %cs
+0x4c 0x8e 0xca
+
# CHECK: movw %bx, %cs:(%rsi,%rbp)
0x2e 0x66 0x89 0x1c 0x2e
# CHECK: movl %ebx, %cs:(%esi,%ebp)