summaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/powerpc32/fpu/s_lround.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/powerpc32/fpu/s_lround.S')
-rw-r--r--sysdeps/powerpc/powerpc32/fpu/s_lround.S15
1 files changed, 10 insertions, 5 deletions
diff --git a/sysdeps/powerpc/powerpc32/fpu/s_lround.S b/sysdeps/powerpc/powerpc32/fpu/s_lround.S
index 4f543eb269..67e58848d0 100644
--- a/sysdeps/powerpc/powerpc32/fpu/s_lround.S
+++ b/sysdeps/powerpc/powerpc32/fpu/s_lround.S
@@ -1,5 +1,5 @@
/* lround function. PowerPC32 version.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006 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
@@ -14,8 +14,8 @@
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ Software Foundation, Inc., 1 Franklin Street, Fifth Floor, Boston MA
+ 02110-1301 USA. */
#include <sysdep.h>
@@ -39,8 +39,11 @@
to the integer value. */
ENTRY (__lround)
+ stwu r1,-16(r1)
+ cfi_adjust_cfa_offset (16)
#ifdef SHARED
mflr r11
+ cfi_register(lr,r11)
# ifdef HAVE_ASM_PPC_REL16
bcl 20,31,1f
1: mflr r9
@@ -52,6 +55,7 @@ ENTRY (__lround)
lwz r9,.LC0@got(10)
# endif
mtlr r11
+ cfi_same_value (lr)
lfs fp12,0(r9)
#else
lis r9,.LC0@ha
@@ -68,11 +72,12 @@ ENTRY (__lround)
fadd fp1,fp1,fp10 /* x+= 0.5; */
.L9:
fctiwz fp2,fp1 /* Convert To Integer DW lround toward 0. */
- stfd fp2,-8(r1)
+ stfd fp2,8(r1)
nop /* Ensure the following load is in a different dispatch */
nop /* group to avoid pipe stall on POWER4&5. */
nop
- lwz r3,-4(r1)
+ lwz r3,12(r1)
+ addi r1,r1,16
blr
.L4:
fsub fp1,fp1,fp10 /* x-= 0.5; */