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
endif
if HAS_ISA_2_07
-BUILD_FLAGS_ISA_2_07 = -mcpu=power8
+BUILD_FLAGS_ISA_2_07 = -mhtm -mcpu=power8
ISA_2_07_FLAG = -DHAS_ISA_2_07
else
BUILD_FLAGS_ISA_2_07 =
test_isa_2_07_part2_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -lm -g -mregnames $(ISA_2_07_FLAG) \
@FLAG_M32@ $(BUILD_FLAGS_ISA_2_07)
-test_tm_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -lm -g -mhtm -mregnames $(ISA_2_07_FLAG) \
+test_tm_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -lm -g -mregnames $(ISA_2_07_FLAG) \
@FLAG_M32@ $(BUILD_FLAGS_ISA_2_07)
endif
if HAS_ISA_2_07
-BUILD_FLAGS_ISA_2_07 = -mcpu=power8
+BUILD_FLAGS_ISA_2_07 = -mhtm -mcpu=power8
ISA_2_07_FLAG = -DHAS_ISA_2_07
else
BUILD_FLAGS_ISA_2_07 =
test_isa_2_07_part2_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -lm -g -mregnames $(ISA_2_07_FLAG) \
@FLAG_M64@ $(BUILD_FLAGS_ISA_2_07)
-test_tm_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -lm -g -mhtm -mregnames $(ISA_2_07_FLAG) \
+test_tm_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -lm -g -mregnames $(ISA_2_07_FLAG) \
@FLAG_M64@ $(BUILD_FLAGS_ISA_2_07)
#include <stdio.h>
+#ifdef HAS_ISA_2_07
int __attribute__ ((noinline)) htm_begin (int r3, int r4)
{
int ret;
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;
}