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:
<>
Date:
Tue Mar 14 16:20:51 2017 +0000
Revision:
138:093f2bd7b9eb
Parent:
113:f141b2784e32
Release 138 of the mbed library

Ports for Upcoming Targets


Fixes and Changes

3716: fix for issue #3715: correction in startup files for ARM and IAR, alignment of system_stm32f429xx.c files https://github.com/ARMmbed/mbed-os/pull/3716
3741: STM32 remove warning in hal_tick_32b.c file https://github.com/ARMmbed/mbed-os/pull/3741
3780: STM32L4 : Fix GPIO G port compatibility https://github.com/ARMmbed/mbed-os/pull/3780
3831: NCS36510: SPISLAVE enabled (Conflict resolved) https://github.com/ARMmbed/mbed-os/pull/3831
3836: Allow to redefine nRF's PSTORAGE_NUM_OF_PAGES outside of the mbed-os https://github.com/ARMmbed/mbed-os/pull/3836
3840: STM32: gpio SPEED - always set High Speed by default https://github.com/ARMmbed/mbed-os/pull/3840
3844: STM32 GPIO: Typo correction. Update comment (GPIO_IP_WITHOUT_BRR) https://github.com/ARMmbed/mbed-os/pull/3844
3850: STM32: change spi error to debug warning https://github.com/ARMmbed/mbed-os/pull/3850
3860: Define GPIO_IP_WITHOUT_BRR for xDot platform https://github.com/ARMmbed/mbed-os/pull/3860
3880: DISCO_F469NI: allow the use of CAN2 instance when CAN1 is not activated https://github.com/ARMmbed/mbed-os/pull/3880
3795: Fix pwm period calc https://github.com/ARMmbed/mbed-os/pull/3795
3828: STM32 CAN API: correct format and type https://github.com/ARMmbed/mbed-os/pull/3828
3842: TARGET_NRF: corrected spi_init() to properly handle re-initialization https://github.com/ARMmbed/mbed-os/pull/3842
3843: STM32L476xG: set APB2 clock to 80MHz (instead of 40MHz) https://github.com/ARMmbed/mbed-os/pull/3843
3879: NUCLEO_F446ZE: Add missing AnalogIn pins on PF_3, PF_5 and PF_10. https://github.com/ARMmbed/mbed-os/pull/3879
3902: Fix heap and stack size for NUCLEO_F746ZG https://github.com/ARMmbed/mbed-os/pull/3902
3829: can_write(): return error code when no tx mailboxes are available https://github.com/ARMmbed/mbed-os/pull/3829

Who changed what in which revision?

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