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