Files
ftmemsim-valgrind/none/tests/ppc64/test_tm.c
Carl Love e9b1e99239 The test case for the Transaction Memory instructions failes with older
compilers as the -mhtm flag is not known.  The patch fixes the makefile
issue and addes #defines to the testcase code.

The testcase was added in valgrind commit 13607.

The bugzilla for adding the TM instruction support is 323803

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13608
2013-10-02 17:48:48 +00:00

24 lines
387 B
C

#include <stdio.h>
#ifdef HAS_ISA_2_07
int __attribute__ ((noinline)) htm_begin (int r3, int r4)
{
int ret;
if (__builtin_tbegin (0)) {
ret = r3;
__builtin_tend (0);
} else {
ret = r4;
} return ret;
}
#endif
int main (void) {
#ifdef HAS_ISA_2_07
int ret;
ret = htm_begin (10, 20);
printf ("ret = %d, expected = 10\n", ret);
#endif
return 0;
}