summaryrefslogtreecommitdiff
path: root/ujit_asm_tests.c
diff options
context:
space:
mode:
authorMaxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>2020-09-17 11:49:53 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:23 -0400
commit038f5d964ffdfcce7c1acbeb4c6ae4ad01a09014 (patch)
tree2c45b161943ed8d0e0cf0801179dcc3c6846889f /ujit_asm_tests.c
parent1665bbacc16d7ea18625f5a8b5c7474a873dffb4 (diff)
Avoid recompiling overlapping instruction sequences in ujit
Diffstat (limited to 'ujit_asm_tests.c')
-rw-r--r--ujit_asm_tests.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/ujit_asm_tests.c b/ujit_asm_tests.c
index 6b8c7c695d..406253ba26 100644
--- a/ujit_asm_tests.c
+++ b/ujit_asm_tests.c
@@ -349,6 +349,27 @@ void run_tests()
cb_set_pos(cb, 0); sub(cb, EAX, imm_opnd(1)); check_bytes(cb, "83E801");
cb_set_pos(cb, 0); sub(cb, RAX, imm_opnd(2)); check_bytes(cb, "4883E802");
+ // test
+ /*
+ test(
+ delegate void (CodeBlock cb) { cb.instr(TEST, AL, 4); },
+ "A804"
+ );
+ test(
+ delegate void (CodeBlock cb) { cb.instr(TEST, CL, 255); },
+ "F6C1FF"
+ );
+ test(
+ delegate void (CodeBlock cb) { cb.instr(TEST, DL, 7); },
+ "F6C207"
+ );
+ test(
+ delegate void (CodeBlock cb) { cb.instr(TEST, DIL, 9); },
+ "",
+ "40F6C709"
+ );
+ */
+
// xor
cb_set_pos(cb, 0); xor(cb, EAX, EAX); check_bytes(cb, "31C0");