diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | doc/changelog.md | 1 | ||||
-rw-r--r-- | meson.build | 2 | ||||
-rw-r--r-- | readme.md | 2 | ||||
-rw-r--r-- | readme.txt | 3 | ||||
-rw-r--r-- | test/Makefile | 16 | ||||
-rw-r--r-- | test/detect_x32.c | 8 | ||||
-rw-r--r-- | test/make_nm.cpp | 4 | ||||
-rw-r--r-- | test/misc.cpp | 10 | ||||
-rw-r--r-- | xbyak/xbyak.h | 6 | ||||
-rw-r--r-- | xbyak/xbyak_mnemonic.h | 2 |
11 files changed, 39 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 26609ff..d786752 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 2.6...3.0.2) -project(xbyak LANGUAGES CXX VERSION 6.64) +project(xbyak LANGUAGES CXX VERSION 6.65) file(GLOB headers xbyak/*.h) diff --git a/doc/changelog.md b/doc/changelog.md index 67630f8..b976c90 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -1,5 +1,6 @@ # History +* 2022/Nov/22 ver 6.65 consider x32 * 2022/Nov/04 ver 6.64 some vmov* support addressing with mask * 2022/Oct/06 ver 6.63 vpmadd52{h,l}uq support AVX-IFMA * 2022/Oct/05 ver 6.63 support amx_fp16/avx_vnni_int8/avx_ne_convert and add setDefaultEncoding() diff --git a/meson.build b/meson.build index d9e89ac..971126b 100644 --- a/meson.build +++ b/meson.build @@ -5,7 +5,7 @@ project( 'xbyak', 'cpp', - version: '6.64', + version: '6.65', license: 'BSD-3-Clause', default_options: 'b_ndebug=if-release' ) @@ -1,5 +1,5 @@ -# Xbyak 6.64 [![Badge Build]][Build Status] +# Xbyak 6.65 [![Badge Build]][Build Status] *A C++ JIT assembler for x86 (IA32), x64 (AMD64, x86-64)* @@ -1,5 +1,5 @@ - C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak 6.64
+ C++用x86(IA-32), x64(AMD64, x86-64) JITアセンブラ Xbyak 6.65
-----------------------------------------------------------------------------
◎概要
@@ -402,6 +402,7 @@ sample/{echo,hello}.bfは http://www.kmonos.net/alang/etc/brainfuck.php から -----------------------------------------------------------------------------
◎履歴
+2022/11/22 ver 6.65 x32動作確認
2022/11/04 ver 6.64 vmov*命令をmaskつきアドレッシング対応修正
2022/10/06 ver 6.63 AVX-IFMA用のvpmadd52{h,l}uq対応
2022/10/05 amx_fp16/avx_vnni_int8/avx_ne_convertt対応とsetDefaultEncoding()追加
diff --git a/test/Makefile b/test/Makefile index 0e7b889..2b9bd1a 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,6 +1,9 @@ -TARGET = make_nm normalize_prefix bad_address misc cvt_test cvt_test32 noexception misc32 +TARGET = make_nm normalize_prefix bad_address misc cvt_test cvt_test32 noexception misc32 detect_x32 XBYAK_INC=../xbyak/xbyak.h UNAME_S=$(shell uname -s) +ifeq ($(shell ./detect_x32),x32) +X32=1 +endif BIT=32 ifeq ($(shell uname -m),x86_64) BIT=64 @@ -68,8 +71,10 @@ endif ./cvt_test ifeq ($(BIT),64) ./test_address.sh 64 +ifneq ($(X32),1) ./test_nm.sh 64 ./test_nm.sh Y64 +endif ./jmp64 endif @@ -79,10 +84,11 @@ ifneq ($(ONLY_64BIT),0) ./test_avx.sh Y endif ifeq ($(BIT),64) - ./test_address.sh 64 ./test_avx.sh 64 +ifneq ($(X32),1) ./test_avx.sh Y64 endif +endif test_avx512: normalize_prefix ifneq ($(ONLY_64BIT),0) @@ -92,7 +98,10 @@ ifeq ($(BIT),64) ./test_avx512.sh 64 endif -test: +detect_x32: detect_x32.c + $(CC) $< -o $@ + +test: detect_x32 $(MAKE) test_nm $(MAKE) test_avx $(MAKE) test_avx512 @@ -104,4 +113,3 @@ lib_run: lib_test.cpp lib_run.cpp lib.h $(CXX) $(CFLAGS) lib_run.cpp lib_test.cpp -o lib_run make_nm: make_nm.cpp $(XBYAK_INC) - diff --git a/test/detect_x32.c b/test/detect_x32.c new file mode 100644 index 0000000..549b8d5 --- /dev/null +++ b/test/detect_x32.c @@ -0,0 +1,8 @@ +#include <stdio.h> + +int main() +{ +#if defined(__x86_64__) && defined(__ILP32__) + puts("x32"); +#endif +} diff --git a/test/make_nm.cpp b/test/make_nm.cpp index 60a9fa7..5106bf9 100644 --- a/test/make_nm.cpp +++ b/test/make_nm.cpp @@ -1295,7 +1295,7 @@ class Test { put(p, REG64, "0x1234567890abcdefLL", "0x1234567890abcdef"); put("movbe", REG16|REG32e, MEM); put("movbe", MEM, REG16|REG32e); -#ifdef XBYAK64 +#if defined(XBYAK64) && !defined(__ILP32__) put(p, RAX|EAX|AX|AL, "ptr [0x1234567890abcdefLL]", "[qword 0x1234567890abcdef]"); put(p, "ptr [0x1234567890abcdefLL]", "[qword 0x1234567890abcdef]", RAX|EAX|AX|AL); put(p, "qword [rax], 0"); @@ -2609,7 +2609,7 @@ public: putMPX(); #endif -#ifdef XBYAK64 +#if defined(XBYAK64) && !defined(__ILP32__) #ifdef USE_YASM putRip(); diff --git a/test/misc.cpp b/test/misc.cpp index 5f7db7e..6225690 100644 --- a/test/misc.cpp +++ b/test/misc.cpp @@ -98,13 +98,17 @@ CYBOZU_TEST_AUTO(mov_const) } #ifdef XBYAK64 CYBOZU_TEST_NO_EXCEPTION(mov(rax, ptr[(void*)0x7fffffff])); - CYBOZU_TEST_EXCEPTION(mov(rax, ptr[(void*)0x17fffffff]), Xbyak::Error); + if (sizeof(void*) != 4) { // sizeof(void*) == 4 on x32 + CYBOZU_TEST_EXCEPTION(mov(rax, ptr[(void*)0x17fffffff]), Xbyak::Error); + } #ifdef XBYAK_OLD_DISP_CHECK CYBOZU_TEST_NO_EXCEPTION(mov(rax, ptr[(void*)0x80000000])); CYBOZU_TEST_NO_EXCEPTION(mov(rax, ptr[(void*)0xffffffff])); #else - CYBOZU_TEST_EXCEPTION(mov(rax, ptr[(void*)0x80000000ull]), Xbyak::Error); - CYBOZU_TEST_EXCEPTION(mov(rax, ptr[(void*)0xffffffffull]), Xbyak::Error); + if (sizeof(void*) != 4) { // sizeof(void*) == 4 on x32 + CYBOZU_TEST_EXCEPTION(mov(rax, ptr[(void*)0x80000000ull]), Xbyak::Error); + CYBOZU_TEST_EXCEPTION(mov(rax, ptr[(void*)0xffffffffull]), Xbyak::Error); + } #endif #endif } diff --git a/xbyak/xbyak.h b/xbyak/xbyak.h index 99c4ec4..2a9c031 100644 --- a/xbyak/xbyak.h +++ b/xbyak/xbyak.h @@ -155,7 +155,7 @@ namespace Xbyak { enum { DEFAULT_MAX_CODE_SIZE = 4096, - VERSION = 0x6640 /* 0xABCD = A.BC(.D) */ + VERSION = 0x6650 /* 0xABCD = A.BC(.D) */ }; #ifndef MIE_INTEGER_TYPE_DEFINED @@ -378,7 +378,7 @@ inline bool IsInInt32(uint64_t x) { return ~uint64_t(0x7fffffffu) <= x || x <= 0 inline uint32_t VerifyInInt32(uint64_t x) { -#ifdef XBYAK64 +#if defined(XBYAK64) && !defined(__ILP32__) if (!IsInInt32(x)) XBYAK_THROW_RET(ERR_OFFSET_IS_TOO_BIG, 0) #endif return static_cast<uint32_t>(x); @@ -1826,7 +1826,7 @@ private: void setSIB(const RegExp& e, int reg, int disp8N = 0) { uint64_t disp64 = e.getDisp(); -#ifdef XBYAK64 +#if defined(XBYAK64) && !defined(__ILP32__) #ifdef XBYAK_OLD_DISP_CHECK // treat 0xffffffff as 0xffffffffffffffff uint64_t high = disp64 >> 32; diff --git a/xbyak/xbyak_mnemonic.h b/xbyak/xbyak_mnemonic.h index e626915..33bd5c0 100644 --- a/xbyak/xbyak_mnemonic.h +++ b/xbyak/xbyak_mnemonic.h @@ -1,4 +1,4 @@ -const char *getVersionString() const { return "6.64"; } +const char *getVersionString() const { return "6.65"; } void adc(const Operand& op, uint32_t imm) { opRM_I(op, imm, 0x10, 2); } void adc(const Operand& op1, const Operand& op2) { opRM_RM(op1, op2, 0x10); } void adcx(const Reg32e& reg, const Operand& op) { opGen(reg, op, 0xF6, 0x66, isREG32_REG32orMEM, NONE, 0x38); } |