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