diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -592,6 +592,9 @@ - Fix 32-bit ``__fastcall`` and ``__vectorcall`` ABI mismatch with MSVC. - Switch ``AVX512-BF16`` intrinsics types from ``short`` to ``__bf16``. - Add support for ``PREFETCHI`` instructions. +- Support ISA of ``CMPCCXADD``. + * Support intrinsic of ``__cmpccxadd_epi32``. + * Support intrinsic of ``__cmpccxadd_epi64``. DWARF Support in Clang ---------------------- diff --git a/clang/include/clang/Basic/BuiltinsX86_64.def b/clang/include/clang/Basic/BuiltinsX86_64.def --- a/clang/include/clang/Basic/BuiltinsX86_64.def +++ b/clang/include/clang/Basic/BuiltinsX86_64.def @@ -134,6 +134,8 @@ TARGET_BUILTIN(__builtin_ia32_ptwrite64, "vUOi", "n", "ptwrite") TARGET_BUILTIN(__builtin_ia32_prefetchi, "vvC*Ui", "nc", "prefetchi") +TARGET_BUILTIN(__builtin_ia32_cmpccxadd32, "Siv*SiSiIi", "n", "cmpccxadd") +TARGET_BUILTIN(__builtin_ia32_cmpccxadd64, "SLLiv*SLLiSLLiIi", "n", "cmpccxadd") #undef BUILTIN #undef TARGET_BUILTIN diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -4526,6 +4526,8 @@ def mno_amx_int8 : Flag<["-"], "mno-amx-int8">, Group; def mamx_tile : Flag<["-"], "mamx-tile">, Group; def mno_amx_tile : Flag<["-"], "mno-amx-tile">, Group; +def mcmpccxadd : Flag<["-"], "mcmpccxadd">, Group; +def mno_cmpccxadd : Flag<["-"], "mno-cmpccxadd">, Group; def msse : Flag<["-"], "msse">, Group; def mno_sse : Flag<["-"], "mno-sse">, Group; def msse2 : Flag<["-"], "msse2">, Group; diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h --- a/clang/lib/Basic/Targets/X86.h +++ b/clang/lib/Basic/Targets/X86.h @@ -137,6 +137,7 @@ bool HasPTWRITE = false; bool HasINVPCID = false; bool HasENQCMD = false; + bool HasCMPCCXADD = false; bool HasKL = false; // For key locker bool HasWIDEKL = false; // For wide key locker bool HasHRESET = false; diff --git a/clang/lib/Basic/Targets/X86.cpp b/clang/lib/Basic/Targets/X86.cpp --- a/clang/lib/Basic/Targets/X86.cpp +++ b/clang/lib/Basic/Targets/X86.cpp @@ -332,6 +332,8 @@ HasAMXINT8 = true; } else if (Feature == "+amx-tile") { HasAMXTILE = true; + } else if (Feature == "+cmpccxadd") { + HasCMPCCXADD = true; } else if (Feature == "+avxvnni") { HasAVXVNNI = true; } else if (Feature == "+serialize") { @@ -778,6 +780,8 @@ Builder.defineMacro("__AMXINT8__"); if (HasAMXBF16) Builder.defineMacro("__AMXBF16__"); + if (HasCMPCCXADD) + Builder.defineMacro("__CMPCCXADD__"); if (HasAVXVNNI) Builder.defineMacro("__AVXVNNI__"); if (HasSERIALIZE) @@ -908,6 +912,7 @@ .Case("clflushopt", true) .Case("clwb", true) .Case("clzero", true) + .Case("cmpccxadd", true) .Case("crc32", true) .Case("cx16", true) .Case("enqcmd", true) @@ -1004,6 +1009,7 @@ .Case("clwb", HasCLWB) .Case("clzero", HasCLZERO) .Case("crc32", HasCRC32) + .Case("cmpccxadd", HasCMPCCXADD) .Case("cx8", HasCX8) .Case("cx16", HasCX16) .Case("enqcmd", HasENQCMD) diff --git a/clang/lib/Headers/CMakeLists.txt b/clang/lib/Headers/CMakeLists.txt --- a/clang/lib/Headers/CMakeLists.txt +++ b/clang/lib/Headers/CMakeLists.txt @@ -150,6 +150,7 @@ clflushoptintrin.h clwbintrin.h clzerointrin.h + cmpccxaddintrin.h crc32intrin.h emmintrin.h enqcmdintrin.h diff --git a/clang/lib/Headers/cmpccxaddintrin.h b/clang/lib/Headers/cmpccxaddintrin.h new file mode 100644 --- /dev/null +++ b/clang/lib/Headers/cmpccxaddintrin.h @@ -0,0 +1,69 @@ +/*===--------------- cmpccxaddintrin.h - CMPCCXADD intrinsics--------------=== + * + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ +#ifndef __IMMINTRIN_H +#error "Never use directly; include instead." +#endif // __IMMINTRIN_H + +#ifndef __CMPCCXADDINTRIN_H +#define __CMPCCXADDINTRIN_H +#ifdef __x86_64__ + +typedef enum { + _CMPCCX_O, /* Overflow. */ + _CMPCCX_NO, /* No overflow. */ + _CMPCCX_B, /* Below. */ + _CMPCCX_NB, /* Not below. */ + _CMPCCX_Z, /* Zero. */ + _CMPCCX_NZ, /* Not zero. */ + _CMPCCX_BE, /* Below or equal. */ + _CMPCCX_NBE, /* Neither below nor equal. */ + _CMPCCX_S, /* Sign. */ + _CMPCCX_NS, /* No sign. */ + _CMPCCX_P, /* Parity. */ + _CMPCCX_NP, /* No parity. */ + _CMPCCX_L, /* Less. */ + _CMPCCX_NL, /* Not less. */ + _CMPCCX_LE, /* Less or equal. */ + _CMPCCX_NLE, /* Neither less nor equal. */ +} _CMPCCX_ENUM; + +/// Compares the value from the memory __A with the value of __B. If the +/// specified condition __D is met, then add the third operand __C to the +/// __A and write it into __A, else the value of __A is unchanged. The return +/// value is the original value of __A. +/// +/// \headerfile +/// +/// This intrinsic corresponds to the \c CMPCCXADD instructions. +/// +/// \param __A +/// __A pointer specifying the memory address. +/// +/// \param __B +/// A integer operand. +/// +/// \param __C +/// A integer operand. +/// +/// \param __D +/// The specified condition. +/// +/// \returns a integer which is the original value of first operand. + +#define __cmpccxadd_epi32(__A, __B, __C, __D) \ + ((int)(__builtin_ia32_cmpccxadd32((void *)(__A), (int)(__B), (int)(__C), \ + (int)(__D)))) + +#define __cmpccxadd_epi64(__A, __B, __C, __D) \ + ((long long)(__builtin_ia32_cmpccxadd64((void *)(__A), (long long)(__B), \ + (long long)(__C), (int)(__D)))) + +#endif // __x86_64__ +#endif // __CMPCCXADDINTRIN_H diff --git a/clang/lib/Headers/cpuid.h b/clang/lib/Headers/cpuid.h --- a/clang/lib/Headers/cpuid.h +++ b/clang/lib/Headers/cpuid.h @@ -202,6 +202,7 @@ /* Features in %eax for leaf 7 sub-leaf 1 */ #define bit_AVXVNNI 0x00000010 #define bit_AVX512BF16 0x00000020 +#define bit_CMPCCXADD 0x00000080 #define bit_HRESET 0x00400000 /* Features in %edx for leaf 7 sub-leaf 1 */ diff --git a/clang/lib/Headers/immintrin.h b/clang/lib/Headers/immintrin.h --- a/clang/lib/Headers/immintrin.h +++ b/clang/lib/Headers/immintrin.h @@ -509,6 +509,11 @@ #include #endif +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__CMPCCXADD__) +#include +#endif + #if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ defined(__KL__) || defined(__WIDEKL__) #include diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -5410,6 +5410,10 @@ case X86::BI__builtin_ia32_reducesh_mask: i = 4; l = 0; u = 255; break; + case X86::BI__builtin_ia32_cmpccxadd32: + case X86::BI__builtin_ia32_cmpccxadd64: + i = 3; l = 0; u = 15; + break; } // Note that we don't force a hard error on the range check here, allowing diff --git a/clang/test/CodeGen/X86/cmpccxadd-builtins-error-32.c b/clang/test/CodeGen/X86/cmpccxadd-builtins-error-32.c new file mode 100644 --- /dev/null +++ b/clang/test/CodeGen/X86/cmpccxadd-builtins-error-32.c @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 %s -ffreestanding -triple=i386-unknown-unknown \ +// RUN: -target-feature +cmpccxadd -emit-llvm -fsyntax-only -verify + +#include + +int test_cmpccxadd32(void *__A, int __B, int __C) { + return __cmpccxadd_epi32(__A, __B, __C, 0); // expected-error {{call to undeclared function '__cmpccxadd_epi32'}} +} diff --git a/clang/test/CodeGen/X86/cmpccxadd-builtins-error.c b/clang/test/CodeGen/X86/cmpccxadd-builtins-error.c new file mode 100644 --- /dev/null +++ b/clang/test/CodeGen/X86/cmpccxadd-builtins-error.c @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 %s -ffreestanding -triple=x86_64-unknown-unknown \ +// RUN: -target-feature +cmpccxadd -emit-llvm -fsyntax-only -verify + +#include + +int test_cmpccxadd32(void *__A, int __B, int __C) { + return __cmpccxadd_epi32(__A, __B, __C, 16); // expected-error {{argument value 16 is outside the valid range [0, 15]}} +} + +long long test_cmpccxadd64(void *__A, long long __B, long long __C) { + return __cmpccxadd_epi64(__A, __B, __C, 16); // expected-error {{argument value 16 is outside the valid range [0, 15]}} +} diff --git a/clang/test/CodeGen/X86/cmpccxadd-builtins.c b/clang/test/CodeGen/X86/cmpccxadd-builtins.c new file mode 100644 --- /dev/null +++ b/clang/test/CodeGen/X86/cmpccxadd-builtins.c @@ -0,0 +1,197 @@ +// RUN: %clang_cc1 %s -ffreestanding -triple=x86_64-unknown-unknown -target-feature +cmpccxadd \ +// RUN: -emit-llvm -o - -Wall -Werror -pedantic -Wno-gnu-statement-expression | FileCheck %s + +#include +#include + +int test_cmpbexadd32(void *__A, int __B, int __C) { + // CHECK-LABEL: @test_cmpbexadd32( + // CHECK: call i32 @llvm.x86.cmpccxadd32(ptr %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i32 0) + return __cmpccxadd_epi32(__A, __B, __C, _CMPCCX_O); +} + +long long test_cmpbexadd64(void *__A, long long __B, long long __C) { + // CHECK-LABEL: @test_cmpbexadd64( + // CHECK: call i64 @llvm.x86.cmpccxadd64(ptr %{{.*}}, i64 %{{.*}}, i64 %{{.*}}, i32 0) + return __cmpccxadd_epi64(__A, __B, __C, _CMPCCX_O); +} + +int test_cmpbxadd32(void *__A, int __B, int __C) { + // CHECK-LABEL: @test_cmpbxadd32( + // CHECK: call i32 @llvm.x86.cmpccxadd32(ptr %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i32 1) + return __cmpccxadd_epi32(__A, __B, __C, _CMPCCX_NO); +} + +long long test_cmpbxadd64(void *__A, long long __B, long long __C) { + // CHECK-LABEL: @test_cmpbxadd64( + // CHECK: call i64 @llvm.x86.cmpccxadd64(ptr %{{.*}}, i64 %{{.*}}, i64 %{{.*}}, i32 1) + return __cmpccxadd_epi64(__A, __B, __C, _CMPCCX_NO); +} + +int test_cmplexadd32(void *__A, int __B, int __C) { + // CHECK-LABEL: @test_cmplexadd32( + // CHECK: call i32 @llvm.x86.cmpccxadd32(ptr %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i32 2) + return __cmpccxadd_epi32(__A, __B, __C, _CMPCCX_B); +} + +long long test_cmplexadd64(void *__A, long long __B, long long __C) { + // CHECK-LABEL: @test_cmplexadd64( + // CHECK: call i64 @llvm.x86.cmpccxadd64(ptr %{{.*}}, i64 %{{.*}}, i64 %{{.*}}, i32 2) + return __cmpccxadd_epi64(__A, __B, __C, _CMPCCX_B); +} + +int test_cmplxadd32(void *__A, int __B, int __C) { + // CHECK-LABEL: @test_cmplxadd32( + // CHECK: call i32 @llvm.x86.cmpccxadd32(ptr %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i32 3) + return __cmpccxadd_epi32(__A, __B, __C, _CMPCCX_NB); +} + +long long test_cmplxadd64(void *__A, long long __B, long long __C) { + // CHECK-LABEL: @test_cmplxadd64( + // CHECK: call i64 @llvm.x86.cmpccxadd64(ptr %{{.*}}, i64 %{{.*}}, i64 %{{.*}}, i32 3) + return __cmpccxadd_epi64(__A, __B, __C, _CMPCCX_NB); +} + +int test_cmpnbexadd32(void *__A, int __B, int __C) { + // CHECK-LABEL: @test_cmpnbexadd32( + // CHECK: call i32 @llvm.x86.cmpccxadd32(ptr %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i32 4) + return __cmpccxadd_epi32(__A, __B, __C, _CMPCCX_Z); +} + +long long test_cmpnbexadd64(void *__A, long long __B, long long __C) { + // CHECK-LABEL: @test_cmpnbexadd64( + // CHECK: call i64 @llvm.x86.cmpccxadd64(ptr %{{.*}}, i64 %{{.*}}, i64 %{{.*}}, i32 4) + return __cmpccxadd_epi64(__A, __B, __C, _CMPCCX_Z); +} + +int test_cmpnbxadd32(void *__A, int __B, int __C) { + // CHECK-LABEL: @test_cmpnbxadd32( + // CHECK: call i32 @llvm.x86.cmpccxadd32(ptr %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i32 5) + return __cmpccxadd_epi32(__A, __B, __C, _CMPCCX_NZ); +} + +long long test_cmpnbxadd64(void *__A, long long __B, long long __C) { + // CHECK-LABEL: @test_cmpnbxadd64( + // CHECK: call i64 @llvm.x86.cmpccxadd64(ptr %{{.*}}, i64 %{{.*}}, i64 %{{.*}}, i32 5) + return __cmpccxadd_epi64(__A, __B, __C, _CMPCCX_NZ); +} + +int test_cmpnlexadd32(void *__A, int __B, int __C) { + // CHECK-LABEL: @test_cmpnlexadd32( + // CHECK: call i32 @llvm.x86.cmpccxadd32(ptr %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i32 6) + return __cmpccxadd_epi32(__A, __B, __C, _CMPCCX_BE); +} + +long long test_cmpnlexadd64(void *__A, long long __B, long long __C) { + // CHECK-LABEL: @test_cmpnlexadd64( + // CHECK: call i64 @llvm.x86.cmpccxadd64(ptr %{{.*}}, i64 %{{.*}}, i64 %{{.*}}, i32 6) + return __cmpccxadd_epi64(__A, __B, __C, _CMPCCX_BE); +} + +int test_cmpnlxadd32(void *__A, int __B, int __C) { + // CHECK-LABEL: @test_cmpnlxadd32( + // CHECK: call i32 @llvm.x86.cmpccxadd32(ptr %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i32 7) + return __cmpccxadd_epi32(__A, __B, __C, _CMPCCX_NBE); +} + +long long test_cmpnlxadd64(void *__A, long long __B, long long __C) { + // CHECK-LABEL: @test_cmpnlxadd64( + // CHECK: call i64 @llvm.x86.cmpccxadd64(ptr %{{.*}}, i64 %{{.*}}, i64 %{{.*}}, i32 7) + return __cmpccxadd_epi64(__A, __B, __C, _CMPCCX_NBE); +} + +int test_cmpnoxadd32(void *__A, int __B, int __C) { + // CHECK-LABEL: @test_cmpnoxadd32( + // CHECK: call i32 @llvm.x86.cmpccxadd32(ptr %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i32 8) + return __cmpccxadd_epi32(__A, __B, __C, _CMPCCX_S); +} + +long long test_cmpnoxadd64(void *__A, long long __B, long long __C) { + // CHECK-LABEL: @test_cmpnoxadd64( + // CHECK: call i64 @llvm.x86.cmpccxadd64(ptr %{{.*}}, i64 %{{.*}}, i64 %{{.*}}, i32 8) + return __cmpccxadd_epi64(__A, __B, __C, _CMPCCX_S); +} + +int test_cmpnpxadd32(void *__A, int __B, int __C) { + // CHECK-LABEL: @test_cmpnpxadd32( + // CHECK: call i32 @llvm.x86.cmpccxadd32(ptr %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i32 9) + return __cmpccxadd_epi32(__A, __B, __C, _CMPCCX_NS); +} + +long long test_cmpnpxadd64(void *__A, long long __B, long long __C) { + // CHECK-LABEL: @test_cmpnpxadd64( + // CHECK: call i64 @llvm.x86.cmpccxadd64(ptr %{{.*}}, i64 %{{.*}}, i64 %{{.*}}, i32 9) + return __cmpccxadd_epi64(__A, __B, __C, _CMPCCX_NS); +} + +int test_cmpnsxadd32(void *__A, int __B, int __C) { + // CHECK-LABEL: @test_cmpnsxadd32( + // CHECK: call i32 @llvm.x86.cmpccxadd32(ptr %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i32 10) + return __cmpccxadd_epi32(__A, __B, __C, _CMPCCX_P); +} + +long long test_cmpnsxadd64(void *__A, long long __B, long long __C) { + // CHECK-LABEL: @test_cmpnsxadd64( + // CHECK: call i64 @llvm.x86.cmpccxadd64(ptr %{{.*}}, i64 %{{.*}}, i64 %{{.*}}, i32 10) + return __cmpccxadd_epi64(__A, __B, __C, _CMPCCX_P); +} + +int test_cmpnzxadd32(void *__A, int __B, int __C) { + // CHECK-LABEL: @test_cmpnzxadd32( + // CHECK: call i32 @llvm.x86.cmpccxadd32(ptr %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i32 11) + return __cmpccxadd_epi32(__A, __B, __C, _CMPCCX_NP); +} + +long long test_cmpnzxadd64(void *__A, long long __B, long long __C) { + // CHECK-LABEL: @test_cmpnzxadd64( + // CHECK: call i64 @llvm.x86.cmpccxadd64(ptr %{{.*}}, i64 %{{.*}}, i64 %{{.*}}, i32 11) + return __cmpccxadd_epi64(__A, __B, __C, _CMPCCX_NP); +} + +int test_cmpoxadd32(void *__A, int __B, int __C) { + // CHECK-LABEL: @test_cmpoxadd32( + // CHECK: call i32 @llvm.x86.cmpccxadd32(ptr %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i32 12) + return __cmpccxadd_epi32(__A, __B, __C, _CMPCCX_L); +} + +long long test_cmpoxadd64(void *__A, long long __B, long long __C) { + // CHECK-LABEL: @test_cmpoxadd64( + // CHECK: call i64 @llvm.x86.cmpccxadd64(ptr %{{.*}}, i64 %{{.*}}, i64 %{{.*}}, i32 12) + return __cmpccxadd_epi64(__A, __B, __C, _CMPCCX_L); +} + +int test_cmppxadd32(void *__A, int __B, int __C) { + // CHECK-LABEL: @test_cmppxadd32( + // CHECK: call i32 @llvm.x86.cmpccxadd32(ptr %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i32 13) + return __cmpccxadd_epi32(__A, __B, __C, _CMPCCX_NL); +} + +long long test_cmppxadd64(void *__A, long long __B, long long __C) { + // CHECK-LABEL: @test_cmppxadd64( + // CHECK: call i64 @llvm.x86.cmpccxadd64(ptr %{{.*}}, i64 %{{.*}}, i64 %{{.*}}, i32 13) + return __cmpccxadd_epi64(__A, __B, __C, _CMPCCX_NL); +} + +int test_cmpsxadd32(void *__A, int __B, int __C) { + // CHECK-LABEL: @test_cmpsxadd32( + // CHECK: call i32 @llvm.x86.cmpccxadd32(ptr %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i32 14) + return __cmpccxadd_epi32(__A, __B, __C, _CMPCCX_LE); +} + +long long test_cmpsxadd64(void *__A, long long __B, long long __C) { + // CHECK-LABEL: @test_cmpsxadd64( + // CHECK: call i64 @llvm.x86.cmpccxadd64(ptr %{{.*}}, i64 %{{.*}}, i64 %{{.*}}, i32 14) + return __cmpccxadd_epi64(__A, __B, __C, _CMPCCX_LE); +} + +int test_cmpzxadd32(void *__A, int __B, int __C) { + // CHECK-LABEL: @test_cmpzxadd32( + // CHECK: call i32 @llvm.x86.cmpccxadd32(ptr %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i32 15) + return __cmpccxadd_epi32(__A, __B, __C, _CMPCCX_NLE); +} + +long long test_cmpzxadd64(void *__A, long long __B, long long __C) { + // CHECK-LABEL: @test_cmpzxadd64( + // CHECK: call i64 @llvm.x86.cmpccxadd64(ptr %{{.*}}, i64 %{{.*}}, i64 %{{.*}}, i32 15) + return __cmpccxadd_epi64(__A, __B, __C, _CMPCCX_NLE); +} diff --git a/clang/test/Driver/x86-target-features.c b/clang/test/Driver/x86-target-features.c --- a/clang/test/Driver/x86-target-features.c +++ b/clang/test/Driver/x86-target-features.c @@ -310,6 +310,11 @@ // AVX512FP16: "-target-feature" "+avx512fp16" // NO-AVX512FP16: "-target-feature" "-avx512fp16" +// RUN: %clang --target=x86_64 -mcmpccxadd %s -### -o %t.o 2>&1 | FileCheck -check-prefix=CMPCCXADD %s +// RUN: %clang --target=x86_64 -mno-cmpccxadd %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-CMPCCXADD %s +// CMPCCXADD: "-target-feature" "+cmpccxadd" +// NO-CMPCCXADD: "-target-feature" "-cmpccxadd" + // RUN: %clang --target=i386 -march=i386 -mcrc32 %s -### 2>&1 | FileCheck -check-prefix=CRC32 %s // RUN: %clang --target=i386 -march=i386 -mno-crc32 %s -### 2>&1 | FileCheck -check-prefix=NO-CRC32 %s // CRC32: "-target-feature" "+crc32" diff --git a/clang/test/Preprocessor/x86_target_features.c b/clang/test/Preprocessor/x86_target_features.c --- a/clang/test/Preprocessor/x86_target_features.c +++ b/clang/test/Preprocessor/x86_target_features.c @@ -581,6 +581,14 @@ // AVX512FP16NOAVX512DQ-NOT: #define __AVX512DQ__ 1 // AVX512FP16NOAVX512DQ-NOT: #define __AVX512FP16__ 1 +// RUN: %clang -target x86_64-unknown-linux-gnu -march=atom -mcmpccxadd -x c -E -dM -o - %s | FileCheck -check-prefix=CMPCCXADD %s + +// CMPCCXADD: #define __CMPCCXADD__ 1 + +// RUN: %clang -target x86_64-unknown-linux-gnu -march=atom -mno-cmpccxadd -x c -E -dM -o - %s | FileCheck -check-prefix=NO-CMPCCXADD %s + +// NO-CMPCCXADD-NOT: #define __CMPCCXADD__ 1 + // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mcrc32 -x c -E -dM -o - %s | FileCheck -check-prefix=CRC32 %s // CRC32: #define __CRC32__ 1 diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst --- a/llvm/docs/ReleaseNotes.rst +++ b/llvm/docs/ReleaseNotes.rst @@ -138,6 +138,7 @@ * Add support for the ``RDMSRLIST and WRMSRLIST`` instructions. * Add support for the ``WRMSRNS`` instruction. +* Support ISA of ``CMPCCXADD``. Changes to the OCaml bindings ----------------------------- diff --git a/llvm/include/llvm/IR/IntrinsicsX86.td b/llvm/include/llvm/IR/IntrinsicsX86.td --- a/llvm/include/llvm/IR/IntrinsicsX86.td +++ b/llvm/include/llvm/IR/IntrinsicsX86.td @@ -5115,6 +5115,19 @@ Intrinsic<[llvm_anyvector_ty], [llvm_x86amx_ty], [IntrNoMem]>; } +let TargetPrefix = "x86" in { +def int_x86_cmpccxadd32 + : ClangBuiltin<"__builtin_ia32_cmpccxadd32">, + Intrinsic<[llvm_i32_ty], + [llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], + [IntrArgMemOnly, ImmArg>]>; + +def int_x86_cmpccxadd64 + : ClangBuiltin<"__builtin_ia32_cmpccxadd64">, + Intrinsic<[llvm_i64_ty], + [llvm_ptr_ty, llvm_i64_ty, llvm_i64_ty, llvm_i32_ty], + [IntrArgMemOnly, ImmArg>]>; +} //===----------------------------------------------------------------------===// // UINTR - User Level Interrupt diff --git a/llvm/include/llvm/Support/X86TargetParser.def b/llvm/include/llvm/Support/X86TargetParser.def --- a/llvm/include/llvm/Support/X86TargetParser.def +++ b/llvm/include/llvm/Support/X86TargetParser.def @@ -202,6 +202,7 @@ X86_FEATURE (XSAVES, "xsaves") X86_FEATURE (HRESET, "hreset") X86_FEATURE (AVX512FP16, "avx512fp16") +X86_FEATURE (CMPCCXADD, "cmpccxadd") X86_FEATURE (AVXVNNI, "avxvnni") // These features aren't really CPU features, but the frontend can set them. X86_FEATURE (RETPOLINE_EXTERNAL_THUNK, "retpoline-external-thunk") diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -1807,6 +1807,7 @@ MaxLevel >= 7 && !getX86CpuIDAndInfoEx(0x7, 0x1, &EAX, &EBX, &ECX, &EDX); Features["avxvnni"] = HasLeaf7Subleaf1 && ((EAX >> 4) & 1) && HasAVXSave; Features["avx512bf16"] = HasLeaf7Subleaf1 && ((EAX >> 5) & 1) && HasAVX512Save; + Features["cmpccxadd"] = HasLeaf7Subleaf1 && ((EAX >> 7) & 1); Features["hreset"] = HasLeaf7Subleaf1 && ((EAX >> 22) & 1); Features["prefetchi"] = HasLeaf7Subleaf1 && ((EDX >> 14) & 1); diff --git a/llvm/lib/Support/X86TargetParser.cpp b/llvm/lib/Support/X86TargetParser.cpp --- a/llvm/lib/Support/X86TargetParser.cpp +++ b/llvm/lib/Support/X86TargetParser.cpp @@ -582,6 +582,7 @@ constexpr FeatureBitset ImpliedFeaturesHRESET = {}; constexpr FeatureBitset ImpliedFeaturesPREFETCHI = {}; +constexpr FeatureBitset ImpliedFeaturesCMPCCXADD = {}; constexpr FeatureBitset ImpliedFeaturesAVX512FP16 = FeatureAVX512BW | FeatureAVX512DQ | FeatureAVX512VL; // Key Locker Features diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h b/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h --- a/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h +++ b/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h @@ -630,6 +630,11 @@ /// byte like data16 or rep. PrefixByte = 10, + /// MRMDestMem4VOp3CC - This form is used for instructions that use the Mod/RM + /// byte to specify a destination which in this case is memory and operand 3 + /// with VEX.VVVV, and also encodes a condition code. + MRMDestMem4VOp3CC = 20, + /// MRM[0-7][rm] - These forms are used to represent instructions that use /// a Mod/RM byte, and use the middle field to hold extended opcode /// information. In the intel manual these are represented as /0, /1, ... @@ -1125,6 +1130,7 @@ // Skip registers encoded in reg, VEX_VVVV, and I8IMM. return 3; case X86II::MRMSrcMemCC: + case X86II::MRMDestMem4VOp3CC: // Start from 1, skip any registers encoded in VEX_VVVV or I8IMM, or a // mask register. return 1; diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp --- a/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp +++ b/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp @@ -801,6 +801,23 @@ switch (TSFlags & X86II::FormMask) { default: llvm_unreachable("Unexpected form in emitVEXOpcodePrefix!"); + case X86II::MRMDestMem4VOp3CC: { + // MemAddr, src1(ModR/M), src2(VEX_4V) + unsigned BaseRegEnc = getX86RegEncoding(MI, MemOperand + X86::AddrBaseReg); + VEX_B = ~(BaseRegEnc >> 3) & 1; + unsigned IndexRegEnc = + getX86RegEncoding(MI, MemOperand + X86::AddrIndexReg); + VEX_X = ~(IndexRegEnc >> 3) & 1; + + CurOp += X86::AddrNumOperands; + + unsigned RegEnc = getX86RegEncoding(MI, ++CurOp); + VEX_R = ~(RegEnc >> 3) & 1; + + unsigned VRegEnc = getX86RegEncoding(MI, CurOp++); + VEX_4V = ~VRegEnc & 0xf; + break; + } case X86II::MRM_C0: case X86II::RawFrm: case X86II::PrefixByte: @@ -1429,6 +1446,15 @@ CurOp = SrcRegNum + 1; break; } + case X86II::MRMDestMem4VOp3CC: { + unsigned CC = MI.getOperand(8).getImm(); + emitByte(BaseOpcode + CC, OS); + unsigned SrcRegNum = CurOp + X86::AddrNumOperands; + emitMemModRMByte(MI, CurOp + 1, getX86RegNum(MI.getOperand(0)), TSFlags, + HasREX, StartByte, OS, Fixups, STI, false); + CurOp = SrcRegNum + 3; // skip VEX_V4 and CC + break; + } case X86II::MRMDestMemFSIB: case X86II::MRMDestMem: { emitByte(BaseOpcode, OS); diff --git a/llvm/lib/Target/X86/X86.td b/llvm/lib/Target/X86/X86.td --- a/llvm/lib/Target/X86/X86.td +++ b/llvm/lib/Target/X86/X86.td @@ -257,6 +257,8 @@ def FeatureAMXBF16 : SubtargetFeature<"amx-bf16", "HasAMXBF16", "true", "Support AMX-BF16 instructions", [FeatureAMXTILE]>; +def FeatureCMPCCXADD : SubtargetFeature<"cmpccxadd", "HasCMPCCXADD", "true", + "Support CMPCCXADD instructions">; def FeatureINVPCID : SubtargetFeature<"invpcid", "HasINVPCID", "true", "Invalidate Process-Context Identifier">; def FeatureSGX : SubtargetFeature<"sgx", "HasSGX", "true", diff --git a/llvm/lib/Target/X86/X86ISelLowering.h b/llvm/lib/Target/X86/X86ISelLowering.h --- a/llvm/lib/Target/X86/X86ISelLowering.h +++ b/llvm/lib/Target/X86/X86ISelLowering.h @@ -869,6 +869,12 @@ AESENCWIDE256KL, AESDECWIDE256KL, + /// Compare and Add if Condition is Met. Compare value in operand 2 with + /// value in memory of operand 1. If condition of operand 4 is met, add value + /// operand 3 to m32 and write new value in operand 1. Operand 2 is + /// always updated with the original value from operand 1. + CMPCCXADD, + // Save xmm argument registers to the stack, according to %al. An operator // is needed so that this can be expanded with control flow. VASTART_SAVE_XMM_REGS, diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -5628,6 +5628,8 @@ Info.align = Align(1); Info.flags |= MachineMemOperand::MOLoad; return true; + case Intrinsic::x86_cmpccxadd32: + case Intrinsic::x86_cmpccxadd64: case Intrinsic::x86_atomic_bts: case Intrinsic::x86_atomic_btc: case Intrinsic::x86_atomic_btr: { @@ -28234,6 +28236,20 @@ DAG.getShiftAmountConstant(Imm, VT, DL)); return DAG.getNode(ISD::MERGE_VALUES, DL, Op->getVTList(), Res, Chain); } + case Intrinsic::x86_cmpccxadd32: + case Intrinsic::x86_cmpccxadd64: { + SDLoc DL(Op); + SDValue Chain = Op.getOperand(0); + SDValue Addr = Op.getOperand(2); + SDValue Src1 = Op.getOperand(3); + SDValue Src2 = Op.getOperand(4); + SDValue CC = Op.getOperand(5); + MachineMemOperand *MMO = cast(Op)->getMemOperand(); + SDValue Operation = DAG.getMemIntrinsicNode( + X86ISD::CMPCCXADD, DL, Op->getVTList(), {Chain, Addr, Src1, Src2, CC}, + MVT::i32, MMO); + return Operation; + } } return SDValue(); } @@ -34154,6 +34170,7 @@ NODE_NAME_CASE(AESDECWIDE128KL) NODE_NAME_CASE(AESENCWIDE256KL) NODE_NAME_CASE(AESDECWIDE256KL) + NODE_NAME_CASE(CMPCCXADD) NODE_NAME_CASE(TESTUI) } return nullptr; diff --git a/llvm/lib/Target/X86/X86InstrFormats.td b/llvm/lib/Target/X86/X86InstrFormats.td --- a/llvm/lib/Target/X86/X86InstrFormats.td +++ b/llvm/lib/Target/X86/X86InstrFormats.td @@ -28,6 +28,7 @@ def RawFrmImm16 : Format<8>; def AddCCFrm : Format<9>; def PrefixByte : Format<10>; +def MRMDestMem4VOp3CC : Format<20>; def MRMr0 : Format<21>; def MRMSrcMemFSIB : Format<22>; def MRMDestMemFSIB : Format<23>; diff --git a/llvm/lib/Target/X86/X86InstrInfo.td b/llvm/lib/Target/X86/X86InstrInfo.td --- a/llvm/lib/Target/X86/X86InstrInfo.td +++ b/llvm/lib/Target/X86/X86InstrInfo.td @@ -131,6 +131,10 @@ SDTCisVT<2, v2i64>, SDTCisPtrTy<3>]>; +def SDTX86Cmpccxadd : SDTypeProfile<1, 4, [SDTCisSameAs<0, 2>, + SDTCisPtrTy<1>, SDTCisSameAs<2, 3>, + SDTCisVT<4, i8>]>; + def X86MemBarrier : SDNode<"X86ISD::MEMBARRIER", SDT_X86MEMBARRIER, [SDNPHasChain,SDNPSideEffect]>; def X86MFence : SDNode<"X86ISD::MFENCE", SDT_X86MEMBARRIER, @@ -341,6 +345,10 @@ [SDNPHasChain, SDNPMayLoad, SDNPSideEffect, SDNPMemOperand]>; +def X86cmpccxadd : SDNode<"X86ISD::CMPCCXADD", SDTX86Cmpccxadd, + [SDNPHasChain, SDNPMayLoad, SDNPMayStore, + SDNPMemOperand]>; + //===----------------------------------------------------------------------===// // X86 Operand Definitions. // @@ -980,6 +988,7 @@ def HasCX16 : Predicate<"Subtarget->hasCX16()">; def HasPCONFIG : Predicate<"Subtarget->hasPCONFIG()">; def HasENQCMD : Predicate<"Subtarget->hasENQCMD()">; +def HasCMPCCXADD : Predicate<"Subtarget->hasCMPCCXADD()">; def HasKL : Predicate<"Subtarget->hasKL()">; def HasWIDEKL : Predicate<"Subtarget->hasWIDEKL()">; def HasHRESET : Predicate<"Subtarget->hasHRESET()">; @@ -3009,6 +3018,48 @@ "prefetchit1\t$src", [(prefetch addr:$src, (i32 0), (i32 2), (i32 0))]>, TB; } +//===----------------------------------------------------------------------===// +// CMPCCXADD Instructions +// +let Predicates = [HasCMPCCXADD, In64BitMode], Defs = [EFLAGS], + Constraints = "$dstsrc2 = $dst" in { +def CMPCCXADDmr32 : I<0xe0, MRMDestMem4VOp3CC, (outs GR32:$dst), + (ins GR32:$dstsrc2, i32mem:$dstsrc1, GR32:$src3, ccode:$cond), + "cmp${cond}xadd\t{$src3, $dst, $dstsrc1|$dstsrc1, $dst, $src3}", + [(set GR32:$dst, (X86cmpccxadd addr:$dstsrc1, GR32:$dstsrc2, GR32:$src3, timm:$cond))]>, + VEX_4V, T8PD, Sched<[WriteXCHG]>; + +def CMPCCXADDmr64 : I<0xe0, MRMDestMem4VOp3CC, (outs GR64:$dst), + (ins GR64:$dstsrc2, i64mem:$dstsrc1, GR64:$src3, ccode:$cond), + "cmp${cond}xadd\t{$src3, $dst, $dstsrc1|$dstsrc1, $dst, $src3}", + [(set GR64:$dst, (X86cmpccxadd addr:$dstsrc1, GR64:$dstsrc2, GR64:$src3, timm:$cond))]>, + VEX_4V, VEX_W, T8PD, Sched<[WriteXCHG]>; +} + +multiclass CMPCCXADD_Aliases { + def : InstAlias<"cmp"#Cond#"xadd"#"\t{$src3, $dst, $dstsrc1|$dstsrc1, $dst, $src3}", + (CMPCCXADDmr32 GR32:$dst, i32mem:$dstsrc1, GR32:$src3, CC), 0>; + def : InstAlias<"cmp"#Cond#"xadd"#"\t{$src3, $dst, $dstsrc1|$dstsrc1, $dst, $src3}", + (CMPCCXADDmr64 GR64:$dst, i64mem:$dstsrc1, GR64:$src3, CC), 0>; +} + +defm : CMPCCXADD_Aliases<"o" , 0>; +defm : CMPCCXADD_Aliases<"no", 1>; +defm : CMPCCXADD_Aliases<"b" , 2>; +defm : CMPCCXADD_Aliases<"nb", 3>; +defm : CMPCCXADD_Aliases<"z" , 4>; +defm : CMPCCXADD_Aliases<"nz", 5>; +defm : CMPCCXADD_Aliases<"be", 6>; +defm : CMPCCXADD_Aliases<"nbe", 7>; +defm : CMPCCXADD_Aliases<"s" , 8>; +defm : CMPCCXADD_Aliases<"ns", 9>; +defm : CMPCCXADD_Aliases<"p" , 10>; +defm : CMPCCXADD_Aliases<"np", 11>; +defm : CMPCCXADD_Aliases<"l" , 12>; +defm : CMPCCXADD_Aliases<"nl", 13>; +defm : CMPCCXADD_Aliases<"le", 14>; +defm : CMPCCXADD_Aliases<"nle",15>; + //===----------------------------------------------------------------------===// // Pattern fragments to auto generate TBM instructions. //===----------------------------------------------------------------------===// diff --git a/llvm/test/CodeGen/X86/cmpccxadd-intrinsics.ll b/llvm/test/CodeGen/X86/cmpccxadd-intrinsics.ll new file mode 100644 --- /dev/null +++ b/llvm/test/CodeGen/X86/cmpccxadd-intrinsics.ll @@ -0,0 +1,358 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -verify-machineinstrs -mtriple=x86_64-unknown-unknown --show-mc-encoding -mattr=+cmpccxadd | FileCheck %s + +define dso_local i32 @test_cmpbexadd32(i8* %__A, i32 %__B, i32 %__C) nounwind { +; CHECK-LABEL: test_cmpbexadd32: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movl %esi, %eax # encoding: [0x89,0xf0] +; CHECK-NEXT: cmpoxadd %edx, %eax, (%rdi) # encoding: [0xc4,0xe2,0x69,0xe0,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i32 @llvm.x86.cmpccxadd32(i8* %__A, i32 %__B, i32 %__C, i32 0) + ret i32 %0 +} + +declare i32 @llvm.x86.cmpccxadd32(i8*, i32, i32, i32 immarg) + +define dso_local i64 @test_cmpbexadd64(i8* %__A, i64 %__B, i64 %__C) nounwind { +; CHECK-LABEL: test_cmpbexadd64: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movq %rsi, %rax # encoding: [0x48,0x89,0xf0] +; CHECK-NEXT: cmpoxadd %rdx, %rax, (%rdi) # encoding: [0xc4,0xe2,0xe9,0xe0,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i64 @llvm.x86.cmpccxadd64(i8* %__A, i64 %__B, i64 %__C, i32 0) + ret i64 %0 +} + +declare i64 @llvm.x86.cmpccxadd64(i8*, i64, i64, i32 immarg) + +define dso_local i32 @test_cmpbxadd32(i8* %__A, i32 %__B, i32 %__C) nounwind { +; CHECK-LABEL: test_cmpbxadd32: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movl %esi, %eax # encoding: [0x89,0xf0] +; CHECK-NEXT: cmpnoxadd %edx, %eax, (%rdi) # encoding: [0xc4,0xe2,0x69,0xe1,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i32 @llvm.x86.cmpccxadd32(i8* %__A, i32 %__B, i32 %__C, i32 1) + ret i32 %0 +} + +define dso_local i64 @test_cmpbxadd64(i8* %__A, i64 %__B, i64 %__C) nounwind { +; CHECK-LABEL: test_cmpbxadd64: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movq %rsi, %rax # encoding: [0x48,0x89,0xf0] +; CHECK-NEXT: cmpnoxadd %rdx, %rax, (%rdi) # encoding: [0xc4,0xe2,0xe9,0xe1,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i64 @llvm.x86.cmpccxadd64(i8* %__A, i64 %__B, i64 %__C, i32 1) + ret i64 %0 +} + +define dso_local i32 @test_cmplexadd32(i8* %__A, i32 %__B, i32 %__C) nounwind { +; CHECK-LABEL: test_cmplexadd32: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movl %esi, %eax # encoding: [0x89,0xf0] +; CHECK-NEXT: cmpbxadd %edx, %eax, (%rdi) # encoding: [0xc4,0xe2,0x69,0xe2,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i32 @llvm.x86.cmpccxadd32(i8* %__A, i32 %__B, i32 %__C, i32 2) + ret i32 %0 +} + +define dso_local i64 @test_cmplexadd64(i8* %__A, i64 %__B, i64 %__C) nounwind { +; CHECK-LABEL: test_cmplexadd64: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movq %rsi, %rax # encoding: [0x48,0x89,0xf0] +; CHECK-NEXT: cmpbxadd %rdx, %rax, (%rdi) # encoding: [0xc4,0xe2,0xe9,0xe2,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i64 @llvm.x86.cmpccxadd64(i8* %__A, i64 %__B, i64 %__C, i32 2) + ret i64 %0 +} + +define dso_local i32 @test_cmplxadd32(i8* %__A, i32 %__B, i32 %__C) nounwind { +; CHECK-LABEL: test_cmplxadd32: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movl %esi, %eax # encoding: [0x89,0xf0] +; CHECK-NEXT: cmpaexadd %edx, %eax, (%rdi) # encoding: [0xc4,0xe2,0x69,0xe3,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i32 @llvm.x86.cmpccxadd32(i8* %__A, i32 %__B, i32 %__C, i32 3) + ret i32 %0 +} + +define dso_local i64 @test_cmplxadd64(i8* %__A, i64 %__B, i64 %__C) nounwind { +; CHECK-LABEL: test_cmplxadd64: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movq %rsi, %rax # encoding: [0x48,0x89,0xf0] +; CHECK-NEXT: cmpaexadd %rdx, %rax, (%rdi) # encoding: [0xc4,0xe2,0xe9,0xe3,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i64 @llvm.x86.cmpccxadd64(i8* %__A, i64 %__B, i64 %__C, i32 3) + ret i64 %0 +} + +define dso_local i32 @test_cmpnbexadd32(i8* %__A, i32 %__B, i32 %__C) nounwind { +; CHECK-LABEL: test_cmpnbexadd32: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movl %esi, %eax # encoding: [0x89,0xf0] +; CHECK-NEXT: cmpexadd %edx, %eax, (%rdi) # encoding: [0xc4,0xe2,0x69,0xe4,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i32 @llvm.x86.cmpccxadd32(i8* %__A, i32 %__B, i32 %__C, i32 4) + ret i32 %0 +} + +define dso_local i64 @test_cmpnbexadd64(i8* %__A, i64 %__B, i64 %__C) nounwind { +; CHECK-LABEL: test_cmpnbexadd64: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movq %rsi, %rax # encoding: [0x48,0x89,0xf0] +; CHECK-NEXT: cmpexadd %rdx, %rax, (%rdi) # encoding: [0xc4,0xe2,0xe9,0xe4,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i64 @llvm.x86.cmpccxadd64(i8* %__A, i64 %__B, i64 %__C, i32 4) + ret i64 %0 +} + +define dso_local i32 @test_cmpnbxadd32(i8* %__A, i32 %__B, i32 %__C) nounwind { +; CHECK-LABEL: test_cmpnbxadd32: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movl %esi, %eax # encoding: [0x89,0xf0] +; CHECK-NEXT: cmpnexadd %edx, %eax, (%rdi) # encoding: [0xc4,0xe2,0x69,0xe5,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i32 @llvm.x86.cmpccxadd32(i8* %__A, i32 %__B, i32 %__C, i32 5) + ret i32 %0 +} + +define dso_local i64 @test_cmpnbxadd64(i8* %__A, i64 %__B, i64 %__C) nounwind { +; CHECK-LABEL: test_cmpnbxadd64: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movq %rsi, %rax # encoding: [0x48,0x89,0xf0] +; CHECK-NEXT: cmpnexadd %rdx, %rax, (%rdi) # encoding: [0xc4,0xe2,0xe9,0xe5,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i64 @llvm.x86.cmpccxadd64(i8* %__A, i64 %__B, i64 %__C, i32 5) + ret i64 %0 +} + +define dso_local i32 @test_cmpnlexadd32(i8* %__A, i32 %__B, i32 %__C) nounwind { +; CHECK-LABEL: test_cmpnlexadd32: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movl %esi, %eax # encoding: [0x89,0xf0] +; CHECK-NEXT: cmpbexadd %edx, %eax, (%rdi) # encoding: [0xc4,0xe2,0x69,0xe6,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i32 @llvm.x86.cmpccxadd32(i8* %__A, i32 %__B, i32 %__C, i32 6) + ret i32 %0 +} + +define dso_local i64 @test_cmpnlexadd64(i8* %__A, i64 %__B, i64 %__C) nounwind { +; CHECK-LABEL: test_cmpnlexadd64: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movq %rsi, %rax # encoding: [0x48,0x89,0xf0] +; CHECK-NEXT: cmpbexadd %rdx, %rax, (%rdi) # encoding: [0xc4,0xe2,0xe9,0xe6,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i64 @llvm.x86.cmpccxadd64(i8* %__A, i64 %__B, i64 %__C, i32 6) + ret i64 %0 +} + +define dso_local i32 @test_cmpnlxadd32(i8* %__A, i32 %__B, i32 %__C) nounwind { +; CHECK-LABEL: test_cmpnlxadd32: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movl %esi, %eax # encoding: [0x89,0xf0] +; CHECK-NEXT: cmpaxadd %edx, %eax, (%rdi) # encoding: [0xc4,0xe2,0x69,0xe7,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i32 @llvm.x86.cmpccxadd32(i8* %__A, i32 %__B, i32 %__C, i32 7) + ret i32 %0 +} + +define dso_local i64 @test_cmpnlxadd64(i8* %__A, i64 %__B, i64 %__C) nounwind { +; CHECK-LABEL: test_cmpnlxadd64: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movq %rsi, %rax # encoding: [0x48,0x89,0xf0] +; CHECK-NEXT: cmpaxadd %rdx, %rax, (%rdi) # encoding: [0xc4,0xe2,0xe9,0xe7,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i64 @llvm.x86.cmpccxadd64(i8* %__A, i64 %__B, i64 %__C, i32 7) + ret i64 %0 +} + +define dso_local i32 @test_cmpnoxadd32(i8* %__A, i32 %__B, i32 %__C) nounwind { +; CHECK-LABEL: test_cmpnoxadd32: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movl %esi, %eax # encoding: [0x89,0xf0] +; CHECK-NEXT: cmpsxadd %edx, %eax, (%rdi) # encoding: [0xc4,0xe2,0x69,0xe8,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i32 @llvm.x86.cmpccxadd32(i8* %__A, i32 %__B, i32 %__C, i32 8) + ret i32 %0 +} + +define dso_local i64 @test_cmpnoxadd64(i8* %__A, i64 %__B, i64 %__C) nounwind { +; CHECK-LABEL: test_cmpnoxadd64: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movq %rsi, %rax # encoding: [0x48,0x89,0xf0] +; CHECK-NEXT: cmpsxadd %rdx, %rax, (%rdi) # encoding: [0xc4,0xe2,0xe9,0xe8,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i64 @llvm.x86.cmpccxadd64(i8* %__A, i64 %__B, i64 %__C, i32 8) + ret i64 %0 +} + +define dso_local i32 @test_cmpnpxadd32(i8* %__A, i32 %__B, i32 %__C) nounwind { +; CHECK-LABEL: test_cmpnpxadd32: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movl %esi, %eax # encoding: [0x89,0xf0] +; CHECK-NEXT: cmpnsxadd %edx, %eax, (%rdi) # encoding: [0xc4,0xe2,0x69,0xe9,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i32 @llvm.x86.cmpccxadd32(i8* %__A, i32 %__B, i32 %__C, i32 9) + ret i32 %0 +} + +define dso_local i64 @test_cmpnpxadd64(i8* %__A, i64 %__B, i64 %__C) nounwind { +; CHECK-LABEL: test_cmpnpxadd64: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movq %rsi, %rax # encoding: [0x48,0x89,0xf0] +; CHECK-NEXT: cmpnsxadd %rdx, %rax, (%rdi) # encoding: [0xc4,0xe2,0xe9,0xe9,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i64 @llvm.x86.cmpccxadd64(i8* %__A, i64 %__B, i64 %__C, i32 9) + ret i64 %0 +} + +define dso_local i32 @test_cmpnsxadd32(i8* %__A, i32 %__B, i32 %__C) nounwind { +; CHECK-LABEL: test_cmpnsxadd32: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movl %esi, %eax # encoding: [0x89,0xf0] +; CHECK-NEXT: cmppxadd %edx, %eax, (%rdi) # encoding: [0xc4,0xe2,0x69,0xea,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i32 @llvm.x86.cmpccxadd32(i8* %__A, i32 %__B, i32 %__C, i32 10) + ret i32 %0 +} + +define dso_local i64 @test_cmpnsxadd64(i8* %__A, i64 %__B, i64 %__C) nounwind { +; CHECK-LABEL: test_cmpnsxadd64: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movq %rsi, %rax # encoding: [0x48,0x89,0xf0] +; CHECK-NEXT: cmppxadd %rdx, %rax, (%rdi) # encoding: [0xc4,0xe2,0xe9,0xea,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i64 @llvm.x86.cmpccxadd64(i8* %__A, i64 %__B, i64 %__C, i32 10) + ret i64 %0 +} + +define dso_local i32 @test_cmpnzxadd32(i8* %__A, i32 %__B, i32 %__C) nounwind { +; CHECK-LABEL: test_cmpnzxadd32: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movl %esi, %eax # encoding: [0x89,0xf0] +; CHECK-NEXT: cmpnpxadd %edx, %eax, (%rdi) # encoding: [0xc4,0xe2,0x69,0xeb,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i32 @llvm.x86.cmpccxadd32(i8* %__A, i32 %__B, i32 %__C, i32 11) + ret i32 %0 +} + +define dso_local i64 @test_cmpnzxadd64(i8* %__A, i64 %__B, i64 %__C) nounwind { +; CHECK-LABEL: test_cmpnzxadd64: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movq %rsi, %rax # encoding: [0x48,0x89,0xf0] +; CHECK-NEXT: cmpnpxadd %rdx, %rax, (%rdi) # encoding: [0xc4,0xe2,0xe9,0xeb,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i64 @llvm.x86.cmpccxadd64(i8* %__A, i64 %__B, i64 %__C, i32 11) + ret i64 %0 +} + +define dso_local i32 @test_cmpoxadd32(i8* %__A, i32 %__B, i32 %__C) nounwind { +; CHECK-LABEL: test_cmpoxadd32: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movl %esi, %eax # encoding: [0x89,0xf0] +; CHECK-NEXT: cmplxadd %edx, %eax, (%rdi) # encoding: [0xc4,0xe2,0x69,0xec,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i32 @llvm.x86.cmpccxadd32(i8* %__A, i32 %__B, i32 %__C, i32 12) + ret i32 %0 +} + +define dso_local i64 @test_cmpoxadd64(i8* %__A, i64 %__B, i64 %__C) nounwind { +; CHECK-LABEL: test_cmpoxadd64: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movq %rsi, %rax # encoding: [0x48,0x89,0xf0] +; CHECK-NEXT: cmplxadd %rdx, %rax, (%rdi) # encoding: [0xc4,0xe2,0xe9,0xec,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i64 @llvm.x86.cmpccxadd64(i8* %__A, i64 %__B, i64 %__C, i32 12) + ret i64 %0 +} + +define dso_local i32 @test_cmppxadd32(i8* %__A, i32 %__B, i32 %__C) nounwind { +; CHECK-LABEL: test_cmppxadd32: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movl %esi, %eax # encoding: [0x89,0xf0] +; CHECK-NEXT: cmpgexadd %edx, %eax, (%rdi) # encoding: [0xc4,0xe2,0x69,0xed,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i32 @llvm.x86.cmpccxadd32(i8* %__A, i32 %__B, i32 %__C, i32 13) + ret i32 %0 +} + +define dso_local i64 @test_cmppxadd64(i8* %__A, i64 %__B, i64 %__C) nounwind { +; CHECK-LABEL: test_cmppxadd64: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movq %rsi, %rax # encoding: [0x48,0x89,0xf0] +; CHECK-NEXT: cmpgexadd %rdx, %rax, (%rdi) # encoding: [0xc4,0xe2,0xe9,0xed,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i64 @llvm.x86.cmpccxadd64(i8* %__A, i64 %__B, i64 %__C, i32 13) + ret i64 %0 +} + +define dso_local i32 @test_cmpsxadd32(i8* %__A, i32 %__B, i32 %__C) nounwind { +; CHECK-LABEL: test_cmpsxadd32: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movl %esi, %eax # encoding: [0x89,0xf0] +; CHECK-NEXT: cmplexadd %edx, %eax, (%rdi) # encoding: [0xc4,0xe2,0x69,0xee,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i32 @llvm.x86.cmpccxadd32(i8* %__A, i32 %__B, i32 %__C, i32 14) + ret i32 %0 +} + +define dso_local i64 @test_cmpsxadd64(i8* %__A, i64 %__B, i64 %__C) nounwind { +; CHECK-LABEL: test_cmpsxadd64: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movq %rsi, %rax # encoding: [0x48,0x89,0xf0] +; CHECK-NEXT: cmplexadd %rdx, %rax, (%rdi) # encoding: [0xc4,0xe2,0xe9,0xee,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i64 @llvm.x86.cmpccxadd64(i8* %__A, i64 %__B, i64 %__C, i32 14) + ret i64 %0 +} + +define dso_local i32 @test_cmpzxadd32(i8* %__A, i32 %__B, i32 %__C) nounwind { +; CHECK-LABEL: test_cmpzxadd32: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movl %esi, %eax # encoding: [0x89,0xf0] +; CHECK-NEXT: cmpgxadd %edx, %eax, (%rdi) # encoding: [0xc4,0xe2,0x69,0xef,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i32 @llvm.x86.cmpccxadd32(i8* %__A, i32 %__B, i32 %__C, i32 15) + ret i32 %0 +} + +define dso_local i64 @test_cmpzxadd64(i8* %__A, i64 %__B, i64 %__C) nounwind { +; CHECK-LABEL: test_cmpzxadd64: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movq %rsi, %rax # encoding: [0x48,0x89,0xf0] +; CHECK-NEXT: cmpgxadd %rdx, %rax, (%rdi) # encoding: [0xc4,0xe2,0xe9,0xef,0x07] +; CHECK-NEXT: retq # encoding: [0xc3] +entry: + %0 = tail call i64 @llvm.x86.cmpccxadd64(i8* %__A, i64 %__B, i64 %__C, i32 15) + ret i64 %0 +} diff --git a/llvm/test/MC/Disassembler/X86/cmpccxadd-64.txt b/llvm/test/MC/Disassembler/X86/cmpccxadd-64.txt new file mode 100644 --- /dev/null +++ b/llvm/test/MC/Disassembler/X86/cmpccxadd-64.txt @@ -0,0 +1,771 @@ +# RUN: llvm-mc --disassemble %s -triple=x86_64 | FileCheck %s --check-prefixes=ATT +# RUN: llvm-mc --disassemble %s -triple=x86_64 -x86-asm-syntax=intel --output-asm-variant=1 | FileCheck %s --check-prefixes=INTEL + +# ATT: cmpbexadd %eax, %ecx, 268435456(%rbp,%r14,8) +# INTEL: cmpbexadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +0xc4,0xa2,0x79,0xe6,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpbexadd %eax, %ecx, 291(%r8,%rax,4) +# INTEL: cmpbexadd dword ptr [r8 + 4*rax + 291], ecx, eax +0xc4,0xc2,0x79,0xe6,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpbexadd %eax, %ecx, (%rip) +# INTEL: cmpbexadd dword ptr [rip], ecx, eax +0xc4,0xe2,0x79,0xe6,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpbexadd %eax, %ecx, -128(,%rbp,2) +# INTEL: cmpbexadd dword ptr [2*rbp - 128], ecx, eax +0xc4,0xe2,0x79,0xe6,0x0c,0x6d,0x80,0xff,0xff,0xff + +# ATT: cmpbexadd %eax, %ecx, 508(%rcx) +# INTEL: cmpbexadd dword ptr [rcx + 508], ecx, eax +0xc4,0xe2,0x79,0xe6,0x89,0xfc,0x01,0x00,0x00 + +# ATT: cmpbexadd %eax, %ecx, -512(%rdx) +# INTEL: cmpbexadd dword ptr [rdx - 512], ecx, eax +0xc4,0xe2,0x79,0xe6,0x8a,0x00,0xfe,0xff,0xff + +# ATT: cmpbexadd %r10, %r9, 268435456(%rbp,%r14,8) +# INTEL: cmpbexadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +0xc4,0x22,0xa9,0xe6,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpbexadd %r10, %r9, 291(%r8,%rax,4) +# INTEL: cmpbexadd qword ptr [r8 + 4*rax + 291], r9, r10 +0xc4,0x42,0xa9,0xe6,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpbexadd %r10, %r9, (%rip) +# INTEL: cmpbexadd qword ptr [rip], r9, r10 +0xc4,0x62,0xa9,0xe6,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpbexadd %r10, %r9, -256(,%rbp,2) +# INTEL: cmpbexadd qword ptr [2*rbp - 256], r9, r10 +0xc4,0x62,0xa9,0xe6,0x0c,0x6d,0x00,0xff,0xff,0xff + +# ATT: cmpbexadd %r10, %r9, 1016(%rcx) +# INTEL: cmpbexadd qword ptr [rcx + 1016], r9, r10 +0xc4,0x62,0xa9,0xe6,0x89,0xf8,0x03,0x00,0x00 + +# ATT: cmpbexadd %r10, %r9, -1024(%rdx) +# INTEL: cmpbexadd qword ptr [rdx - 1024], r9, r10 +0xc4,0x62,0xa9,0xe6,0x8a,0x00,0xfc,0xff,0xff + +# ATT: cmpbxadd %eax, %ecx, 268435456(%rbp,%r14,8) +# INTEL: cmpbxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +0xc4,0xa2,0x79,0xe2,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpbxadd %eax, %ecx, 291(%r8,%rax,4) +# INTEL: cmpbxadd dword ptr [r8 + 4*rax + 291], ecx, eax +0xc4,0xc2,0x79,0xe2,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpbxadd %eax, %ecx, (%rip) +# INTEL: cmpbxadd dword ptr [rip], ecx, eax +0xc4,0xe2,0x79,0xe2,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpbxadd %eax, %ecx, -128(,%rbp,2) +# INTEL: cmpbxadd dword ptr [2*rbp - 128], ecx, eax +0xc4,0xe2,0x79,0xe2,0x0c,0x6d,0x80,0xff,0xff,0xff + +# ATT: cmpbxadd %eax, %ecx, 508(%rcx) +# INTEL: cmpbxadd dword ptr [rcx + 508], ecx, eax +0xc4,0xe2,0x79,0xe2,0x89,0xfc,0x01,0x00,0x00 + +# ATT: cmpbxadd %eax, %ecx, -512(%rdx) +# INTEL: cmpbxadd dword ptr [rdx - 512], ecx, eax +0xc4,0xe2,0x79,0xe2,0x8a,0x00,0xfe,0xff,0xff + +# ATT: cmpbxadd %r10, %r9, 268435456(%rbp,%r14,8) +# INTEL: cmpbxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +0xc4,0x22,0xa9,0xe2,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpbxadd %r10, %r9, 291(%r8,%rax,4) +# INTEL: cmpbxadd qword ptr [r8 + 4*rax + 291], r9, r10 +0xc4,0x42,0xa9,0xe2,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpbxadd %r10, %r9, (%rip) +# INTEL: cmpbxadd qword ptr [rip], r9, r10 +0xc4,0x62,0xa9,0xe2,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpbxadd %r10, %r9, -256(,%rbp,2) +# INTEL: cmpbxadd qword ptr [2*rbp - 256], r9, r10 +0xc4,0x62,0xa9,0xe2,0x0c,0x6d,0x00,0xff,0xff,0xff + +# ATT: cmpbxadd %r10, %r9, 1016(%rcx) +# INTEL: cmpbxadd qword ptr [rcx + 1016], r9, r10 +0xc4,0x62,0xa9,0xe2,0x89,0xf8,0x03,0x00,0x00 + +# ATT: cmpbxadd %r10, %r9, -1024(%rdx) +# INTEL: cmpbxadd qword ptr [rdx - 1024], r9, r10 +0xc4,0x62,0xa9,0xe2,0x8a,0x00,0xfc,0xff,0xff + +# ATT: cmplexadd %eax, %ecx, 268435456(%rbp,%r14,8) +# INTEL: cmplexadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +0xc4,0xa2,0x79,0xee,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmplexadd %eax, %ecx, 291(%r8,%rax,4) +# INTEL: cmplexadd dword ptr [r8 + 4*rax + 291], ecx, eax +0xc4,0xc2,0x79,0xee,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmplexadd %eax, %ecx, (%rip) +# INTEL: cmplexadd dword ptr [rip], ecx, eax +0xc4,0xe2,0x79,0xee,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmplexadd %eax, %ecx, -128(,%rbp,2) +# INTEL: cmplexadd dword ptr [2*rbp - 128], ecx, eax +0xc4,0xe2,0x79,0xee,0x0c,0x6d,0x80,0xff,0xff,0xff + +# ATT: cmplexadd %eax, %ecx, 508(%rcx) +# INTEL: cmplexadd dword ptr [rcx + 508], ecx, eax +0xc4,0xe2,0x79,0xee,0x89,0xfc,0x01,0x00,0x00 + +# ATT: cmplexadd %eax, %ecx, -512(%rdx) +# INTEL: cmplexadd dword ptr [rdx - 512], ecx, eax +0xc4,0xe2,0x79,0xee,0x8a,0x00,0xfe,0xff,0xff + +# ATT: cmplexadd %r10, %r9, 268435456(%rbp,%r14,8) +# INTEL: cmplexadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +0xc4,0x22,0xa9,0xee,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmplexadd %r10, %r9, 291(%r8,%rax,4) +# INTEL: cmplexadd qword ptr [r8 + 4*rax + 291], r9, r10 +0xc4,0x42,0xa9,0xee,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmplexadd %r10, %r9, (%rip) +# INTEL: cmplexadd qword ptr [rip], r9, r10 +0xc4,0x62,0xa9,0xee,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmplexadd %r10, %r9, -256(,%rbp,2) +# INTEL: cmplexadd qword ptr [2*rbp - 256], r9, r10 +0xc4,0x62,0xa9,0xee,0x0c,0x6d,0x00,0xff,0xff,0xff + +# ATT: cmplexadd %r10, %r9, 1016(%rcx) +# INTEL: cmplexadd qword ptr [rcx + 1016], r9, r10 +0xc4,0x62,0xa9,0xee,0x89,0xf8,0x03,0x00,0x00 + +# ATT: cmplexadd %r10, %r9, -1024(%rdx) +# INTEL: cmplexadd qword ptr [rdx - 1024], r9, r10 +0xc4,0x62,0xa9,0xee,0x8a,0x00,0xfc,0xff,0xff + +# ATT: cmplxadd %eax, %ecx, 268435456(%rbp,%r14,8) +# INTEL: cmplxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +0xc4,0xa2,0x79,0xec,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmplxadd %eax, %ecx, 291(%r8,%rax,4) +# INTEL: cmplxadd dword ptr [r8 + 4*rax + 291], ecx, eax +0xc4,0xc2,0x79,0xec,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmplxadd %eax, %ecx, (%rip) +# INTEL: cmplxadd dword ptr [rip], ecx, eax +0xc4,0xe2,0x79,0xec,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmplxadd %eax, %ecx, -128(,%rbp,2) +# INTEL: cmplxadd dword ptr [2*rbp - 128], ecx, eax +0xc4,0xe2,0x79,0xec,0x0c,0x6d,0x80,0xff,0xff,0xff + +# ATT: cmplxadd %eax, %ecx, 508(%rcx) +# INTEL: cmplxadd dword ptr [rcx + 508], ecx, eax +0xc4,0xe2,0x79,0xec,0x89,0xfc,0x01,0x00,0x00 + +# ATT: cmplxadd %eax, %ecx, -512(%rdx) +# INTEL: cmplxadd dword ptr [rdx - 512], ecx, eax +0xc4,0xe2,0x79,0xec,0x8a,0x00,0xfe,0xff,0xff + +# ATT: cmplxadd %r10, %r9, 268435456(%rbp,%r14,8) +# INTEL: cmplxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +0xc4,0x22,0xa9,0xec,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmplxadd %r10, %r9, 291(%r8,%rax,4) +# INTEL: cmplxadd qword ptr [r8 + 4*rax + 291], r9, r10 +0xc4,0x42,0xa9,0xec,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmplxadd %r10, %r9, (%rip) +# INTEL: cmplxadd qword ptr [rip], r9, r10 +0xc4,0x62,0xa9,0xec,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmplxadd %r10, %r9, -256(,%rbp,2) +# INTEL: cmplxadd qword ptr [2*rbp - 256], r9, r10 +0xc4,0x62,0xa9,0xec,0x0c,0x6d,0x00,0xff,0xff,0xff + +# ATT: cmplxadd %r10, %r9, 1016(%rcx) +# INTEL: cmplxadd qword ptr [rcx + 1016], r9, r10 +0xc4,0x62,0xa9,0xec,0x89,0xf8,0x03,0x00,0x00 + +# ATT: cmplxadd %r10, %r9, -1024(%rdx) +# INTEL: cmplxadd qword ptr [rdx - 1024], r9, r10 +0xc4,0x62,0xa9,0xec,0x8a,0x00,0xfc,0xff,0xff + +# ATT: cmpaxadd %eax, %ecx, 268435456(%rbp,%r14,8) +# INTEL: cmpaxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +0xc4,0xa2,0x79,0xe7,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpaxadd %eax, %ecx, 291(%r8,%rax,4) +# INTEL: cmpaxadd dword ptr [r8 + 4*rax + 291], ecx, eax +0xc4,0xc2,0x79,0xe7,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpaxadd %eax, %ecx, (%rip) +# INTEL: cmpaxadd dword ptr [rip], ecx, eax +0xc4,0xe2,0x79,0xe7,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpaxadd %eax, %ecx, -128(,%rbp,2) +# INTEL: cmpaxadd dword ptr [2*rbp - 128], ecx, eax +0xc4,0xe2,0x79,0xe7,0x0c,0x6d,0x80,0xff,0xff,0xff + +# ATT: cmpaxadd %eax, %ecx, 508(%rcx) +# INTEL: cmpaxadd dword ptr [rcx + 508], ecx, eax +0xc4,0xe2,0x79,0xe7,0x89,0xfc,0x01,0x00,0x00 + +# ATT: cmpaxadd %eax, %ecx, -512(%rdx) +# INTEL: cmpaxadd dword ptr [rdx - 512], ecx, eax +0xc4,0xe2,0x79,0xe7,0x8a,0x00,0xfe,0xff,0xff + +# ATT: cmpaxadd %r10, %r9, 268435456(%rbp,%r14,8) +# INTEL: cmpaxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +0xc4,0x22,0xa9,0xe7,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpaxadd %r10, %r9, 291(%r8,%rax,4) +# INTEL: cmpaxadd qword ptr [r8 + 4*rax + 291], r9, r10 +0xc4,0x42,0xa9,0xe7,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpaxadd %r10, %r9, (%rip) +# INTEL: cmpaxadd qword ptr [rip], r9, r10 +0xc4,0x62,0xa9,0xe7,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpaxadd %r10, %r9, -256(,%rbp,2) +# INTEL: cmpaxadd qword ptr [2*rbp - 256], r9, r10 +0xc4,0x62,0xa9,0xe7,0x0c,0x6d,0x00,0xff,0xff,0xff + +# ATT: cmpaxadd %r10, %r9, 1016(%rcx) +# INTEL: cmpaxadd qword ptr [rcx + 1016], r9, r10 +0xc4,0x62,0xa9,0xe7,0x89,0xf8,0x03,0x00,0x00 + +# ATT: cmpaxadd %r10, %r9, -1024(%rdx) +# INTEL: cmpaxadd qword ptr [rdx - 1024], r9, r10 +0xc4,0x62,0xa9,0xe7,0x8a,0x00,0xfc,0xff,0xff + +# ATT: cmpaexadd %eax, %ecx, 268435456(%rbp,%r14,8) +# INTEL: cmpaexadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +0xc4,0xa2,0x79,0xe3,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpaexadd %eax, %ecx, 291(%r8,%rax,4) +# INTEL: cmpaexadd dword ptr [r8 + 4*rax + 291], ecx, eax +0xc4,0xc2,0x79,0xe3,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpaexadd %eax, %ecx, (%rip) +# INTEL: cmpaexadd dword ptr [rip], ecx, eax +0xc4,0xe2,0x79,0xe3,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpaexadd %eax, %ecx, -128(,%rbp,2) +# INTEL: cmpaexadd dword ptr [2*rbp - 128], ecx, eax +0xc4,0xe2,0x79,0xe3,0x0c,0x6d,0x80,0xff,0xff,0xff + +# ATT: cmpaexadd %eax, %ecx, 508(%rcx) +# INTEL: cmpaexadd dword ptr [rcx + 508], ecx, eax +0xc4,0xe2,0x79,0xe3,0x89,0xfc,0x01,0x00,0x00 + +# ATT: cmpaexadd %eax, %ecx, -512(%rdx) +# INTEL: cmpaexadd dword ptr [rdx - 512], ecx, eax +0xc4,0xe2,0x79,0xe3,0x8a,0x00,0xfe,0xff,0xff + +# ATT: cmpaexadd %r10, %r9, 268435456(%rbp,%r14,8) +# INTEL: cmpaexadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +0xc4,0x22,0xa9,0xe3,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpaexadd %r10, %r9, 291(%r8,%rax,4) +# INTEL: cmpaexadd qword ptr [r8 + 4*rax + 291], r9, r10 +0xc4,0x42,0xa9,0xe3,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpaexadd %r10, %r9, (%rip) +# INTEL: cmpaexadd qword ptr [rip], r9, r10 +0xc4,0x62,0xa9,0xe3,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpaexadd %r10, %r9, -256(,%rbp,2) +# INTEL: cmpaexadd qword ptr [2*rbp - 256], r9, r10 +0xc4,0x62,0xa9,0xe3,0x0c,0x6d,0x00,0xff,0xff,0xff + +# ATT: cmpaexadd %r10, %r9, 1016(%rcx) +# INTEL: cmpaexadd qword ptr [rcx + 1016], r9, r10 +0xc4,0x62,0xa9,0xe3,0x89,0xf8,0x03,0x00,0x00 + +# ATT: cmpaexadd %r10, %r9, -1024(%rdx) +# INTEL: cmpaexadd qword ptr [rdx - 1024], r9, r10 +0xc4,0x62,0xa9,0xe3,0x8a,0x00,0xfc,0xff,0xff + +# ATT: cmpgxadd %eax, %ecx, 268435456(%rbp,%r14,8) +# INTEL: cmpgxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +0xc4,0xa2,0x79,0xef,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpgxadd %eax, %ecx, 291(%r8,%rax,4) +# INTEL: cmpgxadd dword ptr [r8 + 4*rax + 291], ecx, eax +0xc4,0xc2,0x79,0xef,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpgxadd %eax, %ecx, (%rip) +# INTEL: cmpgxadd dword ptr [rip], ecx, eax +0xc4,0xe2,0x79,0xef,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpgxadd %eax, %ecx, -128(,%rbp,2) +# INTEL: cmpgxadd dword ptr [2*rbp - 128], ecx, eax +0xc4,0xe2,0x79,0xef,0x0c,0x6d,0x80,0xff,0xff,0xff + +# ATT: cmpgxadd %eax, %ecx, 508(%rcx) +# INTEL: cmpgxadd dword ptr [rcx + 508], ecx, eax +0xc4,0xe2,0x79,0xef,0x89,0xfc,0x01,0x00,0x00 + +# ATT: cmpgxadd %eax, %ecx, -512(%rdx) +# INTEL: cmpgxadd dword ptr [rdx - 512], ecx, eax +0xc4,0xe2,0x79,0xef,0x8a,0x00,0xfe,0xff,0xff + +# ATT: cmpgxadd %r10, %r9, 268435456(%rbp,%r14,8) +# INTEL: cmpgxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +0xc4,0x22,0xa9,0xef,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpgxadd %r10, %r9, 291(%r8,%rax,4) +# INTEL: cmpgxadd qword ptr [r8 + 4*rax + 291], r9, r10 +0xc4,0x42,0xa9,0xef,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpgxadd %r10, %r9, (%rip) +# INTEL: cmpgxadd qword ptr [rip], r9, r10 +0xc4,0x62,0xa9,0xef,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpgxadd %r10, %r9, -256(,%rbp,2) +# INTEL: cmpgxadd qword ptr [2*rbp - 256], r9, r10 +0xc4,0x62,0xa9,0xef,0x0c,0x6d,0x00,0xff,0xff,0xff + +# ATT: cmpgxadd %r10, %r9, 1016(%rcx) +# INTEL: cmpgxadd qword ptr [rcx + 1016], r9, r10 +0xc4,0x62,0xa9,0xef,0x89,0xf8,0x03,0x00,0x00 + +# ATT: cmpgxadd %r10, %r9, -1024(%rdx) +# INTEL: cmpgxadd qword ptr [rdx - 1024], r9, r10 +0xc4,0x62,0xa9,0xef,0x8a,0x00,0xfc,0xff,0xff + +# ATT: cmpgexadd %eax, %ecx, 268435456(%rbp,%r14,8) +# INTEL: cmpgexadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +0xc4,0xa2,0x79,0xed,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpgexadd %eax, %ecx, 291(%r8,%rax,4) +# INTEL: cmpgexadd dword ptr [r8 + 4*rax + 291], ecx, eax +0xc4,0xc2,0x79,0xed,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpgexadd %eax, %ecx, (%rip) +# INTEL: cmpgexadd dword ptr [rip], ecx, eax +0xc4,0xe2,0x79,0xed,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpgexadd %eax, %ecx, -128(,%rbp,2) +# INTEL: cmpgexadd dword ptr [2*rbp - 128], ecx, eax +0xc4,0xe2,0x79,0xed,0x0c,0x6d,0x80,0xff,0xff,0xff + +# ATT: cmpgexadd %eax, %ecx, 508(%rcx) +# INTEL: cmpgexadd dword ptr [rcx + 508], ecx, eax +0xc4,0xe2,0x79,0xed,0x89,0xfc,0x01,0x00,0x00 + +# ATT: cmpgexadd %eax, %ecx, -512(%rdx) +# INTEL: cmpgexadd dword ptr [rdx - 512], ecx, eax +0xc4,0xe2,0x79,0xed,0x8a,0x00,0xfe,0xff,0xff + +# ATT: cmpgexadd %r10, %r9, 268435456(%rbp,%r14,8) +# INTEL: cmpgexadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +0xc4,0x22,0xa9,0xed,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpgexadd %r10, %r9, 291(%r8,%rax,4) +# INTEL: cmpgexadd qword ptr [r8 + 4*rax + 291], r9, r10 +0xc4,0x42,0xa9,0xed,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpgexadd %r10, %r9, (%rip) +# INTEL: cmpgexadd qword ptr [rip], r9, r10 +0xc4,0x62,0xa9,0xed,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpgexadd %r10, %r9, -256(,%rbp,2) +# INTEL: cmpgexadd qword ptr [2*rbp - 256], r9, r10 +0xc4,0x62,0xa9,0xed,0x0c,0x6d,0x00,0xff,0xff,0xff + +# ATT: cmpgexadd %r10, %r9, 1016(%rcx) +# INTEL: cmpgexadd qword ptr [rcx + 1016], r9, r10 +0xc4,0x62,0xa9,0xed,0x89,0xf8,0x03,0x00,0x00 + +# ATT: cmpgexadd %r10, %r9, -1024(%rdx) +# INTEL: cmpgexadd qword ptr [rdx - 1024], r9, r10 +0xc4,0x62,0xa9,0xed,0x8a,0x00,0xfc,0xff,0xff + +# ATT: cmpnoxadd %eax, %ecx, 268435456(%rbp,%r14,8) +# INTEL: cmpnoxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +0xc4,0xa2,0x79,0xe1,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpnoxadd %eax, %ecx, 291(%r8,%rax,4) +# INTEL: cmpnoxadd dword ptr [r8 + 4*rax + 291], ecx, eax +0xc4,0xc2,0x79,0xe1,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpnoxadd %eax, %ecx, (%rip) +# INTEL: cmpnoxadd dword ptr [rip], ecx, eax +0xc4,0xe2,0x79,0xe1,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpnoxadd %eax, %ecx, -128(,%rbp,2) +# INTEL: cmpnoxadd dword ptr [2*rbp - 128], ecx, eax +0xc4,0xe2,0x79,0xe1,0x0c,0x6d,0x80,0xff,0xff,0xff + +# ATT: cmpnoxadd %eax, %ecx, 508(%rcx) +# INTEL: cmpnoxadd dword ptr [rcx + 508], ecx, eax +0xc4,0xe2,0x79,0xe1,0x89,0xfc,0x01,0x00,0x00 + +# ATT: cmpnoxadd %eax, %ecx, -512(%rdx) +# INTEL: cmpnoxadd dword ptr [rdx - 512], ecx, eax +0xc4,0xe2,0x79,0xe1,0x8a,0x00,0xfe,0xff,0xff + +# ATT: cmpnoxadd %r10, %r9, 268435456(%rbp,%r14,8) +# INTEL: cmpnoxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +0xc4,0x22,0xa9,0xe1,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpnoxadd %r10, %r9, 291(%r8,%rax,4) +# INTEL: cmpnoxadd qword ptr [r8 + 4*rax + 291], r9, r10 +0xc4,0x42,0xa9,0xe1,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpnoxadd %r10, %r9, (%rip) +# INTEL: cmpnoxadd qword ptr [rip], r9, r10 +0xc4,0x62,0xa9,0xe1,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpnoxadd %r10, %r9, -256(,%rbp,2) +# INTEL: cmpnoxadd qword ptr [2*rbp - 256], r9, r10 +0xc4,0x62,0xa9,0xe1,0x0c,0x6d,0x00,0xff,0xff,0xff + +# ATT: cmpnoxadd %r10, %r9, 1016(%rcx) +# INTEL: cmpnoxadd qword ptr [rcx + 1016], r9, r10 +0xc4,0x62,0xa9,0xe1,0x89,0xf8,0x03,0x00,0x00 + +# ATT: cmpnoxadd %r10, %r9, -1024(%rdx) +# INTEL: cmpnoxadd qword ptr [rdx - 1024], r9, r10 +0xc4,0x62,0xa9,0xe1,0x8a,0x00,0xfc,0xff,0xff + +# ATT: cmpnpxadd %eax, %ecx, 268435456(%rbp,%r14,8) +# INTEL: cmpnpxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +0xc4,0xa2,0x79,0xeb,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpnpxadd %eax, %ecx, 291(%r8,%rax,4) +# INTEL: cmpnpxadd dword ptr [r8 + 4*rax + 291], ecx, eax +0xc4,0xc2,0x79,0xeb,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpnpxadd %eax, %ecx, (%rip) +# INTEL: cmpnpxadd dword ptr [rip], ecx, eax +0xc4,0xe2,0x79,0xeb,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpnpxadd %eax, %ecx, -128(,%rbp,2) +# INTEL: cmpnpxadd dword ptr [2*rbp - 128], ecx, eax +0xc4,0xe2,0x79,0xeb,0x0c,0x6d,0x80,0xff,0xff,0xff + +# ATT: cmpnpxadd %eax, %ecx, 508(%rcx) +# INTEL: cmpnpxadd dword ptr [rcx + 508], ecx, eax +0xc4,0xe2,0x79,0xeb,0x89,0xfc,0x01,0x00,0x00 + +# ATT: cmpnpxadd %eax, %ecx, -512(%rdx) +# INTEL: cmpnpxadd dword ptr [rdx - 512], ecx, eax +0xc4,0xe2,0x79,0xeb,0x8a,0x00,0xfe,0xff,0xff + +# ATT: cmpnpxadd %r10, %r9, 268435456(%rbp,%r14,8) +# INTEL: cmpnpxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +0xc4,0x22,0xa9,0xeb,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpnpxadd %r10, %r9, 291(%r8,%rax,4) +# INTEL: cmpnpxadd qword ptr [r8 + 4*rax + 291], r9, r10 +0xc4,0x42,0xa9,0xeb,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpnpxadd %r10, %r9, (%rip) +# INTEL: cmpnpxadd qword ptr [rip], r9, r10 +0xc4,0x62,0xa9,0xeb,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpnpxadd %r10, %r9, -256(,%rbp,2) +# INTEL: cmpnpxadd qword ptr [2*rbp - 256], r9, r10 +0xc4,0x62,0xa9,0xeb,0x0c,0x6d,0x00,0xff,0xff,0xff + +# ATT: cmpnpxadd %r10, %r9, 1016(%rcx) +# INTEL: cmpnpxadd qword ptr [rcx + 1016], r9, r10 +0xc4,0x62,0xa9,0xeb,0x89,0xf8,0x03,0x00,0x00 + +# ATT: cmpnpxadd %r10, %r9, -1024(%rdx) +# INTEL: cmpnpxadd qword ptr [rdx - 1024], r9, r10 +0xc4,0x62,0xa9,0xeb,0x8a,0x00,0xfc,0xff,0xff + +# ATT: cmpnsxadd %eax, %ecx, 268435456(%rbp,%r14,8) +# INTEL: cmpnsxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +0xc4,0xa2,0x79,0xe9,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpnsxadd %eax, %ecx, 291(%r8,%rax,4) +# INTEL: cmpnsxadd dword ptr [r8 + 4*rax + 291], ecx, eax +0xc4,0xc2,0x79,0xe9,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpnsxadd %eax, %ecx, (%rip) +# INTEL: cmpnsxadd dword ptr [rip], ecx, eax +0xc4,0xe2,0x79,0xe9,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpnsxadd %eax, %ecx, -128(,%rbp,2) +# INTEL: cmpnsxadd dword ptr [2*rbp - 128], ecx, eax +0xc4,0xe2,0x79,0xe9,0x0c,0x6d,0x80,0xff,0xff,0xff + +# ATT: cmpnsxadd %eax, %ecx, 508(%rcx) +# INTEL: cmpnsxadd dword ptr [rcx + 508], ecx, eax +0xc4,0xe2,0x79,0xe9,0x89,0xfc,0x01,0x00,0x00 + +# ATT: cmpnsxadd %eax, %ecx, -512(%rdx) +# INTEL: cmpnsxadd dword ptr [rdx - 512], ecx, eax +0xc4,0xe2,0x79,0xe9,0x8a,0x00,0xfe,0xff,0xff + +# ATT: cmpnsxadd %r10, %r9, 268435456(%rbp,%r14,8) +# INTEL: cmpnsxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +0xc4,0x22,0xa9,0xe9,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpnsxadd %r10, %r9, 291(%r8,%rax,4) +# INTEL: cmpnsxadd qword ptr [r8 + 4*rax + 291], r9, r10 +0xc4,0x42,0xa9,0xe9,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpnsxadd %r10, %r9, (%rip) +# INTEL: cmpnsxadd qword ptr [rip], r9, r10 +0xc4,0x62,0xa9,0xe9,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpnsxadd %r10, %r9, -256(,%rbp,2) +# INTEL: cmpnsxadd qword ptr [2*rbp - 256], r9, r10 +0xc4,0x62,0xa9,0xe9,0x0c,0x6d,0x00,0xff,0xff,0xff + +# ATT: cmpnsxadd %r10, %r9, 1016(%rcx) +# INTEL: cmpnsxadd qword ptr [rcx + 1016], r9, r10 +0xc4,0x62,0xa9,0xe9,0x89,0xf8,0x03,0x00,0x00 + +# ATT: cmpnsxadd %r10, %r9, -1024(%rdx) +# INTEL: cmpnsxadd qword ptr [rdx - 1024], r9, r10 +0xc4,0x62,0xa9,0xe9,0x8a,0x00,0xfc,0xff,0xff + +# ATT: cmpnexadd %eax, %ecx, 268435456(%rbp,%r14,8) +# INTEL: cmpnexadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +0xc4,0xa2,0x79,0xe5,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpnexadd %eax, %ecx, 291(%r8,%rax,4) +# INTEL: cmpnexadd dword ptr [r8 + 4*rax + 291], ecx, eax +0xc4,0xc2,0x79,0xe5,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpnexadd %eax, %ecx, (%rip) +# INTEL: cmpnexadd dword ptr [rip], ecx, eax +0xc4,0xe2,0x79,0xe5,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpnexadd %eax, %ecx, -128(,%rbp,2) +# INTEL: cmpnexadd dword ptr [2*rbp - 128], ecx, eax +0xc4,0xe2,0x79,0xe5,0x0c,0x6d,0x80,0xff,0xff,0xff + +# ATT: cmpnexadd %eax, %ecx, 508(%rcx) +# INTEL: cmpnexadd dword ptr [rcx + 508], ecx, eax +0xc4,0xe2,0x79,0xe5,0x89,0xfc,0x01,0x00,0x00 + +# ATT: cmpnexadd %eax, %ecx, -512(%rdx) +# INTEL: cmpnexadd dword ptr [rdx - 512], ecx, eax +0xc4,0xe2,0x79,0xe5,0x8a,0x00,0xfe,0xff,0xff + +# ATT: cmpnexadd %r10, %r9, 268435456(%rbp,%r14,8) +# INTEL: cmpnexadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +0xc4,0x22,0xa9,0xe5,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpnexadd %r10, %r9, 291(%r8,%rax,4) +# INTEL: cmpnexadd qword ptr [r8 + 4*rax + 291], r9, r10 +0xc4,0x42,0xa9,0xe5,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpnexadd %r10, %r9, (%rip) +# INTEL: cmpnexadd qword ptr [rip], r9, r10 +0xc4,0x62,0xa9,0xe5,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpnexadd %r10, %r9, -256(,%rbp,2) +# INTEL: cmpnexadd qword ptr [2*rbp - 256], r9, r10 +0xc4,0x62,0xa9,0xe5,0x0c,0x6d,0x00,0xff,0xff,0xff + +# ATT: cmpnexadd %r10, %r9, 1016(%rcx) +# INTEL: cmpnexadd qword ptr [rcx + 1016], r9, r10 +0xc4,0x62,0xa9,0xe5,0x89,0xf8,0x03,0x00,0x00 + +# ATT: cmpnexadd %r10, %r9, -1024(%rdx) +# INTEL: cmpnexadd qword ptr [rdx - 1024], r9, r10 +0xc4,0x62,0xa9,0xe5,0x8a,0x00,0xfc,0xff,0xff + +# ATT: cmpoxadd %eax, %ecx, 268435456(%rbp,%r14,8) +# INTEL: cmpoxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +0xc4,0xa2,0x79,0xe0,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpoxadd %eax, %ecx, 291(%r8,%rax,4) +# INTEL: cmpoxadd dword ptr [r8 + 4*rax + 291], ecx, eax +0xc4,0xc2,0x79,0xe0,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpoxadd %eax, %ecx, (%rip) +# INTEL: cmpoxadd dword ptr [rip], ecx, eax +0xc4,0xe2,0x79,0xe0,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpoxadd %eax, %ecx, -128(,%rbp,2) +# INTEL: cmpoxadd dword ptr [2*rbp - 128], ecx, eax +0xc4,0xe2,0x79,0xe0,0x0c,0x6d,0x80,0xff,0xff,0xff + +# ATT: cmpoxadd %eax, %ecx, 508(%rcx) +# INTEL: cmpoxadd dword ptr [rcx + 508], ecx, eax +0xc4,0xe2,0x79,0xe0,0x89,0xfc,0x01,0x00,0x00 + +# ATT: cmpoxadd %eax, %ecx, -512(%rdx) +# INTEL: cmpoxadd dword ptr [rdx - 512], ecx, eax +0xc4,0xe2,0x79,0xe0,0x8a,0x00,0xfe,0xff,0xff + +# ATT: cmpoxadd %r10, %r9, 268435456(%rbp,%r14,8) +# INTEL: cmpoxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +0xc4,0x22,0xa9,0xe0,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpoxadd %r10, %r9, 291(%r8,%rax,4) +# INTEL: cmpoxadd qword ptr [r8 + 4*rax + 291], r9, r10 +0xc4,0x42,0xa9,0xe0,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpoxadd %r10, %r9, (%rip) +# INTEL: cmpoxadd qword ptr [rip], r9, r10 +0xc4,0x62,0xa9,0xe0,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpoxadd %r10, %r9, -256(,%rbp,2) +# INTEL: cmpoxadd qword ptr [2*rbp - 256], r9, r10 +0xc4,0x62,0xa9,0xe0,0x0c,0x6d,0x00,0xff,0xff,0xff + +# ATT: cmpoxadd %r10, %r9, 1016(%rcx) +# INTEL: cmpoxadd qword ptr [rcx + 1016], r9, r10 +0xc4,0x62,0xa9,0xe0,0x89,0xf8,0x03,0x00,0x00 + +# ATT: cmpoxadd %r10, %r9, -1024(%rdx) +# INTEL: cmpoxadd qword ptr [rdx - 1024], r9, r10 +0xc4,0x62,0xa9,0xe0,0x8a,0x00,0xfc,0xff,0xff + +# ATT: cmppxadd %eax, %ecx, 268435456(%rbp,%r14,8) +# INTEL: cmppxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +0xc4,0xa2,0x79,0xea,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmppxadd %eax, %ecx, 291(%r8,%rax,4) +# INTEL: cmppxadd dword ptr [r8 + 4*rax + 291], ecx, eax +0xc4,0xc2,0x79,0xea,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmppxadd %eax, %ecx, (%rip) +# INTEL: cmppxadd dword ptr [rip], ecx, eax +0xc4,0xe2,0x79,0xea,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmppxadd %eax, %ecx, -128(,%rbp,2) +# INTEL: cmppxadd dword ptr [2*rbp - 128], ecx, eax +0xc4,0xe2,0x79,0xea,0x0c,0x6d,0x80,0xff,0xff,0xff + +# ATT: cmppxadd %eax, %ecx, 508(%rcx) +# INTEL: cmppxadd dword ptr [rcx + 508], ecx, eax +0xc4,0xe2,0x79,0xea,0x89,0xfc,0x01,0x00,0x00 + +# ATT: cmppxadd %eax, %ecx, -512(%rdx) +# INTEL: cmppxadd dword ptr [rdx - 512], ecx, eax +0xc4,0xe2,0x79,0xea,0x8a,0x00,0xfe,0xff,0xff + +# ATT: cmppxadd %r10, %r9, 268435456(%rbp,%r14,8) +# INTEL: cmppxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +0xc4,0x22,0xa9,0xea,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmppxadd %r10, %r9, 291(%r8,%rax,4) +# INTEL: cmppxadd qword ptr [r8 + 4*rax + 291], r9, r10 +0xc4,0x42,0xa9,0xea,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmppxadd %r10, %r9, (%rip) +# INTEL: cmppxadd qword ptr [rip], r9, r10 +0xc4,0x62,0xa9,0xea,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmppxadd %r10, %r9, -256(,%rbp,2) +# INTEL: cmppxadd qword ptr [2*rbp - 256], r9, r10 +0xc4,0x62,0xa9,0xea,0x0c,0x6d,0x00,0xff,0xff,0xff + +# ATT: cmppxadd %r10, %r9, 1016(%rcx) +# INTEL: cmppxadd qword ptr [rcx + 1016], r9, r10 +0xc4,0x62,0xa9,0xea,0x89,0xf8,0x03,0x00,0x00 + +# ATT: cmppxadd %r10, %r9, -1024(%rdx) +# INTEL: cmppxadd qword ptr [rdx - 1024], r9, r10 +0xc4,0x62,0xa9,0xea,0x8a,0x00,0xfc,0xff,0xff + +# ATT: cmpsxadd %eax, %ecx, 268435456(%rbp,%r14,8) +# INTEL: cmpsxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +0xc4,0xa2,0x79,0xe8,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpsxadd %eax, %ecx, 291(%r8,%rax,4) +# INTEL: cmpsxadd dword ptr [r8 + 4*rax + 291], ecx, eax +0xc4,0xc2,0x79,0xe8,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpsxadd %eax, %ecx, (%rip) +# INTEL: cmpsxadd dword ptr [rip], ecx, eax +0xc4,0xe2,0x79,0xe8,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpsxadd %eax, %ecx, -128(,%rbp,2) +# INTEL: cmpsxadd dword ptr [2*rbp - 128], ecx, eax +0xc4,0xe2,0x79,0xe8,0x0c,0x6d,0x80,0xff,0xff,0xff + +# ATT: cmpsxadd %eax, %ecx, 508(%rcx) +# INTEL: cmpsxadd dword ptr [rcx + 508], ecx, eax +0xc4,0xe2,0x79,0xe8,0x89,0xfc,0x01,0x00,0x00 + +# ATT: cmpsxadd %eax, %ecx, -512(%rdx) +# INTEL: cmpsxadd dword ptr [rdx - 512], ecx, eax +0xc4,0xe2,0x79,0xe8,0x8a,0x00,0xfe,0xff,0xff + +# ATT: cmpsxadd %r10, %r9, 268435456(%rbp,%r14,8) +# INTEL: cmpsxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +0xc4,0x22,0xa9,0xe8,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpsxadd %r10, %r9, 291(%r8,%rax,4) +# INTEL: cmpsxadd qword ptr [r8 + 4*rax + 291], r9, r10 +0xc4,0x42,0xa9,0xe8,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpsxadd %r10, %r9, (%rip) +# INTEL: cmpsxadd qword ptr [rip], r9, r10 +0xc4,0x62,0xa9,0xe8,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpsxadd %r10, %r9, -256(,%rbp,2) +# INTEL: cmpsxadd qword ptr [2*rbp - 256], r9, r10 +0xc4,0x62,0xa9,0xe8,0x0c,0x6d,0x00,0xff,0xff,0xff + +# ATT: cmpsxadd %r10, %r9, 1016(%rcx) +# INTEL: cmpsxadd qword ptr [rcx + 1016], r9, r10 +0xc4,0x62,0xa9,0xe8,0x89,0xf8,0x03,0x00,0x00 + +# ATT: cmpsxadd %r10, %r9, -1024(%rdx) +# INTEL: cmpsxadd qword ptr [rdx - 1024], r9, r10 +0xc4,0x62,0xa9,0xe8,0x8a,0x00,0xfc,0xff,0xff + +# ATT: cmpexadd %eax, %ecx, 268435456(%rbp,%r14,8) +# INTEL: cmpexadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +0xc4,0xa2,0x79,0xe4,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpexadd %eax, %ecx, 291(%r8,%rax,4) +# INTEL: cmpexadd dword ptr [r8 + 4*rax + 291], ecx, eax +0xc4,0xc2,0x79,0xe4,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpexadd %eax, %ecx, (%rip) +# INTEL: cmpexadd dword ptr [rip], ecx, eax +0xc4,0xe2,0x79,0xe4,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpexadd %eax, %ecx, -128(,%rbp,2) +# INTEL: cmpexadd dword ptr [2*rbp - 128], ecx, eax +0xc4,0xe2,0x79,0xe4,0x0c,0x6d,0x80,0xff,0xff,0xff + +# ATT: cmpexadd %eax, %ecx, 508(%rcx) +# INTEL: cmpexadd dword ptr [rcx + 508], ecx, eax +0xc4,0xe2,0x79,0xe4,0x89,0xfc,0x01,0x00,0x00 + +# ATT: cmpexadd %eax, %ecx, -512(%rdx) +# INTEL: cmpexadd dword ptr [rdx - 512], ecx, eax +0xc4,0xe2,0x79,0xe4,0x8a,0x00,0xfe,0xff,0xff + +# ATT: cmpexadd %r10, %r9, 268435456(%rbp,%r14,8) +# INTEL: cmpexadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +0xc4,0x22,0xa9,0xe4,0x8c,0xf5,0x00,0x00,0x00,0x10 + +# ATT: cmpexadd %r10, %r9, 291(%r8,%rax,4) +# INTEL: cmpexadd qword ptr [r8 + 4*rax + 291], r9, r10 +0xc4,0x42,0xa9,0xe4,0x8c,0x80,0x23,0x01,0x00,0x00 + +# ATT: cmpexadd %r10, %r9, (%rip) +# INTEL: cmpexadd qword ptr [rip], r9, r10 +0xc4,0x62,0xa9,0xe4,0x0d,0x00,0x00,0x00,0x00 + +# ATT: cmpexadd %r10, %r9, -256(,%rbp,2) +# INTEL: cmpexadd qword ptr [2*rbp - 256], r9, r10 +0xc4,0x62,0xa9,0xe4,0x0c,0x6d,0x00,0xff,0xff,0xff + +# ATT: cmpexadd %r10, %r9, 1016(%rcx) +# INTEL: cmpexadd qword ptr [rcx + 1016], r9, r10 +0xc4,0x62,0xa9,0xe4,0x89,0xf8,0x03,0x00,0x00 + +# ATT: cmpexadd %r10, %r9, -1024(%rdx) +# INTEL: cmpexadd qword ptr [rdx - 1024], r9, r10 +0xc4,0x62,0xa9,0xe4,0x8a,0x00,0xfc,0xff,0xff + diff --git a/llvm/test/MC/X86/cmpccxadd-att-64.s b/llvm/test/MC/X86/cmpccxadd-att-64.s new file mode 100644 --- /dev/null +++ b/llvm/test/MC/X86/cmpccxadd-att-64.s @@ -0,0 +1,770 @@ +// RUN: llvm-mc -triple x86_64 --show-encoding %s | FileCheck %s + +// CHECK: cmpbexadd %eax, %ecx, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0xa2,0x79,0xe6,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpbexadd %eax, %ecx, 268435456(%rbp,%r14,8) + +// CHECK: cmpbexadd %eax, %ecx, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0xc2,0x79,0xe6,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpbexadd %eax, %ecx, 291(%r8,%rax,4) + +// CHECK: cmpbexadd %eax, %ecx, (%rip) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe6,0x0d,0x00,0x00,0x00,0x00] + cmpbexadd %eax, %ecx, (%rip) + +// CHECK: cmpbexadd %eax, %ecx, -128(,%rbp,2) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe6,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpbexadd %eax, %ecx, -128(,%rbp,2) + +// CHECK: cmpbexadd %eax, %ecx, 508(%rcx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe6,0x89,0xfc,0x01,0x00,0x00] + cmpbexadd %eax, %ecx, 508(%rcx) + +// CHECK: cmpbexadd %eax, %ecx, -512(%rdx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe6,0x8a,0x00,0xfe,0xff,0xff] + cmpbexadd %eax, %ecx, -512(%rdx) + +// CHECK: cmpbexadd %r10, %r9, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0x22,0xa9,0xe6,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpbexadd %r10, %r9, 268435456(%rbp,%r14,8) + +// CHECK: cmpbexadd %r10, %r9, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0x42,0xa9,0xe6,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpbexadd %r10, %r9, 291(%r8,%rax,4) + +// CHECK: cmpbexadd %r10, %r9, (%rip) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe6,0x0d,0x00,0x00,0x00,0x00] + cmpbexadd %r10, %r9, (%rip) + +// CHECK: cmpbexadd %r10, %r9, -256(,%rbp,2) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe6,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpbexadd %r10, %r9, -256(,%rbp,2) + +// CHECK: cmpbexadd %r10, %r9, 1016(%rcx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe6,0x89,0xf8,0x03,0x00,0x00] + cmpbexadd %r10, %r9, 1016(%rcx) + +// CHECK: cmpbexadd %r10, %r9, -1024(%rdx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe6,0x8a,0x00,0xfc,0xff,0xff] + cmpbexadd %r10, %r9, -1024(%rdx) + +// CHECK: cmpbxadd %eax, %ecx, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0xa2,0x79,0xe2,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpbxadd %eax, %ecx, 268435456(%rbp,%r14,8) + +// CHECK: cmpbxadd %eax, %ecx, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0xc2,0x79,0xe2,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpbxadd %eax, %ecx, 291(%r8,%rax,4) + +// CHECK: cmpbxadd %eax, %ecx, (%rip) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe2,0x0d,0x00,0x00,0x00,0x00] + cmpbxadd %eax, %ecx, (%rip) + +// CHECK: cmpbxadd %eax, %ecx, -128(,%rbp,2) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe2,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpbxadd %eax, %ecx, -128(,%rbp,2) + +// CHECK: cmpbxadd %eax, %ecx, 508(%rcx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe2,0x89,0xfc,0x01,0x00,0x00] + cmpbxadd %eax, %ecx, 508(%rcx) + +// CHECK: cmpbxadd %eax, %ecx, -512(%rdx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe2,0x8a,0x00,0xfe,0xff,0xff] + cmpbxadd %eax, %ecx, -512(%rdx) + +// CHECK: cmpbxadd %r10, %r9, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0x22,0xa9,0xe2,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpbxadd %r10, %r9, 268435456(%rbp,%r14,8) + +// CHECK: cmpbxadd %r10, %r9, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0x42,0xa9,0xe2,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpbxadd %r10, %r9, 291(%r8,%rax,4) + +// CHECK: cmpbxadd %r10, %r9, (%rip) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe2,0x0d,0x00,0x00,0x00,0x00] + cmpbxadd %r10, %r9, (%rip) + +// CHECK: cmpbxadd %r10, %r9, -256(,%rbp,2) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe2,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpbxadd %r10, %r9, -256(,%rbp,2) + +// CHECK: cmpbxadd %r10, %r9, 1016(%rcx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe2,0x89,0xf8,0x03,0x00,0x00] + cmpbxadd %r10, %r9, 1016(%rcx) + +// CHECK: cmpbxadd %r10, %r9, -1024(%rdx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe2,0x8a,0x00,0xfc,0xff,0xff] + cmpbxadd %r10, %r9, -1024(%rdx) + +// CHECK: cmplexadd %eax, %ecx, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0xa2,0x79,0xee,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmplexadd %eax, %ecx, 268435456(%rbp,%r14,8) + +// CHECK: cmplexadd %eax, %ecx, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0xc2,0x79,0xee,0x8c,0x80,0x23,0x01,0x00,0x00] + cmplexadd %eax, %ecx, 291(%r8,%rax,4) + +// CHECK: cmplexadd %eax, %ecx, (%rip) +// CHECK: encoding: [0xc4,0xe2,0x79,0xee,0x0d,0x00,0x00,0x00,0x00] + cmplexadd %eax, %ecx, (%rip) + +// CHECK: cmplexadd %eax, %ecx, -128(,%rbp,2) +// CHECK: encoding: [0xc4,0xe2,0x79,0xee,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmplexadd %eax, %ecx, -128(,%rbp,2) + +// CHECK: cmplexadd %eax, %ecx, 508(%rcx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xee,0x89,0xfc,0x01,0x00,0x00] + cmplexadd %eax, %ecx, 508(%rcx) + +// CHECK: cmplexadd %eax, %ecx, -512(%rdx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xee,0x8a,0x00,0xfe,0xff,0xff] + cmplexadd %eax, %ecx, -512(%rdx) + +// CHECK: cmplexadd %r10, %r9, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0x22,0xa9,0xee,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmplexadd %r10, %r9, 268435456(%rbp,%r14,8) + +// CHECK: cmplexadd %r10, %r9, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0x42,0xa9,0xee,0x8c,0x80,0x23,0x01,0x00,0x00] + cmplexadd %r10, %r9, 291(%r8,%rax,4) + +// CHECK: cmplexadd %r10, %r9, (%rip) +// CHECK: encoding: [0xc4,0x62,0xa9,0xee,0x0d,0x00,0x00,0x00,0x00] + cmplexadd %r10, %r9, (%rip) + +// CHECK: cmplexadd %r10, %r9, -256(,%rbp,2) +// CHECK: encoding: [0xc4,0x62,0xa9,0xee,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmplexadd %r10, %r9, -256(,%rbp,2) + +// CHECK: cmplexadd %r10, %r9, 1016(%rcx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xee,0x89,0xf8,0x03,0x00,0x00] + cmplexadd %r10, %r9, 1016(%rcx) + +// CHECK: cmplexadd %r10, %r9, -1024(%rdx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xee,0x8a,0x00,0xfc,0xff,0xff] + cmplexadd %r10, %r9, -1024(%rdx) + +// CHECK: cmplxadd %eax, %ecx, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0xa2,0x79,0xec,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmplxadd %eax, %ecx, 268435456(%rbp,%r14,8) + +// CHECK: cmplxadd %eax, %ecx, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0xc2,0x79,0xec,0x8c,0x80,0x23,0x01,0x00,0x00] + cmplxadd %eax, %ecx, 291(%r8,%rax,4) + +// CHECK: cmplxadd %eax, %ecx, (%rip) +// CHECK: encoding: [0xc4,0xe2,0x79,0xec,0x0d,0x00,0x00,0x00,0x00] + cmplxadd %eax, %ecx, (%rip) + +// CHECK: cmplxadd %eax, %ecx, -128(,%rbp,2) +// CHECK: encoding: [0xc4,0xe2,0x79,0xec,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmplxadd %eax, %ecx, -128(,%rbp,2) + +// CHECK: cmplxadd %eax, %ecx, 508(%rcx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xec,0x89,0xfc,0x01,0x00,0x00] + cmplxadd %eax, %ecx, 508(%rcx) + +// CHECK: cmplxadd %eax, %ecx, -512(%rdx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xec,0x8a,0x00,0xfe,0xff,0xff] + cmplxadd %eax, %ecx, -512(%rdx) + +// CHECK: cmplxadd %r10, %r9, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0x22,0xa9,0xec,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmplxadd %r10, %r9, 268435456(%rbp,%r14,8) + +// CHECK: cmplxadd %r10, %r9, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0x42,0xa9,0xec,0x8c,0x80,0x23,0x01,0x00,0x00] + cmplxadd %r10, %r9, 291(%r8,%rax,4) + +// CHECK: cmplxadd %r10, %r9, (%rip) +// CHECK: encoding: [0xc4,0x62,0xa9,0xec,0x0d,0x00,0x00,0x00,0x00] + cmplxadd %r10, %r9, (%rip) + +// CHECK: cmplxadd %r10, %r9, -256(,%rbp,2) +// CHECK: encoding: [0xc4,0x62,0xa9,0xec,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmplxadd %r10, %r9, -256(,%rbp,2) + +// CHECK: cmplxadd %r10, %r9, 1016(%rcx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xec,0x89,0xf8,0x03,0x00,0x00] + cmplxadd %r10, %r9, 1016(%rcx) + +// CHECK: cmplxadd %r10, %r9, -1024(%rdx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xec,0x8a,0x00,0xfc,0xff,0xff] + cmplxadd %r10, %r9, -1024(%rdx) + +// CHECK: cmpaxadd %eax, %ecx, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0xa2,0x79,0xe7,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnbexadd %eax, %ecx, 268435456(%rbp,%r14,8) + +// CHECK: cmpaxadd %eax, %ecx, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0xc2,0x79,0xe7,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnbexadd %eax, %ecx, 291(%r8,%rax,4) + +// CHECK: cmpaxadd %eax, %ecx, (%rip) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe7,0x0d,0x00,0x00,0x00,0x00] + cmpnbexadd %eax, %ecx, (%rip) + +// CHECK: cmpaxadd %eax, %ecx, -128(,%rbp,2) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe7,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpnbexadd %eax, %ecx, -128(,%rbp,2) + +// CHECK: cmpaxadd %eax, %ecx, 508(%rcx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe7,0x89,0xfc,0x01,0x00,0x00] + cmpnbexadd %eax, %ecx, 508(%rcx) + +// CHECK: cmpaxadd %eax, %ecx, -512(%rdx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe7,0x8a,0x00,0xfe,0xff,0xff] + cmpnbexadd %eax, %ecx, -512(%rdx) + +// CHECK: cmpaxadd %r10, %r9, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0x22,0xa9,0xe7,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnbexadd %r10, %r9, 268435456(%rbp,%r14,8) + +// CHECK: cmpaxadd %r10, %r9, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0x42,0xa9,0xe7,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnbexadd %r10, %r9, 291(%r8,%rax,4) + +// CHECK: cmpaxadd %r10, %r9, (%rip) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe7,0x0d,0x00,0x00,0x00,0x00] + cmpnbexadd %r10, %r9, (%rip) + +// CHECK: cmpaxadd %r10, %r9, -256(,%rbp,2) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe7,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpnbexadd %r10, %r9, -256(,%rbp,2) + +// CHECK: cmpaxadd %r10, %r9, 1016(%rcx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe7,0x89,0xf8,0x03,0x00,0x00] + cmpnbexadd %r10, %r9, 1016(%rcx) + +// CHECK: cmpaxadd %r10, %r9, -1024(%rdx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe7,0x8a,0x00,0xfc,0xff,0xff] + cmpnbexadd %r10, %r9, -1024(%rdx) + +// CHECK: cmpaexadd %eax, %ecx, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0xa2,0x79,0xe3,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnbxadd %eax, %ecx, 268435456(%rbp,%r14,8) + +// CHECK: cmpaexadd %eax, %ecx, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0xc2,0x79,0xe3,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnbxadd %eax, %ecx, 291(%r8,%rax,4) + +// CHECK: cmpaexadd %eax, %ecx, (%rip) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe3,0x0d,0x00,0x00,0x00,0x00] + cmpnbxadd %eax, %ecx, (%rip) + +// CHECK: cmpaexadd %eax, %ecx, -128(,%rbp,2) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe3,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpnbxadd %eax, %ecx, -128(,%rbp,2) + +// CHECK: cmpaexadd %eax, %ecx, 508(%rcx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe3,0x89,0xfc,0x01,0x00,0x00] + cmpnbxadd %eax, %ecx, 508(%rcx) + +// CHECK: cmpaexadd %eax, %ecx, -512(%rdx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe3,0x8a,0x00,0xfe,0xff,0xff] + cmpnbxadd %eax, %ecx, -512(%rdx) + +// CHECK: cmpaexadd %r10, %r9, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0x22,0xa9,0xe3,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnbxadd %r10, %r9, 268435456(%rbp,%r14,8) + +// CHECK: cmpaexadd %r10, %r9, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0x42,0xa9,0xe3,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnbxadd %r10, %r9, 291(%r8,%rax,4) + +// CHECK: cmpaexadd %r10, %r9, (%rip) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe3,0x0d,0x00,0x00,0x00,0x00] + cmpnbxadd %r10, %r9, (%rip) + +// CHECK: cmpaexadd %r10, %r9, -256(,%rbp,2) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe3,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpnbxadd %r10, %r9, -256(,%rbp,2) + +// CHECK: cmpaexadd %r10, %r9, 1016(%rcx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe3,0x89,0xf8,0x03,0x00,0x00] + cmpnbxadd %r10, %r9, 1016(%rcx) + +// CHECK: cmpaexadd %r10, %r9, -1024(%rdx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe3,0x8a,0x00,0xfc,0xff,0xff] + cmpnbxadd %r10, %r9, -1024(%rdx) + +// CHECK: cmpgxadd %eax, %ecx, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0xa2,0x79,0xef,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnlexadd %eax, %ecx, 268435456(%rbp,%r14,8) + +// CHECK: cmpgxadd %eax, %ecx, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0xc2,0x79,0xef,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnlexadd %eax, %ecx, 291(%r8,%rax,4) + +// CHECK: cmpgxadd %eax, %ecx, (%rip) +// CHECK: encoding: [0xc4,0xe2,0x79,0xef,0x0d,0x00,0x00,0x00,0x00] + cmpnlexadd %eax, %ecx, (%rip) + +// CHECK: cmpgxadd %eax, %ecx, -128(,%rbp,2) +// CHECK: encoding: [0xc4,0xe2,0x79,0xef,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpnlexadd %eax, %ecx, -128(,%rbp,2) + +// CHECK: cmpgxadd %eax, %ecx, 508(%rcx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xef,0x89,0xfc,0x01,0x00,0x00] + cmpnlexadd %eax, %ecx, 508(%rcx) + +// CHECK: cmpgxadd %eax, %ecx, -512(%rdx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xef,0x8a,0x00,0xfe,0xff,0xff] + cmpnlexadd %eax, %ecx, -512(%rdx) + +// CHECK: cmpgxadd %r10, %r9, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0x22,0xa9,0xef,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnlexadd %r10, %r9, 268435456(%rbp,%r14,8) + +// CHECK: cmpgxadd %r10, %r9, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0x42,0xa9,0xef,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnlexadd %r10, %r9, 291(%r8,%rax,4) + +// CHECK: cmpgxadd %r10, %r9, (%rip) +// CHECK: encoding: [0xc4,0x62,0xa9,0xef,0x0d,0x00,0x00,0x00,0x00] + cmpnlexadd %r10, %r9, (%rip) + +// CHECK: cmpgxadd %r10, %r9, -256(,%rbp,2) +// CHECK: encoding: [0xc4,0x62,0xa9,0xef,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpnlexadd %r10, %r9, -256(,%rbp,2) + +// CHECK: cmpgxadd %r10, %r9, 1016(%rcx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xef,0x89,0xf8,0x03,0x00,0x00] + cmpnlexadd %r10, %r9, 1016(%rcx) + +// CHECK: cmpgxadd %r10, %r9, -1024(%rdx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xef,0x8a,0x00,0xfc,0xff,0xff] + cmpnlexadd %r10, %r9, -1024(%rdx) + +// CHECK: cmpgexadd %eax, %ecx, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0xa2,0x79,0xed,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnlxadd %eax, %ecx, 268435456(%rbp,%r14,8) + +// CHECK: cmpgexadd %eax, %ecx, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0xc2,0x79,0xed,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnlxadd %eax, %ecx, 291(%r8,%rax,4) + +// CHECK: cmpgexadd %eax, %ecx, (%rip) +// CHECK: encoding: [0xc4,0xe2,0x79,0xed,0x0d,0x00,0x00,0x00,0x00] + cmpnlxadd %eax, %ecx, (%rip) + +// CHECK: cmpgexadd %eax, %ecx, -128(,%rbp,2) +// CHECK: encoding: [0xc4,0xe2,0x79,0xed,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpnlxadd %eax, %ecx, -128(,%rbp,2) + +// CHECK: cmpgexadd %eax, %ecx, 508(%rcx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xed,0x89,0xfc,0x01,0x00,0x00] + cmpnlxadd %eax, %ecx, 508(%rcx) + +// CHECK: cmpgexadd %eax, %ecx, -512(%rdx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xed,0x8a,0x00,0xfe,0xff,0xff] + cmpnlxadd %eax, %ecx, -512(%rdx) + +// CHECK: cmpgexadd %r10, %r9, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0x22,0xa9,0xed,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnlxadd %r10, %r9, 268435456(%rbp,%r14,8) + +// CHECK: cmpgexadd %r10, %r9, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0x42,0xa9,0xed,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnlxadd %r10, %r9, 291(%r8,%rax,4) + +// CHECK: cmpgexadd %r10, %r9, (%rip) +// CHECK: encoding: [0xc4,0x62,0xa9,0xed,0x0d,0x00,0x00,0x00,0x00] + cmpnlxadd %r10, %r9, (%rip) + +// CHECK: cmpgexadd %r10, %r9, -256(,%rbp,2) +// CHECK: encoding: [0xc4,0x62,0xa9,0xed,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpnlxadd %r10, %r9, -256(,%rbp,2) + +// CHECK: cmpgexadd %r10, %r9, 1016(%rcx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xed,0x89,0xf8,0x03,0x00,0x00] + cmpnlxadd %r10, %r9, 1016(%rcx) + +// CHECK: cmpgexadd %r10, %r9, -1024(%rdx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xed,0x8a,0x00,0xfc,0xff,0xff] + cmpnlxadd %r10, %r9, -1024(%rdx) + +// CHECK: cmpnoxadd %eax, %ecx, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0xa2,0x79,0xe1,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnoxadd %eax, %ecx, 268435456(%rbp,%r14,8) + +// CHECK: cmpnoxadd %eax, %ecx, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0xc2,0x79,0xe1,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnoxadd %eax, %ecx, 291(%r8,%rax,4) + +// CHECK: cmpnoxadd %eax, %ecx, (%rip) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe1,0x0d,0x00,0x00,0x00,0x00] + cmpnoxadd %eax, %ecx, (%rip) + +// CHECK: cmpnoxadd %eax, %ecx, -128(,%rbp,2) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe1,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpnoxadd %eax, %ecx, -128(,%rbp,2) + +// CHECK: cmpnoxadd %eax, %ecx, 508(%rcx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe1,0x89,0xfc,0x01,0x00,0x00] + cmpnoxadd %eax, %ecx, 508(%rcx) + +// CHECK: cmpnoxadd %eax, %ecx, -512(%rdx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe1,0x8a,0x00,0xfe,0xff,0xff] + cmpnoxadd %eax, %ecx, -512(%rdx) + +// CHECK: cmpnoxadd %r10, %r9, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0x22,0xa9,0xe1,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnoxadd %r10, %r9, 268435456(%rbp,%r14,8) + +// CHECK: cmpnoxadd %r10, %r9, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0x42,0xa9,0xe1,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnoxadd %r10, %r9, 291(%r8,%rax,4) + +// CHECK: cmpnoxadd %r10, %r9, (%rip) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe1,0x0d,0x00,0x00,0x00,0x00] + cmpnoxadd %r10, %r9, (%rip) + +// CHECK: cmpnoxadd %r10, %r9, -256(,%rbp,2) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe1,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpnoxadd %r10, %r9, -256(,%rbp,2) + +// CHECK: cmpnoxadd %r10, %r9, 1016(%rcx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe1,0x89,0xf8,0x03,0x00,0x00] + cmpnoxadd %r10, %r9, 1016(%rcx) + +// CHECK: cmpnoxadd %r10, %r9, -1024(%rdx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe1,0x8a,0x00,0xfc,0xff,0xff] + cmpnoxadd %r10, %r9, -1024(%rdx) + +// CHECK: cmpnpxadd %eax, %ecx, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0xa2,0x79,0xeb,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnpxadd %eax, %ecx, 268435456(%rbp,%r14,8) + +// CHECK: cmpnpxadd %eax, %ecx, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0xc2,0x79,0xeb,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnpxadd %eax, %ecx, 291(%r8,%rax,4) + +// CHECK: cmpnpxadd %eax, %ecx, (%rip) +// CHECK: encoding: [0xc4,0xe2,0x79,0xeb,0x0d,0x00,0x00,0x00,0x00] + cmpnpxadd %eax, %ecx, (%rip) + +// CHECK: cmpnpxadd %eax, %ecx, -128(,%rbp,2) +// CHECK: encoding: [0xc4,0xe2,0x79,0xeb,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpnpxadd %eax, %ecx, -128(,%rbp,2) + +// CHECK: cmpnpxadd %eax, %ecx, 508(%rcx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xeb,0x89,0xfc,0x01,0x00,0x00] + cmpnpxadd %eax, %ecx, 508(%rcx) + +// CHECK: cmpnpxadd %eax, %ecx, -512(%rdx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xeb,0x8a,0x00,0xfe,0xff,0xff] + cmpnpxadd %eax, %ecx, -512(%rdx) + +// CHECK: cmpnpxadd %r10, %r9, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0x22,0xa9,0xeb,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnpxadd %r10, %r9, 268435456(%rbp,%r14,8) + +// CHECK: cmpnpxadd %r10, %r9, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0x42,0xa9,0xeb,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnpxadd %r10, %r9, 291(%r8,%rax,4) + +// CHECK: cmpnpxadd %r10, %r9, (%rip) +// CHECK: encoding: [0xc4,0x62,0xa9,0xeb,0x0d,0x00,0x00,0x00,0x00] + cmpnpxadd %r10, %r9, (%rip) + +// CHECK: cmpnpxadd %r10, %r9, -256(,%rbp,2) +// CHECK: encoding: [0xc4,0x62,0xa9,0xeb,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpnpxadd %r10, %r9, -256(,%rbp,2) + +// CHECK: cmpnpxadd %r10, %r9, 1016(%rcx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xeb,0x89,0xf8,0x03,0x00,0x00] + cmpnpxadd %r10, %r9, 1016(%rcx) + +// CHECK: cmpnpxadd %r10, %r9, -1024(%rdx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xeb,0x8a,0x00,0xfc,0xff,0xff] + cmpnpxadd %r10, %r9, -1024(%rdx) + +// CHECK: cmpnsxadd %eax, %ecx, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0xa2,0x79,0xe9,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnsxadd %eax, %ecx, 268435456(%rbp,%r14,8) + +// CHECK: cmpnsxadd %eax, %ecx, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0xc2,0x79,0xe9,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnsxadd %eax, %ecx, 291(%r8,%rax,4) + +// CHECK: cmpnsxadd %eax, %ecx, (%rip) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe9,0x0d,0x00,0x00,0x00,0x00] + cmpnsxadd %eax, %ecx, (%rip) + +// CHECK: cmpnsxadd %eax, %ecx, -128(,%rbp,2) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe9,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpnsxadd %eax, %ecx, -128(,%rbp,2) + +// CHECK: cmpnsxadd %eax, %ecx, 508(%rcx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe9,0x89,0xfc,0x01,0x00,0x00] + cmpnsxadd %eax, %ecx, 508(%rcx) + +// CHECK: cmpnsxadd %eax, %ecx, -512(%rdx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe9,0x8a,0x00,0xfe,0xff,0xff] + cmpnsxadd %eax, %ecx, -512(%rdx) + +// CHECK: cmpnsxadd %r10, %r9, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0x22,0xa9,0xe9,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnsxadd %r10, %r9, 268435456(%rbp,%r14,8) + +// CHECK: cmpnsxadd %r10, %r9, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0x42,0xa9,0xe9,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnsxadd %r10, %r9, 291(%r8,%rax,4) + +// CHECK: cmpnsxadd %r10, %r9, (%rip) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe9,0x0d,0x00,0x00,0x00,0x00] + cmpnsxadd %r10, %r9, (%rip) + +// CHECK: cmpnsxadd %r10, %r9, -256(,%rbp,2) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe9,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpnsxadd %r10, %r9, -256(,%rbp,2) + +// CHECK: cmpnsxadd %r10, %r9, 1016(%rcx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe9,0x89,0xf8,0x03,0x00,0x00] + cmpnsxadd %r10, %r9, 1016(%rcx) + +// CHECK: cmpnsxadd %r10, %r9, -1024(%rdx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe9,0x8a,0x00,0xfc,0xff,0xff] + cmpnsxadd %r10, %r9, -1024(%rdx) + +// CHECK: cmpnexadd %eax, %ecx, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0xa2,0x79,0xe5,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnzxadd %eax, %ecx, 268435456(%rbp,%r14,8) + +// CHECK: cmpnexadd %eax, %ecx, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0xc2,0x79,0xe5,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnzxadd %eax, %ecx, 291(%r8,%rax,4) + +// CHECK: cmpnexadd %eax, %ecx, (%rip) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe5,0x0d,0x00,0x00,0x00,0x00] + cmpnzxadd %eax, %ecx, (%rip) + +// CHECK: cmpnexadd %eax, %ecx, -128(,%rbp,2) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe5,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpnzxadd %eax, %ecx, -128(,%rbp,2) + +// CHECK: cmpnexadd %eax, %ecx, 508(%rcx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe5,0x89,0xfc,0x01,0x00,0x00] + cmpnzxadd %eax, %ecx, 508(%rcx) + +// CHECK: cmpnexadd %eax, %ecx, -512(%rdx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe5,0x8a,0x00,0xfe,0xff,0xff] + cmpnzxadd %eax, %ecx, -512(%rdx) + +// CHECK: cmpnexadd %r10, %r9, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0x22,0xa9,0xe5,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnzxadd %r10, %r9, 268435456(%rbp,%r14,8) + +// CHECK: cmpnexadd %r10, %r9, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0x42,0xa9,0xe5,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnzxadd %r10, %r9, 291(%r8,%rax,4) + +// CHECK: cmpnexadd %r10, %r9, (%rip) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe5,0x0d,0x00,0x00,0x00,0x00] + cmpnzxadd %r10, %r9, (%rip) + +// CHECK: cmpnexadd %r10, %r9, -256(,%rbp,2) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe5,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpnzxadd %r10, %r9, -256(,%rbp,2) + +// CHECK: cmpnexadd %r10, %r9, 1016(%rcx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe5,0x89,0xf8,0x03,0x00,0x00] + cmpnzxadd %r10, %r9, 1016(%rcx) + +// CHECK: cmpnexadd %r10, %r9, -1024(%rdx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe5,0x8a,0x00,0xfc,0xff,0xff] + cmpnzxadd %r10, %r9, -1024(%rdx) + +// CHECK: cmpoxadd %eax, %ecx, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0xa2,0x79,0xe0,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpoxadd %eax, %ecx, 268435456(%rbp,%r14,8) + +// CHECK: cmpoxadd %eax, %ecx, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0xc2,0x79,0xe0,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpoxadd %eax, %ecx, 291(%r8,%rax,4) + +// CHECK: cmpoxadd %eax, %ecx, (%rip) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe0,0x0d,0x00,0x00,0x00,0x00] + cmpoxadd %eax, %ecx, (%rip) + +// CHECK: cmpoxadd %eax, %ecx, -128(,%rbp,2) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe0,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpoxadd %eax, %ecx, -128(,%rbp,2) + +// CHECK: cmpoxadd %eax, %ecx, 508(%rcx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe0,0x89,0xfc,0x01,0x00,0x00] + cmpoxadd %eax, %ecx, 508(%rcx) + +// CHECK: cmpoxadd %eax, %ecx, -512(%rdx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe0,0x8a,0x00,0xfe,0xff,0xff] + cmpoxadd %eax, %ecx, -512(%rdx) + +// CHECK: cmpoxadd %r10, %r9, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0x22,0xa9,0xe0,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpoxadd %r10, %r9, 268435456(%rbp,%r14,8) + +// CHECK: cmpoxadd %r10, %r9, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0x42,0xa9,0xe0,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpoxadd %r10, %r9, 291(%r8,%rax,4) + +// CHECK: cmpoxadd %r10, %r9, (%rip) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe0,0x0d,0x00,0x00,0x00,0x00] + cmpoxadd %r10, %r9, (%rip) + +// CHECK: cmpoxadd %r10, %r9, -256(,%rbp,2) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe0,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpoxadd %r10, %r9, -256(,%rbp,2) + +// CHECK: cmpoxadd %r10, %r9, 1016(%rcx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe0,0x89,0xf8,0x03,0x00,0x00] + cmpoxadd %r10, %r9, 1016(%rcx) + +// CHECK: cmpoxadd %r10, %r9, -1024(%rdx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe0,0x8a,0x00,0xfc,0xff,0xff] + cmpoxadd %r10, %r9, -1024(%rdx) + +// CHECK: cmppxadd %eax, %ecx, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0xa2,0x79,0xea,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmppxadd %eax, %ecx, 268435456(%rbp,%r14,8) + +// CHECK: cmppxadd %eax, %ecx, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0xc2,0x79,0xea,0x8c,0x80,0x23,0x01,0x00,0x00] + cmppxadd %eax, %ecx, 291(%r8,%rax,4) + +// CHECK: cmppxadd %eax, %ecx, (%rip) +// CHECK: encoding: [0xc4,0xe2,0x79,0xea,0x0d,0x00,0x00,0x00,0x00] + cmppxadd %eax, %ecx, (%rip) + +// CHECK: cmppxadd %eax, %ecx, -128(,%rbp,2) +// CHECK: encoding: [0xc4,0xe2,0x79,0xea,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmppxadd %eax, %ecx, -128(,%rbp,2) + +// CHECK: cmppxadd %eax, %ecx, 508(%rcx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xea,0x89,0xfc,0x01,0x00,0x00] + cmppxadd %eax, %ecx, 508(%rcx) + +// CHECK: cmppxadd %eax, %ecx, -512(%rdx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xea,0x8a,0x00,0xfe,0xff,0xff] + cmppxadd %eax, %ecx, -512(%rdx) + +// CHECK: cmppxadd %r10, %r9, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0x22,0xa9,0xea,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmppxadd %r10, %r9, 268435456(%rbp,%r14,8) + +// CHECK: cmppxadd %r10, %r9, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0x42,0xa9,0xea,0x8c,0x80,0x23,0x01,0x00,0x00] + cmppxadd %r10, %r9, 291(%r8,%rax,4) + +// CHECK: cmppxadd %r10, %r9, (%rip) +// CHECK: encoding: [0xc4,0x62,0xa9,0xea,0x0d,0x00,0x00,0x00,0x00] + cmppxadd %r10, %r9, (%rip) + +// CHECK: cmppxadd %r10, %r9, -256(,%rbp,2) +// CHECK: encoding: [0xc4,0x62,0xa9,0xea,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmppxadd %r10, %r9, -256(,%rbp,2) + +// CHECK: cmppxadd %r10, %r9, 1016(%rcx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xea,0x89,0xf8,0x03,0x00,0x00] + cmppxadd %r10, %r9, 1016(%rcx) + +// CHECK: cmppxadd %r10, %r9, -1024(%rdx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xea,0x8a,0x00,0xfc,0xff,0xff] + cmppxadd %r10, %r9, -1024(%rdx) + +// CHECK: cmpsxadd %eax, %ecx, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0xa2,0x79,0xe8,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpsxadd %eax, %ecx, 268435456(%rbp,%r14,8) + +// CHECK: cmpsxadd %eax, %ecx, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0xc2,0x79,0xe8,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpsxadd %eax, %ecx, 291(%r8,%rax,4) + +// CHECK: cmpsxadd %eax, %ecx, (%rip) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe8,0x0d,0x00,0x00,0x00,0x00] + cmpsxadd %eax, %ecx, (%rip) + +// CHECK: cmpsxadd %eax, %ecx, -128(,%rbp,2) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe8,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpsxadd %eax, %ecx, -128(,%rbp,2) + +// CHECK: cmpsxadd %eax, %ecx, 508(%rcx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe8,0x89,0xfc,0x01,0x00,0x00] + cmpsxadd %eax, %ecx, 508(%rcx) + +// CHECK: cmpsxadd %eax, %ecx, -512(%rdx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe8,0x8a,0x00,0xfe,0xff,0xff] + cmpsxadd %eax, %ecx, -512(%rdx) + +// CHECK: cmpsxadd %r10, %r9, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0x22,0xa9,0xe8,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpsxadd %r10, %r9, 268435456(%rbp,%r14,8) + +// CHECK: cmpsxadd %r10, %r9, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0x42,0xa9,0xe8,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpsxadd %r10, %r9, 291(%r8,%rax,4) + +// CHECK: cmpsxadd %r10, %r9, (%rip) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe8,0x0d,0x00,0x00,0x00,0x00] + cmpsxadd %r10, %r9, (%rip) + +// CHECK: cmpsxadd %r10, %r9, -256(,%rbp,2) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe8,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpsxadd %r10, %r9, -256(,%rbp,2) + +// CHECK: cmpsxadd %r10, %r9, 1016(%rcx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe8,0x89,0xf8,0x03,0x00,0x00] + cmpsxadd %r10, %r9, 1016(%rcx) + +// CHECK: cmpsxadd %r10, %r9, -1024(%rdx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe8,0x8a,0x00,0xfc,0xff,0xff] + cmpsxadd %r10, %r9, -1024(%rdx) + +// CHECK: cmpexadd %eax, %ecx, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0xa2,0x79,0xe4,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpzxadd %eax, %ecx, 268435456(%rbp,%r14,8) + +// CHECK: cmpexadd %eax, %ecx, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0xc2,0x79,0xe4,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpzxadd %eax, %ecx, 291(%r8,%rax,4) + +// CHECK: cmpexadd %eax, %ecx, (%rip) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe4,0x0d,0x00,0x00,0x00,0x00] + cmpzxadd %eax, %ecx, (%rip) + +// CHECK: cmpexadd %eax, %ecx, -128(,%rbp,2) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe4,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpzxadd %eax, %ecx, -128(,%rbp,2) + +// CHECK: cmpexadd %eax, %ecx, 508(%rcx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe4,0x89,0xfc,0x01,0x00,0x00] + cmpzxadd %eax, %ecx, 508(%rcx) + +// CHECK: cmpexadd %eax, %ecx, -512(%rdx) +// CHECK: encoding: [0xc4,0xe2,0x79,0xe4,0x8a,0x00,0xfe,0xff,0xff] + cmpzxadd %eax, %ecx, -512(%rdx) + +// CHECK: cmpexadd %r10, %r9, 268435456(%rbp,%r14,8) +// CHECK: encoding: [0xc4,0x22,0xa9,0xe4,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpzxadd %r10, %r9, 268435456(%rbp,%r14,8) + +// CHECK: cmpexadd %r10, %r9, 291(%r8,%rax,4) +// CHECK: encoding: [0xc4,0x42,0xa9,0xe4,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpzxadd %r10, %r9, 291(%r8,%rax,4) + +// CHECK: cmpexadd %r10, %r9, (%rip) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe4,0x0d,0x00,0x00,0x00,0x00] + cmpzxadd %r10, %r9, (%rip) + +// CHECK: cmpexadd %r10, %r9, -256(,%rbp,2) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe4,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpzxadd %r10, %r9, -256(,%rbp,2) + +// CHECK: cmpexadd %r10, %r9, 1016(%rcx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe4,0x89,0xf8,0x03,0x00,0x00] + cmpzxadd %r10, %r9, 1016(%rcx) + +// CHECK: cmpexadd %r10, %r9, -1024(%rdx) +// CHECK: encoding: [0xc4,0x62,0xa9,0xe4,0x8a,0x00,0xfc,0xff,0xff] + cmpzxadd %r10, %r9, -1024(%rdx) + diff --git a/llvm/test/MC/X86/cmpccxadd-intel-64.s b/llvm/test/MC/X86/cmpccxadd-intel-64.s new file mode 100644 --- /dev/null +++ b/llvm/test/MC/X86/cmpccxadd-intel-64.s @@ -0,0 +1,770 @@ +// RUN: llvm-mc -triple x86_64 -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding %s | FileCheck %s + +// CHECK: cmpbexadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +// CHECK: encoding: [0xc4,0xa2,0x79,0xe6,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpbexadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax + +// CHECK: cmpbexadd dword ptr [r8 + 4*rax + 291], ecx, eax +// CHECK: encoding: [0xc4,0xc2,0x79,0xe6,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpbexadd dword ptr [r8 + 4*rax + 291], ecx, eax + +// CHECK: cmpbexadd dword ptr [rip], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe6,0x0d,0x00,0x00,0x00,0x00] + cmpbexadd dword ptr [rip], ecx, eax + +// CHECK: cmpbexadd dword ptr [2*rbp - 128], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe6,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpbexadd dword ptr [2*rbp - 128], ecx, eax + +// CHECK: cmpbexadd dword ptr [rcx + 508], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe6,0x89,0xfc,0x01,0x00,0x00] + cmpbexadd dword ptr [rcx + 508], ecx, eax + +// CHECK: cmpbexadd dword ptr [rdx - 512], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe6,0x8a,0x00,0xfe,0xff,0xff] + cmpbexadd dword ptr [rdx - 512], ecx, eax + +// CHECK: cmpbexadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +// CHECK: encoding: [0xc4,0x22,0xa9,0xe6,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpbexadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 + +// CHECK: cmpbexadd qword ptr [r8 + 4*rax + 291], r9, r10 +// CHECK: encoding: [0xc4,0x42,0xa9,0xe6,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpbexadd qword ptr [r8 + 4*rax + 291], r9, r10 + +// CHECK: cmpbexadd qword ptr [rip], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe6,0x0d,0x00,0x00,0x00,0x00] + cmpbexadd qword ptr [rip], r9, r10 + +// CHECK: cmpbexadd qword ptr [2*rbp - 256], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe6,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpbexadd qword ptr [2*rbp - 256], r9, r10 + +// CHECK: cmpbexadd qword ptr [rcx + 1016], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe6,0x89,0xf8,0x03,0x00,0x00] + cmpbexadd qword ptr [rcx + 1016], r9, r10 + +// CHECK: cmpbexadd qword ptr [rdx - 1024], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe6,0x8a,0x00,0xfc,0xff,0xff] + cmpbexadd qword ptr [rdx - 1024], r9, r10 + +// CHECK: cmpbxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +// CHECK: encoding: [0xc4,0xa2,0x79,0xe2,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpbxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax + +// CHECK: cmpbxadd dword ptr [r8 + 4*rax + 291], ecx, eax +// CHECK: encoding: [0xc4,0xc2,0x79,0xe2,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpbxadd dword ptr [r8 + 4*rax + 291], ecx, eax + +// CHECK: cmpbxadd dword ptr [rip], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe2,0x0d,0x00,0x00,0x00,0x00] + cmpbxadd dword ptr [rip], ecx, eax + +// CHECK: cmpbxadd dword ptr [2*rbp - 128], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe2,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpbxadd dword ptr [2*rbp - 128], ecx, eax + +// CHECK: cmpbxadd dword ptr [rcx + 508], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe2,0x89,0xfc,0x01,0x00,0x00] + cmpbxadd dword ptr [rcx + 508], ecx, eax + +// CHECK: cmpbxadd dword ptr [rdx - 512], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe2,0x8a,0x00,0xfe,0xff,0xff] + cmpbxadd dword ptr [rdx - 512], ecx, eax + +// CHECK: cmpbxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +// CHECK: encoding: [0xc4,0x22,0xa9,0xe2,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpbxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 + +// CHECK: cmpbxadd qword ptr [r8 + 4*rax + 291], r9, r10 +// CHECK: encoding: [0xc4,0x42,0xa9,0xe2,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpbxadd qword ptr [r8 + 4*rax + 291], r9, r10 + +// CHECK: cmpbxadd qword ptr [rip], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe2,0x0d,0x00,0x00,0x00,0x00] + cmpbxadd qword ptr [rip], r9, r10 + +// CHECK: cmpbxadd qword ptr [2*rbp - 256], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe2,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpbxadd qword ptr [2*rbp - 256], r9, r10 + +// CHECK: cmpbxadd qword ptr [rcx + 1016], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe2,0x89,0xf8,0x03,0x00,0x00] + cmpbxadd qword ptr [rcx + 1016], r9, r10 + +// CHECK: cmpbxadd qword ptr [rdx - 1024], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe2,0x8a,0x00,0xfc,0xff,0xff] + cmpbxadd qword ptr [rdx - 1024], r9, r10 + +// CHECK: cmplexadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +// CHECK: encoding: [0xc4,0xa2,0x79,0xee,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmplexadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax + +// CHECK: cmplexadd dword ptr [r8 + 4*rax + 291], ecx, eax +// CHECK: encoding: [0xc4,0xc2,0x79,0xee,0x8c,0x80,0x23,0x01,0x00,0x00] + cmplexadd dword ptr [r8 + 4*rax + 291], ecx, eax + +// CHECK: cmplexadd dword ptr [rip], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xee,0x0d,0x00,0x00,0x00,0x00] + cmplexadd dword ptr [rip], ecx, eax + +// CHECK: cmplexadd dword ptr [2*rbp - 128], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xee,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmplexadd dword ptr [2*rbp - 128], ecx, eax + +// CHECK: cmplexadd dword ptr [rcx + 508], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xee,0x89,0xfc,0x01,0x00,0x00] + cmplexadd dword ptr [rcx + 508], ecx, eax + +// CHECK: cmplexadd dword ptr [rdx - 512], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xee,0x8a,0x00,0xfe,0xff,0xff] + cmplexadd dword ptr [rdx - 512], ecx, eax + +// CHECK: cmplexadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +// CHECK: encoding: [0xc4,0x22,0xa9,0xee,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmplexadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 + +// CHECK: cmplexadd qword ptr [r8 + 4*rax + 291], r9, r10 +// CHECK: encoding: [0xc4,0x42,0xa9,0xee,0x8c,0x80,0x23,0x01,0x00,0x00] + cmplexadd qword ptr [r8 + 4*rax + 291], r9, r10 + +// CHECK: cmplexadd qword ptr [rip], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xee,0x0d,0x00,0x00,0x00,0x00] + cmplexadd qword ptr [rip], r9, r10 + +// CHECK: cmplexadd qword ptr [2*rbp - 256], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xee,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmplexadd qword ptr [2*rbp - 256], r9, r10 + +// CHECK: cmplexadd qword ptr [rcx + 1016], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xee,0x89,0xf8,0x03,0x00,0x00] + cmplexadd qword ptr [rcx + 1016], r9, r10 + +// CHECK: cmplexadd qword ptr [rdx - 1024], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xee,0x8a,0x00,0xfc,0xff,0xff] + cmplexadd qword ptr [rdx - 1024], r9, r10 + +// CHECK: cmplxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +// CHECK: encoding: [0xc4,0xa2,0x79,0xec,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmplxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax + +// CHECK: cmplxadd dword ptr [r8 + 4*rax + 291], ecx, eax +// CHECK: encoding: [0xc4,0xc2,0x79,0xec,0x8c,0x80,0x23,0x01,0x00,0x00] + cmplxadd dword ptr [r8 + 4*rax + 291], ecx, eax + +// CHECK: cmplxadd dword ptr [rip], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xec,0x0d,0x00,0x00,0x00,0x00] + cmplxadd dword ptr [rip], ecx, eax + +// CHECK: cmplxadd dword ptr [2*rbp - 128], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xec,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmplxadd dword ptr [2*rbp - 128], ecx, eax + +// CHECK: cmplxadd dword ptr [rcx + 508], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xec,0x89,0xfc,0x01,0x00,0x00] + cmplxadd dword ptr [rcx + 508], ecx, eax + +// CHECK: cmplxadd dword ptr [rdx - 512], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xec,0x8a,0x00,0xfe,0xff,0xff] + cmplxadd dword ptr [rdx - 512], ecx, eax + +// CHECK: cmplxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +// CHECK: encoding: [0xc4,0x22,0xa9,0xec,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmplxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 + +// CHECK: cmplxadd qword ptr [r8 + 4*rax + 291], r9, r10 +// CHECK: encoding: [0xc4,0x42,0xa9,0xec,0x8c,0x80,0x23,0x01,0x00,0x00] + cmplxadd qword ptr [r8 + 4*rax + 291], r9, r10 + +// CHECK: cmplxadd qword ptr [rip], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xec,0x0d,0x00,0x00,0x00,0x00] + cmplxadd qword ptr [rip], r9, r10 + +// CHECK: cmplxadd qword ptr [2*rbp - 256], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xec,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmplxadd qword ptr [2*rbp - 256], r9, r10 + +// CHECK: cmplxadd qword ptr [rcx + 1016], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xec,0x89,0xf8,0x03,0x00,0x00] + cmplxadd qword ptr [rcx + 1016], r9, r10 + +// CHECK: cmplxadd qword ptr [rdx - 1024], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xec,0x8a,0x00,0xfc,0xff,0xff] + cmplxadd qword ptr [rdx - 1024], r9, r10 + +// CHECK: cmpaxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +// CHECK: encoding: [0xc4,0xa2,0x79,0xe7,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnbexadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax + +// CHECK: cmpaxadd dword ptr [r8 + 4*rax + 291], ecx, eax +// CHECK: encoding: [0xc4,0xc2,0x79,0xe7,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnbexadd dword ptr [r8 + 4*rax + 291], ecx, eax + +// CHECK: cmpaxadd dword ptr [rip], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe7,0x0d,0x00,0x00,0x00,0x00] + cmpnbexadd dword ptr [rip], ecx, eax + +// CHECK: cmpaxadd dword ptr [2*rbp - 128], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe7,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpnbexadd dword ptr [2*rbp - 128], ecx, eax + +// CHECK: cmpaxadd dword ptr [rcx + 508], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe7,0x89,0xfc,0x01,0x00,0x00] + cmpnbexadd dword ptr [rcx + 508], ecx, eax + +// CHECK: cmpaxadd dword ptr [rdx - 512], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe7,0x8a,0x00,0xfe,0xff,0xff] + cmpnbexadd dword ptr [rdx - 512], ecx, eax + +// CHECK: cmpaxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +// CHECK: encoding: [0xc4,0x22,0xa9,0xe7,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnbexadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 + +// CHECK: cmpaxadd qword ptr [r8 + 4*rax + 291], r9, r10 +// CHECK: encoding: [0xc4,0x42,0xa9,0xe7,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnbexadd qword ptr [r8 + 4*rax + 291], r9, r10 + +// CHECK: cmpaxadd qword ptr [rip], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe7,0x0d,0x00,0x00,0x00,0x00] + cmpnbexadd qword ptr [rip], r9, r10 + +// CHECK: cmpaxadd qword ptr [2*rbp - 256], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe7,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpnbexadd qword ptr [2*rbp - 256], r9, r10 + +// CHECK: cmpaxadd qword ptr [rcx + 1016], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe7,0x89,0xf8,0x03,0x00,0x00] + cmpnbexadd qword ptr [rcx + 1016], r9, r10 + +// CHECK: cmpaxadd qword ptr [rdx - 1024], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe7,0x8a,0x00,0xfc,0xff,0xff] + cmpnbexadd qword ptr [rdx - 1024], r9, r10 + +// CHECK: cmpaexadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +// CHECK: encoding: [0xc4,0xa2,0x79,0xe3,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnbxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax + +// CHECK: cmpaexadd dword ptr [r8 + 4*rax + 291], ecx, eax +// CHECK: encoding: [0xc4,0xc2,0x79,0xe3,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnbxadd dword ptr [r8 + 4*rax + 291], ecx, eax + +// CHECK: cmpaexadd dword ptr [rip], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe3,0x0d,0x00,0x00,0x00,0x00] + cmpnbxadd dword ptr [rip], ecx, eax + +// CHECK: cmpaexadd dword ptr [2*rbp - 128], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe3,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpnbxadd dword ptr [2*rbp - 128], ecx, eax + +// CHECK: cmpaexadd dword ptr [rcx + 508], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe3,0x89,0xfc,0x01,0x00,0x00] + cmpnbxadd dword ptr [rcx + 508], ecx, eax + +// CHECK: cmpaexadd dword ptr [rdx - 512], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe3,0x8a,0x00,0xfe,0xff,0xff] + cmpnbxadd dword ptr [rdx - 512], ecx, eax + +// CHECK: cmpaexadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +// CHECK: encoding: [0xc4,0x22,0xa9,0xe3,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnbxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 + +// CHECK: cmpaexadd qword ptr [r8 + 4*rax + 291], r9, r10 +// CHECK: encoding: [0xc4,0x42,0xa9,0xe3,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnbxadd qword ptr [r8 + 4*rax + 291], r9, r10 + +// CHECK: cmpaexadd qword ptr [rip], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe3,0x0d,0x00,0x00,0x00,0x00] + cmpnbxadd qword ptr [rip], r9, r10 + +// CHECK: cmpaexadd qword ptr [2*rbp - 256], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe3,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpnbxadd qword ptr [2*rbp - 256], r9, r10 + +// CHECK: cmpaexadd qword ptr [rcx + 1016], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe3,0x89,0xf8,0x03,0x00,0x00] + cmpnbxadd qword ptr [rcx + 1016], r9, r10 + +// CHECK: cmpaexadd qword ptr [rdx - 1024], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe3,0x8a,0x00,0xfc,0xff,0xff] + cmpnbxadd qword ptr [rdx - 1024], r9, r10 + +// CHECK: cmpgxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +// CHECK: encoding: [0xc4,0xa2,0x79,0xef,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnlexadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax + +// CHECK: cmpgxadd dword ptr [r8 + 4*rax + 291], ecx, eax +// CHECK: encoding: [0xc4,0xc2,0x79,0xef,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnlexadd dword ptr [r8 + 4*rax + 291], ecx, eax + +// CHECK: cmpgxadd dword ptr [rip], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xef,0x0d,0x00,0x00,0x00,0x00] + cmpnlexadd dword ptr [rip], ecx, eax + +// CHECK: cmpgxadd dword ptr [2*rbp - 128], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xef,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpnlexadd dword ptr [2*rbp - 128], ecx, eax + +// CHECK: cmpgxadd dword ptr [rcx + 508], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xef,0x89,0xfc,0x01,0x00,0x00] + cmpnlexadd dword ptr [rcx + 508], ecx, eax + +// CHECK: cmpgxadd dword ptr [rdx - 512], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xef,0x8a,0x00,0xfe,0xff,0xff] + cmpnlexadd dword ptr [rdx - 512], ecx, eax + +// CHECK: cmpgxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +// CHECK: encoding: [0xc4,0x22,0xa9,0xef,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnlexadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 + +// CHECK: cmpgxadd qword ptr [r8 + 4*rax + 291], r9, r10 +// CHECK: encoding: [0xc4,0x42,0xa9,0xef,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnlexadd qword ptr [r8 + 4*rax + 291], r9, r10 + +// CHECK: cmpgxadd qword ptr [rip], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xef,0x0d,0x00,0x00,0x00,0x00] + cmpnlexadd qword ptr [rip], r9, r10 + +// CHECK: cmpgxadd qword ptr [2*rbp - 256], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xef,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpnlexadd qword ptr [2*rbp - 256], r9, r10 + +// CHECK: cmpgxadd qword ptr [rcx + 1016], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xef,0x89,0xf8,0x03,0x00,0x00] + cmpnlexadd qword ptr [rcx + 1016], r9, r10 + +// CHECK: cmpgxadd qword ptr [rdx - 1024], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xef,0x8a,0x00,0xfc,0xff,0xff] + cmpnlexadd qword ptr [rdx - 1024], r9, r10 + +// CHECK: cmpgexadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +// CHECK: encoding: [0xc4,0xa2,0x79,0xed,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnlxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax + +// CHECK: cmpgexadd dword ptr [r8 + 4*rax + 291], ecx, eax +// CHECK: encoding: [0xc4,0xc2,0x79,0xed,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnlxadd dword ptr [r8 + 4*rax + 291], ecx, eax + +// CHECK: cmpgexadd dword ptr [rip], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xed,0x0d,0x00,0x00,0x00,0x00] + cmpnlxadd dword ptr [rip], ecx, eax + +// CHECK: cmpgexadd dword ptr [2*rbp - 128], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xed,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpnlxadd dword ptr [2*rbp - 128], ecx, eax + +// CHECK: cmpgexadd dword ptr [rcx + 508], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xed,0x89,0xfc,0x01,0x00,0x00] + cmpnlxadd dword ptr [rcx + 508], ecx, eax + +// CHECK: cmpgexadd dword ptr [rdx - 512], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xed,0x8a,0x00,0xfe,0xff,0xff] + cmpnlxadd dword ptr [rdx - 512], ecx, eax + +// CHECK: cmpgexadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +// CHECK: encoding: [0xc4,0x22,0xa9,0xed,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnlxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 + +// CHECK: cmpgexadd qword ptr [r8 + 4*rax + 291], r9, r10 +// CHECK: encoding: [0xc4,0x42,0xa9,0xed,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnlxadd qword ptr [r8 + 4*rax + 291], r9, r10 + +// CHECK: cmpgexadd qword ptr [rip], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xed,0x0d,0x00,0x00,0x00,0x00] + cmpnlxadd qword ptr [rip], r9, r10 + +// CHECK: cmpgexadd qword ptr [2*rbp - 256], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xed,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpnlxadd qword ptr [2*rbp - 256], r9, r10 + +// CHECK: cmpgexadd qword ptr [rcx + 1016], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xed,0x89,0xf8,0x03,0x00,0x00] + cmpnlxadd qword ptr [rcx + 1016], r9, r10 + +// CHECK: cmpgexadd qword ptr [rdx - 1024], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xed,0x8a,0x00,0xfc,0xff,0xff] + cmpnlxadd qword ptr [rdx - 1024], r9, r10 + +// CHECK: cmpnoxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +// CHECK: encoding: [0xc4,0xa2,0x79,0xe1,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnoxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax + +// CHECK: cmpnoxadd dword ptr [r8 + 4*rax + 291], ecx, eax +// CHECK: encoding: [0xc4,0xc2,0x79,0xe1,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnoxadd dword ptr [r8 + 4*rax + 291], ecx, eax + +// CHECK: cmpnoxadd dword ptr [rip], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe1,0x0d,0x00,0x00,0x00,0x00] + cmpnoxadd dword ptr [rip], ecx, eax + +// CHECK: cmpnoxadd dword ptr [2*rbp - 128], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe1,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpnoxadd dword ptr [2*rbp - 128], ecx, eax + +// CHECK: cmpnoxadd dword ptr [rcx + 508], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe1,0x89,0xfc,0x01,0x00,0x00] + cmpnoxadd dword ptr [rcx + 508], ecx, eax + +// CHECK: cmpnoxadd dword ptr [rdx - 512], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe1,0x8a,0x00,0xfe,0xff,0xff] + cmpnoxadd dword ptr [rdx - 512], ecx, eax + +// CHECK: cmpnoxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +// CHECK: encoding: [0xc4,0x22,0xa9,0xe1,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnoxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 + +// CHECK: cmpnoxadd qword ptr [r8 + 4*rax + 291], r9, r10 +// CHECK: encoding: [0xc4,0x42,0xa9,0xe1,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnoxadd qword ptr [r8 + 4*rax + 291], r9, r10 + +// CHECK: cmpnoxadd qword ptr [rip], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe1,0x0d,0x00,0x00,0x00,0x00] + cmpnoxadd qword ptr [rip], r9, r10 + +// CHECK: cmpnoxadd qword ptr [2*rbp - 256], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe1,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpnoxadd qword ptr [2*rbp - 256], r9, r10 + +// CHECK: cmpnoxadd qword ptr [rcx + 1016], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe1,0x89,0xf8,0x03,0x00,0x00] + cmpnoxadd qword ptr [rcx + 1016], r9, r10 + +// CHECK: cmpnoxadd qword ptr [rdx - 1024], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe1,0x8a,0x00,0xfc,0xff,0xff] + cmpnoxadd qword ptr [rdx - 1024], r9, r10 + +// CHECK: cmpnpxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +// CHECK: encoding: [0xc4,0xa2,0x79,0xeb,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnpxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax + +// CHECK: cmpnpxadd dword ptr [r8 + 4*rax + 291], ecx, eax +// CHECK: encoding: [0xc4,0xc2,0x79,0xeb,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnpxadd dword ptr [r8 + 4*rax + 291], ecx, eax + +// CHECK: cmpnpxadd dword ptr [rip], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xeb,0x0d,0x00,0x00,0x00,0x00] + cmpnpxadd dword ptr [rip], ecx, eax + +// CHECK: cmpnpxadd dword ptr [2*rbp - 128], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xeb,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpnpxadd dword ptr [2*rbp - 128], ecx, eax + +// CHECK: cmpnpxadd dword ptr [rcx + 508], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xeb,0x89,0xfc,0x01,0x00,0x00] + cmpnpxadd dword ptr [rcx + 508], ecx, eax + +// CHECK: cmpnpxadd dword ptr [rdx - 512], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xeb,0x8a,0x00,0xfe,0xff,0xff] + cmpnpxadd dword ptr [rdx - 512], ecx, eax + +// CHECK: cmpnpxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +// CHECK: encoding: [0xc4,0x22,0xa9,0xeb,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnpxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 + +// CHECK: cmpnpxadd qword ptr [r8 + 4*rax + 291], r9, r10 +// CHECK: encoding: [0xc4,0x42,0xa9,0xeb,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnpxadd qword ptr [r8 + 4*rax + 291], r9, r10 + +// CHECK: cmpnpxadd qword ptr [rip], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xeb,0x0d,0x00,0x00,0x00,0x00] + cmpnpxadd qword ptr [rip], r9, r10 + +// CHECK: cmpnpxadd qword ptr [2*rbp - 256], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xeb,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpnpxadd qword ptr [2*rbp - 256], r9, r10 + +// CHECK: cmpnpxadd qword ptr [rcx + 1016], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xeb,0x89,0xf8,0x03,0x00,0x00] + cmpnpxadd qword ptr [rcx + 1016], r9, r10 + +// CHECK: cmpnpxadd qword ptr [rdx - 1024], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xeb,0x8a,0x00,0xfc,0xff,0xff] + cmpnpxadd qword ptr [rdx - 1024], r9, r10 + +// CHECK: cmpnsxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +// CHECK: encoding: [0xc4,0xa2,0x79,0xe9,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnsxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax + +// CHECK: cmpnsxadd dword ptr [r8 + 4*rax + 291], ecx, eax +// CHECK: encoding: [0xc4,0xc2,0x79,0xe9,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnsxadd dword ptr [r8 + 4*rax + 291], ecx, eax + +// CHECK: cmpnsxadd dword ptr [rip], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe9,0x0d,0x00,0x00,0x00,0x00] + cmpnsxadd dword ptr [rip], ecx, eax + +// CHECK: cmpnsxadd dword ptr [2*rbp - 128], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe9,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpnsxadd dword ptr [2*rbp - 128], ecx, eax + +// CHECK: cmpnsxadd dword ptr [rcx + 508], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe9,0x89,0xfc,0x01,0x00,0x00] + cmpnsxadd dword ptr [rcx + 508], ecx, eax + +// CHECK: cmpnsxadd dword ptr [rdx - 512], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe9,0x8a,0x00,0xfe,0xff,0xff] + cmpnsxadd dword ptr [rdx - 512], ecx, eax + +// CHECK: cmpnsxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +// CHECK: encoding: [0xc4,0x22,0xa9,0xe9,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnsxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 + +// CHECK: cmpnsxadd qword ptr [r8 + 4*rax + 291], r9, r10 +// CHECK: encoding: [0xc4,0x42,0xa9,0xe9,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnsxadd qword ptr [r8 + 4*rax + 291], r9, r10 + +// CHECK: cmpnsxadd qword ptr [rip], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe9,0x0d,0x00,0x00,0x00,0x00] + cmpnsxadd qword ptr [rip], r9, r10 + +// CHECK: cmpnsxadd qword ptr [2*rbp - 256], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe9,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpnsxadd qword ptr [2*rbp - 256], r9, r10 + +// CHECK: cmpnsxadd qword ptr [rcx + 1016], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe9,0x89,0xf8,0x03,0x00,0x00] + cmpnsxadd qword ptr [rcx + 1016], r9, r10 + +// CHECK: cmpnsxadd qword ptr [rdx - 1024], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe9,0x8a,0x00,0xfc,0xff,0xff] + cmpnsxadd qword ptr [rdx - 1024], r9, r10 + +// CHECK: cmpnexadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +// CHECK: encoding: [0xc4,0xa2,0x79,0xe5,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnzxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax + +// CHECK: cmpnexadd dword ptr [r8 + 4*rax + 291], ecx, eax +// CHECK: encoding: [0xc4,0xc2,0x79,0xe5,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnzxadd dword ptr [r8 + 4*rax + 291], ecx, eax + +// CHECK: cmpnexadd dword ptr [rip], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe5,0x0d,0x00,0x00,0x00,0x00] + cmpnzxadd dword ptr [rip], ecx, eax + +// CHECK: cmpnexadd dword ptr [2*rbp - 128], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe5,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpnzxadd dword ptr [2*rbp - 128], ecx, eax + +// CHECK: cmpnexadd dword ptr [rcx + 508], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe5,0x89,0xfc,0x01,0x00,0x00] + cmpnzxadd dword ptr [rcx + 508], ecx, eax + +// CHECK: cmpnexadd dword ptr [rdx - 512], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe5,0x8a,0x00,0xfe,0xff,0xff] + cmpnzxadd dword ptr [rdx - 512], ecx, eax + +// CHECK: cmpnexadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +// CHECK: encoding: [0xc4,0x22,0xa9,0xe5,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpnzxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 + +// CHECK: cmpnexadd qword ptr [r8 + 4*rax + 291], r9, r10 +// CHECK: encoding: [0xc4,0x42,0xa9,0xe5,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpnzxadd qword ptr [r8 + 4*rax + 291], r9, r10 + +// CHECK: cmpnexadd qword ptr [rip], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe5,0x0d,0x00,0x00,0x00,0x00] + cmpnzxadd qword ptr [rip], r9, r10 + +// CHECK: cmpnexadd qword ptr [2*rbp - 256], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe5,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpnzxadd qword ptr [2*rbp - 256], r9, r10 + +// CHECK: cmpnexadd qword ptr [rcx + 1016], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe5,0x89,0xf8,0x03,0x00,0x00] + cmpnzxadd qword ptr [rcx + 1016], r9, r10 + +// CHECK: cmpnexadd qword ptr [rdx - 1024], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe5,0x8a,0x00,0xfc,0xff,0xff] + cmpnzxadd qword ptr [rdx - 1024], r9, r10 + +// CHECK: cmpoxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +// CHECK: encoding: [0xc4,0xa2,0x79,0xe0,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpoxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax + +// CHECK: cmpoxadd dword ptr [r8 + 4*rax + 291], ecx, eax +// CHECK: encoding: [0xc4,0xc2,0x79,0xe0,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpoxadd dword ptr [r8 + 4*rax + 291], ecx, eax + +// CHECK: cmpoxadd dword ptr [rip], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe0,0x0d,0x00,0x00,0x00,0x00] + cmpoxadd dword ptr [rip], ecx, eax + +// CHECK: cmpoxadd dword ptr [2*rbp - 128], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe0,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpoxadd dword ptr [2*rbp - 128], ecx, eax + +// CHECK: cmpoxadd dword ptr [rcx + 508], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe0,0x89,0xfc,0x01,0x00,0x00] + cmpoxadd dword ptr [rcx + 508], ecx, eax + +// CHECK: cmpoxadd dword ptr [rdx - 512], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe0,0x8a,0x00,0xfe,0xff,0xff] + cmpoxadd dword ptr [rdx - 512], ecx, eax + +// CHECK: cmpoxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +// CHECK: encoding: [0xc4,0x22,0xa9,0xe0,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpoxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 + +// CHECK: cmpoxadd qword ptr [r8 + 4*rax + 291], r9, r10 +// CHECK: encoding: [0xc4,0x42,0xa9,0xe0,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpoxadd qword ptr [r8 + 4*rax + 291], r9, r10 + +// CHECK: cmpoxadd qword ptr [rip], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe0,0x0d,0x00,0x00,0x00,0x00] + cmpoxadd qword ptr [rip], r9, r10 + +// CHECK: cmpoxadd qword ptr [2*rbp - 256], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe0,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpoxadd qword ptr [2*rbp - 256], r9, r10 + +// CHECK: cmpoxadd qword ptr [rcx + 1016], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe0,0x89,0xf8,0x03,0x00,0x00] + cmpoxadd qword ptr [rcx + 1016], r9, r10 + +// CHECK: cmpoxadd qword ptr [rdx - 1024], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe0,0x8a,0x00,0xfc,0xff,0xff] + cmpoxadd qword ptr [rdx - 1024], r9, r10 + +// CHECK: cmppxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +// CHECK: encoding: [0xc4,0xa2,0x79,0xea,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmppxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax + +// CHECK: cmppxadd dword ptr [r8 + 4*rax + 291], ecx, eax +// CHECK: encoding: [0xc4,0xc2,0x79,0xea,0x8c,0x80,0x23,0x01,0x00,0x00] + cmppxadd dword ptr [r8 + 4*rax + 291], ecx, eax + +// CHECK: cmppxadd dword ptr [rip], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xea,0x0d,0x00,0x00,0x00,0x00] + cmppxadd dword ptr [rip], ecx, eax + +// CHECK: cmppxadd dword ptr [2*rbp - 128], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xea,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmppxadd dword ptr [2*rbp - 128], ecx, eax + +// CHECK: cmppxadd dword ptr [rcx + 508], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xea,0x89,0xfc,0x01,0x00,0x00] + cmppxadd dword ptr [rcx + 508], ecx, eax + +// CHECK: cmppxadd dword ptr [rdx - 512], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xea,0x8a,0x00,0xfe,0xff,0xff] + cmppxadd dword ptr [rdx - 512], ecx, eax + +// CHECK: cmppxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +// CHECK: encoding: [0xc4,0x22,0xa9,0xea,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmppxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 + +// CHECK: cmppxadd qword ptr [r8 + 4*rax + 291], r9, r10 +// CHECK: encoding: [0xc4,0x42,0xa9,0xea,0x8c,0x80,0x23,0x01,0x00,0x00] + cmppxadd qword ptr [r8 + 4*rax + 291], r9, r10 + +// CHECK: cmppxadd qword ptr [rip], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xea,0x0d,0x00,0x00,0x00,0x00] + cmppxadd qword ptr [rip], r9, r10 + +// CHECK: cmppxadd qword ptr [2*rbp - 256], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xea,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmppxadd qword ptr [2*rbp - 256], r9, r10 + +// CHECK: cmppxadd qword ptr [rcx + 1016], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xea,0x89,0xf8,0x03,0x00,0x00] + cmppxadd qword ptr [rcx + 1016], r9, r10 + +// CHECK: cmppxadd qword ptr [rdx - 1024], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xea,0x8a,0x00,0xfc,0xff,0xff] + cmppxadd qword ptr [rdx - 1024], r9, r10 + +// CHECK: cmpsxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +// CHECK: encoding: [0xc4,0xa2,0x79,0xe8,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpsxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax + +// CHECK: cmpsxadd dword ptr [r8 + 4*rax + 291], ecx, eax +// CHECK: encoding: [0xc4,0xc2,0x79,0xe8,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpsxadd dword ptr [r8 + 4*rax + 291], ecx, eax + +// CHECK: cmpsxadd dword ptr [rip], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe8,0x0d,0x00,0x00,0x00,0x00] + cmpsxadd dword ptr [rip], ecx, eax + +// CHECK: cmpsxadd dword ptr [2*rbp - 128], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe8,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpsxadd dword ptr [2*rbp - 128], ecx, eax + +// CHECK: cmpsxadd dword ptr [rcx + 508], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe8,0x89,0xfc,0x01,0x00,0x00] + cmpsxadd dword ptr [rcx + 508], ecx, eax + +// CHECK: cmpsxadd dword ptr [rdx - 512], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe8,0x8a,0x00,0xfe,0xff,0xff] + cmpsxadd dword ptr [rdx - 512], ecx, eax + +// CHECK: cmpsxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +// CHECK: encoding: [0xc4,0x22,0xa9,0xe8,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpsxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 + +// CHECK: cmpsxadd qword ptr [r8 + 4*rax + 291], r9, r10 +// CHECK: encoding: [0xc4,0x42,0xa9,0xe8,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpsxadd qword ptr [r8 + 4*rax + 291], r9, r10 + +// CHECK: cmpsxadd qword ptr [rip], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe8,0x0d,0x00,0x00,0x00,0x00] + cmpsxadd qword ptr [rip], r9, r10 + +// CHECK: cmpsxadd qword ptr [2*rbp - 256], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe8,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpsxadd qword ptr [2*rbp - 256], r9, r10 + +// CHECK: cmpsxadd qword ptr [rcx + 1016], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe8,0x89,0xf8,0x03,0x00,0x00] + cmpsxadd qword ptr [rcx + 1016], r9, r10 + +// CHECK: cmpsxadd qword ptr [rdx - 1024], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe8,0x8a,0x00,0xfc,0xff,0xff] + cmpsxadd qword ptr [rdx - 1024], r9, r10 + +// CHECK: cmpexadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax +// CHECK: encoding: [0xc4,0xa2,0x79,0xe4,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpzxadd dword ptr [rbp + 8*r14 + 268435456], ecx, eax + +// CHECK: cmpexadd dword ptr [r8 + 4*rax + 291], ecx, eax +// CHECK: encoding: [0xc4,0xc2,0x79,0xe4,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpzxadd dword ptr [r8 + 4*rax + 291], ecx, eax + +// CHECK: cmpexadd dword ptr [rip], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe4,0x0d,0x00,0x00,0x00,0x00] + cmpzxadd dword ptr [rip], ecx, eax + +// CHECK: cmpexadd dword ptr [2*rbp - 128], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe4,0x0c,0x6d,0x80,0xff,0xff,0xff] + cmpzxadd dword ptr [2*rbp - 128], ecx, eax + +// CHECK: cmpexadd dword ptr [rcx + 508], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe4,0x89,0xfc,0x01,0x00,0x00] + cmpzxadd dword ptr [rcx + 508], ecx, eax + +// CHECK: cmpexadd dword ptr [rdx - 512], ecx, eax +// CHECK: encoding: [0xc4,0xe2,0x79,0xe4,0x8a,0x00,0xfe,0xff,0xff] + cmpzxadd dword ptr [rdx - 512], ecx, eax + +// CHECK: cmpexadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 +// CHECK: encoding: [0xc4,0x22,0xa9,0xe4,0x8c,0xf5,0x00,0x00,0x00,0x10] + cmpzxadd qword ptr [rbp + 8*r14 + 268435456], r9, r10 + +// CHECK: cmpexadd qword ptr [r8 + 4*rax + 291], r9, r10 +// CHECK: encoding: [0xc4,0x42,0xa9,0xe4,0x8c,0x80,0x23,0x01,0x00,0x00] + cmpzxadd qword ptr [r8 + 4*rax + 291], r9, r10 + +// CHECK: cmpexadd qword ptr [rip], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe4,0x0d,0x00,0x00,0x00,0x00] + cmpzxadd qword ptr [rip], r9, r10 + +// CHECK: cmpexadd qword ptr [2*rbp - 256], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe4,0x0c,0x6d,0x00,0xff,0xff,0xff] + cmpzxadd qword ptr [2*rbp - 256], r9, r10 + +// CHECK: cmpexadd qword ptr [rcx + 1016], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe4,0x89,0xf8,0x03,0x00,0x00] + cmpzxadd qword ptr [rcx + 1016], r9, r10 + +// CHECK: cmpexadd qword ptr [rdx - 1024], r9, r10 +// CHECK: encoding: [0xc4,0x62,0xa9,0xe4,0x8a,0x00,0xfc,0xff,0xff] + cmpzxadd qword ptr [rdx - 1024], r9, r10 + diff --git a/llvm/utils/TableGen/X86RecognizableInstr.h b/llvm/utils/TableGen/X86RecognizableInstr.h --- a/llvm/utils/TableGen/X86RecognizableInstr.h +++ b/llvm/utils/TableGen/X86RecognizableInstr.h @@ -106,6 +106,7 @@ RawFrmImm16 = 8, AddCCFrm = 9, PrefixByte = 10, + MRMDestMem4VOp3CC = 20, MRMr0 = 21, MRMSrcMemFSIB = 22, MRMDestMemFSIB = 23, diff --git a/llvm/utils/TableGen/X86RecognizableInstr.cpp b/llvm/utils/TableGen/X86RecognizableInstr.cpp --- a/llvm/utils/TableGen/X86RecognizableInstr.cpp +++ b/llvm/utils/TableGen/X86RecognizableInstr.cpp @@ -546,6 +546,17 @@ HANDLE_OPERAND(roRegister) HANDLE_OPTIONAL(immediate) break; + case X86Local::MRMDestMem4VOp3CC: + // Operand 1 is a sibmem/memory operand + // Operand 2 is a mod/r + // Operand 3 is VEX.vvvv + assert(numPhysicalOperands == 4 && + "Unexpected number of operands for MRMDestMem4VOp3CC"); + HANDLE_OPERAND(roRegister) + HANDLE_OPERAND(memory) + HANDLE_OPERAND(vvvvRegister) + HANDLE_OPERAND(opcodeModifier) + break; case X86Local::MRMDestMem: case X86Local::MRMDestMemFSIB: // Operand 1 is a memory operand (possibly SIB-extended) @@ -808,6 +819,7 @@ filter = std::make_unique(true); break; case X86Local::MRMDestMem: + case X86Local::MRMDestMem4VOp3CC: case X86Local::MRMDestMemFSIB: case X86Local::MRMSrcMem: case X86Local::MRMSrcMemFSIB: @@ -858,7 +870,8 @@ if (Form == X86Local::AddRegFrm || Form == X86Local::MRMSrcRegCC || Form == X86Local::MRMSrcMemCC || Form == X86Local::MRMXrCC || - Form == X86Local::MRMXmCC || Form == X86Local::AddCCFrm) { + Form == X86Local::MRMXmCC || Form == X86Local::AddCCFrm || + Form == X86Local::MRMDestMem4VOp3CC) { uint8_t Count = Form == X86Local::AddRegFrm ? 8 : 16; assert(((opcodeToSet % Count) == 0) && "ADDREG_FRM opcode not aligned");