|
From: <sv...@va...> - 2016-10-10 18:09:14
|
Author: carll
Date: Mon Oct 10 19:09:01 2016
New Revision: 16034
Log:
Power configure fixes.
This patch makes the following updates:
- Update the configure scripts to fix a configure/build issue seen on Power 7
- Update the ISA 3.0 hwcaps string.
- Update the ISA 3.0 ifdef value to be consistent with the hwcaps string
The patch was submitted by Will Schmidt. Patch reviewed and tested by Carl Love
on Power 7, Power 8 LE and BE, ISA 3.0 simulator for LE and BE.
Bugzilla 369175
Modified:
trunk/configure.ac
trunk/none/tests/ppc64/Makefile.am
trunk/none/tests/ppc64/test_isa_3_0.c
trunk/none/tests/ppc64/test_isa_3_0_altivec.vgtest
trunk/none/tests/ppc64/test_isa_3_0_other.vgtest
trunk/tests/check_ppc64_auxv_cap
trunk/tests/min_power_isa.c
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Mon Oct 10 19:09:01 2016
@@ -1353,6 +1353,7 @@
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
@@ -1523,20 +1524,21 @@
-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()])
Modified: trunk/none/tests/ppc64/Makefile.am
==============================================================================
--- trunk/none/tests/ppc64/Makefile.am (original)
+++ trunk/none/tests/ppc64/Makefile.am Mon Oct 10 19:09:01 2016
@@ -102,12 +102,12 @@
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 @@
@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
Modified: trunk/none/tests/ppc64/test_isa_3_0.c
==============================================================================
--- trunk/none/tests/ppc64/test_isa_3_0.c (original)
+++ trunk/none/tests/ppc64/test_isa_3_0.c Mon Oct 10 19:09:01 2016
@@ -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 @@
);
}
-#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
Modified: trunk/none/tests/ppc64/test_isa_3_0_altivec.vgtest
==============================================================================
--- trunk/none/tests/ppc64/test_isa_3_0_altivec.vgtest (original)
+++ trunk/none/tests/ppc64/test_isa_3_0_altivec.vgtest Mon Oct 10 19:09:01 2016
@@ -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
Modified: trunk/none/tests/ppc64/test_isa_3_0_other.vgtest
==============================================================================
--- trunk/none/tests/ppc64/test_isa_3_0_other.vgtest (original)
+++ trunk/none/tests/ppc64/test_isa_3_0_other.vgtest Mon Oct 10 19:09:01 2016
@@ -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
Modified: trunk/tests/check_ppc64_auxv_cap
==============================================================================
--- trunk/tests/check_ppc64_auxv_cap (original)
+++ trunk/tests/check_ppc64_auxv_cap Mon Oct 10 19:09:01 2016
@@ -14,7 +14,7 @@
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
Modified: trunk/tests/min_power_isa.c
==============================================================================
--- trunk/tests/min_power_isa.c (original)
+++ trunk/tests/min_power_isa.c Mon Oct 10 19:09:01 2016
@@ -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 @@
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 @@
} 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);
}
|