opy->hinttype = EAH_NOTBASE;
}
+ /*
+ * only for mib operands, make a single reg index [reg*1].
+ * gas uses this form to explicitly denote index register.
+ */
+ if ((temp->flags & IF_MIB) &&
+ (opy->indexreg == -1 && opy->hintbase == opy->basereg &&
+ opy->hinttype == EAH_NOTBASE)) {
+ opy->indexreg = opy->basereg;
+ opy->basereg = -1;
+ opy->scale = 1;
+ }
+
if (process_ea(opy, &ea_data, bits,
rfield, rflags, ins) != eat) {
errfunc(ERR_NONFATAL, "invalid effective address");
bndstx [rax+0x3], bnd0, rbx ; ICC-1
bndstx [rax+0x3], rbx, bnd0 ; ICC-2
- ; GAS's confusing EA - rcx is base reg in NASM
- bndstx [rcx*1], bnd2
- ; next 4 lines should be parsed same
+ ; next 5 lines should be parsed same
bndstx [,rcx*1], bnd2 ; NASM
bndstx [0,rcx*1], bnd2 ; NASM
bndstx [0], bnd2, rcx ; ICC-1
bndstx [0], rcx, bnd2 ; ICC-2
+ bndstx [rcx*1], bnd2 ; GAS - rcx is encoded as index only when it is mib
- bndstx [1*r12+3], bnd2 ; GAS's confusing EA again
+ ; next 3 lines should be parsed same
bndstx [3,1*r12], bnd2 ; NASM
+ bndstx [1*r12+3], bnd2 ; GAS
bndstx [3], r12, bnd2 ; ICC
bndstx [r12+0x399], bnd3