|
From: <sv...@va...> - 2015-09-21 09:53:07
|
Author: sewardj
Date: Mon Sep 21 10:53:00 2015
New Revision: 15662
Log:
Merge, from trunk, r15653 (Add Power PC ISA check to the vbit-test; bug 352765)
Added:
branches/VALGRIND_3_11_BRANCH/tests/min_power_isa.c
- copied unchanged from r15653, trunk/tests/min_power_isa.c
Modified:
branches/VALGRIND_3_11_BRANCH/ (props changed)
branches/VALGRIND_3_11_BRANCH/memcheck/tests/vbit-test/irops.c
branches/VALGRIND_3_11_BRANCH/tests/Makefile.am
Modified: branches/VALGRIND_3_11_BRANCH/memcheck/tests/vbit-test/irops.c
==============================================================================
--- branches/VALGRIND_3_11_BRANCH/memcheck/tests/vbit-test/irops.c (original)
+++ branches/VALGRIND_3_11_BRANCH/memcheck/tests/vbit-test/irops.c Mon Sep 21 10:53:00 2015
@@ -1143,6 +1143,38 @@
return p->amd64 ? p : NULL;
#endif
#ifdef __powerpc__
+#define MIN_POWER_ISA "../../../tests/min_power_isa"
+
+ switch (op) {
+ case Iop_DivS64E:
+ case Iop_DivU64E:
+ case Iop_DivU32E:
+ case Iop_DivS32E:
+ case Iop_F64toI64U:
+ case Iop_F64toI32U:
+ case Iop_I64UtoF64:
+ case Iop_I64UtoF32:
+ case Iop_I64StoD64: {
+ int rc;
+ /* IROps require a processor that supports ISA 2.06 or newer */
+ rc = system(MIN_POWER_ISA " 2.06 ");
+ rc /= 256;
+ /* MIN_POWER_ISA returns 0 if underlying HW supports the
+ * specified ISA or newer. Returns 1 if the HW does not support
+ * the specified ISA. Returns 2 on error.
+ */
+ if (rc == 1) return NULL;
+ if (rc > 2) {
+ panic(" ERROR, min_power_isa() return code is invalid.\n");
+ }
+ }
+ break;
+
+ /* Other */
+ default:
+ break;
+ }
+
#ifdef __powerpc64__
return p->ppc64 ? p : NULL;
#else
Modified: branches/VALGRIND_3_11_BRANCH/tests/Makefile.am
==============================================================================
--- branches/VALGRIND_3_11_BRANCH/tests/Makefile.am (original)
+++ branches/VALGRIND_3_11_BRANCH/tests/Makefile.am Mon Sep 21 10:53:00 2015
@@ -1,6 +1,26 @@
include $(top_srcdir)/Makefile.tool-tests.am
+if HAS_ISA_2_05
+ISA_2_05_FLAG = -DHAS_ISA_2_05
+else
+ISA_2_05_FLAG =
+endif
+
+if HAS_ISA_2_06
+ISA_2_06_FLAG = -DHAS_ISA_2_06
+else
+ISA_2_06_FLAG =
+endif
+
+if HAS_ISA_2_07
+ISA_2_07_FLAG = -DHAS_ISA_2_07
+else
+ISA_2_07_FLAG =
+endif
+
+min_power_isa_FLAGS = $(ISA_2_05_FLAG) $(ISA_2_06_FLAG) $(ISA_2_07_FLAG)
+
dist_noinst_SCRIPTS = \
check_headers_and_includes \
check_makefile_consistency \
@@ -29,7 +49,8 @@
s390x_features \
mips_features \
power_insn_available \
- is_ppc64_BE
+ is_ppc64_BE \
+ min_power_isa
AM_CFLAGS += $(AM_FLAG_M3264_PRI)
AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
@@ -40,3 +61,4 @@
x86_amd64_features_CFLAGS = $(AM_CFLAGS)
endif
+min_power_isa_CFLAGS = $(min_power_isa_FLAGS)
|