In metaconfig.git, the branch master has been updated <http://perl5.git.perl.org/metaconfig.git/commitdiff/e12008a583a53f636ff09b735d6251da11eccf15?hp=17333dbf3f71d359b4b2dbc76a802eae9229b20e>
- Log ----------------------------------------------------------------- commit e12008a583a53f636ff09b735d6251da11eccf15 Author: H.Merijn Brand - Tux <[email protected]> Date: Thu Jul 28 16:59:08 2016 +0200 VAX Float format H Backport of commits Author: Jarkko Hietaniemi <[email protected]> Date: Wed Jul 27 07:04:02 2016 -0400 Configure: note that the infnan tests may crash. (And in VAX, that is exactly what happens with the infinities.) commit 86ea01eb2de6e15e79ff54031d7fabfb5f628d4e Author: Jarkko Hietaniemi <[email protected]> Date: Tue Jul 26 22:10:42 2016 -0400 Configure: VAX format H commit a0cc6aaf62d581814737e0f0869cd9ee9d8f88ef Author: Jarkko Hietaniemi <[email protected]> Date: Mon Jul 25 21:50:32 2016 -0400 VAX: catch vax floats beyond VMS or Ultrix commit e90f85309441678b2b41bb1acd37873f9443bb67 Author: Jarkko Hietaniemi <[email protected]> Date: Mon Jul 25 18:57:41 2016 -0400 VAX: document also formats S/T/X, and hidden bits Though S, T, and X are not really pure VAX formats per se. ----------------------------------------------------------------------- Summary of changes: U/modified/d_longdbl.U | 23 +++++++++++++++++++---- U/perl/infnan.U | 1 + U/perl/longdblfio.U | 12 ++++++------ U/perl/usequadmath.U | 16 +++++++++++++++- 4 files changed, 41 insertions(+), 11 deletions(-) diff --git a/U/modified/d_longdbl.U b/U/modified/d_longdbl.U index 51cf647..da127d1 100644 --- a/U/modified/d_longdbl.U +++ b/U/modified/d_longdbl.U @@ -33,8 +33,9 @@ ?S: 4 = x86 80-bit big endian, ?S: 5 = double-double 128-bit little endian, ?S: 6 = double-double 128-bit big endian, -?S: 7 = 128-bit mixed double-double (64-bit LEs in BE), -?S: 8 = 128-bit mixed double-double (64-bit BEs in LE), +?S: 7 = 128-bit mixed-endian double-double (64-bit LEs in BE), +?S: 8 = 128-bit mixed-endian double-double (64-bit BEs in LE), +?S: 9 = 128-bit PDP-style mixed-endian long doubles, ?S: -1 = unknown format. ?S:. ?C:HAS_LONG_DOUBLE: @@ -63,6 +64,7 @@ ?C: LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BE_BE ?C: LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LE_BE ?C: LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BE_LE +?C: LONG_DOUBLE_IS_VAX_H_FLOAT ?C: LONG_DOUBLE_IS_UNKNOWN_FORMAT ?C: It is only defined if the system supports long doubles. ?C:. @@ -80,6 +82,7 @@ ?H:?LONG_DOUBLESIZE:#define LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BE_BE 6 ?H:?LONG_DOUBLESIZE:#define LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LE_BE 7 ?H:?LONG_DOUBLESIZE:#define LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BE_LE 8 +?H:?LONG_DOUBLESIZE:#define LONG_DOUBLE_IS_VAX_H_FLOAT 9 ?H:?LONG_DOUBLESIZE:#define LONG_DOUBLE_IS_UNKNOWN_FORMAT -1 ?H:?LONG_DOUBLESIZE:#define LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LITTLE_ENDIAN LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LE_LE /* back-compat */ ?H:?LONG_DOUBLESIZE:#define LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BIG_ENDIAN LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BE_BE /* back-compat */ @@ -94,6 +97,7 @@ ?LINT:known LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BE_BE ?LINT:known LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LE_BE ?LINT:known LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BE_LE +?LINT:known LONG_DOUBLE_IS_VAX_H_FLOAT ?LINT:set d_longdbl ?LINT:set d_ldexpl : check for long doubles @@ -248,6 +252,16 @@ int main() { exit(0); } #endif +/* We are largely making this up because it may well be + * that the VAX format H was never made available to C, + * only to Fortran. */ +#if LONGDBLSIZE == 16 && defined(__vax__) + if (b[0] == 0xFD && b[15] == 0x99) { + /* VAX format H, PDP-11 mixed endian. */ + printf("9\n"); + exit(0); + } +#endif printf("-1\n"); /* unknown */ exit(0); } @@ -269,8 +283,9 @@ case "$longdblkind" in 4) echo "You have x86 80-bit big endian long doubles." >& 4 ;; 5) echo "You have 128-bit fully little-endian double-double long doubles (64-bit LEs in LE)." >& 4 ;; 6) echo "You have 128-bit fully big-endian double-double long doubles (64-bit BEs in BE)." >& 4 ;; -7) echo "You have 128-bit mixed double-double long doubles (64-bit LEs in BE)." >& 4 ;; -8) echo "You have 128-bit mixed double-double long doubles (64-bit BEs in LE)." >& 4 ;; +7) echo "You have 128-bit mixed-endian double-double long doubles (64-bit LEs in BE)." >& 4 ;; +8) echo "You have 128-bit mixed-endian double-double long doubles (64-bit BEs in LE)." >& 4 ;; +9) echo "You have 128-bit PDP-style mixed-endian long doubles." >& 4 ;; *) echo "Cannot figure out your long double." >&4 ;; esac $rm_try diff --git a/U/perl/infnan.U b/U/perl/infnan.U index de4026e..0a1e759 100644 --- a/U/perl/infnan.U +++ b/U/perl/infnan.U @@ -49,6 +49,7 @@ ?F:!try : Check what kind of inf/nan your system has $echo "Checking the kind of infinities and nans you have..." >&4 +$echo "(The following tests may crash. That's okay.)" >&4 $cat >try.c <<EOP #define DOUBLESIZE $doublesize #$d_longdbl HAS_LONG_DOUBLE diff --git a/U/perl/longdblfio.U b/U/perl/longdblfio.U index ebdedb1..635f8fe 100644 --- a/U/perl/longdblfio.U +++ b/U/perl/longdblfio.U @@ -199,7 +199,7 @@ int main() { exit(0); } if (b[0] == 0xCC && b[3] == 0xCC) { - /* VAX format F */ + /* VAX format F, 32-bit PDP-style mixed endian. */ printf("9\n"); exit(0); } @@ -230,12 +230,12 @@ int main() { exit(0); } if (b[0] == 0xCC && b[7] == 0xCC) { - /* VAX format D, 64-bit little-endian. */ + /* VAX format D, 64-bit PDP-style mixed endian. */ printf("10\n"); exit(0); } if (b[0] == 0xD9 && b[7] == 0x99) { - /* VAX format G, 64-bit little-endian. */ + /* VAX format G, 64-bit PDP-style mixed endian. */ printf("11\n"); exit(0); } @@ -273,9 +273,9 @@ case "$doublekind" in 6) echo "You have IEEE 754 128-bit big endian doubles." >&4 ;; 7) echo "You have IEEE 754 64-bit mixed endian doubles (32-bit LEs in BE)." >&4 ;; 8) echo "You have IEEE 754 64-bit mixed endian doubles (32-bit BEs in LE)." >&4 ;; -9) echo "You have VAX format F 32-bit little-endian doubles." >&4 ;; -10) echo "You have VAX format D 64-bit little-endian doubles." >&4 ;; -11) echo "You have VAX format G 64-bit little-endian doubles." >&4 ;; +9) echo "You have VAX format F 32-bit PDP-style mixed endian doubles." >&4 ;; +10) echo "You have VAX format D 64-bit PDP-style mixed endian doubles." >&4 ;; +11) echo "You have VAX format G 64-bit PDP-style mixed endian doubles." >&4 ;; *) echo "Cannot figure out your double. You CRAY, or something?" >&4 ;; esac $rm_try diff --git a/U/perl/usequadmath.U b/U/perl/usequadmath.U index f0aa532..f531395 100644 --- a/U/perl/usequadmath.U +++ b/U/perl/usequadmath.U @@ -1,7 +1,7 @@ ?RCS: You may distribute under the terms of either the GNU General Public ?RCS: License or the Artistic License, as specified in the README file. ?RCS: -?MAKE:usequadmath: Setvar +?MAKE:usequadmath: Setvar cat uselongdouble ?MAKE: -pick add $@ %< ?S:usequadmath: ?S: This variable conditionally defines the USE_QUADMATH symbol, @@ -22,3 +22,17 @@ case "$usequadmath" in *) usequadmath="$undef" ;; esac +: Fail if both uselongdouble and usequadmath are requested +case "$usequadmath:$uselongdouble" in +define:define) + $cat <<EOM >&4 + +*** You requested the use of the quadmath library and use +*** of long doubles. +*** +*** Please select one or the other. +EOM + exit 1 + ;; +esac + -- perl5 metaconfig repository
