1 /****************************************************************************/
2 #if( defined __GNUC__ )
4 #ifdef LIBTEST_PAL_COMPILER
5 #error More than one porting abstraction layer matches the current platform in "libtest_porting_abstraction_layer_compiler.h".
8 #define LIBTEST_PAL_COMPILER
10 #if( defined __arm__ )
11 // TRD : lfds710_pal_uint_t destination, lfds710_pal_uint_t *source
12 #define LIBTEST_PAL_LOAD_LINKED( destination, source ) \
14 __asm__ __volatile__ \
16 "ldrex %[alias_dst], [%[alias_src]];" \
17 : [alias_dst] "=r" (destination) \
18 : [alias_src] "r" (source) \
22 // TRD : lfds710_pal_uint_t *destination, lfds710_pal_uint_t source, lfds710_pal_uint_t stored_flag
23 #define LIBTEST_PAL_STORE_CONDITIONAL( destination, source, stored_flag ) \
25 __asm__ __volatile__ \
27 "strex %[alias_sf], %[alias_src], [%[alias_dst]];" \
28 : "=m" (*destination), \
29 [alias_sf] "=&r" (stored_flag) \
30 : [alias_src] "r" (source), \
31 [alias_dst] "r" (destination) \
42 /****************************************************************************/
43 #if( defined _WIN32 && defined KERNEL_MODE && defined _M_IX86 )
45 #define LIBTEST_PAL_PROCESSOR
47 // TRD : bloody x86 on MSVC...
49 #define LIBTEST_PAL_STDLIB_CALLBACK_CALLING_CONVENTION __cdecl
57 /****************************************************************************/
58 #if( !defined LIBTEST_PAL_PROCESSOR )
60 #define LIBTEST_PAL_STDLIB_CALLBACK_CALLING_CONVENTION