+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.
/* 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.
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
/* 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
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. */
/* 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.
/* 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
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)
/* 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
# 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
/* 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
#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
/* 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
#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
/* 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
#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
/* 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
#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
/* 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
#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
/* 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
#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
/* 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
#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
/* 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
#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)
/* 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
#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)
/* 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
#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
/* 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
#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
/* 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
# 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
/* 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
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
/* 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
#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)
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
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
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
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
/* 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.
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)
/* 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.
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)
/* 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.
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)
/* 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
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
-/* 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
#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 \
/* 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
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)
/* 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
# 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
/* 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
#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
/* 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
# 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
# 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