forked from len0rd/rockbox
Enable and initialize VFP on imx31. VFP state is not saved on thread change, and it is initialized for scalar operations, rounding toward zero, with exception/error handling and "correct" handling of NaN and denormal values disabled. In this mode it should still be usable for integer divisions (by casting operands to double and result to int or unsigned).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24129 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ccb6441913
commit
becdbaa12d
1 changed files with 19 additions and 0 deletions
|
@ -292,6 +292,25 @@ remap_end:
|
|||
|
||||
/* Switch back to supervisor mode */
|
||||
msr cpsr_c, #0xd3
|
||||
|
||||
#ifndef BOOTLOADER
|
||||
/* Enable access to VFP */
|
||||
mrc p15, 0, r3, c1, c0, 2
|
||||
orr r3, r3, #0xf00000
|
||||
mcr p15, 0, r3, c1, c0, 2
|
||||
|
||||
/* Enable VFP */
|
||||
mrc p10, 7, r3, c8, c0, 0
|
||||
orr r3, r3, #1<<30
|
||||
mcr p10, 7, r3, c8, c0, 0
|
||||
|
||||
/* Disable exceptions, enable default NaN, flush-to-zero, round toward 0 */
|
||||
mrc p10, 7, r3, c1, c0, 0
|
||||
orr r3, r3, #15<<22
|
||||
bic r3, r3, #31<<8
|
||||
mcr p10, 7, r3, c1, c0, 0
|
||||
#endif
|
||||
|
||||
bl main
|
||||
|
||||
#ifdef BOOTLOADER
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue