about summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc32/fpu/s_rint.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/powerpc32/fpu/s_rint.S')
-rw-r--r--sysdeps/powerpc/powerpc32/fpu/s_rint.S8
1 files changed, 8 insertions, 0 deletions
diff --git a/sysdeps/powerpc/powerpc32/fpu/s_rint.S b/sysdeps/powerpc/powerpc32/fpu/s_rint.S
index 4abdcedfe8..1cfcd78b5c 100644
--- a/sysdeps/powerpc/powerpc32/fpu/s_rint.S
+++ b/sysdeps/powerpc/powerpc32/fpu/s_rint.S
@@ -31,11 +31,19 @@
 ENTRY (__rint)
 #ifdef SHARED
 	mflr	r11
+# ifdef HAVE_ASM_PPC_REL16
+	bcl	20,31,1f
+1:	mflr	r9
+	addis	r9,r9,.LC0-1b@ha
+	mtlr	r11
+	lfs	fp13,.LC0-1b@l(r9)
+# else
 	bl	_GLOBAL_OFFSET_TABLE_@local-4
 	mflr	r10
 	lwz	r9,.LC0@got(10)
 	mtlr	r11
 	lfs	fp13,0(r9)
+# endif
 #else
 	lis	r9,.LC0@ha
 	lfs	fp13,.LC0@l(r9)