From 8a9f4eb95894eae7e725e79721ba26fbc5b4ed06 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Fri, 5 Aug 2016 22:35:01 +0200 Subject: sparc: remove fdim sparc specific implementations The fdim and fdimf functions on sparc do not fully follow the standard and do not set errno to ERANGE when the result overflows. Since glibc 2.24 this causes the two following tests to fail: Failure: fdim (max_value, -max_value): errno set to 0, expected 34 (ERANGE) Failure: fdim_upward (max_value, -max_value): errno set to 0, expected 34 (ERANGE) It happens that using GCC with the generic C code generates very similar code to the sparc specific implementations. Therefore this patches remove them. Note it might still worth adding a vis3 specific version of fdim on sparc32/sparcv9, this is done in a following patch to ease backporting. Changelog: * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile [$(subdir) = math && $(have-as-vis3) = yes] (libm-sysdep_routines): Remove s_fdimf-vis3, s_fdim-vis3. * sysdeps/sparc/sparc32/fpu/s_fdim.S: Delete file. * sysdeps/sparc/sparc32/fpu/s_fdimf.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/s_fdim.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/s_fdimf.S: Likewise. * sysdeps/sparc/sparc64/fpu/s_fdim.S: Likewise. * sysdeps/sparc/sparc64/fpu/s_fdimf.S: Likewise. --- sysdeps/sparc/sparc64/fpu/s_fdimf.S | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 sysdeps/sparc/sparc64/fpu/s_fdimf.S (limited to 'sysdeps/sparc/sparc64/fpu/s_fdimf.S') diff --git a/sysdeps/sparc/sparc64/fpu/s_fdimf.S b/sysdeps/sparc/sparc64/fpu/s_fdimf.S deleted file mode 100644 index 356c23c4e3..0000000000 --- a/sysdeps/sparc/sparc64/fpu/s_fdimf.S +++ /dev/null @@ -1,31 +0,0 @@ -/* Compute positive difference, sparc 64-bit. - Copyright (C) 2013-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David S. Miller . - - 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 - . */ - -#include - -ENTRY(__fdimf) - fcmps %f1, %f3 - fbug 1f - nop - fzeros %f1 - fnegs %f1, %f3 -1: retl - fsubs %f1, %f3, %f0 -END(__fdimf) -weak_alias (__fdimf, fdimf) -- cgit 1.4.1