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=-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:
$(CXX) $(CFLAGS) test0.cpp -o $@ -m32

View File

@ -194,10 +194,10 @@ int main(int argc, char *argv[])
valTbl.resize(varTbl.size());
#ifdef XBYAK32
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
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
for (int i = 0; i < 10; i++) {
for (size_t j = 0, n = valTbl.size(); j < n; j++) {

View File

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

View File

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

View File

@ -138,10 +138,10 @@ public:
const Reg32 memTbl[] = { eax, ecx, edx };
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(edi, edi);
xor_(esi, esi);
xor_(edi, edi);
mov(mem, (size_t)mem_);
const size_t end = code_.size();
uint32 pc = 0;