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

Merge branch 'regress-ldr-imm' of https://github.com/iksteen/beta into iksteen-regress-ldr-imm

parents 66bdae0d 3a7e4969
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/python
# Ingmar Steen, 2016
# This tests the LDR Rd, =imm pseudo-instruction on ARM.
# Fill in the information in the form below when you create a new regression
# Github issue: #28
# Author: Ingmar Steen
from keystone import *
import regress
class TestARM(regress.RegressTest):
def runTest(self):
# Initialize Keystone engine
ks = Ks(KS_ARCH_ARM, KS_MODE_ARM)
# Assemble to get back insn encoding & statement count
encoding, count = ks.asm("ldr r0, =0x11223344")
# Assert the result
self.assertEqual(encoding, [ 0x04, 0x00, 0x1f, 0xe5, 0x44, 0x33, 0x22, 0x11 ])
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