diff --git a/suite/regress/x64_bigint.py b/suite/regress/x64_bigint.py index a370f3b4bc0f764904fdde5d80f2fbdd7535e86f..187e47824561098320d29feeef8ed8359e41962b 100755 --- a/suite/regress/x64_bigint.py +++ b/suite/regress/x64_bigint.py @@ -1,6 +1,8 @@ #!/usr/bin/python # Nguyen Anh Quynh, 2016 +# This tests alias instructions of MOV RDI, <big-int-numbers> + # Fill in the information in the form below when you create a new regression # Github issue: #12 @@ -15,10 +17,17 @@ class TestX86(regress.RegressTest): # Initialize Keystone engine ks = Ks(KS_ARCH_X86, KS_MODE_64) # Assemble to get back insn encoding & statement count - # encoding, count = ks.asm("mov rdi, 0x1122334455") + encoding, count = ks.asm("mov rdi, 0x1122334455") + # Assert the result + self.assertEqual(encoding, [ 0x48, 0xBF, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00, 0x00, 0x00 ]) + encoding, count = ks.asm("movabs rdi, 0x1122334455") # Assert the result self.assertEqual(encoding, [ 0x48, 0xBF, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00, 0x00, 0x00 ]) + encoding, count = ks.asm("movq rdi, 0x1122334455") + # Assert the result + self.assertEqual(encoding, [ 0x48, 0xBF, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00, 0x00, 0x00 ]) + if __name__ == '__main__': regress.main()