aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <[email protected]>2014-03-15 08:12:03 +0900
committerMITSUNARI Shigeo <[email protected]>2014-03-15 08:12:03 +0900
commitfd97905fb75cae8a9bb785fbb9dd1610ec0d3dda (patch)
tree81c3f66f14feeb86e64642d6718b765b98fe9933 /test
parent7036a37e6af35da888fe72100970394a8a793271 (diff)
downloadxbyak-fd97905fb75cae8a9bb785fbb9dd1610ec0d3dda.tar.gz
xbyak-fd97905fb75cae8a9bb785fbb9dd1610ec0d3dda.zip
add test of AutoGrow
Diffstat (limited to 'test')
-rw-r--r--test/jmp.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/test/jmp.cpp b/test/jmp.cpp
index f4ea008..9a6fca9 100644
--- a/test/jmp.cpp
+++ b/test/jmp.cpp
@@ -655,6 +655,7 @@ void testNewLabel()
jmp(label2);
L(exit);
}
+ putNop(this, 128);
{
Label label1;
Label label2;
@@ -679,13 +680,16 @@ void testNewLabel()
ret();
}
};
- const bool grow = false;
- printf("testNewLabel grow=%d\n", grow);
- Code code(grow);
- int (*f)() = code.getCode<int (*)()>();
- int r = f();
- if (r != 8) {
- printf("err %d\n", r);
+ for (int i = 0; i < 2; i++) {
+ const bool grow = i == 1;
+ printf("testNewLabel grow=%d\n", grow);
+ Code code(grow);
+ if (grow) code.ready();
+ int (*f)() = code.getCode<int (*)()>();
+ int r = f();
+ if (r != 8) {
+ printf("err %d %d\n", i, r);
+ }
}
}