| 1 |
/* This checks the availability of the XL compiler intrinsics for |
| 2 |
transactional execution with the expected prototypes. */ |
| 3 |
|
| 4 |
/* { dg-do compile } */ |
| 5 |
/* { dg-options "-O3 -march=zEC12 -mzarch" } */ |
| 6 |
|
| 7 |
#include <htmxlintrin.h> |
| 8 |
|
| 9 |
int a = 0; |
| 10 |
unsigned long g; |
| 11 |
|
| 12 |
int |
| 13 |
foo () |
| 14 |
{ |
| 15 |
struct __htm_tdb *tdb_struct; |
| 16 |
void * const tdb = tdb_struct; |
| 17 |
long result; |
| 18 |
unsigned char code; |
| 19 |
|
| 20 |
result = __TM_simple_begin (); |
| 21 |
result = __TM_begin (tdb); |
| 22 |
result = __TM_end (); |
| 23 |
__TM_abort (); |
| 24 |
__TM_named_abort (42); |
| 25 |
__TM_non_transactional_store (&g, 42); |
| 26 |
result = __TM_nesting_depth (tdb); |
| 27 |
|
| 28 |
result = __TM_is_user_abort (tdb); |
| 29 |
result = __TM_is_named_user_abort (tdb, &code); |
| 30 |
result = __TM_is_illegal (tdb); |
| 31 |
result = __TM_is_footprint_exceeded (tdb); |
| 32 |
result = __TM_is_nested_too_deep (tdb); |
| 33 |
result = __TM_is_conflict (tdb); |
| 34 |
result = __TM_is_failure_persistent (result); |
| 35 |
result = __TM_failure_address (tdb); |
| 36 |
result = __TM_failure_code (tdb); |
| 37 |
} |