thanks

all of the aso assembler code is in
        src/lib/libast/features/aso
this iffe script defines (possibly a subset) of these macros (gcc 4.1+ shown 
here)
        #define _aso_cas8(p,o,n)        __sync_val_compare_and_swap(p,o,n)
        #define _aso_inc8(p)            __sync_fetch_and_add(p,1)
        #define _aso_dec8(p)            __sync_fetch_and_sub(p,1)
        #define _aso_cas16(p,o,n)       __sync_val_compare_and_swap(p,o,n)
        #define _aso_inc16(p)           __sync_fetch_and_add(p,1)
        #define _aso_dec16(p)           __sync_fetch_and_sub(p,1)
        #define _aso_cas32(p,o,n)       __sync_val_compare_and_swap(p,o,n)
        #define _aso_inc32(p)           __sync_fetch_and_add(p,1)
        #define _aso_dec32(p)           __sync_fetch_and_sub(p,1)
        #define _aso_cas64(p,o,n)       __sync_val_compare_and_swap(p,o,n)
        #define _aso_inc64(p)           __sync_fetch_and_add(p,1)
        #define _aso_dec64(p)           __sync_fetch_and_sub(p,1)
        #if _ast_sizeof_pointer == 8
        #define _aso_casptr(p,o,n)      
((void*)__sync_val_compare_and_swap(p,(uint64_t)o,(uint64_t)n))
        #else
        #define _aso_casptr(p,o,n)      
((void*)__sync_val_compare_and_swap(p,(uint32_t)o,(uint32_t)n))
        #endif
*and* and supporting code, declared as static functions, typically assember
e.g., the note{ ppc asm compare and swap }end case
the if-elif cases should be placed in order of preference, best first
not all of the above need to be defined
the aso code will compose the defined one to implement the undefined ones
but in general its best to define as many intrinsics as the compiler/system 
provide

the generated header FEATURE/aso is only included once by
        src/lib/libast/aso/aso.c
(well I just double checked and that is not currently the case -- this will be 
fixed)

On Mon, 21 May 2012 09:33:58 +0200 Irek Szczesniak wrote:
> Glenn, can you send me the list of files (to
> [email protected],) which contain the new AST aso
> assembler code? We way want to look at getting SPARC and ARM versions
> of the code implemented.

> Irek

_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to