kernel/eka/include/cpudefs.h
changeset 11 329ab0095843
parent 9 96e5fb8b040d
child 43 c1f20ce4abcf
equal deleted inserted replaced
10:36bfc973b146 11:329ab0095843
   616 // Inline assembler is deprecated in RVCT 3.1 so we use an intrinsic.
   616 // Inline assembler is deprecated in RVCT 3.1 so we use an intrinsic.
   617 #define __crash()						__cdp(15, 0x00, 0x000)
   617 #define __crash()						__cdp(15, 0x00, 0x000)
   618 #endif
   618 #endif
   619 #endif
   619 #endif
   620 
   620 
       
   621 // Macro used to get the caller of the function containing a CHECK_PRECONDITIONS()
       
   622 #if defined(__ARMCC_VERSION) && __ARMCC_VERSION >= 200000
       
   623 #define PRECOND_FUNCTION_CALLER		__return_address()
       
   624 #endif
       
   625 
   621 #if !defined(__CPU_ARM_HAS_LDREX_STREX_V6K)
   626 #if !defined(__CPU_ARM_HAS_LDREX_STREX_V6K)
   622 #if defined(__CPU_ARM_HAS_LDREX_STREX)
   627 #if defined(__CPU_ARM_HAS_LDREX_STREX)
   623 #define	__ATOMIC64_USE_SLOW_EXEC__
   628 #define	__ATOMIC64_USE_SLOW_EXEC__
   624 #else
   629 #else
   625 #define	__ATOMIC64_USE_FAST_EXEC__
   630 #define	__ATOMIC64_USE_FAST_EXEC__
   637 #define	__crash()						do { _asm int 0ffh } while(0)
   642 #define	__crash()						do { _asm int 0ffh } while(0)
   638 #else
   643 #else
   639 #define	__crash()						asm("int 0xff " : : : "memory")
   644 #define	__crash()						asm("int 0xff " : : : "memory")
   640 #endif
   645 #endif
   641 
   646 
       
   647 #ifdef __VC32__
       
   648 // Not available in the version of MSVC normally used
       
   649 // #define PRECOND_FUNCTION_CALLER		((TLinAddr)_ReturnAddress())
       
   650 #endif
       
   651 
   642 #endif	// __CPU_X86
   652 #endif	// __CPU_X86
   643 
   653 
   644 #endif
   654 #ifdef __GCC32__
       
   655 #define PRECOND_FUNCTION_CALLER		((TLinAddr)__builtin_return_address(0))
       
   656 #endif
       
   657 
       
   658 #endif