1 /* This checks the availability of the XL compiler intrinsics for
2 transactional execution with the expected prototypes. */
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" } */
9 #include <htmxlintrin.h>
12 foo (void *TM_buff
, long *result
, unsigned char *code
)
14 *result
++ = __TM_simple_begin ();
15 *result
++ = __TM_begin (TM_buff
);
16 *result
++ = __TM_end ();
18 __TM_named_abort (*code
);
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
);