Here's a patch to arm build of eglibc 2.10 that does it. I had to modify
some packages to pass their testsuites. One of the packages was mpfr, the
float tests will fail with RunFast mode.
In arm case the _FPU_IEEE mode is different from the default mode, which
does not have the FPU exceptions set on.
Any code that calls this _FPU_SETCW should also be #ifdef __arm__.
-Juha
On 12/01/11 11:21, Moiseichuk Leonid (Nokia-MS/Helsinki) wrote:
Yes, we have. Juha could provide it. The best outcome: using standard glibc
interface we could turn it to FAST/IEEE mode
_FPU_SETCW(_FPU_IEEE);
Turning back to run fast could be done by
_FPU_SETCW(_FPU_DEFAULT);
No problems discovered during testing.
With best wishes,
Leonid
-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of ext Carsten Munk
Sent: 12 January, 2011 11:07
To: meego-dev; Kant Jarmo (Nokia-MS/Helsinki)
Subject: [MeeGo-dev] ARM RunFast by default in glibc
Hi (ARM toolchain group mostly)
Do we have a patch for glibc-2.11-12-g24c0bf7 and/or glibc-2.12.1 that
enables ARM RunFast[1] mode by default anywhere? Would be good to push
it along with hardfp while we're at it and getting things tested
through.
Best regards,
Carsten Munk
[1]
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0274h/Chdiihcd.html
_______________________________________________
MeeGo-dev mailing list
[email protected]
http://lists.meego.com/listinfo/meego-dev
# DP: Enable RunFast mode by default
diff -Naur eglibc-2.10.orig/ports/sysdeps/arm/eabi/fpu_control.h eglibc-2.10/ports/sysdeps/arm/eabi/fpu_control.h
--- eglibc-2.10.orig/ports/sysdeps/arm/eabi/fpu_control.h 2009-10-12 21:30:02.000000000 +0300
+++ eglibc-2.10/ports/sysdeps/arm/eabi/fpu_control.h 2010-12-10 14:05:34.211855205 +0200
@@ -41,9 +41,10 @@
/* Some bits in the FPSCR are not yet defined. They must be preserved when
modifying the contents. */
#define _FPU_RESERVED 0x0e08e0e0
-#define _FPU_DEFAULT 0x00000000
+/* The default mode is RunFast */
+#define _FPU_DEFAULT (3 << 24)
/* Default + exceptions enabled. */
-#define _FPU_IEEE (_FPU_DEFAULT | 0x00001f00)
+#define _FPU_IEEE 0x00001f00
/* Type of the control word. */
typedef unsigned int fpu_control_t;
diff -Naur eglibc-2.10.orig/sysdeps/unix/sysv/linux/init-first.c eglibc-2.10/sysdeps/unix/sysv/linux/init-first.c
--- eglibc-2.10.orig/sysdeps/unix/sysv/linux/init-first.c 2009-10-12 21:29:00.000000000 +0300
+++ eglibc-2.10/sysdeps/unix/sysv/linux/init-first.c 2010-12-10 14:04:24.364680564 +0200
@@ -69,6 +69,9 @@
__setfpucw (__fpu_control);
}
+ /* Set the default FPU mode once again it is RunFast */
+ _FPU_SETCW(_FPU_DEFAULT);
+
/* Save the command-line arguments. */
__libc_argc = argc;
__libc_argv = argv;
_______________________________________________
MeeGo-dev mailing list
[email protected]
http://lists.meego.com/listinfo/meego-dev