Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/htm-xl-intrin-1.c

raw
1 /* This checks the availability of the XL compiler intrinsics for
2 transactional execution with the expected prototypes. */
3
4 /* { dg-do compile { target { powerpc*-*-* } } } */
5 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
6 /* { dg-require-effective-target powerpc_htm_ok } */
7 /* { dg-options "-O2 -mhtm" } */
8
9 #include <htmxlintrin.h>
10
11 void
12 foo (void *TM_buff, long *result, unsigned char *code)
13 {
14 *result++ = __TM_simple_begin ();
15 *result++ = __TM_begin (TM_buff);
16 *result++ = __TM_end ();
17 __TM_abort ();
18 __TM_named_abort (*code);
19 __TM_resume ();
20 __TM_suspend ();
21 *result++ = __TM_is_user_abort (TM_buff);
22 *result++ = __TM_is_named_user_abort (TM_buff, code);
23 *result++ = __TM_is_illegal (TM_buff);
24 *result++ = __TM_is_footprint_exceeded (TM_buff);
25 *result++ = __TM_nesting_depth (TM_buff);
26 *result++ = __TM_is_nested_too_deep (TM_buff);
27 *result++ = __TM_is_conflict (TM_buff);
28 *result++ = __TM_is_failure_persistent (TM_buff);
29 *result++ = __TM_failure_address (TM_buff);
30 *result++ = __TM_failure_code (TM_buff);
31 }
32