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