summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/powerpc/powerpc32
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc/powerpc32')
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/Dist3
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S16
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S7
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/fe_nomask.c6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c4
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S4
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S10
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c8
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S4
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S9
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c5
14 files changed, 52 insertions, 42 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/Dist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/Dist
deleted file mode 100644
index 297e031620..0000000000
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/Dist
+++ /dev/null
@@ -1,3 +0,0 @@
-clone.S
-kernel_stat.h
-fe_nomask.c
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S
index 21ad98e501..e945834945 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S
@@ -1,5 +1,5 @@
/* brk system call for Linux/ppc.
- Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995-97, 1999, 2000, 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., 51 Franklin Street, Fifth Floor, Boston MA
+ 02110-1301 USA. */
#include <sysdep.h>
#define _ERRNO_H 1
@@ -27,32 +27,34 @@
.section ".text"
ENTRY (BP_SYM (__brk))
DISCARD_BOUNDS (r3) /* the bounds are meaningless, so toss 'em */
-
+ mflr r0
stwu r1,-16(r1)
+ cfi_adjust_cfa_offset (16)
stw r3,8(r1)
+ stw r0,20(r1)
+ cfi_offset (lr, 4)
DO_CALL(SYS_ify(brk))
lwz r6,8(r1)
#ifdef PIC
- mflr r4
# ifdef HAVE_ASM_PPC_REL16
bcl 20,31,1f
1: mflr r5
addis r5,r5,__curbrk-1b@ha
- mtlr r4
stw r3,__curbrk-1b@l(r5)
# else
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r5
lwz r5,__curbrk@got(r5)
- mtlr r4
stw r3,0(r5)
# endif
#else
lis r4,__curbrk@ha
stw r3,__curbrk@l(r4)
#endif
+ lwz r0,20(r1)
cmplw r6,r3
addi r1,r1,16
+ mtlr r0
li r3,0
blelr+
li r3,ENOMEM
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S
index 43d44ea418..f4c92ad7c7 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S
@@ -1,5 +1,5 @@
/* Wrapper around clone system call.
- Copyright (C) 1997,98,99,2000,02,2004 Free Software Foundation, Inc.
+ Copyright (C) 1997,98,99,2000,02,04,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., 51 Franklin Street, Fifth Floor, Boston MA
+ 02110-1301 USA. */
#include <sysdep.h>
#define _ERRNO_H 1
@@ -49,6 +49,7 @@ ENTRY (BP_SYM (__clone))
/* Set up stack frame for parent. */
stwu r1,-32(r1)
+ cfi_adjust_cfa_offset (32)
#ifdef RESET_PID
stmw r28,16(r1)
#else
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fe_nomask.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fe_nomask.c
index 2c85a3a9e9..8d3b9ad1f4 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fe_nomask.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fe_nomask.c
@@ -1,5 +1,5 @@
/* Procedure definition for FE_NOMASK_ENV for Linux/ppc.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 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
@@ -23,11 +23,11 @@
#include <unistd.h>
#include <sysdep.h>
#include <sys/prctl.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
#if __ASSUME_NEW_PRCTL_SYSCALL == 0
/* This is rather fiddly under Linux. We don't have direct access,
- and there is no system call, but we can change the bits
+ and there is no system call, but we can change the bits
in a signal handler's context... */
static struct sigaction oact;
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c
index cf61b01a54..e83f7f04b7 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2002, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2002,2005,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
@@ -23,7 +23,7 @@
#include <sysdep.h>
#include <sys/syscall.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
#ifdef __NR_ftruncate64
#ifndef __ASSUME_TRUNCATE64_SYSCALL
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S
index 0e04e4bb59..c28c34664c 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S
@@ -1,5 +1,5 @@
/* Save current context, powerpc32 common.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 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
@@ -40,6 +40,7 @@
#endif
ENTRY(__CONTEXT_FUNC_NAME)
stwu r1,-16(r1)
+ cfi_adjust_cfa_offset (16)
/* Insure that the _UC_REGS start on a quadword boundary. */
stw r3,_FRAME_PARM_SAVE1(r1)
addi r3,r3,_UC_REG_SPACE+12
@@ -55,6 +56,7 @@ ENTRY(__CONTEXT_FUNC_NAME)
stw r0,_UC_GREGS+(PT_LNK*4)(r3)
stw r0,_UC_GREGS+(PT_NIP*4)(r3)
stw r0,_FRAME_LR_SAVE+16(r1)
+ cfi_offset (lr, _FRAME_LR_SAVE)
stw r5,_UC_GREGS+(PT_R5*4)(r3)
stw r6,_UC_GREGS+(PT_R6*4)(r3)
stw r7,_UC_GREGS+(PT_R7*4)(r3)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S
index b220f631ec..208a375ef3 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S
@@ -1,5 +1,5 @@
/* Set up a context to call a function.
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 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., 51 Franklin Street, Fifth Floor, Boston MA
+ 02110-1301 USA. */
#include <sysdep.h>
#include <shlib-compat.h>
@@ -49,10 +49,12 @@ ENTRY(__makecontext)
/* Set the function's LR to point to the exitcode below. */
#ifdef PIC
mflr r0
+ cfi_register(lr,r0)
bl 1f
1: mflr r6
addi r6,r6,L(exitcode)-1b
mtlr r0
+ cfi_same_value (lr)
#else
lis r6,L(exitcode)@ha
addi r6,r6,L(exitcode)@l
@@ -136,10 +138,12 @@ ENTRY(__novec_makecontext)
/* Set the function's LR to point to the exitcode below. */
#ifdef PIC
mflr r0
+ cfi_register(lr,r0)
bl 1f
1: mflr r6
addi r6,r6,L(novec_exitcode)-1b
mtlr r0
+ cfi_same_value (lr)
#else
lis r6,L(novec_exitcode)@ha
addi r6,r6,L(novec_exitcode)@l
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c
index 495c98ab97..4d9fa263c4 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c
@@ -1,5 +1,5 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003
- Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,1999,2000,2002,2003,2006
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -26,7 +26,7 @@
#include <sys/syscall.h>
#include <bp-checks.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0
@@ -58,7 +58,7 @@ __libc_pread (fd, buf, count, offset)
return result;
}
-
+
int oldtype = LIBC_CANCEL_ASYNC ();
/* On PPC32 64bit values are aligned in odd/even register pairs. */
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c
index d4fe1eea2d..9527554e9b 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c
@@ -1,5 +1,5 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003
- Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,1999,2000,2002,2003,2006
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -25,7 +25,7 @@
#include <sys/syscall.h>
#include <bp-checks.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c
index 3727fa7a42..32383f4301 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c
@@ -1,5 +1,5 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003
- Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,1999,2000,2002,2003,2006
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -26,7 +26,7 @@
#include <sys/syscall.h>
#include <bp-checks.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c
index 080c88cf29..acc250a88f 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c
@@ -1,5 +1,5 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003
- Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,1999,2000,2002,2003,2006
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -25,7 +25,7 @@
#include <sys/syscall.h>
#include <bp-checks.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S
index c71fcd73d5..1a5251d100 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S
@@ -1,5 +1,5 @@
/* Jump to a new context powerpc32 common.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 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
@@ -41,7 +41,9 @@
ENTRY(__CONTEXT_FUNC_NAME)
mflr r0
stwu r1,-16(r1)
+ cfi_adjust_cfa_offset (16)
stw r0,20(r1)
+ cfi_offset (lr, _FRAME_LR_SAVE)
stw r31,12(r1)
lwz r31,_UC_REGS_PTR(r3)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S
index 8b2998b8fd..0c7b945ed2 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S
@@ -1,5 +1,5 @@
/* Save current context and jump to a new context.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 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
@@ -40,6 +40,7 @@
#endif
ENTRY(__CONTEXT_FUNC_NAME)
stwu r1,-16(r1)
+ cfi_adjust_cfa_offset (16)
/* Insure that the _UC_REGS start on a quadword boundary. */
stw r3,_FRAME_PARM_SAVE1(r1)
addi r3,r3,_UC_REG_SPACE+12
@@ -56,6 +57,7 @@ ENTRY(__CONTEXT_FUNC_NAME)
stw r0,_UC_GREGS+(PT_LNK*4)(r3)
stw r0,_UC_GREGS+(PT_NIP*4)(r3)
stw r0,_FRAME_LR_SAVE+16(r1)
+ cfi_offset (lr, _FRAME_LR_SAVE)
stw r5,_UC_GREGS+(PT_R5*4)(r3)
stw r6,_UC_GREGS+(PT_R6*4)(r3)
stw r7,_UC_GREGS+(PT_R7*4)(r3)
@@ -309,13 +311,12 @@ ENTRY(__CONTEXT_FUNC_NAME)
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r7
# endif
+ mtlr r8
# ifdef SHARED
lwz r7,_rtld_global_ro@got(r7)
- mtlr r8
lwz r7,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r7)
# else
lwz r7,_dl_hwcap@got(r7)
- mtlr r8
lwz r7,0(r7)
# endif
# else
@@ -467,7 +468,6 @@ ENTRY(__CONTEXT_FUNC_NAME)
mtcr r5
/* Restore the general registers */
- lwz r1,_UC_GREGS+(PT_R1*4)(r31)
lwz r3,_UC_GREGS+(PT_R3*4)(r31)
lwz r4,_UC_GREGS+(PT_R4*4)(r31)
lwz r5,_UC_GREGS+(PT_R5*4)(r31)
@@ -496,6 +496,7 @@ ENTRY(__CONTEXT_FUNC_NAME)
lwz r28,_UC_GREGS+(PT_R28*4)(r31)
lwz r29,_UC_GREGS+(PT_R29*4)(r31)
lwz r30,_UC_GREGS+(PT_R30*4)(r31)
+ lwz r1,_UC_GREGS+(PT_R1*4)(r31)
lwz r31,_UC_GREGS+(PT_R31*4)(r31)
bctr
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c
index af6fa548dd..f107e84373 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997,1998,1999,2000,2002,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,1999,2000,2002,2005,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
@@ -24,7 +25,7 @@
#include <sys/syscall.h>
#include <bp-checks.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
#ifdef __NR_truncate64
#ifndef __ASSUME_TRUNCATE64_SYSCALL