]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / powerpc / powerpc64 / power8 / fpu / s_llround.S
CommitLineData
fe13a20c 1/* llround function. POWER8 PowerPC64 version.
b168057a 2 Copyright (C) 2014-2015 Free Software Foundation, Inc.
fe13a20c
AZ
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#include <sysdep.h>
757d9dd5 20#include <endian.h>
fe13a20c
AZ
21#include <math_ldbl_opt.h>
22
7110166d 23#define MFVSRD_R3_V1 .long 0x7c230066 /* mfvsrd r3,vs1 */
fe13a20c
AZ
24
25/* long long [r3] llround (float x [fp1]) */
26
27ENTRY (__llround)
28 CALL_MCOUNT 0
29 frin fp1,fp1 /* Round to nearest +-0.5. */
30 fctidz fp1,fp1 /* Convert To Integer DW round toward 0. */
31 MFVSRD_R3_V1
32 blr
33END (__llround)
34
35strong_alias (__llround, __lround)
36weak_alias (__llround, llround)
37weak_alias (__lround, lround)
38
39#ifdef NO_LONG_DOUBLE
40weak_alias (__llround, llroundl)
41strong_alias (__llround, __llroundl)
42weak_alias (__lround, lroundl)
43strong_alias (__lround, __lroundl)
44#endif
45#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
46compat_symbol (libm, __llround, llroundl, GLIBC_2_1)
47compat_symbol (libm, __lround, lroundl, GLIBC_2_1)
48#endif