From f190d6284359da8ae8694b2d2e14b01602a959ed Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Wed, 18 Jun 2014 13:00:04 -0700 Subject: Merge GCC 4.8.3 Change-Id: I0abe59f7705b3eccc6b2f123af75b2e30917696a --- .../gcc.target/s390/htm-builtins-compile-3.c | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 gcc-4.8/gcc/testsuite/gcc.target/s390/htm-builtins-compile-3.c (limited to 'gcc-4.8/gcc/testsuite/gcc.target/s390/htm-builtins-compile-3.c') diff --git a/gcc-4.8/gcc/testsuite/gcc.target/s390/htm-builtins-compile-3.c b/gcc-4.8/gcc/testsuite/gcc.target/s390/htm-builtins-compile-3.c new file mode 100644 index 000000000..77ceeb770 --- /dev/null +++ b/gcc-4.8/gcc/testsuite/gcc.target/s390/htm-builtins-compile-3.c @@ -0,0 +1,37 @@ +/* This checks the availability of the XL compiler intrinsics for + transactional execution with the expected prototypes. */ + +/* { dg-do compile } */ +/* { dg-options "-O3 -march=zEC12 -mzarch" } */ + +#include + +int a = 0; +unsigned long g; + +int +foo () +{ + struct __htm_tdb *tdb_struct; + void * const tdb = tdb_struct; + long result; + unsigned char code; + + result = __TM_simple_begin (); + result = __TM_begin (tdb); + result = __TM_end (); + __TM_abort (); + __TM_named_abort (42); + __TM_non_transactional_store (&g, 42); + result = __TM_nesting_depth (tdb); + + result = __TM_is_user_abort (tdb); + result = __TM_is_named_user_abort (tdb, &code); + result = __TM_is_illegal (tdb); + result = __TM_is_footprint_exceeded (tdb); + result = __TM_is_nested_too_deep (tdb); + result = __TM_is_conflict (tdb); + result = __TM_is_failure_persistent (result); + result = __TM_failure_address (tdb); + result = __TM_failure_code (tdb); +} -- cgit v1.2.3