use XBYAK_NO_OP_NAMES

This commit is contained in:
MITSUNARI Shigeo 2013-04-11 21:34:35 +09:00
parent ebea977d3b
commit 35bb4eac6e
5 changed files with 8 additions and 8 deletions

View file

@ -26,7 +26,7 @@ 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 -fno-operator-names -I../ $(CFLAGS_WARN) CFLAGS=-g -O2 -fomit-frame-pointer -DXBYAK_NO_OP_NAMES -Wall -I../ $(CFLAGS_WARN)
test: test:
$(CXX) $(CFLAGS) test0.cpp -o $@ -m32 $(CXX) $(CFLAGS) test0.cpp -o $@ -m32

View file

@ -194,10 +194,10 @@ int main(int argc, char *argv[])
valTbl.resize(varTbl.size()); valTbl.resize(varTbl.size());
#ifdef XBYAK32 #ifdef XBYAK32
puts("32bit mode"); puts("32bit mode");
void (*func)(double *ret, const double *valTbl) = (void (*)(double *, const double*))(const void*)funcGen.getCode(); void (*func)(double *ret, const double *valTbl) = funcGen.getCode<void (*)(double *, const double*)>();
#else #else
puts("64bit mode"); puts("64bit mode");
double (*func)(const double *valTbl) = (double (*)(const double*))(const void*)funcGen.getCode(); double (*func)(const double *valTbl) = funcGen.getCode<double (*)(const double*)>();
#endif #endif
for (int i = 0; i < 10; i++) { for (int i = 0; i < 10; i++) {
for (size_t j = 0, n = valTbl.size(); j < n; j++) { for (size_t j = 0, n = valTbl.size(); j < n; j++) {

View file

@ -90,7 +90,7 @@ int main()
u.code = code.getCode(); u.code = code.getCode();
p = u.p; p = u.p;
#else #else
*(void**)&p = (void*)code.getCode(); *(void**)&p = code.getCode<void*>();
#endif #endif
for (int i = 0; i < 10; i++) { for (int i = 0; i < 10; i++) {
A a; A a;

View file

@ -97,7 +97,7 @@ public:
struct Reset : public Xbyak::CodeGenerator { struct Reset : public Xbyak::CodeGenerator {
void init(int n) void init(int n)
{ {
xor(eax, eax); xor_(eax, eax);
mov(ecx, n); mov(ecx, n);
test(ecx, ecx); test(ecx, ecx);
jnz("@f"); jnz("@f");

View file

@ -138,10 +138,10 @@ public:
const Reg32 memTbl[] = { eax, ecx, edx }; const Reg32 memTbl[] = { eax, ecx, edx };
const size_t memTblNum = NUM_OF_ARRAY(memTbl); const size_t memTblNum = NUM_OF_ARRAY(memTbl);
for (size_t i = 0; i < memTblNum; i++) xor(memTbl[i], memTbl[i]); for (size_t i = 0; i < memTblNum; i++) xor_(memTbl[i], memTbl[i]);
xor(esi, esi); xor_(esi, esi);
xor(edi, edi); xor_(edi, edi);
mov(mem, (size_t)mem_); mov(mem, (size_t)mem_);
const size_t end = code_.size(); const size_t end = code_.size();
uint32 pc = 0; uint32 pc = 0;