]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
To test extended BFP opcodes we need sizeof(long double) == 16.
authorFlorian Krohm <florian@eich-krohm.de>
Fri, 4 Sep 2015 20:52:20 +0000 (20:52 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Fri, 4 Sep 2015 20:52:20 +0000 (20:52 +0000)
Certain old versions of GCC don't have that as default. So we must
give -mlong-double-128 on the command line.
Pertains to BZ #352183.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15623

configure.ac
none/tests/s390x/Makefile.am
none/tests/s390x/fpext.vgtest
none/tests/s390x/fpext_fail.vgtest

index 9211b95c42c067525666e63a58b6562c135a77b2..95bc904e8745928285cd1d85299aea96c6c60a8f 100644 (file)
@@ -1847,6 +1847,25 @@ CFLAGS=$safe_CFLAGS
 AC_SUBST(PREFERRED_STACK_BOUNDARY_2)
 
 
+# does this compiler support -mlong-double-128 ?
+AC_MSG_CHECKING([if gcc accepts -mlong-double-128])
+safe_CFLAGS=$CFLAGS
+CFLAGS="-mlong-double-128 -Werror"
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+  return 0;
+]])], [
+ac_compiler_supports_mlong_double_128=yes
+AC_MSG_RESULT([yes])
+], [
+ac_compiler_supports_mlong_double_128=no
+AC_MSG_RESULT([no])
+])
+CFLAGS=$safe_CFLAGS
+AM_CONDITIONAL(HAS_MLONG_DOUBLE_128, test x$ac_compiler_supports_mlong_double_128 = xyes)
+FLAG_MLONG_DOUBLE_128="-mlong-double-128"
+AC_SUBST(FLAG_MLONG_DOUBLE_128)
+
+
 # Convenience function to check whether GCC supports a particular
 # warning option. Takes two arguments,
 # first the warning flag name to check (without -W), then the
index 4100088bd94fbadba5fe50976d86b1bd30fdc16c..f4fede1fa226a67ceb866f2161a743a07d7df295 100644 (file)
@@ -8,7 +8,7 @@ INSN_TESTS = clc clcle cvb cvd icm lpr tcxb lam_stam xc mvst add sub mul \
              op_exception fgx stck stckf stcke stfle cksm mvcl clcl troo \
              trto trot trtt tr tre cij cgij clij clgij crj cgrj clrj clgrj \
              cs csg cds cdsg cu21 cu21_1 cu24 cu24_1 cu42 cu12 cu12_1 \
-             ex_sig ex_clone cu14 cu14_1 cu41 fpconv ecag fpext fpext_warn \
+             ex_sig ex_clone cu14 cu14_1 cu41 fpconv ecag fpext_warn \
              rounding-1 rounding-2 rounding-3 rounding-4 rounding-5 bfp-1 \
              bfp-2 bfp-3 bfp-4 srnm srnmb comp-1 comp-2 exrl tmll tm stmg \
             ex clst mvc test_fork test_sig rounding-6 rxsbg\
@@ -21,6 +21,9 @@ INSN_TESTS = clc clcle cvb cvd icm lpr tcxb lam_stam xc mvst add sub mul \
 if BUILD_DFP_TESTS
   INSN_TESTS += dfp-1 dfp-2 dfp-3 dfp-4 dfptest dfpext dfpconv srnmt pfpo
 endif
+if HAS_MLONG_DOUBLE_128
+  INSN_TESTS += fpext
+endif
 
 check_PROGRAMS = $(INSN_TESTS) \
                 allexec \
@@ -33,6 +36,7 @@ EXTRA_DIST = \
        ecag.stdout.exp-z10ec ecag.stdout.exp-z196 ecag.stdout.exp-zec12 \
        ecag.stdout.exp-z13 \
        op00.stderr.exp1 op00.stderr.exp2 op00.vgtest \
+       fpext.vgtest fpext.stderr.exp fpext.stdout.exp \
        fpext_fail.vgtest fpext_fail.stderr.exp fpext_fail.stdout.exp \
        test.h opcodes.h add.h  and.h  div.h  insert.h dfp_utils.h \
        mul.h  or.h  sub.h  xor.h table.h svc.h rounding.h \
@@ -56,5 +60,5 @@ cu12_1_CFLAGS    = $(AM_CFLAGS) -DM3=1
 cu14_1_CFLAGS    = $(AM_CFLAGS) -DM3=1
 cu21_1_CFLAGS    = $(AM_CFLAGS) -DM3=1
 cu24_1_CFLAGS    = $(AM_CFLAGS) -DM3=1
-
+fpext_CFLAGS     = $(AM_CFLAGS) @FLAG_MLONG_DOUBLE_128@
 ex_clone_LDFLAGS = -lpthread
index 47404300da48b75a87b9c7ce77e2c78c3fa859a9..948bad9de12cc1a0acd12010271c904df1913332 100644 (file)
@@ -1,2 +1,2 @@
 prog: fpext
-prereq: ../../../tests/s390x_features s390x-fpext
+prereq: test -e fpext && ../../../tests/s390x_features s390x-fpext
index 64ed5ee90ba8a906e32a36a41fba2cc5d81be01c..970cbedff717dfab4ce70f7d3367c9f6a1c73f28 100644 (file)
@@ -1,2 +1,2 @@
 prog: fpext
-prereq: ../../../tests/s390x_features '!s390x-fpext'
+prereq: test -e fpext && ../../../tests/s390x_features '!s390x-fpext'