]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix isa 3.1 test code on ppc64.
authorMark Wielaard <mark@klomp.org>
Wed, 23 Sep 2020 10:49:34 +0000 (12:49 +0200)
committerMark Wielaard <mark@klomp.org>
Wed, 23 Sep 2020 10:51:27 +0000 (12:51 +0200)
On ppc64 [old big endian] altivec.h can not be included directly.
Move the HAS_ISA_3_1 guard around so the include is only done when
the full test (and test_list_t) are build.

none/tests/ppc64/test_isa_3_1_RT.c
none/tests/ppc64/test_isa_3_1_XT.c

index fc33c76722b926c7406516bcd9824a68f8788209..46c109b25622d7044f4e846e96cf3282b09da998 100644 (file)
@@ -29,7 +29,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <altivec.h>
 #include <malloc.h>
 
 #include <string.h>
 unsigned long current_cr;
 unsigned long current_fpscr;
 
+#ifdef HAS_ISA_3_1
 
-struct test_list_t current_test;
-
+#include <altivec.h>
 #include "isa_3_1_helpers.h"
 
-#ifdef HAS_ISA_3_1
+struct test_list_t current_test;
 
 static void test_plbz_off0 (void) {
   __asm__ __volatile__ ("plbz %0, 0(%1), 0" : "=r" (rt) : "r" (ra) );
index dfe11c3c6c7577f968bacf38625386b1901d9419..b644ba1cab639439de7cebe5d64cca317e385de1 100644 (file)
@@ -29,7 +29,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <altivec.h>
 #include <malloc.h>
 
 #include <string.h>
 unsigned long current_cr;
 unsigned long current_fpscr;
 
+#ifdef HAS_ISA_3_1
 
-struct test_list_t current_test;
-
+#include <altivec.h>
 #include "isa_3_1_helpers.h"
 
-#ifdef HAS_ISA_3_1
+struct test_list_t current_test;
 
 static void test_plfd_64 (void) {
   __asm__ __volatile__ ("plfd 28, 64(%0), 0" :: "r" (ra) );