x86: Add tests for CMPXCHG (without LOCK prefix).
For 8/32/64-bit variants LOCK CMPXCHG is implemented via CMPXCHG, so the
tests for LOCK CMPXCHG cover CMPXCHG as well. But the 16-bit variant of
LOCK CMPXCHG does not use CMPXCHG, because it has to reorder prefixes:
the operand size override prefix must go before the LOCK prefix to match
clang order. Therefore 16-bit CMPXCHG was not tested previously.
Also, change helpers that convert `ByteRegister` to `Register` for
testing to call the actual function rather than reimplement it.
Bug: 65872996
Test: m test-art-host-gtest # new test cases for CMPXCHG
Change-Id: I234b7a7e69da49be310b1e89c83447f8b11af93d
2 files changed