meh

Fork of mbed by mbed official

Committer:
ricardobtez
Date:
Tue Apr 05 23:51:21 2016 +0000
Revision:
118:16969dd821af
Parent:
91:031413cf7a89
Child:
97:433970e64889
dgdgr

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 91:031413cf7a89 1 /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved.
Kojto 91:031413cf7a89 2 *
Kojto 91:031413cf7a89 3 * The information contained herein is confidential property of Nordic
Kojto 91:031413cf7a89 4 * Semiconductor ASA.Terms and conditions of usage are described in detail
Kojto 91:031413cf7a89 5 * in NORDIC SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
Kojto 91:031413cf7a89 6 *
Kojto 91:031413cf7a89 7 * Licensees are granted free, non-transferable use of the information. NO
Kojto 91:031413cf7a89 8 * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
Kojto 91:031413cf7a89 9 * the file.
Kojto 91:031413cf7a89 10 *
Kojto 91:031413cf7a89 11 */
Kojto 91:031413cf7a89 12
Kojto 91:031413cf7a89 13 #ifndef _COMPILER_ABSTRACTION_H
Kojto 91:031413cf7a89 14 #define _COMPILER_ABSTRACTION_H
Kojto 91:031413cf7a89 15
Kojto 91:031413cf7a89 16 /*lint ++flb "Enter library region" */
Kojto 91:031413cf7a89 17
Kojto 91:031413cf7a89 18 #if defined ( __CC_ARM )
Kojto 91:031413cf7a89 19 #define __ASM __asm /*!< asm keyword for ARM Compiler */
Kojto 91:031413cf7a89 20 #define __INLINE __inline /*!< inline keyword for ARM Compiler */
Kojto 91:031413cf7a89 21 #define __STATIC_INLINE static __inline
Kojto 91:031413cf7a89 22
Kojto 91:031413cf7a89 23 #elif defined ( __ICCARM__ )
Kojto 91:031413cf7a89 24 #define __ASM __asm /*!< asm keyword for IAR Compiler */
Kojto 91:031413cf7a89 25 #define __INLINE inline /*!< inline keyword for IAR Compiler. Only available in High optimization mode! */
Kojto 91:031413cf7a89 26 #define __STATIC_INLINE static inline
Kojto 91:031413cf7a89 27 #define __current_sp() __get_SP()
Kojto 91:031413cf7a89 28
Kojto 91:031413cf7a89 29 #elif defined ( __GNUC__ )
Kojto 91:031413cf7a89 30 #define __ASM __asm /*!< asm keyword for GNU Compiler */
Kojto 91:031413cf7a89 31 #define __INLINE inline /*!< inline keyword for GNU Compiler */
Kojto 91:031413cf7a89 32 #define __STATIC_INLINE static inline
Kojto 91:031413cf7a89 33
Kojto 91:031413cf7a89 34 static __INLINE unsigned int __current_sp(void)
Kojto 91:031413cf7a89 35 {
Kojto 91:031413cf7a89 36 register unsigned sp asm("sp");
Kojto 91:031413cf7a89 37 return sp;
Kojto 91:031413cf7a89 38 }
Kojto 91:031413cf7a89 39
Kojto 91:031413cf7a89 40 #elif defined ( __TASKING__ )
Kojto 91:031413cf7a89 41 #define __ASM __asm /*!< asm keyword for TASKING Compiler */
Kojto 91:031413cf7a89 42 #define __INLINE inline /*!< inline keyword for TASKING Compiler */
Kojto 91:031413cf7a89 43 #define __STATIC_INLINE static inline
Kojto 91:031413cf7a89 44
Kojto 91:031413cf7a89 45 #endif
Kojto 91:031413cf7a89 46
Kojto 91:031413cf7a89 47 /*lint --flb "Leave library region" */
Kojto 91:031413cf7a89 48
Kojto 91:031413cf7a89 49 #endif