diff --git a/test/Makefile b/test/Makefile index e1c9ffc..2d6389a 100644 --- a/test/Makefile +++ b/test/Makefile @@ -2,26 +2,24 @@ TARGET = make_nm normalize_prefix XBYAK_INC=../xbyak/xbyak.h ifeq ($(MODE_BIT),64) - XBYAK_OPT=-m64 - XBYAK_COPT=-DXBYAK64 + XBYAK_OPT=-m64 -DXBYAK64 else - XBYAK_OPT=-m32 - XBYAK_COPT=-DXBYAK32 + XBYAK_OPT=-m32 -DXBYAK32 endif all: $(TARGET) CFLAGS_WARN=-Wall -Wextra -Wformat=2 -Wcast-qual -Wcast-align -Wwrite-strings -Wfloat-equal -Wpointer-arith -CFLAGS=-O2 -fomit-frame-pointer -Wall -fno-operator-names -I../ $(XBYAK_OPT) $(XBYAK_COPT) $(CFLAGS_WARN) +CFLAGS=-O2 -fomit-frame-pointer -Wall -fno-operator-names -I../ $(CFLAGS_WARN) make_nm: - $(CXX) $(CFLAGS) make_nm.cpp -o $@ + $(CXX) $(CFLAGS) $(XBYAK_OPT) make_nm.cpp -o $@ normalize_prefix: normalize_prefix.cpp - $(CXX) $(CFLAGS) normalize_prefix.cpp -o $@ + $(CXX) $(CFLAGS) $(XBYAK_OPT) normalize_prefix.cpp -o $@ test_mmx: test_mmx.cpp - $(CXX) $(CFLAGS) test_mmx.cpp -o $@ -lpthread + $(CXX) $(CFLAGS) $(XBYAK_OPT) test_mmx.cpp -o $@ -lpthread jmp: jmp.cpp - $(CXX) $(CFLAGS) jmp.cpp -o $@ + $(CXX) $(CFLAGS) -m32 -DXBYAK32 jmp.cpp -o $@ test: normalize_prefix jmp ./test_nm.sh diff --git a/test/jmp.cpp b/test/jmp.cpp index f53face..8380041 100644 --- a/test/jmp.cpp +++ b/test/jmp.cpp @@ -109,10 +109,10 @@ struct Grow : Xbyak::CodeGenerator { { mov(eax, 100); push(eax); - call(add5); + call((void*)add5); add(esp, 4); push(eax); - call(add2); + call((void*)add2); add(esp, 4); ret(); for (int i = 0; i < dummySize; i++) { diff --git a/test/test_address.bat b/test/test_address.bat old mode 100644 new mode 100755 diff --git a/test/test_nm.sh b/test/test_nm.sh old mode 100644 new mode 100755