From 9dabf91d285efb25e80894671a5c811b218ccb68 Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Wed, 21 Aug 2024 17:03:04 +0900 Subject: adapt to NASM 2.16.03 behavior to pass tests though xchg X,Y == xchg Y,X --- xbyak/xbyak.h | 1 + 1 file changed, 1 insertion(+) 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(*p1), *p2, 0, 0x86 | (p1->isBit(8) ? 0 : 1), (p1->isREG() && (p1->getBit() == p2->getBit()))); } -- cgit v1.2.3