unicorn/tests/regress/arm_fp_vfp_disabled.py
2016-06-10 08:19:09 +01:00

24 lines
617 B
Python
Executable file
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/python
# coding=utf8
# Added by Peter Mackay, relating to issue 571
# "ARM NEON/VFP support seems to exist but is disabled by default"
# https://github.com/unicorn-engine/unicorn/issues/571
from unicorn import *
from unicorn.arm_const import *
import regress
class FpVfpDisabled(regress.RegressTest):
def runTest(self):
uc = Uc(UC_ARCH_ARM, UC_MODE_THUMB)
uc.mem_map(0x1000, 0x1000)
uc.mem_write(0x1000, '2ded028b'.decode('hex')) # vpush {d8}
uc.reg_write(UC_ARM_REG_SP, 0x2000)
uc.emu_start(0x1000, 0x1004)
if __name__ == '__main__':
regress.main()