Build doom on clipv2 and clip+
[kugel-rb.git] / apps / plugins / fractals / cpu_arm.h
blobea4595b7d2bd6512ab0acd25bcb2f98e5bfb8a0b
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2009 Tomer Shalev
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef _CPU_ARM_H
23 #define _CPU_ARM_H
25 inline static long muls32_asr26(long a, long b)
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)
39 return r;
42 #endif