diff --git a/translator/include/xbyak_translator_aarch64/xbyak.h b/translator/include/xbyak_translator_aarch64/xbyak.h index f7b7e02a..af716065 100644 --- a/translator/include/xbyak_translator_aarch64/xbyak.h +++ b/translator/include/xbyak_translator_aarch64/xbyak.h @@ -1,18 +1,18 @@ /******************************************************************************* -* Copyright 2020 FUJITSU LIMITED -* -* Licensed under the Apache License, Version 2.0 (the ""License""); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an ""AS IS"" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*******************************************************************************/ + * Copyright 2020 FUJITSU LIMITED + * + * Licensed under the Apache License, Version 2.0 (the ""License""); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an ""AS IS"" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ /******************************************************************************* * Copyright 2016-2019 Intel Corporation @@ -64,52 +64,53 @@ #define XBYAK_XBYAK_H_ #ifndef XBYAK64 - #define XBYAK64 +#define XBYAK64 #endif #ifndef XBYAK_DISABLE_SEGMENT - #define XBYAK_DISABLE_SEGMENT +#define XBYAK_DISABLE_SEGMENT #endif #ifndef DNNL_AARCH64_JIT_AARCH64 - #define DNNL_AARCH64_JIT_AARCH64 +#define DNNL_AARCH64_JIT_AARCH64 #endif #ifndef XBYAK_AARCH64_FOR_DNNL - #define XBYAK_AARCH64_FOR_DNNL // should be remove in the future +#define XBYAK_AARCH64_FOR_DNNL // should be remove in the future #endif #ifndef XBYAK_TRANSLATE_AARCH64 - #define XBYAK_TRANSLATE_AARCH64 +#define XBYAK_TRANSLATE_AARCH64 #endif #ifndef XT_AARCH64_STACK_REG - #define XT_AARCH64_STACK_REG +#define XT_AARCH64_STACK_REG #endif #ifndef XBYAK_AARCH64_LIB - #define XBYAK_AARCH64_LIB 1 +#define XBYAK_AARCH64_LIB 1 #endif /*! - @file xbyak.h - @brief Xbyak ; JIT assembler for x86(IA32)/x64 by C++ - @author herumi - @url https://github.com/herumi/xbyak - @note modified new BSD license - http://opensource.org/licenses/BSD-3-Clause + @file xbyak.h + @brief Xbyak ; JIT assembler for x86(IA32)/x64 by C++ + @author herumi + @url https://github.com/herumi/xbyak + @note modified new BSD license + http://opensource.org/licenses/BSD-3-Clause */ #if !defined(XBYAK_USE_OP_NAMES) && !defined(XBYAK_NO_OP_NAMES) - #define XBYAK_NO_OP_NAMES +#define XBYAK_NO_OP_NAMES #endif #ifndef XBYAK_NO_OP_NAMES - #if not + 0 // trick to detect whether 'not' is operator or not - #error "use -fno-operator-names option if you want to use and(), or(), xor(), not() as function names, Or define XBYAK_NO_OP_NAMES and use and_(), or_(), xor_(), not_()." - #endif +#if not +0 // trick to detect whether 'not' is operator or not +#error \ + "use -fno-operator-names option if you want to use and(), or(), xor(), not() as function names, Or define XBYAK_NO_OP_NAMES and use and_(), or_(), xor_(), not_()." +#endif #endif -#include // for debug print +#include #include #include +#include // for debug print #include -#include #if !defined(NDEBUG) || defined(XBYAK_TRANSLATE_AARCH64) - #include +#include #endif #include @@ -129,16 +130,17 @@ extern "C" { // #define XBYAK_DISABLE_AVX512 #ifndef XBYAK_USE_MMAP_ALLOCATOR - #define XBYAK_USE_MMAP_ALLOCATOR +#define XBYAK_USE_MMAP_ALLOCATOR #endif #if !defined(__GNUC__) || defined(__MINGW32__) - #undef XBYAK_USE_MMAP_ALLOCATOR +#undef XBYAK_USE_MMAP_ALLOCATOR #endif #ifdef __GNUC__ - #define XBYAK_GNUC_PREREQ(major, minor) ((__GNUC__) * 100 + (__GNUC_MINOR__) >= (major) * 100 + (minor)) +#define XBYAK_GNUC_PREREQ(major, minor) \ + ((__GNUC__)*100 + (__GNUC_MINOR__) >= (major)*100 + (minor)) #else - #define XBYAK_GNUC_PREREQ(major, minor) 0 +#define XBYAK_GNUC_PREREQ(major, minor) 0 #endif #define XBYAK_STD_UNORDERED_SET std::unordered_set @@ -146,45 +148,46 @@ extern "C" { #define XBYAK_STD_UNORDERED_MULTIMAP std::unordered_multimap #ifdef _WIN32 - #include - #include - #include +#include +#include +#include #elif defined(__GNUC__) - #include - #include - #include +#include +#include +#include #endif #if defined(__APPLE__) && defined(MAP_JIT) - #define XBYAK_USE_MAP_JIT - #include +#define XBYAK_USE_MAP_JIT +#include #endif #if !defined(_MSC_VER) || (_MSC_VER >= 1600) - #include +#include #endif -#if defined(_WIN64) || defined(__MINGW64__) || (defined(__CYGWIN__) && defined(__x86_64__)) - #define XBYAK64_WIN +#if defined(_WIN64) || defined(__MINGW64__) || \ + (defined(__CYGWIN__) && defined(__x86_64__)) +#define XBYAK64_WIN #elif defined(__x86_64__) - #define XBYAK64_GCC +#define XBYAK64_GCC #endif #if !defined(XBYAK64) && !defined(XBYAK32) - #if defined(XBYAK64_GCC) || defined(XBYAK64_WIN) - #define XBYAK64 - #else - #define XBYAK32 - #endif +#if defined(XBYAK64_GCC) || defined(XBYAK64_WIN) +#define XBYAK64 +#else +#define XBYAK32 +#endif #endif #if (__cplusplus >= 201103) || (_MSC_VER >= 1800) - #define XBYAK_VARIADIC_TEMPLATE +#define XBYAK_VARIADIC_TEMPLATE #endif #ifdef _MSC_VER - #pragma warning(push) - #pragma warning(disable : 4514) /* remove inline function */ - #pragma warning(disable : 4786) /* identifier is too long */ - #pragma warning(disable : 4503) /* name is too long */ - #pragma warning(disable : 4127) /* constant expresison */ +#pragma warning(push) +#pragma warning(disable : 4514) /* remove inline function */ +#pragma warning(disable : 4786) /* identifier is too long */ +#pragma warning(disable : 4503) /* name is too long */ +#pragma warning(disable : 4127) /* constant expresison */ #endif #include "xbyak_translator_utils.h" @@ -197,8 +200,8 @@ namespace Xbyak { namespace xa = Xbyak_aarch64; enum { - DEFAULT_MAX_CODE_SIZE = 4096, - VERSION = 0x5890 /* 0xABCD = A.BC(D) */ + DEFAULT_MAX_CODE_SIZE = 4096, + VERSION = 0x5890 /* 0xABCD = A.BC(D) */ }; typedef uint64_t uint64; @@ -208,256 +211,255 @@ typedef uint16_t uint16; typedef uint8_t uint8; #ifndef MIE_ALIGN - #ifdef _MSC_VER - #define MIE_ALIGN(x) __declspec(align(x)) - #else - #define MIE_ALIGN(x) __attribute__((aligned(x))) - #endif +#ifdef _MSC_VER +#define MIE_ALIGN(x) __declspec(align(x)) +#else +#define MIE_ALIGN(x) __attribute__((aligned(x))) +#endif #endif #ifndef MIE_PACK // for shufps - #define MIE_PACK(x, y, z, w) ((x) * 64 + (y) * 16 + (z) * 4 + (w)) +#define MIE_PACK(x, y, z, w) ((x)*64 + (y)*16 + (z)*4 + (w)) #endif enum { - ERR_NONE = 0, - ERR_BAD_ADDRESSING, - ERR_CODE_IS_TOO_BIG, - ERR_BAD_SCALE, - ERR_ESP_CANT_BE_INDEX, - ERR_BAD_COMBINATION, - ERR_BAD_SIZE_OF_REGISTER, - ERR_IMM_IS_TOO_BIG, - ERR_BAD_ALIGN, - ERR_LABEL_IS_REDEFINED, - ERR_LABEL_IS_TOO_FAR, - ERR_LABEL_IS_NOT_FOUND, - ERR_CODE_ISNOT_COPYABLE, - ERR_BAD_PARAMETER, - ERR_CANT_PROTECT, - ERR_CANT_USE_64BIT_DISP, - ERR_OFFSET_IS_TOO_BIG, - ERR_MEM_SIZE_IS_NOT_SPECIFIED, - ERR_BAD_MEM_SIZE, - ERR_BAD_ST_COMBINATION, - ERR_OVER_LOCAL_LABEL, // not used - ERR_UNDER_LOCAL_LABEL, - ERR_CANT_ALLOC, - ERR_ONLY_T_NEAR_IS_SUPPORTED_IN_AUTO_GROW, - ERR_BAD_PROTECT_MODE, - ERR_BAD_PNUM, - ERR_BAD_TNUM, - ERR_BAD_VSIB_ADDRESSING, - ERR_CANT_CONVERT, - ERR_LABEL_ISNOT_SET_BY_L, - ERR_LABEL_IS_ALREADY_SET_BY_L, - ERR_BAD_LABEL_STR, - ERR_MUNMAP, - ERR_OPMASK_IS_ALREADY_SET, - ERR_ROUNDING_IS_ALREADY_SET, - ERR_K0_IS_INVALID, - ERR_EVEX_IS_INVALID, - ERR_SAE_IS_INVALID, - ERR_ER_IS_INVALID, - ERR_INVALID_BROADCAST, - ERR_INVALID_OPMASK_WITH_MEMORY, - ERR_INVALID_ZERO, - ERR_INVALID_RIP_IN_AUTO_GROW, - ERR_INVALID_MIB_ADDRESS, - ERR_X2APIC_IS_NOT_SUPPORTED, - ERR_INTERNAL // Put it at last. + ERR_NONE = 0, + ERR_BAD_ADDRESSING, + ERR_CODE_IS_TOO_BIG, + ERR_BAD_SCALE, + ERR_ESP_CANT_BE_INDEX, + ERR_BAD_COMBINATION, + ERR_BAD_SIZE_OF_REGISTER, + ERR_IMM_IS_TOO_BIG, + ERR_BAD_ALIGN, + ERR_LABEL_IS_REDEFINED, + ERR_LABEL_IS_TOO_FAR, + ERR_LABEL_IS_NOT_FOUND, + ERR_CODE_ISNOT_COPYABLE, + ERR_BAD_PARAMETER, + ERR_CANT_PROTECT, + ERR_CANT_USE_64BIT_DISP, + ERR_OFFSET_IS_TOO_BIG, + ERR_MEM_SIZE_IS_NOT_SPECIFIED, + ERR_BAD_MEM_SIZE, + ERR_BAD_ST_COMBINATION, + ERR_OVER_LOCAL_LABEL, // not used + ERR_UNDER_LOCAL_LABEL, + ERR_CANT_ALLOC, + ERR_ONLY_T_NEAR_IS_SUPPORTED_IN_AUTO_GROW, + ERR_BAD_PROTECT_MODE, + ERR_BAD_PNUM, + ERR_BAD_TNUM, + ERR_BAD_VSIB_ADDRESSING, + ERR_CANT_CONVERT, + ERR_LABEL_ISNOT_SET_BY_L, + ERR_LABEL_IS_ALREADY_SET_BY_L, + ERR_BAD_LABEL_STR, + ERR_MUNMAP, + ERR_OPMASK_IS_ALREADY_SET, + ERR_ROUNDING_IS_ALREADY_SET, + ERR_K0_IS_INVALID, + ERR_EVEX_IS_INVALID, + ERR_SAE_IS_INVALID, + ERR_ER_IS_INVALID, + ERR_INVALID_BROADCAST, + ERR_INVALID_OPMASK_WITH_MEMORY, + ERR_INVALID_ZERO, + ERR_INVALID_RIP_IN_AUTO_GROW, + ERR_INVALID_MIB_ADDRESS, + ERR_X2APIC_IS_NOT_SUPPORTED, + ERR_INTERNAL // Put it at last. }; class Error : public std::exception { - int err_; + int err_; + public: - explicit Error(int err) : err_(err) - { - if (err_ < 0 || err_ > ERR_INTERNAL) { - err_ = ERR_INTERNAL; - } - } - operator int() const { return err_; } - const char *what() const throw() - { - static const char *errTbl[] = { - "none", - "bad addressing", - "code is too big", - "bad scale", - "esp can't be index", - "bad combination", - "bad size of register", - "imm is too big", - "bad align", - "label is redefined", - "label is too far", - "label is not found", - "code is not copyable", - "bad parameter", - "can't protect", - "can't use 64bit disp(use (void*))", - "offset is too big", - "MEM size is not specified", - "bad mem size", - "bad st combination", - "over local label", - "under local label", - "can't alloc", - "T_SHORT is not supported in AutoGrow", - "bad protect mode", - "bad pNum", - "bad tNum", - "bad vsib addressing", - "can't convert", - "label is not set by L()", - "label is already set by L()", - "bad label string", - "err munmap", - "opmask is already set", - "rounding is already set", - "k0 is invalid", - "evex is invalid", - "sae(suppress all exceptions) is invalid", - "er(embedded rounding) is invalid", - "invalid broadcast", - "invalid opmask with memory", - "invalid zero", - "invalid rip in AutoGrow", - "invalid mib address", - "x2APIC is not supported", - "internal error" - }; - assert(err_ <= ERR_INTERNAL); - assert(ERR_INTERNAL + 1 == sizeof(errTbl) / sizeof(*errTbl)); - return errTbl[err_]; - } + explicit Error(int err) : err_(err) { + if (err_ < 0 || err_ > ERR_INTERNAL) { + err_ = ERR_INTERNAL; + } + } + operator int() const { return err_; } + const char *what() const throw() { + static const char *errTbl[] = {"none", + "bad addressing", + "code is too big", + "bad scale", + "esp can't be index", + "bad combination", + "bad size of register", + "imm is too big", + "bad align", + "label is redefined", + "label is too far", + "label is not found", + "code is not copyable", + "bad parameter", + "can't protect", + "can't use 64bit disp(use (void*))", + "offset is too big", + "MEM size is not specified", + "bad mem size", + "bad st combination", + "over local label", + "under local label", + "can't alloc", + "T_SHORT is not supported in AutoGrow", + "bad protect mode", + "bad pNum", + "bad tNum", + "bad vsib addressing", + "can't convert", + "label is not set by L()", + "label is already set by L()", + "bad label string", + "err munmap", + "opmask is already set", + "rounding is already set", + "k0 is invalid", + "evex is invalid", + "sae(suppress all exceptions) is invalid", + "er(embedded rounding) is invalid", + "invalid broadcast", + "invalid opmask with memory", + "invalid zero", + "invalid rip in AutoGrow", + "invalid mib address", + "x2APIC is not supported", + "internal error"}; + assert(err_ <= ERR_INTERNAL); + assert(ERR_INTERNAL + 1 == sizeof(errTbl) / sizeof(*errTbl)); + return errTbl[err_]; + } }; -inline const char *ConvertErrorToString(const Error& err) -{ - return err.what(); -} +inline const char *ConvertErrorToString(const Error &err) { return err.what(); } -inline void *AlignedMalloc(size_t size, size_t alignment) -{ +inline void *AlignedMalloc(size_t size, size_t alignment) { #ifdef __MINGW32__ - return __mingw_aligned_malloc(size, alignment); + return __mingw_aligned_malloc(size, alignment); #elif defined(_WIN32) - return _aligned_malloc(size, alignment); + return _aligned_malloc(size, alignment); #else - void *p; - int ret = posix_memalign(&p, alignment, size); - return (ret == 0) ? p : 0; + void *p; + int ret = posix_memalign(&p, alignment, size); + return (ret == 0) ? p : 0; #endif } -inline void AlignedFree(void *p) -{ +inline void AlignedFree(void *p) { #ifdef __MINGW32__ - __mingw_aligned_free(p); + __mingw_aligned_free(p); #elif defined(_MSC_VER) - _aligned_free(p); + _aligned_free(p); #else - free(p); + free(p); #endif } -template -inline const To CastTo(From p) throw() -{ - return (const To)(size_t)(p); +template inline const To CastTo(From p) throw() { + return (const To)(size_t)(p); } namespace inner { static const size_t ALIGN_PAGE_SIZE = 4096; inline bool IsInDisp8(uint32 x) { return 0xFFFFFF80 <= x || x <= 0x7F; } -inline bool IsInInt32(uint64 x) { return ~uint64(0x7fffffffu) <= x || x <= 0x7FFFFFFFU; } +inline bool IsInInt32(uint64 x) { + return ~uint64(0x7fffffffu) <= x || x <= 0x7FFFFFFFU; +} -inline uint32 VerifyInInt32(uint64 x) -{ +inline uint32 VerifyInInt32(uint64 x) { #ifdef XBYAK64 - if (!IsInInt32(x)) throw Error(ERR_OFFSET_IS_TOO_BIG); + if (!IsInInt32(x)) + throw Error(ERR_OFFSET_IS_TOO_BIG); #endif - return static_cast(x); + return static_cast(x); } enum LabelMode { - LasIs, // as is - Labs, // absolute - LaddTop // (addr + top) for mov(reg, label) with AutoGrow + LasIs, // as is + Labs, // absolute + LaddTop // (addr + top) for mov(reg, label) with AutoGrow }; -} // inner +} // namespace inner /* - custom allocator + custom allocator */ struct Allocator { - virtual uint8 *alloc(size_t size) { return reinterpret_cast(AlignedMalloc(size, inner::ALIGN_PAGE_SIZE)); } - virtual void free(uint8 *p) { AlignedFree(p); } - virtual ~Allocator() {} - /* override to return false if you call protect() manually */ - virtual bool useProtect() const { return true; } + virtual uint8 *alloc(size_t size) { + return reinterpret_cast( + AlignedMalloc(size, inner::ALIGN_PAGE_SIZE)); + } + virtual void free(uint8 *p) { AlignedFree(p); } + virtual ~Allocator() {} + /* override to return false if you call protect() manually */ + virtual bool useProtect() const { return true; } }; #ifdef XBYAK_USE_MMAP_ALLOCATOR #ifdef XBYAK_USE_MAP_JIT namespace util { -inline int getMacOsVersionPure() -{ - char buf[64]; - size_t size = sizeof(buf); - int err = sysctlbyname("kern.osrelease", buf, &size, NULL, 0); - if (err != 0) return 0; - char *endp; - int major = strtol(buf, &endp, 10); - if (*endp != '.') return 0; - return major; +inline int getMacOsVersionPure() { + char buf[64]; + size_t size = sizeof(buf); + int err = sysctlbyname("kern.osrelease", buf, &size, NULL, 0); + if (err != 0) + return 0; + char *endp; + int major = strtol(buf, &endp, 10); + if (*endp != '.') + return 0; + return major; } -inline int getMacOsVersion() -{ - static const int version = getMacOsVersionPure(); - return version; +inline int getMacOsVersion() { + static const int version = getMacOsVersionPure(); + return version; } -} // util +} // namespace util #endif class MmapAllocator : Allocator { - typedef XBYAK_STD_UNORDERED_MAP SizeList; - SizeList sizeList_; + typedef XBYAK_STD_UNORDERED_MAP SizeList; + SizeList sizeList_; + public: - uint8 *alloc(size_t size) - { - const size_t alignedSizeM1 = inner::ALIGN_PAGE_SIZE - 1; - size = (size + alignedSizeM1) & ~alignedSizeM1; + uint8 *alloc(size_t size) { + const size_t alignedSizeM1 = inner::ALIGN_PAGE_SIZE - 1; + size = (size + alignedSizeM1) & ~alignedSizeM1; #if defined(XBYAK_USE_MAP_JIT) - int mode = MAP_PRIVATE | MAP_ANONYMOUS; - const int mojaveVersion = 18; - if (util::getMacOsVersion() >= mojaveVersion) mode |= MAP_JIT; + int mode = MAP_PRIVATE | MAP_ANONYMOUS; + const int mojaveVersion = 18; + if (util::getMacOsVersion() >= mojaveVersion) + mode |= MAP_JIT; #elif defined(MAP_ANONYMOUS) - const int mode = MAP_PRIVATE | MAP_ANONYMOUS; + const int mode = MAP_PRIVATE | MAP_ANONYMOUS; #elif defined(MAP_ANON) - const int mode = MAP_PRIVATE | MAP_ANON; + const int mode = MAP_PRIVATE | MAP_ANON; #else - #error "not supported" +#error "not supported" #endif - void *p = mmap(NULL, size, PROT_READ | PROT_WRITE, mode, -1, 0); - if (p == MAP_FAILED) throw Error(ERR_CANT_ALLOC); - assert(p); - sizeList_[(uintptr_t)p] = size; - return (uint8*)p; - } - void free(uint8 *p) - { - if (p == 0) return; - SizeList::iterator i = sizeList_.find((uintptr_t)p); - if (i == sizeList_.end()) throw Error(ERR_BAD_PARAMETER); - if (munmap((void*)i->first, i->second) < 0) throw Error(ERR_MUNMAP); - sizeList_.erase(i); - } + void *p = mmap(NULL, size, PROT_READ | PROT_WRITE, mode, -1, 0); + if (p == MAP_FAILED) + throw Error(ERR_CANT_ALLOC); + assert(p); + sizeList_[(uintptr_t)p] = size; + return (uint8 *)p; + } + void free(uint8 *p) { + if (p == 0) + return; + SizeList::iterator i = sizeList_.find((uintptr_t)p); + if (i == sizeList_.end()) + throw Error(ERR_BAD_PARAMETER); + if (munmap((void *)i->first, i->second) < 0) + throw Error(ERR_MUNMAP); + sizeList_.erase(i); + } }; #endif @@ -465,203 +467,296 @@ class Address; class Reg; class Operand { - static const uint8 EXT8BIT = 0x20; - unsigned int idx_:6; // 0..31 + EXT8BIT = 1 if spl/bpl/sil/dil - unsigned int kind_:9; - unsigned int bit_:10; + static const uint8 EXT8BIT = 0x20; + unsigned int idx_ : 6; // 0..31 + EXT8BIT = 1 if spl/bpl/sil/dil + unsigned int kind_ : 9; + unsigned int bit_ : 10; + protected: - unsigned int zero_:1; - unsigned int mask_:3; - unsigned int rounding_:3; - void setIdx(int idx) { idx_ = idx; } + unsigned int zero_ : 1; + unsigned int mask_ : 3; + unsigned int rounding_ : 3; + void setIdx(int idx) { idx_ = idx; } + public: - enum Kind { - NONE = 0, - MEM = 1 << 0, - REG = 1 << 1, - MMX = 1 << 2, - FPU = 1 << 3, - XMM = 1 << 4, - YMM = 1 << 5, - ZMM = 1 << 6, - OPMASK = 1 << 7, - BNDREG = 1 << 8 - }; - enum Code { + enum Kind { + NONE = 0, + MEM = 1 << 0, + REG = 1 << 1, + MMX = 1 << 2, + FPU = 1 << 3, + XMM = 1 << 4, + YMM = 1 << 5, + ZMM = 1 << 6, + OPMASK = 1 << 7, + BNDREG = 1 << 8 + }; + enum Code { #ifdef XBYAK64 - RAX = 0, RCX, RDX, RBX, RSP, RBP, RSI, RDI, R8, R9, R10, R11, R12, R13, R14, R15, - R8D = 8, R9D, R10D, R11D, R12D, R13D, R14D, R15D, - R8W = 8, R9W, R10W, R11W, R12W, R13W, R14W, R15W, - R8B = 8, R9B, R10B, R11B, R12B, R13B, R14B, R15B, - SPL = 4, BPL, SIL, DIL, + RAX = 0, + RCX, + RDX, + RBX, + RSP, + RBP, + RSI, + RDI, + R8, + R9, + R10, + R11, + R12, + R13, + R14, + R15, + R8D = 8, + R9D, + R10D, + R11D, + R12D, + R13D, + R14D, + R15D, + R8W = 8, + R9W, + R10W, + R11W, + R12W, + R13W, + R14W, + R15W, + R8B = 8, + R9B, + R10B, + R11B, + R12B, + R13B, + R14B, + R15B, + SPL = 4, + BPL, + SIL, + DIL, #endif - EAX = 0, ECX, EDX, EBX, ESP, EBP, ESI, EDI, - AX = 0, CX, DX, BX, SP, BP, SI, DI, - AL = 0, CL, DL, BL, AH, CH, DH, BH - }; - Operand() : idx_(0), kind_(0), bit_(0), zero_(0), mask_(0), rounding_(0) { } - Operand(int idx, Kind kind, int bit, bool ext8bit = 0) - : idx_(static_cast(idx | (ext8bit ? EXT8BIT : 0))) - , kind_(kind) - , bit_(bit) - , zero_(0), mask_(0), rounding_(0) - { - assert((bit_ & (bit_ - 1)) == 0); // bit must be power of two - } - Kind getKind() const { return static_cast(kind_); } - int getIdx() const { return idx_ & (EXT8BIT - 1); } - bool isNone() const { return kind_ == 0; } - bool isMMX() const { return is(MMX); } - bool isXMM() const { return is(XMM); } - bool isYMM() const { return is(YMM); } - bool isZMM() const { return is(ZMM); } - bool isXMEM() const { return is(XMM | MEM); } - bool isYMEM() const { return is(YMM | MEM); } - bool isZMEM() const { return is(ZMM | MEM); } - bool isOPMASK() const { return is(OPMASK); } - bool isBNDREG() const { return is(BNDREG); } - bool isREG(int bit = 0) const { return is(REG, bit); } - bool isMEM(int bit = 0) const { return is(MEM, bit); } - bool isFPU() const { return is(FPU); } - bool isExt8bit() const { return (idx_ & EXT8BIT) != 0; } - bool isExtIdx() const { return (getIdx() & 8) != 0; } - bool isExtIdx2() const { return (getIdx() & 16) != 0; } - bool hasEvex() const { return isZMM() || isExtIdx2() || getOpmaskIdx() || getRounding(); } - bool hasRex() const { return isExt8bit() || isREG(64) || isExtIdx(); } - bool hasZero() const { return zero_; } - int getOpmaskIdx() const { return mask_; } - int getRounding() const { return rounding_; } - void setKind(Kind kind) - { - if ((kind & (XMM|YMM|ZMM)) == 0) return; - kind_ = kind; - bit_ = kind == XMM ? 128 : kind == YMM ? 256 : 512; - } - // err if MMX/FPU/OPMASK/BNDREG - void setBit(int bit); - void setOpmaskIdx(int idx, bool ignore_idx0 = false) - { - if (!ignore_idx0 && idx == 0) throw Error(ERR_K0_IS_INVALID); - if (mask_) throw Error(ERR_OPMASK_IS_ALREADY_SET); - mask_ = idx; - } - void setRounding(int idx) - { - if (rounding_) throw Error(ERR_ROUNDING_IS_ALREADY_SET); - rounding_ = idx; - } - void setZero() { zero_ = true; } - // ah, ch, dh, bh? - bool isHigh8bit() const - { - if (!isBit(8)) return false; - if (isExt8bit()) return false; - const int idx = getIdx(); - return AH <= idx && idx <= BH; - } - // any bit is accetable if bit == 0 - bool is(int kind, uint32 bit = 0) const - { - return (kind == 0 || (kind_ & kind)) && (bit == 0 || (bit_ & bit)); // cf. you can set (8|16) - } - bool isBit(uint32 bit) const { return (bit_ & bit) != 0; } - uint32 getBit() const { return bit_; } - const char *toString() const - { - const int idx = getIdx(); - if (kind_ == REG) { - if (isExt8bit()) { - static const char *tbl[4] = { "spl", "bpl", "sil", "dil" }; - return tbl[idx - 4]; - } - static const char *tbl[4][16] = { - { "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh", "r8b", "r9b", "r10b", "r11b", "r12b", "r13b", "r14b", "r15b" }, - { "ax", "cx", "dx", "bx", "sp", "bp", "si", "di", "r8w", "r9w", "r10w", "r11w", "r12w", "r13w", "r14w", "r15w" }, - { "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi", "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d" }, - { "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15" }, - }; - return tbl[bit_ == 8 ? 0 : bit_ == 16 ? 1 : bit_ == 32 ? 2 : 3][idx]; - } else if (isOPMASK()) { - static const char *tbl[8] = { "k0", "k1", "k2", "k3", "k4", "k5", "k6", "k7" }; - return tbl[idx]; - } else if (isZMM()) { - static const char *tbl[32] = { - "zmm0", "zmm1", "zmm2", "zmm3", "zmm4", "zmm5", "zmm6", "zmm7", "zmm8", "zmm9", "zmm10", "zmm11", "zmm12", "zmm13", "zmm14", "zmm15", - "zmm16", "zmm17", "zmm18", "zmm19", "zmm20", "zmm21", "zmm22", "zmm23", "zmm24", "zmm25", "zmm26", "zmm27", "zmm28", "zmm29", "zmm30", "zmm31" - }; - return tbl[idx]; - } else if (isYMM()) { - static const char *tbl[32] = { - "ymm0", "ymm1", "ymm2", "ymm3", "ymm4", "ymm5", "ymm6", "ymm7", "ymm8", "ymm9", "ymm10", "ymm11", "ymm12", "ymm13", "ymm14", "ymm15", - "ymm16", "ymm17", "ymm18", "ymm19", "ymm20", "ymm21", "ymm22", "ymm23", "ymm24", "ymm25", "ymm26", "ymm27", "ymm28", "ymm29", "ymm30", "ymm31" - }; - return tbl[idx]; - } else if (isXMM()) { - static const char *tbl[32] = { - "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15", - "xmm16", "xmm17", "xmm18", "xmm19", "xmm20", "xmm21", "xmm22", "xmm23", "xmm24", "xmm25", "xmm26", "xmm27", "xmm28", "xmm29", "xmm30", "xmm31" - }; - return tbl[idx]; - } else if (isMMX()) { - static const char *tbl[8] = { "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7" }; - return tbl[idx]; - } else if (isFPU()) { - static const char *tbl[8] = { "st0", "st1", "st2", "st3", "st4", "st5", "st6", "st7" }; - return tbl[idx]; - } else if (isBNDREG()) { - static const char *tbl[4] = { "bnd0", "bnd1", "bnd2", "bnd3" }; - return tbl[idx]; - } - throw Error(ERR_INTERNAL); - } - bool isEqualIfNotInherited(const Operand& rhs) const { return idx_ == rhs.idx_ && kind_ == rhs.kind_ && bit_ == rhs.bit_ && zero_ == rhs.zero_ && mask_ == rhs.mask_ && rounding_ == rhs.rounding_; } - bool operator==(const Operand& rhs) const; - bool operator!=(const Operand& rhs) const { return !operator==(rhs); } - const Address& getAddress() const; - const Reg& getReg() const; + EAX = 0, + ECX, + EDX, + EBX, + ESP, + EBP, + ESI, + EDI, + AX = 0, + CX, + DX, + BX, + SP, + BP, + SI, + DI, + AL = 0, + CL, + DL, + BL, + AH, + CH, + DH, + BH + }; + Operand() : idx_(0), kind_(0), bit_(0), zero_(0), mask_(0), rounding_(0) {} + Operand(int idx, Kind kind, int bit, bool ext8bit = 0) + : idx_(static_cast(idx | (ext8bit ? EXT8BIT : 0))), kind_(kind), + bit_(bit), zero_(0), mask_(0), rounding_(0) { + assert((bit_ & (bit_ - 1)) == 0); // bit must be power of two + } + Kind getKind() const { return static_cast(kind_); } + int getIdx() const { return idx_ & (EXT8BIT - 1); } + bool isNone() const { return kind_ == 0; } + bool isMMX() const { return is(MMX); } + bool isXMM() const { return is(XMM); } + bool isYMM() const { return is(YMM); } + bool isZMM() const { return is(ZMM); } + bool isXMEM() const { return is(XMM | MEM); } + bool isYMEM() const { return is(YMM | MEM); } + bool isZMEM() const { return is(ZMM | MEM); } + bool isOPMASK() const { return is(OPMASK); } + bool isBNDREG() const { return is(BNDREG); } + bool isREG(int bit = 0) const { return is(REG, bit); } + bool isMEM(int bit = 0) const { return is(MEM, bit); } + bool isFPU() const { return is(FPU); } + bool isExt8bit() const { return (idx_ & EXT8BIT) != 0; } + bool isExtIdx() const { return (getIdx() & 8) != 0; } + bool isExtIdx2() const { return (getIdx() & 16) != 0; } + bool hasEvex() const { + return isZMM() || isExtIdx2() || getOpmaskIdx() || getRounding(); + } + bool hasRex() const { return isExt8bit() || isREG(64) || isExtIdx(); } + bool hasZero() const { return zero_; } + int getOpmaskIdx() const { return mask_; } + int getRounding() const { return rounding_; } + void setKind(Kind kind) { + if ((kind & (XMM | YMM | ZMM)) == 0) + return; + kind_ = kind; + bit_ = kind == XMM ? 128 : kind == YMM ? 256 : 512; + } + // err if MMX/FPU/OPMASK/BNDREG + void setBit(int bit); + void setOpmaskIdx(int idx, bool ignore_idx0 = false) { + if (!ignore_idx0 && idx == 0) + throw Error(ERR_K0_IS_INVALID); + if (mask_) + throw Error(ERR_OPMASK_IS_ALREADY_SET); + mask_ = idx; + } + void setRounding(int idx) { + if (rounding_) + throw Error(ERR_ROUNDING_IS_ALREADY_SET); + rounding_ = idx; + } + void setZero() { zero_ = true; } + // ah, ch, dh, bh? + bool isHigh8bit() const { + if (!isBit(8)) + return false; + if (isExt8bit()) + return false; + const int idx = getIdx(); + return AH <= idx && idx <= BH; + } + // any bit is accetable if bit == 0 + bool is(int kind, uint32 bit = 0) const { + return (kind == 0 || (kind_ & kind)) && + (bit == 0 || (bit_ & bit)); // cf. you can set (8|16) + } + bool isBit(uint32 bit) const { return (bit_ & bit) != 0; } + uint32 getBit() const { return bit_; } + const char *toString() const { + const int idx = getIdx(); + if (kind_ == REG) { + if (isExt8bit()) { + static const char *tbl[4] = {"spl", "bpl", "sil", "dil"}; + return tbl[idx - 4]; + } + static const char *tbl[4][16] = { + {"al", "cl", "dl", "bl", "ah", "ch", "dh", "bh", "r8b", "r9b", "r10b", + "r11b", "r12b", "r13b", "r14b", "r15b"}, + {"ax", "cx", "dx", "bx", "sp", "bp", "si", "di", "r8w", "r9w", "r10w", + "r11w", "r12w", "r13w", "r14w", "r15w"}, + {"eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi", "r8d", "r9d", + "r10d", "r11d", "r12d", "r13d", "r14d", "r15d"}, + {"rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi", "r8", "r9", + "r10", "r11", "r12", "r13", "r14", "r15"}, + }; + return tbl[bit_ == 8 ? 0 : bit_ == 16 ? 1 : bit_ == 32 ? 2 : 3][idx]; + } else if (isOPMASK()) { + static const char *tbl[8] = {"k0", "k1", "k2", "k3", + "k4", "k5", "k6", "k7"}; + return tbl[idx]; + } else if (isZMM()) { + static const char *tbl[32] = { + "zmm0", "zmm1", "zmm2", "zmm3", "zmm4", "zmm5", "zmm6", + "zmm7", "zmm8", "zmm9", "zmm10", "zmm11", "zmm12", "zmm13", + "zmm14", "zmm15", "zmm16", "zmm17", "zmm18", "zmm19", "zmm20", + "zmm21", "zmm22", "zmm23", "zmm24", "zmm25", "zmm26", "zmm27", + "zmm28", "zmm29", "zmm30", "zmm31"}; + return tbl[idx]; + } else if (isYMM()) { + static const char *tbl[32] = { + "ymm0", "ymm1", "ymm2", "ymm3", "ymm4", "ymm5", "ymm6", + "ymm7", "ymm8", "ymm9", "ymm10", "ymm11", "ymm12", "ymm13", + "ymm14", "ymm15", "ymm16", "ymm17", "ymm18", "ymm19", "ymm20", + "ymm21", "ymm22", "ymm23", "ymm24", "ymm25", "ymm26", "ymm27", + "ymm28", "ymm29", "ymm30", "ymm31"}; + return tbl[idx]; + } else if (isXMM()) { + static const char *tbl[32] = { + "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", + "xmm7", "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", + "xmm14", "xmm15", "xmm16", "xmm17", "xmm18", "xmm19", "xmm20", + "xmm21", "xmm22", "xmm23", "xmm24", "xmm25", "xmm26", "xmm27", + "xmm28", "xmm29", "xmm30", "xmm31"}; + return tbl[idx]; + } else if (isMMX()) { + static const char *tbl[8] = {"mm0", "mm1", "mm2", "mm3", + "mm4", "mm5", "mm6", "mm7"}; + return tbl[idx]; + } else if (isFPU()) { + static const char *tbl[8] = {"st0", "st1", "st2", "st3", + "st4", "st5", "st6", "st7"}; + return tbl[idx]; + } else if (isBNDREG()) { + static const char *tbl[4] = {"bnd0", "bnd1", "bnd2", "bnd3"}; + return tbl[idx]; + } + throw Error(ERR_INTERNAL); + } + bool isEqualIfNotInherited(const Operand &rhs) const { + return idx_ == rhs.idx_ && kind_ == rhs.kind_ && bit_ == rhs.bit_ && + zero_ == rhs.zero_ && mask_ == rhs.mask_ && + rounding_ == rhs.rounding_; + } + bool operator==(const Operand &rhs) const; + bool operator!=(const Operand &rhs) const { return !operator==(rhs); } + const Address &getAddress() const; + const Reg &getReg() const; }; -inline void Operand::setBit(int bit) -{ - if (bit != 8 && bit != 16 && bit != 32 && bit != 64 && bit != 128 && bit != 256 && bit != 512) goto ERR; - if (isBit(bit)) return; - if (is(MEM)) { - bit_ = bit; - return; - } - if (is(REG | XMM | YMM | ZMM)) { - int idx = getIdx(); - // err if converting ah, bh, ch, dh - if (isREG(8) && (4 <= idx && idx < 8) && !isExt8bit()) goto ERR; - Kind kind = REG; - switch (bit) { - case 8: - if (idx >= 16) goto ERR; +inline void Operand::setBit(int bit) { + if (bit != 8 && bit != 16 && bit != 32 && bit != 64 && bit != 128 && + bit != 256 && bit != 512) + goto ERR; + if (isBit(bit)) + return; + if (is(MEM)) { + bit_ = bit; + return; + } + if (is(REG | XMM | YMM | ZMM)) { + int idx = getIdx(); + // err if converting ah, bh, ch, dh + if (isREG(8) && (4 <= idx && idx < 8) && !isExt8bit()) + goto ERR; + Kind kind = REG; + switch (bit) { + case 8: + if (idx >= 16) + goto ERR; #ifdef XBYAK32 - if (idx >= 4) goto ERR; + if (idx >= 4) + goto ERR; #else - if (4 <= idx && idx < 8) idx |= EXT8BIT; + if (4 <= idx && idx < 8) + idx |= EXT8BIT; #endif - break; - case 16: - case 32: - case 64: - if (idx >= 16) goto ERR; - break; - case 128: kind = XMM; break; - case 256: kind = YMM; break; - case 512: kind = ZMM; break; - } - idx_ = idx; - kind_ = kind; - bit_ = bit; - if (bit >= 128) return; // keep mask_ and rounding_ - mask_ = 0; - rounding_ = 0; - return; - } + break; + case 16: + case 32: + case 64: + if (idx >= 16) + goto ERR; + break; + case 128: + kind = XMM; + break; + case 256: + kind = YMM; + break; + case 512: + kind = ZMM; + break; + } + idx_ = idx; + kind_ = kind; + bit_ = bit; + if (bit >= 128) + return; // keep mask_ and rounding_ + mask_ = 0; + rounding_ = 0; + return; + } ERR: - throw Error(ERR_CANT_CONVERT); + throw Error(ERR_CANT_CONVERT); } class Label; @@ -670,435 +765,471 @@ struct Reg8; struct Reg16; struct Reg32; #ifdef XBYAK64 - struct Reg64; +struct Reg64; #endif class Reg : public Operand { public: - Reg() { } - Reg(int idx, Kind kind, int bit = 0, bool ext8bit = false) : Operand(idx, kind, bit, ext8bit) { } - // convert to Reg8/Reg16/Reg32/Reg64/XMM/YMM/ZMM - Reg changeBit(int bit) const { Reg r(*this); r.setBit(bit); return r; } - uint8 getRexW() const { return isREG(64) ? 8 : 0; } - uint8 getRexR() const { return isExtIdx() ? 4 : 0; } - uint8 getRexX() const { return isExtIdx() ? 2 : 0; } - uint8 getRexB() const { return isExtIdx() ? 1 : 0; } - uint8 getRex(const Reg& base = Reg()) const - { - uint8 rex = getRexW() | getRexR() | base.getRexW() | base.getRexB(); - if (rex || isExt8bit() || base.isExt8bit()) rex |= 0x40; - return rex; - } - Reg8 cvt8() const; - Reg16 cvt16() const; - Reg32 cvt32() const; + Reg() {} + Reg(int idx, Kind kind, int bit = 0, bool ext8bit = false) + : Operand(idx, kind, bit, ext8bit) {} + // convert to Reg8/Reg16/Reg32/Reg64/XMM/YMM/ZMM + Reg changeBit(int bit) const { + Reg r(*this); + r.setBit(bit); + return r; + } + uint8 getRexW() const { return isREG(64) ? 8 : 0; } + uint8 getRexR() const { return isExtIdx() ? 4 : 0; } + uint8 getRexX() const { return isExtIdx() ? 2 : 0; } + uint8 getRexB() const { return isExtIdx() ? 1 : 0; } + uint8 getRex(const Reg &base = Reg()) const { + uint8 rex = getRexW() | getRexR() | base.getRexW() | base.getRexB(); + if (rex || isExt8bit() || base.isExt8bit()) + rex |= 0x40; + return rex; + } + Reg8 cvt8() const; + Reg16 cvt16() const; + Reg32 cvt32() const; #ifdef XBYAK64 - Reg64 cvt64() const; + Reg64 cvt64() const; #endif }; -inline const Reg& Operand::getReg() const -{ - assert(!isMEM()); - return static_cast(*this); +inline const Reg &Operand::getReg() const { + assert(!isMEM()); + return static_cast(*this); } struct Reg8 : public Reg { - explicit Reg8(int idx = 0, bool ext8bit = false) : Reg(idx, Operand::REG, 8, ext8bit) { } + explicit Reg8(int idx = 0, bool ext8bit = false) + : Reg(idx, Operand::REG, 8, ext8bit) {} }; struct Reg16 : public Reg { - explicit Reg16(int idx = 0) : Reg(idx, Operand::REG, 16) { } + explicit Reg16(int idx = 0) : Reg(idx, Operand::REG, 16) {} }; struct Mmx : public Reg { - explicit Mmx(int idx = 0, Kind kind = Operand::MMX, int bit = 64) : Reg(idx, kind, bit) { } + explicit Mmx(int idx = 0, Kind kind = Operand::MMX, int bit = 64) + : Reg(idx, kind, bit) {} }; struct EvexModifierRounding { - enum { - T_RN_SAE = 1, - T_RD_SAE = 2, - T_RU_SAE = 3, - T_RZ_SAE = 4, - T_SAE = 5 - }; - explicit EvexModifierRounding(int rounding) : rounding(rounding) {} - int rounding; + enum { T_RN_SAE = 1, T_RD_SAE = 2, T_RU_SAE = 3, T_RZ_SAE = 4, T_SAE = 5 }; + explicit EvexModifierRounding(int rounding) : rounding(rounding) {} + int rounding; +}; +struct EvexModifierZero { + EvexModifierZero() {} }; -struct EvexModifierZero{EvexModifierZero() {}}; struct Xmm : public Mmx { - explicit Xmm(int idx = 0, Kind kind = Operand::XMM, int bit = 128) : Mmx(idx, kind, bit) { } - Xmm(Kind kind, int idx) : Mmx(idx, kind, kind == XMM ? 128 : kind == YMM ? 256 : 512) { } - Xmm operator|(const EvexModifierRounding& emr) const { Xmm r(*this); r.setRounding(emr.rounding); return r; } - Xmm copyAndSetIdx(int idx) const { Xmm ret(*this); ret.setIdx(idx); return ret; } - Xmm copyAndSetKind(Operand::Kind kind) const { Xmm ret(*this); ret.setKind(kind); return ret; } + explicit Xmm(int idx = 0, Kind kind = Operand::XMM, int bit = 128) + : Mmx(idx, kind, bit) {} + Xmm(Kind kind, int idx) + : Mmx(idx, kind, + kind == XMM ? 128 + : kind == YMM ? 256 + : 512) {} + Xmm operator|(const EvexModifierRounding &emr) const { + Xmm r(*this); + r.setRounding(emr.rounding); + return r; + } + Xmm copyAndSetIdx(int idx) const { + Xmm ret(*this); + ret.setIdx(idx); + return ret; + } + Xmm copyAndSetKind(Operand::Kind kind) const { + Xmm ret(*this); + ret.setKind(kind); + return ret; + } }; struct Ymm : public Xmm { - explicit Ymm(int idx = 0, Kind kind = Operand::YMM, int bit = 256) : Xmm(idx, kind, bit) { } - Ymm operator|(const EvexModifierRounding& emr) const { Ymm r(*this); r.setRounding(emr.rounding); return r; } + explicit Ymm(int idx = 0, Kind kind = Operand::YMM, int bit = 256) + : Xmm(idx, kind, bit) {} + Ymm operator|(const EvexModifierRounding &emr) const { + Ymm r(*this); + r.setRounding(emr.rounding); + return r; + } }; struct Zmm : public Ymm { - explicit Zmm(int idx = 0) : Ymm(idx, Operand::ZMM, 512) { } - Zmm operator|(const EvexModifierRounding& emr) const { Zmm r(*this); r.setRounding(emr.rounding); return r; } + explicit Zmm(int idx = 0) : Ymm(idx, Operand::ZMM, 512) {} + Zmm operator|(const EvexModifierRounding &emr) const { + Zmm r(*this); + r.setRounding(emr.rounding); + return r; + } }; struct Opmask : public Reg { - explicit Opmask(int idx = 0) : Reg(idx, Operand::OPMASK, 64) {} + explicit Opmask(int idx = 0) : Reg(idx, Operand::OPMASK, 64) {} }; struct BoundsReg : public Reg { - explicit BoundsReg(int idx = 0) : Reg(idx, Operand::BNDREG, 128) {} + explicit BoundsReg(int idx = 0) : Reg(idx, Operand::BNDREG, 128) {} }; -templateT operator|(const T& x, const Opmask& k) { T r(x); r.setOpmaskIdx(k.getIdx()); return r; } -templateT operator|(const T& x, const EvexModifierZero&) { T r(x); r.setZero(); return r; } -templateT operator|(const T& x, const EvexModifierRounding& emr) { T r(x); r.setRounding(emr.rounding); return r; } +template T operator|(const T &x, const Opmask &k) { + T r(x); + r.setOpmaskIdx(k.getIdx()); + return r; +} +template T operator|(const T &x, const EvexModifierZero &) { + T r(x); + r.setZero(); + return r; +} +template T operator|(const T &x, const EvexModifierRounding &emr) { + T r(x); + r.setRounding(emr.rounding); + return r; +} struct Fpu : public Reg { - explicit Fpu(int idx = 0) : Reg(idx, Operand::FPU, 32) { } + explicit Fpu(int idx = 0) : Reg(idx, Operand::FPU, 32) {} }; struct Reg32e : public Reg { - explicit Reg32e(int idx, int bit) : Reg(idx, Operand::REG, bit) {} + explicit Reg32e(int idx, int bit) : Reg(idx, Operand::REG, bit) {} }; struct Reg32 : public Reg32e { - explicit Reg32(int idx = 0) : Reg32e(idx, 32) {} + explicit Reg32(int idx = 0) : Reg32e(idx, 32) {} }; #ifdef XBYAK64 struct Reg64 : public Reg32e { - explicit Reg64(int idx = 0) : Reg32e(idx, 64) {} + explicit Reg64(int idx = 0) : Reg32e(idx, 64) {} }; struct RegRip { - sint64 disp_; - const Label* label_; - bool isAddr_; - explicit RegRip(sint64 disp = 0, const Label* label = 0, bool isAddr = false) : disp_(disp), label_(label), isAddr_(isAddr) {} - friend const RegRip operator+(const RegRip& r, int disp) { - return RegRip(r.disp_ + disp, r.label_, r.isAddr_); - } - friend const RegRip operator-(const RegRip& r, int disp) { - return RegRip(r.disp_ - disp, r.label_, r.isAddr_); - } - friend const RegRip operator+(const RegRip& r, sint64 disp) { - return RegRip(r.disp_ + disp, r.label_, r.isAddr_); - } - friend const RegRip operator-(const RegRip& r, sint64 disp) { - return RegRip(r.disp_ - disp, r.label_, r.isAddr_); - } - friend const RegRip operator+(const RegRip& r, const Label& label) { - if (r.label_ || r.isAddr_) throw Error(ERR_BAD_ADDRESSING); - return RegRip(r.disp_, &label); - } - friend const RegRip operator+(const RegRip& r, const void *addr) { - if (r.label_ || r.isAddr_) throw Error(ERR_BAD_ADDRESSING); - return RegRip(r.disp_ + (sint64)addr, 0, true); - } + sint64 disp_; + const Label *label_; + bool isAddr_; + explicit RegRip(sint64 disp = 0, const Label *label = 0, bool isAddr = false) + : disp_(disp), label_(label), isAddr_(isAddr) {} + friend const RegRip operator+(const RegRip &r, int disp) { + return RegRip(r.disp_ + disp, r.label_, r.isAddr_); + } + friend const RegRip operator-(const RegRip &r, int disp) { + return RegRip(r.disp_ - disp, r.label_, r.isAddr_); + } + friend const RegRip operator+(const RegRip &r, sint64 disp) { + return RegRip(r.disp_ + disp, r.label_, r.isAddr_); + } + friend const RegRip operator-(const RegRip &r, sint64 disp) { + return RegRip(r.disp_ - disp, r.label_, r.isAddr_); + } + friend const RegRip operator+(const RegRip &r, const Label &label) { + if (r.label_ || r.isAddr_) + throw Error(ERR_BAD_ADDRESSING); + return RegRip(r.disp_, &label); + } + friend const RegRip operator+(const RegRip &r, const void *addr) { + if (r.label_ || r.isAddr_) + throw Error(ERR_BAD_ADDRESSING); + return RegRip(r.disp_ + (sint64)addr, 0, true); + } }; #endif -inline Reg8 Reg::cvt8() const -{ - Reg r = changeBit(8); return Reg8(r.getIdx(), r.isExt8bit()); +inline Reg8 Reg::cvt8() const { + Reg r = changeBit(8); + return Reg8(r.getIdx(), r.isExt8bit()); } -inline Reg16 Reg::cvt16() const -{ - return Reg16(changeBit(16).getIdx()); -} +inline Reg16 Reg::cvt16() const { return Reg16(changeBit(16).getIdx()); } -inline Reg32 Reg::cvt32() const -{ - return Reg32(changeBit(32).getIdx()); -} +inline Reg32 Reg::cvt32() const { return Reg32(changeBit(32).getIdx()); } #ifdef XBYAK64 -inline Reg64 Reg::cvt64() const -{ - return Reg64(changeBit(64).getIdx()); -} +inline Reg64 Reg::cvt64() const { return Reg64(changeBit(64).getIdx()); } #endif class RegExp { public: #ifdef XBYAK64 - enum { i32e = 32 | 64 }; + enum { i32e = 32 | 64 }; #else - enum { i32e = 32 }; + enum { i32e = 32 }; #endif - RegExp(size_t disp = 0) : scale_(0), disp_(disp) { } - RegExp(const Reg& r, int scale = 1) - : scale_(scale) - , disp_(0) - { - if (!r.isREG(i32e) && !r.is(Reg::XMM|Reg::YMM|Reg::ZMM)) throw Error(ERR_BAD_SIZE_OF_REGISTER); - if (scale == 0) return; - if (scale != 1 && scale != 2 && scale != 4 && scale != 8) throw Error(ERR_BAD_SCALE); - if (r.getBit() >= 128 || scale != 1) { // xmm/ymm is always index - index_ = r; - } else { - base_ = r; - } - } - bool isVsib(int bit = 128 | 256 | 512) const { return index_.isBit(bit); } - RegExp optimize() const - { - RegExp exp = *this; - // [reg * 2] => [reg + reg] - if (index_.isBit(i32e) && !base_.getBit() && scale_ == 2) { - exp.base_ = index_; - exp.scale_ = 1; - } - return exp; - } - bool operator==(const RegExp& rhs) const - { - return base_ == rhs.base_ && index_ == rhs.index_ && disp_ == rhs.disp_ && scale_ == rhs.scale_; - } - const Reg& getBase() const { return base_; } - const Reg& getIndex() const { return index_; } - int getScale() const { return scale_; } - size_t getDisp() const { return disp_; } - void verify() const - { - if (base_.getBit() >= 128) throw Error(ERR_BAD_SIZE_OF_REGISTER); - if (index_.getBit() && index_.getBit() <= 64) { - if (index_.getIdx() == Operand::ESP) throw Error(ERR_ESP_CANT_BE_INDEX); - if (base_.getBit() && base_.getBit() != index_.getBit()) throw Error(ERR_BAD_SIZE_OF_REGISTER); - } - } - friend RegExp operator+(const RegExp& a, const RegExp& b); - friend RegExp operator-(const RegExp& e, size_t disp); - uint8 getRex() const - { - uint8 rex = index_.getRexX() | base_.getRexB(); - return rex ? uint8(rex | 0x40) : 0; - } + RegExp(size_t disp = 0) : scale_(0), disp_(disp) {} + RegExp(const Reg &r, int scale = 1) : scale_(scale), disp_(0) { + if (!r.isREG(i32e) && !r.is(Reg::XMM | Reg::YMM | Reg::ZMM)) + throw Error(ERR_BAD_SIZE_OF_REGISTER); + if (scale == 0) + return; + if (scale != 1 && scale != 2 && scale != 4 && scale != 8) + throw Error(ERR_BAD_SCALE); + if (r.getBit() >= 128 || scale != 1) { // xmm/ymm is always index + index_ = r; + } else { + base_ = r; + } + } + bool isVsib(int bit = 128 | 256 | 512) const { return index_.isBit(bit); } + RegExp optimize() const { + RegExp exp = *this; + // [reg * 2] => [reg + reg] + if (index_.isBit(i32e) && !base_.getBit() && scale_ == 2) { + exp.base_ = index_; + exp.scale_ = 1; + } + return exp; + } + bool operator==(const RegExp &rhs) const { + return base_ == rhs.base_ && index_ == rhs.index_ && disp_ == rhs.disp_ && + scale_ == rhs.scale_; + } + const Reg &getBase() const { return base_; } + const Reg &getIndex() const { return index_; } + int getScale() const { return scale_; } + size_t getDisp() const { return disp_; } + void verify() const { + if (base_.getBit() >= 128) + throw Error(ERR_BAD_SIZE_OF_REGISTER); + if (index_.getBit() && index_.getBit() <= 64) { + if (index_.getIdx() == Operand::ESP) + throw Error(ERR_ESP_CANT_BE_INDEX); + if (base_.getBit() && base_.getBit() != index_.getBit()) + throw Error(ERR_BAD_SIZE_OF_REGISTER); + } + } + friend RegExp operator+(const RegExp &a, const RegExp &b); + friend RegExp operator-(const RegExp &e, size_t disp); + uint8 getRex() const { + uint8 rex = index_.getRexX() | base_.getRexB(); + return rex ? uint8(rex | 0x40) : 0; + } + private: - /* - [base_ + index_ * scale_ + disp_] - base : Reg32e, index : Reg32e(w/o esp), Xmm, Ymm - */ - Reg base_; - Reg index_; - int scale_; - size_t disp_; + /* + [base_ + index_ * scale_ + disp_] + base : Reg32e, index : Reg32e(w/o esp), Xmm, Ymm + */ + Reg base_; + Reg index_; + int scale_; + size_t disp_; }; -inline RegExp operator+(const RegExp& a, const RegExp& b) -{ - if (a.index_.getBit() && b.index_.getBit()) throw Error(ERR_BAD_ADDRESSING); - RegExp ret = a; - if (!ret.index_.getBit()) { ret.index_ = b.index_; ret.scale_ = b.scale_; } - if (b.base_.getBit()) { - if (ret.base_.getBit()) { - if (ret.index_.getBit()) throw Error(ERR_BAD_ADDRESSING); - // base + base => base + index * 1 - ret.index_ = b.base_; - // [reg + esp] => [esp + reg] - if (ret.index_.getIdx() == Operand::ESP) std::swap(ret.base_, ret.index_); - ret.scale_ = 1; - } else { - ret.base_ = b.base_; - } - } - ret.disp_ += b.disp_; - return ret; +inline RegExp operator+(const RegExp &a, const RegExp &b) { + if (a.index_.getBit() && b.index_.getBit()) + throw Error(ERR_BAD_ADDRESSING); + RegExp ret = a; + if (!ret.index_.getBit()) { + ret.index_ = b.index_; + ret.scale_ = b.scale_; + } + if (b.base_.getBit()) { + if (ret.base_.getBit()) { + if (ret.index_.getBit()) + throw Error(ERR_BAD_ADDRESSING); + // base + base => base + index * 1 + ret.index_ = b.base_; + // [reg + esp] => [esp + reg] + if (ret.index_.getIdx() == Operand::ESP) + std::swap(ret.base_, ret.index_); + ret.scale_ = 1; + } else { + ret.base_ = b.base_; + } + } + ret.disp_ += b.disp_; + return ret; } -inline RegExp operator*(const Reg& r, int scale) -{ - return RegExp(r, scale); -} -inline RegExp operator-(const RegExp& e, size_t disp) -{ - RegExp ret = e; - ret.disp_ -= disp; - return ret; +inline RegExp operator*(const Reg &r, int scale) { return RegExp(r, scale); } +inline RegExp operator-(const RegExp &e, size_t disp) { + RegExp ret = e; + ret.disp_ -= disp; + return ret; } // 2nd parameter for constructor of CodeArray(maxSize, userPtr, alloc) -void *const AutoGrow = (void*)1; //-V566 -void *const DontSetProtectRWE = (void*)2; //-V566 +void *const AutoGrow = (void *)1; //-V566 +void *const DontSetProtectRWE = (void *)2; //-V566 class CodeArray { - enum Type { - USER_BUF = 1, // use userPtr(non alignment, non protect) - ALLOC_BUF, // use new(alignment, protect) - AUTO_GROW // automatically move and grow memory if necessary - }; - CodeArray(const CodeArray& rhs); - void operator=(const CodeArray&); - struct AddrInfo { - size_t codeOffset; // position to write - size_t jmpAddr; // value to write - int jmpSize; // size of jmpAddr - inner::LabelMode mode; - AddrInfo(size_t _codeOffset, size_t _jmpAddr, int _jmpSize, inner::LabelMode _mode) - : codeOffset(_codeOffset), jmpAddr(_jmpAddr), jmpSize(_jmpSize), mode(_mode) {} - uint64 getVal(const uint8 *top) const - { - uint64 disp = (mode == inner::LaddTop) ? jmpAddr + size_t(top) : (mode == inner::LasIs) ? jmpAddr : jmpAddr - size_t(top); - if (jmpSize == 4) disp = inner::VerifyInInt32(disp); - return disp; - } - }; - typedef std::list AddrInfoList; - AddrInfoList addrInfoList_; + enum Type { + USER_BUF = 1, // use userPtr(non alignment, non protect) + ALLOC_BUF, // use new(alignment, protect) + AUTO_GROW // automatically move and grow memory if necessary + }; + CodeArray(const CodeArray &rhs); + void operator=(const CodeArray &); + struct AddrInfo { + size_t codeOffset; // position to write + size_t jmpAddr; // value to write + int jmpSize; // size of jmpAddr + inner::LabelMode mode; + AddrInfo(size_t _codeOffset, size_t _jmpAddr, int _jmpSize, + inner::LabelMode _mode) + : codeOffset(_codeOffset), jmpAddr(_jmpAddr), jmpSize(_jmpSize), + mode(_mode) {} + uint64 getVal(const uint8 *top) const { + uint64 disp = (mode == inner::LaddTop) ? jmpAddr + size_t(top) + : (mode == inner::LasIs) ? jmpAddr + : jmpAddr - size_t(top); + if (jmpSize == 4) + disp = inner::VerifyInInt32(disp); + return disp; + } + }; + typedef std::list AddrInfoList; + AddrInfoList addrInfoList_; #ifdef XBYAK_USE_MMAP_ALLOCATOR - MmapAllocator defaultAllocator_; + MmapAllocator defaultAllocator_; #else - Allocator defaultAllocator_; + Allocator defaultAllocator_; #endif - Allocator *alloc_; + Allocator *alloc_; + protected: - size_t maxSize_; - constexpr static unsigned int tmpBufSize_ = 8192; - uint8 top_[tmpBufSize_]; - size_t size_; - size_t decode_size_; - bool isCalledCalcJmpAddress_; + size_t maxSize_; + constexpr static unsigned int tmpBufSize_ = 8192; + uint8 top_[tmpBufSize_]; + size_t size_; + size_t decode_size_; + bool isCalledCalcJmpAddress_; public: - enum ProtectMode { - PROTECT_RW = 0, // read/write - PROTECT_RWE = 1, // read/write/exec - PROTECT_RE = 2 // read/exec - }; - explicit CodeArray(size_t maxSize, void *userPtr = 0, Allocator *allocator = 0) - : size_(0) {} - virtual ~CodeArray() {} - void db(int code) - { - if (CodeArray::size_ >= tmpBufSize_) { - throw Error(ERR_CODE_IS_TOO_BIG); - } - top_[size_++] = static_cast(code); - } - void db(const uint8 *code, size_t codeSize) - { - for (size_t i = 0; i < codeSize; i++) db(code[i]); - } - void db(uint64 code, size_t codeSize) - { - if (codeSize > 8) throw Error(ERR_BAD_PARAMETER); + enum ProtectMode { + PROTECT_RW = 0, // read/write + PROTECT_RWE = 1, // read/write/exec + PROTECT_RE = 2 // read/exec + }; + explicit CodeArray(size_t maxSize, void *userPtr = 0, + Allocator *allocator = 0) + : size_(0) {} + virtual ~CodeArray() {} + void db(int code) { + if (CodeArray::size_ >= tmpBufSize_) { + throw Error(ERR_CODE_IS_TOO_BIG); + } + top_[size_++] = static_cast(code); + } + void db(const uint8 *code, size_t codeSize) { + for (size_t i = 0; i < codeSize; i++) + db(code[i]); + } + void db(uint64 code, size_t codeSize) { + if (codeSize > 8) + throw Error(ERR_BAD_PARAMETER); #if XBYAK_GNUC_PREREQ(5, 5) - for (size_t i = 0; i < codeSize; i++) db(static_cast(code >> (i * 8))); + for (size_t i = 0; i < codeSize; i++) + db(static_cast(code >> (i * 8))); #else - /* Avoid bug of aarch64-linux-gnu-g++ (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609 - g++ outputs invalid instruction 'ubfx x19, x19, 64, 8'. - */ - if (codeSize <= 4) { - for (size_t i = 0; i < codeSize; i++) db(static_cast(code >> (i * 8))); - } else { - db(code, 4); - db(code >> 32, codeSize - 4); - } + /* Avoid bug of aarch64-linux-gnu-g++ + (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609 g++ outputs invalid + instruction 'ubfx x19, x19, 64, 8'. + */ + if (codeSize <= 4) { + for (size_t i = 0; i < codeSize; i++) + db(static_cast(code >> (i * 8))); + } else { + db(code, 4); + db(code >> 32, codeSize - 4); + } #endif - } - void dw(uint32 code) - { - db(code, 2); - } - void dd(uint32 code) - { - db(code, 4); - } - void dq(uint64 code) - { - db(code, 8); - } + } + void dw(uint32 code) { db(code, 2); } + void dd(uint32 code) { db(code, 4); } + void dq(uint64 code) { db(code, 8); } }; class Address : public Operand { public: - enum Mode { - M_ModRM, - M_64bitDisp, - M_rip, - M_ripAddr - }; - Address(uint32 sizeBit, bool broadcast, const RegExp& e) - : Operand(0, MEM, sizeBit), e_(e), label_(0), mode_(M_ModRM), broadcast_(broadcast) - { - e_.verify(); - } - explicit Address(size_t disp) - : Operand(0, MEM, 64), e_(disp), label_(0), mode_(M_64bitDisp), broadcast_(false) { } - Address(uint32 sizeBit, bool broadcast, const RegRip& addr) - : Operand(0, MEM, sizeBit), e_(addr.disp_), label_(addr.label_), mode_(addr.isAddr_ ? M_ripAddr : M_rip), broadcast_(broadcast) { } - RegExp getRegExp(bool optimize = true) const - { - return optimize ? e_.optimize() : e_; - } - Mode getMode() const { return mode_; } - bool is32bit() const { return e_.getBase().getBit() == 32 || e_.getIndex().getBit() == 32; } - bool isOnlyDisp() const { return !e_.getBase().getBit() && !e_.getIndex().getBit(); } // for mov eax - size_t getDisp() const { return e_.getDisp(); } - uint8 getRex() const - { - if (mode_ != M_ModRM) return 0; - return getRegExp().getRex(); - } - bool is64bitDisp() const { return mode_ == M_64bitDisp; } // for moffset - bool isBroadcast() const { return broadcast_; } - const Label* getLabel() const { return label_; } - bool operator==(const Address& rhs) const - { - return getBit() == rhs.getBit() && e_ == rhs.e_ && label_ == rhs.label_ && mode_ == rhs.mode_ && broadcast_ == rhs.broadcast_; - } - bool operator!=(const Address& rhs) const { return !operator==(rhs); } - bool isVsib() const { return e_.isVsib(); } + enum Mode { M_ModRM, M_64bitDisp, M_rip, M_ripAddr }; + Address(uint32 sizeBit, bool broadcast, const RegExp &e) + : Operand(0, MEM, sizeBit), e_(e), label_(0), mode_(M_ModRM), + broadcast_(broadcast) { + e_.verify(); + } + explicit Address(size_t disp) + : Operand(0, MEM, 64), e_(disp), label_(0), mode_(M_64bitDisp), + broadcast_(false) {} + Address(uint32 sizeBit, bool broadcast, const RegRip &addr) + : Operand(0, MEM, sizeBit), e_(addr.disp_), label_(addr.label_), + mode_(addr.isAddr_ ? M_ripAddr : M_rip), broadcast_(broadcast) {} + RegExp getRegExp(bool optimize = true) const { + return optimize ? e_.optimize() : e_; + } + Mode getMode() const { return mode_; } + bool is32bit() const { + return e_.getBase().getBit() == 32 || e_.getIndex().getBit() == 32; + } + bool isOnlyDisp() const { + return !e_.getBase().getBit() && !e_.getIndex().getBit(); + } // for mov eax + size_t getDisp() const { return e_.getDisp(); } + uint8 getRex() const { + if (mode_ != M_ModRM) + return 0; + return getRegExp().getRex(); + } + bool is64bitDisp() const { return mode_ == M_64bitDisp; } // for moffset + bool isBroadcast() const { return broadcast_; } + const Label *getLabel() const { return label_; } + bool operator==(const Address &rhs) const { + return getBit() == rhs.getBit() && e_ == rhs.e_ && label_ == rhs.label_ && + mode_ == rhs.mode_ && broadcast_ == rhs.broadcast_; + } + bool operator!=(const Address &rhs) const { return !operator==(rhs); } + bool isVsib() const { return e_.isVsib(); } + private: - RegExp e_; - const Label* label_; - Mode mode_; - bool broadcast_; + RegExp e_; + const Label *label_; + Mode mode_; + bool broadcast_; }; -inline const Address& Operand::getAddress() const -{ - assert(isMEM()); - return static_cast(*this); +inline const Address &Operand::getAddress() const { + assert(isMEM()); + return static_cast(*this); } -inline bool Operand::operator==(const Operand& rhs) const -{ - if (isMEM() && rhs.isMEM()) return this->getAddress() == rhs.getAddress(); - return isEqualIfNotInherited(rhs); +inline bool Operand::operator==(const Operand &rhs) const { + if (isMEM() && rhs.isMEM()) + return this->getAddress() == rhs.getAddress(); + return isEqualIfNotInherited(rhs); } class AddressFrame { - void operator=(const AddressFrame&); - AddressFrame(const AddressFrame&); + void operator=(const AddressFrame &); + AddressFrame(const AddressFrame &); + public: - const uint32 bit_; - const bool broadcast_; - explicit AddressFrame(uint32 bit, bool broadcast = false) : bit_(bit), broadcast_(broadcast) { } - Address operator[](const RegExp& e) const - { - return Address(bit_, broadcast_, e); - } - Address operator[](const void *disp) const - { - return Address(bit_, broadcast_, RegExp(reinterpret_cast(disp))); - } + const uint32 bit_; + const bool broadcast_; + explicit AddressFrame(uint32 bit, bool broadcast = false) + : bit_(bit), broadcast_(broadcast) {} + Address operator[](const RegExp &e) const { + return Address(bit_, broadcast_, e); + } + Address operator[](const void *disp) const { + return Address(bit_, broadcast_, RegExp(reinterpret_cast(disp))); + } #ifdef XBYAK64 - Address operator[](uint64 disp) const { return Address(disp); } - Address operator[](const RegRip& addr) const { return Address(bit_, broadcast_, addr); } + Address operator[](uint64 disp) const { return Address(disp); } + Address operator[](const RegRip &addr) const { + return Address(bit_, broadcast_, addr); + } #endif }; struct JmpLabel { - size_t endOfJmp; /* offset from top to the end address of jmp */ - int jmpSize; - inner::LabelMode mode; - size_t disp; // disp for [rip + disp] - explicit JmpLabel(size_t endOfJmp = 0, int jmpSize = 0, inner::LabelMode mode = inner::LasIs, size_t disp = 0) - : endOfJmp(endOfJmp), jmpSize(jmpSize), mode(mode), disp(disp) - { - } + size_t endOfJmp; /* offset from top to the end address of jmp */ + int jmpSize; + inner::LabelMode mode; + size_t disp; // disp for [rip + disp] + explicit JmpLabel(size_t endOfJmp = 0, int jmpSize = 0, + inner::LabelMode mode = inner::LasIs, size_t disp = 0) + : endOfJmp(endOfJmp), jmpSize(jmpSize), mode(mode), disp(disp) {} }; class LabelManager; @@ -1107,822 +1238,948 @@ class Label : public Xbyak_aarch64::Label {}; class LabelManager { public: - LabelManager() {} - ~LabelManager() {} + LabelManager() {} + ~LabelManager() {} }; -class CodeGenerator : public CodeArray, - public Xbyak_aarch64::CodeGenerator { +class CodeGenerator : public CodeArray, public Xbyak_aarch64::CodeGenerator { public: - enum LabelType { - T_SHORT, - T_NEAR, - T_AUTO // T_SHORT if possible - }; - // for debug test - bool isTestMode() const; - void setTestMode(bool b); + enum LabelType { + T_SHORT, + T_NEAR, + T_AUTO // T_SHORT if possible + }; + // for debug test + bool isTestMode() const; + void setTestMode(bool b); + private: - CodeGenerator operator=(const CodeGenerator&); // don't call - static const size_t AARCH64_NUM_VREG = 32; - static const size_t AARCH64_NUM_PREG = 16; - static const size_t AARCH64_NUM_ZREG = 32; + CodeGenerator operator=(const CodeGenerator &); // don't call + static const size_t AARCH64_NUM_VREG = 32; + static const size_t AARCH64_NUM_PREG = 16; + static const size_t AARCH64_NUM_ZREG = 32; - bool preg_tmp_used[AARCH64_NUM_PREG] = {}; - bool zreg_tmp_used[AARCH64_NUM_ZREG] = {}; + bool preg_tmp_used[AARCH64_NUM_PREG] = {}; + bool zreg_tmp_used[AARCH64_NUM_ZREG] = {}; #ifdef XBYAK64 - enum { i32e = 32 | 64, BIT = 64 }; - static const size_t dummyAddr = (size_t(0x11223344) << 32) | 55667788; - typedef Reg64 NativeReg; + enum {i32e = 32 | 64, BIT = 64}; + static const size_t dummyAddr = (size_t(0x11223344) << 32) | 55667788; + typedef Reg64 NativeReg; #else - enum { i32e = 32, BIT = 32 }; - static const size_t dummyAddr = 0x12345678; - typedef Reg32 NativeReg; + enum {i32e = 32, BIT = 32}; + static const size_t dummyAddr = 0x12345678; + typedef Reg32 NativeReg; #endif - // (XMM, XMM|MEM) - static inline bool isXMM_XMMorMEM(const Operand& op1, const Operand& op2) - { - return op1.isXMM() && (op2.isXMM() || op2.isMEM()); - } - // (MMX, MMX|MEM) or (XMM, XMM|MEM) - static inline bool isXMMorMMX_MEM(const Operand& op1, const Operand& op2) - { - return (op1.isMMX() && (op2.isMMX() || op2.isMEM())) || isXMM_XMMorMEM(op1, op2); - } - // (XMM, MMX|MEM) - static inline bool isXMM_MMXorMEM(const Operand& op1, const Operand& op2) - { - return op1.isXMM() && (op2.isMMX() || op2.isMEM()); - } - // (MMX, XMM|MEM) - static inline bool isMMX_XMMorMEM(const Operand& op1, const Operand& op2) - { - return op1.isMMX() && (op2.isXMM() || op2.isMEM()); - } - // (XMM, REG32|MEM) - static inline bool isXMM_REG32orMEM(const Operand& op1, const Operand& op2) - { - return op1.isXMM() && (op2.isREG(i32e) || op2.isMEM()); - } - // (REG32, XMM|MEM) - static inline bool isREG32_XMMorMEM(const Operand& op1, const Operand& op2) - { - return op1.isREG(i32e) && (op2.isXMM() || op2.isMEM()); - } - // (REG32, REG32|MEM) - static inline bool isREG32_REG32orMEM(const Operand& op1, const Operand& op2) - { - return op1.isREG(i32e) && ((op2.isREG(i32e) && op1.getBit() == op2.getBit()) || op2.isMEM()); - } - void rex(const Operand& op1, const Operand& op2 = Operand()); - enum AVXtype { - // low 3 bit - T_N1 = 1, - T_N2 = 2, - T_N4 = 3, - T_N8 = 4, - T_N16 = 5, - T_N32 = 6, - T_NX_MASK = 7, - // - T_N_VL = 1 << 3, // N * (1, 2, 4) for VL - T_DUP = 1 << 4, // N = (8, 32, 64) - T_66 = 1 << 5, - T_F3 = 1 << 6, - T_F2 = 1 << 7, - T_0F = 1 << 8, - T_0F38 = 1 << 9, - T_0F3A = 1 << 10, - T_L0 = 1 << 11, - T_L1 = 1 << 12, - T_W0 = 1 << 13, - T_W1 = 1 << 14, - T_EW0 = 1 << 15, - T_EW1 = 1 << 16, - T_YMM = 1 << 17, // support YMM, ZMM - T_EVEX = 1 << 18, - T_ER_X = 1 << 19, // xmm{er} - T_ER_Y = 1 << 20, // ymm{er} - T_ER_Z = 1 << 21, // zmm{er} - T_SAE_X = 1 << 22, // xmm{sae} - T_SAE_Y = 1 << 23, // ymm{sae} - T_SAE_Z = 1 << 24, // zmm{sae} - T_MUST_EVEX = 1 << 25, // contains T_EVEX - T_B32 = 1 << 26, // m32bcst - T_B64 = 1 << 27, // m64bcst - T_M_K = 1 << 28, // mem{k} - T_VSIB = 1 << 29, - T_MEM_EVEX = 1 << 30, // use evex if mem - T_XXX - }; - void vex(const Reg& reg, const Reg& base, const Operand *v, int type, int code, bool x = false); - void verifySAE(const Reg& r, int type) const - { - if (((type & T_SAE_X) && r.isXMM()) || ((type & T_SAE_Y) && r.isYMM()) || ((type & T_SAE_Z) && r.isZMM())) return; - throw Error(ERR_SAE_IS_INVALID); - } - void verifyER(const Reg& r, int type) const - { - if (((type & T_ER_X) && r.isXMM()) || ((type & T_ER_Y) && r.isYMM()) || ((type & T_ER_Z) && r.isZMM())) return; - throw Error(ERR_ER_IS_INVALID); - } - // (a, b, c) contains non zero two or three values then err - int verifyDuplicate(int a, int b, int c, int err) - { - int v = a | b | c; - if ((a > 0 && a != v) + (b > 0 && b != v) + (c > 0 && c != v) > 0) return Error(err); - return v; - } - int evex(const Reg& reg, const Reg& base, const Operand *v, int type, int code, bool x = false, bool b = false, int aaa = 0, uint32 VL = 0, bool Hi16Vidx = false); - void setModRM(int mod, int r1, int r2); - void setSIB(const RegExp& e, int reg, int disp8N = 0); - bool isInDisp16(uint32 x) const - { - return 0xFFFF8000 <= x || x <= 0x7FFF; - } - void opModR(const Reg& reg1, const Reg& reg2, int code0, int code1 = NONE, int code2 = NONE); - void opModM(const Address& addr, const Reg& reg, int code0, int code1 = NONE, int code2 = NONE, int immSize = 0); - void opLoadSeg(const Address& addr, const Reg& reg, int code0, int code1 = NONE); - void opMIB(const Address& addr, const Reg& reg, int code0, int code1); - void makeJmp(uint32 disp, LabelType type, uint8 shortCode, uint8 longCode, uint8 longPref); - void opJmpAbs(const void *addr, LabelType type, uint8 shortCode, uint8 longCode, uint8 longPref = 0); - // reg is reg field of ModRM - // immSize is the size for immediate value - // disp8N = 0(normal), disp8N = 1(force disp32), disp8N = {2, 4, 8} ; compressed displacement - void opAddr(const Address& addr, int reg, int immSize = 0, int disp8N = 0, bool permitVisb = false); - /* preCode is for SSSE3/SSE4 */ - void opGen(const Operand& reg, const Operand& op, int code, int pref, bool isValid(const Operand&, const Operand&), int imm8 = NONE, int preCode = NONE); - void opMMX_IMM(const Mmx& mmx, int imm8, int code, int ext) - { - if (mmx.isXMM()) db(0x66); - opModR(Reg32(ext), mmx, 0x0F, code); - db(imm8); - } - void opMMX(const Mmx& mmx, const Operand& op, int code, int pref = 0x66, int imm8 = NONE, int preCode = NONE) - { - opGen(mmx, op, code, mmx.isXMM() ? pref : NONE, isXMMorMMX_MEM, imm8, preCode); - } - void opMovXMM(const Operand& op1, const Operand& op2, int code, int pref) - { - if (pref != NONE) db(pref); - if (op1.isXMM() && op2.isMEM()) { - opModM(op2.getAddress(), op1.getReg(), 0x0F, code); - } else if (op1.isMEM() && op2.isXMM()) { - opModM(op1.getAddress(), op2.getReg(), 0x0F, code | 1); - } else { - throw Error(ERR_BAD_COMBINATION); - } - } - void opExt(const Operand& op, const Mmx& mmx, int code, int imm, bool hasMMX2 = false) - { - if (hasMMX2 && op.isREG(i32e)) { /* pextrw is special */ - if (mmx.isXMM()) db(0x66); - opModR(op.getReg(), mmx, 0x0F, 0xC5); db(imm); - } else { - opGen(mmx, op, code, 0x66, isXMM_REG32orMEM, imm, 0x3A); - } - } - void opR_ModM(const Operand& op, int bit, int ext, int code0, int code1 = NONE, int code2 = NONE, bool disableRex = false, int immSize = 0) - { - int opBit = op.getBit(); - if (disableRex && opBit == 64) opBit = 32; - if (op.isREG(bit)) { - opModR(Reg(ext, Operand::REG, opBit), op.getReg().changeBit(opBit), code0, code1, code2); - } else if (op.isMEM()) { - opModM(op.getAddress(), Reg(ext, Operand::REG, opBit), code0, code1, code2, immSize); - } else { - throw Error(ERR_BAD_COMBINATION); - } - } - void opShift(const Operand& op, int imm, int ext) - { - verifyMemHasSize(op); - opR_ModM(op, 0, ext, (0xC0 | ((imm == 1 ? 1 : 0) << 4)), NONE, NONE, false, (imm != 1) ? 1 : 0); - if (imm != 1) db(imm); - } - void opShift(const Operand& op, const Reg8& _cl, int ext) - { - if (_cl.getIdx() != Operand::CL) throw Error(ERR_BAD_COMBINATION); - opR_ModM(op, 0, ext, 0xD2); - } - void opModRM(const Operand& op1, const Operand& op2, bool condR, bool condM, int code0, int code1 = NONE, int code2 = NONE, int immSize = 0) - { - if (condR) { - opModR(op1.getReg(), op2.getReg(), code0, code1, code2); - } else if (condM) { - opModM(op2.getAddress(), op1.getReg(), code0, code1, code2, immSize); - } else { - throw Error(ERR_BAD_COMBINATION); - } - } - void opShxd(const Operand& op, const Reg& reg, uint8 imm, int code, const Reg8 *_cl = 0) - { - if (_cl && _cl->getIdx() != Operand::CL) throw Error(ERR_BAD_COMBINATION); - opModRM(reg, op, (op.isREG(16 | i32e) && op.getBit() == reg.getBit()), op.isMEM() && (reg.isREG(16 | i32e)), 0x0F, code | (_cl ? 1 : 0), NONE, _cl ? 0 : 1); - if (!_cl) db(imm); - } - // (REG, REG|MEM), (MEM, REG) - void opRM_RM(const Operand& op1, const Operand& op2, int code) - { - if (op1.isREG() && op2.isMEM()) { - opModM(op2.getAddress(), op1.getReg(), code | 2); - } else { - opModRM(op2, op1, op1.isREG() && op1.getKind() == op2.getKind(), op1.isMEM() && op2.isREG(), code); - } - } - // (REG|MEM, IMM) - void opRM_I(const Operand& op, uint32 imm, int code, int ext) - { - verifyMemHasSize(op); - uint32 immBit = inner::IsInDisp8(imm) ? 8 : isInDisp16(imm) ? 16 : 32; - if (op.isBit(8)) immBit = 8; - if (op.getBit() < immBit) throw Error(ERR_IMM_IS_TOO_BIG); - if (op.isBit(32 | 64) && immBit == 16) immBit = 32; /* don't use MEM16 if 32/64bit mode */ - if (op.isREG() && op.getIdx() == 0 && (op.getBit() == immBit || (op.isBit(64) && immBit == 32))) { // rax, eax, ax, al - rex(op); - db(code | 4 | (immBit == 8 ? 0 : 1)); - } else { - int tmp = immBit < (std::min)(op.getBit(), 32U) ? 2 : 0; - opR_ModM(op, 0, ext, 0x80 | tmp, NONE, NONE, false, immBit / 8); - } - db(imm, immBit / 8); - } - void opIncDec(const Operand& op, int code, int ext) - { - verifyMemHasSize(op); + // (XMM, XMM|MEM) + static inline bool isXMM_XMMorMEM(const Operand &op1, const Operand &op2) { + return op1.isXMM() && (op2.isXMM() || op2.isMEM()); + } + // (MMX, MMX|MEM) or (XMM, XMM|MEM) + static inline bool isXMMorMMX_MEM(const Operand &op1, const Operand &op2) { + return (op1.isMMX() && (op2.isMMX() || op2.isMEM())) || + isXMM_XMMorMEM(op1, op2); + } + // (XMM, MMX|MEM) + static inline bool isXMM_MMXorMEM(const Operand &op1, const Operand &op2) { + return op1.isXMM() && (op2.isMMX() || op2.isMEM()); + } + // (MMX, XMM|MEM) + static inline bool isMMX_XMMorMEM(const Operand &op1, const Operand &op2) { + return op1.isMMX() && (op2.isXMM() || op2.isMEM()); + } + // (XMM, REG32|MEM) + static inline bool isXMM_REG32orMEM(const Operand &op1, const Operand &op2) { + return op1.isXMM() && (op2.isREG(i32e) || op2.isMEM()); + } + // (REG32, XMM|MEM) + static inline bool isREG32_XMMorMEM(const Operand &op1, const Operand &op2) { + return op1.isREG(i32e) && (op2.isXMM() || op2.isMEM()); + } + // (REG32, REG32|MEM) + static inline bool isREG32_REG32orMEM(const Operand &op1, + const Operand &op2) { + return op1.isREG(i32e) && + ((op2.isREG(i32e) && op1.getBit() == op2.getBit()) || op2.isMEM()); + } + void rex(const Operand &op1, const Operand &op2 = Operand()); + enum AVXtype { + // low 3 bit + T_N1 = 1, + T_N2 = 2, + T_N4 = 3, + T_N8 = 4, + T_N16 = 5, + T_N32 = 6, + T_NX_MASK = 7, + // + T_N_VL = 1 << 3, // N * (1, 2, 4) for VL + T_DUP = 1 << 4, // N = (8, 32, 64) + T_66 = 1 << 5, + T_F3 = 1 << 6, + T_F2 = 1 << 7, + T_0F = 1 << 8, + T_0F38 = 1 << 9, + T_0F3A = 1 << 10, + T_L0 = 1 << 11, + T_L1 = 1 << 12, + T_W0 = 1 << 13, + T_W1 = 1 << 14, + T_EW0 = 1 << 15, + T_EW1 = 1 << 16, + T_YMM = 1 << 17, // support YMM, ZMM + T_EVEX = 1 << 18, + T_ER_X = 1 << 19, // xmm{er} + T_ER_Y = 1 << 20, // ymm{er} + T_ER_Z = 1 << 21, // zmm{er} + T_SAE_X = 1 << 22, // xmm{sae} + T_SAE_Y = 1 << 23, // ymm{sae} + T_SAE_Z = 1 << 24, // zmm{sae} + T_MUST_EVEX = 1 << 25, // contains T_EVEX + T_B32 = 1 << 26, // m32bcst + T_B64 = 1 << 27, // m64bcst + T_M_K = 1 << 28, // mem{k} + T_VSIB = 1 << 29, + T_MEM_EVEX = 1 << 30, // use evex if mem + T_XXX + }; + void vex(const Reg ®, const Reg &base, const Operand *v, int type, + int code, bool x = false); + void verifySAE(const Reg &r, int type) const { + if (((type & T_SAE_X) && r.isXMM()) || ((type & T_SAE_Y) && r.isYMM()) || + ((type & T_SAE_Z) && r.isZMM())) + return; + throw Error(ERR_SAE_IS_INVALID); + } + void verifyER(const Reg &r, int type) const { + if (((type & T_ER_X) && r.isXMM()) || ((type & T_ER_Y) && r.isYMM()) || + ((type & T_ER_Z) && r.isZMM())) + return; + throw Error(ERR_ER_IS_INVALID); + } + // (a, b, c) contains non zero two or three values then err + int verifyDuplicate(int a, int b, int c, int err) { + int v = a | b | c; + if ((a > 0 && a != v) + (b > 0 && b != v) + (c > 0 && c != v) > 0) + return Error(err); + return v; + } + int evex(const Reg ®, const Reg &base, const Operand *v, int type, + int code, bool x = false, bool b = false, int aaa = 0, uint32 VL = 0, + bool Hi16Vidx = false); + void setModRM(int mod, int r1, int r2); + void setSIB(const RegExp &e, int reg, int disp8N = 0); + bool isInDisp16(uint32 x) const { return 0xFFFF8000 <= x || x <= 0x7FFF; } + void opModR(const Reg ®1, const Reg ®2, int code0, int code1 = NONE, + int code2 = NONE); + void opModM(const Address &addr, const Reg ®, int code0, int code1 = NONE, + int code2 = NONE, int immSize = 0); + void opLoadSeg(const Address &addr, const Reg ®, int code0, + int code1 = NONE); + void opMIB(const Address &addr, const Reg ®, int code0, int code1); + void makeJmp(uint32 disp, LabelType type, uint8 shortCode, uint8 longCode, + uint8 longPref); + void opJmpAbs(const void *addr, LabelType type, uint8 shortCode, + uint8 longCode, uint8 longPref = 0); + // reg is reg field of ModRM + // immSize is the size for immediate value + // disp8N = 0(normal), disp8N = 1(force disp32), disp8N = {2, 4, 8} ; + // compressed displacement + void opAddr(const Address &addr, int reg, int immSize = 0, int disp8N = 0, + bool permitVisb = false); + /* preCode is for SSSE3/SSE4 */ + void opGen(const Operand ®, const Operand &op, int code, int pref, + bool isValid(const Operand &, const Operand &), int imm8 = NONE, + int preCode = NONE); + void opMMX_IMM(const Mmx &mmx, int imm8, int code, int ext) { + if (mmx.isXMM()) + db(0x66); + opModR(Reg32(ext), mmx, 0x0F, code); + db(imm8); + } + void opMMX(const Mmx &mmx, const Operand &op, int code, int pref = 0x66, + int imm8 = NONE, int preCode = NONE) { + opGen(mmx, op, code, mmx.isXMM() ? pref : NONE, isXMMorMMX_MEM, imm8, + preCode); + } + void opMovXMM(const Operand &op1, const Operand &op2, int code, int pref) { + if (pref != NONE) + db(pref); + if (op1.isXMM() && op2.isMEM()) { + opModM(op2.getAddress(), op1.getReg(), 0x0F, code); + } else if (op1.isMEM() && op2.isXMM()) { + opModM(op1.getAddress(), op2.getReg(), 0x0F, code | 1); + } else { + throw Error(ERR_BAD_COMBINATION); + } + } + void opExt(const Operand &op, const Mmx &mmx, int code, int imm, + bool hasMMX2 = false) { + if (hasMMX2 && op.isREG(i32e)) { /* pextrw is special */ + if (mmx.isXMM()) + db(0x66); + opModR(op.getReg(), mmx, 0x0F, 0xC5); + db(imm); + } else { + opGen(mmx, op, code, 0x66, isXMM_REG32orMEM, imm, 0x3A); + } + } + void opR_ModM(const Operand &op, int bit, int ext, int code0, + int code1 = NONE, int code2 = NONE, bool disableRex = false, + int immSize = 0) { + int opBit = op.getBit(); + if (disableRex && opBit == 64) + opBit = 32; + if (op.isREG(bit)) { + opModR(Reg(ext, Operand::REG, opBit), op.getReg().changeBit(opBit), code0, + code1, code2); + } else if (op.isMEM()) { + opModM(op.getAddress(), Reg(ext, Operand::REG, opBit), code0, code1, + code2, immSize); + } else { + throw Error(ERR_BAD_COMBINATION); + } + } + void opShift(const Operand &op, int imm, int ext) { + verifyMemHasSize(op); + opR_ModM(op, 0, ext, (0xC0 | ((imm == 1 ? 1 : 0) << 4)), NONE, NONE, false, + (imm != 1) ? 1 : 0); + if (imm != 1) + db(imm); + } + void opShift(const Operand &op, const Reg8 &_cl, int ext) { + if (_cl.getIdx() != Operand::CL) + throw Error(ERR_BAD_COMBINATION); + opR_ModM(op, 0, ext, 0xD2); + } + void opModRM(const Operand &op1, const Operand &op2, bool condR, bool condM, + int code0, int code1 = NONE, int code2 = NONE, int immSize = 0) { + if (condR) { + opModR(op1.getReg(), op2.getReg(), code0, code1, code2); + } else if (condM) { + opModM(op2.getAddress(), op1.getReg(), code0, code1, code2, immSize); + } else { + throw Error(ERR_BAD_COMBINATION); + } + } + void opShxd(const Operand &op, const Reg ®, uint8 imm, int code, + const Reg8 *_cl = 0) { + if (_cl && _cl->getIdx() != Operand::CL) + throw Error(ERR_BAD_COMBINATION); + opModRM(reg, op, (op.isREG(16 | i32e) && op.getBit() == reg.getBit()), + op.isMEM() && (reg.isREG(16 | i32e)), 0x0F, code | (_cl ? 1 : 0), + NONE, _cl ? 0 : 1); + if (!_cl) + db(imm); + } + // (REG, REG|MEM), (MEM, REG) + void opRM_RM(const Operand &op1, const Operand &op2, int code) { + if (op1.isREG() && op2.isMEM()) { + opModM(op2.getAddress(), op1.getReg(), code | 2); + } else { + opModRM(op2, op1, op1.isREG() && op1.getKind() == op2.getKind(), + op1.isMEM() && op2.isREG(), code); + } + } + // (REG|MEM, IMM) + void opRM_I(const Operand &op, uint32 imm, int code, int ext) { + verifyMemHasSize(op); + uint32 immBit = inner::IsInDisp8(imm) ? 8 : isInDisp16(imm) ? 16 : 32; + if (op.isBit(8)) + immBit = 8; + if (op.getBit() < immBit) + throw Error(ERR_IMM_IS_TOO_BIG); + if (op.isBit(32 | 64) && immBit == 16) + immBit = 32; /* don't use MEM16 if 32/64bit mode */ + if (op.isREG() && op.getIdx() == 0 && + (op.getBit() == immBit || + (op.isBit(64) && immBit == 32))) { // rax, eax, ax, al + rex(op); + db(code | 4 | (immBit == 8 ? 0 : 1)); + } else { + int tmp = immBit < (std::min)(op.getBit(), 32U) ? 2 : 0; + opR_ModM(op, 0, ext, 0x80 | tmp, NONE, NONE, false, immBit / 8); + } + db(imm, immBit / 8); + } + void opIncDec(const Operand &op, int code, int ext) { + verifyMemHasSize(op); #ifndef XBYAK64 - if (op.isREG() && !op.isBit(8)) { - rex(op); db(code | op.getIdx()); - return; - } + if (op.isREG() && !op.isBit(8)) { + rex(op); + db(code | op.getIdx()); + return; + } #endif - code = 0xFE; - if (op.isREG()) { - opModR(Reg(ext, Operand::REG, op.getBit()), op.getReg(), code); - } else { - opModM(op.getAddress(), Reg(ext, Operand::REG, op.getBit()), code); - } - } - void opPushPop(const Operand& op, int code, int ext, int alt) - { - int bit = op.getBit(); - if (bit == 16 || bit == BIT) { - if (bit == 16) db(0x66); - if (op.isREG()) { - if (op.getReg().getIdx() >= 8) db(0x41); - db(alt | (op.getIdx() & 7)); - return; - } - if (op.isMEM()) { - opModM(op.getAddress(), Reg(ext, Operand::REG, 32), code); - return; - } - } - throw Error(ERR_BAD_COMBINATION); - } - void verifyMemHasSize(const Operand& op) const - { - if (op.isMEM() && op.getBit() == 0) throw Error(ERR_MEM_SIZE_IS_NOT_SPECIFIED); - } - /* - mov(r, imm) = db(imm, mov_imm(r, imm)) - */ - int mov_imm(const Reg& reg, size_t imm) - { - int bit = reg.getBit(); - const int idx = reg.getIdx(); - int code = 0xB0 | ((bit == 8 ? 0 : 1) << 3); - if (bit == 64 && (imm & ~size_t(0xffffffffu)) == 0) { - rex(Reg32(idx)); - bit = 32; - } else { - rex(reg); - if (bit == 64 && inner::IsInInt32(imm)) { - db(0xC7); - code = 0xC0; - bit = 32; - } - } - db(code | (idx & 7)); - return bit / 8; - } - void putL_inner(const Label& label, bool relative = false, size_t disp = 0); - void opMovxx(const Reg& reg, const Operand& op, uint8 code); - void opFpuMem(const Address& addr, uint8 m16, uint8 m32, uint8 m64, uint8 ext, uint8 m64ext); - // use code1 if reg1 == st0 - // use code2 if reg1 != st0 && reg2 == st0 - void opFpuFpu(const Fpu& reg1, const Fpu& reg2, uint32 code1, uint32 code2); - void opFpu(const Fpu& reg, uint8 code1, uint8 code2); - void opVex(const Reg& r, const Operand *p1, const Operand& op2, int type, int code, int imm8 = NONE); - // (r, r, r/m) if isR_R_RM - // (r, r/m, r) - void opGpr(const Reg32e& r, const Operand& op1, const Operand& op2, int type, uint8 code, bool isR_R_RM, int imm8 = NONE); - void opAVX_X_X_XM(const Xmm& x1, const Operand& op1, const Operand& op2, int type, int code0, int imm8 = NONE); - void opAVX_K_X_XM(const Opmask& k, const Xmm& x2, const Operand& op3, int type, int code0, int imm8 = NONE) - { - if (!op3.isMEM() && (x2.getKind() != op3.getKind())) throw Error(ERR_BAD_COMBINATION); - opVex(k, &x2, op3, type, code0, imm8); - } - // (x, x/m), (y, x/m256), (z, y/m) - void checkCvt1(const Operand& x, const Operand& op) const - { - if (!op.isMEM() && !(x.is(Operand::XMM | Operand::YMM) && op.isXMM()) && !(x.isZMM() && op.isYMM())) throw Error(ERR_BAD_COMBINATION); - } - // (x, x/m), (x, y/m256), (y, z/m) - void checkCvt2(const Xmm& x, const Operand& op) const - { - if (!(x.isXMM() && op.is(Operand::XMM | Operand::YMM | Operand::MEM)) && !(x.isYMM() && op.is(Operand::ZMM | Operand::MEM))) throw Error(ERR_BAD_COMBINATION); - } - void opCvt2(const Xmm& x, const Operand& op, int type, int code) - { - checkCvt2(x, op); - Operand::Kind kind = x.isXMM() ? (op.isBit(256) ? Operand::YMM : Operand::XMM) : Operand::ZMM; - opVex(x.copyAndSetKind(kind), &xm0, op, type, code); - } - void opCvt3(const Xmm& x1, const Xmm& x2, const Operand& op, int type, int type64, int type32, uint8 code) - { - if (!(x1.isXMM() && x2.isXMM() && (op.isREG(i32e) || op.isMEM()))) throw Error(ERR_BAD_SIZE_OF_REGISTER); - Xmm x(op.getIdx()); - const Operand *p = op.isREG() ? &x : &op; - opVex(x1, &x2, *p, type | (op.isBit(64) ? type64 : type32), code); - } - const Xmm& cvtIdx0(const Operand& x) const - { - return x.isZMM() ? zm0 : x.isYMM() ? ym0 : xm0; - } - // support (x, x/m, imm), (y, y/m, imm) - void opAVX_X_XM_IMM(const Xmm& x, const Operand& op, int type, int code, int imm8 = NONE) - { - opAVX_X_X_XM(x, cvtIdx0(x), op, type, code, imm8); - } - // QQQ:need to refactor - void opSp1(const Reg& reg, const Operand& op, uint8 pref, uint8 code0, uint8 code1) - { - if (reg.isBit(8)) throw Error(ERR_BAD_SIZE_OF_REGISTER); - bool is16bit = reg.isREG(16) && (op.isREG(16) || op.isMEM()); - if (!is16bit && !(reg.isREG(i32e) && (op.isREG(reg.getBit()) || op.isMEM()))) throw Error(ERR_BAD_COMBINATION); - if (is16bit) db(0x66); - db(pref); opModRM(reg.changeBit(i32e == 32 ? 32 : reg.getBit()), op, op.isREG(), true, code0, code1); - } - void opGather(const Xmm& x1, const Address& addr, const Xmm& x2, int type, uint8 code, int mode) - { - const RegExp& regExp = addr.getRegExp(); - if (!regExp.isVsib(128 | 256)) throw Error(ERR_BAD_VSIB_ADDRESSING); - const int y_vx_y = 0; - const int y_vy_y = 1; -// const int x_vy_x = 2; - const bool isAddrYMM = regExp.getIndex().getBit() == 256; - if (!x1.isXMM() || isAddrYMM || !x2.isXMM()) { - bool isOK = false; - if (mode == y_vx_y) { - isOK = x1.isYMM() && !isAddrYMM && x2.isYMM(); - } else if (mode == y_vy_y) { - isOK = x1.isYMM() && isAddrYMM && x2.isYMM(); - } else { // x_vy_x - isOK = !x1.isYMM() && isAddrYMM && !x2.isYMM(); - } - if (!isOK) throw Error(ERR_BAD_VSIB_ADDRESSING); - } - opAVX_X_X_XM(isAddrYMM ? Ymm(x1.getIdx()) : x1, isAddrYMM ? Ymm(x2.getIdx()) : x2, addr, type, code); - } - enum { - xx_yy_zz = 0, - xx_yx_zy = 1, - xx_xy_yz = 2 - }; - void checkGather2(const Xmm& x1, const Reg& x2, int mode) const - { - if (x1.isXMM() && x2.isXMM()) return; - switch (mode) { - case xx_yy_zz: if ((x1.isYMM() && x2.isYMM()) || (x1.isZMM() && x2.isZMM())) return; - break; - case xx_yx_zy: if ((x1.isYMM() && x2.isXMM()) || (x1.isZMM() && x2.isYMM())) return; - break; - case xx_xy_yz: if ((x1.isXMM() && x2.isYMM()) || (x1.isYMM() && x2.isZMM())) return; - break; - } - throw Error(ERR_BAD_VSIB_ADDRESSING); - } - void opGather2(const Xmm& x, const Address& addr, int type, uint8 code, int mode) - { - if (x.hasZero()) throw Error(ERR_INVALID_ZERO); - checkGather2(x, addr.getRegExp().getIndex(), mode); - opVex(x, 0, addr, type, code); - } - /* - xx_xy_yz ; mode = true - xx_xy_xz ; mode = false - */ - void opVmov(const Operand& op, const Xmm& x, int type, uint8 code, bool mode) - { - if (mode) { - if (!op.isMEM() && !((op.isXMM() && x.isXMM()) || (op.isXMM() && x.isYMM()) || (op.isYMM() && x.isZMM()))) throw Error(ERR_BAD_COMBINATION); - } else { - if (!op.isMEM() && !op.isXMM()) throw Error(ERR_BAD_COMBINATION); - } - opVex(x, 0, op, type, code); - } - void opGatherFetch(const Address& addr, const Xmm& x, int type, uint8 code, Operand::Kind kind) - { - if (addr.hasZero()) throw Error(ERR_INVALID_ZERO); - if (addr.getRegExp().getIndex().getKind() != kind) throw Error(ERR_BAD_VSIB_ADDRESSING); - opVex(x, 0, addr, type, code); - } - void opInOut(const Reg& a, const Reg& d, uint8 code) - { - if (a.getIdx() == Operand::AL && d.getIdx() == Operand::DX && d.getBit() == 16) { - switch (a.getBit()) { - case 8: db(code); return; - case 16: db(0x66); db(code + 1); return; - case 32: db(code + 1); return; - } - } - throw Error(ERR_BAD_COMBINATION); - } - void opInOut(const Reg& a, uint8 code, uint8 v) - { - if (a.getIdx() == Operand::AL) { - switch (a.getBit()) { - case 8: db(code); db(v); return; - case 16: db(0x66); db(code + 1); db(v); return; - case 32: db(code + 1); db(v); return; - } - } - throw Error(ERR_BAD_COMBINATION); - } + code = 0xFE; + if (op.isREG()) { + opModR(Reg(ext, Operand::REG, op.getBit()), op.getReg(), code); + } else { + opModM(op.getAddress(), Reg(ext, Operand::REG, op.getBit()), code); + } + } + void opPushPop(const Operand &op, int code, int ext, int alt) { + int bit = op.getBit(); + if (bit == 16 || bit == BIT) { + if (bit == 16) + db(0x66); + if (op.isREG()) { + if (op.getReg().getIdx() >= 8) + db(0x41); + db(alt | (op.getIdx() & 7)); + return; + } + if (op.isMEM()) { + opModM(op.getAddress(), Reg(ext, Operand::REG, 32), code); + return; + } + } + throw Error(ERR_BAD_COMBINATION); + } + void verifyMemHasSize(const Operand &op) const { + if (op.isMEM() && op.getBit() == 0) + throw Error(ERR_MEM_SIZE_IS_NOT_SPECIFIED); + } + /* + mov(r, imm) = db(imm, mov_imm(r, imm)) + */ + int mov_imm(const Reg ®, size_t imm) { + int bit = reg.getBit(); + const int idx = reg.getIdx(); + int code = 0xB0 | ((bit == 8 ? 0 : 1) << 3); + if (bit == 64 && (imm & ~size_t(0xffffffffu)) == 0) { + rex(Reg32(idx)); + bit = 32; + } else { + rex(reg); + if (bit == 64 && inner::IsInInt32(imm)) { + db(0xC7); + code = 0xC0; + bit = 32; + } + } + db(code | (idx & 7)); + return bit / 8; + } + void putL_inner(const Label &label, bool relative = false, size_t disp = 0); + void opMovxx(const Reg ®, const Operand &op, uint8 code); + void opFpuMem(const Address &addr, uint8 m16, uint8 m32, uint8 m64, uint8 ext, + uint8 m64ext); + // use code1 if reg1 == st0 + // use code2 if reg1 != st0 && reg2 == st0 + void opFpuFpu(const Fpu ®1, const Fpu ®2, uint32 code1, uint32 code2); + void opFpu(const Fpu ®, uint8 code1, uint8 code2); + void opVex(const Reg &r, const Operand *p1, const Operand &op2, int type, + int code, int imm8 = NONE); + // (r, r, r/m) if isR_R_RM + // (r, r/m, r) + void opGpr(const Reg32e &r, const Operand &op1, const Operand &op2, int type, + uint8 code, bool isR_R_RM, int imm8 = NONE); + void opAVX_X_X_XM(const Xmm &x1, const Operand &op1, const Operand &op2, + int type, int code0, int imm8 = NONE); + void opAVX_K_X_XM(const Opmask &k, const Xmm &x2, const Operand &op3, + int type, int code0, int imm8 = NONE) { + if (!op3.isMEM() && (x2.getKind() != op3.getKind())) + throw Error(ERR_BAD_COMBINATION); + opVex(k, &x2, op3, type, code0, imm8); + } + // (x, x/m), (y, x/m256), (z, y/m) + void checkCvt1(const Operand &x, const Operand &op) const { + if (!op.isMEM() && !(x.is(Operand::XMM | Operand::YMM) && op.isXMM()) && + !(x.isZMM() && op.isYMM())) + throw Error(ERR_BAD_COMBINATION); + } + // (x, x/m), (x, y/m256), (y, z/m) + void checkCvt2(const Xmm &x, const Operand &op) const { + if (!(x.isXMM() && op.is(Operand::XMM | Operand::YMM | Operand::MEM)) && + !(x.isYMM() && op.is(Operand::ZMM | Operand::MEM))) + throw Error(ERR_BAD_COMBINATION); + } + void opCvt2(const Xmm &x, const Operand &op, int type, int code) { + checkCvt2(x, op); + Operand::Kind kind = x.isXMM() + ? (op.isBit(256) ? Operand::YMM : Operand::XMM) + : Operand::ZMM; + opVex(x.copyAndSetKind(kind), &xm0, op, type, code); + } + void opCvt3(const Xmm &x1, const Xmm &x2, const Operand &op, int type, + int type64, int type32, uint8 code) { + if (!(x1.isXMM() && x2.isXMM() && (op.isREG(i32e) || op.isMEM()))) + throw Error(ERR_BAD_SIZE_OF_REGISTER); + Xmm x(op.getIdx()); + const Operand *p = op.isREG() ? &x : &op; + opVex(x1, &x2, *p, type | (op.isBit(64) ? type64 : type32), code); + } + const Xmm &cvtIdx0(const Operand &x) const { + return x.isZMM() ? zm0 : x.isYMM() ? ym0 : xm0; + } + // support (x, x/m, imm), (y, y/m, imm) + void opAVX_X_XM_IMM(const Xmm &x, const Operand &op, int type, int code, + int imm8 = NONE) { + opAVX_X_X_XM(x, cvtIdx0(x), op, type, code, imm8); + } + // QQQ:need to refactor + void opSp1(const Reg ®, const Operand &op, uint8 pref, uint8 code0, + uint8 code1) { + if (reg.isBit(8)) + throw Error(ERR_BAD_SIZE_OF_REGISTER); + bool is16bit = reg.isREG(16) && (op.isREG(16) || op.isMEM()); + if (!is16bit && + !(reg.isREG(i32e) && (op.isREG(reg.getBit()) || op.isMEM()))) + throw Error(ERR_BAD_COMBINATION); + if (is16bit) + db(0x66); + db(pref); + opModRM(reg.changeBit(i32e == 32 ? 32 : reg.getBit()), op, op.isREG(), true, + code0, code1); + } + void opGather(const Xmm &x1, const Address &addr, const Xmm &x2, int type, + uint8 code, int mode) { + const RegExp ®Exp = addr.getRegExp(); + if (!regExp.isVsib(128 | 256)) + throw Error(ERR_BAD_VSIB_ADDRESSING); + const int y_vx_y = 0; + const int y_vy_y = 1; + // const int x_vy_x = 2; + const bool isAddrYMM = regExp.getIndex().getBit() == 256; + if (!x1.isXMM() || isAddrYMM || !x2.isXMM()) { + bool isOK = false; + if (mode == y_vx_y) { + isOK = x1.isYMM() && !isAddrYMM && x2.isYMM(); + } else if (mode == y_vy_y) { + isOK = x1.isYMM() && isAddrYMM && x2.isYMM(); + } else { // x_vy_x + isOK = !x1.isYMM() && isAddrYMM && !x2.isYMM(); + } + if (!isOK) + throw Error(ERR_BAD_VSIB_ADDRESSING); + } + opAVX_X_X_XM(isAddrYMM ? Ymm(x1.getIdx()) : x1, + isAddrYMM ? Ymm(x2.getIdx()) : x2, addr, type, code); + } + enum { xx_yy_zz = 0, xx_yx_zy = 1, xx_xy_yz = 2 }; + void checkGather2(const Xmm &x1, const Reg &x2, int mode) const { + if (x1.isXMM() && x2.isXMM()) + return; + switch (mode) { + case xx_yy_zz: + if ((x1.isYMM() && x2.isYMM()) || (x1.isZMM() && x2.isZMM())) + return; + break; + case xx_yx_zy: + if ((x1.isYMM() && x2.isXMM()) || (x1.isZMM() && x2.isYMM())) + return; + break; + case xx_xy_yz: + if ((x1.isXMM() && x2.isYMM()) || (x1.isYMM() && x2.isZMM())) + return; + break; + } + throw Error(ERR_BAD_VSIB_ADDRESSING); + } + void opGather2(const Xmm &x, const Address &addr, int type, uint8 code, + int mode) { + if (x.hasZero()) + throw Error(ERR_INVALID_ZERO); + checkGather2(x, addr.getRegExp().getIndex(), mode); + opVex(x, 0, addr, type, code); + } + /* + xx_xy_yz ; mode = true + xx_xy_xz ; mode = false + */ + void opVmov(const Operand &op, const Xmm &x, int type, uint8 code, + bool mode) { + if (mode) { + if (!op.isMEM() && + !((op.isXMM() && x.isXMM()) || (op.isXMM() && x.isYMM()) || + (op.isYMM() && x.isZMM()))) + throw Error(ERR_BAD_COMBINATION); + } else { + if (!op.isMEM() && !op.isXMM()) + throw Error(ERR_BAD_COMBINATION); + } + opVex(x, 0, op, type, code); + } + void opGatherFetch(const Address &addr, const Xmm &x, int type, uint8 code, + Operand::Kind kind) { + if (addr.hasZero()) + throw Error(ERR_INVALID_ZERO); + if (addr.getRegExp().getIndex().getKind() != kind) + throw Error(ERR_BAD_VSIB_ADDRESSING); + opVex(x, 0, addr, type, code); + } + void opInOut(const Reg &a, const Reg &d, uint8 code) { + if (a.getIdx() == Operand::AL && d.getIdx() == Operand::DX && + d.getBit() == 16) { + switch (a.getBit()) { + case 8: + db(code); + return; + case 16: + db(0x66); + db(code + 1); + return; + case 32: + db(code + 1); + return; + } + } + throw Error(ERR_BAD_COMBINATION); + } + void opInOut(const Reg &a, uint8 code, uint8 v) { + if (a.getIdx() == Operand::AL) { + switch (a.getBit()) { + case 8: + db(code); + db(v); + return; + case 16: + db(0x66); + db(code + 1); + db(v); + return; + case 32: + db(code + 1); + db(v); + return; + } + } + throw Error(ERR_BAD_COMBINATION); + } #include "xbyak_translator.h" public: - unsigned int getVersion() const { return VERSION; } - Xbyak_aarch64::CodeGenerator *xa_; - const Mmx mm0, mm1, mm2, mm3, mm4, mm5, mm6, mm7; - const Xmm xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7; - const Ymm ymm0, ymm1, ymm2, ymm3, ymm4, ymm5, ymm6, ymm7; - const Zmm zmm0, zmm1, zmm2, zmm3, zmm4, zmm5, zmm6, zmm7; - const Xmm &xm0, &xm1, &xm2, &xm3, &xm4, &xm5, &xm6, &xm7; - const Ymm &ym0, &ym1, &ym2, &ym3, &ym4, &ym5, &ym6, &ym7; - const Ymm &zm0, &zm1, &zm2, &zm3, &zm4, &zm5, &zm6, &zm7; - const Reg32 eax, ecx, edx, ebx, esp, ebp, esi, edi; - const Reg16 ax, cx, dx, bx, sp, bp, si, di; - const Reg8 al, cl, dl, bl, ah, ch, dh, bh; - const AddressFrame ptr, byte, word, dword, qword, xword, yword, zword; // xword is same as oword of NASM - const AddressFrame ptr_b, xword_b, yword_b, zword_b; // broadcast such as {1to2}, {1to4}, {1to8}, {1to16}, {b} - const Fpu st0, st1, st2, st3, st4, st5, st6, st7; - const Opmask k0, k1, k2, k3, k4, k5, k6, k7; - const BoundsReg bnd0, bnd1, bnd2, bnd3; - const EvexModifierRounding T_sae, T_rn_sae, T_rd_sae, T_ru_sae, T_rz_sae; // {sae}, {rn-sae}, {rd-sae}, {ru-sae}, {rz-sae} - const EvexModifierZero T_z; // {z} + unsigned int getVersion() const { return VERSION; } + Xbyak_aarch64::CodeGenerator *xa_; + const Mmx mm0, mm1, mm2, mm3, mm4, mm5, mm6, mm7; + const Xmm xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7; + const Ymm ymm0, ymm1, ymm2, ymm3, ymm4, ymm5, ymm6, ymm7; + const Zmm zmm0, zmm1, zmm2, zmm3, zmm4, zmm5, zmm6, zmm7; + const Xmm &xm0, &xm1, &xm2, &xm3, &xm4, &xm5, &xm6, &xm7; + const Ymm &ym0, &ym1, &ym2, &ym3, &ym4, &ym5, &ym6, &ym7; + const Ymm &zm0, &zm1, &zm2, &zm3, &zm4, &zm5, &zm6, &zm7; + const Reg32 eax, ecx, edx, ebx, esp, ebp, esi, edi; + const Reg16 ax, cx, dx, bx, sp, bp, si, di; + const Reg8 al, cl, dl, bl, ah, ch, dh, bh; + const AddressFrame ptr, byte, word, dword, qword, xword, yword, + zword; // xword is same as oword of NASM + const AddressFrame ptr_b, xword_b, yword_b, + zword_b; // broadcast such as {1to2}, {1to4}, {1to8}, {1to16}, {b} + const Fpu st0, st1, st2, st3, st4, st5, st6, st7; + const Opmask k0, k1, k2, k3, k4, k5, k6, k7; + const BoundsReg bnd0, bnd1, bnd2, bnd3; + const EvexModifierRounding T_sae, T_rn_sae, T_rd_sae, T_ru_sae, + T_rz_sae; // {sae}, {rn-sae}, {rd-sae}, {ru-sae}, {rz-sae} + const EvexModifierZero T_z; // {z} #ifdef XBYAK64 - const Reg64 rax, rcx, rdx, rbx, rsp, rbp, rsi, rdi, r8, r9, r10, r11, r12, r13, r14, r15; - const Reg32 r8d, r9d, r10d, r11d, r12d, r13d, r14d, r15d; - const Reg16 r8w, r9w, r10w, r11w, r12w, r13w, r14w, r15w; - const Reg8 r8b, r9b, r10b, r11b, r12b, r13b, r14b, r15b; - const Reg8 spl, bpl, sil, dil; - const Xmm xmm8, xmm9, xmm10, xmm11, xmm12, xmm13, xmm14, xmm15; - const Xmm xmm16, xmm17, xmm18, xmm19, xmm20, xmm21, xmm22, xmm23; - const Xmm xmm24, xmm25, xmm26, xmm27, xmm28, xmm29, xmm30, xmm31; - const Ymm ymm8, ymm9, ymm10, ymm11, ymm12, ymm13, ymm14, ymm15; - const Ymm ymm16, ymm17, ymm18, ymm19, ymm20, ymm21, ymm22, ymm23; - const Ymm ymm24, ymm25, ymm26, ymm27, ymm28, ymm29, ymm30, ymm31; - const Zmm zmm8, zmm9, zmm10, zmm11, zmm12, zmm13, zmm14, zmm15; - const Zmm zmm16, zmm17, zmm18, zmm19, zmm20, zmm21, zmm22, zmm23; - const Zmm zmm24, zmm25, zmm26, zmm27, zmm28, zmm29, zmm30, zmm31; - const Xmm &xm8, &xm9, &xm10, &xm11, &xm12, &xm13, &xm14, &xm15; // for my convenience - const Xmm &xm16, &xm17, &xm18, &xm19, &xm20, &xm21, &xm22, &xm23; - const Xmm &xm24, &xm25, &xm26, &xm27, &xm28, &xm29, &xm30, &xm31; - const Ymm &ym8, &ym9, &ym10, &ym11, &ym12, &ym13, &ym14, &ym15; - const Ymm &ym16, &ym17, &ym18, &ym19, &ym20, &ym21, &ym22, &ym23; - const Ymm &ym24, &ym25, &ym26, &ym27, &ym28, &ym29, &ym30, &ym31; - const Zmm &zm8, &zm9, &zm10, &zm11, &zm12, &zm13, &zm14, &zm15; - const Zmm &zm16, &zm17, &zm18, &zm19, &zm20, &zm21, &zm22, &zm23; - const Zmm &zm24, &zm25, &zm26, &zm27, &zm28, &zm29, &zm30, &zm31; - const RegRip rip; + const Reg64 rax, rcx, rdx, rbx, rsp, rbp, rsi, rdi, r8, r9, r10, r11, r12, + r13, r14, r15; + const Reg32 r8d, r9d, r10d, r11d, r12d, r13d, r14d, r15d; + const Reg16 r8w, r9w, r10w, r11w, r12w, r13w, r14w, r15w; + const Reg8 r8b, r9b, r10b, r11b, r12b, r13b, r14b, r15b; + const Reg8 spl, bpl, sil, dil; + const Xmm xmm8, xmm9, xmm10, xmm11, xmm12, xmm13, xmm14, xmm15; + const Xmm xmm16, xmm17, xmm18, xmm19, xmm20, xmm21, xmm22, xmm23; + const Xmm xmm24, xmm25, xmm26, xmm27, xmm28, xmm29, xmm30, xmm31; + const Ymm ymm8, ymm9, ymm10, ymm11, ymm12, ymm13, ymm14, ymm15; + const Ymm ymm16, ymm17, ymm18, ymm19, ymm20, ymm21, ymm22, ymm23; + const Ymm ymm24, ymm25, ymm26, ymm27, ymm28, ymm29, ymm30, ymm31; + const Zmm zmm8, zmm9, zmm10, zmm11, zmm12, zmm13, zmm14, zmm15; + const Zmm zmm16, zmm17, zmm18, zmm19, zmm20, zmm21, zmm22, zmm23; + const Zmm zmm24, zmm25, zmm26, zmm27, zmm28, zmm29, zmm30, zmm31; + const Xmm &xm8, &xm9, &xm10, &xm11, &xm12, &xm13, &xm14, + &xm15; // for my convenience + const Xmm &xm16, &xm17, &xm18, &xm19, &xm20, &xm21, &xm22, &xm23; + const Xmm &xm24, &xm25, &xm26, &xm27, &xm28, &xm29, &xm30, &xm31; + const Ymm &ym8, &ym9, &ym10, &ym11, &ym12, &ym13, &ym14, &ym15; + const Ymm &ym16, &ym17, &ym18, &ym19, &ym20, &ym21, &ym22, &ym23; + const Ymm &ym24, &ym25, &ym26, &ym27, &ym28, &ym29, &ym30, &ym31; + const Zmm &zm8, &zm9, &zm10, &zm11, &zm12, &zm13, &zm14, &zm15; + const Zmm &zm16, &zm17, &zm18, &zm19, &zm20, &zm21, &zm22, &zm23; + const Zmm &zm24, &zm25, &zm26, &zm27, &zm28, &zm29, &zm30, &zm31; + const RegRip rip; #endif -//private: - //bool isDefaultJmpNEAR_; -//public: - void L(const std::string& label) {} - void L(xa::Label& label) - { - xa_->L(label); - } - xa::Label L() - { - xa::Label label; - L(label); - return label; - } - // set default type of `jmp` of undefined label to T_NEAR - //void setDefaultJmpNEAR(bool isNear) { isDefaultJmpNEAR_ = isNear; } - void jmp(const Operand& op) { opR_ModM(op, BIT, 4, 0xFF, NONE, NONE, true); } - void jmp(std::string label, LabelType type = T_AUTO); - void jmp(const char *label, LabelType type = T_AUTO) { jmp(std::string(label), type); } - void jmp(const Label& label, LabelType type = T_AUTO) { xa_->b(label); } - void jmp(const void *addr, LabelType type = T_AUTO) { opJmpAbs(addr, type, 0xEB, 0xE9); } - - void call(const Operand& op) { opR_ModM(op, 16 | i32e, 2, 0xFF, NONE, NONE, true); } - // call(string label), not const std::string& - void call(std::string label); - void call(const char *label) { call(std::string(label)); } - void call(const Label& label); - // call(function pointer) + // private: + // bool isDefaultJmpNEAR_; + // public: + void L(const std::string &label) {} + void L(xa::Label &label) { xa_->L(label); } + xa::Label L() { + xa::Label label; + L(label); + return label; + } + // set default type of `jmp` of undefined label to T_NEAR + // void setDefaultJmpNEAR(bool isNear) { isDefaultJmpNEAR_ = isNear; } + void jmp(const Operand &op) { opR_ModM(op, BIT, 4, 0xFF, NONE, NONE, true); } + void jmp(std::string label, LabelType type = T_AUTO); + void jmp(const char *label, LabelType type = T_AUTO) { + jmp(std::string(label), type); + } + void jmp(const Label &label, LabelType type = T_AUTO) { xa_->b(label); } + void jmp(const void *addr, LabelType type = T_AUTO) { + opJmpAbs(addr, type, 0xEB, 0xE9); + } + + void call(const Operand &op) { + opR_ModM(op, 16 | i32e, 2, 0xFF, NONE, NONE, true); + } + // call(string label), not const std::string& + void call(std::string label); + void call(const char *label) { call(std::string(label)); } + void call(const Label &label); + // call(function pointer) #ifdef XBYAK_VARIADIC_TEMPLATE - template - void call(Ret(*func)(Params...)) { call(reinterpret_cast(func)); } + template void call(Ret (*func)(Params...)) { + call(reinterpret_cast(func)); + } #endif - void call(const void *addr) { opJmpAbs(addr, T_NEAR, 0, 0xE8); } - - void test(const Operand& op, const Reg& reg) - { - opModRM(reg, op, op.isREG() && (op.getKind() == reg.getKind()), op.isMEM(), 0x84); - decodeAndTransToAArch64(); - } - void test(const Operand& op, uint32 imm) - { - verifyMemHasSize(op); - int immSize = (std::min)(op.getBit() / 8, 4U); - if (op.isREG() && op.getIdx() == 0) { // al, ax, eax - rex(op); - db(0xA8 | (op.isBit(8) ? 0 : 1)); - } else { - opR_ModM(op, 0, 0, 0xF6, NONE, NONE, false, immSize); - } - db(imm, immSize); - - decodeAndTransToAArch64(); - } - void imul(const Reg& reg, const Operand& op) - { - opModRM(reg, op, op.isREG() && (reg.getKind() == op.getKind()), op.isMEM(), 0x0F, 0xAF); - decodeAndTransToAArch64(); - } - void imul(const Reg& reg, const Operand& op, int imm) - { - int s = inner::IsInDisp8(imm) ? 1 : 0; - int immSize = s ? 1 : reg.isREG(16) ? 2 : 4; - opModRM(reg, op, op.isREG() && (reg.getKind() == op.getKind()), op.isMEM(), 0x69 | (s << 1), NONE, NONE, immSize); - db(imm, immSize); - decodeAndTransToAArch64(); - } - void push(const Operand& op) - { - opPushPop(op, 0xFF, 6, 0x50); - decode_size_ = 0; + void call(const void *addr) { opJmpAbs(addr, T_NEAR, 0, 0xE8); } + + void test(const Operand &op, const Reg ®) { + opModRM(reg, op, op.isREG() && (op.getKind() == reg.getKind()), op.isMEM(), + 0x84); + decodeAndTransToAArch64(); + } + void test(const Operand &op, uint32 imm) { + verifyMemHasSize(op); + int immSize = (std::min)(op.getBit() / 8, 4U); + if (op.isREG() && op.getIdx() == 0) { // al, ax, eax + rex(op); + db(0xA8 | (op.isBit(8) ? 0 : 1)); + } else { + opR_ModM(op, 0, 0, 0xF6, NONE, NONE, false, immSize); + } + db(imm, immSize); + + decodeAndTransToAArch64(); + } + void imul(const Reg ®, const Operand &op) { + opModRM(reg, op, op.isREG() && (reg.getKind() == op.getKind()), op.isMEM(), + 0x0F, 0xAF); + decodeAndTransToAArch64(); + } + void imul(const Reg ®, const Operand &op, int imm) { + int s = inner::IsInDisp8(imm) ? 1 : 0; + int immSize = s ? 1 : reg.isREG(16) ? 2 : 4; + opModRM(reg, op, op.isREG() && (reg.getKind() == op.getKind()), op.isMEM(), + 0x69 | (s << 1), NONE, NONE, immSize); + db(imm, immSize); + decodeAndTransToAArch64(); + } + void push(const Operand &op) { + opPushPop(op, 0xFF, 6, 0x50); + decode_size_ = 0; #ifdef XT_AARCH64_STACK_REG - xa_->sub(xa_->sp, xa_->sp, NUM_BYTES_GEN_REG); - xa_->mov(X_TMP_0, xa_->sp); - xa_->str(xa::XReg(op.getIdx()), xa::ptr(X_TMP_0)); + xa_->sub(xa_->sp, xa_->sp, NUM_BYTES_GEN_REG); + xa_->mov(X_TMP_0, xa_->sp); + xa_->str(xa::XReg(op.getIdx()), xa::ptr(X_TMP_0)); #else //#ifdef XT_AARCH64_STACK_REG - xa_->str(xa::XReg(op.getIdx()), xa::pre_ptr(X_TRANSLATOR_STACK, -8)); + xa_->str(xa::XReg(op.getIdx()), xa::pre_ptr(X_TRANSLATOR_STACK, -8)); #endif //#ifdef XT_AARCH64_STACK_REG - db_clear(); - } + db_clear(); + } - void pop(const Operand& op) - { - opPushPop(op, 0x8F, 0, 0x58); - decode_size_ = 0; + void pop(const Operand &op) { + opPushPop(op, 0x8F, 0, 0x58); + decode_size_ = 0; #ifdef XT_AARCH64_STACK_REG - xa_->mov(X_TMP_0, xa_->sp); - xa_->ldr(xa::XReg(op.getIdx()), xa::ptr(X_TMP_0)); - xa_->add(xa_->sp, xa_->sp, NUM_BYTES_GEN_REG); + xa_->mov(X_TMP_0, xa_->sp); + xa_->ldr(xa::XReg(op.getIdx()), xa::ptr(X_TMP_0)); + xa_->add(xa_->sp, xa_->sp, NUM_BYTES_GEN_REG); #else //#ifdef XT_AARCH64_STACK_REG - xa_->ldr(xa::XReg(op.getIdx()), xa::post_ptr(X_TRANSLATOR_STACK, 8)); + xa_->ldr(xa::XReg(op.getIdx()), xa::post_ptr(X_TRANSLATOR_STACK, 8)); #endif //#ifdef XT_AARCH64_STACK_REG - db_clear(); - } - void push(const AddressFrame& af, uint32 imm) - { - } - /* use "push(word, 4)" if you want "push word 4" */ - void push(uint32 imm) - { - } - void mov(const Operand& reg1, const Operand& reg2) - { - const Reg *reg = 0; - const Address *addr = 0; - uint8 code = 0; - if (reg1.isREG() && reg1.getIdx() == 0 && reg2.isMEM()) { // mov eax|ax|al, [disp] - reg = ®1.getReg(); - addr = ®2.getAddress(); - code = 0xA0; - } else if (reg1.isMEM() && reg2.isREG() && reg2.getIdx() == 0) { // mov [disp], eax|ax|al - reg = ®2.getReg(); - addr = ®1.getAddress(); - code = 0xA2; - } + db_clear(); + } + void push(const AddressFrame &af, uint32 imm) {} + /* use "push(word, 4)" if you want "push word 4" */ + void push(uint32 imm) {} + void mov(const Operand ®1, const Operand ®2) { + const Reg *reg = 0; + const Address *addr = 0; + uint8 code = 0; + if (reg1.isREG() && reg1.getIdx() == 0 && + reg2.isMEM()) { // mov eax|ax|al, [disp] + reg = ®1.getReg(); + addr = ®2.getAddress(); + code = 0xA0; + } else if (reg1.isMEM() && reg2.isREG() && + reg2.getIdx() == 0) { // mov [disp], eax|ax|al + reg = ®2.getReg(); + addr = ®1.getAddress(); + code = 0xA2; + } #ifdef XBYAK64 - if (addr && addr->is64bitDisp()) { - if (code) { - rex(*reg); - db(reg1.isREG(8) ? 0xA0 : reg1.isREG() ? 0xA1 : reg2.isREG(8) ? 0xA2 : 0xA3); - db(addr->getDisp(), 8); - } else { - throw Error(ERR_BAD_COMBINATION); - } - } else + if (addr && addr->is64bitDisp()) { + if (code) { + rex(*reg); + db(reg1.isREG(8) ? 0xA0 + : reg1.isREG() ? 0xA1 + : reg2.isREG(8) ? 0xA2 + : 0xA3); + db(addr->getDisp(), 8); + } else { + throw Error(ERR_BAD_COMBINATION); + } + } else #else - if (code && addr->isOnlyDisp()) { - rex(*reg, *addr); - db(code | (reg->isBit(8) ? 0 : 1)); - dd(static_cast(addr->getDisp())); - } else + if (code && addr->isOnlyDisp()) { + rex(*reg, *addr); + db(code | (reg->isBit(8) ? 0 : 1)); + dd(static_cast(addr->getDisp())); + } else #endif - { - opRM_RM(reg1, reg2, 0x88); - } - decodeAndTransToAArch64(); - } - void mov(const Operand& op, size_t imm) - { - if (op.isREG()) { - const int size = mov_imm(op.getReg(), imm); - db(imm, size); - } else if (op.isMEM()) { - verifyMemHasSize(op); - int immSize = op.getBit() / 8; - if (immSize <= 4) { - sint64 s = sint64(imm) >> (immSize * 8); - if (s != 0 && s != -1) throw Error(ERR_IMM_IS_TOO_BIG); - } else { - if (!inner::IsInInt32(imm)) throw Error(ERR_IMM_IS_TOO_BIG); - immSize = 4; - } - opModM(op.getAddress(), Reg(0, Operand::REG, op.getBit()), 0xC6, NONE, NONE, immSize); - db(static_cast(imm), immSize); - } else { - throw Error(ERR_BAD_COMBINATION); - } - decodeAndTransToAArch64(); - } - void mov(const NativeReg& reg, const char *label); - void mov(const NativeReg& reg, const Label& label); - void xchg(const Operand& op1, const Operand& op2); - - enum { NONE = 256 }; - // constructor - CodeGenerator(size_t maxSize = DEFAULT_MAX_CODE_SIZE, void *userPtr = DontSetProtectRWE, Allocator *allocator = 0, xa::Allocator *alloc_aarch64 = 0) - : Xbyak::CodeArray(maxSize, userPtr, allocator), xa::CodeGenerator(maxSize, userPtr, alloc_aarch64) - , xa_(this) - , mm0(0), mm1(1), mm2(2), mm3(3), mm4(4), mm5(5), mm6(6), mm7(7) - , xmm0(0), xmm1(1), xmm2(2), xmm3(3), xmm4(4), xmm5(5), xmm6(6), xmm7(7) - , ymm0(0), ymm1(1), ymm2(2), ymm3(3), ymm4(4), ymm5(5), ymm6(6), ymm7(7) - , zmm0(0), zmm1(1), zmm2(2), zmm3(3), zmm4(4), zmm5(5), zmm6(6), zmm7(7) - // for my convenience - , xm0(xmm0), xm1(xmm1), xm2(xmm2), xm3(xmm3), xm4(xmm4), xm5(xmm5), xm6(xmm6), xm7(xmm7) - , ym0(ymm0), ym1(ymm1), ym2(ymm2), ym3(ymm3), ym4(ymm4), ym5(ymm5), ym6(ymm6), ym7(ymm7) - , zm0(zmm0), zm1(zmm1), zm2(zmm2), zm3(zmm3), zm4(zmm4), zm5(zmm5), zm6(zmm6), zm7(zmm7) - - , eax(Operand::EAX), ecx(Operand::ECX), edx(Operand::EDX), ebx(Operand::EBX), esp(Operand::ESP), ebp(Operand::EBP), esi(Operand::ESI), edi(Operand::EDI) - , ax(Operand::AX), cx(Operand::CX), dx(Operand::DX), bx(Operand::BX), sp(Operand::SP), bp(Operand::BP), si(Operand::SI), di(Operand::DI) - , al(Operand::AL), cl(Operand::CL), dl(Operand::DL), bl(Operand::BL), ah(Operand::AH), ch(Operand::CH), dh(Operand::DH), bh(Operand::BH) - , ptr(0), byte(8), word(16), dword(32), qword(64), xword(128), yword(256), zword(512) - , ptr_b(0, true), xword_b(128, true), yword_b(256, true), zword_b(512, true) - , st0(0), st1(1), st2(2), st3(3), st4(4), st5(5), st6(6), st7(7) - , k0(0), k1(1), k2(2), k3(3), k4(4), k5(5), k6(6), k7(7) - , bnd0(0), bnd1(1), bnd2(2), bnd3(3) - , T_sae(EvexModifierRounding::T_SAE), T_rn_sae(EvexModifierRounding::T_RN_SAE), T_rd_sae(EvexModifierRounding::T_RD_SAE), T_ru_sae(EvexModifierRounding::T_RU_SAE), T_rz_sae(EvexModifierRounding::T_RZ_SAE) - , T_z() + { + opRM_RM(reg1, reg2, 0x88); + } + decodeAndTransToAArch64(); + } + void mov(const Operand &op, size_t imm) { + if (op.isREG()) { + const int size = mov_imm(op.getReg(), imm); + db(imm, size); + } else if (op.isMEM()) { + verifyMemHasSize(op); + int immSize = op.getBit() / 8; + if (immSize <= 4) { + sint64 s = sint64(imm) >> (immSize * 8); + if (s != 0 && s != -1) + throw Error(ERR_IMM_IS_TOO_BIG); + } else { + if (!inner::IsInInt32(imm)) + throw Error(ERR_IMM_IS_TOO_BIG); + immSize = 4; + } + opModM(op.getAddress(), Reg(0, Operand::REG, op.getBit()), 0xC6, NONE, + NONE, immSize); + db(static_cast(imm), immSize); + } else { + throw Error(ERR_BAD_COMBINATION); + } + decodeAndTransToAArch64(); + } + void mov(const NativeReg ®, const char *label); + void mov(const NativeReg ®, const Label &label); + void xchg(const Operand &op1, const Operand &op2); + + enum { NONE = 256 }; + // constructor + CodeGenerator(size_t maxSize = DEFAULT_MAX_CODE_SIZE, + void *userPtr = DontSetProtectRWE, Allocator *allocator = 0, + xa::Allocator *alloc_aarch64 = 0) + : Xbyak::CodeArray(maxSize, userPtr, allocator), xa::CodeGenerator( + maxSize, userPtr, + alloc_aarch64), + xa_(this), mm0(0), mm1(1), mm2(2), mm3(3), mm4(4), mm5(5), mm6(6), + mm7(7), xmm0(0), xmm1(1), xmm2(2), xmm3(3), xmm4(4), xmm5(5), xmm6(6), + xmm7(7), ymm0(0), ymm1(1), ymm2(2), ymm3(3), ymm4(4), ymm5(5), ymm6(6), + ymm7(7), zmm0(0), zmm1(1), zmm2(2), zmm3(3), zmm4(4), zmm5(5), zmm6(6), + zmm7(7) + // for my convenience + , + xm0(xmm0), xm1(xmm1), xm2(xmm2), xm3(xmm3), xm4(xmm4), xm5(xmm5), + xm6(xmm6), xm7(xmm7), ym0(ymm0), ym1(ymm1), ym2(ymm2), ym3(ymm3), + ym4(ymm4), ym5(ymm5), ym6(ymm6), ym7(ymm7), zm0(zmm0), zm1(zmm1), + zm2(zmm2), zm3(zmm3), zm4(zmm4), zm5(zmm5), zm6(zmm6), zm7(zmm7) + + , + eax(Operand::EAX), ecx(Operand::ECX), edx(Operand::EDX), + ebx(Operand::EBX), esp(Operand::ESP), ebp(Operand::EBP), + esi(Operand::ESI), edi(Operand::EDI), ax(Operand::AX), cx(Operand::CX), + dx(Operand::DX), bx(Operand::BX), sp(Operand::SP), bp(Operand::BP), + si(Operand::SI), di(Operand::DI), al(Operand::AL), cl(Operand::CL), + dl(Operand::DL), bl(Operand::BL), ah(Operand::AH), ch(Operand::CH), + dh(Operand::DH), bh(Operand::BH), ptr(0), byte(8), word(16), dword(32), + qword(64), xword(128), yword(256), zword(512), ptr_b(0, true), + xword_b(128, true), yword_b(256, true), zword_b(512, true), st0(0), + st1(1), st2(2), st3(3), st4(4), st5(5), st6(6), st7(7), k0(0), k1(1), + k2(2), k3(3), k4(4), k5(5), k6(6), k7(7), bnd0(0), bnd1(1), bnd2(2), + bnd3(3), T_sae(EvexModifierRounding::T_SAE), + T_rn_sae(EvexModifierRounding::T_RN_SAE), + T_rd_sae(EvexModifierRounding::T_RD_SAE), + T_ru_sae(EvexModifierRounding::T_RU_SAE), + T_rz_sae(EvexModifierRounding::T_RZ_SAE), T_z() #ifdef XBYAK64 - , rax(Operand::RAX), rcx(Operand::RCX), rdx(Operand::RDX), rbx(Operand::RBX), rsp(Operand::RSP), rbp(Operand::RBP), rsi(Operand::RSI), rdi(Operand::RDI), r8(Operand::R8), r9(Operand::R9), r10(Operand::R10), r11(Operand::R11), r12(Operand::R12), r13(Operand::R13), r14(Operand::R14), r15(Operand::R15) - , r8d(8), r9d(9), r10d(10), r11d(11), r12d(12), r13d(13), r14d(14), r15d(15) - , r8w(8), r9w(9), r10w(10), r11w(11), r12w(12), r13w(13), r14w(14), r15w(15) - , r8b(8), r9b(9), r10b(10), r11b(11), r12b(12), r13b(13), r14b(14), r15b(15) - , spl(Operand::SPL, true), bpl(Operand::BPL, true), sil(Operand::SIL, true), dil(Operand::DIL, true) - , xmm8(8), xmm9(9), xmm10(10), xmm11(11), xmm12(12), xmm13(13), xmm14(14), xmm15(15) - , xmm16(16), xmm17(17), xmm18(18), xmm19(19), xmm20(20), xmm21(21), xmm22(22), xmm23(23) - , xmm24(24), xmm25(25), xmm26(26), xmm27(27), xmm28(28), xmm29(29), xmm30(30), xmm31(31) - , ymm8(8), ymm9(9), ymm10(10), ymm11(11), ymm12(12), ymm13(13), ymm14(14), ymm15(15) - , ymm16(16), ymm17(17), ymm18(18), ymm19(19), ymm20(20), ymm21(21), ymm22(22), ymm23(23) - , ymm24(24), ymm25(25), ymm26(26), ymm27(27), ymm28(28), ymm29(29), ymm30(30), ymm31(31) - , zmm8(8), zmm9(9), zmm10(10), zmm11(11), zmm12(12), zmm13(13), zmm14(14), zmm15(15) - , zmm16(16), zmm17(17), zmm18(18), zmm19(19), zmm20(20), zmm21(21), zmm22(22), zmm23(23) - , zmm24(24), zmm25(25), zmm26(26), zmm27(27), zmm28(28), zmm29(29), zmm30(30), zmm31(31) - // for my convenience - , xm8(xmm8), xm9(xmm9), xm10(xmm10), xm11(xmm11), xm12(xmm12), xm13(xmm13), xm14(xmm14), xm15(xmm15) - , xm16(xmm16), xm17(xmm17), xm18(xmm18), xm19(xmm19), xm20(xmm20), xm21(xmm21), xm22(xmm22), xm23(xmm23) - , xm24(xmm24), xm25(xmm25), xm26(xmm26), xm27(xmm27), xm28(xmm28), xm29(xmm29), xm30(xmm30), xm31(xmm31) - , ym8(ymm8), ym9(ymm9), ym10(ymm10), ym11(ymm11), ym12(ymm12), ym13(ymm13), ym14(ymm14), ym15(ymm15) - , ym16(ymm16), ym17(ymm17), ym18(ymm18), ym19(ymm19), ym20(ymm20), ym21(ymm21), ym22(ymm22), ym23(ymm23) - , ym24(ymm24), ym25(ymm25), ym26(ymm26), ym27(ymm27), ym28(ymm28), ym29(ymm29), ym30(ymm30), ym31(ymm31) - , zm8(zmm8), zm9(zmm9), zm10(zmm10), zm11(zmm11), zm12(zmm12), zm13(zmm13), zm14(zmm14), zm15(zmm15) - , zm16(zmm16), zm17(zmm17), zm18(zmm18), zm19(zmm19), zm20(zmm20), zm21(zmm21), zm22(zmm22), zm23(zmm23) - , zm24(zmm24), zm25(zmm25), zm26(zmm26), zm27(zmm27), zm28(zmm28), zm29(zmm29), zm30(zmm30), zm31(zmm31) - , rip() + , + rax(Operand::RAX), rcx(Operand::RCX), rdx(Operand::RDX), + rbx(Operand::RBX), rsp(Operand::RSP), rbp(Operand::RBP), + rsi(Operand::RSI), rdi(Operand::RDI), r8(Operand::R8), r9(Operand::R9), + r10(Operand::R10), r11(Operand::R11), r12(Operand::R12), + r13(Operand::R13), r14(Operand::R14), r15(Operand::R15), r8d(8), r9d(9), + r10d(10), r11d(11), r12d(12), r13d(13), r14d(14), r15d(15), r8w(8), + r9w(9), r10w(10), r11w(11), r12w(12), r13w(13), r14w(14), r15w(15), + r8b(8), r9b(9), r10b(10), r11b(11), r12b(12), r13b(13), r14b(14), + r15b(15), spl(Operand::SPL, true), bpl(Operand::BPL, true), + sil(Operand::SIL, true), dil(Operand::DIL, true), xmm8(8), xmm9(9), + xmm10(10), xmm11(11), xmm12(12), xmm13(13), xmm14(14), xmm15(15), + xmm16(16), xmm17(17), xmm18(18), xmm19(19), xmm20(20), xmm21(21), + xmm22(22), xmm23(23), xmm24(24), xmm25(25), xmm26(26), xmm27(27), + xmm28(28), xmm29(29), xmm30(30), xmm31(31), ymm8(8), ymm9(9), ymm10(10), + ymm11(11), ymm12(12), ymm13(13), ymm14(14), ymm15(15), ymm16(16), + ymm17(17), ymm18(18), ymm19(19), ymm20(20), ymm21(21), ymm22(22), + ymm23(23), ymm24(24), ymm25(25), ymm26(26), ymm27(27), ymm28(28), + ymm29(29), ymm30(30), ymm31(31), zmm8(8), zmm9(9), zmm10(10), zmm11(11), + zmm12(12), zmm13(13), zmm14(14), zmm15(15), zmm16(16), zmm17(17), + zmm18(18), zmm19(19), zmm20(20), zmm21(21), zmm22(22), zmm23(23), + zmm24(24), zmm25(25), zmm26(26), zmm27(27), zmm28(28), zmm29(29), + zmm30(30), zmm31(31) + // for my convenience + , + xm8(xmm8), xm9(xmm9), xm10(xmm10), xm11(xmm11), xm12(xmm12), + xm13(xmm13), xm14(xmm14), xm15(xmm15), xm16(xmm16), xm17(xmm17), + xm18(xmm18), xm19(xmm19), xm20(xmm20), xm21(xmm21), xm22(xmm22), + xm23(xmm23), xm24(xmm24), xm25(xmm25), xm26(xmm26), xm27(xmm27), + xm28(xmm28), xm29(xmm29), xm30(xmm30), xm31(xmm31), ym8(ymm8), + ym9(ymm9), ym10(ymm10), ym11(ymm11), ym12(ymm12), ym13(ymm13), + ym14(ymm14), ym15(ymm15), ym16(ymm16), ym17(ymm17), ym18(ymm18), + ym19(ymm19), ym20(ymm20), ym21(ymm21), ym22(ymm22), ym23(ymm23), + ym24(ymm24), ym25(ymm25), ym26(ymm26), ym27(ymm27), ym28(ymm28), + ym29(ymm29), ym30(ymm30), ym31(ymm31), zm8(zmm8), zm9(zmm9), + zm10(zmm10), zm11(zmm11), zm12(zmm12), zm13(zmm13), zm14(zmm14), + zm15(zmm15), zm16(zmm16), zm17(zmm17), zm18(zmm18), zm19(zmm19), + zm20(zmm20), zm21(zmm21), zm22(zmm22), zm23(zmm23), zm24(zmm24), + zm25(zmm25), zm26(zmm26), zm27(zmm27), zm28(zmm28), zm29(zmm29), + zm30(zmm30), zm31(zmm31), rip() #endif - //, isDefaultJmpNEAR_(false) - { + //, isDefaultJmpNEAR_(false) + { #ifdef XT_TEST - setTestMode(true); + setTestMode(true); #endif - } - void reset() - { - } + } + void reset() {} #ifdef XBYAK_TEST - void dump(bool doClear = true) - { - CodeArray::dump(); - if (doClear) size_ = 0; - } + void dump(bool doClear = true) { + CodeArray::dump(); + if (doClear) + size_ = 0; + } #endif #ifdef XBYAK_UNDEF_JNL #undef jnl #endif - /* - use single byte nop if useMultiByteNop = false - */ - void nop(size_t size = 1, bool useMultiByteNop = true) - { - if (!useMultiByteNop) { - for (size_t i = 0; i < size; i++) { - db(0x90); - db_clear(); - } - xa_->nop(); - return; - } - /* - Intel Architectures Software Developer's Manual Volume 2 - recommended multi-byte sequence of NOP instruction - AMD and Intel seem to agree on the same sequences for up to 9 bytes: - https://support.amd.com/TechDocs/55723_SOG_Fam_17h_Processors_3.00.pdf - */ - static const uint8 nopTbl[9][9] = { - {0x90}, - {0x66, 0x90}, - {0x0F, 0x1F, 0x00}, - {0x0F, 0x1F, 0x40, 0x00}, - {0x0F, 0x1F, 0x44, 0x00, 0x00}, - {0x66, 0x0F, 0x1F, 0x44, 0x00, 0x00}, - {0x0F, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00}, - {0x0F, 0x1F, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x66, 0x0F, 0x1F, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00}, - }; - const size_t n = sizeof(nopTbl) / sizeof(nopTbl[0]); - while (size > 0) { - size_t len = (std::min)(n, size); - const uint8 *seq = nopTbl[len - 1]; - db(seq, len); - db_clear(); - size -= len; - } - xa_->nop(); - } + /* + use single byte nop if useMultiByteNop = false + */ + void nop(size_t size = 1, bool useMultiByteNop = true) { + if (!useMultiByteNop) { + for (size_t i = 0; i < size; i++) { + db(0x90); + db_clear(); + } + xa_->nop(); + return; + } + /* + Intel Architectures Software Developer's Manual Volume 2 + recommended multi-byte sequence of NOP instruction + AMD and Intel seem to agree on the same sequences for up to 9 bytes: + https://support.amd.com/TechDocs/55723_SOG_Fam_17h_Processors_3.00.pdf + */ + static const uint8 nopTbl[9][9] = { + {0x90}, + {0x66, 0x90}, + {0x0F, 0x1F, 0x00}, + {0x0F, 0x1F, 0x40, 0x00}, + {0x0F, 0x1F, 0x44, 0x00, 0x00}, + {0x66, 0x0F, 0x1F, 0x44, 0x00, 0x00}, + {0x0F, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00}, + {0x0F, 0x1F, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x66, 0x0F, 0x1F, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00}, + }; + const size_t n = sizeof(nopTbl) / sizeof(nopTbl[0]); + while (size > 0) { + size_t len = (std::min)(n, size); + const uint8 *seq = nopTbl[len - 1]; + db(seq, len); + db_clear(); + size -= len; + } + xa_->nop(); + } #ifndef XBYAK_DONT_READ_LIST #include "xbyak_mnemonic.h" - /* - use single byte nop if useMultiByteNop = false - */ - void align(size_t x = 16, bool useMultiByteNop = true) - { - xa_->align(x); - } + /* + use single byte nop if useMultiByteNop = false + */ + void align(size_t x = 16, bool useMultiByteNop = true) { xa_->align(x); } #endif }; namespace util { static const Mmx mm0(0), mm1(1), mm2(2), mm3(3), mm4(4), mm5(5), mm6(6), mm7(7); -static const Xmm xmm0(0), xmm1(1), xmm2(2), xmm3(3), xmm4(4), xmm5(5), xmm6(6), xmm7(7); -static const Ymm ymm0(0), ymm1(1), ymm2(2), ymm3(3), ymm4(4), ymm5(5), ymm6(6), ymm7(7); -static const Zmm zmm0(0), zmm1(1), zmm2(2), zmm3(3), zmm4(4), zmm5(5), zmm6(6), zmm7(7); -static const Reg32 eax(Operand::EAX), ecx(Operand::ECX), edx(Operand::EDX), ebx(Operand::EBX), esp(Operand::ESP), ebp(Operand::EBP), esi(Operand::ESI), edi(Operand::EDI); -static const Reg16 ax(Operand::AX), cx(Operand::CX), dx(Operand::DX), bx(Operand::BX), sp(Operand::SP), bp(Operand::BP), si(Operand::SI), di(Operand::DI); -static const Reg8 al(Operand::AL), cl(Operand::CL), dl(Operand::DL), bl(Operand::BL), ah(Operand::AH), ch(Operand::CH), dh(Operand::DH), bh(Operand::BH); -static const AddressFrame ptr(0), byte(8), word(16), dword(32), qword(64), xword(128), yword(256), zword(512); -static const AddressFrame ptr_b(0, true), xword_b(128, true), yword_b(256, true), zword_b(512, true); +static const Xmm xmm0(0), xmm1(1), xmm2(2), xmm3(3), xmm4(4), xmm5(5), xmm6(6), + xmm7(7); +static const Ymm ymm0(0), ymm1(1), ymm2(2), ymm3(3), ymm4(4), ymm5(5), ymm6(6), + ymm7(7); +static const Zmm zmm0(0), zmm1(1), zmm2(2), zmm3(3), zmm4(4), zmm5(5), zmm6(6), + zmm7(7); +static const Reg32 eax(Operand::EAX), ecx(Operand::ECX), edx(Operand::EDX), + ebx(Operand::EBX), esp(Operand::ESP), ebp(Operand::EBP), esi(Operand::ESI), + edi(Operand::EDI); +static const Reg16 ax(Operand::AX), cx(Operand::CX), dx(Operand::DX), + bx(Operand::BX), sp(Operand::SP), bp(Operand::BP), si(Operand::SI), + di(Operand::DI); +static const Reg8 al(Operand::AL), cl(Operand::CL), dl(Operand::DL), + bl(Operand::BL), ah(Operand::AH), ch(Operand::CH), dh(Operand::DH), + bh(Operand::BH); +static const AddressFrame ptr(0), byte(8), word(16), dword(32), qword(64), + xword(128), yword(256), zword(512); +static const AddressFrame ptr_b(0, true), xword_b(128, true), + yword_b(256, true), zword_b(512, true); static const Fpu st0(0), st1(1), st2(2), st3(3), st4(4), st5(5), st6(6), st7(7); static const Opmask k0(0), k1(1), k2(2), k3(3), k4(4), k5(5), k6(6), k7(7); static const BoundsReg bnd0(0), bnd1(1), bnd2(2), bnd3(3); -static const EvexModifierRounding T_sae(EvexModifierRounding::T_SAE), T_rn_sae(EvexModifierRounding::T_RN_SAE), T_rd_sae(EvexModifierRounding::T_RD_SAE), T_ru_sae(EvexModifierRounding::T_RU_SAE), T_rz_sae(EvexModifierRounding::T_RZ_SAE); +static const EvexModifierRounding T_sae(EvexModifierRounding::T_SAE), + T_rn_sae(EvexModifierRounding::T_RN_SAE), + T_rd_sae(EvexModifierRounding::T_RD_SAE), + T_ru_sae(EvexModifierRounding::T_RU_SAE), + T_rz_sae(EvexModifierRounding::T_RZ_SAE); static const EvexModifierZero T_z; #ifdef XBYAK64 - static const Reg64 rax(Operand::RAX), rcx(Operand::RCX), rdx(Operand::RDX), rbx(Operand::RBX), rsp(Operand::RSP), rbp(Operand::RBP), rsi(Operand::RSI), rdi(Operand::RDI), r8(Operand::R8), r9(Operand::R9), r10(Operand::R10), r11(Operand::R11), r12(Operand::R12), r13(Operand::R13), r14(Operand::R14), r15(Operand::R15); - static const Reg32 r8d(8), r9d(9), r10d(10), r11d(11), r12d(12), r13d(13), r14d(14), r15d(15); - static const Reg16 r8w(8), r9w(9), r10w(10), r11w(11), r12w(12), r13w(13), r14w(14), r15w(15); - static const Reg8 r8b(8), r9b(9), r10b(10), r11b(11), r12b(12), r13b(13), r14b(14), r15b(15), spl(Operand::SPL, true), bpl(Operand::BPL, true), sil(Operand::SIL, true), dil(Operand::DIL, true); - static const Xmm xmm8(8), xmm9(9), xmm10(10), xmm11(11), xmm12(12), xmm13(13), xmm14(14), xmm15(15); - static const Xmm xmm16(16), xmm17(17), xmm18(18), xmm19(19), xmm20(20), xmm21(21), xmm22(22), xmm23(23); - static const Xmm xmm24(24), xmm25(25), xmm26(26), xmm27(27), xmm28(28), xmm29(29), xmm30(30), xmm31(31); - static const Ymm ymm8(8), ymm9(9), ymm10(10), ymm11(11), ymm12(12), ymm13(13), ymm14(14), ymm15(15); - static const Ymm ymm16(16), ymm17(17), ymm18(18), ymm19(19), ymm20(20), ymm21(21), ymm22(22), ymm23(23); - static const Ymm ymm24(24), ymm25(25), ymm26(26), ymm27(27), ymm28(28), ymm29(29), ymm30(30), ymm31(31); - static const Zmm zmm8(8), zmm9(9), zmm10(10), zmm11(11), zmm12(12), zmm13(13), zmm14(14), zmm15(15); - static const Zmm zmm16(16), zmm17(17), zmm18(18), zmm19(19), zmm20(20), zmm21(21), zmm22(22), zmm23(23); - static const Zmm zmm24(24), zmm25(25), zmm26(26), zmm27(27), zmm28(28), zmm29(29), zmm30(30), zmm31(31); - static const RegRip rip; +static const Reg64 rax(Operand::RAX), rcx(Operand::RCX), rdx(Operand::RDX), + rbx(Operand::RBX), rsp(Operand::RSP), rbp(Operand::RBP), rsi(Operand::RSI), + rdi(Operand::RDI), r8(Operand::R8), r9(Operand::R9), r10(Operand::R10), + r11(Operand::R11), r12(Operand::R12), r13(Operand::R13), r14(Operand::R14), + r15(Operand::R15); +static const Reg32 r8d(8), r9d(9), r10d(10), r11d(11), r12d(12), r13d(13), + r14d(14), r15d(15); +static const Reg16 r8w(8), r9w(9), r10w(10), r11w(11), r12w(12), r13w(13), + r14w(14), r15w(15); +static const Reg8 r8b(8), r9b(9), r10b(10), r11b(11), r12b(12), r13b(13), + r14b(14), r15b(15), spl(Operand::SPL, true), bpl(Operand::BPL, true), + sil(Operand::SIL, true), dil(Operand::DIL, true); +static const Xmm xmm8(8), xmm9(9), xmm10(10), xmm11(11), xmm12(12), xmm13(13), + xmm14(14), xmm15(15); +static const Xmm xmm16(16), xmm17(17), xmm18(18), xmm19(19), xmm20(20), + xmm21(21), xmm22(22), xmm23(23); +static const Xmm xmm24(24), xmm25(25), xmm26(26), xmm27(27), xmm28(28), + xmm29(29), xmm30(30), xmm31(31); +static const Ymm ymm8(8), ymm9(9), ymm10(10), ymm11(11), ymm12(12), ymm13(13), + ymm14(14), ymm15(15); +static const Ymm ymm16(16), ymm17(17), ymm18(18), ymm19(19), ymm20(20), + ymm21(21), ymm22(22), ymm23(23); +static const Ymm ymm24(24), ymm25(25), ymm26(26), ymm27(27), ymm28(28), + ymm29(29), ymm30(30), ymm31(31); +static const Zmm zmm8(8), zmm9(9), zmm10(10), zmm11(11), zmm12(12), zmm13(13), + zmm14(14), zmm15(15); +static const Zmm zmm16(16), zmm17(17), zmm18(18), zmm19(19), zmm20(20), + zmm21(21), zmm22(22), zmm23(23); +static const Zmm zmm24(24), zmm25(25), zmm26(26), zmm27(27), zmm28(28), + zmm29(29), zmm30(30), zmm31(31); +static const RegRip rip; #endif -} // util +} // namespace util #ifdef _MSC_VER - #pragma warning(pop) +#pragma warning(pop) #endif -} // end of namespace +} // namespace Xbyak #endif // XBYAK_XBYAK_H_ diff --git a/translator/include/xbyak_translator_aarch64/xbyak_mnemonic.h b/translator/include/xbyak_translator_aarch64/xbyak_mnemonic.h index 099dccb0..2f860a82 100644 --- a/translator/include/xbyak_translator_aarch64/xbyak_mnemonic.h +++ b/translator/include/xbyak_translator_aarch64/xbyak_mnemonic.h @@ -1,780 +1,777 @@ /******************************************************************************* -* Copyright 2020 FUJITSU LIMITED -* -* Licensed under the Apache License, Version 2.0 (the ""License""); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an ""AS IS"" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*******************************************************************************/ + * Copyright 2020 FUJITSU LIMITED + * + * Licensed under the Apache License, Version 2.0 (the ""License""); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an ""AS IS"" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ /******************************************************************************* -* Copyright 2016-2019 Intel Corporation -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*******************************************************************************/ + * Copyright 2016-2019 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ /******************************************************************************* -* Copyright (c) 2007 MITSUNARI Shigeo -* All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* Redistributions of source code must retain the above copyright notice, this -* list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice, -* this list of conditions and the following disclaimer in the documentation -* and/or other materials provided with the distribution. -* Neither the name of the copyright owner nor the names of its contributors may -* be used to endorse or promote products derived from this software without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -* THE POSSIBILITY OF SUCH DAMAGE. -*******************************************************************************/ + * Copyright (c) 2007 MITSUNARI Shigeo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * Neither the name of the copyright owner nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + *******************************************************************************/ -const char *getVersionString() const -{ - return "5.85"; -} -void adc(const Operand& op, uint32 imm); -void adc(const Operand& op1, const Operand& op2); -void adcx(const Reg32e& reg, const Operand& op); -void add(const Operand& op, uint32 imm); -void add(const Operand& op1, const Operand& op2); -void addpd(const Xmm& xmm, const Operand& op); -void addps(const Xmm& xmm, const Operand& op); -void addsd(const Xmm& xmm, const Operand& op); -void addss(const Xmm& xmm, const Operand& op); -void addsubpd(const Xmm& xmm, const Operand& op); -void addsubps(const Xmm& xmm, const Operand& op); -void adox(const Reg32e& reg, const Operand& op); -void aesdec(const Xmm& xmm, const Operand& op); -void aesdeclast(const Xmm& xmm, const Operand& op); -void aesenc(const Xmm& xmm, const Operand& op); -void aesenclast(const Xmm& xmm, const Operand& op); -void aesimc(const Xmm& xmm, const Operand& op); -void aeskeygenassist(const Xmm& xmm, const Operand& op, uint8 imm); -void and_(const Operand& op, uint32 imm); -void and_(const Operand& op1, const Operand& op2); -void andn(const Reg32e& r1, const Reg32e& r2, const Operand& op); -void andnpd(const Xmm& xmm, const Operand& op); -void andnps(const Xmm& xmm, const Operand& op); -void andpd(const Xmm& xmm, const Operand& op); -void andps(const Xmm& xmm, const Operand& op); -void bextr(const Reg32e& r1, const Operand& op, const Reg32e& r2); -void blendpd(const Xmm& xmm, const Operand& op, int imm); -void blendps(const Xmm& xmm, const Operand& op, int imm); -void blendvpd(const Xmm& xmm, const Operand& op); -void blendvps(const Xmm& xmm, const Operand& op); -void blsi(const Reg32e& r, const Operand& op); -void blsmsk(const Reg32e& r, const Operand& op); -void blsr(const Reg32e& r, const Operand& op); +const char *getVersionString() const { return "5.85"; } +void adc(const Operand &op, uint32 imm); +void adc(const Operand &op1, const Operand &op2); +void adcx(const Reg32e ®, const Operand &op); +void add(const Operand &op, uint32 imm); +void add(const Operand &op1, const Operand &op2); +void addpd(const Xmm &xmm, const Operand &op); +void addps(const Xmm &xmm, const Operand &op); +void addsd(const Xmm &xmm, const Operand &op); +void addss(const Xmm &xmm, const Operand &op); +void addsubpd(const Xmm &xmm, const Operand &op); +void addsubps(const Xmm &xmm, const Operand &op); +void adox(const Reg32e ®, const Operand &op); +void aesdec(const Xmm &xmm, const Operand &op); +void aesdeclast(const Xmm &xmm, const Operand &op); +void aesenc(const Xmm &xmm, const Operand &op); +void aesenclast(const Xmm &xmm, const Operand &op); +void aesimc(const Xmm &xmm, const Operand &op); +void aeskeygenassist(const Xmm &xmm, const Operand &op, uint8 imm); +void and_(const Operand &op, uint32 imm); +void and_(const Operand &op1, const Operand &op2); +void andn(const Reg32e &r1, const Reg32e &r2, const Operand &op); +void andnpd(const Xmm &xmm, const Operand &op); +void andnps(const Xmm &xmm, const Operand &op); +void andpd(const Xmm &xmm, const Operand &op); +void andps(const Xmm &xmm, const Operand &op); +void bextr(const Reg32e &r1, const Operand &op, const Reg32e &r2); +void blendpd(const Xmm &xmm, const Operand &op, int imm); +void blendps(const Xmm &xmm, const Operand &op, int imm); +void blendvpd(const Xmm &xmm, const Operand &op); +void blendvps(const Xmm &xmm, const Operand &op); +void blsi(const Reg32e &r, const Operand &op); +void blsmsk(const Reg32e &r, const Operand &op); +void blsr(const Reg32e &r, const Operand &op); void bnd(); -void bndcl(const BoundsReg& bnd, const Operand& op); -void bndcn(const BoundsReg& bnd, const Operand& op); -void bndcu(const BoundsReg& bnd, const Operand& op); -void bndldx(const BoundsReg& bnd, const Address& addr); -void bndmk(const BoundsReg& bnd, const Address& addr); -void bndmov(const Address& addr, const BoundsReg& bnd); -void bndmov(const BoundsReg& bnd, const Operand& op); -void bndstx(const Address& addr, const BoundsReg& bnd); -void bsf(const Reg& reg, const Operand& op); -void bsr(const Reg& reg, const Operand& op); -void bswap(const Reg32e& reg); -void bt(const Operand& op, const Reg& reg); -void bt(const Operand& op, uint8 imm); -void btc(const Operand& op, const Reg& reg); -void btc(const Operand& op, uint8 imm); -void btr(const Operand& op, const Reg& reg); -void btr(const Operand& op, uint8 imm); -void bts(const Operand& op, const Reg& reg); -void bts(const Operand& op, uint8 imm); -void bzhi(const Reg32e& r1, const Operand& op, const Reg32e& r2); +void bndcl(const BoundsReg &bnd, const Operand &op); +void bndcn(const BoundsReg &bnd, const Operand &op); +void bndcu(const BoundsReg &bnd, const Operand &op); +void bndldx(const BoundsReg &bnd, const Address &addr); +void bndmk(const BoundsReg &bnd, const Address &addr); +void bndmov(const Address &addr, const BoundsReg &bnd); +void bndmov(const BoundsReg &bnd, const Operand &op); +void bndstx(const Address &addr, const BoundsReg &bnd); +void bsf(const Reg ®, const Operand &op); +void bsr(const Reg ®, const Operand &op); +void bswap(const Reg32e ®); +void bt(const Operand &op, const Reg ®); +void bt(const Operand &op, uint8 imm); +void btc(const Operand &op, const Reg ®); +void btc(const Operand &op, uint8 imm); +void btr(const Operand &op, const Reg ®); +void btr(const Operand &op, uint8 imm); +void bts(const Operand &op, const Reg ®); +void bts(const Operand &op, uint8 imm); +void bzhi(const Reg32e &r1, const Operand &op, const Reg32e &r2); void cbw(); void cdq(); void clc(); void cld(); -void clflush(const Address& addr); -void clflushopt(const Address& addr); +void clflush(const Address &addr); +void clflushopt(const Address &addr); void cli(); void clzero(); void cmc(); -void cmova(const Reg& reg, const Operand& op); -void cmovae(const Reg& reg, const Operand& op); -void cmovb(const Reg& reg, const Operand& op); -void cmovbe(const Reg& reg, const Operand& op); -void cmovc(const Reg& reg, const Operand& op); -void cmove(const Reg& reg, const Operand& op); -void cmovg(const Reg& reg, const Operand& op); -void cmovge(const Reg& reg, const Operand& op); -void cmovl(const Reg& reg, const Operand& op); -void cmovle(const Reg& reg, const Operand& op); -void cmovna(const Reg& reg, const Operand& op); -void cmovnae(const Reg& reg, const Operand& op); -void cmovnb(const Reg& reg, const Operand& op); -void cmovnbe(const Reg& reg, const Operand& op); -void cmovnc(const Reg& reg, const Operand& op); -void cmovne(const Reg& reg, const Operand& op); -void cmovng(const Reg& reg, const Operand& op); -void cmovnge(const Reg& reg, const Operand& op); -void cmovnl(const Reg& reg, const Operand& op); -void cmovnle(const Reg& reg, const Operand& op); -void cmovno(const Reg& reg, const Operand& op); -void cmovnp(const Reg& reg, const Operand& op); -void cmovns(const Reg& reg, const Operand& op); -void cmovnz(const Reg& reg, const Operand& op); -void cmovo(const Reg& reg, const Operand& op); -void cmovp(const Reg& reg, const Operand& op); -void cmovpe(const Reg& reg, const Operand& op); -void cmovpo(const Reg& reg, const Operand& op); -void cmovs(const Reg& reg, const Operand& op); -void cmovz(const Reg& reg, const Operand& op); -void cmp(const Operand& op, uint32 imm); -void cmp(const Operand& op1, const Operand& op2); -void cmpeqpd(const Xmm& x, const Operand& op); -void cmpeqps(const Xmm& x, const Operand& op); -void cmpeqsd(const Xmm& x, const Operand& op); -void cmpeqss(const Xmm& x, const Operand& op); -void cmplepd(const Xmm& x, const Operand& op); -void cmpleps(const Xmm& x, const Operand& op); -void cmplesd(const Xmm& x, const Operand& op); -void cmpless(const Xmm& x, const Operand& op); -void cmpltpd(const Xmm& x, const Operand& op); -void cmpltps(const Xmm& x, const Operand& op); -void cmpltsd(const Xmm& x, const Operand& op); -void cmpltss(const Xmm& x, const Operand& op); -void cmpneqpd(const Xmm& x, const Operand& op); -void cmpneqps(const Xmm& x, const Operand& op); -void cmpneqsd(const Xmm& x, const Operand& op); -void cmpneqss(const Xmm& x, const Operand& op); -void cmpnlepd(const Xmm& x, const Operand& op); -void cmpnleps(const Xmm& x, const Operand& op); -void cmpnlesd(const Xmm& x, const Operand& op); -void cmpnless(const Xmm& x, const Operand& op); -void cmpnltpd(const Xmm& x, const Operand& op); -void cmpnltps(const Xmm& x, const Operand& op); -void cmpnltsd(const Xmm& x, const Operand& op); -void cmpnltss(const Xmm& x, const Operand& op); -void cmpordpd(const Xmm& x, const Operand& op); -void cmpordps(const Xmm& x, const Operand& op); -void cmpordsd(const Xmm& x, const Operand& op); -void cmpordss(const Xmm& x, const Operand& op); -void cmppd(const Xmm& xmm, const Operand& op, uint8 imm8); -void cmpps(const Xmm& xmm, const Operand& op, uint8 imm8); +void cmova(const Reg ®, const Operand &op); +void cmovae(const Reg ®, const Operand &op); +void cmovb(const Reg ®, const Operand &op); +void cmovbe(const Reg ®, const Operand &op); +void cmovc(const Reg ®, const Operand &op); +void cmove(const Reg ®, const Operand &op); +void cmovg(const Reg ®, const Operand &op); +void cmovge(const Reg ®, const Operand &op); +void cmovl(const Reg ®, const Operand &op); +void cmovle(const Reg ®, const Operand &op); +void cmovna(const Reg ®, const Operand &op); +void cmovnae(const Reg ®, const Operand &op); +void cmovnb(const Reg ®, const Operand &op); +void cmovnbe(const Reg ®, const Operand &op); +void cmovnc(const Reg ®, const Operand &op); +void cmovne(const Reg ®, const Operand &op); +void cmovng(const Reg ®, const Operand &op); +void cmovnge(const Reg ®, const Operand &op); +void cmovnl(const Reg ®, const Operand &op); +void cmovnle(const Reg ®, const Operand &op); +void cmovno(const Reg ®, const Operand &op); +void cmovnp(const Reg ®, const Operand &op); +void cmovns(const Reg ®, const Operand &op); +void cmovnz(const Reg ®, const Operand &op); +void cmovo(const Reg ®, const Operand &op); +void cmovp(const Reg ®, const Operand &op); +void cmovpe(const Reg ®, const Operand &op); +void cmovpo(const Reg ®, const Operand &op); +void cmovs(const Reg ®, const Operand &op); +void cmovz(const Reg ®, const Operand &op); +void cmp(const Operand &op, uint32 imm); +void cmp(const Operand &op1, const Operand &op2); +void cmpeqpd(const Xmm &x, const Operand &op); +void cmpeqps(const Xmm &x, const Operand &op); +void cmpeqsd(const Xmm &x, const Operand &op); +void cmpeqss(const Xmm &x, const Operand &op); +void cmplepd(const Xmm &x, const Operand &op); +void cmpleps(const Xmm &x, const Operand &op); +void cmplesd(const Xmm &x, const Operand &op); +void cmpless(const Xmm &x, const Operand &op); +void cmpltpd(const Xmm &x, const Operand &op); +void cmpltps(const Xmm &x, const Operand &op); +void cmpltsd(const Xmm &x, const Operand &op); +void cmpltss(const Xmm &x, const Operand &op); +void cmpneqpd(const Xmm &x, const Operand &op); +void cmpneqps(const Xmm &x, const Operand &op); +void cmpneqsd(const Xmm &x, const Operand &op); +void cmpneqss(const Xmm &x, const Operand &op); +void cmpnlepd(const Xmm &x, const Operand &op); +void cmpnleps(const Xmm &x, const Operand &op); +void cmpnlesd(const Xmm &x, const Operand &op); +void cmpnless(const Xmm &x, const Operand &op); +void cmpnltpd(const Xmm &x, const Operand &op); +void cmpnltps(const Xmm &x, const Operand &op); +void cmpnltsd(const Xmm &x, const Operand &op); +void cmpnltss(const Xmm &x, const Operand &op); +void cmpordpd(const Xmm &x, const Operand &op); +void cmpordps(const Xmm &x, const Operand &op); +void cmpordsd(const Xmm &x, const Operand &op); +void cmpordss(const Xmm &x, const Operand &op); +void cmppd(const Xmm &xmm, const Operand &op, uint8 imm8); +void cmpps(const Xmm &xmm, const Operand &op, uint8 imm8); void cmpsb(); void cmpsd(); -void cmpsd(const Xmm& xmm, const Operand& op, uint8 imm8); -void cmpss(const Xmm& xmm, const Operand& op, uint8 imm8); +void cmpsd(const Xmm &xmm, const Operand &op, uint8 imm8); +void cmpss(const Xmm &xmm, const Operand &op, uint8 imm8); void cmpsw(); -void cmpunordpd(const Xmm& x, const Operand& op); -void cmpunordps(const Xmm& x, const Operand& op); -void cmpunordsd(const Xmm& x, const Operand& op); -void cmpunordss(const Xmm& x, const Operand& op); -void cmpxchg(const Operand& op, const Reg& reg); -void cmpxchg8b(const Address& addr); -void comisd(const Xmm& xmm, const Operand& op); -void comiss(const Xmm& xmm, const Operand& op); +void cmpunordpd(const Xmm &x, const Operand &op); +void cmpunordps(const Xmm &x, const Operand &op); +void cmpunordsd(const Xmm &x, const Operand &op); +void cmpunordss(const Xmm &x, const Operand &op); +void cmpxchg(const Operand &op, const Reg ®); +void cmpxchg8b(const Address &addr); +void comisd(const Xmm &xmm, const Operand &op); +void comiss(const Xmm &xmm, const Operand &op); void cpuid(); -void crc32(const Reg32e& reg, const Operand& op); -void cvtdq2pd(const Xmm& xmm, const Operand& op); -void cvtdq2ps(const Xmm& xmm, const Operand& op); -void cvtpd2dq(const Xmm& xmm, const Operand& op); -void cvtpd2pi(const Operand& reg, const Operand& op); -void cvtpd2ps(const Xmm& xmm, const Operand& op); -void cvtpi2pd(const Operand& reg, const Operand& op); -void cvtpi2ps(const Operand& reg, const Operand& op); -void cvtps2dq(const Xmm& xmm, const Operand& op); -void cvtps2pd(const Xmm& xmm, const Operand& op); -void cvtps2pi(const Operand& reg, const Operand& op); -void cvtsd2si(const Operand& reg, const Operand& op); -void cvtsd2ss(const Xmm& xmm, const Operand& op); -void cvtsi2sd(const Operand& reg, const Operand& op); -void cvtsi2ss(const Operand& reg, const Operand& op); -void cvtss2sd(const Xmm& xmm, const Operand& op); -void cvtss2si(const Operand& reg, const Operand& op); -void cvttpd2dq(const Xmm& xmm, const Operand& op); -void cvttpd2pi(const Operand& reg, const Operand& op); -void cvttps2dq(const Xmm& xmm, const Operand& op); -void cvttps2pi(const Operand& reg, const Operand& op); -void cvttsd2si(const Operand& reg, const Operand& op); -void cvttss2si(const Operand& reg, const Operand& op); +void crc32(const Reg32e ®, const Operand &op); +void cvtdq2pd(const Xmm &xmm, const Operand &op); +void cvtdq2ps(const Xmm &xmm, const Operand &op); +void cvtpd2dq(const Xmm &xmm, const Operand &op); +void cvtpd2pi(const Operand ®, const Operand &op); +void cvtpd2ps(const Xmm &xmm, const Operand &op); +void cvtpi2pd(const Operand ®, const Operand &op); +void cvtpi2ps(const Operand ®, const Operand &op); +void cvtps2dq(const Xmm &xmm, const Operand &op); +void cvtps2pd(const Xmm &xmm, const Operand &op); +void cvtps2pi(const Operand ®, const Operand &op); +void cvtsd2si(const Operand ®, const Operand &op); +void cvtsd2ss(const Xmm &xmm, const Operand &op); +void cvtsi2sd(const Operand ®, const Operand &op); +void cvtsi2ss(const Operand ®, const Operand &op); +void cvtss2sd(const Xmm &xmm, const Operand &op); +void cvtss2si(const Operand ®, const Operand &op); +void cvttpd2dq(const Xmm &xmm, const Operand &op); +void cvttpd2pi(const Operand ®, const Operand &op); +void cvttps2dq(const Xmm &xmm, const Operand &op); +void cvttps2pi(const Operand ®, const Operand &op); +void cvttsd2si(const Operand ®, const Operand &op); +void cvttss2si(const Operand ®, const Operand &op); void cwd(); void cwde(); -void dec(const Operand& op); -void div(const Operand& op); -void divpd(const Xmm& xmm, const Operand& op); -void divps(const Xmm& xmm, const Operand& op); -void divsd(const Xmm& xmm, const Operand& op); -void divss(const Xmm& xmm, const Operand& op); -void dppd(const Xmm& xmm, const Operand& op, int imm); -void dpps(const Xmm& xmm, const Operand& op, int imm); +void dec(const Operand &op); +void div(const Operand &op); +void divpd(const Xmm &xmm, const Operand &op); +void divps(const Xmm &xmm, const Operand &op); +void divsd(const Xmm &xmm, const Operand &op); +void divss(const Xmm &xmm, const Operand &op); +void dppd(const Xmm &xmm, const Operand &op, int imm); +void dpps(const Xmm &xmm, const Operand &op, int imm); void emms(); void enter(uint16 x, uint8 y); -void extractps(const Operand& op, const Xmm& xmm, uint8 imm); +void extractps(const Operand &op, const Xmm &xmm, uint8 imm); void f2xm1(); void fabs(); -void fadd(const Address& addr); -void fadd(const Fpu& reg1); -void fadd(const Fpu& reg1, const Fpu& reg2); +void fadd(const Address &addr); +void fadd(const Fpu ®1); +void fadd(const Fpu ®1, const Fpu ®2); void faddp(); -void faddp(const Fpu& reg1); -void faddp(const Fpu& reg1, const Fpu& reg2); -void fbld(const Address& addr); -void fbstp(const Address& addr); +void faddp(const Fpu ®1); +void faddp(const Fpu ®1, const Fpu ®2); +void fbld(const Address &addr); +void fbstp(const Address &addr); void fchs(); void fclex(); -void fcmovb(const Fpu& reg1); -void fcmovb(const Fpu& reg1, const Fpu& reg2); -void fcmovbe(const Fpu& reg1); -void fcmovbe(const Fpu& reg1, const Fpu& reg2); -void fcmove(const Fpu& reg1); -void fcmove(const Fpu& reg1, const Fpu& reg2); -void fcmovnb(const Fpu& reg1); -void fcmovnb(const Fpu& reg1, const Fpu& reg2); -void fcmovnbe(const Fpu& reg1); -void fcmovnbe(const Fpu& reg1, const Fpu& reg2); -void fcmovne(const Fpu& reg1); -void fcmovne(const Fpu& reg1, const Fpu& reg2); -void fcmovnu(const Fpu& reg1); -void fcmovnu(const Fpu& reg1, const Fpu& reg2); -void fcmovu(const Fpu& reg1); -void fcmovu(const Fpu& reg1, const Fpu& reg2); +void fcmovb(const Fpu ®1); +void fcmovb(const Fpu ®1, const Fpu ®2); +void fcmovbe(const Fpu ®1); +void fcmovbe(const Fpu ®1, const Fpu ®2); +void fcmove(const Fpu ®1); +void fcmove(const Fpu ®1, const Fpu ®2); +void fcmovnb(const Fpu ®1); +void fcmovnb(const Fpu ®1, const Fpu ®2); +void fcmovnbe(const Fpu ®1); +void fcmovnbe(const Fpu ®1, const Fpu ®2); +void fcmovne(const Fpu ®1); +void fcmovne(const Fpu ®1, const Fpu ®2); +void fcmovnu(const Fpu ®1); +void fcmovnu(const Fpu ®1, const Fpu ®2); +void fcmovu(const Fpu ®1); +void fcmovu(const Fpu ®1, const Fpu ®2); void fcom(); -void fcom(const Address& addr); -void fcom(const Fpu& reg); -void fcomi(const Fpu& reg1); -void fcomi(const Fpu& reg1, const Fpu& reg2); -void fcomip(const Fpu& reg1); -void fcomip(const Fpu& reg1, const Fpu& reg2); +void fcom(const Address &addr); +void fcom(const Fpu ®); +void fcomi(const Fpu ®1); +void fcomi(const Fpu ®1, const Fpu ®2); +void fcomip(const Fpu ®1); +void fcomip(const Fpu ®1, const Fpu ®2); void fcomp(); -void fcomp(const Address& addr); -void fcomp(const Fpu& reg); +void fcomp(const Address &addr); +void fcomp(const Fpu ®); void fcompp(); void fcos(); void fdecstp(); -void fdiv(const Address& addr); -void fdiv(const Fpu& reg1); -void fdiv(const Fpu& reg1, const Fpu& reg2); +void fdiv(const Address &addr); +void fdiv(const Fpu ®1); +void fdiv(const Fpu ®1, const Fpu ®2); void fdivp(); -void fdivp(const Fpu& reg1); -void fdivp(const Fpu& reg1, const Fpu& reg2); -void fdivr(const Address& addr); -void fdivr(const Fpu& reg1); -void fdivr(const Fpu& reg1, const Fpu& reg2); +void fdivp(const Fpu ®1); +void fdivp(const Fpu ®1, const Fpu ®2); +void fdivr(const Address &addr); +void fdivr(const Fpu ®1); +void fdivr(const Fpu ®1, const Fpu ®2); void fdivrp(); -void fdivrp(const Fpu& reg1); -void fdivrp(const Fpu& reg1, const Fpu& reg2); -void ffree(const Fpu& reg); -void fiadd(const Address& addr); -void ficom(const Address& addr); -void ficomp(const Address& addr); -void fidiv(const Address& addr); -void fidivr(const Address& addr); -void fild(const Address& addr); -void fimul(const Address& addr); +void fdivrp(const Fpu ®1); +void fdivrp(const Fpu ®1, const Fpu ®2); +void ffree(const Fpu ®); +void fiadd(const Address &addr); +void ficom(const Address &addr); +void ficomp(const Address &addr); +void fidiv(const Address &addr); +void fidivr(const Address &addr); +void fild(const Address &addr); +void fimul(const Address &addr); void fincstp(); void finit(); -void fist(const Address& addr); -void fistp(const Address& addr); -void fisttp(const Address& addr); -void fisub(const Address& addr); -void fisubr(const Address& addr); -void fld(const Address& addr); -void fld(const Fpu& reg); +void fist(const Address &addr); +void fistp(const Address &addr); +void fisttp(const Address &addr); +void fisub(const Address &addr); +void fisubr(const Address &addr); +void fld(const Address &addr); +void fld(const Fpu ®); void fld1(); -void fldcw(const Address& addr); -void fldenv(const Address& addr); +void fldcw(const Address &addr); +void fldenv(const Address &addr); void fldl2e(); void fldl2t(); void fldlg2(); void fldln2(); void fldpi(); void fldz(); -void fmul(const Address& addr); -void fmul(const Fpu& reg1); -void fmul(const Fpu& reg1, const Fpu& reg2); +void fmul(const Address &addr); +void fmul(const Fpu ®1); +void fmul(const Fpu ®1, const Fpu ®2); void fmulp(); -void fmulp(const Fpu& reg1); -void fmulp(const Fpu& reg1, const Fpu& reg2); +void fmulp(const Fpu ®1); +void fmulp(const Fpu ®1, const Fpu ®2); void fnclex(); void fninit(); void fnop(); -void fnsave(const Address& addr); -void fnstcw(const Address& addr); -void fnstenv(const Address& addr); -void fnstsw(const Address& addr); -void fnstsw(const Reg16& r); +void fnsave(const Address &addr); +void fnstcw(const Address &addr); +void fnstenv(const Address &addr); +void fnstsw(const Address &addr); +void fnstsw(const Reg16 &r); void fpatan(); void fprem(); void fprem1(); void fptan(); void frndint(); -void frstor(const Address& addr); -void fsave(const Address& addr); +void frstor(const Address &addr); +void fsave(const Address &addr); void fscale(); void fsin(); void fsincos(); void fsqrt(); -void fst(const Address& addr); -void fst(const Fpu& reg); -void fstcw(const Address& addr); -void fstenv(const Address& addr); -void fstp(const Address& addr); -void fstp(const Fpu& reg); -void fstsw(const Address& addr); -void fstsw(const Reg16& r); -void fsub(const Address& addr); -void fsub(const Fpu& reg1); -void fsub(const Fpu& reg1, const Fpu& reg2); +void fst(const Address &addr); +void fst(const Fpu ®); +void fstcw(const Address &addr); +void fstenv(const Address &addr); +void fstp(const Address &addr); +void fstp(const Fpu ®); +void fstsw(const Address &addr); +void fstsw(const Reg16 &r); +void fsub(const Address &addr); +void fsub(const Fpu ®1); +void fsub(const Fpu ®1, const Fpu ®2); void fsubp(); -void fsubp(const Fpu& reg1); -void fsubp(const Fpu& reg1, const Fpu& reg2); -void fsubr(const Address& addr); -void fsubr(const Fpu& reg1); -void fsubr(const Fpu& reg1, const Fpu& reg2); +void fsubp(const Fpu ®1); +void fsubp(const Fpu ®1, const Fpu ®2); +void fsubr(const Address &addr); +void fsubr(const Fpu ®1); +void fsubr(const Fpu ®1, const Fpu ®2); void fsubrp(); -void fsubrp(const Fpu& reg1); -void fsubrp(const Fpu& reg1, const Fpu& reg2); +void fsubrp(const Fpu ®1); +void fsubrp(const Fpu ®1, const Fpu ®2); void ftst(); void fucom(); -void fucom(const Fpu& reg); -void fucomi(const Fpu& reg1); -void fucomi(const Fpu& reg1, const Fpu& reg2); -void fucomip(const Fpu& reg1); -void fucomip(const Fpu& reg1, const Fpu& reg2); +void fucom(const Fpu ®); +void fucomi(const Fpu ®1); +void fucomi(const Fpu ®1, const Fpu ®2); +void fucomip(const Fpu ®1); +void fucomip(const Fpu ®1, const Fpu ®2); void fucomp(); -void fucomp(const Fpu& reg); +void fucomp(const Fpu ®); void fucompp(); void fwait(); void fxam(); void fxch(); -void fxch(const Fpu& reg); -void fxrstor(const Address& addr); +void fxch(const Fpu ®); +void fxrstor(const Address &addr); void fxtract(); void fyl2x(); void fyl2xp1(); -void gf2p8affineinvqb(const Xmm& xmm, const Operand& op, int imm); -void gf2p8affineqb(const Xmm& xmm, const Operand& op, int imm); -void gf2p8mulb(const Xmm& xmm, const Operand& op); -void haddpd(const Xmm& xmm, const Operand& op); -void haddps(const Xmm& xmm, const Operand& op); -void hsubpd(const Xmm& xmm, const Operand& op); -void hsubps(const Xmm& xmm, const Operand& op); -void idiv(const Operand& op); -void imul(const Operand& op); -void in_(const Reg& a, const Reg& d); -void in_(const Reg& a, uint8 v); -void inc(const Operand& op); -void insertps(const Xmm& xmm, const Operand& op, uint8 imm); +void gf2p8affineinvqb(const Xmm &xmm, const Operand &op, int imm); +void gf2p8affineqb(const Xmm &xmm, const Operand &op, int imm); +void gf2p8mulb(const Xmm &xmm, const Operand &op); +void haddpd(const Xmm &xmm, const Operand &op); +void haddps(const Xmm &xmm, const Operand &op); +void hsubpd(const Xmm &xmm, const Operand &op); +void hsubps(const Xmm &xmm, const Operand &op); +void idiv(const Operand &op); +void imul(const Operand &op); +void in_(const Reg &a, const Reg &d); +void in_(const Reg &a, uint8 v); +void inc(const Operand &op); +void insertps(const Xmm &xmm, const Operand &op, uint8 imm); void int3(); void int_(uint8 x); -void ja(const Label& label, LabelType type = T_AUTO); +void ja(const Label &label, LabelType type = T_AUTO); void ja(const char *label, LabelType type = T_AUTO); void ja(const void *addr); void ja(std::string label, LabelType type = T_AUTO); -void jae(const Label& label, LabelType type = T_AUTO); +void jae(const Label &label, LabelType type = T_AUTO); void jae(const char *label, LabelType type = T_AUTO); void jae(const void *addr); void jae(std::string label, LabelType type = T_AUTO); -void jb(const Label& label, LabelType type = T_AUTO); +void jb(const Label &label, LabelType type = T_AUTO); void jb(const char *label, LabelType type = T_AUTO); void jb(const void *addr); void jb(std::string label, LabelType type = T_AUTO); -void jbe(const Label& label, LabelType type = T_AUTO); +void jbe(const Label &label, LabelType type = T_AUTO); void jbe(const char *label, LabelType type = T_AUTO); void jbe(const void *addr); void jbe(std::string label, LabelType type = T_AUTO); -void jc(const Label& label, LabelType type = T_AUTO); +void jc(const Label &label, LabelType type = T_AUTO); void jc(const char *label, LabelType type = T_AUTO); void jc(const void *addr); void jc(std::string label, LabelType type = T_AUTO); -void je(const Label& label, LabelType type = T_AUTO); +void je(const Label &label, LabelType type = T_AUTO); void je(const char *label, LabelType type = T_AUTO); void je(const void *addr); void je(std::string label, LabelType type = T_AUTO); -void jg(const Label& label, LabelType type = T_AUTO); +void jg(const Label &label, LabelType type = T_AUTO); void jg(const char *label, LabelType type = T_AUTO); void jg(const void *addr); void jg(std::string label, LabelType type = T_AUTO); -void jge(const Label& label, LabelType type = T_AUTO); +void jge(const Label &label, LabelType type = T_AUTO); void jge(const char *label, LabelType type = T_AUTO); void jge(const void *addr); void jge(std::string label, LabelType type = T_AUTO); -void jl(const Label& label, LabelType type = T_AUTO); +void jl(const Label &label, LabelType type = T_AUTO); void jl(const char *label, LabelType type = T_AUTO); void jl(const void *addr); void jl(std::string label, LabelType type = T_AUTO); -void jle(const Label& label, LabelType type = T_AUTO); +void jle(const Label &label, LabelType type = T_AUTO); void jle(const char *label, LabelType type = T_AUTO); void jle(const void *addr); void jle(std::string label, LabelType type = T_AUTO); -void jna(const Label& label, LabelType type = T_AUTO); +void jna(const Label &label, LabelType type = T_AUTO); void jna(const char *label, LabelType type = T_AUTO); void jna(const void *addr); void jna(std::string label, LabelType type = T_AUTO); -void jnae(const Label& label, LabelType type = T_AUTO); +void jnae(const Label &label, LabelType type = T_AUTO); void jnae(const char *label, LabelType type = T_AUTO); void jnae(const void *addr); void jnae(std::string label, LabelType type = T_AUTO); -void jnb(const Label& label, LabelType type = T_AUTO); +void jnb(const Label &label, LabelType type = T_AUTO); void jnb(const char *label, LabelType type = T_AUTO); void jnb(const void *addr); void jnb(std::string label, LabelType type = T_AUTO); -void jnbe(const Label& label, LabelType type = T_AUTO); +void jnbe(const Label &label, LabelType type = T_AUTO); void jnbe(const char *label, LabelType type = T_AUTO); void jnbe(const void *addr); void jnbe(std::string label, LabelType type = T_AUTO); -void jnc(const Label& label, LabelType type = T_AUTO); +void jnc(const Label &label, LabelType type = T_AUTO); void jnc(const char *label, LabelType type = T_AUTO); void jnc(const void *addr); void jnc(std::string label, LabelType type = T_AUTO); -void jne(const Label& label, LabelType type = T_AUTO); +void jne(const Label &label, LabelType type = T_AUTO); void jne(const char *label, LabelType type = T_AUTO); void jne(const void *addr); void jne(std::string label, LabelType type = T_AUTO); -void jng(const Label& label, LabelType type = T_AUTO); +void jng(const Label &label, LabelType type = T_AUTO); void jng(const char *label, LabelType type = T_AUTO); void jng(const void *addr); void jng(std::string label, LabelType type = T_AUTO); -void jnge(const Label& label, LabelType type = T_AUTO); +void jnge(const Label &label, LabelType type = T_AUTO); void jnge(const char *label, LabelType type = T_AUTO); void jnge(const void *addr); void jnge(std::string label, LabelType type = T_AUTO); -void jnl(const Label& label, LabelType type = T_AUTO); +void jnl(const Label &label, LabelType type = T_AUTO); void jnl(const char *label, LabelType type = T_AUTO); void jnl(const void *addr); void jnl(std::string label, LabelType type = T_AUTO); -void jnle(const Label& label, LabelType type = T_AUTO); +void jnle(const Label &label, LabelType type = T_AUTO); void jnle(const char *label, LabelType type = T_AUTO); void jnle(const void *addr); void jnle(std::string label, LabelType type = T_AUTO); -void jno(const Label& label, LabelType type = T_AUTO); +void jno(const Label &label, LabelType type = T_AUTO); void jno(const char *label, LabelType type = T_AUTO); void jno(const void *addr); void jno(std::string label, LabelType type = T_AUTO); -void jnp(const Label& label, LabelType type = T_AUTO); +void jnp(const Label &label, LabelType type = T_AUTO); void jnp(const char *label, LabelType type = T_AUTO); void jnp(const void *addr); void jnp(std::string label, LabelType type = T_AUTO); -void jns(const Label& label, LabelType type = T_AUTO); +void jns(const Label &label, LabelType type = T_AUTO); void jns(const char *label, LabelType type = T_AUTO); void jns(const void *addr); void jns(std::string label, LabelType type = T_AUTO); -void jnz(const Label& label, LabelType type = T_AUTO); +void jnz(const Label &label, LabelType type = T_AUTO); void jnz(const char *label, LabelType type = T_AUTO); void jnz(const void *addr); void jnz(std::string label, LabelType type = T_AUTO); -void jo(const Label& label, LabelType type = T_AUTO); +void jo(const Label &label, LabelType type = T_AUTO); void jo(const char *label, LabelType type = T_AUTO); void jo(const void *addr); void jo(std::string label, LabelType type = T_AUTO); /* Does AArch64 has parity flag? */ -void jp(const Label& label, LabelType type = T_AUTO); +void jp(const Label &label, LabelType type = T_AUTO); void jp(const char *label, LabelType type = T_AUTO); void jp(const void *addr); void jp(std::string label, LabelType type = T_AUTO); -void jpe(const Label& label, LabelType type = T_AUTO); +void jpe(const Label &label, LabelType type = T_AUTO); void jpe(const char *label, LabelType type = T_AUTO); void jpe(const void *addr); void jpe(std::string label, LabelType type = T_AUTO); -void jpo(const Label& label, LabelType type = T_AUTO); +void jpo(const Label &label, LabelType type = T_AUTO); void jpo(const char *label, LabelType type = T_AUTO); void jpo(const void *addr); void jpo(std::string label, LabelType type = T_AUTO); -void js(const Label& label, LabelType type = T_AUTO); +void js(const Label &label, LabelType type = T_AUTO); void js(const char *label, LabelType type = T_AUTO); void js(const void *addr); void js(std::string label, LabelType type = T_AUTO); /* AArch64 CPU has no zero flag jmp instruction. */ -void jz(const Label& label, LabelType type = T_AUTO); +void jz(const Label &label, LabelType type = T_AUTO); void jz(const char *label, LabelType type = T_AUTO); void jz(const void *addr); void jz(std::string label, LabelType type = T_AUTO); void lahf(); -void lddqu(const Xmm& xmm, const Address& addr); -void ldmxcsr(const Address& addr); -void lea(const Reg& reg, const Address& addr); +void lddqu(const Xmm &xmm, const Address &addr); +void ldmxcsr(const Address &addr); +void lea(const Reg ®, const Address &addr); void leave(); void lfence(); -void lfs(const Reg& reg, const Address& addr); -void lgs(const Reg& reg, const Address& addr); +void lfs(const Reg ®, const Address &addr); +void lgs(const Reg ®, const Address &addr); void lock(); void lodsb(); void lodsd(); void lodsw(); -void loop(const Label& label); +void loop(const Label &label); void loop(const char *label); void loop(std::string label); -void loope(const Label& label); +void loope(const Label &label); void loope(const char *label); void loope(std::string label); -void loopne(const Label& label); +void loopne(const Label &label); void loopne(const char *label); void loopne(std::string label); -void lss(const Reg& reg, const Address& addr); -void lzcnt(const Reg& reg, const Operand& op); -void maskmovdqu(const Xmm& reg1, const Xmm& reg2); -void maskmovq(const Mmx& reg1, const Mmx& reg2); -void maxpd(const Xmm& xmm, const Operand& op); -void maxps(const Xmm& xmm, const Operand& op); -void maxsd(const Xmm& xmm, const Operand& op); -void maxss(const Xmm& xmm, const Operand& op); +void lss(const Reg ®, const Address &addr); +void lzcnt(const Reg ®, const Operand &op); +void maskmovdqu(const Xmm ®1, const Xmm ®2); +void maskmovq(const Mmx ®1, const Mmx ®2); +void maxpd(const Xmm &xmm, const Operand &op); +void maxps(const Xmm &xmm, const Operand &op); +void maxsd(const Xmm &xmm, const Operand &op); +void maxss(const Xmm &xmm, const Operand &op); void mfence(); -void minpd(const Xmm& xmm, const Operand& op); -void minps(const Xmm& xmm, const Operand& op); -void minsd(const Xmm& xmm, const Operand& op); -void minss(const Xmm& xmm, const Operand& op); +void minpd(const Xmm &xmm, const Operand &op); +void minps(const Xmm &xmm, const Operand &op); +void minsd(const Xmm &xmm, const Operand &op); +void minss(const Xmm &xmm, const Operand &op); void monitor(); void monitorx(); -void movapd(const Address& addr, const Xmm& xmm); -void movapd(const Xmm& xmm, const Operand& op); -void movaps(const Address& addr, const Xmm& xmm); -void movaps(const Xmm& xmm, const Operand& op); -void movbe(const Address& addr, const Reg& reg); -void movbe(const Reg& reg, const Address& addr); -void movd(const Address& addr, const Mmx& mmx); -void movd(const Mmx& mmx, const Address& addr); -void movd(const Mmx& mmx, const Reg32& reg); -void movd(const Reg32& reg, const Mmx& mmx); -void movddup(const Xmm& xmm, const Operand& op); -void movdq2q(const Mmx& mmx, const Xmm& xmm); -void movdqa(const Address& addr, const Xmm& xmm); -void movdqa(const Xmm& xmm, const Operand& op); -void movdqu(const Address& addr, const Xmm& xmm); -void movdqu(const Xmm& xmm, const Operand& op); -void movhlps(const Xmm& reg1, const Xmm& reg2); -void movhpd(const Operand& op1, const Operand& op2); -void movhps(const Operand& op1, const Operand& op2); -void movlhps(const Xmm& reg1, const Xmm& reg2); -void movlpd(const Operand& op1, const Operand& op2); -void movlps(const Operand& op1, const Operand& op2); -void movmskpd(const Reg32e& reg, const Xmm& xmm); -void movmskps(const Reg32e& reg, const Xmm& xmm); -void movntdq(const Address& addr, const Xmm& reg); -void movntdqa(const Xmm& xmm, const Address& addr); -void movnti(const Address& addr, const Reg32e& reg); -void movntpd(const Address& addr, const Xmm& reg); -void movntps(const Address& addr, const Xmm& xmm); -void movntq(const Address& addr, const Mmx& mmx); -void movq(const Address& addr, const Mmx& mmx); -void movq(const Mmx& mmx, const Operand& op); -void movq2dq(const Xmm& xmm, const Mmx& mmx); +void movapd(const Address &addr, const Xmm &xmm); +void movapd(const Xmm &xmm, const Operand &op); +void movaps(const Address &addr, const Xmm &xmm); +void movaps(const Xmm &xmm, const Operand &op); +void movbe(const Address &addr, const Reg ®); +void movbe(const Reg ®, const Address &addr); +void movd(const Address &addr, const Mmx &mmx); +void movd(const Mmx &mmx, const Address &addr); +void movd(const Mmx &mmx, const Reg32 ®); +void movd(const Reg32 ®, const Mmx &mmx); +void movddup(const Xmm &xmm, const Operand &op); +void movdq2q(const Mmx &mmx, const Xmm &xmm); +void movdqa(const Address &addr, const Xmm &xmm); +void movdqa(const Xmm &xmm, const Operand &op); +void movdqu(const Address &addr, const Xmm &xmm); +void movdqu(const Xmm &xmm, const Operand &op); +void movhlps(const Xmm ®1, const Xmm ®2); +void movhpd(const Operand &op1, const Operand &op2); +void movhps(const Operand &op1, const Operand &op2); +void movlhps(const Xmm ®1, const Xmm ®2); +void movlpd(const Operand &op1, const Operand &op2); +void movlps(const Operand &op1, const Operand &op2); +void movmskpd(const Reg32e ®, const Xmm &xmm); +void movmskps(const Reg32e ®, const Xmm &xmm); +void movntdq(const Address &addr, const Xmm ®); +void movntdqa(const Xmm &xmm, const Address &addr); +void movnti(const Address &addr, const Reg32e ®); +void movntpd(const Address &addr, const Xmm ®); +void movntps(const Address &addr, const Xmm &xmm); +void movntq(const Address &addr, const Mmx &mmx); +void movq(const Address &addr, const Mmx &mmx); +void movq(const Mmx &mmx, const Operand &op); +void movq2dq(const Xmm &xmm, const Mmx &mmx); void movsb(); void movsd(); -void movsd(const Address& addr, const Xmm& xmm); -void movsd(const Xmm& xmm, const Operand& op); -void movshdup(const Xmm& xmm, const Operand& op); -void movsldup(const Xmm& xmm, const Operand& op); -void movss(const Address& addr, const Xmm& xmm); -void movss(const Xmm& xmm, const Operand& op); +void movsd(const Address &addr, const Xmm &xmm); +void movsd(const Xmm &xmm, const Operand &op); +void movshdup(const Xmm &xmm, const Operand &op); +void movsldup(const Xmm &xmm, const Operand &op); +void movss(const Address &addr, const Xmm &xmm); +void movss(const Xmm &xmm, const Operand &op); void movsw(); -void movsx(const Reg& reg, const Operand& op); -void movupd(const Address& addr, const Xmm& xmm); -void movupd(const Xmm& xmm, const Operand& op); -void movups(const Address& addr, const Xmm& xmm); -void movups(const Xmm& xmm, const Operand& op); -void movzx(const Reg& reg, const Operand& op); -void mpsadbw(const Xmm& xmm, const Operand& op, int imm); -void mul(const Operand& op); -void mulpd(const Xmm& xmm, const Operand& op); -void mulps(const Xmm& xmm, const Operand& op); -void mulsd(const Xmm& xmm, const Operand& op); -void mulss(const Xmm& xmm, const Operand& op); -void mulx(const Reg32e& r1, const Reg32e& r2, const Operand& op); +void movsx(const Reg ®, const Operand &op); +void movupd(const Address &addr, const Xmm &xmm); +void movupd(const Xmm &xmm, const Operand &op); +void movups(const Address &addr, const Xmm &xmm); +void movups(const Xmm &xmm, const Operand &op); +void movzx(const Reg ®, const Operand &op); +void mpsadbw(const Xmm &xmm, const Operand &op, int imm); +void mul(const Operand &op); +void mulpd(const Xmm &xmm, const Operand &op); +void mulps(const Xmm &xmm, const Operand &op); +void mulsd(const Xmm &xmm, const Operand &op); +void mulss(const Xmm &xmm, const Operand &op); +void mulx(const Reg32e &r1, const Reg32e &r2, const Operand &op); void mwait(); void mwaitx(); -void neg(const Operand& op); -void not_(const Operand& op); -void or_(const Operand& op, uint32 imm); -void or_(const Operand& op1, const Operand& op2); -void orpd(const Xmm& xmm, const Operand& op); -void orps(const Xmm& xmm, const Operand& op); -void out_(const Reg& d, const Reg& a); -void out_(uint8 v, const Reg& a); +void neg(const Operand &op); +void not_(const Operand &op); +void or_(const Operand &op, uint32 imm); +void or_(const Operand &op1, const Operand &op2); +void orpd(const Xmm &xmm, const Operand &op); +void orps(const Xmm &xmm, const Operand &op); +void out_(const Reg &d, const Reg &a); +void out_(uint8 v, const Reg &a); void outsb(); void outsd(); void outsw(); -void pabsb(const Mmx& mmx, const Operand& op); -void pabsd(const Mmx& mmx, const Operand& op); -void pabsw(const Mmx& mmx, const Operand& op); -void packssdw(const Mmx& mmx, const Operand& op); -void packsswb(const Mmx& mmx, const Operand& op); -void packusdw(const Xmm& xmm, const Operand& op); -void packuswb(const Mmx& mmx, const Operand& op); -void paddb(const Mmx& mmx, const Operand& op); -void paddd(const Mmx& mmx, const Operand& op); -void paddq(const Mmx& mmx, const Operand& op); -void paddsb(const Mmx& mmx, const Operand& op); -void paddsw(const Mmx& mmx, const Operand& op); -void paddusb(const Mmx& mmx, const Operand& op); -void paddusw(const Mmx& mmx, const Operand& op); -void paddw(const Mmx& mmx, const Operand& op); -void palignr(const Mmx& mmx, const Operand& op, int imm); -void pand(const Mmx& mmx, const Operand& op); -void pandn(const Mmx& mmx, const Operand& op); +void pabsb(const Mmx &mmx, const Operand &op); +void pabsd(const Mmx &mmx, const Operand &op); +void pabsw(const Mmx &mmx, const Operand &op); +void packssdw(const Mmx &mmx, const Operand &op); +void packsswb(const Mmx &mmx, const Operand &op); +void packusdw(const Xmm &xmm, const Operand &op); +void packuswb(const Mmx &mmx, const Operand &op); +void paddb(const Mmx &mmx, const Operand &op); +void paddd(const Mmx &mmx, const Operand &op); +void paddq(const Mmx &mmx, const Operand &op); +void paddsb(const Mmx &mmx, const Operand &op); +void paddsw(const Mmx &mmx, const Operand &op); +void paddusb(const Mmx &mmx, const Operand &op); +void paddusw(const Mmx &mmx, const Operand &op); +void paddw(const Mmx &mmx, const Operand &op); +void palignr(const Mmx &mmx, const Operand &op, int imm); +void pand(const Mmx &mmx, const Operand &op); +void pandn(const Mmx &mmx, const Operand &op); void pause(); -void pavgb(const Mmx& mmx, const Operand& op); -void pavgw(const Mmx& mmx, const Operand& op); -void pblendvb(const Xmm& xmm, const Operand& op); -void pblendw(const Xmm& xmm, const Operand& op, int imm); -void pclmulhqhdq(const Xmm& xmm, const Operand& op); -void pclmulhqlqdq(const Xmm& xmm, const Operand& op); -void pclmullqhdq(const Xmm& xmm, const Operand& op); -void pclmullqlqdq(const Xmm& xmm, const Operand& op); -void pclmulqdq(const Xmm& xmm, const Operand& op, int imm); -void pcmpeqb(const Mmx& mmx, const Operand& op); -void pcmpeqd(const Mmx& mmx, const Operand& op); -void pcmpeqq(const Xmm& xmm, const Operand& op); -void pcmpeqw(const Mmx& mmx, const Operand& op); -void pcmpestri(const Xmm& xmm, const Operand& op, uint8 imm); -void pcmpestrm(const Xmm& xmm, const Operand& op, uint8 imm); -void pcmpgtb(const Mmx& mmx, const Operand& op); -void pcmpgtd(const Mmx& mmx, const Operand& op); -void pcmpgtq(const Xmm& xmm, const Operand& op); -void pcmpgtw(const Mmx& mmx, const Operand& op); -void pcmpistri(const Xmm& xmm, const Operand& op, uint8 imm); -void pcmpistrm(const Xmm& xmm, const Operand& op, uint8 imm); -void pdep(const Reg32e& r1, const Reg32e& r2, const Operand& op); -void pext(const Reg32e& r1, const Reg32e& r2, const Operand& op); -void pextrb(const Operand& op, const Xmm& xmm, uint8 imm); -void pextrd(const Operand& op, const Xmm& xmm, uint8 imm); -void pextrw(const Operand& op, const Mmx& xmm, uint8 imm); -void phaddd(const Mmx& mmx, const Operand& op); -void phaddsw(const Mmx& mmx, const Operand& op); -void phaddw(const Mmx& mmx, const Operand& op); -void phminposuw(const Xmm& xmm, const Operand& op); -void phsubd(const Mmx& mmx, const Operand& op); -void phsubsw(const Mmx& mmx, const Operand& op); -void phsubw(const Mmx& mmx, const Operand& op); -void pinsrb(const Xmm& xmm, const Operand& op, uint8 imm); -void pinsrd(const Xmm& xmm, const Operand& op, uint8 imm); -void pinsrw(const Mmx& mmx, const Operand& op, int imm); -void pmaddubsw(const Mmx& mmx, const Operand& op); -void pmaddwd(const Mmx& mmx, const Operand& op); -void pmaxsb(const Xmm& xmm, const Operand& op); -void pmaxsd(const Xmm& xmm, const Operand& op); -void pmaxsw(const Mmx& mmx, const Operand& op); -void pmaxub(const Mmx& mmx, const Operand& op); -void pmaxud(const Xmm& xmm, const Operand& op); -void pmaxuw(const Xmm& xmm, const Operand& op); -void pminsb(const Xmm& xmm, const Operand& op); -void pminsd(const Xmm& xmm, const Operand& op); -void pminsw(const Mmx& mmx, const Operand& op); -void pminub(const Mmx& mmx, const Operand& op); -void pminud(const Xmm& xmm, const Operand& op); -void pminuw(const Xmm& xmm, const Operand& op); -void pmovmskb(const Reg32e& reg, const Mmx& mmx); -void pmovsxbd(const Xmm& xmm, const Operand& op); -void pmovsxbq(const Xmm& xmm, const Operand& op); -void pmovsxbw(const Xmm& xmm, const Operand& op); -void pmovsxdq(const Xmm& xmm, const Operand& op); -void pmovsxwd(const Xmm& xmm, const Operand& op); -void pmovsxwq(const Xmm& xmm, const Operand& op); -void pmovzxbd(const Xmm& xmm, const Operand& op); -void pmovzxbq(const Xmm& xmm, const Operand& op); -void pmovzxbw(const Xmm& xmm, const Operand& op); -void pmovzxdq(const Xmm& xmm, const Operand& op); -void pmovzxwd(const Xmm& xmm, const Operand& op); -void pmovzxwq(const Xmm& xmm, const Operand& op); -void pmuldq(const Xmm& xmm, const Operand& op); -void pmulhrsw(const Mmx& mmx, const Operand& op); -void pmulhuw(const Mmx& mmx, const Operand& op); -void pmulhw(const Mmx& mmx, const Operand& op); -void pmulld(const Xmm& xmm, const Operand& op); -void pmullw(const Mmx& mmx, const Operand& op); -void pmuludq(const Mmx& mmx, const Operand& op); -void popcnt(const Reg& reg, const Operand& op); +void pavgb(const Mmx &mmx, const Operand &op); +void pavgw(const Mmx &mmx, const Operand &op); +void pblendvb(const Xmm &xmm, const Operand &op); +void pblendw(const Xmm &xmm, const Operand &op, int imm); +void pclmulhqhdq(const Xmm &xmm, const Operand &op); +void pclmulhqlqdq(const Xmm &xmm, const Operand &op); +void pclmullqhdq(const Xmm &xmm, const Operand &op); +void pclmullqlqdq(const Xmm &xmm, const Operand &op); +void pclmulqdq(const Xmm &xmm, const Operand &op, int imm); +void pcmpeqb(const Mmx &mmx, const Operand &op); +void pcmpeqd(const Mmx &mmx, const Operand &op); +void pcmpeqq(const Xmm &xmm, const Operand &op); +void pcmpeqw(const Mmx &mmx, const Operand &op); +void pcmpestri(const Xmm &xmm, const Operand &op, uint8 imm); +void pcmpestrm(const Xmm &xmm, const Operand &op, uint8 imm); +void pcmpgtb(const Mmx &mmx, const Operand &op); +void pcmpgtd(const Mmx &mmx, const Operand &op); +void pcmpgtq(const Xmm &xmm, const Operand &op); +void pcmpgtw(const Mmx &mmx, const Operand &op); +void pcmpistri(const Xmm &xmm, const Operand &op, uint8 imm); +void pcmpistrm(const Xmm &xmm, const Operand &op, uint8 imm); +void pdep(const Reg32e &r1, const Reg32e &r2, const Operand &op); +void pext(const Reg32e &r1, const Reg32e &r2, const Operand &op); +void pextrb(const Operand &op, const Xmm &xmm, uint8 imm); +void pextrd(const Operand &op, const Xmm &xmm, uint8 imm); +void pextrw(const Operand &op, const Mmx &xmm, uint8 imm); +void phaddd(const Mmx &mmx, const Operand &op); +void phaddsw(const Mmx &mmx, const Operand &op); +void phaddw(const Mmx &mmx, const Operand &op); +void phminposuw(const Xmm &xmm, const Operand &op); +void phsubd(const Mmx &mmx, const Operand &op); +void phsubsw(const Mmx &mmx, const Operand &op); +void phsubw(const Mmx &mmx, const Operand &op); +void pinsrb(const Xmm &xmm, const Operand &op, uint8 imm); +void pinsrd(const Xmm &xmm, const Operand &op, uint8 imm); +void pinsrw(const Mmx &mmx, const Operand &op, int imm); +void pmaddubsw(const Mmx &mmx, const Operand &op); +void pmaddwd(const Mmx &mmx, const Operand &op); +void pmaxsb(const Xmm &xmm, const Operand &op); +void pmaxsd(const Xmm &xmm, const Operand &op); +void pmaxsw(const Mmx &mmx, const Operand &op); +void pmaxub(const Mmx &mmx, const Operand &op); +void pmaxud(const Xmm &xmm, const Operand &op); +void pmaxuw(const Xmm &xmm, const Operand &op); +void pminsb(const Xmm &xmm, const Operand &op); +void pminsd(const Xmm &xmm, const Operand &op); +void pminsw(const Mmx &mmx, const Operand &op); +void pminub(const Mmx &mmx, const Operand &op); +void pminud(const Xmm &xmm, const Operand &op); +void pminuw(const Xmm &xmm, const Operand &op); +void pmovmskb(const Reg32e ®, const Mmx &mmx); +void pmovsxbd(const Xmm &xmm, const Operand &op); +void pmovsxbq(const Xmm &xmm, const Operand &op); +void pmovsxbw(const Xmm &xmm, const Operand &op); +void pmovsxdq(const Xmm &xmm, const Operand &op); +void pmovsxwd(const Xmm &xmm, const Operand &op); +void pmovsxwq(const Xmm &xmm, const Operand &op); +void pmovzxbd(const Xmm &xmm, const Operand &op); +void pmovzxbq(const Xmm &xmm, const Operand &op); +void pmovzxbw(const Xmm &xmm, const Operand &op); +void pmovzxdq(const Xmm &xmm, const Operand &op); +void pmovzxwd(const Xmm &xmm, const Operand &op); +void pmovzxwq(const Xmm &xmm, const Operand &op); +void pmuldq(const Xmm &xmm, const Operand &op); +void pmulhrsw(const Mmx &mmx, const Operand &op); +void pmulhuw(const Mmx &mmx, const Operand &op); +void pmulhw(const Mmx &mmx, const Operand &op); +void pmulld(const Xmm &xmm, const Operand &op); +void pmullw(const Mmx &mmx, const Operand &op); +void pmuludq(const Mmx &mmx, const Operand &op); +void popcnt(const Reg ®, const Operand &op); void popf(); -void por(const Mmx& mmx, const Operand& op); -void prefetchnta(const Address& addr); -void prefetcht0(const Address& addr); -void prefetcht1(const Address& addr); -void prefetcht2(const Address& addr); -void prefetchw(const Address& addr); -void prefetchwt1(const Address& addr); -void psadbw(const Mmx& mmx, const Operand& op); -void pshufb(const Mmx& mmx, const Operand& op); -void pshufd(const Mmx& mmx, const Operand& op, uint8 imm8); -void pshufhw(const Mmx& mmx, const Operand& op, uint8 imm8); -void pshuflw(const Mmx& mmx, const Operand& op, uint8 imm8); -void pshufw(const Mmx& mmx, const Operand& op, uint8 imm8); -void psignb(const Mmx& mmx, const Operand& op); -void psignd(const Mmx& mmx, const Operand& op); -void psignw(const Mmx& mmx, const Operand& op); -void pslld(const Mmx& mmx, const Operand& op); -void pslld(const Mmx& mmx, int imm8); -void pslldq(const Xmm& xmm, int imm8); -void psllq(const Mmx& mmx, const Operand& op); -void psllq(const Mmx& mmx, int imm8); -void psllw(const Mmx& mmx, const Operand& op); -void psllw(const Mmx& mmx, int imm8); -void psrad(const Mmx& mmx, const Operand& op); -void psrad(const Mmx& mmx, int imm8); -void psraw(const Mmx& mmx, const Operand& op); -void psraw(const Mmx& mmx, int imm8); -void psrld(const Mmx& mmx, const Operand& op); -void psrld(const Mmx& mmx, int imm8); -void psrldq(const Xmm& xmm, int imm8); -void psrlq(const Mmx& mmx, const Operand& op); -void psrlq(const Mmx& mmx, int imm8); -void psrlw(const Mmx& mmx, const Operand& op); -void psrlw(const Mmx& mmx, int imm8); -void psubb(const Mmx& mmx, const Operand& op); -void psubd(const Mmx& mmx, const Operand& op); -void psubq(const Mmx& mmx, const Operand& op); -void psubsb(const Mmx& mmx, const Operand& op); -void psubsw(const Mmx& mmx, const Operand& op); -void psubusb(const Mmx& mmx, const Operand& op); -void psubusw(const Mmx& mmx, const Operand& op); -void psubw(const Mmx& mmx, const Operand& op); -void ptest(const Xmm& xmm, const Operand& op); -void punpckhbw(const Mmx& mmx, const Operand& op); -void punpckhdq(const Mmx& mmx, const Operand& op); -void punpckhqdq(const Xmm& xmm, const Operand& op); -void punpckhwd(const Mmx& mmx, const Operand& op); -void punpcklbw(const Mmx& mmx, const Operand& op); -void punpckldq(const Mmx& mmx, const Operand& op); -void punpcklqdq(const Xmm& xmm, const Operand& op); -void punpcklwd(const Mmx& mmx, const Operand& op); +void por(const Mmx &mmx, const Operand &op); +void prefetchnta(const Address &addr); +void prefetcht0(const Address &addr); +void prefetcht1(const Address &addr); +void prefetcht2(const Address &addr); +void prefetchw(const Address &addr); +void prefetchwt1(const Address &addr); +void psadbw(const Mmx &mmx, const Operand &op); +void pshufb(const Mmx &mmx, const Operand &op); +void pshufd(const Mmx &mmx, const Operand &op, uint8 imm8); +void pshufhw(const Mmx &mmx, const Operand &op, uint8 imm8); +void pshuflw(const Mmx &mmx, const Operand &op, uint8 imm8); +void pshufw(const Mmx &mmx, const Operand &op, uint8 imm8); +void psignb(const Mmx &mmx, const Operand &op); +void psignd(const Mmx &mmx, const Operand &op); +void psignw(const Mmx &mmx, const Operand &op); +void pslld(const Mmx &mmx, const Operand &op); +void pslld(const Mmx &mmx, int imm8); +void pslldq(const Xmm &xmm, int imm8); +void psllq(const Mmx &mmx, const Operand &op); +void psllq(const Mmx &mmx, int imm8); +void psllw(const Mmx &mmx, const Operand &op); +void psllw(const Mmx &mmx, int imm8); +void psrad(const Mmx &mmx, const Operand &op); +void psrad(const Mmx &mmx, int imm8); +void psraw(const Mmx &mmx, const Operand &op); +void psraw(const Mmx &mmx, int imm8); +void psrld(const Mmx &mmx, const Operand &op); +void psrld(const Mmx &mmx, int imm8); +void psrldq(const Xmm &xmm, int imm8); +void psrlq(const Mmx &mmx, const Operand &op); +void psrlq(const Mmx &mmx, int imm8); +void psrlw(const Mmx &mmx, const Operand &op); +void psrlw(const Mmx &mmx, int imm8); +void psubb(const Mmx &mmx, const Operand &op); +void psubd(const Mmx &mmx, const Operand &op); +void psubq(const Mmx &mmx, const Operand &op); +void psubsb(const Mmx &mmx, const Operand &op); +void psubsw(const Mmx &mmx, const Operand &op); +void psubusb(const Mmx &mmx, const Operand &op); +void psubusw(const Mmx &mmx, const Operand &op); +void psubw(const Mmx &mmx, const Operand &op); +void ptest(const Xmm &xmm, const Operand &op); +void punpckhbw(const Mmx &mmx, const Operand &op); +void punpckhdq(const Mmx &mmx, const Operand &op); +void punpckhqdq(const Xmm &xmm, const Operand &op); +void punpckhwd(const Mmx &mmx, const Operand &op); +void punpcklbw(const Mmx &mmx, const Operand &op); +void punpckldq(const Mmx &mmx, const Operand &op); +void punpcklqdq(const Xmm &xmm, const Operand &op); +void punpcklwd(const Mmx &mmx, const Operand &op); void pushf(); -void pxor(const Mmx& mmx, const Operand& op); -void rcl(const Operand& op, const Reg8& _cl); -void rcl(const Operand& op, int imm); -void rcpps(const Xmm& xmm, const Operand& op); -void rcpss(const Xmm& xmm, const Operand& op); -void rcr(const Operand& op, const Reg8& _cl); -void rcr(const Operand& op, int imm); +void pxor(const Mmx &mmx, const Operand &op); +void rcl(const Operand &op, const Reg8 &_cl); +void rcl(const Operand &op, int imm); +void rcpps(const Xmm &xmm, const Operand &op); +void rcpss(const Xmm &xmm, const Operand &op); +void rcr(const Operand &op, const Reg8 &_cl); +void rcr(const Operand &op, int imm); void rdmsr(); void rdpmc(); -void rdrand(const Reg& r); -void rdseed(const Reg& r); +void rdrand(const Reg &r); +void rdseed(const Reg &r); void rdtsc(); void rdtscp(); void rep(); @@ -783,889 +780,902 @@ void repne(); void repnz(); void repz(); void ret(int imm = 0); -void rol(const Operand& op, const Reg8& _cl); -void rol(const Operand& op, int imm); -void ror(const Operand& op, const Reg8& _cl); -void ror(const Operand& op, int imm); -void rorx(const Reg32e& r, const Operand& op, uint8 imm); -void roundpd(const Xmm& xmm, const Operand& op, uint8 imm); -void roundps(const Xmm& xmm, const Operand& op, uint8 imm); -void roundsd(const Xmm& xmm, const Operand& op, int imm); -void roundss(const Xmm& xmm, const Operand& op, int imm); -void rsqrtps(const Xmm& xmm, const Operand& op); -void rsqrtss(const Xmm& xmm, const Operand& op); +void rol(const Operand &op, const Reg8 &_cl); +void rol(const Operand &op, int imm); +void ror(const Operand &op, const Reg8 &_cl); +void ror(const Operand &op, int imm); +void rorx(const Reg32e &r, const Operand &op, uint8 imm); +void roundpd(const Xmm &xmm, const Operand &op, uint8 imm); +void roundps(const Xmm &xmm, const Operand &op, uint8 imm); +void roundsd(const Xmm &xmm, const Operand &op, int imm); +void roundss(const Xmm &xmm, const Operand &op, int imm); +void rsqrtps(const Xmm &xmm, const Operand &op); +void rsqrtss(const Xmm &xmm, const Operand &op); void sahf(); -void sal(const Operand& op, const Reg8& _cl); -void sal(const Operand& op, int imm); -void sar(const Operand& op, const Reg8& _cl); -void sar(const Operand& op, int imm); -void sarx(const Reg32e& r1, const Operand& op, const Reg32e& r2); -void sbb(const Operand& op, uint32 imm); -void sbb(const Operand& op1, const Operand& op2); +void sal(const Operand &op, const Reg8 &_cl); +void sal(const Operand &op, int imm); +void sar(const Operand &op, const Reg8 &_cl); +void sar(const Operand &op, int imm); +void sarx(const Reg32e &r1, const Operand &op, const Reg32e &r2); +void sbb(const Operand &op, uint32 imm); +void sbb(const Operand &op1, const Operand &op2); void scasb(); void scasd(); void scasw(); -void seta(const Operand& op); -void setae(const Operand& op); -void setb(const Operand& op); -void setbe(const Operand& op); -void setc(const Operand& op); -void sete(const Operand& op); -void setg(const Operand& op); -void setge(const Operand& op); -void setl(const Operand& op); -void setle(const Operand& op); -void setna(const Operand& op); -void setnae(const Operand& op); -void setnb(const Operand& op); -void setnbe(const Operand& op); -void setnc(const Operand& op); -void setne(const Operand& op); -void setng(const Operand& op); -void setnge(const Operand& op); -void setnl(const Operand& op); -void setnle(const Operand& op); -void setno(const Operand& op); -void setnp(const Operand& op); -void setns(const Operand& op); -void setnz(const Operand& op); -void seto(const Operand& op); -void setp(const Operand& op); -void setpe(const Operand& op); -void setpo(const Operand& op); -void sets(const Operand& op); -void setz(const Operand& op); +void seta(const Operand &op); +void setae(const Operand &op); +void setb(const Operand &op); +void setbe(const Operand &op); +void setc(const Operand &op); +void sete(const Operand &op); +void setg(const Operand &op); +void setge(const Operand &op); +void setl(const Operand &op); +void setle(const Operand &op); +void setna(const Operand &op); +void setnae(const Operand &op); +void setnb(const Operand &op); +void setnbe(const Operand &op); +void setnc(const Operand &op); +void setne(const Operand &op); +void setng(const Operand &op); +void setnge(const Operand &op); +void setnl(const Operand &op); +void setnle(const Operand &op); +void setno(const Operand &op); +void setnp(const Operand &op); +void setns(const Operand &op); +void setnz(const Operand &op); +void seto(const Operand &op); +void setp(const Operand &op); +void setpe(const Operand &op); +void setpo(const Operand &op); +void sets(const Operand &op); +void setz(const Operand &op); void sfence(); -void sha1msg1(const Xmm& xmm, const Operand& op); -void sha1msg2(const Xmm& xmm, const Operand& op); -void sha1nexte(const Xmm& xmm, const Operand& op); -void sha1rnds4(const Xmm& xmm, const Operand& op, uint8 imm); -void sha256msg1(const Xmm& xmm, const Operand& op); -void sha256msg2(const Xmm& xmm, const Operand& op); -void sha256rnds2(const Xmm& xmm, const Operand& op); -void shl(const Operand& op, const Reg8& _cl); -void shl(const Operand& op, int imm); -void shld(const Operand& op, const Reg& reg, const Reg8& _cl); -void shld(const Operand& op, const Reg& reg, uint8 imm); -void shlx(const Reg32e& r1, const Operand& op, const Reg32e& r2); -void shr(const Operand& op, const Reg8& _cl); -void shr(const Operand& op, int imm); -void shrd(const Operand& op, const Reg& reg, const Reg8& _cl); -void shrd(const Operand& op, const Reg& reg, uint8 imm); -void shrx(const Reg32e& r1, const Operand& op, const Reg32e& r2); -void shufpd(const Xmm& xmm, const Operand& op, uint8 imm8); -void shufps(const Xmm& xmm, const Operand& op, uint8 imm8); -void sqrtpd(const Xmm& xmm, const Operand& op); -void sqrtps(const Xmm& xmm, const Operand& op); -void sqrtsd(const Xmm& xmm, const Operand& op); -void sqrtss(const Xmm& xmm, const Operand& op); +void sha1msg1(const Xmm &xmm, const Operand &op); +void sha1msg2(const Xmm &xmm, const Operand &op); +void sha1nexte(const Xmm &xmm, const Operand &op); +void sha1rnds4(const Xmm &xmm, const Operand &op, uint8 imm); +void sha256msg1(const Xmm &xmm, const Operand &op); +void sha256msg2(const Xmm &xmm, const Operand &op); +void sha256rnds2(const Xmm &xmm, const Operand &op); +void shl(const Operand &op, const Reg8 &_cl); +void shl(const Operand &op, int imm); +void shld(const Operand &op, const Reg ®, const Reg8 &_cl); +void shld(const Operand &op, const Reg ®, uint8 imm); +void shlx(const Reg32e &r1, const Operand &op, const Reg32e &r2); +void shr(const Operand &op, const Reg8 &_cl); +void shr(const Operand &op, int imm); +void shrd(const Operand &op, const Reg ®, const Reg8 &_cl); +void shrd(const Operand &op, const Reg ®, uint8 imm); +void shrx(const Reg32e &r1, const Operand &op, const Reg32e &r2); +void shufpd(const Xmm &xmm, const Operand &op, uint8 imm8); +void shufps(const Xmm &xmm, const Operand &op, uint8 imm8); +void sqrtpd(const Xmm &xmm, const Operand &op); +void sqrtps(const Xmm &xmm, const Operand &op); +void sqrtsd(const Xmm &xmm, const Operand &op); +void sqrtss(const Xmm &xmm, const Operand &op); void stac(); void stc(); void std(); void sti(); -void stmxcsr(const Address& addr); +void stmxcsr(const Address &addr); void stosb(); void stosd(); void stosw(); -void sub(const Operand& op, uint32 imm); -void sub(const Operand& op1, const Operand& op2); -void subpd(const Xmm& xmm, const Operand& op); -void subps(const Xmm& xmm, const Operand& op); -void subsd(const Xmm& xmm, const Operand& op); -void subss(const Xmm& xmm, const Operand& op); +void sub(const Operand &op, uint32 imm); +void sub(const Operand &op1, const Operand &op2); +void subpd(const Xmm &xmm, const Operand &op); +void subps(const Xmm &xmm, const Operand &op); +void subsd(const Xmm &xmm, const Operand &op); +void subss(const Xmm &xmm, const Operand &op); void sysenter(); void sysexit(); -void tzcnt(const Reg& reg, const Operand& op); -void ucomisd(const Xmm& xmm, const Operand& op); -void ucomiss(const Xmm& xmm, const Operand& op); +void tzcnt(const Reg ®, const Operand &op); +void ucomisd(const Xmm &xmm, const Operand &op); +void ucomiss(const Xmm &xmm, const Operand &op); void ud2(); -void unpckhpd(const Xmm& xmm, const Operand& op); -void unpckhps(const Xmm& xmm, const Operand& op); -void unpcklpd(const Xmm& xmm, const Operand& op); -void unpcklps(const Xmm& xmm, const Operand& op); -void vaddpd(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vaddps(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vaddsd(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vaddss(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vaddsubpd(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vaddsubps(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vaesdec(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vaesdeclast(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vaesenc(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vaesenclast(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vaesimc(const Xmm& xm, const Operand& op); -void vaeskeygenassist(const Xmm& xm, const Operand& op, uint8 imm); -void vandnpd(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vandnps(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vandpd(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vandps(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vblendpd(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vblendps(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vblendvpd(const Xmm& x1, const Xmm& x2, const Operand& op, const Xmm& x4); -void vblendvps(const Xmm& x1, const Xmm& x2, const Operand& op, const Xmm& x4); -void vbroadcastf128(const Ymm& y, const Address& addr); -void vbroadcasti128(const Ymm& y, const Address& addr); -void vbroadcastsd(const Ymm& y, const Operand& op); -void vbroadcastss(const Xmm& x, const Operand& op); -void vcmpeq_ospd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpeq_osps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpeq_ossd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpeq_osss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpeq_uqpd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpeq_uqps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpeq_uqsd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpeq_uqss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpeq_uspd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpeq_usps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpeq_ussd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpeq_usss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpeqpd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpeqps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpeqsd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpeqss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpfalse_ospd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpfalse_osps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpfalse_ossd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpfalse_osss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpfalsepd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpfalseps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpfalsesd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpfalsess(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpge_oqpd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpge_oqps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpge_oqsd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpge_oqss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpgepd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpgeps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpgesd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpgess(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpgt_oqpd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpgt_oqps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpgt_oqsd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpgt_oqss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpgtpd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpgtps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpgtsd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpgtss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmple_oqpd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmple_oqps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmple_oqsd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmple_oqss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmplepd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpleps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmplesd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpless(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmplt_oqpd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmplt_oqps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmplt_oqsd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmplt_oqss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpltpd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpltps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpltsd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpltss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpneq_oqpd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpneq_oqps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpneq_oqsd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpneq_oqss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpneq_ospd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpneq_osps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpneq_ossd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpneq_osss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpneq_uspd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpneq_usps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpneq_ussd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpneq_usss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpneqpd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpneqps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpneqsd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpneqss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpnge_uqpd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpnge_uqps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpnge_uqsd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpnge_uqss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpngepd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpngeps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpngesd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpngess(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpngt_uqpd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpngt_uqps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpngt_uqsd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpngt_uqss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpngtpd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpngtps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpngtsd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpngtss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpnle_uqpd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpnle_uqps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpnle_uqsd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpnle_uqss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpnlepd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpnleps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpnlesd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpnless(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpnlt_uqpd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpnlt_uqps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpnlt_uqsd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpnlt_uqss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpnltpd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpnltps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpnltsd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpnltss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpord_spd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpord_sps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpord_ssd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpord_sss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpordpd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpordps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpordsd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpordss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmppd(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vcmpps(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vcmpsd(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vcmpss(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vcmptrue_uspd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmptrue_usps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmptrue_ussd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmptrue_usss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmptruepd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmptrueps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmptruesd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmptruess(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpunord_spd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpunord_sps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpunord_ssd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpunord_sss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpunordpd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpunordps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpunordsd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcmpunordss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcomisd(const Xmm& xm, const Operand& op); -void vcomiss(const Xmm& xm, const Operand& op); -void vcvtdq2pd(const Xmm& x, const Operand& op); -void vcvtdq2ps(const Xmm& xm, const Operand& op); -void vcvtpd2dq(const Xmm& x, const Operand& op); -void vcvtpd2ps(const Xmm& x, const Operand& op); -void vcvtph2ps(const Xmm& x, const Operand& op); -void vcvtps2dq(const Xmm& xm, const Operand& op); -void vcvtps2pd(const Xmm& x, const Operand& op); -void vcvtps2ph(const Operand& op, const Xmm& x, uint8 imm); -void vcvtsd2si(const Reg32& r, const Operand& op); -void vcvtsd2ss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcvtsi2sd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcvtsi2ss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcvtss2sd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcvtss2si(const Reg32& r, const Operand& op); -void vcvttpd2dq(const Xmm& x, const Operand& op); -void vcvttps2dq(const Xmm& xm, const Operand& op); -void vcvttsd2si(const Reg32& r, const Operand& op); -void vcvttss2si(const Reg32& r, const Operand& op); -void vdivpd(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vdivps(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vdivsd(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vdivss(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vdppd(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vdpps(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vextractf128(const Operand& op, const Ymm& y, uint8 imm); -void vextracti128(const Operand& op, const Ymm& y, uint8 imm); -void vextractps(const Operand& op, const Xmm& x, uint8 imm); -void vfmadd132pd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmadd132ps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmadd132sd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmadd132ss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmadd213pd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmadd213ps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmadd213sd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmadd213ss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmadd231pd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmadd231ps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmadd231sd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmadd231ss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmaddsub132pd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmaddsub132ps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmaddsub213pd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmaddsub213ps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmaddsub231pd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmaddsub231ps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmsub132pd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmsub132ps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmsub132sd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmsub132ss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmsub213pd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmsub213ps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmsub213sd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmsub213ss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmsub231pd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmsub231ps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmsub231sd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmsub231ss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmsubadd132pd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmsubadd132ps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmsubadd213pd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmsubadd213ps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmsubadd231pd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfmsubadd231ps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmadd132pd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmadd132ps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmadd132sd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmadd132ss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmadd213pd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmadd213ps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmadd213sd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmadd213ss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmadd231pd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmadd231ps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmadd231sd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmadd231ss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmsub132pd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmsub132ps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmsub132sd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmsub132ss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmsub213pd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmsub213ps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmsub213sd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmsub213ss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmsub231pd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmsub231ps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmsub231sd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vfnmsub231ss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vgatherdpd(const Xmm& x1, const Address& addr, const Xmm& x2); -void vgatherdps(const Xmm& x1, const Address& addr, const Xmm& x2); -void vgatherqpd(const Xmm& x1, const Address& addr, const Xmm& x2); -void vgatherqps(const Xmm& x1, const Address& addr, const Xmm& x2); -void vgf2p8affineinvqb(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vgf2p8affineqb(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vgf2p8mulb(const Xmm& x1, const Xmm& x2, const Operand& op); -void vhaddpd(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vhaddps(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vhsubpd(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vhsubps(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vinsertf128(const Ymm& y1, const Ymm& y2, const Operand& op, uint8 imm); -void vinserti128(const Ymm& y1, const Ymm& y2, const Operand& op, uint8 imm); -void vinsertps(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vlddqu(const Xmm& x, const Address& addr); -void vldmxcsr(const Address& addr); -void vmaskmovdqu(const Xmm& x1, const Xmm& x2); -void vmaskmovpd(const Address& addr, const Xmm& x1, const Xmm& x2); -void vmaskmovpd(const Xmm& x1, const Xmm& x2, const Address& addr); -void vmaskmovps(const Address& addr, const Xmm& x1, const Xmm& x2); -void vmaskmovps(const Xmm& x1, const Xmm& x2, const Address& addr); -void vmaxpd(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vmaxps(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vmaxsd(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vmaxss(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vminpd(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vminps(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vminsd(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vminss(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vmovapd(const Address& addr, const Xmm& xmm); -void vmovapd(const Xmm& xm, const Operand& op); -void vmovaps(const Address& addr, const Xmm& xmm); -void vmovaps(const Xmm& xm, const Operand& op); -void vmovd(const Operand& op, const Xmm& x); -void vmovd(const Xmm& x, const Operand& op); -void vmovddup(const Xmm& xm, const Operand& op); -void vmovdqa(const Address& addr, const Xmm& xmm); -void vmovdqa(const Xmm& xm, const Operand& op); -void vmovdqu(const Address& addr, const Xmm& xmm); -void vmovdqu(const Xmm& xm, const Operand& op); -void vmovhlps(const Xmm& x1, const Xmm& x2, const Operand& op = Operand()); -void vmovhpd(const Address& addr, const Xmm& x); -void vmovhpd(const Xmm& x, const Operand& op1, const Operand& op2 = Operand()); -void vmovhps(const Address& addr, const Xmm& x); -void vmovhps(const Xmm& x, const Operand& op1, const Operand& op2 = Operand()); -void vmovlhps(const Xmm& x1, const Xmm& x2, const Operand& op = Operand()); -void vmovlpd(const Address& addr, const Xmm& x); -void vmovlpd(const Xmm& x, const Operand& op1, const Operand& op2 = Operand()); -void vmovlps(const Address& addr, const Xmm& x); -void vmovlps(const Xmm& x, const Operand& op1, const Operand& op2 = Operand()); -void vmovmskpd(const Reg& r, const Xmm& x); -void vmovmskps(const Reg& r, const Xmm& x); -void vmovntdq(const Address& addr, const Xmm& x); -void vmovntdqa(const Xmm& x, const Address& addr); -void vmovntpd(const Address& addr, const Xmm& x); -void vmovntps(const Address& addr, const Xmm& x); -void vmovq(const Address& addr, const Xmm& x); -void vmovq(const Xmm& x, const Address& addr); -void vmovq(const Xmm& x1, const Xmm& x2); -void vmovsd(const Address& addr, const Xmm& x); -void vmovsd(const Xmm& x, const Address& addr); -void vmovsd(const Xmm& x1, const Xmm& x2, const Operand& op = Operand()); -void vmovshdup(const Xmm& xm, const Operand& op); -void vmovsldup(const Xmm& xm, const Operand& op); -void vmovss(const Address& addr, const Xmm& x); -void vmovss(const Xmm& x, const Address& addr); -void vmovss(const Xmm& x1, const Xmm& x2, const Operand& op = Operand()); -void vmovupd(const Address& addr, const Xmm& xmm); -void vmovupd(const Xmm& xm, const Operand& op); -void vmovups(const Address& addr, const Xmm& xmm); -void vmovups(const Xmm& xm, const Operand& op); -void vmpsadbw(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vmulpd(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vmulps(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vmulsd(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vmulss(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vorpd(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vorps(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vpabsb(const Xmm& xm, const Operand& op); -void vpabsd(const Xmm& xm, const Operand& op); -void vpabsw(const Xmm& xm, const Operand& op); -void vpackssdw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpacksswb(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpackusdw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpackuswb(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpaddb(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpaddd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpaddq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpaddsb(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpaddsw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpaddusb(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpaddusw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpaddw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpalignr(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vpand(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpandn(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpavgb(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpavgw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpblendd(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vpblendvb(const Xmm& x1, const Xmm& x2, const Operand& op, const Xmm& x4); -void vpblendw(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vpbroadcastb(const Xmm& x, const Operand& op); -void vpbroadcastd(const Xmm& x, const Operand& op); -void vpbroadcastq(const Xmm& x, const Operand& op); -void vpbroadcastw(const Xmm& x, const Operand& op); -void vpclmulqdq(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vpcmpeqb(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpcmpeqd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpcmpeqq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpcmpeqw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpcmpestri(const Xmm& xm, const Operand& op, uint8 imm); -void vpcmpestrm(const Xmm& xm, const Operand& op, uint8 imm); -void vpcmpgtb(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpcmpgtd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpcmpgtq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpcmpgtw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpcmpistri(const Xmm& xm, const Operand& op, uint8 imm); -void vpcmpistrm(const Xmm& xm, const Operand& op, uint8 imm); -void vperm2f128(const Ymm& y1, const Ymm& y2, const Operand& op, uint8 imm); -void vperm2i128(const Ymm& y1, const Ymm& y2, const Operand& op, uint8 imm); -void vpermd(const Ymm& y1, const Ymm& y2, const Operand& op); -void vpermilpd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpermilpd(const Xmm& xm, const Operand& op, uint8 imm); -void vpermilps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpermilps(const Xmm& xm, const Operand& op, uint8 imm); -void vpermpd(const Ymm& y, const Operand& op, uint8 imm); -void vpermpd(const Ymm& y1, const Ymm& y2, const Operand& op); -void vpermps(const Ymm& y1, const Ymm& y2, const Operand& op); -void vpermq(const Ymm& y, const Operand& op, uint8 imm); -void vpermq(const Ymm& y1, const Ymm& y2, const Operand& op); -void vpextrb(const Operand& op, const Xmm& x, uint8 imm); -void vpextrd(const Operand& op, const Xmm& x, uint8 imm); -void vpextrq(const Operand& op, const Xmm& x, uint8 imm); -void vpextrw(const Operand& op, const Xmm& x, uint8 imm); -void vpgatherdd(const Xmm& x1, const Address& addr, const Xmm& x2); -void vpgatherdq(const Xmm& x1, const Address& addr, const Xmm& x2); -void vpgatherqd(const Xmm& x1, const Address& addr, const Xmm& x2); -void vpgatherqq(const Xmm& x1, const Address& addr, const Xmm& x2); -void vphaddd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vphaddsw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vphaddw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vphminposuw(const Xmm& xm, const Operand& op); -void vphsubd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vphsubsw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vphsubw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpinsrb(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vpinsrd(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vpinsrq(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vpinsrw(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vpmaddubsw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpmaddwd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpmaskmovd(const Address& addr, const Xmm& x1, const Xmm& x2); -void vpmaskmovd(const Xmm& x1, const Xmm& x2, const Address& addr); -void vpmaskmovq(const Address& addr, const Xmm& x1, const Xmm& x2); -void vpmaskmovq(const Xmm& x1, const Xmm& x2, const Address& addr); -void vpmaxsb(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpmaxsd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpmaxsw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpmaxub(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpmaxud(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpmaxuw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpminsb(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpminsd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpminsw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpminub(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpminud(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpminuw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpmovmskb(const Reg32e& r, const Xmm& x); -void vpmovsxbd(const Xmm& xm, const Operand& op); -void vpmovsxbq(const Xmm& xm, const Operand& op); -void vpmovsxbw(const Xmm& xm, const Operand& op); -void vpmovsxdq(const Xmm& xm, const Operand& op); -void vpmovsxwd(const Xmm& xm, const Operand& op); -void vpmovsxwq(const Xmm& xm, const Operand& op); -void vpmovzxbd(const Xmm& xm, const Operand& op); -void vpmovzxbq(const Xmm& xm, const Operand& op); -void vpmovzxbw(const Xmm& xm, const Operand& op); -void vpmovzxdq(const Xmm& xm, const Operand& op); -void vpmovzxwd(const Xmm& xm, const Operand& op); -void vpmovzxwq(const Xmm& xm, const Operand& op); -void vpmuldq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpmulhrsw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpmulhuw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpmulhw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpmulld(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpmullw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpmuludq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpor(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsadbw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpshufb(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpshufd(const Xmm& xm, const Operand& op, uint8 imm); -void vpshufhw(const Xmm& xm, const Operand& op, uint8 imm); -void vpshuflw(const Xmm& xm, const Operand& op, uint8 imm); -void vpsignb(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsignd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsignw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpslld(const Xmm& x, const Operand& op, uint8 imm); -void vpslld(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpslldq(const Xmm& x, const Operand& op, uint8 imm); -void vpsllq(const Xmm& x, const Operand& op, uint8 imm); -void vpsllq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsllvd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsllvq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsllw(const Xmm& x, const Operand& op, uint8 imm); -void vpsllw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsrad(const Xmm& x, const Operand& op, uint8 imm); -void vpsrad(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsravd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsraw(const Xmm& x, const Operand& op, uint8 imm); -void vpsraw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsrld(const Xmm& x, const Operand& op, uint8 imm); -void vpsrld(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsrldq(const Xmm& x, const Operand& op, uint8 imm); -void vpsrlq(const Xmm& x, const Operand& op, uint8 imm); -void vpsrlq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsrlvd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsrlvq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsrlw(const Xmm& x, const Operand& op, uint8 imm); -void vpsrlw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsubb(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsubd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsubq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsubsb(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsubsw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsubusb(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsubusw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsubw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vptest(const Xmm& xm, const Operand& op); -void vpunpckhbw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpunpckhdq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpunpckhqdq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpunpckhwd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpunpcklbw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpunpckldq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpunpcklqdq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpunpcklwd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpxor(const Xmm& x1, const Xmm& x2, const Operand& op); -void vrcpps(const Xmm& xm, const Operand& op); -void vrcpss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vroundpd(const Xmm& xm, const Operand& op, uint8 imm); -void vroundps(const Xmm& xm, const Operand& op, uint8 imm); -void vroundsd(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vroundss(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vrsqrtps(const Xmm& xm, const Operand& op); -void vrsqrtss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vshufpd(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vshufps(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vsqrtpd(const Xmm& xm, const Operand& op); -void vsqrtps(const Xmm& xm, const Operand& op); -void vsqrtsd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vsqrtss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vstmxcsr(const Address& addr); -void vsubpd(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vsubps(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vsubsd(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vsubss(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vtestpd(const Xmm& xm, const Operand& op); -void vtestps(const Xmm& xm, const Operand& op); -void vucomisd(const Xmm& xm, const Operand& op); -void vucomiss(const Xmm& xm, const Operand& op); -void vunpckhpd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vunpckhps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vunpcklpd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vunpcklps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vxorpd(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); -void vxorps(const Xmm& xmm, const Operand& op1, const Operand& op2 = Operand()); +void unpckhpd(const Xmm &xmm, const Operand &op); +void unpckhps(const Xmm &xmm, const Operand &op); +void unpcklpd(const Xmm &xmm, const Operand &op); +void unpcklps(const Xmm &xmm, const Operand &op); +void vaddpd(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vaddps(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vaddsd(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vaddss(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vaddsubpd(const Xmm &xmm, const Operand &op1, + const Operand &op2 = Operand()); +void vaddsubps(const Xmm &xmm, const Operand &op1, + const Operand &op2 = Operand()); +void vaesdec(const Xmm &xmm, const Operand &op1, + const Operand &op2 = Operand()); +void vaesdeclast(const Xmm &xmm, const Operand &op1, + const Operand &op2 = Operand()); +void vaesenc(const Xmm &xmm, const Operand &op1, + const Operand &op2 = Operand()); +void vaesenclast(const Xmm &xmm, const Operand &op1, + const Operand &op2 = Operand()); +void vaesimc(const Xmm &xm, const Operand &op); +void vaeskeygenassist(const Xmm &xm, const Operand &op, uint8 imm); +void vandnpd(const Xmm &xmm, const Operand &op1, + const Operand &op2 = Operand()); +void vandnps(const Xmm &xmm, const Operand &op1, + const Operand &op2 = Operand()); +void vandpd(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vandps(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vblendpd(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vblendps(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vblendvpd(const Xmm &x1, const Xmm &x2, const Operand &op, const Xmm &x4); +void vblendvps(const Xmm &x1, const Xmm &x2, const Operand &op, const Xmm &x4); +void vbroadcastf128(const Ymm &y, const Address &addr); +void vbroadcasti128(const Ymm &y, const Address &addr); +void vbroadcastsd(const Ymm &y, const Operand &op); +void vbroadcastss(const Xmm &x, const Operand &op); +void vcmpeq_ospd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpeq_osps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpeq_ossd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpeq_osss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpeq_uqpd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpeq_uqps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpeq_uqsd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpeq_uqss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpeq_uspd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpeq_usps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpeq_ussd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpeq_usss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpeqpd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpeqps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpeqsd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpeqss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpfalse_ospd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpfalse_osps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpfalse_ossd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpfalse_osss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpfalsepd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpfalseps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpfalsesd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpfalsess(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpge_oqpd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpge_oqps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpge_oqsd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpge_oqss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpgepd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpgeps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpgesd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpgess(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpgt_oqpd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpgt_oqps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpgt_oqsd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpgt_oqss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpgtpd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpgtps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpgtsd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpgtss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmple_oqpd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmple_oqps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmple_oqsd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmple_oqss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmplepd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpleps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmplesd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpless(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmplt_oqpd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmplt_oqps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmplt_oqsd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmplt_oqss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpltpd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpltps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpltsd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpltss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpneq_oqpd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpneq_oqps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpneq_oqsd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpneq_oqss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpneq_ospd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpneq_osps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpneq_ossd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpneq_osss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpneq_uspd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpneq_usps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpneq_ussd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpneq_usss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpneqpd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpneqps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpneqsd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpneqss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpnge_uqpd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpnge_uqps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpnge_uqsd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpnge_uqss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpngepd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpngeps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpngesd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpngess(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpngt_uqpd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpngt_uqps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpngt_uqsd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpngt_uqss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpngtpd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpngtps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpngtsd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpngtss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpnle_uqpd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpnle_uqps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpnle_uqsd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpnle_uqss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpnlepd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpnleps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpnlesd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpnless(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpnlt_uqpd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpnlt_uqps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpnlt_uqsd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpnlt_uqss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpnltpd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpnltps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpnltsd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpnltss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpord_spd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpord_sps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpord_ssd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpord_sss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpordpd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpordps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpordsd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpordss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmppd(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vcmpps(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vcmpsd(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vcmpss(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vcmptrue_uspd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmptrue_usps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmptrue_ussd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmptrue_usss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmptruepd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmptrueps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmptruesd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmptruess(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpunord_spd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpunord_sps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpunord_ssd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpunord_sss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpunordpd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpunordps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpunordsd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcmpunordss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcomisd(const Xmm &xm, const Operand &op); +void vcomiss(const Xmm &xm, const Operand &op); +void vcvtdq2pd(const Xmm &x, const Operand &op); +void vcvtdq2ps(const Xmm &xm, const Operand &op); +void vcvtpd2dq(const Xmm &x, const Operand &op); +void vcvtpd2ps(const Xmm &x, const Operand &op); +void vcvtph2ps(const Xmm &x, const Operand &op); +void vcvtps2dq(const Xmm &xm, const Operand &op); +void vcvtps2pd(const Xmm &x, const Operand &op); +void vcvtps2ph(const Operand &op, const Xmm &x, uint8 imm); +void vcvtsd2si(const Reg32 &r, const Operand &op); +void vcvtsd2ss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcvtsi2sd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcvtsi2ss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcvtss2sd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcvtss2si(const Reg32 &r, const Operand &op); +void vcvttpd2dq(const Xmm &x, const Operand &op); +void vcvttps2dq(const Xmm &xm, const Operand &op); +void vcvttsd2si(const Reg32 &r, const Operand &op); +void vcvttss2si(const Reg32 &r, const Operand &op); +void vdivpd(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vdivps(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vdivsd(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vdivss(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vdppd(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vdpps(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vextractf128(const Operand &op, const Ymm &y, uint8 imm); +void vextracti128(const Operand &op, const Ymm &y, uint8 imm); +void vextractps(const Operand &op, const Xmm &x, uint8 imm); +void vfmadd132pd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmadd132ps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmadd132sd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmadd132ss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmadd213pd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmadd213ps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmadd213sd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmadd213ss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmadd231pd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmadd231ps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmadd231sd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmadd231ss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmaddsub132pd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmaddsub132ps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmaddsub213pd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmaddsub213ps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmaddsub231pd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmaddsub231ps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmsub132pd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmsub132ps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmsub132sd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmsub132ss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmsub213pd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmsub213ps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmsub213sd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmsub213ss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmsub231pd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmsub231ps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmsub231sd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmsub231ss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmsubadd132pd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmsubadd132ps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmsubadd213pd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmsubadd213ps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmsubadd231pd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfmsubadd231ps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmadd132pd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmadd132ps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmadd132sd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmadd132ss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmadd213pd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmadd213ps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmadd213sd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmadd213ss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmadd231pd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmadd231ps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmadd231sd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmadd231ss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmsub132pd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmsub132ps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmsub132sd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmsub132ss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmsub213pd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmsub213ps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmsub213sd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmsub213ss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmsub231pd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmsub231ps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmsub231sd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vfnmsub231ss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vgatherdpd(const Xmm &x1, const Address &addr, const Xmm &x2); +void vgatherdps(const Xmm &x1, const Address &addr, const Xmm &x2); +void vgatherqpd(const Xmm &x1, const Address &addr, const Xmm &x2); +void vgatherqps(const Xmm &x1, const Address &addr, const Xmm &x2); +void vgf2p8affineinvqb(const Xmm &x1, const Xmm &x2, const Operand &op, + uint8 imm); +void vgf2p8affineqb(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vgf2p8mulb(const Xmm &x1, const Xmm &x2, const Operand &op); +void vhaddpd(const Xmm &xmm, const Operand &op1, + const Operand &op2 = Operand()); +void vhaddps(const Xmm &xmm, const Operand &op1, + const Operand &op2 = Operand()); +void vhsubpd(const Xmm &xmm, const Operand &op1, + const Operand &op2 = Operand()); +void vhsubps(const Xmm &xmm, const Operand &op1, + const Operand &op2 = Operand()); +void vinsertf128(const Ymm &y1, const Ymm &y2, const Operand &op, uint8 imm); +void vinserti128(const Ymm &y1, const Ymm &y2, const Operand &op, uint8 imm); +void vinsertps(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vlddqu(const Xmm &x, const Address &addr); +void vldmxcsr(const Address &addr); +void vmaskmovdqu(const Xmm &x1, const Xmm &x2); +void vmaskmovpd(const Address &addr, const Xmm &x1, const Xmm &x2); +void vmaskmovpd(const Xmm &x1, const Xmm &x2, const Address &addr); +void vmaskmovps(const Address &addr, const Xmm &x1, const Xmm &x2); +void vmaskmovps(const Xmm &x1, const Xmm &x2, const Address &addr); +void vmaxpd(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vmaxps(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vmaxsd(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vmaxss(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vminpd(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vminps(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vminsd(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vminss(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vmovapd(const Address &addr, const Xmm &xmm); +void vmovapd(const Xmm &xm, const Operand &op); +void vmovaps(const Address &addr, const Xmm &xmm); +void vmovaps(const Xmm &xm, const Operand &op); +void vmovd(const Operand &op, const Xmm &x); +void vmovd(const Xmm &x, const Operand &op); +void vmovddup(const Xmm &xm, const Operand &op); +void vmovdqa(const Address &addr, const Xmm &xmm); +void vmovdqa(const Xmm &xm, const Operand &op); +void vmovdqu(const Address &addr, const Xmm &xmm); +void vmovdqu(const Xmm &xm, const Operand &op); +void vmovhlps(const Xmm &x1, const Xmm &x2, const Operand &op = Operand()); +void vmovhpd(const Address &addr, const Xmm &x); +void vmovhpd(const Xmm &x, const Operand &op1, const Operand &op2 = Operand()); +void vmovhps(const Address &addr, const Xmm &x); +void vmovhps(const Xmm &x, const Operand &op1, const Operand &op2 = Operand()); +void vmovlhps(const Xmm &x1, const Xmm &x2, const Operand &op = Operand()); +void vmovlpd(const Address &addr, const Xmm &x); +void vmovlpd(const Xmm &x, const Operand &op1, const Operand &op2 = Operand()); +void vmovlps(const Address &addr, const Xmm &x); +void vmovlps(const Xmm &x, const Operand &op1, const Operand &op2 = Operand()); +void vmovmskpd(const Reg &r, const Xmm &x); +void vmovmskps(const Reg &r, const Xmm &x); +void vmovntdq(const Address &addr, const Xmm &x); +void vmovntdqa(const Xmm &x, const Address &addr); +void vmovntpd(const Address &addr, const Xmm &x); +void vmovntps(const Address &addr, const Xmm &x); +void vmovq(const Address &addr, const Xmm &x); +void vmovq(const Xmm &x, const Address &addr); +void vmovq(const Xmm &x1, const Xmm &x2); +void vmovsd(const Address &addr, const Xmm &x); +void vmovsd(const Xmm &x, const Address &addr); +void vmovsd(const Xmm &x1, const Xmm &x2, const Operand &op = Operand()); +void vmovshdup(const Xmm &xm, const Operand &op); +void vmovsldup(const Xmm &xm, const Operand &op); +void vmovss(const Address &addr, const Xmm &x); +void vmovss(const Xmm &x, const Address &addr); +void vmovss(const Xmm &x1, const Xmm &x2, const Operand &op = Operand()); +void vmovupd(const Address &addr, const Xmm &xmm); +void vmovupd(const Xmm &xm, const Operand &op); +void vmovups(const Address &addr, const Xmm &xmm); +void vmovups(const Xmm &xm, const Operand &op); +void vmpsadbw(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vmulpd(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vmulps(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vmulsd(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vmulss(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vorpd(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vorps(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vpabsb(const Xmm &xm, const Operand &op); +void vpabsd(const Xmm &xm, const Operand &op); +void vpabsw(const Xmm &xm, const Operand &op); +void vpackssdw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpacksswb(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpackusdw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpackuswb(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpaddb(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpaddd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpaddq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpaddsb(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpaddsw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpaddusb(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpaddusw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpaddw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpalignr(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vpand(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpandn(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpavgb(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpavgw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpblendd(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vpblendvb(const Xmm &x1, const Xmm &x2, const Operand &op, const Xmm &x4); +void vpblendw(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vpbroadcastb(const Xmm &x, const Operand &op); +void vpbroadcastd(const Xmm &x, const Operand &op); +void vpbroadcastq(const Xmm &x, const Operand &op); +void vpbroadcastw(const Xmm &x, const Operand &op); +void vpclmulqdq(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vpcmpeqb(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpcmpeqd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpcmpeqq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpcmpeqw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpcmpestri(const Xmm &xm, const Operand &op, uint8 imm); +void vpcmpestrm(const Xmm &xm, const Operand &op, uint8 imm); +void vpcmpgtb(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpcmpgtd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpcmpgtq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpcmpgtw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpcmpistri(const Xmm &xm, const Operand &op, uint8 imm); +void vpcmpistrm(const Xmm &xm, const Operand &op, uint8 imm); +void vperm2f128(const Ymm &y1, const Ymm &y2, const Operand &op, uint8 imm); +void vperm2i128(const Ymm &y1, const Ymm &y2, const Operand &op, uint8 imm); +void vpermd(const Ymm &y1, const Ymm &y2, const Operand &op); +void vpermilpd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpermilpd(const Xmm &xm, const Operand &op, uint8 imm); +void vpermilps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpermilps(const Xmm &xm, const Operand &op, uint8 imm); +void vpermpd(const Ymm &y, const Operand &op, uint8 imm); +void vpermpd(const Ymm &y1, const Ymm &y2, const Operand &op); +void vpermps(const Ymm &y1, const Ymm &y2, const Operand &op); +void vpermq(const Ymm &y, const Operand &op, uint8 imm); +void vpermq(const Ymm &y1, const Ymm &y2, const Operand &op); +void vpextrb(const Operand &op, const Xmm &x, uint8 imm); +void vpextrd(const Operand &op, const Xmm &x, uint8 imm); +void vpextrq(const Operand &op, const Xmm &x, uint8 imm); +void vpextrw(const Operand &op, const Xmm &x, uint8 imm); +void vpgatherdd(const Xmm &x1, const Address &addr, const Xmm &x2); +void vpgatherdq(const Xmm &x1, const Address &addr, const Xmm &x2); +void vpgatherqd(const Xmm &x1, const Address &addr, const Xmm &x2); +void vpgatherqq(const Xmm &x1, const Address &addr, const Xmm &x2); +void vphaddd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vphaddsw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vphaddw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vphminposuw(const Xmm &xm, const Operand &op); +void vphsubd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vphsubsw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vphsubw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpinsrb(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vpinsrd(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vpinsrq(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vpinsrw(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vpmaddubsw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpmaddwd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpmaskmovd(const Address &addr, const Xmm &x1, const Xmm &x2); +void vpmaskmovd(const Xmm &x1, const Xmm &x2, const Address &addr); +void vpmaskmovq(const Address &addr, const Xmm &x1, const Xmm &x2); +void vpmaskmovq(const Xmm &x1, const Xmm &x2, const Address &addr); +void vpmaxsb(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpmaxsd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpmaxsw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpmaxub(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpmaxud(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpmaxuw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpminsb(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpminsd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpminsw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpminub(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpminud(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpminuw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpmovmskb(const Reg32e &r, const Xmm &x); +void vpmovsxbd(const Xmm &xm, const Operand &op); +void vpmovsxbq(const Xmm &xm, const Operand &op); +void vpmovsxbw(const Xmm &xm, const Operand &op); +void vpmovsxdq(const Xmm &xm, const Operand &op); +void vpmovsxwd(const Xmm &xm, const Operand &op); +void vpmovsxwq(const Xmm &xm, const Operand &op); +void vpmovzxbd(const Xmm &xm, const Operand &op); +void vpmovzxbq(const Xmm &xm, const Operand &op); +void vpmovzxbw(const Xmm &xm, const Operand &op); +void vpmovzxdq(const Xmm &xm, const Operand &op); +void vpmovzxwd(const Xmm &xm, const Operand &op); +void vpmovzxwq(const Xmm &xm, const Operand &op); +void vpmuldq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpmulhrsw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpmulhuw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpmulhw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpmulld(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpmullw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpmuludq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpor(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsadbw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpshufb(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpshufd(const Xmm &xm, const Operand &op, uint8 imm); +void vpshufhw(const Xmm &xm, const Operand &op, uint8 imm); +void vpshuflw(const Xmm &xm, const Operand &op, uint8 imm); +void vpsignb(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsignd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsignw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpslld(const Xmm &x, const Operand &op, uint8 imm); +void vpslld(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpslldq(const Xmm &x, const Operand &op, uint8 imm); +void vpsllq(const Xmm &x, const Operand &op, uint8 imm); +void vpsllq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsllvd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsllvq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsllw(const Xmm &x, const Operand &op, uint8 imm); +void vpsllw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsrad(const Xmm &x, const Operand &op, uint8 imm); +void vpsrad(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsravd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsraw(const Xmm &x, const Operand &op, uint8 imm); +void vpsraw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsrld(const Xmm &x, const Operand &op, uint8 imm); +void vpsrld(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsrldq(const Xmm &x, const Operand &op, uint8 imm); +void vpsrlq(const Xmm &x, const Operand &op, uint8 imm); +void vpsrlq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsrlvd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsrlvq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsrlw(const Xmm &x, const Operand &op, uint8 imm); +void vpsrlw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsubb(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsubd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsubq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsubsb(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsubsw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsubusb(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsubusw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsubw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vptest(const Xmm &xm, const Operand &op); +void vpunpckhbw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpunpckhdq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpunpckhqdq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpunpckhwd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpunpcklbw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpunpckldq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpunpcklqdq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpunpcklwd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpxor(const Xmm &x1, const Xmm &x2, const Operand &op); +void vrcpps(const Xmm &xm, const Operand &op); +void vrcpss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vroundpd(const Xmm &xm, const Operand &op, uint8 imm); +void vroundps(const Xmm &xm, const Operand &op, uint8 imm); +void vroundsd(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vroundss(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vrsqrtps(const Xmm &xm, const Operand &op); +void vrsqrtss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vshufpd(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vshufps(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vsqrtpd(const Xmm &xm, const Operand &op); +void vsqrtps(const Xmm &xm, const Operand &op); +void vsqrtsd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vsqrtss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vstmxcsr(const Address &addr); +void vsubpd(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vsubps(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vsubsd(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vsubss(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vtestpd(const Xmm &xm, const Operand &op); +void vtestps(const Xmm &xm, const Operand &op); +void vucomisd(const Xmm &xm, const Operand &op); +void vucomiss(const Xmm &xm, const Operand &op); +void vunpckhpd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vunpckhps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vunpcklpd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vunpcklps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vxorpd(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); +void vxorps(const Xmm &xmm, const Operand &op1, const Operand &op2 = Operand()); void vzeroall(); void vzeroupper(); void wait(); void wbinvd(); void wrmsr(); -void xadd(const Operand& op, const Reg& reg); +void xadd(const Operand &op, const Reg ®); void xgetbv(); void xlatb(); -void xor_(const Operand& op, uint32 imm); -void xor_(const Operand& op1, const Operand& op2); -void xorpd(const Xmm& xmm, const Operand& op); -void xorps(const Xmm& xmm, const Operand& op); -void vblendpd(const Xmm& x, const Operand& op, uint8 imm); -void vblendps(const Xmm& x, const Operand& op, uint8 imm); -void vblendvpd(const Xmm& x1, const Operand& op, const Xmm& x4); -void vblendvps(const Xmm& x1, const Operand& op, const Xmm& x4); -void vcmpeq_ospd(const Xmm& x, const Operand& op); -void vcmpeq_osps(const Xmm& x, const Operand& op); -void vcmpeq_ossd(const Xmm& x, const Operand& op); -void vcmpeq_osss(const Xmm& x, const Operand& op); -void vcmpeq_uqpd(const Xmm& x, const Operand& op); -void vcmpeq_uqps(const Xmm& x, const Operand& op); -void vcmpeq_uqsd(const Xmm& x, const Operand& op); -void vcmpeq_uqss(const Xmm& x, const Operand& op); -void vcmpeq_uspd(const Xmm& x, const Operand& op); -void vcmpeq_usps(const Xmm& x, const Operand& op); -void vcmpeq_ussd(const Xmm& x, const Operand& op); -void vcmpeq_usss(const Xmm& x, const Operand& op); -void vcmpeqpd(const Xmm& x, const Operand& op); -void vcmpeqps(const Xmm& x, const Operand& op); -void vcmpeqsd(const Xmm& x, const Operand& op); -void vcmpeqss(const Xmm& x, const Operand& op); -void vcmpfalse_ospd(const Xmm& x, const Operand& op); -void vcmpfalse_osps(const Xmm& x, const Operand& op); -void vcmpfalse_ossd(const Xmm& x, const Operand& op); -void vcmpfalse_osss(const Xmm& x, const Operand& op); -void vcmpfalsepd(const Xmm& x, const Operand& op); -void vcmpfalseps(const Xmm& x, const Operand& op); -void vcmpfalsesd(const Xmm& x, const Operand& op); -void vcmpfalsess(const Xmm& x, const Operand& op); -void vcmpge_oqpd(const Xmm& x, const Operand& op); -void vcmpge_oqps(const Xmm& x, const Operand& op); -void vcmpge_oqsd(const Xmm& x, const Operand& op); -void vcmpge_oqss(const Xmm& x, const Operand& op); -void vcmpgepd(const Xmm& x, const Operand& op); -void vcmpgeps(const Xmm& x, const Operand& op); -void vcmpgesd(const Xmm& x, const Operand& op); -void vcmpgess(const Xmm& x, const Operand& op); -void vcmpgt_oqpd(const Xmm& x, const Operand& op); -void vcmpgt_oqps(const Xmm& x, const Operand& op); -void vcmpgt_oqsd(const Xmm& x, const Operand& op); -void vcmpgt_oqss(const Xmm& x, const Operand& op); -void vcmpgtpd(const Xmm& x, const Operand& op); -void vcmpgtps(const Xmm& x, const Operand& op); -void vcmpgtsd(const Xmm& x, const Operand& op); -void vcmpgtss(const Xmm& x, const Operand& op); -void vcmple_oqpd(const Xmm& x, const Operand& op); -void vcmple_oqps(const Xmm& x, const Operand& op); -void vcmple_oqsd(const Xmm& x, const Operand& op); -void vcmple_oqss(const Xmm& x, const Operand& op); -void vcmplepd(const Xmm& x, const Operand& op); -void vcmpleps(const Xmm& x, const Operand& op); -void vcmplesd(const Xmm& x, const Operand& op); -void vcmpless(const Xmm& x, const Operand& op); -void vcmplt_oqpd(const Xmm& x, const Operand& op); -void vcmplt_oqps(const Xmm& x, const Operand& op); -void vcmplt_oqsd(const Xmm& x, const Operand& op); -void vcmplt_oqss(const Xmm& x, const Operand& op); -void vcmpltpd(const Xmm& x, const Operand& op); -void vcmpltps(const Xmm& x, const Operand& op); -void vcmpltsd(const Xmm& x, const Operand& op); -void vcmpltss(const Xmm& x, const Operand& op); -void vcmpneq_oqpd(const Xmm& x, const Operand& op); -void vcmpneq_oqps(const Xmm& x, const Operand& op); -void vcmpneq_oqsd(const Xmm& x, const Operand& op); -void vcmpneq_oqss(const Xmm& x, const Operand& op); -void vcmpneq_ospd(const Xmm& x, const Operand& op); -void vcmpneq_osps(const Xmm& x, const Operand& op); -void vcmpneq_ossd(const Xmm& x, const Operand& op); -void vcmpneq_osss(const Xmm& x, const Operand& op); -void vcmpneq_uspd(const Xmm& x, const Operand& op); -void vcmpneq_usps(const Xmm& x, const Operand& op); -void vcmpneq_ussd(const Xmm& x, const Operand& op); -void vcmpneq_usss(const Xmm& x, const Operand& op); -void vcmpneqpd(const Xmm& x, const Operand& op); -void vcmpneqps(const Xmm& x, const Operand& op); -void vcmpneqsd(const Xmm& x, const Operand& op); -void vcmpneqss(const Xmm& x, const Operand& op); -void vcmpnge_uqpd(const Xmm& x, const Operand& op); -void vcmpnge_uqps(const Xmm& x, const Operand& op); -void vcmpnge_uqsd(const Xmm& x, const Operand& op); -void vcmpnge_uqss(const Xmm& x, const Operand& op); -void vcmpngepd(const Xmm& x, const Operand& op); -void vcmpngeps(const Xmm& x, const Operand& op); -void vcmpngesd(const Xmm& x, const Operand& op); -void vcmpngess(const Xmm& x, const Operand& op); -void vcmpngt_uqpd(const Xmm& x, const Operand& op); -void vcmpngt_uqps(const Xmm& x, const Operand& op); -void vcmpngt_uqsd(const Xmm& x, const Operand& op); -void vcmpngt_uqss(const Xmm& x, const Operand& op); -void vcmpngtpd(const Xmm& x, const Operand& op); -void vcmpngtps(const Xmm& x, const Operand& op); -void vcmpngtsd(const Xmm& x, const Operand& op); -void vcmpngtss(const Xmm& x, const Operand& op); -void vcmpnle_uqpd(const Xmm& x, const Operand& op); -void vcmpnle_uqps(const Xmm& x, const Operand& op); -void vcmpnle_uqsd(const Xmm& x, const Operand& op); -void vcmpnle_uqss(const Xmm& x, const Operand& op); -void vcmpnlepd(const Xmm& x, const Operand& op); -void vcmpnleps(const Xmm& x, const Operand& op); -void vcmpnlesd(const Xmm& x, const Operand& op); -void vcmpnless(const Xmm& x, const Operand& op); -void vcmpnlt_uqpd(const Xmm& x, const Operand& op); -void vcmpnlt_uqps(const Xmm& x, const Operand& op); -void vcmpnlt_uqsd(const Xmm& x, const Operand& op); -void vcmpnlt_uqss(const Xmm& x, const Operand& op); -void vcmpnltpd(const Xmm& x, const Operand& op); -void vcmpnltps(const Xmm& x, const Operand& op); -void vcmpnltsd(const Xmm& x, const Operand& op); -void vcmpnltss(const Xmm& x, const Operand& op); -void vcmpord_spd(const Xmm& x, const Operand& op); -void vcmpord_sps(const Xmm& x, const Operand& op); -void vcmpord_ssd(const Xmm& x, const Operand& op); -void vcmpord_sss(const Xmm& x, const Operand& op); -void vcmpordpd(const Xmm& x, const Operand& op); -void vcmpordps(const Xmm& x, const Operand& op); -void vcmpordsd(const Xmm& x, const Operand& op); -void vcmpordss(const Xmm& x, const Operand& op); -void vcmppd(const Xmm& x, const Operand& op, uint8 imm); -void vcmpps(const Xmm& x, const Operand& op, uint8 imm); -void vcmpsd(const Xmm& x, const Operand& op, uint8 imm); -void vcmpss(const Xmm& x, const Operand& op, uint8 imm); -void vcmptrue_uspd(const Xmm& x, const Operand& op); -void vcmptrue_usps(const Xmm& x, const Operand& op); -void vcmptrue_ussd(const Xmm& x, const Operand& op); -void vcmptrue_usss(const Xmm& x, const Operand& op); -void vcmptruepd(const Xmm& x, const Operand& op); -void vcmptrueps(const Xmm& x, const Operand& op); -void vcmptruesd(const Xmm& x, const Operand& op); -void vcmptruess(const Xmm& x, const Operand& op); -void vcmpunord_spd(const Xmm& x, const Operand& op); -void vcmpunord_sps(const Xmm& x, const Operand& op); -void vcmpunord_ssd(const Xmm& x, const Operand& op); -void vcmpunord_sss(const Xmm& x, const Operand& op); -void vcmpunordpd(const Xmm& x, const Operand& op); -void vcmpunordps(const Xmm& x, const Operand& op); -void vcmpunordsd(const Xmm& x, const Operand& op); -void vcmpunordss(const Xmm& x, const Operand& op); -void vcvtsd2ss(const Xmm& x, const Operand& op); -void vcvtsi2sd(const Xmm& x, const Operand& op); -void vcvtsi2ss(const Xmm& x, const Operand& op); -void vcvtss2sd(const Xmm& x, const Operand& op); -void vdppd(const Xmm& x, const Operand& op, uint8 imm); -void vdpps(const Xmm& x, const Operand& op, uint8 imm); -void vinsertps(const Xmm& x, const Operand& op, uint8 imm); -void vmpsadbw(const Xmm& x, const Operand& op, uint8 imm); -void vpackssdw(const Xmm& x, const Operand& op); -void vpacksswb(const Xmm& x, const Operand& op); -void vpackusdw(const Xmm& x, const Operand& op); -void vpackuswb(const Xmm& x, const Operand& op); -void vpaddb(const Xmm& x, const Operand& op); -void vpaddd(const Xmm& x, const Operand& op); -void vpaddq(const Xmm& x, const Operand& op); -void vpaddsb(const Xmm& x, const Operand& op); -void vpaddsw(const Xmm& x, const Operand& op); -void vpaddusb(const Xmm& x, const Operand& op); -void vpaddusw(const Xmm& x, const Operand& op); -void vpaddw(const Xmm& x, const Operand& op); -void vpalignr(const Xmm& x, const Operand& op, uint8 imm); -void vpand(const Xmm& x, const Operand& op); -void vpandn(const Xmm& x, const Operand& op); -void vpavgb(const Xmm& x, const Operand& op); -void vpavgw(const Xmm& x, const Operand& op); -void vpblendd(const Xmm& x, const Operand& op, uint8 imm); -void vpblendvb(const Xmm& x1, const Operand& op, const Xmm& x4); -void vpblendw(const Xmm& x, const Operand& op, uint8 imm); -void vpclmulqdq(const Xmm& x, const Operand& op, uint8 imm); -void vpcmpeqb(const Xmm& x, const Operand& op); -void vpcmpeqd(const Xmm& x, const Operand& op); -void vpcmpeqq(const Xmm& x, const Operand& op); -void vpcmpeqw(const Xmm& x, const Operand& op); -void vpcmpgtb(const Xmm& x, const Operand& op); -void vpcmpgtd(const Xmm& x, const Operand& op); -void vpcmpgtq(const Xmm& x, const Operand& op); -void vpcmpgtw(const Xmm& x, const Operand& op); -void vphaddd(const Xmm& x, const Operand& op); -void vphaddsw(const Xmm& x, const Operand& op); -void vphaddw(const Xmm& x, const Operand& op); -void vphsubd(const Xmm& x, const Operand& op); -void vphsubsw(const Xmm& x, const Operand& op); -void vphsubw(const Xmm& x, const Operand& op); -void vpinsrb(const Xmm& x, const Operand& op, uint8 imm); -void vpinsrd(const Xmm& x, const Operand& op, uint8 imm); -void vpinsrq(const Xmm& x, const Operand& op, uint8 imm); -void vpinsrw(const Xmm& x, const Operand& op, uint8 imm); -void vpmaddubsw(const Xmm& x, const Operand& op); -void vpmaddwd(const Xmm& x, const Operand& op); -void vpmaxsb(const Xmm& x, const Operand& op); -void vpmaxsd(const Xmm& x, const Operand& op); -void vpmaxsw(const Xmm& x, const Operand& op); -void vpmaxub(const Xmm& x, const Operand& op); -void vpmaxud(const Xmm& x, const Operand& op); -void vpmaxuw(const Xmm& x, const Operand& op); -void vpminsb(const Xmm& x, const Operand& op); -void vpminsd(const Xmm& x, const Operand& op); -void vpminsw(const Xmm& x, const Operand& op); -void vpminub(const Xmm& x, const Operand& op); -void vpminud(const Xmm& x, const Operand& op); -void vpminuw(const Xmm& x, const Operand& op); -void vpmuldq(const Xmm& x, const Operand& op); -void vpmulhrsw(const Xmm& x, const Operand& op); -void vpmulhuw(const Xmm& x, const Operand& op); -void vpmulhw(const Xmm& x, const Operand& op); -void vpmulld(const Xmm& x, const Operand& op); -void vpmullw(const Xmm& x, const Operand& op); -void vpmuludq(const Xmm& x, const Operand& op); -void vpor(const Xmm& x, const Operand& op); -void vpsadbw(const Xmm& x, const Operand& op); -void vpsignb(const Xmm& x, const Operand& op); -void vpsignd(const Xmm& x, const Operand& op); -void vpsignw(const Xmm& x, const Operand& op); -void vpslld(const Xmm& x, const Operand& op); -void vpslld(const Xmm& x, uint8 imm); -void vpslldq(const Xmm& x, uint8 imm); -void vpsllq(const Xmm& x, const Operand& op); -void vpsllq(const Xmm& x, uint8 imm); -void vpsllw(const Xmm& x, const Operand& op); -void vpsllw(const Xmm& x, uint8 imm); -void vpsrad(const Xmm& x, const Operand& op); -void vpsrad(const Xmm& x, uint8 imm); -void vpsraw(const Xmm& x, const Operand& op); -void vpsraw(const Xmm& x, uint8 imm); -void vpsrld(const Xmm& x, const Operand& op); -void vpsrld(const Xmm& x, uint8 imm); -void vpsrldq(const Xmm& x, uint8 imm); -void vpsrlq(const Xmm& x, const Operand& op); -void vpsrlq(const Xmm& x, uint8 imm); -void vpsrlw(const Xmm& x, const Operand& op); -void vpsrlw(const Xmm& x, uint8 imm); -void vpsubb(const Xmm& x, const Operand& op); -void vpsubd(const Xmm& x, const Operand& op); -void vpsubq(const Xmm& x, const Operand& op); -void vpsubsb(const Xmm& x, const Operand& op); -void vpsubsw(const Xmm& x, const Operand& op); -void vpsubusb(const Xmm& x, const Operand& op); -void vpsubusw(const Xmm& x, const Operand& op); -void vpsubw(const Xmm& x, const Operand& op); -void vpunpckhbw(const Xmm& x, const Operand& op); -void vpunpckhdq(const Xmm& x, const Operand& op); -void vpunpckhqdq(const Xmm& x, const Operand& op); -void vpunpckhwd(const Xmm& x, const Operand& op); -void vpunpcklbw(const Xmm& x, const Operand& op); -void vpunpckldq(const Xmm& x, const Operand& op); -void vpunpcklqdq(const Xmm& x, const Operand& op); -void vpunpcklwd(const Xmm& x, const Operand& op); -void vpxor(const Xmm& x, const Operand& op); -void vrcpss(const Xmm& x, const Operand& op); -void vroundsd(const Xmm& x, const Operand& op, uint8 imm); -void vroundss(const Xmm& x, const Operand& op, uint8 imm); -void vrsqrtss(const Xmm& x, const Operand& op); -void vshufpd(const Xmm& x, const Operand& op, uint8 imm); -void vshufps(const Xmm& x, const Operand& op, uint8 imm); -void vsqrtsd(const Xmm& x, const Operand& op); -void vsqrtss(const Xmm& x, const Operand& op); -void vunpckhpd(const Xmm& x, const Operand& op); -void vunpckhps(const Xmm& x, const Operand& op); -void vunpcklpd(const Xmm& x, const Operand& op); -void vunpcklps(const Xmm& x, const Operand& op); +void xor_(const Operand &op, uint32 imm); +void xor_(const Operand &op1, const Operand &op2); +void xorpd(const Xmm &xmm, const Operand &op); +void xorps(const Xmm &xmm, const Operand &op); +void vblendpd(const Xmm &x, const Operand &op, uint8 imm); +void vblendps(const Xmm &x, const Operand &op, uint8 imm); +void vblendvpd(const Xmm &x1, const Operand &op, const Xmm &x4); +void vblendvps(const Xmm &x1, const Operand &op, const Xmm &x4); +void vcmpeq_ospd(const Xmm &x, const Operand &op); +void vcmpeq_osps(const Xmm &x, const Operand &op); +void vcmpeq_ossd(const Xmm &x, const Operand &op); +void vcmpeq_osss(const Xmm &x, const Operand &op); +void vcmpeq_uqpd(const Xmm &x, const Operand &op); +void vcmpeq_uqps(const Xmm &x, const Operand &op); +void vcmpeq_uqsd(const Xmm &x, const Operand &op); +void vcmpeq_uqss(const Xmm &x, const Operand &op); +void vcmpeq_uspd(const Xmm &x, const Operand &op); +void vcmpeq_usps(const Xmm &x, const Operand &op); +void vcmpeq_ussd(const Xmm &x, const Operand &op); +void vcmpeq_usss(const Xmm &x, const Operand &op); +void vcmpeqpd(const Xmm &x, const Operand &op); +void vcmpeqps(const Xmm &x, const Operand &op); +void vcmpeqsd(const Xmm &x, const Operand &op); +void vcmpeqss(const Xmm &x, const Operand &op); +void vcmpfalse_ospd(const Xmm &x, const Operand &op); +void vcmpfalse_osps(const Xmm &x, const Operand &op); +void vcmpfalse_ossd(const Xmm &x, const Operand &op); +void vcmpfalse_osss(const Xmm &x, const Operand &op); +void vcmpfalsepd(const Xmm &x, const Operand &op); +void vcmpfalseps(const Xmm &x, const Operand &op); +void vcmpfalsesd(const Xmm &x, const Operand &op); +void vcmpfalsess(const Xmm &x, const Operand &op); +void vcmpge_oqpd(const Xmm &x, const Operand &op); +void vcmpge_oqps(const Xmm &x, const Operand &op); +void vcmpge_oqsd(const Xmm &x, const Operand &op); +void vcmpge_oqss(const Xmm &x, const Operand &op); +void vcmpgepd(const Xmm &x, const Operand &op); +void vcmpgeps(const Xmm &x, const Operand &op); +void vcmpgesd(const Xmm &x, const Operand &op); +void vcmpgess(const Xmm &x, const Operand &op); +void vcmpgt_oqpd(const Xmm &x, const Operand &op); +void vcmpgt_oqps(const Xmm &x, const Operand &op); +void vcmpgt_oqsd(const Xmm &x, const Operand &op); +void vcmpgt_oqss(const Xmm &x, const Operand &op); +void vcmpgtpd(const Xmm &x, const Operand &op); +void vcmpgtps(const Xmm &x, const Operand &op); +void vcmpgtsd(const Xmm &x, const Operand &op); +void vcmpgtss(const Xmm &x, const Operand &op); +void vcmple_oqpd(const Xmm &x, const Operand &op); +void vcmple_oqps(const Xmm &x, const Operand &op); +void vcmple_oqsd(const Xmm &x, const Operand &op); +void vcmple_oqss(const Xmm &x, const Operand &op); +void vcmplepd(const Xmm &x, const Operand &op); +void vcmpleps(const Xmm &x, const Operand &op); +void vcmplesd(const Xmm &x, const Operand &op); +void vcmpless(const Xmm &x, const Operand &op); +void vcmplt_oqpd(const Xmm &x, const Operand &op); +void vcmplt_oqps(const Xmm &x, const Operand &op); +void vcmplt_oqsd(const Xmm &x, const Operand &op); +void vcmplt_oqss(const Xmm &x, const Operand &op); +void vcmpltpd(const Xmm &x, const Operand &op); +void vcmpltps(const Xmm &x, const Operand &op); +void vcmpltsd(const Xmm &x, const Operand &op); +void vcmpltss(const Xmm &x, const Operand &op); +void vcmpneq_oqpd(const Xmm &x, const Operand &op); +void vcmpneq_oqps(const Xmm &x, const Operand &op); +void vcmpneq_oqsd(const Xmm &x, const Operand &op); +void vcmpneq_oqss(const Xmm &x, const Operand &op); +void vcmpneq_ospd(const Xmm &x, const Operand &op); +void vcmpneq_osps(const Xmm &x, const Operand &op); +void vcmpneq_ossd(const Xmm &x, const Operand &op); +void vcmpneq_osss(const Xmm &x, const Operand &op); +void vcmpneq_uspd(const Xmm &x, const Operand &op); +void vcmpneq_usps(const Xmm &x, const Operand &op); +void vcmpneq_ussd(const Xmm &x, const Operand &op); +void vcmpneq_usss(const Xmm &x, const Operand &op); +void vcmpneqpd(const Xmm &x, const Operand &op); +void vcmpneqps(const Xmm &x, const Operand &op); +void vcmpneqsd(const Xmm &x, const Operand &op); +void vcmpneqss(const Xmm &x, const Operand &op); +void vcmpnge_uqpd(const Xmm &x, const Operand &op); +void vcmpnge_uqps(const Xmm &x, const Operand &op); +void vcmpnge_uqsd(const Xmm &x, const Operand &op); +void vcmpnge_uqss(const Xmm &x, const Operand &op); +void vcmpngepd(const Xmm &x, const Operand &op); +void vcmpngeps(const Xmm &x, const Operand &op); +void vcmpngesd(const Xmm &x, const Operand &op); +void vcmpngess(const Xmm &x, const Operand &op); +void vcmpngt_uqpd(const Xmm &x, const Operand &op); +void vcmpngt_uqps(const Xmm &x, const Operand &op); +void vcmpngt_uqsd(const Xmm &x, const Operand &op); +void vcmpngt_uqss(const Xmm &x, const Operand &op); +void vcmpngtpd(const Xmm &x, const Operand &op); +void vcmpngtps(const Xmm &x, const Operand &op); +void vcmpngtsd(const Xmm &x, const Operand &op); +void vcmpngtss(const Xmm &x, const Operand &op); +void vcmpnle_uqpd(const Xmm &x, const Operand &op); +void vcmpnle_uqps(const Xmm &x, const Operand &op); +void vcmpnle_uqsd(const Xmm &x, const Operand &op); +void vcmpnle_uqss(const Xmm &x, const Operand &op); +void vcmpnlepd(const Xmm &x, const Operand &op); +void vcmpnleps(const Xmm &x, const Operand &op); +void vcmpnlesd(const Xmm &x, const Operand &op); +void vcmpnless(const Xmm &x, const Operand &op); +void vcmpnlt_uqpd(const Xmm &x, const Operand &op); +void vcmpnlt_uqps(const Xmm &x, const Operand &op); +void vcmpnlt_uqsd(const Xmm &x, const Operand &op); +void vcmpnlt_uqss(const Xmm &x, const Operand &op); +void vcmpnltpd(const Xmm &x, const Operand &op); +void vcmpnltps(const Xmm &x, const Operand &op); +void vcmpnltsd(const Xmm &x, const Operand &op); +void vcmpnltss(const Xmm &x, const Operand &op); +void vcmpord_spd(const Xmm &x, const Operand &op); +void vcmpord_sps(const Xmm &x, const Operand &op); +void vcmpord_ssd(const Xmm &x, const Operand &op); +void vcmpord_sss(const Xmm &x, const Operand &op); +void vcmpordpd(const Xmm &x, const Operand &op); +void vcmpordps(const Xmm &x, const Operand &op); +void vcmpordsd(const Xmm &x, const Operand &op); +void vcmpordss(const Xmm &x, const Operand &op); +void vcmppd(const Xmm &x, const Operand &op, uint8 imm); +void vcmpps(const Xmm &x, const Operand &op, uint8 imm); +void vcmpsd(const Xmm &x, const Operand &op, uint8 imm); +void vcmpss(const Xmm &x, const Operand &op, uint8 imm); +void vcmptrue_uspd(const Xmm &x, const Operand &op); +void vcmptrue_usps(const Xmm &x, const Operand &op); +void vcmptrue_ussd(const Xmm &x, const Operand &op); +void vcmptrue_usss(const Xmm &x, const Operand &op); +void vcmptruepd(const Xmm &x, const Operand &op); +void vcmptrueps(const Xmm &x, const Operand &op); +void vcmptruesd(const Xmm &x, const Operand &op); +void vcmptruess(const Xmm &x, const Operand &op); +void vcmpunord_spd(const Xmm &x, const Operand &op); +void vcmpunord_sps(const Xmm &x, const Operand &op); +void vcmpunord_ssd(const Xmm &x, const Operand &op); +void vcmpunord_sss(const Xmm &x, const Operand &op); +void vcmpunordpd(const Xmm &x, const Operand &op); +void vcmpunordps(const Xmm &x, const Operand &op); +void vcmpunordsd(const Xmm &x, const Operand &op); +void vcmpunordss(const Xmm &x, const Operand &op); +void vcvtsd2ss(const Xmm &x, const Operand &op); +void vcvtsi2sd(const Xmm &x, const Operand &op); +void vcvtsi2ss(const Xmm &x, const Operand &op); +void vcvtss2sd(const Xmm &x, const Operand &op); +void vdppd(const Xmm &x, const Operand &op, uint8 imm); +void vdpps(const Xmm &x, const Operand &op, uint8 imm); +void vinsertps(const Xmm &x, const Operand &op, uint8 imm); +void vmpsadbw(const Xmm &x, const Operand &op, uint8 imm); +void vpackssdw(const Xmm &x, const Operand &op); +void vpacksswb(const Xmm &x, const Operand &op); +void vpackusdw(const Xmm &x, const Operand &op); +void vpackuswb(const Xmm &x, const Operand &op); +void vpaddb(const Xmm &x, const Operand &op); +void vpaddd(const Xmm &x, const Operand &op); +void vpaddq(const Xmm &x, const Operand &op); +void vpaddsb(const Xmm &x, const Operand &op); +void vpaddsw(const Xmm &x, const Operand &op); +void vpaddusb(const Xmm &x, const Operand &op); +void vpaddusw(const Xmm &x, const Operand &op); +void vpaddw(const Xmm &x, const Operand &op); +void vpalignr(const Xmm &x, const Operand &op, uint8 imm); +void vpand(const Xmm &x, const Operand &op); +void vpandn(const Xmm &x, const Operand &op); +void vpavgb(const Xmm &x, const Operand &op); +void vpavgw(const Xmm &x, const Operand &op); +void vpblendd(const Xmm &x, const Operand &op, uint8 imm); +void vpblendvb(const Xmm &x1, const Operand &op, const Xmm &x4); +void vpblendw(const Xmm &x, const Operand &op, uint8 imm); +void vpclmulqdq(const Xmm &x, const Operand &op, uint8 imm); +void vpcmpeqb(const Xmm &x, const Operand &op); +void vpcmpeqd(const Xmm &x, const Operand &op); +void vpcmpeqq(const Xmm &x, const Operand &op); +void vpcmpeqw(const Xmm &x, const Operand &op); +void vpcmpgtb(const Xmm &x, const Operand &op); +void vpcmpgtd(const Xmm &x, const Operand &op); +void vpcmpgtq(const Xmm &x, const Operand &op); +void vpcmpgtw(const Xmm &x, const Operand &op); +void vphaddd(const Xmm &x, const Operand &op); +void vphaddsw(const Xmm &x, const Operand &op); +void vphaddw(const Xmm &x, const Operand &op); +void vphsubd(const Xmm &x, const Operand &op); +void vphsubsw(const Xmm &x, const Operand &op); +void vphsubw(const Xmm &x, const Operand &op); +void vpinsrb(const Xmm &x, const Operand &op, uint8 imm); +void vpinsrd(const Xmm &x, const Operand &op, uint8 imm); +void vpinsrq(const Xmm &x, const Operand &op, uint8 imm); +void vpinsrw(const Xmm &x, const Operand &op, uint8 imm); +void vpmaddubsw(const Xmm &x, const Operand &op); +void vpmaddwd(const Xmm &x, const Operand &op); +void vpmaxsb(const Xmm &x, const Operand &op); +void vpmaxsd(const Xmm &x, const Operand &op); +void vpmaxsw(const Xmm &x, const Operand &op); +void vpmaxub(const Xmm &x, const Operand &op); +void vpmaxud(const Xmm &x, const Operand &op); +void vpmaxuw(const Xmm &x, const Operand &op); +void vpminsb(const Xmm &x, const Operand &op); +void vpminsd(const Xmm &x, const Operand &op); +void vpminsw(const Xmm &x, const Operand &op); +void vpminub(const Xmm &x, const Operand &op); +void vpminud(const Xmm &x, const Operand &op); +void vpminuw(const Xmm &x, const Operand &op); +void vpmuldq(const Xmm &x, const Operand &op); +void vpmulhrsw(const Xmm &x, const Operand &op); +void vpmulhuw(const Xmm &x, const Operand &op); +void vpmulhw(const Xmm &x, const Operand &op); +void vpmulld(const Xmm &x, const Operand &op); +void vpmullw(const Xmm &x, const Operand &op); +void vpmuludq(const Xmm &x, const Operand &op); +void vpor(const Xmm &x, const Operand &op); +void vpsadbw(const Xmm &x, const Operand &op); +void vpsignb(const Xmm &x, const Operand &op); +void vpsignd(const Xmm &x, const Operand &op); +void vpsignw(const Xmm &x, const Operand &op); +void vpslld(const Xmm &x, const Operand &op); +void vpslld(const Xmm &x, uint8 imm); +void vpslldq(const Xmm &x, uint8 imm); +void vpsllq(const Xmm &x, const Operand &op); +void vpsllq(const Xmm &x, uint8 imm); +void vpsllw(const Xmm &x, const Operand &op); +void vpsllw(const Xmm &x, uint8 imm); +void vpsrad(const Xmm &x, const Operand &op); +void vpsrad(const Xmm &x, uint8 imm); +void vpsraw(const Xmm &x, const Operand &op); +void vpsraw(const Xmm &x, uint8 imm); +void vpsrld(const Xmm &x, const Operand &op); +void vpsrld(const Xmm &x, uint8 imm); +void vpsrldq(const Xmm &x, uint8 imm); +void vpsrlq(const Xmm &x, const Operand &op); +void vpsrlq(const Xmm &x, uint8 imm); +void vpsrlw(const Xmm &x, const Operand &op); +void vpsrlw(const Xmm &x, uint8 imm); +void vpsubb(const Xmm &x, const Operand &op); +void vpsubd(const Xmm &x, const Operand &op); +void vpsubq(const Xmm &x, const Operand &op); +void vpsubsb(const Xmm &x, const Operand &op); +void vpsubsw(const Xmm &x, const Operand &op); +void vpsubusb(const Xmm &x, const Operand &op); +void vpsubusw(const Xmm &x, const Operand &op); +void vpsubw(const Xmm &x, const Operand &op); +void vpunpckhbw(const Xmm &x, const Operand &op); +void vpunpckhdq(const Xmm &x, const Operand &op); +void vpunpckhqdq(const Xmm &x, const Operand &op); +void vpunpckhwd(const Xmm &x, const Operand &op); +void vpunpcklbw(const Xmm &x, const Operand &op); +void vpunpckldq(const Xmm &x, const Operand &op); +void vpunpcklqdq(const Xmm &x, const Operand &op); +void vpunpcklwd(const Xmm &x, const Operand &op); +void vpxor(const Xmm &x, const Operand &op); +void vrcpss(const Xmm &x, const Operand &op); +void vroundsd(const Xmm &x, const Operand &op, uint8 imm); +void vroundss(const Xmm &x, const Operand &op, uint8 imm); +void vrsqrtss(const Xmm &x, const Operand &op); +void vshufpd(const Xmm &x, const Operand &op, uint8 imm); +void vshufps(const Xmm &x, const Operand &op, uint8 imm); +void vsqrtsd(const Xmm &x, const Operand &op); +void vsqrtss(const Xmm &x, const Operand &op); +void vunpckhpd(const Xmm &x, const Operand &op); +void vunpckhps(const Xmm &x, const Operand &op); +void vunpcklpd(const Xmm &x, const Operand &op); +void vunpcklps(const Xmm &x, const Operand &op); void jecxz(std::string label); -void jecxz(const Label& label); +void jecxz(const Label &label); void jrcxz(std::string label); -void jrcxz(const Label& label); +void jrcxz(const Label &label); void cdqe(); void cqo(); void cmpsq(); @@ -1677,391 +1687,391 @@ void scasq(); void stosq(); void syscall(); void sysret(); -void cmpxchg16b(const Address& addr); -void fxrstor64(const Address& addr); -void movq(const Reg64& reg, const Mmx& mmx); -void movq(const Mmx& mmx, const Reg64& reg); -void movsxd(const Reg64& reg, const Operand& op); -void pextrq(const Operand& op, const Xmm& xmm, uint8 imm); -void pinsrq(const Xmm& xmm, const Operand& op, uint8 imm); -void vcvtss2si(const Reg64& r, const Operand& op); -void vcvttss2si(const Reg64& r, const Operand& op); -void vcvtsd2si(const Reg64& r, const Operand& op); -void vcvttsd2si(const Reg64& r, const Operand& op); -void vmovq(const Xmm& x, const Reg64& r); -void vmovq(const Reg64& r, const Xmm& x); -void kaddb(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kaddd(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kaddq(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kaddw(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kandb(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kandd(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kandnb(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kandnd(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kandnq(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kandnw(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kandq(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kandw(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kmovb(const Address& addr, const Opmask& k); -void kmovb(const Opmask& k, const Operand& op); -void kmovb(const Opmask& k, const Reg32& r); -void kmovb(const Reg32& r, const Opmask& k); -void kmovd(const Address& addr, const Opmask& k); -void kmovd(const Opmask& k, const Operand& op); -void kmovd(const Opmask& k, const Reg32& r); -void kmovd(const Reg32& r, const Opmask& k); -void kmovq(const Address& addr, const Opmask& k); -void kmovq(const Opmask& k, const Operand& op); -void kmovw(const Address& addr, const Opmask& k); -void kmovw(const Opmask& k, const Operand& op); -void kmovw(const Opmask& k, const Reg32& r); -void kmovw(const Reg32& r, const Opmask& k); -void knotb(const Opmask& r1, const Opmask& r2); -void knotd(const Opmask& r1, const Opmask& r2); -void knotq(const Opmask& r1, const Opmask& r2); -void knotw(const Opmask& r1, const Opmask& r2); -void korb(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kord(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void korq(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kortestb(const Opmask& r1, const Opmask& r2); -void kortestd(const Opmask& r1, const Opmask& r2); -void kortestq(const Opmask& r1, const Opmask& r2); -void kortestw(const Opmask& r1, const Opmask& r2); -void korw(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kshiftlb(const Opmask& r1, const Opmask& r2, uint8 imm); -void kshiftld(const Opmask& r1, const Opmask& r2, uint8 imm); -void kshiftlq(const Opmask& r1, const Opmask& r2, uint8 imm); -void kshiftlw(const Opmask& r1, const Opmask& r2, uint8 imm); -void kshiftrb(const Opmask& r1, const Opmask& r2, uint8 imm); -void kshiftrd(const Opmask& r1, const Opmask& r2, uint8 imm); -void kshiftrq(const Opmask& r1, const Opmask& r2, uint8 imm); -void kshiftrw(const Opmask& r1, const Opmask& r2, uint8 imm); -void ktestb(const Opmask& r1, const Opmask& r2); -void ktestd(const Opmask& r1, const Opmask& r2); -void ktestq(const Opmask& r1, const Opmask& r2); -void ktestw(const Opmask& r1, const Opmask& r2); -void kunpckbw(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kunpckdq(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kunpckwd(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kxnorb(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kxnord(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kxnorq(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kxnorw(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kxorb(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kxord(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kxorq(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void kxorw(const Opmask& r1, const Opmask& r2, const Opmask& r3); -void v4fmaddps(const Zmm& z1, const Zmm& z2, const Address& addr); -void v4fmaddss(const Xmm& x1, const Xmm& x2, const Address& addr); -void v4fnmaddps(const Zmm& z1, const Zmm& z2, const Address& addr); -void v4fnmaddss(const Xmm& x1, const Xmm& x2, const Address& addr); -void valignd(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void valignq(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vblendmpd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vblendmps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vbroadcastf32x2(const Ymm& y, const Operand& op); -void vbroadcastf32x4(const Ymm& y, const Address& addr); -void vbroadcastf32x8(const Zmm& y, const Address& addr); -void vbroadcastf64x2(const Ymm& y, const Address& addr); -void vbroadcastf64x4(const Zmm& y, const Address& addr); -void vbroadcasti32x2(const Xmm& x, const Operand& op); -void vbroadcasti32x4(const Ymm& y, const Operand& op); -void vbroadcasti32x8(const Zmm& z, const Operand& op); -void vbroadcasti64x2(const Ymm& y, const Operand& op); -void vbroadcasti64x4(const Zmm& z, const Operand& op); -void vcmppd(const Opmask& k, const Xmm& x, const Operand& op, uint8 imm); -void vcmpps(const Opmask& k, const Xmm& x, const Operand& op, uint8 imm); -void vcmpsd(const Opmask& k, const Xmm& x, const Operand& op, uint8 imm); -void vcmpss(const Opmask& k, const Xmm& x, const Operand& op, uint8 imm); -void vcompressb(const Operand& op, const Xmm& x); -void vcompresspd(const Operand& op, const Xmm& x); -void vcompressps(const Operand& op, const Xmm& x); -void vcompressw(const Operand& op, const Xmm& x); -void vcvtne2ps2bf16(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcvtneps2bf16(const Xmm& x, const Operand& op); -void vcvtpd2qq(const Xmm& x, const Operand& op); -void vcvtpd2udq(const Xmm& x, const Operand& op); -void vcvtpd2uqq(const Xmm& x, const Operand& op); -void vcvtps2qq(const Xmm& x, const Operand& op); -void vcvtps2udq(const Xmm& x, const Operand& op); -void vcvtps2uqq(const Xmm& x, const Operand& op); -void vcvtqq2pd(const Xmm& x, const Operand& op); -void vcvtqq2ps(const Xmm& x, const Operand& op); -void vcvtsd2usi(const Reg32e& r, const Operand& op); -void vcvtss2usi(const Reg32e& r, const Operand& op); -void vcvttpd2qq(const Xmm& x, const Operand& op); -void vcvttpd2udq(const Xmm& x, const Operand& op); -void vcvttpd2uqq(const Xmm& x, const Operand& op); -void vcvttps2qq(const Xmm& x, const Operand& op); -void vcvttps2udq(const Xmm& x, const Operand& op); -void vcvttps2uqq(const Xmm& x, const Operand& op); -void vcvttsd2usi(const Reg32e& r, const Operand& op); -void vcvttss2usi(const Reg32e& r, const Operand& op); -void vcvtudq2pd(const Xmm& x, const Operand& op); -void vcvtudq2ps(const Xmm& x, const Operand& op); -void vcvtuqq2pd(const Xmm& x, const Operand& op); -void vcvtuqq2ps(const Xmm& x, const Operand& op); -void vcvtusi2sd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vcvtusi2ss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vdbpsadbw(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vdpbf16ps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vexp2pd(const Zmm& z, const Operand& op); -void vexp2ps(const Zmm& z, const Operand& op); -void vexpandpd(const Xmm& x, const Operand& op); -void vexpandps(const Xmm& x, const Operand& op); -void vextractf32x4(const Operand& op, const Ymm& r, uint8 imm); -void vextractf32x8(const Operand& op, const Zmm& r, uint8 imm); -void vextractf64x2(const Operand& op, const Ymm& r, uint8 imm); -void vextractf64x4(const Operand& op, const Zmm& r, uint8 imm); -void vextracti32x4(const Operand& op, const Ymm& r, uint8 imm); -void vextracti32x8(const Operand& op, const Zmm& r, uint8 imm); -void vextracti64x2(const Operand& op, const Ymm& r, uint8 imm); -void vextracti64x4(const Operand& op, const Zmm& r, uint8 imm); -void vfixupimmpd(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vfixupimmps(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vfixupimmsd(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vfixupimmss(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vfpclasspd(const Opmask& k, const Operand& op, uint8 imm); -void vfpclassps(const Opmask& k, const Operand& op, uint8 imm); -void vfpclasssd(const Opmask& k, const Operand& op, uint8 imm); -void vfpclassss(const Opmask& k, const Operand& op, uint8 imm); -void vgatherdpd(const Xmm& x, const Address& addr); -void vgatherdps(const Xmm& x, const Address& addr); -void vgatherpf0dpd(const Address& addr); -void vgatherpf0dps(const Address& addr); -void vgatherpf0qpd(const Address& addr); -void vgatherpf0qps(const Address& addr); -void vgatherpf1dpd(const Address& addr); -void vgatherpf1dps(const Address& addr); -void vgatherpf1qpd(const Address& addr); -void vgatherpf1qps(const Address& addr); -void vgatherqpd(const Xmm& x, const Address& addr); -void vgatherqps(const Xmm& x, const Address& addr); -void vgetexppd(const Xmm& x, const Operand& op); -void vgetexpps(const Xmm& x, const Operand& op); -void vgetexpsd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vgetexpss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vgetmantpd(const Xmm& x, const Operand& op, uint8 imm); -void vgetmantps(const Xmm& x, const Operand& op, uint8 imm); -void vgetmantsd(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vgetmantss(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vinsertf32x4(const Ymm& r1, const Ymm& r2, const Operand& op, uint8 imm); -void vinsertf32x8(const Zmm& r1, const Zmm& r2, const Operand& op, uint8 imm); -void vinsertf64x2(const Ymm& r1, const Ymm& r2, const Operand& op, uint8 imm); -void vinsertf64x4(const Zmm& r1, const Zmm& r2, const Operand& op, uint8 imm); -void vinserti32x4(const Ymm& r1, const Ymm& r2, const Operand& op, uint8 imm); -void vinserti32x8(const Zmm& r1, const Zmm& r2, const Operand& op, uint8 imm); -void vinserti64x2(const Ymm& r1, const Ymm& r2, const Operand& op, uint8 imm); -void vinserti64x4(const Zmm& r1, const Zmm& r2, const Operand& op, uint8 imm); -void vmovdqa32(const Address& addr, const Xmm& x); -void vmovdqa32(const Xmm& x, const Operand& op); -void vmovdqa64(const Address& addr, const Xmm& x); -void vmovdqa64(const Xmm& x, const Operand& op); -void vmovdqu16(const Address& addr, const Xmm& x); -void vmovdqu16(const Xmm& x, const Operand& op); -void vmovdqu32(const Address& addr, const Xmm& x); -void vmovdqu32(const Xmm& x, const Operand& op); -void vmovdqu64(const Address& addr, const Xmm& x); -void vmovdqu64(const Xmm& x, const Operand& op); -void vmovdqu8(const Address& addr, const Xmm& x); -void vmovdqu8(const Xmm& x, const Operand& op); -void vp2intersectd(const Opmask& k, const Xmm& x, const Operand& op); -void vp2intersectq(const Opmask& k, const Xmm& x, const Operand& op); -void vp4dpwssd(const Zmm& z1, const Zmm& z2, const Address& addr); -void vp4dpwssds(const Zmm& z1, const Zmm& z2, const Address& addr); -void vpabsq(const Xmm& x, const Operand& op); -void vpandd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpandnd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpandnq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpandq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpblendmb(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpblendmd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpblendmq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpblendmw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpbroadcastb(const Xmm& x, const Reg8& r); -void vpbroadcastd(const Xmm& x, const Reg32& r); -void vpbroadcastmb2q(const Xmm& x, const Opmask& k); -void vpbroadcastmw2d(const Xmm& x, const Opmask& k); -void vpbroadcastw(const Xmm& x, const Reg16& r); -void vpcmpb(const Opmask& k, const Xmm& x, const Operand& op, uint8 imm); -void vpcmpd(const Opmask& k, const Xmm& x, const Operand& op, uint8 imm); -void vpcmpeqb(const Opmask& k, const Xmm& x, const Operand& op); -void vpcmpeqd(const Opmask& k, const Xmm& x, const Operand& op); -void vpcmpeqq(const Opmask& k, const Xmm& x, const Operand& op); -void vpcmpeqw(const Opmask& k, const Xmm& x, const Operand& op); -void vpcmpgtb(const Opmask& k, const Xmm& x, const Operand& op); -void vpcmpgtd(const Opmask& k, const Xmm& x, const Operand& op); -void vpcmpgtq(const Opmask& k, const Xmm& x, const Operand& op); -void vpcmpgtw(const Opmask& k, const Xmm& x, const Operand& op); -void vpcmpq(const Opmask& k, const Xmm& x, const Operand& op, uint8 imm); -void vpcmpub(const Opmask& k, const Xmm& x, const Operand& op, uint8 imm); -void vpcmpud(const Opmask& k, const Xmm& x, const Operand& op, uint8 imm); -void vpcmpuq(const Opmask& k, const Xmm& x, const Operand& op, uint8 imm); -void vpcmpuw(const Opmask& k, const Xmm& x, const Operand& op, uint8 imm); -void vpcmpw(const Opmask& k, const Xmm& x, const Operand& op, uint8 imm); -void vpcompressd(const Operand& op, const Xmm& x); -void vpcompressq(const Operand& op, const Xmm& x); -void vpconflictd(const Xmm& x, const Operand& op); -void vpconflictq(const Xmm& x, const Operand& op); -void vpdpbusd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpdpbusds(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpdpwssd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpdpwssds(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpermb(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpermi2b(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpermi2d(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpermi2pd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpermi2ps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpermi2q(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpermi2w(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpermt2b(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpermt2d(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpermt2pd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpermt2ps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpermt2q(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpermt2w(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpermw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpexpandb(const Xmm& x, const Operand& op); -void vpexpandd(const Xmm& x, const Operand& op); -void vpexpandq(const Xmm& x, const Operand& op); -void vpexpandw(const Xmm& x, const Operand& op); -void vpgatherdd(const Xmm& x, const Address& addr); -void vpgatherdq(const Xmm& x, const Address& addr); -void vpgatherqd(const Xmm& x, const Address& addr); -void vpgatherqq(const Xmm& x, const Address& addr); -void vplzcntd(const Xmm& x, const Operand& op); -void vplzcntq(const Xmm& x, const Operand& op); -void vpmadd52huq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpmadd52luq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpmaxsq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpmaxuq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpminsq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpminuq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpmovb2m(const Opmask& k, const Xmm& x); -void vpmovd2m(const Opmask& k, const Xmm& x); -void vpmovdb(const Operand& op, const Xmm& x); -void vpmovdw(const Operand& op, const Xmm& x); -void vpmovm2b(const Xmm& x, const Opmask& k); -void vpmovm2d(const Xmm& x, const Opmask& k); -void vpmovm2q(const Xmm& x, const Opmask& k); -void vpmovm2w(const Xmm& x, const Opmask& k); -void vpmovq2m(const Opmask& k, const Xmm& x); -void vpmovqb(const Operand& op, const Xmm& x); -void vpmovqd(const Operand& op, const Xmm& x); -void vpmovqw(const Operand& op, const Xmm& x); -void vpmovsdb(const Operand& op, const Xmm& x); -void vpmovsdw(const Operand& op, const Xmm& x); -void vpmovsqb(const Operand& op, const Xmm& x); -void vpmovsqd(const Operand& op, const Xmm& x); -void vpmovsqw(const Operand& op, const Xmm& x); -void vpmovswb(const Operand& op, const Xmm& x); -void vpmovusdb(const Operand& op, const Xmm& x); -void vpmovusdw(const Operand& op, const Xmm& x); -void vpmovusqb(const Operand& op, const Xmm& x); -void vpmovusqd(const Operand& op, const Xmm& x); -void vpmovusqw(const Operand& op, const Xmm& x); -void vpmovuswb(const Operand& op, const Xmm& x); -void vpmovw2m(const Opmask& k, const Xmm& x); -void vpmovwb(const Operand& op, const Xmm& x); -void vpmullq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpmultishiftqb(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpopcntb(const Xmm& x, const Operand& op); -void vpopcntd(const Xmm& x, const Operand& op); -void vpopcntq(const Xmm& x, const Operand& op); -void vpopcntw(const Xmm& x, const Operand& op); -void vpord(const Xmm& x1, const Xmm& x2, const Operand& op); -void vporq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vprold(const Xmm& x, const Operand& op, uint8 imm); -void vprolq(const Xmm& x, const Operand& op, uint8 imm); -void vprolvd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vprolvq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vprord(const Xmm& x, const Operand& op, uint8 imm); -void vprorq(const Xmm& x, const Operand& op, uint8 imm); -void vprorvd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vprorvq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpscatterdd(const Address& addr, const Xmm& x); -void vpscatterdq(const Address& addr, const Xmm& x); -void vpscatterqd(const Address& addr, const Xmm& x); -void vpscatterqq(const Address& addr, const Xmm& x); -void vpshldd(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vpshldq(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vpshldvd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpshldvq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpshldvw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpshldw(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vpshrdd(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vpshrdq(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vpshrdvd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpshrdvq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpshrdvw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpshrdw(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vpshufbitqmb(const Opmask& k, const Xmm& x, const Operand& op); -void vpsllvw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsraq(const Xmm& x, const Operand& op, uint8 imm); -void vpsraq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsravq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsravw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpsrlvw(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpternlogd(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vpternlogq(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vptestmb(const Opmask& k, const Xmm& x, const Operand& op); -void vptestmd(const Opmask& k, const Xmm& x, const Operand& op); -void vptestmq(const Opmask& k, const Xmm& x, const Operand& op); -void vptestmw(const Opmask& k, const Xmm& x, const Operand& op); -void vptestnmb(const Opmask& k, const Xmm& x, const Operand& op); -void vptestnmd(const Opmask& k, const Xmm& x, const Operand& op); -void vptestnmq(const Opmask& k, const Xmm& x, const Operand& op); -void vptestnmw(const Opmask& k, const Xmm& x, const Operand& op); -void vpxord(const Xmm& x1, const Xmm& x2, const Operand& op); -void vpxorq(const Xmm& x1, const Xmm& x2, const Operand& op); -void vrangepd(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vrangeps(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vrangesd(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vrangess(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vrcp14pd(const Xmm& x, const Operand& op); -void vrcp14ps(const Xmm& x, const Operand& op); -void vrcp14sd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vrcp14ss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vrcp28pd(const Zmm& z, const Operand& op); -void vrcp28ps(const Zmm& z, const Operand& op); -void vrcp28sd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vrcp28ss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vreducepd(const Xmm& x, const Operand& op, uint8 imm); -void vreduceps(const Xmm& x, const Operand& op, uint8 imm); -void vreducesd(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vreducess(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vrndscalepd(const Xmm& x, const Operand& op, uint8 imm); -void vrndscaleps(const Xmm& x, const Operand& op, uint8 imm); -void vrndscalesd(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vrndscaless(const Xmm& x1, const Xmm& x2, const Operand& op, uint8 imm); -void vrsqrt14pd(const Xmm& x, const Operand& op); -void vrsqrt14ps(const Xmm& x, const Operand& op); -void vrsqrt14sd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vrsqrt14ss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vrsqrt28pd(const Zmm& z, const Operand& op); -void vrsqrt28ps(const Zmm& z, const Operand& op); -void vrsqrt28sd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vrsqrt28ss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vscalefpd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vscalefps(const Xmm& x1, const Xmm& x2, const Operand& op); -void vscalefsd(const Xmm& x1, const Xmm& x2, const Operand& op); -void vscalefss(const Xmm& x1, const Xmm& x2, const Operand& op); -void vscatterdpd(const Address& addr, const Xmm& x); -void vscatterdps(const Address& addr, const Xmm& x); -void vscatterpf0dpd(const Address& addr); -void vscatterpf0dps(const Address& addr); -void vscatterpf0qpd(const Address& addr); -void vscatterpf0qps(const Address& addr); -void vscatterpf1dpd(const Address& addr); -void vscatterpf1dps(const Address& addr); -void vscatterpf1qpd(const Address& addr); -void vscatterpf1qps(const Address& addr); -void vscatterqpd(const Address& addr, const Xmm& x); -void vscatterqps(const Address& addr, const Xmm& x); -void vshuff32x4(const Ymm& y1, const Ymm& y2, const Operand& op, uint8 imm); -void vshuff64x2(const Ymm& y1, const Ymm& y2, const Operand& op, uint8 imm); -void vshufi32x4(const Ymm& y1, const Ymm& y2, const Operand& op, uint8 imm); -void vshufi64x2(const Ymm& y1, const Ymm& y2, const Operand& op, uint8 imm); -void kmovq(const Opmask& k, const Reg64& r); -void kmovq(const Reg64& r, const Opmask& k); -void vpbroadcastq(const Xmm& x, const Reg64& r); +void cmpxchg16b(const Address &addr); +void fxrstor64(const Address &addr); +void movq(const Reg64 ®, const Mmx &mmx); +void movq(const Mmx &mmx, const Reg64 ®); +void movsxd(const Reg64 ®, const Operand &op); +void pextrq(const Operand &op, const Xmm &xmm, uint8 imm); +void pinsrq(const Xmm &xmm, const Operand &op, uint8 imm); +void vcvtss2si(const Reg64 &r, const Operand &op); +void vcvttss2si(const Reg64 &r, const Operand &op); +void vcvtsd2si(const Reg64 &r, const Operand &op); +void vcvttsd2si(const Reg64 &r, const Operand &op); +void vmovq(const Xmm &x, const Reg64 &r); +void vmovq(const Reg64 &r, const Xmm &x); +void kaddb(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kaddd(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kaddq(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kaddw(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kandb(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kandd(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kandnb(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kandnd(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kandnq(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kandnw(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kandq(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kandw(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kmovb(const Address &addr, const Opmask &k); +void kmovb(const Opmask &k, const Operand &op); +void kmovb(const Opmask &k, const Reg32 &r); +void kmovb(const Reg32 &r, const Opmask &k); +void kmovd(const Address &addr, const Opmask &k); +void kmovd(const Opmask &k, const Operand &op); +void kmovd(const Opmask &k, const Reg32 &r); +void kmovd(const Reg32 &r, const Opmask &k); +void kmovq(const Address &addr, const Opmask &k); +void kmovq(const Opmask &k, const Operand &op); +void kmovw(const Address &addr, const Opmask &k); +void kmovw(const Opmask &k, const Operand &op); +void kmovw(const Opmask &k, const Reg32 &r); +void kmovw(const Reg32 &r, const Opmask &k); +void knotb(const Opmask &r1, const Opmask &r2); +void knotd(const Opmask &r1, const Opmask &r2); +void knotq(const Opmask &r1, const Opmask &r2); +void knotw(const Opmask &r1, const Opmask &r2); +void korb(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kord(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void korq(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kortestb(const Opmask &r1, const Opmask &r2); +void kortestd(const Opmask &r1, const Opmask &r2); +void kortestq(const Opmask &r1, const Opmask &r2); +void kortestw(const Opmask &r1, const Opmask &r2); +void korw(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kshiftlb(const Opmask &r1, const Opmask &r2, uint8 imm); +void kshiftld(const Opmask &r1, const Opmask &r2, uint8 imm); +void kshiftlq(const Opmask &r1, const Opmask &r2, uint8 imm); +void kshiftlw(const Opmask &r1, const Opmask &r2, uint8 imm); +void kshiftrb(const Opmask &r1, const Opmask &r2, uint8 imm); +void kshiftrd(const Opmask &r1, const Opmask &r2, uint8 imm); +void kshiftrq(const Opmask &r1, const Opmask &r2, uint8 imm); +void kshiftrw(const Opmask &r1, const Opmask &r2, uint8 imm); +void ktestb(const Opmask &r1, const Opmask &r2); +void ktestd(const Opmask &r1, const Opmask &r2); +void ktestq(const Opmask &r1, const Opmask &r2); +void ktestw(const Opmask &r1, const Opmask &r2); +void kunpckbw(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kunpckdq(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kunpckwd(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kxnorb(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kxnord(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kxnorq(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kxnorw(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kxorb(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kxord(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kxorq(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void kxorw(const Opmask &r1, const Opmask &r2, const Opmask &r3); +void v4fmaddps(const Zmm &z1, const Zmm &z2, const Address &addr); +void v4fmaddss(const Xmm &x1, const Xmm &x2, const Address &addr); +void v4fnmaddps(const Zmm &z1, const Zmm &z2, const Address &addr); +void v4fnmaddss(const Xmm &x1, const Xmm &x2, const Address &addr); +void valignd(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void valignq(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vblendmpd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vblendmps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vbroadcastf32x2(const Ymm &y, const Operand &op); +void vbroadcastf32x4(const Ymm &y, const Address &addr); +void vbroadcastf32x8(const Zmm &y, const Address &addr); +void vbroadcastf64x2(const Ymm &y, const Address &addr); +void vbroadcastf64x4(const Zmm &y, const Address &addr); +void vbroadcasti32x2(const Xmm &x, const Operand &op); +void vbroadcasti32x4(const Ymm &y, const Operand &op); +void vbroadcasti32x8(const Zmm &z, const Operand &op); +void vbroadcasti64x2(const Ymm &y, const Operand &op); +void vbroadcasti64x4(const Zmm &z, const Operand &op); +void vcmppd(const Opmask &k, const Xmm &x, const Operand &op, uint8 imm); +void vcmpps(const Opmask &k, const Xmm &x, const Operand &op, uint8 imm); +void vcmpsd(const Opmask &k, const Xmm &x, const Operand &op, uint8 imm); +void vcmpss(const Opmask &k, const Xmm &x, const Operand &op, uint8 imm); +void vcompressb(const Operand &op, const Xmm &x); +void vcompresspd(const Operand &op, const Xmm &x); +void vcompressps(const Operand &op, const Xmm &x); +void vcompressw(const Operand &op, const Xmm &x); +void vcvtne2ps2bf16(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcvtneps2bf16(const Xmm &x, const Operand &op); +void vcvtpd2qq(const Xmm &x, const Operand &op); +void vcvtpd2udq(const Xmm &x, const Operand &op); +void vcvtpd2uqq(const Xmm &x, const Operand &op); +void vcvtps2qq(const Xmm &x, const Operand &op); +void vcvtps2udq(const Xmm &x, const Operand &op); +void vcvtps2uqq(const Xmm &x, const Operand &op); +void vcvtqq2pd(const Xmm &x, const Operand &op); +void vcvtqq2ps(const Xmm &x, const Operand &op); +void vcvtsd2usi(const Reg32e &r, const Operand &op); +void vcvtss2usi(const Reg32e &r, const Operand &op); +void vcvttpd2qq(const Xmm &x, const Operand &op); +void vcvttpd2udq(const Xmm &x, const Operand &op); +void vcvttpd2uqq(const Xmm &x, const Operand &op); +void vcvttps2qq(const Xmm &x, const Operand &op); +void vcvttps2udq(const Xmm &x, const Operand &op); +void vcvttps2uqq(const Xmm &x, const Operand &op); +void vcvttsd2usi(const Reg32e &r, const Operand &op); +void vcvttss2usi(const Reg32e &r, const Operand &op); +void vcvtudq2pd(const Xmm &x, const Operand &op); +void vcvtudq2ps(const Xmm &x, const Operand &op); +void vcvtuqq2pd(const Xmm &x, const Operand &op); +void vcvtuqq2ps(const Xmm &x, const Operand &op); +void vcvtusi2sd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vcvtusi2ss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vdbpsadbw(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vdpbf16ps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vexp2pd(const Zmm &z, const Operand &op); +void vexp2ps(const Zmm &z, const Operand &op); +void vexpandpd(const Xmm &x, const Operand &op); +void vexpandps(const Xmm &x, const Operand &op); +void vextractf32x4(const Operand &op, const Ymm &r, uint8 imm); +void vextractf32x8(const Operand &op, const Zmm &r, uint8 imm); +void vextractf64x2(const Operand &op, const Ymm &r, uint8 imm); +void vextractf64x4(const Operand &op, const Zmm &r, uint8 imm); +void vextracti32x4(const Operand &op, const Ymm &r, uint8 imm); +void vextracti32x8(const Operand &op, const Zmm &r, uint8 imm); +void vextracti64x2(const Operand &op, const Ymm &r, uint8 imm); +void vextracti64x4(const Operand &op, const Zmm &r, uint8 imm); +void vfixupimmpd(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vfixupimmps(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vfixupimmsd(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vfixupimmss(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vfpclasspd(const Opmask &k, const Operand &op, uint8 imm); +void vfpclassps(const Opmask &k, const Operand &op, uint8 imm); +void vfpclasssd(const Opmask &k, const Operand &op, uint8 imm); +void vfpclassss(const Opmask &k, const Operand &op, uint8 imm); +void vgatherdpd(const Xmm &x, const Address &addr); +void vgatherdps(const Xmm &x, const Address &addr); +void vgatherpf0dpd(const Address &addr); +void vgatherpf0dps(const Address &addr); +void vgatherpf0qpd(const Address &addr); +void vgatherpf0qps(const Address &addr); +void vgatherpf1dpd(const Address &addr); +void vgatherpf1dps(const Address &addr); +void vgatherpf1qpd(const Address &addr); +void vgatherpf1qps(const Address &addr); +void vgatherqpd(const Xmm &x, const Address &addr); +void vgatherqps(const Xmm &x, const Address &addr); +void vgetexppd(const Xmm &x, const Operand &op); +void vgetexpps(const Xmm &x, const Operand &op); +void vgetexpsd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vgetexpss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vgetmantpd(const Xmm &x, const Operand &op, uint8 imm); +void vgetmantps(const Xmm &x, const Operand &op, uint8 imm); +void vgetmantsd(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vgetmantss(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vinsertf32x4(const Ymm &r1, const Ymm &r2, const Operand &op, uint8 imm); +void vinsertf32x8(const Zmm &r1, const Zmm &r2, const Operand &op, uint8 imm); +void vinsertf64x2(const Ymm &r1, const Ymm &r2, const Operand &op, uint8 imm); +void vinsertf64x4(const Zmm &r1, const Zmm &r2, const Operand &op, uint8 imm); +void vinserti32x4(const Ymm &r1, const Ymm &r2, const Operand &op, uint8 imm); +void vinserti32x8(const Zmm &r1, const Zmm &r2, const Operand &op, uint8 imm); +void vinserti64x2(const Ymm &r1, const Ymm &r2, const Operand &op, uint8 imm); +void vinserti64x4(const Zmm &r1, const Zmm &r2, const Operand &op, uint8 imm); +void vmovdqa32(const Address &addr, const Xmm &x); +void vmovdqa32(const Xmm &x, const Operand &op); +void vmovdqa64(const Address &addr, const Xmm &x); +void vmovdqa64(const Xmm &x, const Operand &op); +void vmovdqu16(const Address &addr, const Xmm &x); +void vmovdqu16(const Xmm &x, const Operand &op); +void vmovdqu32(const Address &addr, const Xmm &x); +void vmovdqu32(const Xmm &x, const Operand &op); +void vmovdqu64(const Address &addr, const Xmm &x); +void vmovdqu64(const Xmm &x, const Operand &op); +void vmovdqu8(const Address &addr, const Xmm &x); +void vmovdqu8(const Xmm &x, const Operand &op); +void vp2intersectd(const Opmask &k, const Xmm &x, const Operand &op); +void vp2intersectq(const Opmask &k, const Xmm &x, const Operand &op); +void vp4dpwssd(const Zmm &z1, const Zmm &z2, const Address &addr); +void vp4dpwssds(const Zmm &z1, const Zmm &z2, const Address &addr); +void vpabsq(const Xmm &x, const Operand &op); +void vpandd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpandnd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpandnq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpandq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpblendmb(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpblendmd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpblendmq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpblendmw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpbroadcastb(const Xmm &x, const Reg8 &r); +void vpbroadcastd(const Xmm &x, const Reg32 &r); +void vpbroadcastmb2q(const Xmm &x, const Opmask &k); +void vpbroadcastmw2d(const Xmm &x, const Opmask &k); +void vpbroadcastw(const Xmm &x, const Reg16 &r); +void vpcmpb(const Opmask &k, const Xmm &x, const Operand &op, uint8 imm); +void vpcmpd(const Opmask &k, const Xmm &x, const Operand &op, uint8 imm); +void vpcmpeqb(const Opmask &k, const Xmm &x, const Operand &op); +void vpcmpeqd(const Opmask &k, const Xmm &x, const Operand &op); +void vpcmpeqq(const Opmask &k, const Xmm &x, const Operand &op); +void vpcmpeqw(const Opmask &k, const Xmm &x, const Operand &op); +void vpcmpgtb(const Opmask &k, const Xmm &x, const Operand &op); +void vpcmpgtd(const Opmask &k, const Xmm &x, const Operand &op); +void vpcmpgtq(const Opmask &k, const Xmm &x, const Operand &op); +void vpcmpgtw(const Opmask &k, const Xmm &x, const Operand &op); +void vpcmpq(const Opmask &k, const Xmm &x, const Operand &op, uint8 imm); +void vpcmpub(const Opmask &k, const Xmm &x, const Operand &op, uint8 imm); +void vpcmpud(const Opmask &k, const Xmm &x, const Operand &op, uint8 imm); +void vpcmpuq(const Opmask &k, const Xmm &x, const Operand &op, uint8 imm); +void vpcmpuw(const Opmask &k, const Xmm &x, const Operand &op, uint8 imm); +void vpcmpw(const Opmask &k, const Xmm &x, const Operand &op, uint8 imm); +void vpcompressd(const Operand &op, const Xmm &x); +void vpcompressq(const Operand &op, const Xmm &x); +void vpconflictd(const Xmm &x, const Operand &op); +void vpconflictq(const Xmm &x, const Operand &op); +void vpdpbusd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpdpbusds(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpdpwssd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpdpwssds(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpermb(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpermi2b(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpermi2d(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpermi2pd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpermi2ps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpermi2q(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpermi2w(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpermt2b(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpermt2d(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpermt2pd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpermt2ps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpermt2q(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpermt2w(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpermw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpexpandb(const Xmm &x, const Operand &op); +void vpexpandd(const Xmm &x, const Operand &op); +void vpexpandq(const Xmm &x, const Operand &op); +void vpexpandw(const Xmm &x, const Operand &op); +void vpgatherdd(const Xmm &x, const Address &addr); +void vpgatherdq(const Xmm &x, const Address &addr); +void vpgatherqd(const Xmm &x, const Address &addr); +void vpgatherqq(const Xmm &x, const Address &addr); +void vplzcntd(const Xmm &x, const Operand &op); +void vplzcntq(const Xmm &x, const Operand &op); +void vpmadd52huq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpmadd52luq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpmaxsq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpmaxuq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpminsq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpminuq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpmovb2m(const Opmask &k, const Xmm &x); +void vpmovd2m(const Opmask &k, const Xmm &x); +void vpmovdb(const Operand &op, const Xmm &x); +void vpmovdw(const Operand &op, const Xmm &x); +void vpmovm2b(const Xmm &x, const Opmask &k); +void vpmovm2d(const Xmm &x, const Opmask &k); +void vpmovm2q(const Xmm &x, const Opmask &k); +void vpmovm2w(const Xmm &x, const Opmask &k); +void vpmovq2m(const Opmask &k, const Xmm &x); +void vpmovqb(const Operand &op, const Xmm &x); +void vpmovqd(const Operand &op, const Xmm &x); +void vpmovqw(const Operand &op, const Xmm &x); +void vpmovsdb(const Operand &op, const Xmm &x); +void vpmovsdw(const Operand &op, const Xmm &x); +void vpmovsqb(const Operand &op, const Xmm &x); +void vpmovsqd(const Operand &op, const Xmm &x); +void vpmovsqw(const Operand &op, const Xmm &x); +void vpmovswb(const Operand &op, const Xmm &x); +void vpmovusdb(const Operand &op, const Xmm &x); +void vpmovusdw(const Operand &op, const Xmm &x); +void vpmovusqb(const Operand &op, const Xmm &x); +void vpmovusqd(const Operand &op, const Xmm &x); +void vpmovusqw(const Operand &op, const Xmm &x); +void vpmovuswb(const Operand &op, const Xmm &x); +void vpmovw2m(const Opmask &k, const Xmm &x); +void vpmovwb(const Operand &op, const Xmm &x); +void vpmullq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpmultishiftqb(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpopcntb(const Xmm &x, const Operand &op); +void vpopcntd(const Xmm &x, const Operand &op); +void vpopcntq(const Xmm &x, const Operand &op); +void vpopcntw(const Xmm &x, const Operand &op); +void vpord(const Xmm &x1, const Xmm &x2, const Operand &op); +void vporq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vprold(const Xmm &x, const Operand &op, uint8 imm); +void vprolq(const Xmm &x, const Operand &op, uint8 imm); +void vprolvd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vprolvq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vprord(const Xmm &x, const Operand &op, uint8 imm); +void vprorq(const Xmm &x, const Operand &op, uint8 imm); +void vprorvd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vprorvq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpscatterdd(const Address &addr, const Xmm &x); +void vpscatterdq(const Address &addr, const Xmm &x); +void vpscatterqd(const Address &addr, const Xmm &x); +void vpscatterqq(const Address &addr, const Xmm &x); +void vpshldd(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vpshldq(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vpshldvd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpshldvq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpshldvw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpshldw(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vpshrdd(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vpshrdq(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vpshrdvd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpshrdvq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpshrdvw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpshrdw(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vpshufbitqmb(const Opmask &k, const Xmm &x, const Operand &op); +void vpsllvw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsraq(const Xmm &x, const Operand &op, uint8 imm); +void vpsraq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsravq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsravw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpsrlvw(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpternlogd(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vpternlogq(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vptestmb(const Opmask &k, const Xmm &x, const Operand &op); +void vptestmd(const Opmask &k, const Xmm &x, const Operand &op); +void vptestmq(const Opmask &k, const Xmm &x, const Operand &op); +void vptestmw(const Opmask &k, const Xmm &x, const Operand &op); +void vptestnmb(const Opmask &k, const Xmm &x, const Operand &op); +void vptestnmd(const Opmask &k, const Xmm &x, const Operand &op); +void vptestnmq(const Opmask &k, const Xmm &x, const Operand &op); +void vptestnmw(const Opmask &k, const Xmm &x, const Operand &op); +void vpxord(const Xmm &x1, const Xmm &x2, const Operand &op); +void vpxorq(const Xmm &x1, const Xmm &x2, const Operand &op); +void vrangepd(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vrangeps(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vrangesd(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vrangess(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vrcp14pd(const Xmm &x, const Operand &op); +void vrcp14ps(const Xmm &x, const Operand &op); +void vrcp14sd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vrcp14ss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vrcp28pd(const Zmm &z, const Operand &op); +void vrcp28ps(const Zmm &z, const Operand &op); +void vrcp28sd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vrcp28ss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vreducepd(const Xmm &x, const Operand &op, uint8 imm); +void vreduceps(const Xmm &x, const Operand &op, uint8 imm); +void vreducesd(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vreducess(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vrndscalepd(const Xmm &x, const Operand &op, uint8 imm); +void vrndscaleps(const Xmm &x, const Operand &op, uint8 imm); +void vrndscalesd(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vrndscaless(const Xmm &x1, const Xmm &x2, const Operand &op, uint8 imm); +void vrsqrt14pd(const Xmm &x, const Operand &op); +void vrsqrt14ps(const Xmm &x, const Operand &op); +void vrsqrt14sd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vrsqrt14ss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vrsqrt28pd(const Zmm &z, const Operand &op); +void vrsqrt28ps(const Zmm &z, const Operand &op); +void vrsqrt28sd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vrsqrt28ss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vscalefpd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vscalefps(const Xmm &x1, const Xmm &x2, const Operand &op); +void vscalefsd(const Xmm &x1, const Xmm &x2, const Operand &op); +void vscalefss(const Xmm &x1, const Xmm &x2, const Operand &op); +void vscatterdpd(const Address &addr, const Xmm &x); +void vscatterdps(const Address &addr, const Xmm &x); +void vscatterpf0dpd(const Address &addr); +void vscatterpf0dps(const Address &addr); +void vscatterpf0qpd(const Address &addr); +void vscatterpf0qps(const Address &addr); +void vscatterpf1dpd(const Address &addr); +void vscatterpf1dps(const Address &addr); +void vscatterpf1qpd(const Address &addr); +void vscatterpf1qps(const Address &addr); +void vscatterqpd(const Address &addr, const Xmm &x); +void vscatterqps(const Address &addr, const Xmm &x); +void vshuff32x4(const Ymm &y1, const Ymm &y2, const Operand &op, uint8 imm); +void vshuff64x2(const Ymm &y1, const Ymm &y2, const Operand &op, uint8 imm); +void vshufi32x4(const Ymm &y1, const Ymm &y2, const Operand &op, uint8 imm); +void vshufi64x2(const Ymm &y1, const Ymm &y2, const Operand &op, uint8 imm); +void kmovq(const Opmask &k, const Reg64 &r); +void kmovq(const Reg64 &r, const Opmask &k); +void vpbroadcastq(const Xmm &x, const Reg64 &r); diff --git a/translator/include/xbyak_translator_aarch64/xbyak_translator.h b/translator/include/xbyak_translator_aarch64/xbyak_translator.h index a895d60c..fd663c68 100644 --- a/translator/include/xbyak_translator_aarch64/xbyak_translator.h +++ b/translator/include/xbyak_translator_aarch64/xbyak_translator.h @@ -321,7 +321,7 @@ unsigned int xt_push_zreg(xt_a64fx_operands_struct_t *a64) { xa_->sub(xa_->sp, xa_->sp, NUM_BYTES_Z_REG); xa_->mov(X_TMP_0, xa_->sp); xa_->str(xa::ZReg(i), xa::ptr(X_TMP_0)); -#else //#ifdef XT_AARCH64_STACK_REG +#else //#ifdef XT_AARCH64_STACK_REG xa_->sub(X_TRANSLATOR_STACK, X_TRANSLATOR_STACK, NUM_BYTES_Z_REG); xa_->str(xa::ZReg(i), xa::ptr(X_TRANSLATOR_STACK)); #endif //#ifdef XT_AARCH64_STACK_REG @@ -364,7 +364,7 @@ unsigned int xt_push_zreg(xt_a64fx_operands_structV3_t *a64) { xa_->mov(X_TMP_0, xa_->sp); xa_->str(xa::ZReg(i), xa::ptr(X_TMP_0)); -#else //#ifdef XT_AARCH64_STACK_REG +#else //#ifdef XT_AARCH64_STACK_REG xa_->sub(X_TRANSLATOR_STACK, X_TRANSLATOR_STACK, NUM_BYTES_Z_REG); xa_->str(xa::ZReg(i), xa::ptr(X_TRANSLATOR_STACK)); #endif //#ifdef XT_AARCH64_STACK_REG @@ -397,7 +397,7 @@ unsigned int xt_push_preg(xt_a64fx_operands_struct_t *a64) { xa_->sub(xa_->sp, xa_->sp, NUM_BYTES_PRED_REG); xa_->mov(X_TMP_0, xa_->sp); xa_->str(xa::PReg(i), xa::ptr(X_TMP_0)); -#else //#ifdef XT_AARCH64_STACK_REG +#else //#ifdef XT_AARCH64_STACK_REG xa_->sub(X_TRANSLATOR_STACK, X_TRANSLATOR_STACK, NUM_BYTES_PRED_REG); xa_->str(xa::PReg(i), xa::ptr(X_TRANSLATOR_STACK)); #endif //#ifdef XT_AARCH64_STACK_REG @@ -441,7 +441,7 @@ unsigned int xt_push_preg(xt_a64fx_operands_structV3_t *a64) { xa_->sub(xa_->sp, xa_->sp, NUM_BYTES_PRED_REG); xa_->mov(X_TMP_0, xa_->sp); xa_->str(xa::PReg(i), xa::ptr(X_TMP_0)); -#else //#ifdef XT_AARCH64_STACK_REG +#else //#ifdef XT_AARCH64_STACK_REG xa_->sub(X_TRANSLATOR_STACK, X_TRANSLATOR_STACK, NUM_BYTES_PRED_REG); xa_->str(xa::PReg(i), xa::ptr(X_TRANSLATOR_STACK)); #endif //#ifdef XT_AARCH64_STACK_REG @@ -472,7 +472,7 @@ void xt_pop_zreg() { xa_->mov(X_TMP_0, xa_->sp); xa_->ldr(xa::ZReg(i), xa::ptr(X_TMP_0)); xa_->add(xa_->sp, xa_->sp, NUM_BYTES_Z_REG); -#else //#ifdef XT_AARCH64_STACK_REG +#else //#ifdef XT_AARCH64_STACK_REG xa_->ldr(xa::ZReg(i), xa::ptr(X_TRANSLATOR_STACK)); xa_->add(X_TRANSLATOR_STACK, X_TRANSLATOR_STACK, NUM_BYTES_Z_REG); #endif //#ifdef XT_AARCH64_STACK_REG @@ -501,7 +501,7 @@ void xt_pop_preg() { xa_->mov(X_TMP_0, xa_->sp); xa_->ldr(xa::PReg(i), xa::ptr(X_TMP_0)); xa_->add(xa_->sp, xa_->sp, NUM_BYTES_PRED_REG); -#else //#ifdef XT_AARCH64_STACK_REG +#else //#ifdef XT_AARCH64_STACK_REG xa_->ldr(xa::PReg(i), xa::ptr(X_TRANSLATOR_STACK)); xa_->add(X_TRANSLATOR_STACK, X_TRANSLATOR_STACK, NUM_BYTES_PRED_REG); #endif //#ifdef XT_AARCH64_STACK_REG @@ -1219,7 +1219,7 @@ void decodeAndTransToAArch64(xt_cmp_x86_64_t cmp_mode, const Label &label) { break; } } -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 void decodeAndTransToAArch64() {} #endif //#ifdef XBYAK_TRANSLATE_AARCH64 diff --git a/translator/src/xbyak_impl.h b/translator/src/xbyak_impl.h index f71754f4..bb18ec9c 100644 --- a/translator/src/xbyak_impl.h +++ b/translator/src/xbyak_impl.h @@ -36,8 +36,10 @@ void Xbyak::CodeGenerator::vex(const Reg ®, const Reg &base, db(0xC5); db((r ? 0 : 0x80) | vvvv); } else { - uint32 mmmm = - (type & T_0F) ? 1 : (type & T_0F38) ? 2 : (type & T_0F3A) ? 3 : 0; + uint32 mmmm = (type & T_0F) ? 1 + : (type & T_0F38) ? 2 + : (type & T_0F3A) ? 3 + : 0; db(0xC4); db((r ? 0 : 0x80) | (x ? 0 : 0x40) | (b ? 0 : 0x20) | mmmm); db((w << 7) | vvvv); @@ -197,8 +199,10 @@ void Xbyak::CodeGenerator::opFpuMem(const Address &addr, uint8 m16, uint8 m32, uint8 m64, uint8 ext, uint8 m64ext) { if (addr.is64bitDisp()) throw Error(ERR_CANT_USE_64BIT_DISP); - uint8 code = - addr.isBit(16) ? m16 : addr.isBit(32) ? m32 : addr.isBit(64) ? m64 : 0; + uint8 code = addr.isBit(16) ? m16 + : addr.isBit(32) ? m32 + : addr.isBit(64) ? m64 + : 0; if (!code) throw Error(ERR_BAD_MEM_SIZE); if (m64ext && addr.isBit(64)) diff --git a/translator/tests/pattern/jb/jb000.cpp b/translator/tests/pattern/jb/jb000.cpp index 0b3de43a..d5f613b0 100644 --- a/translator/tests/pattern/jb/jb000.cpp +++ b/translator/tests/pattern/jb/jb000.cpp @@ -60,7 +60,7 @@ class TestPtnGenerator : public TestGenerator { L(label_vec[n]); #ifdef XBYAK_TRANSLATE_AARCH64 xa_->lsl(x0, x0, 1); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 shl(rax, 1); #endif //#ifdef XBYAK_TRANSLATE_AARCH64 n++; diff --git a/translator/tests/pattern/jbe/jbe000.cpp b/translator/tests/pattern/jbe/jbe000.cpp index 4f4b5e6e..ae76d578 100644 --- a/translator/tests/pattern/jbe/jbe000.cpp +++ b/translator/tests/pattern/jbe/jbe000.cpp @@ -60,7 +60,7 @@ class TestPtnGenerator : public TestGenerator { L(label_vec[n]); #ifdef XBYAK_TRANSLATE_AARCH64 xa_->lsl(x0, x0, 1); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 shl(rax, 1); #endif //#ifdef XBYAK_TRANSLATE_AARCH64 n++; diff --git a/translator/tests/pattern/je/je000.cpp b/translator/tests/pattern/je/je000.cpp index 5ba214de..583e9cc7 100644 --- a/translator/tests/pattern/je/je000.cpp +++ b/translator/tests/pattern/je/je000.cpp @@ -60,7 +60,7 @@ class TestPtnGenerator : public TestGenerator { L(label_vec[n]); #ifdef XBYAK_TRANSLATE_AARCH64 xa_->lsl(x0, x0, 1); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 shl(rax, 1); #endif //#ifdef XBYAK_TRANSLATE_AARCH64 n++; diff --git a/translator/tests/pattern/jg/jg000.cpp b/translator/tests/pattern/jg/jg000.cpp index da2ddfbb..d2724666 100644 --- a/translator/tests/pattern/jg/jg000.cpp +++ b/translator/tests/pattern/jg/jg000.cpp @@ -60,7 +60,7 @@ class TestPtnGenerator : public TestGenerator { L(label_vec[n]); #ifdef XBYAK_TRANSLATE_AARCH64 xa_->lsl(x0, x0, 1); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 shl(rax, 1); #endif //#ifdef XBYAK_TRANSLATE_AARCH64 n++; diff --git a/translator/tests/pattern/jge/jge000.cpp b/translator/tests/pattern/jge/jge000.cpp index f58f3d8c..4a246fa6 100644 --- a/translator/tests/pattern/jge/jge000.cpp +++ b/translator/tests/pattern/jge/jge000.cpp @@ -60,7 +60,7 @@ class TestPtnGenerator : public TestGenerator { L(label_vec[n]); #ifdef XBYAK_TRANSLATE_AARCH64 xa_->lsl(x0, x0, 1); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 shl(rax, 1); #endif //#ifdef XBYAK_TRANSLATE_AARCH64 n++; diff --git a/translator/tests/pattern/jl/jl000.cpp b/translator/tests/pattern/jl/jl000.cpp index 7e70e198..81436897 100644 --- a/translator/tests/pattern/jl/jl000.cpp +++ b/translator/tests/pattern/jl/jl000.cpp @@ -60,7 +60,7 @@ class TestPtnGenerator : public TestGenerator { L(label_vec[n]); #ifdef XBYAK_TRANSLATE_AARCH64 xa_->lsl(x0, x0, 1); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 shl(rax, 1); #endif //#ifdef XBYAK_TRANSLATE_AARCH64 n++; diff --git a/translator/tests/pattern/jle/jle000.cpp b/translator/tests/pattern/jle/jle000.cpp index c4cb7973..f42d40ab 100644 --- a/translator/tests/pattern/jle/jle000.cpp +++ b/translator/tests/pattern/jle/jle000.cpp @@ -60,7 +60,7 @@ class TestPtnGenerator : public TestGenerator { L(label_vec[n]); #ifdef XBYAK_TRANSLATE_AARCH64 xa_->lsl(x0, x0, 1); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 shl(rax, 1); #endif //#ifdef XBYAK_TRANSLATE_AARCH64 n++; diff --git a/translator/tests/pattern/jne/jne000.cpp b/translator/tests/pattern/jne/jne000.cpp index 6568ecaf..549efa65 100644 --- a/translator/tests/pattern/jne/jne000.cpp +++ b/translator/tests/pattern/jne/jne000.cpp @@ -60,7 +60,7 @@ class TestPtnGenerator : public TestGenerator { L(label_vec[n]); #ifdef XBYAK_TRANSLATE_AARCH64 xa_->lsl(x0, x0, 1); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 shl(rax, 1); #endif //#ifdef XBYAK_TRANSLATE_AARCH64 n++; diff --git a/translator/tests/pattern/jnz/jnz000.cpp b/translator/tests/pattern/jnz/jnz000.cpp index 24909f15..5572b3e5 100644 --- a/translator/tests/pattern/jnz/jnz000.cpp +++ b/translator/tests/pattern/jnz/jnz000.cpp @@ -60,7 +60,7 @@ class TestPtnGenerator : public TestGenerator { L(label_vec[n]); #ifdef XBYAK_TRANSLATE_AARCH64 xa_->lsl(x0, x0, 1); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 shl(rax, 1); #endif //#ifdef XBYAK_TRANSLATE_AARCH64 n++; diff --git a/translator/tests/pattern/jz/jz000.cpp b/translator/tests/pattern/jz/jz000.cpp index 045c5a21..64a98349 100644 --- a/translator/tests/pattern/jz/jz000.cpp +++ b/translator/tests/pattern/jz/jz000.cpp @@ -60,7 +60,7 @@ class TestPtnGenerator : public TestGenerator { L(label_vec[n]); #ifdef XBYAK_TRANSLATE_AARCH64 xa_->lsl(x0, x0, 1); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 shl(rax, 1); #endif //#ifdef XBYAK_TRANSLATE_AARCH64 n++; diff --git a/translator/tests/pattern/ktestq/ktestq000.cpp b/translator/tests/pattern/ktestq/ktestq000.cpp index c0e7dba3..a1f82246 100644 --- a/translator/tests/pattern/ktestq/ktestq000.cpp +++ b/translator/tests/pattern/ktestq/ktestq000.cpp @@ -61,7 +61,7 @@ class TestPtnGenerator : public TestGenerator { xa_->mov_imm(x_cf, 1 << 0); Reg64 r_addr{rdx}; Reg64 r_tmpAddr{rcx}; -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 Reg64 r_of{rdi}; Reg64 r_sf{rsi}; Reg64 r_zf{rbp}; @@ -132,7 +132,7 @@ class TestPtnGenerator : public TestGenerator { xa_->str(x_dummyFlag, Xbyak_aarch64::ptr(x_tmpAddr)); xa_->add(x_tmpAddr, x_tmpAddr, 4); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 pushf(); // eflags is stored on statck. pop(r_tmpFlag); // eflags is read from stack. and_(r_tmpFlag, r_flagMask); diff --git a/translator/tests/pattern/test/test000.cpp b/translator/tests/pattern/test/test000.cpp index 418d1d97..31a46adb 100644 --- a/translator/tests/pattern/test/test000.cpp +++ b/translator/tests/pattern/test/test000.cpp @@ -61,7 +61,7 @@ class TestPtnGenerator : public TestGenerator { xa_->mov_imm(x_cf, 1 << 0); Reg64 r_addr{rdx}; Reg64 r_tmpAddr{rcx}; -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 Reg64 r_of{rdi}; Reg64 r_sf{rsi}; Reg64 r_zf{rbp}; @@ -142,7 +142,7 @@ class TestPtnGenerator : public TestGenerator { xa_->str(x_dummyFlag, Xbyak_aarch64::ptr(x_tmpAddr)); xa_->add(x_tmpAddr, x_tmpAddr, 8); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 pushf(); // eflags is stored on statck. pop(r_tmpFlag); // eflags is read from stack. and_(r_tmpFlag, r_flagMask); diff --git a/translator/tests/pattern/test/test001.cpp b/translator/tests/pattern/test/test001.cpp index 3d935e91..b783158c 100644 --- a/translator/tests/pattern/test/test001.cpp +++ b/translator/tests/pattern/test/test001.cpp @@ -66,7 +66,7 @@ class TestPtnGenerator : public TestGenerator { xa_->mov_imm(x_cf, 1 << 0); Reg64 r_addr{rdx}; Reg64 r_tmpAddr{rcx}; -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 Reg64 r_of{rdi}; Reg64 r_sf{rsi}; Reg64 r_zf{rbp}; @@ -147,7 +147,7 @@ class TestPtnGenerator : public TestGenerator { xa_->str(x_dummyFlag, Xbyak_aarch64::ptr(x_tmpAddr)); xa_->add(x_tmpAddr, x_tmpAddr, 8); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 pushf(); // eflags is stored on statck. pop(r_tmpFlag); // eflags is read from stack. and_(r_tmpFlag, r_flagMask); diff --git a/translator/tests/pattern/test/test002.cpp b/translator/tests/pattern/test/test002.cpp index 350ce34c..48c11267 100644 --- a/translator/tests/pattern/test/test002.cpp +++ b/translator/tests/pattern/test/test002.cpp @@ -65,7 +65,7 @@ class TestPtnGenerator : public TestGenerator { xa_->mov_imm(x_cf, 1 << 0); Reg64 r_addr{rdx}; Reg64 r_tmpAddr{rcx}; -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 Reg64 r_of{rdi}; Reg64 r_sf{rsi}; Reg64 r_zf{rbp}; @@ -146,7 +146,7 @@ class TestPtnGenerator : public TestGenerator { xa_->str(x_dummyFlag, Xbyak_aarch64::ptr(x_tmpAddr)); xa_->add(x_tmpAddr, x_tmpAddr, 8); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 pushf(); // eflags is stored on statck. pop(r_tmpFlag); // eflags is read from stack. and_(r_tmpFlag, r_flagMask); diff --git a/translator/tests/pattern/test/test002_1.cpp b/translator/tests/pattern/test/test002_1.cpp index 558ac5d6..62b04849 100644 --- a/translator/tests/pattern/test/test002_1.cpp +++ b/translator/tests/pattern/test/test002_1.cpp @@ -65,7 +65,7 @@ class TestPtnGenerator : public TestGenerator { xa_->mov_imm(x_cf, 1 << 0); Reg64 r_addr{rdx}; Reg64 r_tmpAddr{rcx}; -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 Reg64 r_of{rdi}; Reg64 r_sf{rsi}; Reg64 r_zf{rbp}; @@ -146,7 +146,7 @@ class TestPtnGenerator : public TestGenerator { xa_->str(x_dummyFlag, Xbyak_aarch64::ptr(x_tmpAddr)); xa_->add(x_tmpAddr, x_tmpAddr, 8); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 pushf(); // eflags is stored on statck. pop(r_tmpFlag); // eflags is read from stack. and_(r_tmpFlag, r_flagMask); diff --git a/translator/tests/pattern/test/test003.cpp b/translator/tests/pattern/test/test003.cpp index c4e0c4fa..7d50b4f5 100644 --- a/translator/tests/pattern/test/test003.cpp +++ b/translator/tests/pattern/test/test003.cpp @@ -65,7 +65,7 @@ class TestPtnGenerator : public TestGenerator { xa_->mov_imm(x_cf, 1 << 0); Reg64 r_addr{rdx}; Reg64 r_tmpAddr{rcx}; -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 Reg64 r_of{rdi}; Reg64 r_sf{rsi}; Reg64 r_zf{rbp}; @@ -146,7 +146,7 @@ class TestPtnGenerator : public TestGenerator { xa_->str(x_dummyFlag, Xbyak_aarch64::ptr(x_tmpAddr)); xa_->add(x_tmpAddr, x_tmpAddr, 8); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 pushf(); // eflags is stored on statck. pop(r_tmpFlag); // eflags is read from stack. and_(r_tmpFlag, r_flagMask); diff --git a/translator/tests/pattern/test/test003_1.cpp b/translator/tests/pattern/test/test003_1.cpp index 558ac5d6..62b04849 100644 --- a/translator/tests/pattern/test/test003_1.cpp +++ b/translator/tests/pattern/test/test003_1.cpp @@ -65,7 +65,7 @@ class TestPtnGenerator : public TestGenerator { xa_->mov_imm(x_cf, 1 << 0); Reg64 r_addr{rdx}; Reg64 r_tmpAddr{rcx}; -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 Reg64 r_of{rdi}; Reg64 r_sf{rsi}; Reg64 r_zf{rbp}; @@ -146,7 +146,7 @@ class TestPtnGenerator : public TestGenerator { xa_->str(x_dummyFlag, Xbyak_aarch64::ptr(x_tmpAddr)); xa_->add(x_tmpAddr, x_tmpAddr, 8); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 pushf(); // eflags is stored on statck. pop(r_tmpFlag); // eflags is read from stack. and_(r_tmpFlag, r_flagMask); diff --git a/translator/tests/pattern/test/test004.cpp b/translator/tests/pattern/test/test004.cpp index cddf241e..b9c9b3e7 100644 --- a/translator/tests/pattern/test/test004.cpp +++ b/translator/tests/pattern/test/test004.cpp @@ -63,7 +63,7 @@ class TestPtnGenerator : public TestGenerator { xa_->mov_imm(x_cf, 1 << 0); Reg64 r_addr{rdx}; Reg64 r_tmpAddr{rcx}; -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 Reg64 r_of{rdi}; Reg64 r_sf{rsi}; Reg64 r_zf{rbp}; @@ -144,7 +144,7 @@ class TestPtnGenerator : public TestGenerator { xa_->str(x_dummyFlag, Xbyak_aarch64::ptr(x_tmpAddr)); xa_->add(x_tmpAddr, x_tmpAddr, 8); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 pushf(); // eflags is stored on statck. pop(r_tmpFlag); // eflags is read from stack. and_(r_tmpFlag, r_flagMask); diff --git a/translator/tests/pattern/vtestps/vtestps000.cpp b/translator/tests/pattern/vtestps/vtestps000.cpp index 8cb6ca3b..fea4ca58 100644 --- a/translator/tests/pattern/vtestps/vtestps000.cpp +++ b/translator/tests/pattern/vtestps/vtestps000.cpp @@ -101,7 +101,7 @@ class TestPtnGenerator : public TestGenerator { xa_->mov_imm(x_cf, 1 << 0); Reg64 r_addr{rdx}; Reg64 r_tmpAddr{rcx}; -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 Reg64 r_of{rdi}; Reg64 r_sf{rsi}; Reg64 r_zf{rbp}; @@ -172,7 +172,7 @@ class TestPtnGenerator : public TestGenerator { xa_->str(x_dummyFlag, Xbyak_aarch64::ptr(x_tmpAddr)); xa_->add(x_tmpAddr, x_tmpAddr, 4); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 pushf(); // eflags is stored on statck. pop(r_tmpFlag); // eflags is read from stack. and_(r_tmpFlag, r_flagMask); diff --git a/translator/tests/pattern/vtestps/vtestps001.cpp b/translator/tests/pattern/vtestps/vtestps001.cpp index c71dc3ee..414ebbcf 100644 --- a/translator/tests/pattern/vtestps/vtestps001.cpp +++ b/translator/tests/pattern/vtestps/vtestps001.cpp @@ -101,7 +101,7 @@ class TestPtnGenerator : public TestGenerator { xa_->mov_imm(x_cf, 1 << 0); Reg64 r_addr{rdx}; Reg64 r_tmpAddr{rcx}; -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 Reg64 r_of{rdi}; Reg64 r_sf{rsi}; Reg64 r_zf{rbp}; @@ -172,7 +172,7 @@ class TestPtnGenerator : public TestGenerator { xa_->str(x_dummyFlag, Xbyak_aarch64::ptr(x_tmpAddr)); xa_->add(x_tmpAddr, x_tmpAddr, 4); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 pushf(); // eflags is stored on statck. pop(r_tmpFlag); // eflags is read from stack. and_(r_tmpFlag, r_flagMask); diff --git a/translator/tests/pattern/vtestps/vtestps002.cpp b/translator/tests/pattern/vtestps/vtestps002.cpp index 7f601311..e441d646 100644 --- a/translator/tests/pattern/vtestps/vtestps002.cpp +++ b/translator/tests/pattern/vtestps/vtestps002.cpp @@ -101,7 +101,7 @@ class TestPtnGenerator : public TestGenerator { xa_->mov_imm(x_cf, 1 << 0); Reg64 r_addr{rdx}; Reg64 r_tmpAddr{rcx}; -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 Reg64 r_of{rdi}; Reg64 r_sf{rsi}; Reg64 r_zf{rbp}; @@ -175,7 +175,7 @@ class TestPtnGenerator : public TestGenerator { xa_->str(x_dummyFlag, Xbyak_aarch64::ptr(x_tmpAddr)); xa_->add(x_tmpAddr, x_tmpAddr, 4); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 pushf(); // eflags is stored on statck. pop(r_tmpFlag); // eflags is read from stack. and_(r_tmpFlag, r_flagMask); diff --git a/translator/tests/pattern/vtestps/vtestps003.cpp b/translator/tests/pattern/vtestps/vtestps003.cpp index 2a71ac5b..f10a2d6b 100644 --- a/translator/tests/pattern/vtestps/vtestps003.cpp +++ b/translator/tests/pattern/vtestps/vtestps003.cpp @@ -101,7 +101,7 @@ class TestPtnGenerator : public TestGenerator { xa_->mov_imm(x_cf, 1 << 0); Reg64 r_addr{rdx}; Reg64 r_tmpAddr{rcx}; -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 Reg64 r_of{rdi}; Reg64 r_sf{rsi}; Reg64 r_zf{rbp}; @@ -175,7 +175,7 @@ class TestPtnGenerator : public TestGenerator { xa_->str(x_dummyFlag, Xbyak_aarch64::ptr(x_tmpAddr)); xa_->add(x_tmpAddr, x_tmpAddr, 4); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 pushf(); // eflags is stored on statck. pop(r_tmpFlag); // eflags is read from stack. and_(r_tmpFlag, r_flagMask); diff --git a/translator/tests/test_generator.h b/translator/tests/test_generator.h index 35ffaa3f..8304dd60 100644 --- a/translator/tests/test_generator.h +++ b/translator/tests/test_generator.h @@ -73,7 +73,7 @@ constexpr Xbyak_aarch64::Operand::Code callee_saved_gregs[] = { xa::Operand::Code::X25, xa::Operand::Code::X26, xa::Operand::Code::X27, xa::Operand::Code::X28, }; -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 constexpr Xbyak::Operand::Code callee_saved_gregs[] = { Xbyak::Operand::R12, Xbyak::Operand::R13, Xbyak::Operand::R14, Xbyak::Operand::R15, Xbyak::Operand::RBX, Xbyak::Operand::RBP, @@ -206,7 +206,7 @@ class TestGenerator : public CodeGenerator { } xa_->mov_imm(x0, reinterpret_cast(inputGenReg)); ldp(Xbyak_aarch64::XReg(0), Xbyak_aarch64::XReg(1), Xbyak_aarch64::ptr(x0)); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 mov(rax, reinterpret_cast(inputGenReg) + 8); for (int i = 1; i < NUM_GEN_REG_INTEL; i++) { @@ -241,7 +241,7 @@ class TestGenerator : public CodeGenerator { Xbyak_aarch64::post_ptr(xa_->sp, 16)); // pop data of x0, x1 stp(x2, x3, Xbyak_aarch64::ptr(x0)); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 push(rax); mov(rax, reinterpret_cast(outputGenReg) + 8); @@ -269,7 +269,7 @@ class TestGenerator : public CodeGenerator { } ldp(x0, x1, Xbyak_aarch64::post_ptr(xa_->sp, 16)); // pop x0, x1 -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 push(r8); mov(r8, reinterpret_cast(inputPredReg)); @@ -293,7 +293,7 @@ class TestGenerator : public CodeGenerator { } ldp(x0, x1, Xbyak_aarch64::post_ptr(xa_->sp, 16)); // pop x0, x1 -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 push(r8); mov(r8, reinterpret_cast(outputPredReg)); @@ -317,7 +317,7 @@ class TestGenerator : public CodeGenerator { } ldp(x0, x1, Xbyak_aarch64::post_ptr(xa_->sp, 16)); // pop x0, x1 -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 push(r8); mov(r8, reinterpret_cast(inputZReg)); @@ -341,7 +341,7 @@ class TestGenerator : public CodeGenerator { } ldp(x0, x1, Xbyak_aarch64::post_ptr(xa_->sp, 16)); // pop x0, x1 -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 push(r8); mov(r8, reinterpret_cast(outputZReg)); @@ -802,9 +802,9 @@ class TestGenerator : public CodeGenerator { } else { std::cout << checkNG; } -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 std::cout << checkOK; -#endif //#ifdef XBYAK_TRANSLATE_AARCH64 +#endif //#ifdef XBYAK_TRANSLATE_AARCH64 } else if (mode == NO_CHECK) { /* No need to compare */ std::cout << checkIgnore; } else { /* Something wrong */ diff --git a/translator/tests/test_generator2.h b/translator/tests/test_generator2.h index 06a0266d..a3370540 100644 --- a/translator/tests/test_generator2.h +++ b/translator/tests/test_generator2.h @@ -38,7 +38,7 @@ #ifdef __ARM_ARCH inline uint32_t get_fpcr() { uint64_t x; - asm __volatile__("mrs %[x], fpcr" : [ x ] "=r"(x)); + asm __volatile__("mrs %[x], fpcr" : [x] "=r"(x)); return x; } inline void set_fpcr(uint32_t x) { @@ -96,7 +96,7 @@ constexpr Xbyak_aarch64::Operand::Code callee_saved_gregs[] = { xa::Operand::Code::X25, xa::Operand::Code::X26, xa::Operand::Code::X27, xa::Operand::Code::X28, }; -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 constexpr Xbyak::Operand::Code callee_saved_gregs[] = { Xbyak::Operand::R12, Xbyak::Operand::R13, Xbyak::Operand::R14, Xbyak::Operand::R15, Xbyak::Operand::RBX, Xbyak::Operand::RBP, @@ -301,7 +301,7 @@ class TestGenerator : public CodeGenerator { } xa_->mov_imm(x0, reinterpret_cast(inputGenReg)); ldp(Xbyak_aarch64::XReg(0), Xbyak_aarch64::XReg(1), Xbyak_aarch64::ptr(x0)); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 mov(rax, reinterpret_cast(inputGenReg) + 8); for (int i = 1; i < NUM_GEN_REG_INTEL; i++) { @@ -336,7 +336,7 @@ class TestGenerator : public CodeGenerator { Xbyak_aarch64::post_ptr(xa_->sp, 16)); // pop data of x0, x1 stp(x2, x3, Xbyak_aarch64::ptr(x0)); -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 push(rax); mov(rax, reinterpret_cast(outputGenReg) + 8); @@ -364,7 +364,7 @@ class TestGenerator : public CodeGenerator { } ldp(x0, x1, Xbyak_aarch64::post_ptr(xa_->sp, 16)); // pop x0, x1 -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 push(r8); mov(r8, reinterpret_cast(inputPredReg)); @@ -388,7 +388,7 @@ class TestGenerator : public CodeGenerator { } ldp(x0, x1, Xbyak_aarch64::post_ptr(xa_->sp, 16)); // pop x0, x1 -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 push(r8); mov(r8, reinterpret_cast(outputPredReg)); @@ -412,7 +412,7 @@ class TestGenerator : public CodeGenerator { } ldp(x0, x1, Xbyak_aarch64::post_ptr(xa_->sp, 16)); // pop x0, x1 -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 push(r8); mov(r8, reinterpret_cast(inputZReg)); @@ -436,7 +436,7 @@ class TestGenerator : public CodeGenerator { } ldp(x0, x1, Xbyak_aarch64::post_ptr(xa_->sp, 16)); // pop x0, x1 -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 push(r8); mov(r8, reinterpret_cast(outputZReg)); @@ -954,9 +954,9 @@ class TestGenerator : public CodeGenerator { } else { std::cout << checkNG; } -#else //#ifdef XBYAK_TRANSLATE_AARCH64 +#else //#ifdef XBYAK_TRANSLATE_AARCH64 std::cout << checkOK; -#endif //#ifdef XBYAK_TRANSLATE_AARCH64 +#endif //#ifdef XBYAK_TRANSLATE_AARCH64 } else if (mode == NO_CHECK) { /* No need to compare */ std::cout << checkIgnore; } else { /* Something wrong */