return interval;
}
+/* Fast FPU mode is a bit inaccurate (non IEEE), but definitely faster */
+static void fpu_set_fast_mode(int fast_mode)
+{
+#ifdef __arm__
+ if (fast_mode)
+ {
+ int tmp;
+ __asm__ volatile(
+ "fmrx %[tmp], fpscr\n"
+ "orr %[tmp], %[tmp], #(1 << 24)\n" /* flush-to-zero */
+ "orr %[tmp], %[tmp], #(1 << 25)\n" /* default NaN */
+ "bic %[tmp], %[tmp], #((1 << 15) | (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8))\n" /* clear exception bits */
+ "fmxr fpscr, %[tmp]\n"
+ : [tmp] "=r" (tmp)
+ );
+ }
+ else
+ {
+ int tmp;
+ __asm__ volatile(
+ "fmrx %[tmp], fpscr\n"
+ "bic %[tmp], %[tmp], #(1 << 24)\n" /* flush-to-zero */
+ "bic %[tmp], %[tmp], #(1 << 25)\n" /* default NaN */
+ "fmxr fpscr, %[tmp]\n"
+ : [tmp] "=r" (tmp)
+ );
+ }
+#endif /* if __arm__ */
+}
+
int maemo_init(const char *program)
{
osso_context = osso_initialize(program, "1.0", 0, NULL);
osso_display_blanking_pause(osso_context);
screen_timer_id = SDL_AddTimer(30000, disable_display_blank, NULL);
+
+ fpu_set_fast_mode(1);
return 1;
}