mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 13:00:06 +00:00
Simplify code for accessing powerpc GOT
This commit is contained in:
parent
a1267ba1c6
commit
91d2a8453f
34
ChangeLog
34
ChangeLog
@ -1,3 +1,37 @@
|
||||
2011-11-21 Will Schmidt <will_schmidt@vnet.ibm.com>
|
||||
|
||||
* powerpc/powerpc32/sysdep.h: Define SETUP_GOT_ACCESS() macro.
|
||||
* powerpc/powerpc32/a2/memcpy.S: Use SETUP_GOT_ACCESS() macro.
|
||||
* powerpc/powerpc32/dl-start.S: Likewise.
|
||||
* powerpc/powerpc32/elf/start.S: Likewise.
|
||||
* powerpc/powerpc32/fpu/__longjmp-common.S: Likewise.
|
||||
* powerpc/powerpc32/fpu/s_ceil.S: Likewise.
|
||||
* powerpc/powerpc32/fpu/s_ceilf.S: Likewise.
|
||||
* powerpc/powerpc32/fpu/s_floor.S: Likewise.
|
||||
* powerpc/powerpc32/fpu/s_floorf.S: Likewise.
|
||||
* powerpc/powerpc32/fpu/s_lround.S: Likewise.
|
||||
* powerpc/powerpc32/fpu/s_rint.S: Likewise.
|
||||
* powerpc/powerpc32/fpu/s_rintf.S: Likewise.
|
||||
* powerpc/powerpc32/fpu/s_round.S: Likewise.
|
||||
* powerpc/powerpc32/fpu/s_roundf.S: Likewise.
|
||||
* powerpc/powerpc32/fpu/s_trunc.S: Likewise.
|
||||
* powerpc/powerpc32/fpu/s_truncf.S: Likewise.
|
||||
* powerpc/powerpc32/fpu/setjmp-common.S: Likewise.
|
||||
* powerpc/powerpc32/memset.S: Likewise.
|
||||
* powerpc/powerpc32/power4/fpu/s_llround.S: Likewise.
|
||||
* powerpc/powerpc32/power4/fpu/w_sqrt.S: Likewise.
|
||||
* powerpc/powerpc32/power4/fpu/w_sqrtf.S: Likewise.
|
||||
* powerpc/powerpc32/power5/fpu/w_sqrt.S: Likewise.
|
||||
* powerpc/powerpc32/power5/fpu/w_sqrtf.S: Likewise.
|
||||
* powerpc/powerpc32/power7/fpu/s_finite.S: Likewise.
|
||||
* powerpc/powerpc32/power7/fpu/s_isinf.S: Likewise.
|
||||
* powerpc/powerpc32/power7/fpu/s_isnan.S: Likewise.
|
||||
* unix/sysv/linux/powerpc/powerpc32/____longjmp_chk.S: Likewise.
|
||||
* unix/sysv/linux/powerpc/powerpc32/brk.S: Likewise.
|
||||
* unix/sysv/linux/powerpc/powerpc32/getcontext-common.S: Likewise.
|
||||
* unix/sysv/linux/powerpc/powerpc32/setcontext-common.S: Likewise.
|
||||
* unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S: Likewise.
|
||||
|
||||
2011-11-18 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||
|
||||
* math/libm-test.inc: Added more nearbyint tests.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Optimized memcpy implementation for PowerPC A2.
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2010, 2011 Free Software Foundation, Inc.
|
||||
Contributed by Michael Brutman <brutman@us.ibm.com>.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -113,11 +113,9 @@ L(dst_aligned):
|
||||
mflr r0
|
||||
/* Establishes GOT addressability so we can load __cache_line_size
|
||||
from static. This value was set from the aux vector during startup. */
|
||||
bcl 20,31,1f
|
||||
1:
|
||||
mflr r9
|
||||
addis r9,r9,__cache_line_size-1b@ha
|
||||
lwz r9,__cache_line_size-1b@l(r9)
|
||||
SETUP_GOT_ACCESS(r9,got_label)
|
||||
addis r9,r9,__cache_line_size-got_label@ha
|
||||
lwz r9,__cache_line_size-got_label@l(r9)
|
||||
mtlr r0
|
||||
#else
|
||||
/* Load __cache_line_size from static. This value was set from the
|
||||
|
@ -1,5 +1,6 @@
|
||||
/* Machine-dependent ELF startup code. PowerPC version.
|
||||
Copyright (C) 1995-2000, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2000, 2002, 2004, 2005, 2006, 2011
|
||||
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
|
||||
@ -47,10 +48,9 @@ _dl_start_user:
|
||||
passed by value!). */
|
||||
|
||||
/* Put our GOT pointer in r31, */
|
||||
bcl 20,31,1f
|
||||
1: mflr r31
|
||||
addis r31,r31,_GLOBAL_OFFSET_TABLE_-1b@ha
|
||||
addi r31,r31,_GLOBAL_OFFSET_TABLE_-1b@l
|
||||
SETUP_GOT_ACCESS(r31,got_label)
|
||||
addis r31,r31,_GLOBAL_OFFSET_TABLE_-got_label@ha
|
||||
addi r31,r31,_GLOBAL_OFFSET_TABLE_-got_label@l
|
||||
/* the address of _start in r30, */
|
||||
mr r30,r3
|
||||
/* &_dl_argc in 29, &_dl_argv in 27, and _dl_loaded in 28. */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Startup code for programs linked with GNU libc.
|
||||
Copyright (C) 1998,1999,2000,2001,2002,2003,2009
|
||||
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2009, 2011
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -59,10 +59,8 @@ ENTRY(_start)
|
||||
/* Set up an initial stack frame, and clear the LR. */
|
||||
clrrwi r1,r1,4
|
||||
#ifdef PIC
|
||||
bcl 20,31,L(branch)
|
||||
L(branch):
|
||||
SETUP_GOT_ACCESS(r13,got_label)
|
||||
li r0,0
|
||||
mflr r13
|
||||
#else
|
||||
li r0,0
|
||||
#endif
|
||||
@ -73,10 +71,10 @@ L(branch):
|
||||
start_addresses in r8. Also load the GOT pointer so that new PLT
|
||||
calls work, like the one to __libc_start_main. */
|
||||
#ifdef PIC
|
||||
addis r30,r13,_GLOBAL_OFFSET_TABLE_-L(branch)@ha
|
||||
addis r8,r13,L(start_addresses)-L(branch)@ha
|
||||
addi r30,r30,_GLOBAL_OFFSET_TABLE_-L(branch)@l
|
||||
lwzu r13,L(start_addresses)-L(branch)@l(r8)
|
||||
addis r30,r13,_GLOBAL_OFFSET_TABLE_-got_label@ha
|
||||
addis r8,r13,L(start_addresses)-got_label@ha
|
||||
addi r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@l
|
||||
lwzu r13, L(start_addresses)-got_label@l(r8)
|
||||
#else
|
||||
lis r8,L(start_addresses)@ha
|
||||
lwzu r13,L(start_addresses)@l(r8)
|
||||
|
@ -1,5 +1,6 @@
|
||||
/* longjmp for PowerPC.
|
||||
Copyright (C) 1995-99, 2000, 2003-2006, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-99, 2000, 2003-2006, 2009, 2011
|
||||
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
|
||||
@ -34,10 +35,9 @@ ENTRY (BP_SYM (__longjmp))
|
||||
# ifdef PIC
|
||||
mflr r6
|
||||
cfi_register (lr,r6)
|
||||
bcl 20,31,1f
|
||||
1: mflr r5
|
||||
addis r5,r5,_GLOBAL_OFFSET_TABLE_-1b@ha
|
||||
addi r5,r5,_GLOBAL_OFFSET_TABLE_-1b@l
|
||||
SETUP_GOT_ACCESS(r5,got_label)
|
||||
addis r5,r5,_GLOBAL_OFFSET_TABLE_-got_label@ha
|
||||
addi r5,r5,_GLOBAL_OFFSET_TABLE_-got_label@l
|
||||
# ifdef SHARED
|
||||
lwz r5,_rtld_global_ro@got(r5)
|
||||
mtlr r6
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* ceil function. PowerPC32 version.
|
||||
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2004, 2006, 2011 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
|
||||
@ -31,10 +31,9 @@ ENTRY (__ceil)
|
||||
#ifdef SHARED
|
||||
mflr r11
|
||||
cfi_register(lr,r11)
|
||||
bcl 20,31,1f
|
||||
1: mflr r9
|
||||
addis r9,r9,.LC0-1b@ha
|
||||
lfs fp13,.LC0-1b@l(r9)
|
||||
SETUP_GOT_ACCESS(r9,got_label)
|
||||
addis r9,r9,.LC0-got_label@ha
|
||||
lfs fp13,.LC0-got_label@l(r9)
|
||||
mtlr r11
|
||||
cfi_same_value (lr)
|
||||
#else
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* float ceil function. PowerPC32 version.
|
||||
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2004, 2006, 2011 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
|
||||
@ -30,10 +30,9 @@ ENTRY (__ceilf)
|
||||
#ifdef SHARED
|
||||
mflr r11
|
||||
cfi_register(lr,r11)
|
||||
bcl 20,31,1f
|
||||
1: mflr r9
|
||||
addis r9,r9,.LC0-1b@ha
|
||||
lfs fp13,.LC0-1b@l(r9)
|
||||
SETUP_GOT_ACCESS(r9,got_label)
|
||||
addis r9,r9,.LC0-got_label@ha
|
||||
lfs fp13,.LC0-got_label@l(r9)
|
||||
mtlr r11
|
||||
cfi_same_value (lr)
|
||||
#else
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Floor function. PowerPC32 version.
|
||||
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2004, 2006, 2011 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
|
||||
@ -31,10 +31,9 @@ ENTRY (__floor)
|
||||
#ifdef SHARED
|
||||
mflr r11
|
||||
cfi_register(lr,r11)
|
||||
bcl 20,31,1f
|
||||
1: mflr r9
|
||||
addis r9,r9,.LC0-1b@ha
|
||||
lfs fp13,.LC0-1b@l(r9)
|
||||
SETUP_GOT_ACCESS(r9,got_label)
|
||||
addis r9,r9,.LC0-got_label@ha
|
||||
lfs fp13,.LC0-got_label@l(r9)
|
||||
mtlr r11
|
||||
cfi_same_value (lr)
|
||||
#else
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* float Floor function. PowerPC32 version.
|
||||
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2004, 2006, 2011 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
|
||||
@ -30,10 +30,9 @@ ENTRY (__floorf)
|
||||
#ifdef SHARED
|
||||
mflr r11
|
||||
cfi_register(lr,r11)
|
||||
bcl 20,31,1f
|
||||
1: mflr r9
|
||||
addis r9,r9,.LC0-1b@ha
|
||||
lfs fp13,.LC0-1b@l(r9)
|
||||
SETUP_GOT_ACCESS(r9,got_label)
|
||||
addis r9,r9,.LC0-got_label@ha
|
||||
lfs fp13,.LC0-got_label@l(r9)
|
||||
mtlr r11
|
||||
cfi_same_value (lr)
|
||||
#else
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* lround function. PowerPC32 version.
|
||||
Copyright (C) 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2004, 2006, 2007, 2008, 2011 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
|
||||
@ -45,10 +45,9 @@ ENTRY (__lround)
|
||||
#ifdef SHARED
|
||||
mflr r11
|
||||
cfi_register(lr,r11)
|
||||
bcl 20,31,1f
|
||||
1: mflr r9
|
||||
addis r9,r9,.LC0-1b@ha
|
||||
lfs fp10,.LC0-1b@l(r9)
|
||||
SETUP_GOT_ACCESS(r9,got_label)
|
||||
addis r9,r9,.LC0-got_label@ha
|
||||
lfs fp10,.LC0-got_label@l(r9)
|
||||
mtlr r11
|
||||
cfi_same_value (lr)
|
||||
#else
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Round to int floating-point values. PowerPC32 version.
|
||||
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2004, 2006, 2011 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
|
||||
@ -33,10 +33,9 @@ ENTRY (__rint)
|
||||
#ifdef SHARED
|
||||
mflr r11
|
||||
cfi_register(lr,r11)
|
||||
bcl 20,31,1f
|
||||
1: mflr r9
|
||||
addis r9,r9,.LC0-1b@ha
|
||||
lfs fp13,.LC0-1b@l(r9)
|
||||
SETUP_GOT_ACCESS(r9,got_label)
|
||||
addis r9,r9,.LC0-got_label@ha
|
||||
lfs fp13,.LC0-got_label@l(r9)
|
||||
mtlr r11
|
||||
cfi_same_value (lr)
|
||||
#else
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Round float to int floating-point values. PowerPC32 version.
|
||||
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2004, 2006, 2011 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
|
||||
@ -29,10 +29,9 @@ ENTRY (__rintf)
|
||||
#ifdef SHARED
|
||||
mflr r11
|
||||
cfi_register(lr,r11)
|
||||
bcl 20,31,1f
|
||||
1: mflr r9
|
||||
addis r9,r9,.LC0-1b@ha
|
||||
lfs fp13,.LC0-1b@l(r9)
|
||||
SETUP_GOT_ACCESS(r9,got_label)
|
||||
addis r9,r9,.LC0-got_label@ha
|
||||
lfs fp13,.LC0-got_label@l(r9)
|
||||
mtlr r11
|
||||
cfi_same_value (lr)
|
||||
#else
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* round function. PowerPC32 version.
|
||||
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2004, 2006, 2011 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
|
||||
@ -43,10 +43,9 @@ ENTRY (__round)
|
||||
#ifdef SHARED
|
||||
mflr r11
|
||||
cfi_register(lr,r11)
|
||||
bcl 20,31,1f
|
||||
1: mflr r9
|
||||
addis r9,r9,.LC0-1b@ha
|
||||
addi r9,r9,.LC0-1b@l
|
||||
SETUP_GOT_ACCESS(r9,got_label)
|
||||
addis r9,r9,.LC0-got_label@ha
|
||||
addi r9,r9,.LC0-got_label@l
|
||||
mtlr r11
|
||||
cfi_same_value (lr)
|
||||
lfs fp13,0(r9)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* roundf function. PowerPC32 version.
|
||||
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2004, 2006, 2011 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
|
||||
@ -42,10 +42,9 @@ ENTRY (__roundf )
|
||||
#ifdef SHARED
|
||||
mflr r11
|
||||
cfi_register(lr,r11)
|
||||
bcl 20,31,1f
|
||||
1: mflr r9
|
||||
addis r9,r9,.LC0-1b@ha
|
||||
addi r9,r9,.LC0-1b@l
|
||||
SETUP_GOT_ACCESS(r9,got_label)
|
||||
addis r9,r9,.LC0-got_label@ha
|
||||
addi r9,r9,.LC0-got_label@l
|
||||
mtlr r11
|
||||
cfi_same_value (lr)
|
||||
lfs fp13,0(r9)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* trunc function. PowerPC32 version.
|
||||
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2004, 2006, 2011 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
|
||||
@ -38,10 +38,9 @@ ENTRY (__trunc)
|
||||
#ifdef SHARED
|
||||
mflr r11
|
||||
cfi_register(lr,r11)
|
||||
bcl 20,31,1f
|
||||
1: mflr r9
|
||||
addis r9,r9,.LC0-1b@ha
|
||||
lfs fp13,.LC0-1b@l(r9)
|
||||
SETUP_GOT_ACCESS(r9,got_label)
|
||||
addis r9,r9,.LC0-got_label@ha
|
||||
lfs fp13,.LC0-got_label@l(r9)
|
||||
mtlr r11
|
||||
cfi_same_value (lr)
|
||||
#else
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* truncf function. PowerPC32 version.
|
||||
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2004, 2006, 2011 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
|
||||
@ -37,10 +37,9 @@ ENTRY (__truncf)
|
||||
#ifdef SHARED
|
||||
mflr r11
|
||||
cfi_register(lr,r11)
|
||||
bcl 20,31,1f
|
||||
1: mflr r9
|
||||
addis r9,r9,.LC0-1b@ha
|
||||
lfs fp13,.LC0-1b@l(r9)
|
||||
SETUP_GOT_ACCESS(r9,got_label)
|
||||
addis r9,r9,.LC0-got_label@ha
|
||||
lfs fp13,.LC0-got_label@l(r9)
|
||||
mtlr r11
|
||||
cfi_same_value (lr)
|
||||
#else
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* setjmp for PowerPC.
|
||||
Copyright (C) 1995-2000, 2003-2005, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2000, 2003-2005, 2006, 2011 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
|
||||
@ -85,10 +85,9 @@ ENTRY (BP_SYM (__sigsetjmp))
|
||||
# ifdef PIC
|
||||
mflr r6
|
||||
cfi_register(lr,r6)
|
||||
bcl 20,31,1f
|
||||
1: mflr r5
|
||||
addis r5,r5,_GLOBAL_OFFSET_TABLE_-1b@ha
|
||||
addi r5,r5,_GLOBAL_OFFSET_TABLE_-1b@l
|
||||
SETUP_GOT_ACCESS(r5,got_label)
|
||||
addis r5,r5,_GLOBAL_OFFSET_TABLE_-got_label@ha
|
||||
addi r5,r5,_GLOBAL_OFFSET_TABLE_-got_label@l
|
||||
mtlr r6
|
||||
cfi_same_value (lr)
|
||||
# ifdef SHARED
|
||||
|
@ -1,5 +1,6 @@
|
||||
/* Optimized memset implementation for PowerPC.
|
||||
Copyright (C) 1997, 1999, 2000, 2003, 2007 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 1999, 2000, 2003, 2007, 2011
|
||||
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
|
||||
@ -256,10 +257,9 @@ 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. */
|
||||
bcl 20,31,1f
|
||||
1: mflr rGOT
|
||||
addis rGOT,rGOT,__cache_line_size-1b@ha
|
||||
lwz rCLS,__cache_line_size-1b@l(rGOT)
|
||||
SETUP_GOT_ACCESS(rGOT,got_label)
|
||||
addis rGOT,rGOT,__cache_line_size-got_label@ha
|
||||
lwz rCLS,__cache_line_size-got_label@l(rGOT)
|
||||
mtlr rTMP
|
||||
#else
|
||||
/* Load __cache_line_size from static. This value was set from the
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* llround function. PowerPC32 on PowerPC64 version.
|
||||
Copyright (C) 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2004, 2006, 2007, 2008, 2011 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
|
||||
@ -53,10 +53,9 @@ ENTRY (__llround)
|
||||
#ifdef SHARED
|
||||
mflr r11
|
||||
cfi_register(lr,r11)
|
||||
bcl 20,31,1f
|
||||
1: mflr r9
|
||||
addis r9,r9,.LC0-1b@ha
|
||||
addi r9,r9,.LC0-1b@l
|
||||
SETUP_GOT_ACCESS(r9,got_label)
|
||||
addis r9,r9,.LC0-got_label@ha
|
||||
addi r9,r9,.LC0-got_label@l
|
||||
mtlr r11
|
||||
cfi_same_value (lr)
|
||||
lfd fp9,0(r9)
|
||||
|
@ -63,11 +63,9 @@ EALIGN (__sqrt, 5, 0)
|
||||
cfi_offset(lr,20-16)
|
||||
cfi_offset(r30,8-16)
|
||||
#ifdef SHARED
|
||||
bcl 20,31,.LCF1
|
||||
.LCF1:
|
||||
mflr r30
|
||||
addis r30,r30,_GLOBAL_OFFSET_TABLE_-.LCF1@ha
|
||||
addi r30,r30,_GLOBAL_OFFSET_TABLE_-.LCF1@l
|
||||
SETUP_GOT_ACCESS(r30,got_label)
|
||||
addis r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@ha
|
||||
addi r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@l
|
||||
lwz r9,_LIB_VERSION@got(30)
|
||||
lwz r0,0(r9)
|
||||
#else
|
||||
|
@ -63,11 +63,9 @@ EALIGN (__sqrtf, 5, 0)
|
||||
cfi_offset(lr,20-16)
|
||||
cfi_offset(r30,8-16)
|
||||
#ifdef SHARED
|
||||
bcl 20,31,.LCF1
|
||||
.LCF1:
|
||||
mflr r30
|
||||
addis r30,r30,_GLOBAL_OFFSET_TABLE_-.LCF1@ha
|
||||
addi r30,r30,_GLOBAL_OFFSET_TABLE_-.LCF1@l
|
||||
SETUP_GOT_ACCESS(r30,got_label)
|
||||
addis r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@ha
|
||||
addi r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@l
|
||||
lwz r9,_LIB_VERSION@got(30)
|
||||
lwz r0,0(r9)
|
||||
#else
|
||||
|
@ -63,11 +63,9 @@ EALIGN (__sqrt, 5, 0)
|
||||
cfi_offset(lr,20-16)
|
||||
cfi_offset(r30,8-16)
|
||||
#ifdef SHARED
|
||||
bcl 20,31,.LCF1
|
||||
.LCF1:
|
||||
mflr r30
|
||||
addis r30,r30,_GLOBAL_OFFSET_TABLE_-.LCF1@ha
|
||||
addi r30,r30,_GLOBAL_OFFSET_TABLE_-.LCF1@l
|
||||
SETUP_GOT_ACCESS(r30,got_label)
|
||||
addis r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@ha
|
||||
addi r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@l
|
||||
lwz r9,_LIB_VERSION@got(30)
|
||||
lwz r0,0(r9)
|
||||
#else
|
||||
|
@ -63,11 +63,9 @@ EALIGN (__sqrtf, 5, 0)
|
||||
cfi_offset(lr,20-16)
|
||||
cfi_offset(r30,8-16)
|
||||
#ifdef SHARED
|
||||
bcl 20,31,.LCF1
|
||||
.LCF1:
|
||||
mflr r30
|
||||
addis r30,r30,_GLOBAL_OFFSET_TABLE_-.LCF1@ha
|
||||
addi r30,r30,_GLOBAL_OFFSET_TABLE_-.LCF1@l
|
||||
SETUP_GOT_ACCESS(r30,got_label)
|
||||
addis r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@ha
|
||||
addi r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@l
|
||||
lwz r9,_LIB_VERSION@got(30)
|
||||
lwz r0,0(r9)
|
||||
#else
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* finite(). PowerPC32/POWER7 version.
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2010, 2011 Free Software Foundation, Inc.
|
||||
Contributed by Luis Machado <luisgpm@br.ibm.com>.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -35,10 +35,9 @@ ENTRY (__finite)
|
||||
mflr r11
|
||||
cfi_register(lr,r11)
|
||||
|
||||
bcl 20,31,1f
|
||||
1: mflr r9
|
||||
addis r9,r9,.LC0-1b@ha
|
||||
lfd fp0,.LC0-1b@l(r9)
|
||||
SETUP_GOT_ACCESS(r9,got_label)
|
||||
addis r9,r9,.LC0-got_label@ha
|
||||
lfd fp0,.LC0-got_label@l(r9)
|
||||
|
||||
mtlr r11
|
||||
cfi_same_value (lr)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* isinf(). PowerPC32/POWER7 version.
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2010, 2011 Free Software Foundation, Inc.
|
||||
Contributed by Luis Machado <luisgpm@br.ibm.com>.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -35,10 +35,9 @@ ENTRY (__isinf)
|
||||
mflr r11
|
||||
cfi_register(lr,r11)
|
||||
|
||||
bcl 20,31,1f
|
||||
1: mflr r9
|
||||
addis r9,r9,.LC0-1b@ha
|
||||
lfd fp0,.LC0-1b@l(r9)
|
||||
SETUP_GOT_ACCESS(r9,got_label)
|
||||
addis r9,r9,.LC0-got_label@ha
|
||||
lfd fp0,.LC0-got_label@l(r9)
|
||||
|
||||
mtlr r11
|
||||
cfi_same_value (lr)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* isnan(). PowerPC32/POWER7 version.
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2010, 2011 Free Software Foundation, Inc.
|
||||
Contributed by Luis Machado <luisgpm@br.ibm.com>.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -35,10 +35,9 @@ ENTRY (__isnan)
|
||||
mflr r11
|
||||
cfi_register(lr,r11)
|
||||
|
||||
bcl 20,31,1f
|
||||
1: mflr r9
|
||||
addis r9,r9,.LC0-1b@ha
|
||||
lfd fp0,.LC0-1b@l(r9)
|
||||
SETUP_GOT_ACCESS(r9,got_label)
|
||||
addis r9,r9,.LC0-got_label@ha
|
||||
lfd fp0,.LC0-got_label@l(r9)
|
||||
|
||||
mtlr r11
|
||||
cfi_same_value (lr)
|
||||
|
@ -1,5 +1,6 @@
|
||||
/* Assembly macros for 32-bit PowerPC.
|
||||
Copyright (C) 1999, 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999, 2001, 2002, 2003, 2006, 2011
|
||||
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
|
||||
@ -46,6 +47,13 @@
|
||||
cfi_startproc; \
|
||||
CALL_MCOUNT
|
||||
|
||||
/* helper macro for accessing the 32-bit powerpc GOT. */
|
||||
|
||||
#define SETUP_GOT_ACCESS(regname,GOT_LABEL) \
|
||||
bcl 20,31,GOT_LABEL ; \
|
||||
GOT_LABEL: ; \
|
||||
mflr (regname)
|
||||
|
||||
#define EALIGN_W_0 /* No words to insert. */
|
||||
#define EALIGN_W_1 nop
|
||||
#define EALIGN_W_2 nop;nop
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2009, 2011 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
|
||||
@ -29,10 +29,9 @@
|
||||
|
||||
#ifdef PIC
|
||||
# define LOAD_ARG \
|
||||
bcl 20,31,1f; \
|
||||
1: mflr r3; \
|
||||
addis r3,r3,_GLOBAL_OFFSET_TABLE_-1b@ha; \
|
||||
addi r3,r3,_GLOBAL_OFFSET_TABLE_-1b@l; \
|
||||
SETUP_GOT_ACCESS(r3,got_label2); \
|
||||
addis r3,r3,_GLOBAL_OFFSET_TABLE_-got_label2@ha; \
|
||||
addi r3,r3,_GLOBAL_OFFSET_TABLE_-got_label2@l; \
|
||||
lwz r3,.LC0@got(r3)
|
||||
#else
|
||||
# define LOAD_ARG \
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* brk system call for Linux/ppc.
|
||||
Copyright (C) 1995-97, 1999, 2000, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-97, 1999, 2000, 2006, 2011 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
|
||||
@ -36,10 +36,9 @@ ENTRY (BP_SYM (__brk))
|
||||
DO_CALL(SYS_ify(brk))
|
||||
lwz r6,8(r1)
|
||||
#ifdef PIC
|
||||
bcl 20,31,1f
|
||||
1: mflr r5
|
||||
addis r5,r5,__curbrk-1b@ha
|
||||
stw r3,__curbrk-1b@l(r5)
|
||||
SETUP_GOT_ACCESS(r5,got_label)
|
||||
addis r5,r5,__curbrk-got_label@ha
|
||||
stw r3,__curbrk-got_label@l(r5)
|
||||
#else
|
||||
lis r4,__curbrk@ha
|
||||
stw r3,__curbrk@l(r4)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Save current context, powerpc32 common.
|
||||
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005, 2006, 2011 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
|
||||
@ -145,10 +145,9 @@ ENTRY(__CONTEXT_FUNC_NAME)
|
||||
# ifdef __CONTEXT_ENABLE_VRS
|
||||
# ifdef PIC
|
||||
mflr r8
|
||||
bcl 20,31,1f
|
||||
1: mflr r7
|
||||
addis r7,r7,_GLOBAL_OFFSET_TABLE_-1b@ha
|
||||
addi r7,r7,_GLOBAL_OFFSET_TABLE_-1b@l
|
||||
SETUP_GOT_ACCESS(r7,got_label)
|
||||
addis r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@ha
|
||||
addi r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@l
|
||||
# ifdef SHARED
|
||||
lwz r7,_rtld_global_ro@got(r7)
|
||||
mtlr r8
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Jump to a new context powerpc32 common.
|
||||
Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005, 2006, 2008, 2009, 2011 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
|
||||
@ -73,10 +73,9 @@ ENTRY(__CONTEXT_FUNC_NAME)
|
||||
|
||||
#ifdef PIC
|
||||
mflr r8
|
||||
bcl 20,31,1f
|
||||
1: mflr r7
|
||||
addis r7,r7,_GLOBAL_OFFSET_TABLE_-1b@ha
|
||||
addi r7,r7,_GLOBAL_OFFSET_TABLE_-1b@l
|
||||
SETUP_GOT_ACCESS(r7,got_label)
|
||||
addis r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@ha
|
||||
addi r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@l
|
||||
# ifdef SHARED
|
||||
lwz r7,_rtld_global_ro@got(r7)
|
||||
mtlr r8
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Save current context and jump to a new context.
|
||||
Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005, 2006, 2008, 2009, 2011 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
|
||||
@ -146,10 +146,9 @@ ENTRY(__CONTEXT_FUNC_NAME)
|
||||
|
||||
# ifdef PIC
|
||||
mflr r8
|
||||
bcl 20,31,1f
|
||||
1: mflr r7
|
||||
addis r7,r7,_GLOBAL_OFFSET_TABLE_-1b@ha
|
||||
addi r7,r7,_GLOBAL_OFFSET_TABLE_-1b@l
|
||||
SETUP_GOT_ACCESS(r7,got_label)
|
||||
addis r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@ha
|
||||
addi r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@l
|
||||
# ifdef SHARED
|
||||
lwz r7,_rtld_global_ro@got(r7)
|
||||
mtlr r8
|
||||
@ -299,10 +298,9 @@ ENTRY(__CONTEXT_FUNC_NAME)
|
||||
# ifdef PIC
|
||||
mflr r8
|
||||
# ifdef HAVE_ASM_PPC_REL16
|
||||
bcl 20,31,5f
|
||||
5: mflr r7
|
||||
addis r7,r7,_GLOBAL_OFFSET_TABLE_-5b@ha
|
||||
addi r7,r7,_GLOBAL_OFFSET_TABLE_-5b@l
|
||||
SETUP_GOT_ACCESS(r7,got_label)
|
||||
addis r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@ha
|
||||
addi r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@l
|
||||
# else
|
||||
bl _GLOBAL_OFFSET_TABLE_@local-4
|
||||
mflr r7
|
||||
|
Loading…
Reference in New Issue
Block a user