|
From: <sv...@va...> - 2013-10-02 17:48:58
|
Author: carll
Date: Wed Oct 2 17:48:48 2013
New Revision: 13608
Log:
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
Modified:
trunk/none/tests/ppc32/Makefile.am
trunk/none/tests/ppc64/Makefile.am
trunk/none/tests/ppc64/test_tm.c
Modified: trunk/none/tests/ppc32/Makefile.am
==============================================================================
--- trunk/none/tests/ppc32/Makefile.am (original)
+++ trunk/none/tests/ppc32/Makefile.am Wed Oct 2 17:48:48 2013
@@ -88,7 +88,7 @@
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 =
@@ -129,5 +129,5 @@
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)
Modified: trunk/none/tests/ppc64/Makefile.am
==============================================================================
--- trunk/none/tests/ppc64/Makefile.am (original)
+++ trunk/none/tests/ppc64/Makefile.am Wed Oct 2 17:48:48 2013
@@ -69,7 +69,7 @@
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 =
@@ -108,5 +108,5 @@
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)
Modified: trunk/none/tests/ppc64/test_tm.c
==============================================================================
--- trunk/none/tests/ppc64/test_tm.c (original)
+++ trunk/none/tests/ppc64/test_tm.c Wed Oct 2 17:48:48 2013
@@ -1,4 +1,5 @@
#include <stdio.h>
+#ifdef HAS_ISA_2_07
int __attribute__ ((noinline)) htm_begin (int r3, int r4)
{
int ret;
@@ -10,10 +11,13 @@
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;
}
|