PatchedName = "vpclmulqdq";
}
}
+
Operands.push_back(X86Operand::CreateToken(PatchedName, NameLoc));
if (ExtraImmOp)
delete Operands[0];
Operands[0] = X86Operand::CreateToken("sldtw", NameLoc);
}
+
+ // The assembler accepts "xchgX <reg>, <mem>" and "xchgX <mem>, <reg>" as
+ // synonyms. Our tables only have the "<reg>, <mem>" form, so if we see the
+ // other operand order, swap them.
+ if (Name == "xchgb" || Name == "xchgw" || Name == "xchgl" || Name == "xchgq")
+ if (Operands.size() == 3 &&
+ static_cast<X86Operand*>(Operands[1])->isMem() &&
+ static_cast<X86Operand*>(Operands[2])->isReg()) {
+ std::swap(Operands[1], Operands[2]);
+ }
return false;
}
// CHECK: jrcxz L1
// CHECK: encoding: [0xe3,A]
+// PR8061
+xchgl 368(%rax),%ecx
+// CHECK: xchgl %ecx, 368(%rax)
+xchgl %ecx, 368(%rax)
+// CHECK: xchgl %ecx, 368(%rax)