unicorn/regress/sparc_reg.py

12 lines
310 B
Python
Raw Normal View History

2015-09-08 01:14:22 +00:00
#!/usr/bin/python
2015-09-08 01:07:28 +00:00
from unicorn import *
from unicorn.sparc_const import *
uc = Uc(UC_ARCH_SPARC, UC_MODE_BIG_ENDIAN)
uc.reg_write(UC_SPARC_REG_SP, 100)
uc.reg_write(UC_SPARC_REG_FP, 100)
print 'writing sp = 100, fp = 100'
print 'sp =', uc.reg_read(UC_SPARC_REG_SP)
print 'fp =', uc.reg_read(UC_SPARC_REG_FP)