Add sign-extended mode for test() instruction

This commit is contained in:
Maxime Chevalier-Boisvert 2020-12-14 13:26:33 -05:00 committed by Alan Wu
parent 8ae354e9be
commit 868a6809e7
2 changed files with 24 additions and 11 deletions

View file

@ -315,6 +315,7 @@ void run_tests()
cb_set_pos(cb, 0); test(cb, mem_opnd(8, RSI, 16), imm_opnd(1)); check_bytes(cb, "F6461001");
cb_set_pos(cb, 0); test(cb, mem_opnd(8, RSI, -16), imm_opnd(1)); check_bytes(cb, "F646F001");
cb_set_pos(cb, 0); test(cb, mem_opnd(32, RSI, 64), EAX); check_bytes(cb, "854640");
cb_set_pos(cb, 0); test(cb, mem_opnd(64, RSI, 64), imm_opnd(~0x08)); check_bytes(cb, "48F74640F7FFFFFF");
// xor
cb_set_pos(cb, 0); xor(cb, EAX, EAX); check_bytes(cb, "31C0");