diff options
-rw-r--r-- | xbyak/xbyak.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/xbyak/xbyak.h b/xbyak/xbyak.h index e7459d3..dd54e71 100644 --- a/xbyak/xbyak.h +++ b/xbyak/xbyak.h @@ -2999,6 +2999,7 @@ public: rex(*p2, *p1); db(0x90 | (p2->getIdx() & 7)); return; } + if (p1->isREG() && p2->isREG()) std::swap(p1, p2); // adapt to NASM 2.16.03 behavior to pass tests opRO(static_cast<const Reg&>(*p1), *p2, 0, 0x86 | (p1->isBit(8) ? 0 : 1), (p1->isREG() && (p1->getBit() == p2->getBit()))); } |