mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-11 22:08:14 +00:00
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
24 lines
387 B
C
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;
|
|
}
|