Skip to content
Snippets Groups Projects
Commit 4ab5e208 authored by Nguyen Anh Quynh's avatar Nguyen Anh Quynh
Browse files

regress: add x64_issue9.py

parent 44e15bf1
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/python
# Test some x64 issues report in #9
# Github issue: #9
# Author: Nguyen Anh Quynh
from keystone import *
import regress
class TestX86(regress.RegressTest):
def runTest(self):
# Initialize Keystone engine
ks = Ks(KS_ARCH_X86, KS_MODE_64)
encoding, _ = ks.asm(b"MOVSX R12D, BYTE PTR [R15+RBP*1]")
self.assertEqual(encoding, [ 0x45, 0x0F, 0xBE, 0x24, 0x2F ])
encoding, _ = ks.asm(b"LEA RDX, [RAX]")
self.assertEqual(encoding, [ 0x48, 0x8D, 0x10 ])
if __name__ == '__main__':
regress.main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment