The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
Kojto
Date:
Tue Feb 14 11:24:20 2017 +0000
Revision:
136:ef9c61f8c49f
Parent:
112:6f327212ef96
Release 136 of the mbed library

Ports for Upcoming Targets


Fixes and Changes

3432: Target STM USBHOST support https://github.com/ARMmbed/mbed-os/pull/3432
3181: NUCLEO_F207ZG extending PeripheralPins.c: all available alternate functions can be used now https://github.com/ARMmbed/mbed-os/pull/3181
3626: NUCLEO_F412ZG : Add USB Device +Host https://github.com/ARMmbed/mbed-os/pull/3626
3628: Fix warnings https://github.com/ARMmbed/mbed-os/pull/3628
3629: STM32: L0 LL layer https://github.com/ARMmbed/mbed-os/pull/3629
3632: IDE Export support for platform VK_RZ_A1H https://github.com/ARMmbed/mbed-os/pull/3632
3642: Missing IRQ pin fix for platform VK_RZ_A1H https://github.com/ARMmbed/mbed-os/pull/3642
3664: Fix ncs36510 sleep definitions https://github.com/ARMmbed/mbed-os/pull/3664
3655: [STM32F4] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3655
3657: [STM32L4] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3657
3658: [STM32F3] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3658
3685: STM32: I2C: reset state machine https://github.com/ARMmbed/mbed-os/pull/3685
3692: uVisor: Standardize available legacy heap and stack https://github.com/ARMmbed/mbed-os/pull/3692
3621: Fix for #2884, LPC824: export to LPCXpresso, target running with wron https://github.com/ARMmbed/mbed-os/pull/3621
3649: [STM32F7] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3649
3695: Enforce device_name is valid in targets.json https://github.com/ARMmbed/mbed-os/pull/3695
3723: NCS36510: spi_format function bug fix https://github.com/ARMmbed/mbed-os/pull/3723

Who changed what in which revision?

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