jmp test is only 32bit

This commit is contained in:
MITSUNARI Shigeo 2012-03-16 16:37:09 +09:00
parent a72f745d76
commit 49a3b954bf
4 changed files with 9 additions and 11 deletions

View File

@ -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

View File

@ -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++) {

0
test/test_address.bat Normal file → Executable file
View File

0
test/test_nm.sh Normal file → Executable file
View File