This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] powerpc: Add optimized version of [l]lrintf

Rajalakshmi Srinivasaraghavan <> writes:

> This patch makes use of optimized double version of llrint for single
> precision as both the versions return [long] long type.
> 2017-05-26  Rajalakshmi Srinivasaraghavan  <>
> 	* sysdeps/powerpc/powerpc64/fpu/s_llrint.S
> 	(__llrintf): Define as strong alias of __llrint.
> 	(llrintf):  Define as weak alias of __llrint.
> 	(__lrintf): Define as strong alias of __llrint.
> 	(lrintf):  Define as weak alias of __llrint.
> 	* sysdeps/powerpc/powerpc64/power6x/fpu/s_llrint.S:  Likewise.
> 	* sysdeps/powerpc/powerpc64/power8/fpu/s_llrint.S: Likewise.
> 	* sysdeps/powerpc/powerpc64/fpu/s_llrintf.S:  Remove file.

When this file is removed, the build system will use the file
sysdeps/ieee754/flt-32/s_llrintf.c causing multiple definition on
The same thing happened to sysdeps/powerpc/powerpc64/fpu/s_lrint.S.

> diff --git a/sysdeps/powerpc/powerpc64/fpu/s_llrintf.S b/sysdeps/powerpc/powerpc64/fpu/s_llrintf.S
> deleted file mode 100644
> index 4050be6..0000000
> --- a/sysdeps/powerpc/powerpc64/fpu/s_llrintf.S
> +++ /dev/null
> @@ -1,36 +0,0 @@
> -/* Round double to long int.  PowerPC64 version.
> -   Copyright (C) 2004-2017 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
> -   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 <sysdep.h>
> -
> -/* long long int[r3] __llrintf (float x[fp1])  */
> -ENTRY (__llrintf)

Alan Modra is changing this file too.
When fixing your patch, I suggest to rebase it on top of this patch in order
to solve all the conflicts:

Tulio Magno

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]