diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2018-07-17 13:17:41 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2018-07-17 13:36:03 +0200 |
| commit | 3b146b53c4b6ec12806b670eb215bb44482642e1 (patch) | |
| tree | 78382d033739d67bf04bdbcb95be3fd5aa556e4a /test/arch/x86/unit | |
| parent | a2a8fa1c1d1c24a3975aec0a39fd1d9f0d31af5e (diff) | |
| download | miasm-3b146b53c4b6ec12806b670eb215bb44482642e1.tar.gz miasm-3b146b53c4b6ec12806b670eb215bb44482642e1.zip | |
Test: add x86 64 asm test 64bit addr
Diffstat (limited to 'test/arch/x86/unit')
| -rw-r--r-- | test/arch/x86/unit/test_asm_x86_64.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/arch/x86/unit/test_asm_x86_64.py b/test/arch/x86/unit/test_asm_x86_64.py new file mode 100644 index 00000000..4e600846 --- /dev/null +++ b/test/arch/x86/unit/test_asm_x86_64.py @@ -0,0 +1,30 @@ +from miasm2.core import asmblock +from miasm2.arch.x86 import arch +from miasm2.core import parse_asm +from miasm2.core.interval import interval + +my_mn = arch.mn_x86 + + +asmcfg, loc_db = parse_asm.parse_txt(my_mn, 64, r''' +main: + PUSH RBP + MOV RBP, RSP +loop_dec: + CMP RCX, RDX + JB loop_dec +end: + MOV RSP, RBP + POP RBP + RET + +''') + +loc_db.set_location_offset(loc_db.get_name_location("main"), 0x100001000) +dst_interval = interval([(0x100001000, 0x100002000)]) +patches = asmblock.asm_resolve_final( + my_mn, + asmcfg, + loc_db, + dst_interval +) |