Ignore:
Timestamp:
May 28, 2018, 3:26:49 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
533540a, db4d8e3
Parents:
91cfa34
Message:

Fixed several build failures for 32-bit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/builtins/sync.c

    r91cfa34 r1f81d61  
    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.