aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--sample/Makefile2
-rw-r--r--sample/calc.cpp4
-rw-r--r--sample/memfunc.cpp2
-rw-r--r--sample/test0.cpp2
-rw-r--r--sample/toyvm.cpp6
5 files changed, 8 insertions, 8 deletions
diff --git a/sample/Makefile b/sample/Makefile
index 3898d54..35a285c 100644
--- a/sample/Makefile
+++ b/sample/Makefile
@@ -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
diff --git a/sample/calc.cpp b/sample/calc.cpp
index d93bc95..4f05eee 100644
--- a/sample/calc.cpp
+++ b/sample/calc.cpp
@@ -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++) {
diff --git a/sample/memfunc.cpp b/sample/memfunc.cpp
index 9f65850..f4d9dfd 100644
--- a/sample/memfunc.cpp
+++ b/sample/memfunc.cpp
@@ -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;
diff --git a/sample/test0.cpp b/sample/test0.cpp
index 1c0e710..c54ecc8 100644
--- a/sample/test0.cpp
+++ b/sample/test0.cpp
@@ -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");
diff --git a/sample/toyvm.cpp b/sample/toyvm.cpp
index 72d91f4..aa2e3ad 100644
--- a/sample/toyvm.cpp
+++ b/sample/toyvm.cpp
@@ -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;