Changes in / [533540a:13e8427]
- Location:
- src
- Files:
-
- 6 edited
-
libcfa/concurrency/preemption.c (modified) (4 diffs)
-
prelude/Makefile.am (modified) (1 diff)
-
prelude/Makefile.in (modified) (1 diff)
-
prelude/prelude.cf (modified) (1 diff)
-
prelude/sync-builtins.cf (modified) (34 diffs)
-
tests/builtins/sync.c (modified) (33 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/preemption.c
r533540a r13e8427 161 161 void disable_interrupts() { 162 162 with( kernelTLS.preemption_state ) { 163 #if GCC_VERSION > 50000164 163 static_assert(__atomic_always_lock_free(sizeof(enabled), &enabled), "Must be lock-free"); 165 #endif166 164 167 165 // Set enabled flag to false … … 192 190 // Check if we need to prempt the thread because an interrupt was missed 193 191 if( prev == 1 ) { 194 #if GCC_VERSION > 50000195 192 static_assert(__atomic_always_lock_free(sizeof(enabled), &enabled), "Must be lock-free"); 196 #endif197 193 198 194 // Set enabled flag to true … … 221 217 verifyf( prev != 0u, "Incremented from %u\n", prev ); // If this triggers someone is enabled already enabled interrupts 222 218 if( prev == 1 ) { 223 #if GCC_VERSION > 50000224 219 static_assert(__atomic_always_lock_free(sizeof(kernelTLS.preemption_state.enabled), &kernelTLS.preemption_state.enabled), "Must be lock-free"); 225 #endif226 220 // Set enabled flag to true 227 221 // should be atomic to avoid preemption in the middle of the operation. … … 382 376 383 377 // Clear sighandler mask before context switching. 384 #if GCC_VERSION > 50000385 378 static_assert( sizeof( sigset_t ) == sizeof( cxt->uc_sigmask ), "Expected cxt->uc_sigmask to be of sigset_t" ); 386 #endif387 379 if ( pthread_sigmask( SIG_SETMASK, (sigset_t *)&(cxt->uc_sigmask), NULL ) == -1 ) { 388 380 abort( "internal error, sigprocmask" ); -
src/prelude/Makefile.am
r533540a r13e8427 37 37 # create forward declarations for gcc builtins 38 38 gcc-builtins.cf : gcc-builtins.c prototypes.sed 39 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@-E -P $< | sed -r -f prototypes.sed > $@39 ${AM_V_GEN}@BACKEND_CC@ -E -P $< | sed -r -f prototypes.sed > $@ 40 40 41 41 gcc-builtins.c : builtins.def prototypes.awk sync-builtins.cf 42 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@-E prototypes.c | awk -f prototypes.awk > $@42 ${AM_V_GEN}@BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ 43 43 44 44 builtins.def : -
src/prelude/Makefile.in
r533540a r13e8427 506 506 # create forward declarations for gcc builtins 507 507 gcc-builtins.cf : gcc-builtins.c prototypes.sed 508 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@-E -P $< | sed -r -f prototypes.sed > $@508 ${AM_V_GEN}@BACKEND_CC@ -E -P $< | sed -r -f prototypes.sed > $@ 509 509 510 510 gcc-builtins.c : builtins.def prototypes.awk sync-builtins.cf 511 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@-E prototypes.c | awk -f prototypes.awk > $@511 ${AM_V_GEN}@BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ 512 512 513 513 builtins.def : -
src/prelude/prelude.cf
r533540a r13e8427 458 458 signed long long int ?=?( signed long long int &, signed long long int ), ?=?( volatile signed long long int &, signed long long int ); 459 459 unsigned 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 ); 460 461 zero_t ?=?( zero_t &, zero_t ); 461 462 one_t ?=?( one_t &, one_t ); -
src/prelude/sync-builtins.cf
r533540a r13e8427 7 7 long long int __sync_fetch_and_add(volatile long long int *, long long int,...); 8 8 long long int __sync_fetch_and_add_8(volatile long long int *, long long int,...); 9 #if defined(__SIZEOF_INT128__)10 9 __int128 __sync_fetch_and_add(volatile __int128 *, __int128,...); 11 10 __int128 __sync_fetch_and_add_16(volatile __int128 *, __int128,...); 12 #endif13 11 14 12 char __sync_fetch_and_sub(volatile char *, char,...); … … 20 18 long long int __sync_fetch_and_sub(volatile long long int *, long long int,...); 21 19 long long int __sync_fetch_and_sub_8(volatile long long int *, long long int,...); 22 #if defined(__SIZEOF_INT128__)23 20 __int128 __sync_fetch_and_sub(volatile __int128 *, __int128,...); 24 21 __int128 __sync_fetch_and_sub_16(volatile __int128 *, __int128,...); 25 #endif26 22 27 23 char __sync_fetch_and_or(volatile char *, char,...); … … 33 29 long long int __sync_fetch_and_or(volatile long long int *, long long int,...); 34 30 long long int __sync_fetch_and_or_8(volatile long long int *, long long int,...); 35 #if defined(__SIZEOF_INT128__)36 31 __int128 __sync_fetch_and_or(volatile __int128 *, __int128,...); 37 32 __int128 __sync_fetch_and_or_16(volatile __int128 *, __int128,...); 38 #endif39 33 40 34 char __sync_fetch_and_and(volatile char *, char,...); … … 46 40 long long int __sync_fetch_and_and(volatile long long int *, long long int,...); 47 41 long long int __sync_fetch_and_and_8(volatile long long int *, long long int,...); 48 #if defined(__SIZEOF_INT128__)49 42 __int128 __sync_fetch_and_and(volatile __int128 *, __int128,...); 50 43 __int128 __sync_fetch_and_and_16(volatile __int128 *, __int128,...); 51 #endif52 44 53 45 char __sync_fetch_and_xor(volatile char *, char,...); … … 59 51 long long int __sync_fetch_and_xor(volatile long long int *, long long int,...); 60 52 long long int __sync_fetch_and_xor_8(volatile long long int *, long long int,...); 61 #if defined(__SIZEOF_INT128__)62 53 __int128 __sync_fetch_and_xor(volatile __int128 *, __int128,...); 63 54 __int128 __sync_fetch_and_xor_16(volatile __int128 *, __int128,...); 64 #endif65 55 66 56 char __sync_fetch_and_nand(volatile char *, char,...); … … 72 62 long long int __sync_fetch_and_nand(volatile long long int *, long long int,...); 73 63 long long int __sync_fetch_and_nand_8(volatile long long int *, long long int,...); 74 #if defined(__SIZEOF_INT128__)75 64 __int128 __sync_fetch_and_nand(volatile __int128 *, __int128,...); 76 65 __int128 __sync_fetch_and_nand_16(volatile __int128 *, __int128,...); 77 #endif78 66 79 67 char __sync_add_and_fetch(volatile char *, char,...); … … 85 73 long long int __sync_add_and_fetch(volatile long long int *, long long int,...); 86 74 long long int __sync_add_and_fetch_8(volatile long long int *, long long int,...); 87 #if defined(__SIZEOF_INT128__)88 75 __int128 __sync_add_and_fetch(volatile __int128 *, __int128,...); 89 76 __int128 __sync_add_and_fetch_16(volatile __int128 *, __int128,...); 90 #endif91 77 92 78 char __sync_sub_and_fetch(volatile char *, char,...); … … 98 84 long long int __sync_sub_and_fetch(volatile long long int *, long long int,...); 99 85 long long int __sync_sub_and_fetch_8(volatile long long int *, long long int,...); 100 #if defined(__SIZEOF_INT128__)101 86 __int128 __sync_sub_and_fetch(volatile __int128 *, __int128,...); 102 87 __int128 __sync_sub_and_fetch_16(volatile __int128 *, __int128,...); 103 #endif104 88 105 89 char __sync_or_and_fetch(volatile char *, char,...); … … 111 95 long long int __sync_or_and_fetch(volatile long long int *, long long int,...); 112 96 long long int __sync_or_and_fetch_8(volatile long long int *, long long int,...); 113 #if defined(__SIZEOF_INT128__)114 97 __int128 __sync_or_and_fetch(volatile __int128 *, __int128,...); 115 98 __int128 __sync_or_and_fetch_16(volatile __int128 *, __int128,...); 116 #endif117 99 118 100 char __sync_and_and_fetch(volatile char *, char,...); … … 124 106 long long int __sync_and_and_fetch(volatile long long int *, long long int,...); 125 107 long long int __sync_and_and_fetch_8(volatile long long int *, long long int,...); 126 #if defined(__SIZEOF_INT128__)127 108 __int128 __sync_and_and_fetch(volatile __int128 *, __int128,...); 128 109 __int128 __sync_and_and_fetch_16(volatile __int128 *, __int128,...); 129 #endif130 110 131 111 char __sync_xor_and_fetch(volatile char *, char,...); … … 137 117 long long int __sync_xor_and_fetch(volatile long long int *, long long int,...); 138 118 long long int __sync_xor_and_fetch_8(volatile long long int *, long long int,...); 139 #if defined(__SIZEOF_INT128__)140 119 __int128 __sync_xor_and_fetch(volatile __int128 *, __int128,...); 141 120 __int128 __sync_xor_and_fetch_16(volatile __int128 *, __int128,...); 142 #endif143 121 144 122 char __sync_nand_and_fetch(volatile char *, char,...); … … 150 128 long long int __sync_nand_and_fetch(volatile long long int *, long long int,...); 151 129 long long int __sync_nand_and_fetch_8(volatile long long int *, long long int,...); 152 #if defined(__SIZEOF_INT128__)153 130 __int128 __sync_nand_and_fetch(volatile __int128 *, __int128,...); 154 131 __int128 __sync_nand_and_fetch_16(volatile __int128 *, __int128,...); 155 #endif156 132 157 133 _Bool __sync_bool_compare_and_swap(volatile char *, char, char,...); … … 163 139 _Bool __sync_bool_compare_and_swap(volatile long long int *, long long int, long long int,...); 164 140 _Bool __sync_bool_compare_and_swap_8(volatile long long int *, long long int, long long int,...); 165 #if defined(__SIZEOF_INT128__)166 141 _Bool __sync_bool_compare_and_swap(volatile __int128 *, __int128, __int128,...); 167 142 _Bool __sync_bool_compare_and_swap_16(volatile __int128 *, __int128, __int128,...); 168 #endif169 143 170 144 char __sync_val_compare_and_swap(volatile char *, char, char,...); … … 176 150 long long int __sync_val_compare_and_swap(volatile long long int *, long long int, long long int,...); 177 151 long long int __sync_val_compare_and_swap_8(volatile long long int *, long long int, long long int,...); 178 #if defined(__SIZEOF_INT128__)179 152 __int128 __sync_val_compare_and_swap(volatile __int128 *, __int128, __int128,...); 180 153 __int128 __sync_val_compare_and_swap_16(volatile __int128 *, __int128, __int128,...); 181 #endif182 154 183 155 char __sync_lock_test_and_set(volatile char *, char,...); … … 189 161 long long int __sync_lock_test_and_set(volatile long long int *, long long int,...); 190 162 long long int __sync_lock_test_and_set_8(volatile long long int *, long long int,...); 191 #if defined(__SIZEOF_INT128__)192 163 __int128 __sync_lock_test_and_set(volatile __int128 *, __int128,...); 193 164 __int128 __sync_lock_test_and_set_16(volatile __int128 *, __int128,...); 194 #endif195 165 196 166 void __sync_lock_release(volatile char *,...); … … 202 172 void __sync_lock_release(volatile long long int *,...); 203 173 void __sync_lock_release_8(volatile long long int *,...); 204 #if defined(__SIZEOF_INT128__)205 174 void __sync_lock_release(volatile __int128 *,...); 206 175 void __sync_lock_release_16(volatile __int128 *,...); 207 #endif208 176 209 177 void __sync_synchronize(); … … 217 185 _Bool __atomic_test_and_set(volatile int *, int); 218 186 _Bool __atomic_test_and_set(volatile long long int *, int); 219 #if defined(__SIZEOF_INT128__)220 187 _Bool __atomic_test_and_set(volatile __int128 *, int); 221 #endif222 223 188 void __atomic_clear(volatile _Bool *, int); 224 189 void __atomic_clear(volatile char *, int); … … 226 191 void __atomic_clear(volatile int *, int); 227 192 void __atomic_clear(volatile long long int *, int); 228 #if defined(__SIZEOF_INT128__)229 193 void __atomic_clear(volatile __int128 *, int); 230 #endif231 194 232 195 char __atomic_exchange_n(volatile char *, volatile char *, int); … … 242 205 long long int __atomic_exchange_8(volatile long long int *, long long int, int); 243 206 void __atomic_exchange(volatile long long int *, volatile long long int *, volatile long long int *, int); 244 #if defined(__SIZEOF_INT128__)245 207 __int128 __atomic_exchange_n(volatile __int128 *, volatile __int128 *, int); 246 208 __int128 __atomic_exchange_16(volatile __int128 *, __int128, int); 247 209 void __atomic_exchange(volatile __int128 *, volatile __int128 *, volatile __int128 *, int); 248 #endif249 210 250 211 char __atomic_load_n(const volatile char *, int); … … 260 221 long long int __atomic_load_8(const volatile long long int *, int); 261 222 void __atomic_load(const volatile long long int *, volatile long long int *, int); 262 #if defined(__SIZEOF_INT128__)263 223 __int128 __atomic_load_n(const volatile __int128 *, int); 264 224 __int128 __atomic_load_16(const volatile __int128 *, int); 265 225 void __atomic_load(const volatile __int128 *, volatile __int128 *, int); 266 #endif267 226 268 227 _Bool __atomic_compare_exchange_n(volatile char *, char *, char, _Bool, int, int); … … 278 237 _Bool __atomic_compare_exchange_8(volatile long long int *, long long int *, long long int, _Bool, int, int); 279 238 _Bool __atomic_compare_exchange (volatile long long int *, long long int *, long long int *, _Bool, int, int); 280 #if defined(__SIZEOF_INT128__)281 239 _Bool __atomic_compare_exchange_n (volatile __int128 *, __int128 *, __int128, _Bool, int, int); 282 240 _Bool __atomic_compare_exchange_16(volatile __int128 *, __int128 *, __int128, _Bool, int, int); 283 241 _Bool __atomic_compare_exchange (volatile __int128 *, __int128 *, __int128 *, _Bool, int, int); 284 #endif285 242 286 243 void __atomic_store_n(volatile _Bool *, _Bool, int); … … 299 256 void __atomic_store_8(volatile long long int *, long long int, int); 300 257 void __atomic_store(volatile long long int *, long long int *, int); 301 #if defined(__SIZEOF_INT128__)302 258 void __atomic_store_n(volatile __int128 *, __int128, int); 303 259 void __atomic_store_16(volatile __int128 *, __int128, int); 304 260 void __atomic_store(volatile __int128 *, __int128 *, int); 305 #endif306 261 307 262 char __atomic_add_fetch (volatile char *, char, int); … … 313 268 long long int __atomic_add_fetch (volatile long long int *, long long int, int); 314 269 long long int __atomic_add_fetch_8(volatile long long int *, long long int, int); 315 #if defined(__SIZEOF_INT128__)316 270 __int128 __atomic_add_fetch (volatile __int128 *, __int128, int); 317 271 __int128 __atomic_add_fetch_16(volatile __int128 *, __int128, int); 318 #endif319 272 320 273 char __atomic_sub_fetch (volatile char *, char, int); … … 326 279 long long int __atomic_sub_fetch (volatile long long int *, long long int, int); 327 280 long long int __atomic_sub_fetch_8(volatile long long int *, long long int, int); 328 #if defined(__SIZEOF_INT128__)329 281 __int128 __atomic_sub_fetch (volatile __int128 *, __int128, int); 330 282 __int128 __atomic_sub_fetch_16(volatile __int128 *, __int128, int); 331 #endif332 283 333 284 char __atomic_and_fetch (volatile char *, char, int); … … 339 290 long long int __atomic_and_fetch (volatile long long int *, long long int, int); 340 291 long long int __atomic_and_fetch_8(volatile long long int *, long long int, int); 341 #if defined(__SIZEOF_INT128__)342 292 __int128 __atomic_and_fetch (volatile __int128 *, __int128, int); 343 293 __int128 __atomic_and_fetch_16(volatile __int128 *, __int128, int); 344 #endif345 294 346 295 char __atomic_nand_fetch (volatile char *, char, int); … … 352 301 long long int __atomic_nand_fetch (volatile long long int *, long long int, int); 353 302 long long int __atomic_nand_fetch_8(volatile long long int *, long long int, int); 354 #if defined(__SIZEOF_INT128__)355 303 __int128 __atomic_nand_fetch (volatile __int128 *, __int128, int); 356 304 __int128 __atomic_nand_fetch_16(volatile __int128 *, __int128, int); 357 #endif358 305 359 306 char __atomic_xor_fetch (volatile char *, char, int); … … 365 312 long long int __atomic_xor_fetch (volatile long long int *, long long int, int); 366 313 long long int __atomic_xor_fetch_8(volatile long long int *, long long int, int); 367 #if defined(__SIZEOF_INT128__)368 314 __int128 __atomic_xor_fetch (volatile __int128 *, __int128, int); 369 315 __int128 __atomic_xor_fetch_16(volatile __int128 *, __int128, int); 370 #endif371 316 372 317 char __atomic_or_fetch (volatile char *, char, int); … … 378 323 long long int __atomic_or_fetch (volatile long long int *, long long int, int); 379 324 long long int __atomic_or_fetch_8(volatile long long int *, long long int, int); 380 #if defined(__SIZEOF_INT128__)381 325 __int128 __atomic_or_fetch (volatile __int128 *, __int128, int); 382 326 __int128 __atomic_or_fetch_16(volatile __int128 *, __int128, int); 383 #endif384 327 385 328 char __atomic_fetch_add (volatile char *, char, int); … … 391 334 long long int __atomic_fetch_add (volatile long long int *, long long int, int); 392 335 long long int __atomic_fetch_add_8(volatile long long int *, long long int, int); 393 #if defined(__SIZEOF_INT128__)394 336 __int128 __atomic_fetch_add (volatile __int128 *, __int128, int); 395 337 __int128 __atomic_fetch_add_16(volatile __int128 *, __int128, int); 396 #endif397 338 398 339 char __atomic_fetch_sub (volatile char *, char, int); … … 404 345 long long int __atomic_fetch_sub (volatile long long int *, long long int, int); 405 346 long long int __atomic_fetch_sub_8(volatile long long int *, long long int, int); 406 #if defined(__SIZEOF_INT128__)407 347 __int128 __atomic_fetch_sub (volatile __int128 *, __int128, int); 408 348 __int128 __atomic_fetch_sub_16(volatile __int128 *, __int128, int); 409 #endif410 349 411 350 char __atomic_fetch_and (volatile char *, char, int); … … 417 356 long long int __atomic_fetch_and (volatile long long int *, long long int, int); 418 357 long long int __atomic_fetch_and_8(volatile long long int *, long long int, int); 419 #if defined(__SIZEOF_INT128__)420 358 __int128 __atomic_fetch_and (volatile __int128 *, __int128, int); 421 359 __int128 __atomic_fetch_and_16(volatile __int128 *, __int128, int); 422 #endif423 360 424 361 char __atomic_fetch_nand (volatile char *, char, int); … … 430 367 long long int __atomic_fetch_nand (volatile long long int *, long long int, int); 431 368 long long int __atomic_fetch_nand_8(volatile long long int *, long long int, int); 432 #if defined(__SIZEOF_INT128__)433 369 __int128 __atomic_fetch_nand (volatile __int128 *, __int128, int); 434 370 __int128 __atomic_fetch_nand_16(volatile __int128 *, __int128, int); 435 #endif436 371 437 372 char __atomic_fetch_xor (volatile char *, char, int); … … 443 378 long long int __atomic_fetch_xor (volatile long long int *, long long int, int); 444 379 long long int __atomic_fetch_xor_8(volatile long long int *, long long int, int); 445 #if defined(__SIZEOF_INT128__)446 380 __int128 __atomic_fetch_xor (volatile __int128 *, __int128, int); 447 381 __int128 __atomic_fetch_xor_16(volatile __int128 *, __int128, int); 448 #endif449 382 450 383 char __atomic_fetch_or (volatile char *, char, int); … … 456 389 long long int __atomic_fetch_or (volatile long long int *, long long int, int); 457 390 long long int __atomic_fetch_or_8(volatile long long int *, long long int, int); 458 #if defined(__SIZEOF_INT128__)459 391 __int128 __atomic_fetch_or (volatile __int128 *, __int128, int); 460 392 __int128 __atomic_fetch_or_16(volatile __int128 *, __int128, int); 461 #endif462 393 463 394 _Bool __atomic_always_lock_free(unsigned long, const volatile void *); -
src/tests/builtins/sync.c
r533540a r13e8427 8 8 volatile int * vp4 = 0; int * rp4 = 0; int v4 = 0; 9 9 volatile long long int * vp8 = 0; long long int * rp8 = 0; long long int v8 = 0; 10 #if defined(__SIZEOF_INT128__)11 10 volatile __int128 * vp16 = 0; __int128 * rp16 = 0; __int128 v16 = 0; 12 #endif13 11 14 12 { char ret; ret = __sync_fetch_and_add(vp1, v1); } … … 20 18 { long long int ret; ret = __sync_fetch_and_add(vp8, v8); } 21 19 { long long int ret; ret = __sync_fetch_and_add_8(vp8, v8); } 22 #if defined(__SIZEOF_INT128__)23 20 { __int128 ret; ret = __sync_fetch_and_add(vp16, v16); } 24 21 { __int128 ret; ret = __sync_fetch_and_add_16(vp16, v16); } 25 #endif26 22 27 23 { char ret; ret = __sync_fetch_and_sub(vp1, v1); } … … 33 29 { long long int ret; ret = __sync_fetch_and_sub(vp8, v8); } 34 30 { long long int ret; ret = __sync_fetch_and_sub_8(vp8, v8); } 35 #if defined(__SIZEOF_INT128__)36 31 { __int128 ret; ret = __sync_fetch_and_sub(vp16, v16); } 37 32 { __int128 ret; ret = __sync_fetch_and_sub_16(vp16, v16); } 38 #endif39 33 40 34 { char ret; ret = __sync_fetch_and_or(vp1, v1); } … … 46 40 { long long int ret; ret = __sync_fetch_and_or(vp8, v8); } 47 41 { long long int ret; ret = __sync_fetch_and_or_8(vp8, v8); } 48 #if defined(__SIZEOF_INT128__)49 42 { __int128 ret; ret = __sync_fetch_and_or(vp16, v16); } 50 43 { __int128 ret; ret = __sync_fetch_and_or_16(vp16, v16); } 51 #endif52 44 53 45 { char ret; ret = __sync_fetch_and_and(vp1, v1); } … … 59 51 { long long int ret; ret = __sync_fetch_and_and(vp8, v8); } 60 52 { long long int ret; ret = __sync_fetch_and_and_8(vp8, v8); } 61 #if defined(__SIZEOF_INT128__)62 53 { __int128 ret; ret = __sync_fetch_and_and(vp16, v16); } 63 54 { __int128 ret; ret = __sync_fetch_and_and_16(vp16, v16); } 64 #endif65 55 66 56 { char ret; ret = __sync_fetch_and_xor(vp1, v1); } … … 72 62 { long long int ret; ret = __sync_fetch_and_xor(vp8, v8); } 73 63 { long long int ret; ret = __sync_fetch_and_xor_8(vp8, v8); } 74 #if defined(__SIZEOF_INT128__)75 64 { __int128 ret; ret = __sync_fetch_and_xor(vp16, v16); } 76 65 { __int128 ret; ret = __sync_fetch_and_xor_16(vp16, v16); } 77 #endif78 66 79 67 { char ret; ret = __sync_fetch_and_nand(vp1, v1); } … … 85 73 { long long int ret; ret = __sync_fetch_and_nand(vp8, v8); } 86 74 { long long int ret; ret = __sync_fetch_and_nand_8(vp8, v8); } 87 #if defined(__SIZEOF_INT128__)88 75 { __int128 ret; ret = __sync_fetch_and_nand(vp16, v16); } 89 76 { __int128 ret; ret = __sync_fetch_and_nand_16(vp16, v16); } 90 #endif91 77 92 78 { char ret; ret = __sync_add_and_fetch(vp1, v1); } … … 98 84 { long long int ret; ret = __sync_add_and_fetch(vp8, v8); } 99 85 { long long int ret; ret = __sync_add_and_fetch_8(vp8, v8); } 100 #if defined(__SIZEOF_INT128__)101 86 { __int128 ret; ret = __sync_add_and_fetch(vp16, v16); } 102 87 { __int128 ret; ret = __sync_add_and_fetch_16(vp16, v16); } 103 #endif104 88 105 89 { char ret; ret = __sync_sub_and_fetch(vp1, v1); } … … 111 95 { long long int ret; ret = __sync_sub_and_fetch(vp8, v8); } 112 96 { long long int ret; ret = __sync_sub_and_fetch_8(vp8, v8); } 113 #if defined(__SIZEOF_INT128__)114 97 { __int128 ret; ret = __sync_sub_and_fetch(vp16, v16); } 115 98 { __int128 ret; ret = __sync_sub_and_fetch_16(vp16, v16); } 116 #endif117 99 118 100 { char ret; ret = __sync_or_and_fetch(vp1, v1); } … … 124 106 { long long int ret; ret = __sync_or_and_fetch(vp8, v8); } 125 107 { long long int ret; ret = __sync_or_and_fetch_8(vp8, v8); } 126 #if defined(__SIZEOF_INT128__)127 108 { __int128 ret; ret = __sync_or_and_fetch(vp16, v16); } 128 109 { __int128 ret; ret = __sync_or_and_fetch_16(vp16, v16); } 129 #endif130 110 131 111 { char ret; ret = __sync_and_and_fetch(vp1, v1); } … … 137 117 { long long int ret; ret = __sync_and_and_fetch(vp8, v8); } 138 118 { long long int ret; ret = __sync_and_and_fetch_8(vp8, v8); } 139 #if defined(__SIZEOF_INT128__)140 119 { __int128 ret; ret = __sync_and_and_fetch(vp16, v16); } 141 120 { __int128 ret; ret = __sync_and_and_fetch_16(vp16, v16); } 142 #endif143 121 144 122 { char ret; ret = __sync_xor_and_fetch(vp1, v1); } … … 150 128 { long long int ret; ret = __sync_xor_and_fetch(vp8, v8); } 151 129 { long long int ret; ret = __sync_xor_and_fetch_8(vp8, v8); } 152 #if defined(__SIZEOF_INT128__)153 130 { __int128 ret; ret = __sync_xor_and_fetch(vp16, v16); } 154 131 { __int128 ret; ret = __sync_xor_and_fetch_16(vp16, v16); } 155 #endif156 132 157 133 { char ret; ret = __sync_nand_and_fetch(vp1, v1); } … … 163 139 { long long int ret; ret = __sync_nand_and_fetch(vp8, v8); } 164 140 { long long int ret; ret = __sync_nand_and_fetch_8(vp8, v8); } 165 #if defined(__SIZEOF_INT128__)166 141 { __int128 ret; ret = __sync_nand_and_fetch(vp16, v16); } 167 142 { __int128 ret; ret = __sync_nand_and_fetch_16(vp16, v16); } 168 #endif169 143 170 144 { _Bool ret; ret = __sync_bool_compare_and_swap(vp1, v1, v1); } … … 176 150 { _Bool ret; ret = __sync_bool_compare_and_swap(vp8, v8, v8); } 177 151 { _Bool ret; ret = __sync_bool_compare_and_swap_8(vp8, v8, v8); } 178 #if defined(__SIZEOF_INT128__)179 152 { _Bool ret; ret = __sync_bool_compare_and_swap(vp16, v16, v16); } 180 153 { _Bool ret; ret = __sync_bool_compare_and_swap_16(vp16, v16,v16); } 181 #endif182 154 183 155 { char ret; ret = __sync_val_compare_and_swap(vp1, v1, v1); } … … 189 161 { long long int ret; ret = __sync_val_compare_and_swap(vp8, v8, v8); } 190 162 { long long int ret; ret = __sync_val_compare_and_swap_8(vp8, v8, v8); } 191 #if defined(__SIZEOF_INT128__)192 163 { __int128 ret; ret = __sync_val_compare_and_swap(vp16, v16, v16); } 193 164 { __int128 ret; ret = __sync_val_compare_and_swap_16(vp16, v16,v16); } 194 #endif195 165 196 166 { char ret; ret = __sync_lock_test_and_set(vp1, v1); } … … 202 172 { long long int ret; ret = __sync_lock_test_and_set(vp8, v8); } 203 173 { long long int ret; ret = __sync_lock_test_and_set_8(vp8, v8); } 204 #if defined(__SIZEOF_INT128__)205 174 { __int128 ret; ret = __sync_lock_test_and_set(vp16, v16); } 206 175 { __int128 ret; ret = __sync_lock_test_and_set_16(vp16, v16); } 207 #endif208 176 209 177 { __sync_lock_release(vp1); } … … 215 183 { __sync_lock_release(vp8); } 216 184 { __sync_lock_release_8(vp8); } 217 #if defined(__SIZEOF_INT128__)218 185 { __sync_lock_release(vp16); } 219 186 { __sync_lock_release_16(vp16); } 220 #endif221 187 222 188 { __sync_synchronize(); } … … 242 208 { long long int ret; ret = __atomic_exchange_8(vp8, v8, __ATOMIC_SEQ_CST); } 243 209 { long long int ret; __atomic_exchange(vp8, &v8, &ret, __ATOMIC_SEQ_CST); } 244 #if defined(__SIZEOF_INT128__)245 210 { __int128 ret; ret = __atomic_exchange_n(vp16, &v16, __ATOMIC_SEQ_CST); } 246 211 { __int128 ret; ret = __atomic_exchange_16(vp16, v16, __ATOMIC_SEQ_CST); } 247 212 { __int128 ret; __atomic_exchange(vp16, &v16, &ret, __ATOMIC_SEQ_CST); } 248 #endif249 213 250 214 { char ret; ret = __atomic_load_n(vp1, __ATOMIC_SEQ_CST); } … … 260 224 { long long int ret; ret = __atomic_load_8(vp8, __ATOMIC_SEQ_CST); } 261 225 { long long int ret; __atomic_load(vp8, &ret, __ATOMIC_SEQ_CST); } 262 #if defined(__SIZEOF_INT128__)263 226 { __int128 ret; ret = __atomic_load_n(vp16, __ATOMIC_SEQ_CST); } 264 227 { __int128 ret; ret = __atomic_load_16(vp16, __ATOMIC_SEQ_CST); } 265 228 { __int128 ret; __atomic_load(vp16, &ret, __ATOMIC_SEQ_CST); } 266 #endif267 229 268 230 { _Bool ret; ret = __atomic_compare_exchange_n(vp1, rp1, v1, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); } … … 278 240 { _Bool ret; ret = __atomic_compare_exchange_8(vp8, rp8, v8, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); } 279 241 { _Bool ret; ret = __atomic_compare_exchange(vp8, rp8, &v8, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); } 280 #if defined(__SIZEOF_INT128__)281 242 { _Bool ret; ret = __atomic_compare_exchange_n(vp16, rp16, v16, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); } 282 243 { _Bool ret; ret = __atomic_compare_exchange_16(vp16, rp16, v16, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); } 283 244 { _Bool ret; ret = __atomic_compare_exchange(vp16, rp16, &v16, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); } 284 #endif285 245 286 246 { __atomic_store_n(vp1, v1, __ATOMIC_SEQ_CST); } … … 296 256 { __atomic_store_8(vp8, v8, __ATOMIC_SEQ_CST); } 297 257 { __atomic_store(vp8, &v8, __ATOMIC_SEQ_CST); } 298 #if defined(__SIZEOF_INT128__)299 258 { __atomic_store_n(vp16, v16, __ATOMIC_SEQ_CST); } 300 259 { __atomic_store_16(vp16, v16, __ATOMIC_SEQ_CST); } 301 260 { __atomic_store(vp16, &v16, __ATOMIC_SEQ_CST); } 302 #endif303 261 304 262 { char ret; ret = __atomic_add_fetch(vp1, v1, __ATOMIC_SEQ_CST); } … … 310 268 { long long int ret; ret = __atomic_add_fetch(vp8, v8, __ATOMIC_SEQ_CST); } 311 269 { long long int ret; ret = __atomic_add_fetch_8(vp8, v8, __ATOMIC_SEQ_CST); } 312 #if defined(__SIZEOF_INT128__)313 270 { __int128 ret; ret = __atomic_add_fetch(vp16, v16, __ATOMIC_SEQ_CST); } 314 271 { __int128 ret; ret = __atomic_add_fetch_16(vp16, v16, __ATOMIC_SEQ_CST); } 315 #endif316 272 317 273 { char ret; ret = __atomic_sub_fetch(vp1, v1, __ATOMIC_SEQ_CST); } … … 323 279 { long long int ret; ret = __atomic_sub_fetch(vp8, v8, __ATOMIC_SEQ_CST); } 324 280 { long long int ret; ret = __atomic_sub_fetch_8(vp8, v8, __ATOMIC_SEQ_CST); } 325 #if defined(__SIZEOF_INT128__)326 281 { __int128 ret; ret = __atomic_sub_fetch(vp16, v16, __ATOMIC_SEQ_CST); } 327 282 { __int128 ret; ret = __atomic_sub_fetch_16(vp16, v16, __ATOMIC_SEQ_CST); } 328 #endif329 283 330 284 { char ret; ret = __atomic_and_fetch(vp1, v1, __ATOMIC_SEQ_CST); } … … 336 290 { long long int ret; ret = __atomic_and_fetch(vp8, v8, __ATOMIC_SEQ_CST); } 337 291 { long long int ret; ret = __atomic_and_fetch_8(vp8, v8, __ATOMIC_SEQ_CST); } 338 #if defined(__SIZEOF_INT128__)339 292 { __int128 ret; ret = __atomic_and_fetch(vp16, v16, __ATOMIC_SEQ_CST); } 340 293 { __int128 ret; ret = __atomic_and_fetch_16(vp16, v16, __ATOMIC_SEQ_CST); } 341 #endif342 294 343 295 { char ret; ret = __atomic_nand_fetch(vp1, v1, __ATOMIC_SEQ_CST); } … … 349 301 { long long int ret; ret = __atomic_nand_fetch(vp8, v8, __ATOMIC_SEQ_CST); } 350 302 { long long int ret; ret = __atomic_nand_fetch_8(vp8, v8, __ATOMIC_SEQ_CST); } 351 #if defined(__SIZEOF_INT128__)352 303 { __int128 ret; ret = __atomic_nand_fetch(vp16, v16, __ATOMIC_SEQ_CST); } 353 304 { __int128 ret; ret = __atomic_nand_fetch_16(vp16, v16, __ATOMIC_SEQ_CST); } 354 #endif355 305 356 306 { char ret; ret = __atomic_xor_fetch(vp1, v1, __ATOMIC_SEQ_CST); } … … 362 312 { long long int ret; ret = __atomic_xor_fetch(vp8, v8, __ATOMIC_SEQ_CST); } 363 313 { long long int ret; ret = __atomic_xor_fetch_8(vp8, v8, __ATOMIC_SEQ_CST); } 364 #if defined(__SIZEOF_INT128__)365 314 { __int128 ret; ret = __atomic_xor_fetch(vp16, v16, __ATOMIC_SEQ_CST); } 366 315 { __int128 ret; ret = __atomic_xor_fetch_16(vp16, v16, __ATOMIC_SEQ_CST); } 367 #endif368 316 369 317 { char ret; ret = __atomic_or_fetch(vp1, v1, __ATOMIC_SEQ_CST); } … … 375 323 { long long int ret; ret = __atomic_or_fetch(vp8, v8, __ATOMIC_SEQ_CST); } 376 324 { long long int ret; ret = __atomic_or_fetch_8(vp8, v8, __ATOMIC_SEQ_CST); } 377 #if defined(__SIZEOF_INT128__)378 325 { __int128 ret; ret = __atomic_or_fetch(vp16, v16, __ATOMIC_SEQ_CST); } 379 326 { __int128 ret; ret = __atomic_or_fetch_16(vp16, v16, __ATOMIC_SEQ_CST); } 380 #endif381 327 382 328 { char ret; ret = __atomic_fetch_add(vp1, v1, __ATOMIC_SEQ_CST); } … … 388 334 { long long int ret; ret = __atomic_fetch_add(vp8, v8, __ATOMIC_SEQ_CST); } 389 335 { long long int ret; ret = __atomic_fetch_add_8(vp8, v8, __ATOMIC_SEQ_CST); } 390 #if defined(__SIZEOF_INT128__)391 336 { __int128 ret; ret = __atomic_fetch_add(vp16, v16, __ATOMIC_SEQ_CST); } 392 337 { __int128 ret; ret = __atomic_fetch_add_16(vp16, v16, __ATOMIC_SEQ_CST); } 393 #endif394 338 395 339 { char ret; ret = __atomic_fetch_sub(vp1, v1, __ATOMIC_SEQ_CST); } … … 401 345 { long long int ret; ret = __atomic_fetch_sub(vp8, v8, __ATOMIC_SEQ_CST); } 402 346 { long long int ret; ret = __atomic_fetch_sub_8(vp8, v8, __ATOMIC_SEQ_CST); } 403 #if defined(__SIZEOF_INT128__)404 347 { __int128 ret; ret = __atomic_fetch_sub(vp16, v16, __ATOMIC_SEQ_CST); } 405 348 { __int128 ret; ret = __atomic_fetch_sub_16(vp16, v16, __ATOMIC_SEQ_CST); } 406 #endif407 349 408 350 { char ret; ret = __atomic_fetch_and(vp1, v1, __ATOMIC_SEQ_CST); } … … 414 356 { long long int ret; ret = __atomic_fetch_and(vp8, v8, __ATOMIC_SEQ_CST); } 415 357 { long long int ret; ret = __atomic_fetch_and_8(vp8, v8, __ATOMIC_SEQ_CST); } 416 #if defined(__SIZEOF_INT128__)417 358 { __int128 ret; ret = __atomic_fetch_and(vp16, v16, __ATOMIC_SEQ_CST); } 418 359 { __int128 ret; ret = __atomic_fetch_and_16(vp16, v16, __ATOMIC_SEQ_CST); } 419 #endif420 360 421 361 { char ret; ret = __atomic_fetch_nand(vp1, v1, __ATOMIC_SEQ_CST); } … … 427 367 { long long int ret; ret = __atomic_fetch_nand(vp8, v8, __ATOMIC_SEQ_CST); } 428 368 { long long int ret; ret = __atomic_fetch_nand_8(vp8, v8, __ATOMIC_SEQ_CST); } 429 #if defined(__SIZEOF_INT128__)430 369 { __int128 ret; ret = __atomic_fetch_nand(vp16, v16, __ATOMIC_SEQ_CST); } 431 370 { __int128 ret; ret = __atomic_fetch_nand_16(vp16, v16, __ATOMIC_SEQ_CST); } 432 #endif433 371 434 372 { char ret; ret = __atomic_fetch_xor(vp1, v1, __ATOMIC_SEQ_CST); } … … 440 378 { long long int ret; ret = __atomic_fetch_xor(vp8, v8, __ATOMIC_SEQ_CST); } 441 379 { long long int ret; ret = __atomic_fetch_xor_8(vp8, v8, __ATOMIC_SEQ_CST); } 442 #if defined(__SIZEOF_INT128__)443 380 { __int128 ret; ret = __atomic_fetch_xor(vp16, v16, __ATOMIC_SEQ_CST); } 444 381 { __int128 ret; ret = __atomic_fetch_xor_16(vp16, v16, __ATOMIC_SEQ_CST); } 445 #endif446 382 447 383 { char ret; ret = __atomic_fetch_or(vp1, v1, __ATOMIC_SEQ_CST); } … … 453 389 { long long int ret; ret = __atomic_fetch_or(vp8, v8, __ATOMIC_SEQ_CST); } 454 390 { long long int ret; ret = __atomic_fetch_or_8(vp8, v8, __ATOMIC_SEQ_CST); } 455 #if defined(__SIZEOF_INT128__)456 391 { __int128 ret; ret = __atomic_fetch_or(vp16, v16, __ATOMIC_SEQ_CST); } 457 392 { __int128 ret; ret = __atomic_fetch_or_16(vp16, v16, __ATOMIC_SEQ_CST); } 458 #endif459 393 460 394 { _Bool ret; ret = __atomic_always_lock_free(sizeof(int), vp4); }
Note:
See TracChangeset
for help on using the changeset viewer.