annotate Common/Drivers/CMSIS_v210/core_cm4_simd.h @ 52:d24395f7c939

Added reference projects
author Ideenmodellierer
date Sun, 05 Aug 2018 12:56:43 +0200
parents 5f11787b4f42
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1 /**************************************************************************//**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
2 * @file core_cm4_simd.h
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 * @brief CMSIS Cortex-M4 SIMD Header File
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4 * @version V2.10
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 * @date 19. July 2011
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 * @note
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 * @par
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11 * ARM Limited (ARM) is supplying this software for use with Cortex-M
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 * processor based microcontrollers. This file can be freely distributed
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13 * within development tools that are supporting such ARM based processors.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15 * @par
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19 * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22 ******************************************************************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25 extern "C" {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
27
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28 #ifndef __CORE_CM4_SIMD_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29 #define __CORE_CM4_SIMD_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
31
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
32 /*******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
33 * Hardware Abstraction Layer
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
34 ******************************************************************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
35
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
36
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
37 /* ################### Compiler specific Intrinsics ########################### */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
38 /** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
39 Access to dedicated SIMD instructions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40 @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
41 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
42
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
43 #if defined ( __CC_ARM ) /*------------------RealView Compiler -----------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
44 /* ARM armcc specific functions */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
45
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46 /*------ CM4 SOMD Intrinsics -----------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47 #define __SADD8 __sadd8
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
48 #define __QADD8 __qadd8
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
49 #define __SHADD8 __shadd8
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
50 #define __UADD8 __uadd8
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
51 #define __UQADD8 __uqadd8
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
52 #define __UHADD8 __uhadd8
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
53 #define __SSUB8 __ssub8
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54 #define __QSUB8 __qsub8
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55 #define __SHSUB8 __shsub8
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
56 #define __USUB8 __usub8
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
57 #define __UQSUB8 __uqsub8
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58 #define __UHSUB8 __uhsub8
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
59 #define __SADD16 __sadd16
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
60 #define __QADD16 __qadd16
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
61 #define __SHADD16 __shadd16
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
62 #define __UADD16 __uadd16
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
63 #define __UQADD16 __uqadd16
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
64 #define __UHADD16 __uhadd16
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
65 #define __SSUB16 __ssub16
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
66 #define __QSUB16 __qsub16
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
67 #define __SHSUB16 __shsub16
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
68 #define __USUB16 __usub16
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
69 #define __UQSUB16 __uqsub16
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
70 #define __UHSUB16 __uhsub16
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
71 #define __SASX __sasx
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
72 #define __QASX __qasx
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
73 #define __SHASX __shasx
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
74 #define __UASX __uasx
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
75 #define __UQASX __uqasx
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
76 #define __UHASX __uhasx
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
77 #define __SSAX __ssax
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
78 #define __QSAX __qsax
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
79 #define __SHSAX __shsax
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
80 #define __USAX __usax
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
81 #define __UQSAX __uqsax
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
82 #define __UHSAX __uhsax
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
83 #define __USAD8 __usad8
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
84 #define __USADA8 __usada8
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
85 #define __SSAT16 __ssat16
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
86 #define __USAT16 __usat16
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
87 #define __UXTB16 __uxtb16
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
88 #define __UXTAB16 __uxtab16
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
89 #define __SXTB16 __sxtb16
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
90 #define __SXTAB16 __sxtab16
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
91 #define __SMUAD __smuad
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
92 #define __SMUADX __smuadx
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
93 #define __SMLAD __smlad
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
94 #define __SMLADX __smladx
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
95 #define __SMLALD __smlald
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
96 #define __SMLALDX __smlaldx
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
97 #define __SMUSD __smusd
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
98 #define __SMUSDX __smusdx
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
99 #define __SMLSD __smlsd
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
100 #define __SMLSDX __smlsdx
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
101 #define __SMLSLD __smlsld
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
102 #define __SMLSLDX __smlsldx
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
103 #define __SEL __sel
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
104 #define __QADD __qadd
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
105 #define __QSUB __qsub
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
106
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
107 #define __PKHBT(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0x0000FFFFUL) | \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
108 ((((uint32_t)(ARG2)) << (ARG3)) & 0xFFFF0000UL) )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
109
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
110 #define __PKHTB(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0xFFFF0000UL) | \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
111 ((((uint32_t)(ARG2)) >> (ARG3)) & 0x0000FFFFUL) )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
112
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
113
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
114 /*-- End CM4 SIMD Intrinsics -----------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
115
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
116
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
117
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
118 #elif defined ( __ICCARM__ ) /*------------------ ICC Compiler -------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
119 /* IAR iccarm specific functions */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
120
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
121 #include <cmsis_iar.h>
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
122
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
123 /*------ CM4 SIMDDSP Intrinsics -----------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
124 /* intrinsic __SADD8 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
125 /* intrinsic __QADD8 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
126 /* intrinsic __SHADD8 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
127 /* intrinsic __UADD8 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
128 /* intrinsic __UQADD8 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
129 /* intrinsic __UHADD8 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
130 /* intrinsic __SSUB8 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
131 /* intrinsic __QSUB8 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
132 /* intrinsic __SHSUB8 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
133 /* intrinsic __USUB8 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
134 /* intrinsic __UQSUB8 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
135 /* intrinsic __UHSUB8 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
136 /* intrinsic __SADD16 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
137 /* intrinsic __QADD16 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
138 /* intrinsic __SHADD16 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
139 /* intrinsic __UADD16 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
140 /* intrinsic __UQADD16 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
141 /* intrinsic __UHADD16 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
142 /* intrinsic __SSUB16 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
143 /* intrinsic __QSUB16 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
144 /* intrinsic __SHSUB16 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
145 /* intrinsic __USUB16 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
146 /* intrinsic __UQSUB16 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
147 /* intrinsic __UHSUB16 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
148 /* intrinsic __SASX see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
149 /* intrinsic __QASX see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
150 /* intrinsic __SHASX see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
151 /* intrinsic __UASX see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
152 /* intrinsic __UQASX see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
153 /* intrinsic __UHASX see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
154 /* intrinsic __SSAX see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
155 /* intrinsic __QSAX see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
156 /* intrinsic __SHSAX see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
157 /* intrinsic __USAX see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
158 /* intrinsic __UQSAX see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
159 /* intrinsic __UHSAX see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
160 /* intrinsic __USAD8 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
161 /* intrinsic __USADA8 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
162 /* intrinsic __SSAT16 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
163 /* intrinsic __USAT16 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
164 /* intrinsic __UXTB16 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
165 /* intrinsic __SXTB16 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
166 /* intrinsic __UXTAB16 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
167 /* intrinsic __SXTAB16 see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
168 /* intrinsic __SMUAD see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
169 /* intrinsic __SMUADX see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
170 /* intrinsic __SMLAD see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
171 /* intrinsic __SMLADX see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
172 /* intrinsic __SMLALD see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
173 /* intrinsic __SMLALDX see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
174 /* intrinsic __SMUSD see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
175 /* intrinsic __SMUSDX see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
176 /* intrinsic __SMLSD see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
177 /* intrinsic __SMLSDX see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
178 /* intrinsic __SMLSLD see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
179 /* intrinsic __SMLSLDX see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
180 /* intrinsic __SEL see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
181 /* intrinsic __QADD see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
182 /* intrinsic __QSUB see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
183 /* intrinsic __PKHBT see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
184 /* intrinsic __PKHTB see intrinsics.h */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
185
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
186 /*-- End CM4 SIMD Intrinsics -----------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
187
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
188
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
189
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
190 #elif defined ( __GNUC__ ) /*------------------ GNU Compiler ---------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
191 /* GNU gcc specific functions */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
192
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
193 /*------ CM4 SIMD Intrinsics -----------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
194 __attribute__( ( always_inline ) ) static __INLINE uint32_t __SADD8(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
195 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
196 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
197
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
198 __ASM volatile ("sadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
199 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
200 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
201
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
202 __attribute__( ( always_inline ) ) static __INLINE uint32_t __QADD8(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
203 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
204 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
205
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
206 __ASM volatile ("qadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
207 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
208 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
209
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
210 __attribute__( ( always_inline ) ) static __INLINE uint32_t __SHADD8(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
211 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
212 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
213
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
214 __ASM volatile ("shadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
215 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
216 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
217
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
218 __attribute__( ( always_inline ) ) static __INLINE uint32_t __UADD8(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
219 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
220 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
221
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
222 __ASM volatile ("uadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
223 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
224 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
225
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
226 __attribute__( ( always_inline ) ) static __INLINE uint32_t __UQADD8(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
227 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
228 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
229
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
230 __ASM volatile ("uqadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
231 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
232 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
233
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
234 __attribute__( ( always_inline ) ) static __INLINE uint32_t __UHADD8(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
235 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
236 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
237
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
238 __ASM volatile ("uhadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
239 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
240 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
241
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
242
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
243 __attribute__( ( always_inline ) ) static __INLINE uint32_t __SSUB8(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
244 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
245 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
246
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
247 __ASM volatile ("ssub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
248 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
249 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
250
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
251 __attribute__( ( always_inline ) ) static __INLINE uint32_t __QSUB8(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
252 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
253 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
254
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
255 __ASM volatile ("qsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
256 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
257 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
258
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
259 __attribute__( ( always_inline ) ) static __INLINE uint32_t __SHSUB8(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
260 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
261 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
262
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
263 __ASM volatile ("shsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
264 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
265 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
266
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
267 __attribute__( ( always_inline ) ) static __INLINE uint32_t __USUB8(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
268 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
269 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
270
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
271 __ASM volatile ("usub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
272 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
273 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
274
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
275 __attribute__( ( always_inline ) ) static __INLINE uint32_t __UQSUB8(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
276 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
277 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
278
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
279 __ASM volatile ("uqsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
280 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
281 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
282
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
283 __attribute__( ( always_inline ) ) static __INLINE uint32_t __UHSUB8(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
284 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
285 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
286
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
287 __ASM volatile ("uhsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
288 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
289 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
290
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
291
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
292 __attribute__( ( always_inline ) ) static __INLINE uint32_t __SADD16(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
293 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
294 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
295
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
296 __ASM volatile ("sadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
297 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
298 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
299
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
300 __attribute__( ( always_inline ) ) static __INLINE uint32_t __QADD16(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
301 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
302 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
303
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
304 __ASM volatile ("qadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
305 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
306 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
307
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
308 __attribute__( ( always_inline ) ) static __INLINE uint32_t __SHADD16(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
309 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
310 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
311
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
312 __ASM volatile ("shadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
313 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
314 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
315
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
316 __attribute__( ( always_inline ) ) static __INLINE uint32_t __UADD16(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
317 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
318 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
319
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
320 __ASM volatile ("uadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
321 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
322 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
323
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
324 __attribute__( ( always_inline ) ) static __INLINE uint32_t __UQADD16(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
325 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
326 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
327
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
328 __ASM volatile ("uqadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
329 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
330 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
331
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
332 __attribute__( ( always_inline ) ) static __INLINE uint32_t __UHADD16(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
333 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
334 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
335
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
336 __ASM volatile ("uhadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
337 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
338 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
339
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
340 __attribute__( ( always_inline ) ) static __INLINE uint32_t __SSUB16(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
341 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
342 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
343
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
344 __ASM volatile ("ssub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
345 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
346 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
347
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
348 __attribute__( ( always_inline ) ) static __INLINE uint32_t __QSUB16(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
349 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
350 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
351
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
352 __ASM volatile ("qsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
353 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
354 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
355
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
356 __attribute__( ( always_inline ) ) static __INLINE uint32_t __SHSUB16(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
357 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
358 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
359
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
360 __ASM volatile ("shsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
361 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
362 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
363
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
364 __attribute__( ( always_inline ) ) static __INLINE uint32_t __USUB16(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
365 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
366 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
367
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
368 __ASM volatile ("usub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
369 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
370 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
371
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
372 __attribute__( ( always_inline ) ) static __INLINE uint32_t __UQSUB16(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
373 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
374 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
375
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
376 __ASM volatile ("uqsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
377 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
378 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
379
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
380 __attribute__( ( always_inline ) ) static __INLINE uint32_t __UHSUB16(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
381 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
382 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
383
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
384 __ASM volatile ("uhsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
385 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
386 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
387
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
388 __attribute__( ( always_inline ) ) static __INLINE uint32_t __SASX(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
389 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
390 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
391
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
392 __ASM volatile ("sasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
393 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
394 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
395
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
396 __attribute__( ( always_inline ) ) static __INLINE uint32_t __QASX(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
397 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
398 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
399
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
400 __ASM volatile ("qasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
401 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
402 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
403
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
404 __attribute__( ( always_inline ) ) static __INLINE uint32_t __SHASX(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
405 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
406 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
407
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
408 __ASM volatile ("shasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
409 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
410 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
411
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
412 __attribute__( ( always_inline ) ) static __INLINE uint32_t __UASX(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
413 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
414 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
415
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
416 __ASM volatile ("uasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
417 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
418 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
419
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
420 __attribute__( ( always_inline ) ) static __INLINE uint32_t __UQASX(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
421 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
422 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
423
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
424 __ASM volatile ("uqasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
425 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
426 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
427
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
428 __attribute__( ( always_inline ) ) static __INLINE uint32_t __UHASX(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
429 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
430 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
431
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
432 __ASM volatile ("uhasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
433 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
434 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
435
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
436 __attribute__( ( always_inline ) ) static __INLINE uint32_t __SSAX(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
437 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
438 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
439
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
440 __ASM volatile ("ssax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
441 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
442 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
443
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
444 __attribute__( ( always_inline ) ) static __INLINE uint32_t __QSAX(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
445 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
446 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
447
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
448 __ASM volatile ("qsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
449 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
450 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
451
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
452 __attribute__( ( always_inline ) ) static __INLINE uint32_t __SHSAX(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
453 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
454 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
455
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
456 __ASM volatile ("shsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
457 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
458 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
459
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
460 __attribute__( ( always_inline ) ) static __INLINE uint32_t __USAX(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
461 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
462 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
463
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
464 __ASM volatile ("usax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
465 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
466 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
467
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
468 __attribute__( ( always_inline ) ) static __INLINE uint32_t __UQSAX(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
469 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
470 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
471
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
472 __ASM volatile ("uqsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
473 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
474 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
475
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
476 __attribute__( ( always_inline ) ) static __INLINE uint32_t __UHSAX(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
477 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
478 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
479
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
480 __ASM volatile ("uhsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
481 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
482 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
483
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
484 __attribute__( ( always_inline ) ) static __INLINE uint32_t __USAD8(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
485 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
486 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
487
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
488 __ASM volatile ("usad8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
489 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
490 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
491
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
492 __attribute__( ( always_inline ) ) static __INLINE uint32_t __USADA8(uint32_t op1, uint32_t op2, uint32_t op3)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
493 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
494 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
495
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
496 __ASM volatile ("usada8 %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
497 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
498 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
499
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
500 #define __SSAT16(ARG1,ARG2) \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
501 ({ \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
502 uint32_t __RES, __ARG1 = (ARG1); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
503 __ASM ("ssat16 %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
504 __RES; \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
505 })
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
506
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
507 #define __USAT16(ARG1,ARG2) \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
508 ({ \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
509 uint32_t __RES, __ARG1 = (ARG1); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
510 __ASM ("usat16 %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
511 __RES; \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
512 })
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
513
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
514 __attribute__( ( always_inline ) ) static __INLINE uint32_t __UXTB16(uint32_t op1)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
515 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
516 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
517
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
518 __ASM volatile ("uxtb16 %0, %1" : "=r" (result) : "r" (op1));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
519 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
520 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
521
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
522 __attribute__( ( always_inline ) ) static __INLINE uint32_t __UXTAB16(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
523 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
524 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
525
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
526 __ASM volatile ("uxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
527 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
528 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
529
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
530 __attribute__( ( always_inline ) ) static __INLINE uint32_t __SXTB16(uint32_t op1)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
531 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
532 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
533
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
534 __ASM volatile ("sxtb16 %0, %1" : "=r" (result) : "r" (op1));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
535 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
536 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
537
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
538 __attribute__( ( always_inline ) ) static __INLINE uint32_t __SXTAB16(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
539 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
540 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
541
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
542 __ASM volatile ("sxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
543 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
544 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
545
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
546 __attribute__( ( always_inline ) ) static __INLINE uint32_t __SMUAD (uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
547 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
548 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
549
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
550 __ASM volatile ("smuad %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
551 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
552 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
553
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
554 __attribute__( ( always_inline ) ) static __INLINE uint32_t __SMUADX (uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
555 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
556 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
557
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
558 __ASM volatile ("smuadx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
559 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
560 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
561
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
562 __attribute__( ( always_inline ) ) static __INLINE uint32_t __SMLAD (uint32_t op1, uint32_t op2, uint32_t op3)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
563 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
564 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
565
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
566 __ASM volatile ("smlad %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
567 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
568 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
569
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
570 __attribute__( ( always_inline ) ) static __INLINE uint32_t __SMLADX (uint32_t op1, uint32_t op2, uint32_t op3)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
571 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
572 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
573
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
574 __ASM volatile ("smladx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
575 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
576 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
577
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
578 #define __SMLALD(ARG1,ARG2,ARG3) \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
579 ({ \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
580 uint32_t __ARG1 = (ARG1), __ARG2 = (ARG2), __ARG3_H = (uint32_t)((uint64_t)(ARG3) >> 32), __ARG3_L = (uint32_t)((uint64_t)(ARG3) & 0xFFFFFFFFUL); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
581 __ASM volatile ("smlald %0, %1, %2, %3" : "=r" (__ARG3_L), "=r" (__ARG3_H) : "r" (__ARG1), "r" (__ARG2), "0" (__ARG3_L), "1" (__ARG3_H) ); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
582 (uint64_t)(((uint64_t)__ARG3_H << 32) | __ARG3_L); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
583 })
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
584
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
585 #define __SMLALDX(ARG1,ARG2,ARG3) \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
586 ({ \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
587 uint32_t __ARG1 = (ARG1), __ARG2 = (ARG2), __ARG3_H = (uint32_t)((uint64_t)(ARG3) >> 32), __ARG3_L = (uint32_t)((uint64_t)(ARG3) & 0xFFFFFFFFUL); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
588 __ASM volatile ("smlaldx %0, %1, %2, %3" : "=r" (__ARG3_L), "=r" (__ARG3_H) : "r" (__ARG1), "r" (__ARG2), "0" (__ARG3_L), "1" (__ARG3_H) ); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
589 (uint64_t)(((uint64_t)__ARG3_H << 32) | __ARG3_L); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
590 })
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
591
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
592 __attribute__( ( always_inline ) ) static __INLINE uint32_t __SMUSD (uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
593 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
594 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
595
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
596 __ASM volatile ("smusd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
597 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
598 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
599
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
600 __attribute__( ( always_inline ) ) static __INLINE uint32_t __SMUSDX (uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
601 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
602 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
603
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
604 __ASM volatile ("smusdx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
605 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
606 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
607
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
608 __attribute__( ( always_inline ) ) static __INLINE uint32_t __SMLSD (uint32_t op1, uint32_t op2, uint32_t op3)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
609 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
610 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
611
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
612 __ASM volatile ("smlsd %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
613 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
614 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
615
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
616 __attribute__( ( always_inline ) ) static __INLINE uint32_t __SMLSDX (uint32_t op1, uint32_t op2, uint32_t op3)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
617 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
618 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
619
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
620 __ASM volatile ("smlsdx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
621 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
622 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
623
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
624 #define __SMLSLD(ARG1,ARG2,ARG3) \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
625 ({ \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
626 uint32_t __ARG1 = (ARG1), __ARG2 = (ARG2), __ARG3_H = (uint32_t)((ARG3) >> 32), __ARG3_L = (uint32_t)((ARG3) & 0xFFFFFFFFUL); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
627 __ASM volatile ("smlsld %0, %1, %2, %3" : "=r" (__ARG3_L), "=r" (__ARG3_H) : "r" (__ARG1), "r" (__ARG2), "0" (__ARG3_L), "1" (__ARG3_H) ); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
628 (uint64_t)(((uint64_t)__ARG3_H << 32) | __ARG3_L); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
629 })
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
630
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
631 #define __SMLSLDX(ARG1,ARG2,ARG3) \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
632 ({ \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
633 uint32_t __ARG1 = (ARG1), __ARG2 = (ARG2), __ARG3_H = (uint32_t)((ARG3) >> 32), __ARG3_L = (uint32_t)((ARG3) & 0xFFFFFFFFUL); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
634 __ASM volatile ("smlsldx %0, %1, %2, %3" : "=r" (__ARG3_L), "=r" (__ARG3_H) : "r" (__ARG1), "r" (__ARG2), "0" (__ARG3_L), "1" (__ARG3_H) ); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
635 (uint64_t)(((uint64_t)__ARG3_H << 32) | __ARG3_L); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
636 })
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
637
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
638 __attribute__( ( always_inline ) ) static __INLINE uint32_t __SEL (uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
639 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
640 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
641
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
642 __ASM volatile ("sel %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
643 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
644 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
645
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
646 __attribute__( ( always_inline ) ) static __INLINE uint32_t __QADD(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
647 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
648 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
649
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
650 __ASM volatile ("qadd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
651 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
652 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
653
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
654 __attribute__( ( always_inline ) ) static __INLINE uint32_t __QSUB(uint32_t op1, uint32_t op2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
655 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
656 uint32_t result;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
657
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
658 __ASM volatile ("qsub %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
659 return(result);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
660 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
661
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
662 #define __PKHBT(ARG1,ARG2,ARG3) \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
663 ({ \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
664 uint32_t __RES, __ARG1 = (ARG1), __ARG2 = (ARG2); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
665 __ASM ("pkhbt %0, %1, %2, lsl %3" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2), "I" (ARG3) ); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
666 __RES; \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
667 })
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
668
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
669 #define __PKHTB(ARG1,ARG2,ARG3) \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
670 ({ \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
671 uint32_t __RES, __ARG1 = (ARG1), __ARG2 = (ARG2); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
672 if (ARG3 == 0) \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
673 __ASM ("pkhtb %0, %1, %2" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2) ); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
674 else \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
675 __ASM ("pkhtb %0, %1, %2, asr %3" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2), "I" (ARG3) ); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
676 __RES; \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
677 })
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
678
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
679 /*-- End CM4 SIMD Intrinsics -----------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
680
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
681
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
682
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
683 #elif defined ( __TASKING__ ) /*------------------ TASKING Compiler --------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
684 /* TASKING carm specific functions */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
685
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
686
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
687 /*------ CM4 SIMD Intrinsics -----------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
688 /* not yet supported */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
689 /*-- End CM4 SIMD Intrinsics -----------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
690
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
691
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
692 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
693
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
694 /*@} end of group CMSIS_SIMD_intrinsics */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
695
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
696
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
697 #endif /* __CORE_CM4_SIMD_H */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
698
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
699 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
700 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
701 #endif