1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
* sysdeps/unix/sysv/linux/powerpc/socket.S: Adjust asm syntax.
	* sysdeps/unix/sysv/linux/powerpc/clone.S: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/syscall.S: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/brk.S: Likewise.
This commit is contained in:
Ulrich Drepper
1999-10-11 23:36:50 +00:00
parent 38a29b57af
commit acf47bbeeb
5 changed files with 59 additions and 56 deletions

View File

@ -1,5 +1,5 @@
/* brk system call for Linux/ppc.
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1999 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,25 +24,25 @@
.comm __curbrk,4,4
.section ".text"
ENTRY(__brk)
stwu %r1,-16(%r1)
stw %r3,8(%r1)
stwu r1,-16(r1)
stw r3,8(r1)
DO_CALL(SYS_ify(brk))
lwz %r6,8(%r1)
lwz r6,8(r1)
#ifdef PIC
mflr %r4
mflr r4
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr %r5
lwz %r5,__curbrk@got(%r5)
mtlr %r4
stw %r3,0(%r5)
mflr r5
lwz r5,__curbrk@got(r5)
mtlr r4
stw r3,0(r5)
#else
stw %r3,__curbrk@sdarel(%r13)
stw r3,__curbrk@sdarel(r13)
#endif
cmplw %r6,%r3
addi %r1,%r1,16
li %r3,0
cmplw r6,r3
addi r1,r1,16
li r3,0
blelr+
li %r3,ENOMEM
li r3,ENOMEM
b JUMPTARGET(__syscall_error)
END (__brk)