diff options
author | MITSUNARI Shigeo <[email protected]> | 2022-11-20 11:27:19 +0900 |
---|---|---|
committer | MITSUNARI Shigeo <[email protected]> | 2022-11-20 11:27:19 +0900 |
commit | 8ae01b0c23779393df5d06f14b7e8f90fe3105a1 (patch) | |
tree | eaf6b1b8a04c9e9fbed8c66b714f5303a8a80ecb | |
parent | 83b3da21739979bd9ed507511c739a5c2007ee98 (diff) | |
download | xbyak-8ae01b0c23779393df5d06f14b7e8f90fe3105a1.tar.gz xbyak-8ae01b0c23779393df5d06f14b7e8f90fe3105a1.zip |
disable some tests on x32
-rw-r--r-- | test/Makefile | 11 | ||||
-rw-r--r-- | test/make_nm.cpp | 4 | ||||
-rw-r--r-- | test/misc.cpp | 6 |
3 files changed, 15 insertions, 6 deletions
diff --git a/test/Makefile b/test/Makefile index 0e7b889..d94b819 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 XBYAK_INC=../xbyak/xbyak.h UNAME_S=$(shell uname -s) +ifeq ($(shell dpkg --print-architecture),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,18 +84,21 @@ 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) ./test_avx512.sh endif ifeq ($(BIT),64) +ifneq ($(X32),1) ./test_avx512.sh 64 endif +endif test: $(MAKE) test_nm @@ -104,4 +112,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/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 a6acff1..6225690 100644 --- a/test/misc.cpp +++ b/test/misc.cpp @@ -105,8 +105,10 @@ CYBOZU_TEST_AUTO(mov_const) 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 } |