From 563f2602f471208cb8544a36539a79dcceaad643 Mon Sep 17 00:00:00 2001 From: Tomer Shalev Date: Sun, 17 Jan 2010 22:03:36 +0000 Subject: Fractals: Have helper functions in header file to keep them inlined - Should fix performance degradation caused because of the split - Thanks for all who noticed (amiconn et al.) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24266 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/fractals/cpu_arm.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'apps/plugins/fractals/cpu_arm.h') diff --git a/apps/plugins/fractals/cpu_arm.h b/apps/plugins/fractals/cpu_arm.h index 51a3718..ea4595b 100644 --- a/apps/plugins/fractals/cpu_arm.h +++ b/apps/plugins/fractals/cpu_arm.h @@ -22,6 +22,21 @@ #ifndef _CPU_ARM_H #define _CPU_ARM_H -inline long muls32_asr26(long a, long b); +inline static long muls32_asr26(long a, long b) +{ + long r, t1; + asm ( + "smull %[r], %[t1], %[a], %[b] \n" + "mov %[r], %[r], lsr #26 \n" + "orr %[r], %[r], %[t1], lsl #6 \n" + : /* outputs */ + [r] "=&r,&r,&r"(r), + [t1]"=&r,&r,&r"(t1) + : /* inputs */ + [a] "%r,%r,%r" (a), + [b] "r,0,1" (b) + ); + return r; +} #endif -- cgit v1.1