Bug 497723 - forgot to restore callgrind output cleanup
[valgrind.git] / none / tests / ppc64 / test_tm.c
blobc829384e233fe631e1abc2e23b92e514b0a27ec2
1 #include <stdio.h>
2 #ifdef SUPPORTS_HTM
3 int __attribute__ ((noinline)) htm_begin (int r3, int r4)
5 int ret;
7 if (__builtin_tbegin (0)) {
8 ret = r3;
9 __builtin_tend (0);
10 } else {
11 ret = r4;
12 } return ret;
14 #endif
16 int main (void) {
17 #ifdef SUPPORTS_HTM
18 int ret;
19 ret = htm_begin (10, 20);
20 printf ("ret = %d, expected = 10\n", ret);
21 #else
22 printf ("No HTM support.");
23 #endif
24 return 0;