From e07d74ef16f466381718f8c8add46f58df370a03 Mon Sep 17 00:00:00 2001 From: Ryan Hileman Date: Mon, 7 Sep 2015 14:37:11 -0700 Subject: [PATCH] add test for #122 --- regress/wrong_sp_arm64.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 regress/wrong_sp_arm64.py diff --git a/regress/wrong_sp_arm64.py b/regress/wrong_sp_arm64.py new file mode 100755 index 00000000..d63791e1 --- /dev/null +++ b/regress/wrong_sp_arm64.py @@ -0,0 +1,12 @@ +#!/usr/bin/python + +from unicorn import * +from unicorn.arm64_const import * + +try: + uc = Uc(UC_ARCH_ARM64, UC_MODE_ARM) + uc.reg_write(UC_ARM64_REG_SP, 4) + print 'Writing 4 to SP' + print 'SP =', uc.reg_read(UC_ARM64_REG_SP) +except UcError as e: + print("ERROR: %s" % e)