Home | History | Annotate | Download | only in ppc64
      1 #include <stdio.h>
      2 #ifdef HAS_ISA_2_07
      3 int __attribute__ ((noinline)) htm_begin (int r3, int r4)
      4 {
      5    int ret;
      6 
      7    if (__builtin_tbegin (0)) {
      8       ret = r3;
      9       __builtin_tend (0);
     10    } else {
     11       ret = r4;
     12    } return ret;
     13 }
     14 #endif
     15 
     16 int main (void) {
     17 #ifdef HAS_ISA_2_07
     18    int ret;
     19    ret = htm_begin (10, 20);
     20    printf ("ret = %d, expected = 10\n", ret);
     21 #endif
     22    return 0;
     23 }
     24