mirror of
https://github.com/FEX-Emu/xbyak.git
synced 2024-11-27 00:20:48 +00:00
fix test for mac
This commit is contained in:
parent
a7d10a1e4a
commit
2f6d9e3450
@ -1,10 +1,12 @@
|
||||
TARGET = test quantize bf toyvm test_util memfunc static_buf jmp_table
|
||||
XBYAK_INC=../xbyak/xbyak.h
|
||||
|
||||
BOOST_EXIST=$(shell echo "\#include <boost/spirit/core.hpp>" | (gcc -E - 2>/dev/null) | grep "boost/spirit/core.hpp" >/dev/null && echo "1")
|
||||
UNAME_M=$(shell uname -m)
|
||||
|
||||
ONLY_64BIT=0
|
||||
ifeq ($(shell uname -s),Darwin)
|
||||
ONLY_64BIT=1
|
||||
OS=mac
|
||||
ifeq ($(UNAME_M),x86_64)
|
||||
BIT=64
|
||||
endif
|
||||
@ -27,19 +29,27 @@ else
|
||||
endif
|
||||
|
||||
ifeq ($(BIT),64)
|
||||
TARGET += test64 bf64 memfunc64 test_util64 static_buf64 jmp_table64
|
||||
TARGET += test64 bf64 memfunc64 test_util64 jmp_table64
|
||||
ifeq ($(BOOST_EXIST),1)
|
||||
TARGET += calc64 #calc2_64
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(OS),mac)
|
||||
TARGET += static_buf64
|
||||
endif
|
||||
|
||||
|
||||
ifneq ($(ONLY_64BIT),1)
|
||||
TARGET += test quantize bf toyvm test_util memfunc static_buf jmp_table
|
||||
ifeq ($(BOOST_EXIST),1)
|
||||
TARGET += calc #calc2
|
||||
TARGET += calc #calc2
|
||||
endif
|
||||
endif
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
CFLAGS_WARN=-Wall -Wextra -Wformat=2 -Wcast-qual -Wcast-align -Wwrite-strings -Wfloat-equal -Wpointer-arith -pedantic
|
||||
CFLAGS_WARN=-Wall -Wextra -Wformat=2 -Wcast-qual -Wcast-align -Wwrite-strings -Wfloat-equal -Wpointer-arith #-pedantic
|
||||
|
||||
CFLAGS=-g -O2 -fomit-frame-pointer -Wall -I../ $(CFLAGS_WARN)
|
||||
|
||||
|
@ -1,9 +1,18 @@
|
||||
TARGET = make_nm normalize_prefix jmp address bad_address misc cvt_test cvt_test32
|
||||
TARGET = make_nm normalize_prefix bad_address misc cvt_test cvt_test32
|
||||
XBYAK_INC=../xbyak/xbyak.h
|
||||
UNAME_S=$(shell uname -s)
|
||||
BIT=32
|
||||
ifeq ($(shell uname -m),x86_64)
|
||||
BIT=64
|
||||
endif
|
||||
ONLY_64BIT=0
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
# 32-bit binary is not supported
|
||||
ONLY_64BIT=1
|
||||
endif
|
||||
ifeq ($(ONLY_64BIT),0)
|
||||
TARGET += jmp address
|
||||
endif
|
||||
|
||||
ifeq ($(BIT),64)
|
||||
TARGET += jmp64 address64
|
||||
@ -37,17 +46,19 @@ cvt_test: cvt_test.cpp ../xbyak/xbyak.h
|
||||
cvt_test32: cvt_test.cpp ../xbyak/xbyak.h
|
||||
$(CXX) $(CFLAGS) $< -o $@ -DXBYAK32
|
||||
|
||||
test_nm: normalize_prefix jmp bad_address $(TARGET)
|
||||
test_nm: normalize_prefix $(TARGET)
|
||||
$(MAKE) -C ../gen
|
||||
ifneq ($(ONLY_64BIT),1)
|
||||
./test_nm.sh
|
||||
./test_nm.sh Y
|
||||
./test_nm.sh avx512
|
||||
./test_address.sh
|
||||
./jmp
|
||||
./cvt_test32
|
||||
endif
|
||||
./bad_address
|
||||
./misc
|
||||
./cvt_test
|
||||
./cvt_test32
|
||||
ifeq ($(BIT),64)
|
||||
./test_address.sh 64
|
||||
./test_nm.sh 64
|
||||
@ -56,8 +67,10 @@ ifeq ($(BIT),64)
|
||||
endif
|
||||
|
||||
test_avx: normalize_prefix
|
||||
ifneq ($(ONLY_64BIT),0)
|
||||
./test_avx.sh
|
||||
./test_avx.sh Y
|
||||
endif
|
||||
ifeq ($(BIT),64)
|
||||
./test_address.sh 64
|
||||
./test_avx.sh 64
|
||||
@ -65,7 +78,9 @@ ifeq ($(BIT),64)
|
||||
endif
|
||||
|
||||
test_avx512: normalize_prefix
|
||||
ifneq ($(ONLY_64BIT),0)
|
||||
./test_avx512.sh
|
||||
endif
|
||||
ifeq ($(BIT),64)
|
||||
./test_avx512.sh 64
|
||||
endif
|
||||
|
@ -428,6 +428,7 @@ CYBOZU_TEST_AUTO(test4)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef __APPLE__
|
||||
CYBOZU_TEST_AUTO(test5)
|
||||
{
|
||||
struct Test5 : Xbyak::CodeGenerator {
|
||||
@ -475,6 +476,7 @@ CYBOZU_TEST_AUTO(test5)
|
||||
gm.assign((const char*)gc.getCode(), gc.getSize());
|
||||
CYBOZU_TEST_EQUAL(fm, gm);
|
||||
}
|
||||
#endif
|
||||
|
||||
size_t getValue(const uint8* p)
|
||||
{
|
||||
@ -1217,11 +1219,11 @@ CYBOZU_TEST_AUTO(rip_jmp)
|
||||
CYBOZU_TEST_EQUAL(ret, ret1234() + ret9999());
|
||||
}
|
||||
|
||||
#ifdef XBYAK64_GCC
|
||||
#if 0
|
||||
CYBOZU_TEST_AUTO(rip_addr)
|
||||
{
|
||||
/*
|
||||
assume |&x - &code| < 2GiB
|
||||
we can't assume |&x - &code| < 2GiB anymore
|
||||
*/
|
||||
static int x = 5;
|
||||
struct Code : Xbyak::CodeGenerator {
|
||||
@ -1236,6 +1238,8 @@ CYBOZU_TEST_AUTO(rip_addr)
|
||||
CYBOZU_TEST_EQUAL(x, 123);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef __APPLE__
|
||||
CYBOZU_TEST_AUTO(rip_addr_with_fixed_buf)
|
||||
{
|
||||
MIE_ALIGN(4096) static char buf[8192];
|
||||
@ -1260,6 +1264,7 @@ CYBOZU_TEST_AUTO(rip_addr_with_fixed_buf)
|
||||
code.setProtectModeRW();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct ReleaseTestCode : Xbyak::CodeGenerator {
|
||||
ReleaseTestCode(Label& L1, Label& L2, Label& L3)
|
||||
|
Loading…
Reference in New Issue
Block a user