summaryrefslogtreecommitdiff
path: root/apps/plugins/fractals/cpu_arm.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/fractals/cpu_arm.h')
-rw-r--r--apps/plugins/fractals/cpu_arm.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/apps/plugins/fractals/cpu_arm.h b/apps/plugins/fractals/cpu_arm.h
index 51a3718f66..ea4595b7d2 100644
--- a/apps/plugins/fractals/cpu_arm.h
+++ b/apps/plugins/fractals/cpu_arm.h
@@ -22,6 +22,21 @@
22#ifndef _CPU_ARM_H 22#ifndef _CPU_ARM_H
23#define _CPU_ARM_H 23#define _CPU_ARM_H
24 24
25inline long muls32_asr26(long a, long b); 25inline static long muls32_asr26(long a, long b)
26{
27 long r, t1;
28 asm (
29 "smull %[r], %[t1], %[a], %[b] \n"
30 "mov %[r], %[r], lsr #26 \n"
31 "orr %[r], %[r], %[t1], lsl #6 \n"
32 : /* outputs */
33 [r] "=&r,&r,&r"(r),
34 [t1]"=&r,&r,&r"(t1)
35 : /* inputs */
36 [a] "%r,%r,%r" (a),
37 [b] "r,0,1" (b)
38 );
39 return r;
40}
26 41
27#endif 42#endif