Changeset 533540a


Ignore:
Timestamp:
May 28, 2018, 5:02:07 PM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
Children:
17238fd, 4ee3b0c1
Parents:
13e8427 (diff), 1f81d61 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg2:software/cfa/cfa-cc

Location:
src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/preemption.c

    r13e8427 r533540a  
    161161        void disable_interrupts() {
    162162                with( kernelTLS.preemption_state ) {
     163                        #if GCC_VERSION > 50000
    163164                        static_assert(__atomic_always_lock_free(sizeof(enabled), &enabled), "Must be lock-free");
     165                        #endif
    164166
    165167                        // Set enabled flag to false
     
    190192                        // Check if we need to prempt the thread because an interrupt was missed
    191193                        if( prev == 1 ) {
     194                                #if GCC_VERSION > 50000
    192195                                static_assert(__atomic_always_lock_free(sizeof(enabled), &enabled), "Must be lock-free");
     196                                #endif
    193197
    194198                                // Set enabled flag to true
     
    217221                verifyf( prev != 0u, "Incremented from %u\n", prev );                     // If this triggers someone is enabled already enabled interrupts
    218222                if( prev == 1 ) {
     223                        #if GCC_VERSION > 50000
    219224                        static_assert(__atomic_always_lock_free(sizeof(kernelTLS.preemption_state.enabled), &kernelTLS.preemption_state.enabled), "Must be lock-free");
     225                        #endif
    220226                        // Set enabled flag to true
    221227                        // should be atomic to avoid preemption in the middle of the operation.
     
    376382
    377383        // Clear sighandler mask before context switching.
     384        #if GCC_VERSION > 50000
    378385        static_assert( sizeof( sigset_t ) == sizeof( cxt->uc_sigmask ), "Expected cxt->uc_sigmask to be of sigset_t" );
     386        #endif
    379387        if ( pthread_sigmask( SIG_SETMASK, (sigset_t *)&(cxt->uc_sigmask), NULL ) == -1 ) {
    380388                abort( "internal error, sigprocmask" );
  • src/prelude/Makefile.am

    r13e8427 r533540a  
    3737# create forward declarations for gcc builtins
    3838gcc-builtins.cf : gcc-builtins.c prototypes.sed
    39         ${AM_V_GEN}@BACKEND_CC@ -E -P $< | sed -r -f prototypes.sed > $@
     39        ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -E -P $< | sed -r -f prototypes.sed > $@
    4040
    4141gcc-builtins.c : builtins.def prototypes.awk sync-builtins.cf
    42         ${AM_V_GEN}@BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@
     42        ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -E prototypes.c | awk -f prototypes.awk > $@
    4343
    4444builtins.def :
  • src/prelude/Makefile.in

    r13e8427 r533540a  
    506506# create forward declarations for gcc builtins
    507507gcc-builtins.cf : gcc-builtins.c prototypes.sed
    508         ${AM_V_GEN}@BACKEND_CC@ -E -P $< | sed -r -f prototypes.sed > $@
     508        ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -E -P $< | sed -r -f prototypes.sed > $@
    509509
    510510gcc-builtins.c : builtins.def prototypes.awk sync-builtins.cf
    511         ${AM_V_GEN}@BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@
     511        ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -E prototypes.c | awk -f prototypes.awk > $@
    512512
    513513builtins.def :
  • src/prelude/prelude.cf

    r13e8427 r533540a  
    458458signed long long int    ?=?( signed long long int &, signed long long int ),    ?=?( volatile signed long long int &, signed long long int );
    459459unsigned long long int  ?=?( unsigned long long int &, unsigned long long int ), ?=?( volatile unsigned long long int &, unsigned long long int );
    460 __int128        ?=?( __int128 &, __int128 ),    ?=?( volatile __int128 &, __int128 );
    461460zero_t                  ?=?( zero_t &, zero_t );
    462461one_t                   ?=?( one_t &, one_t );
  • src/prelude/sync-builtins.cf

    r13e8427 r533540a  
    77long long int __sync_fetch_and_add(volatile long long int *, long long int,...);
    88long long int __sync_fetch_and_add_8(volatile long long int *, long long int,...);
     9#if defined(__SIZEOF_INT128__)
    910__int128 __sync_fetch_and_add(volatile __int128 *, __int128,...);
    1011__int128 __sync_fetch_and_add_16(volatile __int128 *, __int128,...);
     12#endif
    1113
    1214char __sync_fetch_and_sub(volatile char *, char,...);
     
    1820long long int __sync_fetch_and_sub(volatile long long int *, long long int,...);
    1921long long int __sync_fetch_and_sub_8(volatile long long int *, long long int,...);
     22#if defined(__SIZEOF_INT128__)
    2023__int128 __sync_fetch_and_sub(volatile __int128 *, __int128,...);
    2124__int128 __sync_fetch_and_sub_16(volatile __int128 *, __int128,...);
     25#endif
    2226
    2327char __sync_fetch_and_or(volatile char *, char,...);
     
    2933long long int __sync_fetch_and_or(volatile long long int *, long long int,...);
    3034long long int __sync_fetch_and_or_8(volatile long long int *, long long int,...);
     35#if defined(__SIZEOF_INT128__)
    3136__int128 __sync_fetch_and_or(volatile __int128 *, __int128,...);
    3237__int128 __sync_fetch_and_or_16(volatile __int128 *, __int128,...);
     38#endif
    3339
    3440char __sync_fetch_and_and(volatile char *, char,...);
     
    4046long long int __sync_fetch_and_and(volatile long long int *, long long int,...);
    4147long long int __sync_fetch_and_and_8(volatile long long int *, long long int,...);
     48#if defined(__SIZEOF_INT128__)
    4249__int128 __sync_fetch_and_and(volatile __int128 *, __int128,...);
    4350__int128 __sync_fetch_and_and_16(volatile __int128 *, __int128,...);
     51#endif
    4452
    4553char __sync_fetch_and_xor(volatile char *, char,...);
     
    5159long long int __sync_fetch_and_xor(volatile long long int *, long long int,...);
    5260long long int __sync_fetch_and_xor_8(volatile long long int *, long long int,...);
     61#if defined(__SIZEOF_INT128__)
    5362__int128 __sync_fetch_and_xor(volatile __int128 *, __int128,...);
    5463__int128 __sync_fetch_and_xor_16(volatile __int128 *, __int128,...);
     64#endif
    5565
    5666char __sync_fetch_and_nand(volatile char *, char,...);
     
    6272long long int __sync_fetch_and_nand(volatile long long int *, long long int,...);
    6373long long int __sync_fetch_and_nand_8(volatile long long int *, long long int,...);
     74#if defined(__SIZEOF_INT128__)
    6475__int128 __sync_fetch_and_nand(volatile __int128 *, __int128,...);
    6576__int128 __sync_fetch_and_nand_16(volatile __int128 *, __int128,...);
     77#endif
    6678
    6779char __sync_add_and_fetch(volatile char *, char,...);
     
    7385long long int __sync_add_and_fetch(volatile long long int *, long long int,...);
    7486long long int __sync_add_and_fetch_8(volatile long long int *, long long int,...);
     87#if defined(__SIZEOF_INT128__)
    7588__int128 __sync_add_and_fetch(volatile __int128 *, __int128,...);
    7689__int128 __sync_add_and_fetch_16(volatile __int128 *, __int128,...);
     90#endif
    7791
    7892char __sync_sub_and_fetch(volatile char *, char,...);
     
    8498long long int __sync_sub_and_fetch(volatile long long int *, long long int,...);
    8599long long int __sync_sub_and_fetch_8(volatile long long int *, long long int,...);
     100#if defined(__SIZEOF_INT128__)
    86101__int128 __sync_sub_and_fetch(volatile __int128 *, __int128,...);
    87102__int128 __sync_sub_and_fetch_16(volatile __int128 *, __int128,...);
     103#endif
    88104
    89105char __sync_or_and_fetch(volatile char *, char,...);
     
    95111long long int __sync_or_and_fetch(volatile long long int *, long long int,...);
    96112long long int __sync_or_and_fetch_8(volatile long long int *, long long int,...);
     113#if defined(__SIZEOF_INT128__)
    97114__int128 __sync_or_and_fetch(volatile __int128 *, __int128,...);
    98115__int128 __sync_or_and_fetch_16(volatile __int128 *, __int128,...);
     116#endif
    99117
    100118char __sync_and_and_fetch(volatile char *, char,...);
     
    106124long long int __sync_and_and_fetch(volatile long long int *, long long int,...);
    107125long long int __sync_and_and_fetch_8(volatile long long int *, long long int,...);
     126#if defined(__SIZEOF_INT128__)
    108127__int128 __sync_and_and_fetch(volatile __int128 *, __int128,...);
    109128__int128 __sync_and_and_fetch_16(volatile __int128 *, __int128,...);
     129#endif
    110130
    111131char __sync_xor_and_fetch(volatile char *, char,...);
     
    117137long long int __sync_xor_and_fetch(volatile long long int *, long long int,...);
    118138long long int __sync_xor_and_fetch_8(volatile long long int *, long long int,...);
     139#if defined(__SIZEOF_INT128__)
    119140__int128 __sync_xor_and_fetch(volatile __int128 *, __int128,...);
    120141__int128 __sync_xor_and_fetch_16(volatile __int128 *, __int128,...);
     142#endif
    121143
    122144char __sync_nand_and_fetch(volatile char *, char,...);
     
    128150long long int __sync_nand_and_fetch(volatile long long int *, long long int,...);
    129151long long int __sync_nand_and_fetch_8(volatile long long int *, long long int,...);
     152#if defined(__SIZEOF_INT128__)
    130153__int128 __sync_nand_and_fetch(volatile __int128 *, __int128,...);
    131154__int128 __sync_nand_and_fetch_16(volatile __int128 *, __int128,...);
     155#endif
    132156
    133157_Bool __sync_bool_compare_and_swap(volatile char *, char, char,...);
     
    139163_Bool __sync_bool_compare_and_swap(volatile long long int *, long long int, long long int,...);
    140164_Bool __sync_bool_compare_and_swap_8(volatile long long int *, long long int, long long int,...);
     165#if defined(__SIZEOF_INT128__)
    141166_Bool __sync_bool_compare_and_swap(volatile __int128 *, __int128, __int128,...);
    142167_Bool __sync_bool_compare_and_swap_16(volatile __int128 *, __int128, __int128,...);
     168#endif
    143169
    144170char __sync_val_compare_and_swap(volatile char *, char, char,...);
     
    150176long long int __sync_val_compare_and_swap(volatile long long int *, long long int, long long int,...);
    151177long long int __sync_val_compare_and_swap_8(volatile long long int *, long long int, long long int,...);
     178#if defined(__SIZEOF_INT128__)
    152179__int128 __sync_val_compare_and_swap(volatile __int128 *, __int128, __int128,...);
    153180__int128 __sync_val_compare_and_swap_16(volatile __int128 *, __int128, __int128,...);
     181#endif
    154182
    155183char __sync_lock_test_and_set(volatile char *, char,...);
     
    161189long long int __sync_lock_test_and_set(volatile long long int *, long long int,...);
    162190long long int __sync_lock_test_and_set_8(volatile long long int *, long long int,...);
     191#if defined(__SIZEOF_INT128__)
    163192__int128 __sync_lock_test_and_set(volatile __int128 *, __int128,...);
    164193__int128 __sync_lock_test_and_set_16(volatile __int128 *, __int128,...);
     194#endif
    165195
    166196void __sync_lock_release(volatile char *,...);
     
    172202void __sync_lock_release(volatile long long int *,...);
    173203void __sync_lock_release_8(volatile long long int *,...);
     204#if defined(__SIZEOF_INT128__)
    174205void __sync_lock_release(volatile __int128 *,...);
    175206void __sync_lock_release_16(volatile __int128 *,...);
     207#endif
    176208
    177209void __sync_synchronize();
     
    185217_Bool __atomic_test_and_set(volatile int *, int);
    186218_Bool __atomic_test_and_set(volatile long long int *, int);
     219#if defined(__SIZEOF_INT128__)
    187220_Bool __atomic_test_and_set(volatile __int128 *, int);
     221#endif
     222
    188223void __atomic_clear(volatile _Bool *, int);
    189224void __atomic_clear(volatile char *, int);
     
    191226void __atomic_clear(volatile int *, int);
    192227void __atomic_clear(volatile long long int *, int);
     228#if defined(__SIZEOF_INT128__)
    193229void __atomic_clear(volatile __int128 *, int);
     230#endif
    194231
    195232char __atomic_exchange_n(volatile char *, volatile char *, int);
     
    205242long long int __atomic_exchange_8(volatile long long int *, long long int, int);
    206243void __atomic_exchange(volatile long long int *, volatile long long int *, volatile long long int *, int);
     244#if defined(__SIZEOF_INT128__)
    207245__int128 __atomic_exchange_n(volatile __int128 *, volatile __int128 *, int);
    208246__int128 __atomic_exchange_16(volatile __int128 *, __int128, int);
    209247void __atomic_exchange(volatile __int128 *, volatile __int128 *, volatile __int128 *, int);
     248#endif
    210249
    211250char __atomic_load_n(const volatile char *, int);
     
    221260long long int __atomic_load_8(const volatile long long int *, int);
    222261void __atomic_load(const volatile long long int *, volatile long long int *, int);
     262#if defined(__SIZEOF_INT128__)
    223263__int128 __atomic_load_n(const volatile __int128 *, int);
    224264__int128 __atomic_load_16(const volatile __int128 *, int);
    225265void __atomic_load(const volatile __int128 *, volatile __int128 *, int);
     266#endif
    226267
    227268_Bool __atomic_compare_exchange_n(volatile char *, char *, char, _Bool, int, int);
     
    237278_Bool __atomic_compare_exchange_8(volatile long long int *, long long int *, long long int, _Bool, int, int);
    238279_Bool __atomic_compare_exchange  (volatile long long int *, long long int *, long long int *, _Bool, int, int);
     280#if defined(__SIZEOF_INT128__)
    239281_Bool __atomic_compare_exchange_n (volatile __int128 *, __int128 *, __int128, _Bool, int, int);
    240282_Bool __atomic_compare_exchange_16(volatile __int128 *, __int128 *, __int128, _Bool, int, int);
    241283_Bool __atomic_compare_exchange   (volatile __int128 *, __int128 *, __int128 *, _Bool, int, int);
     284#endif
    242285
    243286void __atomic_store_n(volatile _Bool *, _Bool, int);
     
    256299void __atomic_store_8(volatile long long int *, long long int, int);
    257300void __atomic_store(volatile long long int *, long long int *, int);
     301#if defined(__SIZEOF_INT128__)
    258302void __atomic_store_n(volatile __int128 *, __int128, int);
    259303void __atomic_store_16(volatile __int128 *, __int128, int);
    260304void __atomic_store(volatile __int128 *, __int128 *, int);
     305#endif
    261306
    262307char __atomic_add_fetch  (volatile char *, char, int);
     
    268313long long int __atomic_add_fetch  (volatile long long int *, long long int, int);
    269314long long int __atomic_add_fetch_8(volatile long long int *, long long int, int);
     315#if defined(__SIZEOF_INT128__)
    270316__int128 __atomic_add_fetch   (volatile __int128 *, __int128, int);
    271317__int128 __atomic_add_fetch_16(volatile __int128 *, __int128, int);
     318#endif
    272319
    273320char __atomic_sub_fetch  (volatile char *, char, int);
     
    279326long long int __atomic_sub_fetch  (volatile long long int *, long long int, int);
    280327long long int __atomic_sub_fetch_8(volatile long long int *, long long int, int);
     328#if defined(__SIZEOF_INT128__)
    281329__int128 __atomic_sub_fetch   (volatile __int128 *, __int128, int);
    282330__int128 __atomic_sub_fetch_16(volatile __int128 *, __int128, int);
     331#endif
    283332
    284333char __atomic_and_fetch  (volatile char *, char, int);
     
    290339long long int __atomic_and_fetch  (volatile long long int *, long long int, int);
    291340long long int __atomic_and_fetch_8(volatile long long int *, long long int, int);
     341#if defined(__SIZEOF_INT128__)
    292342__int128 __atomic_and_fetch   (volatile __int128 *, __int128, int);
    293343__int128 __atomic_and_fetch_16(volatile __int128 *, __int128, int);
     344#endif
    294345
    295346char __atomic_nand_fetch  (volatile char *, char, int);
     
    301352long long int __atomic_nand_fetch  (volatile long long int *, long long int, int);
    302353long long int __atomic_nand_fetch_8(volatile long long int *, long long int, int);
     354#if defined(__SIZEOF_INT128__)
    303355__int128 __atomic_nand_fetch   (volatile __int128 *, __int128, int);
    304356__int128 __atomic_nand_fetch_16(volatile __int128 *, __int128, int);
     357#endif
    305358
    306359char __atomic_xor_fetch  (volatile char *, char, int);
     
    312365long long int __atomic_xor_fetch  (volatile long long int *, long long int, int);
    313366long long int __atomic_xor_fetch_8(volatile long long int *, long long int, int);
     367#if defined(__SIZEOF_INT128__)
    314368__int128 __atomic_xor_fetch   (volatile __int128 *, __int128, int);
    315369__int128 __atomic_xor_fetch_16(volatile __int128 *, __int128, int);
     370#endif
    316371
    317372char __atomic_or_fetch  (volatile char *, char, int);
     
    323378long long int __atomic_or_fetch  (volatile long long int *, long long int, int);
    324379long long int __atomic_or_fetch_8(volatile long long int *, long long int, int);
     380#if defined(__SIZEOF_INT128__)
    325381__int128 __atomic_or_fetch   (volatile __int128 *, __int128, int);
    326382__int128 __atomic_or_fetch_16(volatile __int128 *, __int128, int);
     383#endif
    327384
    328385char __atomic_fetch_add  (volatile char *, char, int);
     
    334391long long int __atomic_fetch_add  (volatile long long int *, long long int, int);
    335392long long int __atomic_fetch_add_8(volatile long long int *, long long int, int);
     393#if defined(__SIZEOF_INT128__)
    336394__int128 __atomic_fetch_add   (volatile __int128 *, __int128, int);
    337395__int128 __atomic_fetch_add_16(volatile __int128 *, __int128, int);
     396#endif
    338397
    339398char __atomic_fetch_sub  (volatile char *, char, int);
     
    345404long long int __atomic_fetch_sub  (volatile long long int *, long long int, int);
    346405long long int __atomic_fetch_sub_8(volatile long long int *, long long int, int);
     406#if defined(__SIZEOF_INT128__)
    347407__int128 __atomic_fetch_sub   (volatile __int128 *, __int128, int);
    348408__int128 __atomic_fetch_sub_16(volatile __int128 *, __int128, int);
     409#endif
    349410
    350411char __atomic_fetch_and  (volatile char *, char, int);
     
    356417long long int __atomic_fetch_and  (volatile long long int *, long long int, int);
    357418long long int __atomic_fetch_and_8(volatile long long int *, long long int, int);
     419#if defined(__SIZEOF_INT128__)
    358420__int128 __atomic_fetch_and   (volatile __int128 *, __int128, int);
    359421__int128 __atomic_fetch_and_16(volatile __int128 *, __int128, int);
     422#endif
    360423
    361424char __atomic_fetch_nand  (volatile char *, char, int);
     
    367430long long int __atomic_fetch_nand  (volatile long long int *, long long int, int);
    368431long long int __atomic_fetch_nand_8(volatile long long int *, long long int, int);
     432#if defined(__SIZEOF_INT128__)
    369433__int128 __atomic_fetch_nand   (volatile __int128 *, __int128, int);
    370434__int128 __atomic_fetch_nand_16(volatile __int128 *, __int128, int);
     435#endif
    371436
    372437char __atomic_fetch_xor  (volatile char *, char, int);
     
    378443long long int __atomic_fetch_xor  (volatile long long int *, long long int, int);
    379444long long int __atomic_fetch_xor_8(volatile long long int *, long long int, int);
     445#if defined(__SIZEOF_INT128__)
    380446__int128 __atomic_fetch_xor   (volatile __int128 *, __int128, int);
    381447__int128 __atomic_fetch_xor_16(volatile __int128 *, __int128, int);
     448#endif
    382449
    383450char __atomic_fetch_or  (volatile char *, char, int);
     
    389456long long int __atomic_fetch_or  (volatile long long int *, long long int, int);
    390457long long int __atomic_fetch_or_8(volatile long long int *, long long int, int);
     458#if defined(__SIZEOF_INT128__)
    391459__int128 __atomic_fetch_or   (volatile __int128 *, __int128, int);
    392460__int128 __atomic_fetch_or_16(volatile __int128 *, __int128, int);
     461#endif
    393462
    394463_Bool __atomic_always_lock_free(unsigned long, const volatile void *);
  • src/tests/builtins/sync.c

    r13e8427 r533540a  
    88        volatile int * vp4 = 0; int * rp4 = 0; int v4 = 0;
    99        volatile long long int * vp8 = 0; long long int * rp8 = 0; long long int v8 = 0;
     10        #if defined(__SIZEOF_INT128__)
    1011        volatile __int128 * vp16 = 0; __int128 * rp16 = 0; __int128 v16 = 0;
     12        #endif
    1113
    1214        { char ret; ret = __sync_fetch_and_add(vp1, v1); }
     
    1820        { long long int ret; ret = __sync_fetch_and_add(vp8, v8); }
    1921        { long long int ret; ret = __sync_fetch_and_add_8(vp8, v8); }
     22        #if defined(__SIZEOF_INT128__)
    2023        { __int128 ret; ret = __sync_fetch_and_add(vp16, v16); }
    2124        { __int128 ret; ret = __sync_fetch_and_add_16(vp16, v16); }
     25        #endif
    2226
    2327        { char ret; ret = __sync_fetch_and_sub(vp1, v1); }
     
    2933        { long long int ret; ret = __sync_fetch_and_sub(vp8, v8); }
    3034        { long long int ret; ret = __sync_fetch_and_sub_8(vp8, v8); }
     35        #if defined(__SIZEOF_INT128__)
    3136        { __int128 ret; ret = __sync_fetch_and_sub(vp16, v16); }
    3237        { __int128 ret; ret = __sync_fetch_and_sub_16(vp16, v16); }
     38        #endif
    3339
    3440        { char ret; ret = __sync_fetch_and_or(vp1, v1); }
     
    4046        { long long int ret; ret = __sync_fetch_and_or(vp8, v8); }
    4147        { long long int ret; ret = __sync_fetch_and_or_8(vp8, v8); }
     48        #if defined(__SIZEOF_INT128__)
    4249        { __int128 ret; ret = __sync_fetch_and_or(vp16, v16); }
    4350        { __int128 ret; ret = __sync_fetch_and_or_16(vp16, v16); }
     51        #endif
    4452
    4553        { char ret; ret = __sync_fetch_and_and(vp1, v1); }
     
    5159        { long long int ret; ret = __sync_fetch_and_and(vp8, v8); }
    5260        { long long int ret; ret = __sync_fetch_and_and_8(vp8, v8); }
     61        #if defined(__SIZEOF_INT128__)
    5362        { __int128 ret; ret = __sync_fetch_and_and(vp16, v16); }
    5463        { __int128 ret; ret = __sync_fetch_and_and_16(vp16, v16); }
     64        #endif
    5565
    5666        { char ret; ret = __sync_fetch_and_xor(vp1, v1); }
     
    6272        { long long int ret; ret = __sync_fetch_and_xor(vp8, v8); }
    6373        { long long int ret; ret = __sync_fetch_and_xor_8(vp8, v8); }
     74        #if defined(__SIZEOF_INT128__)
    6475        { __int128 ret; ret = __sync_fetch_and_xor(vp16, v16); }
    6576        { __int128 ret; ret = __sync_fetch_and_xor_16(vp16, v16); }
     77        #endif
    6678
    6779        { char ret; ret = __sync_fetch_and_nand(vp1, v1); }
     
    7385        { long long int ret; ret = __sync_fetch_and_nand(vp8, v8); }
    7486        { long long int ret; ret = __sync_fetch_and_nand_8(vp8, v8); }
     87        #if defined(__SIZEOF_INT128__)
    7588        { __int128 ret; ret = __sync_fetch_and_nand(vp16, v16); }
    7689        { __int128 ret; ret = __sync_fetch_and_nand_16(vp16, v16); }
     90        #endif
    7791
    7892        { char ret; ret = __sync_add_and_fetch(vp1, v1); }
     
    8498        { long long int ret; ret = __sync_add_and_fetch(vp8, v8); }
    8599        { long long int ret; ret = __sync_add_and_fetch_8(vp8, v8); }
     100        #if defined(__SIZEOF_INT128__)
    86101        { __int128 ret; ret = __sync_add_and_fetch(vp16, v16); }
    87102        { __int128 ret; ret = __sync_add_and_fetch_16(vp16, v16); }
     103        #endif
    88104
    89105        { char ret; ret = __sync_sub_and_fetch(vp1, v1); }
     
    95111        { long long int ret; ret = __sync_sub_and_fetch(vp8, v8); }
    96112        { long long int ret; ret = __sync_sub_and_fetch_8(vp8, v8); }
     113        #if defined(__SIZEOF_INT128__)
    97114        { __int128 ret; ret = __sync_sub_and_fetch(vp16, v16); }
    98115        { __int128 ret; ret = __sync_sub_and_fetch_16(vp16, v16); }
     116        #endif
    99117
    100118        { char ret; ret = __sync_or_and_fetch(vp1, v1); }
     
    106124        { long long int ret; ret = __sync_or_and_fetch(vp8, v8); }
    107125        { long long int ret; ret = __sync_or_and_fetch_8(vp8, v8); }
     126        #if defined(__SIZEOF_INT128__)
    108127        { __int128 ret; ret = __sync_or_and_fetch(vp16, v16); }
    109128        { __int128 ret; ret = __sync_or_and_fetch_16(vp16, v16); }
     129        #endif
    110130
    111131        { char ret; ret = __sync_and_and_fetch(vp1, v1); }
     
    117137        { long long int ret; ret = __sync_and_and_fetch(vp8, v8); }
    118138        { long long int ret; ret = __sync_and_and_fetch_8(vp8, v8); }
     139        #if defined(__SIZEOF_INT128__)
    119140        { __int128 ret; ret = __sync_and_and_fetch(vp16, v16); }
    120141        { __int128 ret; ret = __sync_and_and_fetch_16(vp16, v16); }
     142        #endif
    121143
    122144        { char ret; ret = __sync_xor_and_fetch(vp1, v1); }
     
    128150        { long long int ret; ret = __sync_xor_and_fetch(vp8, v8); }
    129151        { long long int ret; ret = __sync_xor_and_fetch_8(vp8, v8); }
     152        #if defined(__SIZEOF_INT128__)
    130153        { __int128 ret; ret = __sync_xor_and_fetch(vp16, v16); }
    131154        { __int128 ret; ret = __sync_xor_and_fetch_16(vp16, v16); }
     155        #endif
    132156
    133157        { char ret; ret = __sync_nand_and_fetch(vp1, v1); }
     
    139163        { long long int ret; ret = __sync_nand_and_fetch(vp8, v8); }
    140164        { long long int ret; ret = __sync_nand_and_fetch_8(vp8, v8); }
     165        #if defined(__SIZEOF_INT128__)
    141166        { __int128 ret; ret = __sync_nand_and_fetch(vp16, v16); }
    142167        { __int128 ret; ret = __sync_nand_and_fetch_16(vp16, v16); }
     168        #endif
    143169
    144170        { _Bool ret; ret = __sync_bool_compare_and_swap(vp1, v1, v1); }
     
    150176        { _Bool ret; ret = __sync_bool_compare_and_swap(vp8, v8, v8); }
    151177        { _Bool ret; ret = __sync_bool_compare_and_swap_8(vp8, v8, v8); }
     178        #if defined(__SIZEOF_INT128__)
    152179        { _Bool ret; ret = __sync_bool_compare_and_swap(vp16, v16, v16); }
    153180        { _Bool ret; ret = __sync_bool_compare_and_swap_16(vp16, v16,v16); }
     181        #endif
    154182
    155183        { char ret; ret = __sync_val_compare_and_swap(vp1, v1, v1); }
     
    161189        { long long int ret; ret = __sync_val_compare_and_swap(vp8, v8, v8); }
    162190        { long long int ret; ret = __sync_val_compare_and_swap_8(vp8, v8, v8); }
     191        #if defined(__SIZEOF_INT128__)
    163192        { __int128 ret; ret = __sync_val_compare_and_swap(vp16, v16, v16); }
    164193        { __int128 ret; ret = __sync_val_compare_and_swap_16(vp16, v16,v16); }
     194        #endif
    165195
    166196        { char ret; ret = __sync_lock_test_and_set(vp1, v1); }
     
    172202        { long long int ret; ret = __sync_lock_test_and_set(vp8, v8); }
    173203        { long long int ret; ret = __sync_lock_test_and_set_8(vp8, v8); }
     204        #if defined(__SIZEOF_INT128__)
    174205        { __int128 ret; ret = __sync_lock_test_and_set(vp16, v16); }
    175206        { __int128 ret; ret = __sync_lock_test_and_set_16(vp16, v16); }
     207        #endif
    176208
    177209        { __sync_lock_release(vp1); }
     
    183215        { __sync_lock_release(vp8); }
    184216        { __sync_lock_release_8(vp8); }
     217        #if defined(__SIZEOF_INT128__)
    185218        { __sync_lock_release(vp16); }
    186219        { __sync_lock_release_16(vp16); }
     220        #endif
    187221
    188222        { __sync_synchronize(); }
     
    208242        { long long int ret; ret = __atomic_exchange_8(vp8, v8, __ATOMIC_SEQ_CST); }
    209243        { long long int ret; __atomic_exchange(vp8, &v8, &ret, __ATOMIC_SEQ_CST); }
     244        #if defined(__SIZEOF_INT128__)
    210245        { __int128 ret; ret = __atomic_exchange_n(vp16, &v16, __ATOMIC_SEQ_CST); }
    211246        { __int128 ret; ret = __atomic_exchange_16(vp16, v16, __ATOMIC_SEQ_CST); }
    212247        { __int128 ret; __atomic_exchange(vp16, &v16, &ret, __ATOMIC_SEQ_CST); }
     248        #endif
    213249
    214250        { char ret; ret = __atomic_load_n(vp1, __ATOMIC_SEQ_CST); }
     
    224260        { long long int ret; ret = __atomic_load_8(vp8, __ATOMIC_SEQ_CST); }
    225261        { long long int ret; __atomic_load(vp8, &ret, __ATOMIC_SEQ_CST); }
     262        #if defined(__SIZEOF_INT128__)
    226263        { __int128 ret; ret = __atomic_load_n(vp16, __ATOMIC_SEQ_CST); }
    227264        { __int128 ret; ret = __atomic_load_16(vp16, __ATOMIC_SEQ_CST); }
    228265        { __int128 ret; __atomic_load(vp16, &ret, __ATOMIC_SEQ_CST); }
     266        #endif
    229267
    230268        { _Bool ret; ret = __atomic_compare_exchange_n(vp1, rp1, v1, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
     
    240278        { _Bool ret; ret = __atomic_compare_exchange_8(vp8, rp8, v8, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
    241279        { _Bool ret; ret = __atomic_compare_exchange(vp8, rp8, &v8, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
     280        #if defined(__SIZEOF_INT128__)
    242281        { _Bool ret; ret = __atomic_compare_exchange_n(vp16, rp16, v16, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
    243282        { _Bool ret; ret = __atomic_compare_exchange_16(vp16, rp16, v16, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
    244283        { _Bool ret; ret = __atomic_compare_exchange(vp16, rp16, &v16, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
     284        #endif
    245285
    246286        { __atomic_store_n(vp1, v1, __ATOMIC_SEQ_CST); }
     
    256296        { __atomic_store_8(vp8, v8, __ATOMIC_SEQ_CST); }
    257297        { __atomic_store(vp8, &v8, __ATOMIC_SEQ_CST); }
     298        #if defined(__SIZEOF_INT128__)
    258299        { __atomic_store_n(vp16, v16, __ATOMIC_SEQ_CST); }
    259300        { __atomic_store_16(vp16, v16, __ATOMIC_SEQ_CST); }
    260301        { __atomic_store(vp16, &v16, __ATOMIC_SEQ_CST); }
     302        #endif
    261303
    262304        { char ret; ret = __atomic_add_fetch(vp1, v1, __ATOMIC_SEQ_CST); }
     
    268310        { long long int ret; ret = __atomic_add_fetch(vp8, v8, __ATOMIC_SEQ_CST); }
    269311        { long long int ret; ret = __atomic_add_fetch_8(vp8, v8, __ATOMIC_SEQ_CST); }
     312        #if defined(__SIZEOF_INT128__)
    270313        { __int128 ret; ret = __atomic_add_fetch(vp16, v16, __ATOMIC_SEQ_CST); }
    271314        { __int128 ret; ret = __atomic_add_fetch_16(vp16, v16, __ATOMIC_SEQ_CST); }
     315        #endif
    272316
    273317        { char ret; ret = __atomic_sub_fetch(vp1, v1, __ATOMIC_SEQ_CST); }
     
    279323        { long long int ret; ret = __atomic_sub_fetch(vp8, v8, __ATOMIC_SEQ_CST); }
    280324        { long long int ret; ret = __atomic_sub_fetch_8(vp8, v8, __ATOMIC_SEQ_CST); }
     325        #if defined(__SIZEOF_INT128__)
    281326        { __int128 ret; ret = __atomic_sub_fetch(vp16, v16, __ATOMIC_SEQ_CST); }
    282327        { __int128 ret; ret = __atomic_sub_fetch_16(vp16, v16, __ATOMIC_SEQ_CST); }
     328        #endif
    283329
    284330        { char ret; ret = __atomic_and_fetch(vp1, v1, __ATOMIC_SEQ_CST); }
     
    290336        { long long int ret; ret = __atomic_and_fetch(vp8, v8, __ATOMIC_SEQ_CST); }
    291337        { long long int ret; ret = __atomic_and_fetch_8(vp8, v8, __ATOMIC_SEQ_CST); }
     338        #if defined(__SIZEOF_INT128__)
    292339        { __int128 ret; ret = __atomic_and_fetch(vp16, v16, __ATOMIC_SEQ_CST); }
    293340        { __int128 ret; ret = __atomic_and_fetch_16(vp16, v16, __ATOMIC_SEQ_CST); }
     341        #endif
    294342
    295343        { char ret; ret = __atomic_nand_fetch(vp1, v1, __ATOMIC_SEQ_CST); }
     
    301349        { long long int ret; ret = __atomic_nand_fetch(vp8, v8, __ATOMIC_SEQ_CST); }
    302350        { long long int ret; ret = __atomic_nand_fetch_8(vp8, v8, __ATOMIC_SEQ_CST); }
     351        #if defined(__SIZEOF_INT128__)
    303352        { __int128 ret; ret = __atomic_nand_fetch(vp16, v16, __ATOMIC_SEQ_CST); }
    304353        { __int128 ret; ret = __atomic_nand_fetch_16(vp16, v16, __ATOMIC_SEQ_CST); }
     354        #endif
    305355
    306356        { char ret; ret = __atomic_xor_fetch(vp1, v1, __ATOMIC_SEQ_CST); }
     
    312362        { long long int ret; ret = __atomic_xor_fetch(vp8, v8, __ATOMIC_SEQ_CST); }
    313363        { long long int ret; ret = __atomic_xor_fetch_8(vp8, v8, __ATOMIC_SEQ_CST); }
     364        #if defined(__SIZEOF_INT128__)
    314365        { __int128 ret; ret = __atomic_xor_fetch(vp16, v16, __ATOMIC_SEQ_CST); }
    315366        { __int128 ret; ret = __atomic_xor_fetch_16(vp16, v16, __ATOMIC_SEQ_CST); }
     367        #endif
    316368
    317369        { char ret; ret = __atomic_or_fetch(vp1, v1, __ATOMIC_SEQ_CST); }
     
    323375        { long long int ret; ret = __atomic_or_fetch(vp8, v8, __ATOMIC_SEQ_CST); }
    324376        { long long int ret; ret = __atomic_or_fetch_8(vp8, v8, __ATOMIC_SEQ_CST); }
     377        #if defined(__SIZEOF_INT128__)
    325378        { __int128 ret; ret = __atomic_or_fetch(vp16, v16, __ATOMIC_SEQ_CST); }
    326379        { __int128 ret; ret = __atomic_or_fetch_16(vp16, v16, __ATOMIC_SEQ_CST); }
     380        #endif
    327381
    328382        { char ret; ret = __atomic_fetch_add(vp1, v1, __ATOMIC_SEQ_CST); }
     
    334388        { long long int ret; ret = __atomic_fetch_add(vp8, v8, __ATOMIC_SEQ_CST); }
    335389        { long long int ret; ret = __atomic_fetch_add_8(vp8, v8, __ATOMIC_SEQ_CST); }
     390        #if defined(__SIZEOF_INT128__)
    336391        { __int128 ret; ret = __atomic_fetch_add(vp16, v16, __ATOMIC_SEQ_CST); }
    337392        { __int128 ret; ret = __atomic_fetch_add_16(vp16, v16, __ATOMIC_SEQ_CST); }
     393        #endif
    338394
    339395        { char ret; ret = __atomic_fetch_sub(vp1, v1, __ATOMIC_SEQ_CST); }
     
    345401        { long long int ret; ret = __atomic_fetch_sub(vp8, v8, __ATOMIC_SEQ_CST); }
    346402        { long long int ret; ret = __atomic_fetch_sub_8(vp8, v8, __ATOMIC_SEQ_CST); }
     403        #if defined(__SIZEOF_INT128__)
    347404        { __int128 ret; ret = __atomic_fetch_sub(vp16, v16, __ATOMIC_SEQ_CST); }
    348405        { __int128 ret; ret = __atomic_fetch_sub_16(vp16, v16, __ATOMIC_SEQ_CST); }
     406        #endif
    349407
    350408        { char ret; ret = __atomic_fetch_and(vp1, v1, __ATOMIC_SEQ_CST); }
     
    356414        { long long int ret; ret = __atomic_fetch_and(vp8, v8, __ATOMIC_SEQ_CST); }
    357415        { long long int ret; ret = __atomic_fetch_and_8(vp8, v8, __ATOMIC_SEQ_CST); }
     416        #if defined(__SIZEOF_INT128__)
    358417        { __int128 ret; ret = __atomic_fetch_and(vp16, v16, __ATOMIC_SEQ_CST); }
    359418        { __int128 ret; ret = __atomic_fetch_and_16(vp16, v16, __ATOMIC_SEQ_CST); }
     419        #endif
    360420
    361421        { char ret; ret = __atomic_fetch_nand(vp1, v1, __ATOMIC_SEQ_CST); }
     
    367427        { long long int ret; ret = __atomic_fetch_nand(vp8, v8, __ATOMIC_SEQ_CST); }
    368428        { long long int ret; ret = __atomic_fetch_nand_8(vp8, v8, __ATOMIC_SEQ_CST); }
     429        #if defined(__SIZEOF_INT128__)
    369430        { __int128 ret; ret = __atomic_fetch_nand(vp16, v16, __ATOMIC_SEQ_CST); }
    370431        { __int128 ret; ret = __atomic_fetch_nand_16(vp16, v16, __ATOMIC_SEQ_CST); }
     432        #endif
    371433
    372434        { char ret; ret = __atomic_fetch_xor(vp1, v1, __ATOMIC_SEQ_CST); }
     
    378440        { long long int ret; ret = __atomic_fetch_xor(vp8, v8, __ATOMIC_SEQ_CST); }
    379441        { long long int ret; ret = __atomic_fetch_xor_8(vp8, v8, __ATOMIC_SEQ_CST); }
     442        #if defined(__SIZEOF_INT128__)
    380443        { __int128 ret; ret = __atomic_fetch_xor(vp16, v16, __ATOMIC_SEQ_CST); }
    381444        { __int128 ret; ret = __atomic_fetch_xor_16(vp16, v16, __ATOMIC_SEQ_CST); }
     445        #endif
    382446
    383447        { char ret; ret = __atomic_fetch_or(vp1, v1, __ATOMIC_SEQ_CST); }
     
    389453        { long long int ret; ret = __atomic_fetch_or(vp8, v8, __ATOMIC_SEQ_CST); }
    390454        { long long int ret; ret = __atomic_fetch_or_8(vp8, v8, __ATOMIC_SEQ_CST); }
     455        #if defined(__SIZEOF_INT128__)
    391456        { __int128 ret; ret = __atomic_fetch_or(vp16, v16, __ATOMIC_SEQ_CST); }
    392457        { __int128 ret; ret = __atomic_fetch_or_16(vp16, v16, __ATOMIC_SEQ_CST); }
     458        #endif
    393459
    394460        { _Bool ret; ret = __atomic_always_lock_free(sizeof(int), vp4); }
Note: See TracChangeset for help on using the changeset viewer.