From cea0056fcf99423f98b29ec92c7403ad5586f915 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 23 Sep 2020 12:49:34 +0200 Subject: [PATCH] Fix isa 3.1 test code on ppc64. 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 | 7 +++---- none/tests/ppc64/test_isa_3_1_XT.c | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/none/tests/ppc64/test_isa_3_1_RT.c b/none/tests/ppc64/test_isa_3_1_RT.c index fc33c76722..46c109b256 100644 --- a/none/tests/ppc64/test_isa_3_1_RT.c +++ b/none/tests/ppc64/test_isa_3_1_RT.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include @@ -44,12 +43,12 @@ unsigned long current_cr; unsigned long current_fpscr; +#ifdef HAS_ISA_3_1 -struct test_list_t current_test; - +#include #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) ); diff --git a/none/tests/ppc64/test_isa_3_1_XT.c b/none/tests/ppc64/test_isa_3_1_XT.c index dfe11c3c6c..b644ba1cab 100644 --- a/none/tests/ppc64/test_isa_3_1_XT.c +++ b/none/tests/ppc64/test_isa_3_1_XT.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include @@ -44,12 +43,12 @@ unsigned long current_cr; unsigned long current_fpscr; +#ifdef HAS_ISA_3_1 -struct test_list_t current_test; - +#include #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) ); -- 2.47.3