summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Mahone <andrew.mahone@gmail.com>2009-12-31 08:32:05 +0000
committerAndrew Mahone <andrew.mahone@gmail.com>2009-12-31 08:32:05 +0000
commitbecdbaa12d58850efa65da9a3f623795aed8acfb (patch)
tree7c56258a5d04449a3952f3841e18b051fc57feaa
parentccb644191331dd506f96c474997895ce3ee2b279 (diff)
downloadrockbox-becdbaa12d58850efa65da9a3f623795aed8acfb.tar.gz
rockbox-becdbaa12d58850efa65da9a3f623795aed8acfb.zip
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
-rw-r--r--firmware/target/arm/imx31/crt0.S19
1 files changed, 19 insertions, 0 deletions
diff --git a/firmware/target/arm/imx31/crt0.S b/firmware/target/arm/imx31/crt0.S
index 7118c7572f..4afec85568 100644
--- a/firmware/target/arm/imx31/crt0.S
+++ b/firmware/target/arm/imx31/crt0.S
@@ -292,6 +292,25 @@ remap_end:
292 292
293 /* Switch back to supervisor mode */ 293 /* Switch back to supervisor mode */
294 msr cpsr_c, #0xd3 294 msr cpsr_c, #0xd3
295
296#ifndef BOOTLOADER
297 /* Enable access to VFP */
298 mrc p15, 0, r3, c1, c0, 2
299 orr r3, r3, #0xf00000
300 mcr p15, 0, r3, c1, c0, 2
301
302 /* Enable VFP */
303 mrc p10, 7, r3, c8, c0, 0
304 orr r3, r3, #1<<30
305 mcr p10, 7, r3, c8, c0, 0
306
307 /* Disable exceptions, enable default NaN, flush-to-zero, round toward 0 */
308 mrc p10, 7, r3, c1, c0, 0
309 orr r3, r3, #15<<22
310 bic r3, r3, #31<<8
311 mcr p10, 7, r3, c1, c0, 0
312#endif
313
295 bl main 314 bl main
296 315
297#ifdef BOOTLOADER 316#ifdef BOOTLOADER