summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc32/memset.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/powerpc32/memset.S')
-rw-r--r--sysdeps/powerpc/powerpc32/memset.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/sysdeps/powerpc/powerpc32/memset.S b/sysdeps/powerpc/powerpc32/memset.S
index 4c0edc8e45..f09c294674 100644
--- a/sysdeps/powerpc/powerpc32/memset.S
+++ b/sysdeps/powerpc/powerpc32/memset.S
@@ -264,10 +264,17 @@ L(checklinesize):
 	beq	L(medium)
 /* Establishes GOT addressability so we can load __cache_line_size
    from static. This value was set from the aux vector during startup.  */
+# ifdef HAVE_ASM_PPC_REL16
+	bcl	20,31,1f
+1:	mflr	rGOT
+	addis	rGOT,rGOT,__cache_line_size-1b@ha
+	lwz	rCLS,__cache_line_size-1b@l(rGOT)
+# else
 	bl	_GLOBAL_OFFSET_TABLE_@local-4
 	mflr	rGOT
 	lwz	rGOT,__cache_line_size@got(rGOT)
 	lwz	rCLS,0(rGOT)
+# endif
 	mtlr	rTMP
 #else
 /* Load __cache_line_size from static. This value was set from the