sparc: add SPARC32 mode (= UC_MODE_32)

This commit is contained in:
Nguyen Anh Quynh
2016-01-23 10:48:18 +08:00
parent ca79d11211
commit d79925f477
11 changed files with 13 additions and 8 deletions

View File

@@ -5,7 +5,7 @@ from unicorn.sparc_const import *
PAGE_SIZE = 1 * 1024 * 1024
uc = Uc(UC_ARCH_SPARC, UC_MODE_64)
uc = Uc(UC_ARCH_SPARC, UC_MODE_SPARC64)
uc.reg_write(UC_SPARC_REG_SP, 100)
print 'writing sp = 100'

View File

@@ -1,7 +1,7 @@
#include <unicorn/unicorn.h>
#define HARDWARE_ARCHITECTURE UC_ARCH_SPARC
#define HARDWARE_MODE 0
#define HARDWARE_MODE UC_ARCH_SPARC32
#define MEMORY_STARTING_ADDRESS 0x1000000
#define MEMORY_SIZE 2 * 1024 * 1024

View File

@@ -5,7 +5,7 @@ from unicorn.sparc_const import *
PAGE_SIZE = 1 * 1024 * 1024
uc = Uc(UC_ARCH_SPARC, 0)
uc = Uc(UC_ARCH_SPARC, UC_MODE_SPARC32)
uc.reg_write(UC_SPARC_REG_SP, 100)
uc.reg_write(UC_SPARC_REG_FP, 200)