aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/jmp.cpp
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <[email protected]>2014-03-16 16:59:31 +0900
committerMITSUNARI Shigeo <[email protected]>2014-03-16 16:59:31 +0900
commite214d4ba8e2c692e269451d26ac4f838c2d01baa (patch)
tree129b249c5389445517969d10401ecf005df05e63 /test/jmp.cpp
parentb45cfc68d6b92fbc1fe9485415dabf9cca598e16 (diff)
downloadxbyak-e214d4ba8e2c692e269451d26ac4f838c2d01baa.tar.gz
xbyak-e214d4ba8e2c692e269451d26ac4f838c2d01baa.zip
pass test of assignL
Diffstat (limited to 'test/jmp.cpp')
-rw-r--r--test/jmp.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/test/jmp.cpp b/test/jmp.cpp
index 6cde759..531d05c 100644
--- a/test/jmp.cpp
+++ b/test/jmp.cpp
@@ -798,26 +798,27 @@ void testAssign()
xor_(eax, eax);
Label dst, src;
L(src);
- inc(eax);
- cmp(eax, 1);
- je(dst);
- inc(eax); // 2, 3, 5
+ inc(eax);
+ cmp(eax, 1);
+ je(dst);
+ inc(eax); // 2, 3, 5
cmp(eax, 5);
- jne(dst);
+ putNop(this, 128);
+ jne(dst, T_NEAR);
ret();
assignL(dst, src);
}
};
- for (int i = 0; i < 2; i++) {
- const bool grow = i == 0;
- printf("testAssign grow=%d\n", grow);
- Code code(grow);
- if (grow) code.ready();
- int (*f)() = code.getCode<int (*)()>();
- int ret = f();
- if (ret != 5) {
- printf("err %d\n", ret);
- }
+ for (int i = 0; i < 2; i++) {
+ const bool grow = i == 0;
+ printf("testAssign grow=%d\n", grow);
+ Code code(grow);
+ if (grow) code.ready();
+ int (*f)() = code.getCode<int (*)()>();
+ int ret = f();
+ if (ret != 5) {
+ printf("err %d\n", ret);
+ }
}
}