Add Thumb-2 code to enable FP and VFP.
This commit is contained in:
parent
40ac55cf74
commit
d4f0ab7ba8
@ -13,9 +13,26 @@ import regress
|
|||||||
class FpVfpDisabled(regress.RegressTest):
|
class FpVfpDisabled(regress.RegressTest):
|
||||||
|
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
|
# MRC p15, #0, r1, c1, c0, #2
|
||||||
|
# ORR r1, r1, #(0xf << 20)
|
||||||
|
# MCR p15, #0, r1, c1, c0, #2
|
||||||
|
# MOV r1, #0
|
||||||
|
# MCR p15, #0, r1, c7, c5, #4
|
||||||
|
# MOV r0,#0x40000000
|
||||||
|
# FMXR FPEXC, r0
|
||||||
|
code = '11EE501F'
|
||||||
|
code += '41F47001'
|
||||||
|
code += '01EE501F'
|
||||||
|
code += '4FF00001'
|
||||||
|
code += '07EE951F'
|
||||||
|
code += '4FF08040'
|
||||||
|
code += 'E8EE100A'
|
||||||
|
# vpush {d8}
|
||||||
|
code += '2ded028b'
|
||||||
|
|
||||||
uc = Uc(UC_ARCH_ARM, UC_MODE_THUMB)
|
uc = Uc(UC_ARCH_ARM, UC_MODE_THUMB)
|
||||||
uc.mem_map(0x1000, 0x1000)
|
uc.mem_map(0x1000, 0x1000)
|
||||||
uc.mem_write(0x1000, '2ded028b'.decode('hex')) # vpush {d8}
|
uc.mem_write(0x1000, code.decode('hex'))
|
||||||
uc.reg_write(UC_ARM_REG_SP, 0x2000)
|
uc.reg_write(UC_ARM_REG_SP, 0x2000)
|
||||||
uc.emu_start(0x1000, 0x1004)
|
uc.emu_start(0x1000, 0x1004)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user