]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Merge from trunk:
authorJulian Seward <jseward@acm.org>
Mon, 17 Oct 2016 19:10:57 +0000 (19:10 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 17 Oct 2016 19:10:57 +0000 (19:10 +0000)
  16034  Power configure fixes.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_12_BRANCH@16057

configure.ac
none/tests/ppc64/Makefile.am
none/tests/ppc64/test_isa_3_0.c
none/tests/ppc64/test_isa_3_0_altivec.vgtest
none/tests/ppc64/test_isa_3_0_other.vgtest
tests/check_ppc64_auxv_cap
tests/min_power_isa.c

index ac70fe007b1c0ebb2dc0c138a4c570c0e29fdb40..417d5beb7484b20401a192e5cb734ce7144baafe 100644 (file)
@@ -1346,6 +1346,7 @@ AC_HWCAP_CONTAINS_FLAG([dfp],[HWCAP_HAS_DFP])
 AC_HWCAP_CONTAINS_FLAG([arch_2_05],[HWCAP_HAS_ISA_2_05])
 AC_HWCAP_CONTAINS_FLAG([arch_2_06],[HWCAP_HAS_ISA_2_06])
 AC_HWCAP_CONTAINS_FLAG([arch_2_07],[HWCAP_HAS_ISA_2_07])
+AC_HWCAP_CONTAINS_FLAG([arch_3_00],[HWCAP_HAS_ISA_3_00])
 AC_HWCAP_CONTAINS_FLAG([htm],[HWCAP_HAS_HTM])
 
 # ISA Levels
@@ -1516,20 +1517,21 @@ AM_CONDITIONAL(SUPPORTS_HTM, test x$ac_compiler_supports_htm = xyes \
                                -a x$HWCAP_HAS_HTM = xyes )
 
 # isa 3.0 checking
-AC_MSG_CHECKING([that assembler knows ISA 3.0 ])
+AC_MSG_CHECKING([that assembler knows ISA 3.00 ])
 
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 ]], [[
   __asm__ __volatile__("cnttzw 1,2 ");
 ]])], [
-ac_asm_have_isa_3_0=yes
+ac_asm_have_isa_3_00=yes
 AC_MSG_RESULT([yes])
 ], [
-ac_asm_have_isa_3_0=no
+ac_asm_have_isa_3_00=no
 AC_MSG_RESULT([no])
 ])
 
-AM_CONDITIONAL(HAS_ISA_3_0, test x$ac_asm_have_isa_3_0 = xyes)
+AM_CONDITIONAL(HAS_ISA_3_00, test x$ac_asm_have_isa_3_00 = xyes \
+                             -a x$HWCAP_HAS_ISA_3_00 = xyes])
 
 # Check for pthread_create@GLIBC2.0
 AC_MSG_CHECKING([for pthread_create@GLIBC2.0()])
index 003967e4c1f01b2d2b3e945b7c45ac8ca8d31475..a79d35ac8fa437c69e30cf671059333c6a972fc7 100644 (file)
@@ -102,12 +102,12 @@ endif
 jm_insns_CFLAGS = $(AM_CFLAGS) -Wl,-z,norelro -Winline -Wall -O -g -mregnames \
                        @FLAG_M64@ $(ALTIVEC_FLAG) $(BUILD_FLAG_ALTIVEC)
 
-if HAS_ISA_3_0
-BUILD_FLAGS_ISA_3_0 = -mcpu=power8
-ISA_3_0_FLAG = -DHAS_ISA_3_0
+if HAS_ISA_3_00
+BUILD_FLAGS_ISA_3_00 = -mcpu=power8
+ISA_3_00_FLAG = -DHAS_ISA_3_00
 else
-BUILD_FLAGS_ISA_3_0 =
-ISA_3_0_FLAG =
+BUILD_FLAGS_ISA_3_00 =
+ISA_3_00_FLAG =
 endif
 
 test_isa_2_06_part1_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(VSX_FLAG) \
