diff options
author | MITSUNARI Shigeo <[email protected]> | 2024-08-21 17:03:04 +0900 |
---|---|---|
committer | MITSUNARI Shigeo <[email protected]> | 2024-08-21 17:03:04 +0900 |
commit | 9dabf91d285efb25e80894671a5c811b218ccb68 (patch) | |
tree | eaf93948e16cb5cf1707fbde1f53b05ce814fb02 | |
parent | 78b4407869f2d89c72cf7139c2df9a438993307d (diff) | |
download | xbyak-9dabf91d285efb25e80894671a5c811b218ccb68.tar.gz xbyak-9dabf91d285efb25e80894671a5c811b218ccb68.zip |
adapt to NASM 2.16.03 behavior to pass tests though xchg X,Y == xchg Y,X
-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()))); } |