From 4b235f70859f928ae40e88b9e6ea24322caf721c Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Mon, 10 Apr 2017 17:47:51 +0900 Subject: [PATCH] fix wrong access to cur(thanks to koturn) --- sample/bf.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sample/bf.cpp b/sample/bf.cpp index c536bd7..29b9f3a 100644 --- a/sample/bf.cpp +++ b/sample/bf.cpp @@ -96,25 +96,24 @@ public: call(pPutchar); pop(eax); #elif defined(XBYAK64_WIN) - mov(rcx, cur); + mov(ecx, cur); sub(rsp, 32); call(pPutchar); add(rsp, 32); #else - mov(rdi, cur); + mov(edi, cur); call(pPutchar); #endif break; case ',': #if defined(XBYAK32) || defined(XBYAK64_GCC) call(pGetchar); - mov(cur, eax); #elif defined(XBYAK64_WIN) sub(rsp, 32); call(pGetchar); add(rsp, 32); - mov(cur, rax); #endif + mov(cur, eax); break; case '[': L(toStr(labelNo, B));