@@ -139,8 +139,9 @@ test_tm_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(HTM_FLAG) $(ISA_
                        @FLAG_M64@ $(BUILD_FLAGS_ISA_2_07)
 test_touch_tm_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(HTM_FLAG) $(ISA_2_07_FLAG) \
                        @FLAG_M64@ $(BUILD_FLAGS_ISA_2_07)
-test_isa_3_0_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(HTM_FLAG) $(ISA_3_0_FLAG) \
-                       @FLAG_M64@ $(BUILD_FLAGS_ISA_3_0)
+
+test_isa_3_0_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(HTM_FLAG) $(ISA_3_00_FLAG) \
+                       @FLAG_M64@ $(BUILD_FLAGS_ISA_3_00)
 
 test_isa_2_06_part3_LDADD = -lm
 test_dfp1_LDADD = -lm
index a860eed533eb8a4d404e0c551e5bd2eea218b071..5f5cd18481102daa86bc7c579584f7b8e68cfb8b 100644 (file)
@@ -94,7 +94,7 @@
 #include <stdint.h>
 
 /* This test is only valid on machines that support IBM POWER ISA 3.0. */
-#ifdef HAS_ISA_3_0
+#ifdef HAS_ISA_3_00
 
 #include <assert.h>
 #include <ctype.h>     // isspace
@@ -3957,12 +3957,12 @@ static void usage (void)
            );
 }
 
-#endif   // HAS_ISA_3_0
+#endif   // HAS_ISA_3_00
 int main (int argc, char **argv)
 {
 
-#ifndef HAS_ISA_3_0
-   printf("NO ISA 3.0 SUPPORT\n");
+#ifndef HAS_ISA_3_00
+   printf("NO ISA 3.00 SUPPORT\n");
    return 0;
 
 #else
index 748c9f41e784122ccaefd4e3009f1b07f48be2c9..9287e5a2e028adae4ac0a3b8f7581debf1ee513e 100644 (file)
@@ -1,2 +1,2 @@
-prereq: ../../../tests/check_ppc64_auxv_cap arch_3_0
+prereq: ../../../tests/check_ppc64_auxv_cap arch_3_00
 prog: test_isa_3_0  -a -d -q
index 8ebb1b58239b780d86cf473a012e7fc3898c7771..817f7efb8e6835646b9d2b0d022db6fb06e5eabb 100644 (file)
@@ -1,2 +1,2 @@
-prereq: ../../../tests/check_ppc64_auxv_cap arch_3_0
+prereq: ../../../tests/check_ppc64_auxv_cap arch_3_00
 prog: test_isa_3_0 -i -m -D -B -N -P
index 49d7856d56cc1318b31f12de8422403a1146055e..92a219ec8473249fa4295dac2f6035f4a35288c3 100755 (executable)
@@ -14,7 +14,7 @@ CAPABILITY_WORD=$1
 P_HWCAP_1=" vsx arch_2_06 power6x dfp pa6t arch_2_05 ic_snoop smt booke"
 P_HWCAP_2=" cellbe power5+ power5 power4 notb efpdouble efpsingle spe"
 P_HWCAP_3=" ucache 4xxmac mmu fpu altivec ppc601 ppc64 ppc32 "
-P_HWCAP2_1=" tar isel ebb dscr htm arch_2_07 "
+P_HWCAP2_1=" tar isel ebb dscr htm arch_2_07 arch_3_00 "
 CAPABILITY_FOUND="no"
 for POTENTIAL_CAP in $P_HWCAP_1 $P_HWCAP_2 $P_HWCAP_3 $P_HWCAP2_1 ; do
        if [ "x$CAPABILITY_WORD" = "x$POTENTIAL_CAP" ]; then
index 8a37b6a09a2e04348df71abe97a56a5a2a01efc0..e4035ceb045624cd990710907eeebbe9bd2c1de0 100644 (file)
@@ -5,7 +5,7 @@
 /* main() */
 int main(int argc, char **argv)
 {
-   /* This program is passed in a minimum ISA that the underlying hardwre
+   /* This program is passed in a minimum ISA that the underlying hardware
     * needs to support.  If the HW supports this ISA or newer, return 0
     * for supported.  Otherwise, return 1 for not supported.  Return 2 for
     * usage error.
@@ -45,8 +45,8 @@ int main(int argc, char **argv)
    isa_level = 7;
 #endif
 
-#ifdef HAS_ISA_3_0
-   if (debug) printf("HAS_ISA_3_0 is set\n");
+#ifdef HAS_ISA_3_00
+   if (debug) printf("HAS_ISA_3_00 is set\n");
    isa_level = 8;
 #endif
 
@@ -60,12 +60,12 @@ int main(int argc, char **argv)
    } else if (strcmp (min_isa, "2.07") == 0) {
       return !(isa_level >= 7);
 
-   } else if (strcmp (min_isa, "3.0") == 0) {
+   } else if (strcmp (min_isa, "3.00") == 0) {
       return !(isa_level >= 8);
 
    } else {
       fprintf(stderr, "ERROR: invalid ISA version.  Valid versions numbers are:\n" );
-      fprintf(stderr, "       2.05, 2.06, 2.07\n" );
+      fprintf(stderr, "       2.05, 2.06, 2.07, 3.00\n" );
       exit(2);
    }