]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
The test case for the Transaction Memory instructions failes with older
authorCarl Love <cel@us.ibm.com>
Wed, 2 Oct 2013 17:48:48 +0000 (17:48 +0000)
committerCarl Love <cel@us.ibm.com>
Wed, 2 Oct 2013 17:48:48 +0000 (17:48 +0000)
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

none/tests/ppc32/Makefile.am
none/tests/ppc64/Makefile.am
none/tests/ppc64/test_tm.c

index a8b20194c2ef5ce89ce19c1406551179a223a03b..dfd2d3fa82a5a3970b30f08c2785f35dd07e1535 100644 (file)
@@ -88,7 +88,7 @@ DFP_FLAG =
 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_part1_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -lm -g -mregnames $(
 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)
index 8ed6877b19c9843c0c0ccc7f158bfd493e2dffe1..4607cdd1646ab558b4abdf919103b41d028122a1 100644 (file)
@@ -69,7 +69,7 @@ DFP_FLAG =
 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_part1_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -lm -g -mregnames $(
 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)
index 87306c1b4c11b469c3efc5858b0bf8dd61e7c1f5..29eb5eb73c21319e46bdc22fbf33039306645dcc 100644 (file)
@@ -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 @@ int __attribute__ ((noinline)) htm_begin (int r3, int r4)
       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;
 }