From f88242af19dc970949806790f70c6fd6336944a6 Mon Sep 17 00:00:00 2001 From: Marius Hillenbrand Date: Mon, 30 Nov 2020 15:53:59 +0100 Subject: S390: Derive float_t from FLT_EVAL_METHOD float_t supposedly represents the type that is used to evaluate float expressions internally. While the isa supports single-precision float operations, the port of glibc to s390 incorrectly deferred to the generic definitions which, back then, tied float_t to double. gcc by default evaluates float in single precision, so that scenario violates the C standard (sections 5.2.4.2.2 and 7.12 in C11/C17). With -fexcess-precision=standard, gcc evaluates float in double precision, which aligns with the standard yet at the cost of added conversion instructions. With this patch, we drop the s390-specific definition of float_t and defer to the default behavior, which aligns float_t with the compiler-defined FLT_EVAL_METHOD in a standard-compliant way. Checked on s390x-linux-gnu with 31-bit and 64-bit builds. --- sysdeps/s390/bits/flt-eval-method.h | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 sysdeps/s390/bits/flt-eval-method.h (limited to 'sysdeps') diff --git a/sysdeps/s390/bits/flt-eval-method.h b/sysdeps/s390/bits/flt-eval-method.h deleted file mode 100644 index 826bbfec2f..0000000000 --- a/sysdeps/s390/bits/flt-eval-method.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Define __GLIBC_FLT_EVAL_METHOD. S/390 version. - Copyright (C) 2016-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#ifndef _MATH_H -# error "Never use directly; include instead." -#endif - -/* This value is used because of a historical mistake. */ -#define __GLIBC_FLT_EVAL_METHOD 1 -- cgit v1.2.3