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:
Mon Jan 16 12:05:23 2017 +0000
Revision:
134:ad3be0349dc5
Parent:
122:f9eeca106725
Release 134 of the mbed library

Ports for Upcoming Targets


Fixes and Changes

3488: Dev stm i2c v2 unitary functions https://github.com/ARMmbed/mbed-os/pull/3488
3492: Fix #3463 CAN read() return value https://github.com/ARMmbed/mbed-os/pull/3492
3503: [LPC15xx] Ensure that PWM=1 is resolved correctly https://github.com/ARMmbed/mbed-os/pull/3503
3504: [LPC15xx] CAN implementation improvements https://github.com/ARMmbed/mbed-os/pull/3504
3539: NUCLEO_F412ZG - Add support of TRNG peripheral https://github.com/ARMmbed/mbed-os/pull/3539
3540: STM: SPI: Initialize Rx in spi_master_write https://github.com/ARMmbed/mbed-os/pull/3540
3438: K64F: Add support for SERIAL ASYNCH API https://github.com/ARMmbed/mbed-os/pull/3438
3519: MCUXpresso: Fix ENET driver to enable interrupts after interrupt handler is set https://github.com/ARMmbed/mbed-os/pull/3519
3544: STM32L4 deepsleep improvement https://github.com/ARMmbed/mbed-os/pull/3544
3546: NUCLEO-F412ZG - Add CAN peripheral https://github.com/ARMmbed/mbed-os/pull/3546
3551: Fix I2C driver for RZ/A1H https://github.com/ARMmbed/mbed-os/pull/3551
3558: K64F UART Asynch API: Fix synchronization issue https://github.com/ARMmbed/mbed-os/pull/3558
3563: LPC4088 - Fix vector checksum https://github.com/ARMmbed/mbed-os/pull/3563
3567: Dev stm32 F0 v1.7.0 https://github.com/ARMmbed/mbed-os/pull/3567
3577: Fixes linking errors when building with debug profile https://github.com/ARMmbed/mbed-os/pull/3577

Who changed what in which revision?

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