Skip to content

Commit

Permalink
fix detection of adox without apx
Browse files Browse the repository at this point in the history
  • Loading branch information
herumi committed Nov 1, 2023
1 parent 6b19515 commit bd84772
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xbyak/xbyak.h
Original file line number Diff line number Diff line change
Expand Up @@ -2855,10 +2855,10 @@ class CodeGenerator : public CodeArray {
// (r, r, m) or (r, m, r)
bool opROO(const Reg& d, const Operand& op1, const Operand& op2, int type, int code0, int code1 = NONE, int code2 = NONE, int immSize = 0)
{
// if (type == 0 && !(d.hasRex2() || op1.hasRex2() || op2.hasRex2())) return false;
if (!d.isREG() && !(d.hasRex2() || op1.hasRex2() || op2.hasRex2())) return false;
const Operand *p1 = &op1, *p2 = &op2;
if (p1->isMEM()) { std::swap(p1, p2); } else { if (p2->isMEM()) code0 |= 2; }
if (p1->isMEM()) XBYAK_THROW(ERR_BAD_COMBINATION)
if (p1->isMEM()) XBYAK_THROW_RET(ERR_BAD_COMBINATION, false)
if (p2->isMEM()) {
const Reg& r = *static_cast<const Reg*>(p1);
const Address& addr = p2->getAddress();
Expand Down

0 comments on commit bd84772

Please sign in to comment.