(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
[glibc.git] / sysdeps / unix / sysv / linux / powerpc / powerpc64 / brk.S
blob3f74f552718bfaf51ed49c452d2c6562a0088785
1 /* brk system call for Linux.  PowerPC64 version.
2    Copyright (C) 1995,96,97,99, 2000, 2002 Free Software Foundation, Inc.
3    This file is part of the GNU C Library.
5    The GNU C Library is free software; you can redistribute it and/or
6    modify it under the terms of the GNU Lesser General Public
7    License as published by the Free Software Foundation; either
8    version 2.1 of the License, or (at your option) any later version.
10    The GNU C Library is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13    Lesser General Public License for more details.
15    You should have received a copy of the GNU Lesser General Public
16    License along with the GNU C Library; if not, write to the Free
17    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18    02111-1307 USA.  */
20 #include <sysdep.h>
21 #define _ERRNO_H        1
22 #include <bits/errno.h>
23 #include <bp-sym.h>
24 #include <bp-asm.h>
26         .comm   __curbrk,8,8
27         .section        ".toc","aw"
28 .LC__curbrk:
29         .tc __curbrk[TC],__curbrk
30         .section ".text"
31 ENTRY (BP_SYM (__brk))
32         CALL_MCOUNT 1
33         DISCARD_BOUNDS (r3)     /* the bounds are meaningless, so toss 'em.  */
35         stdu    r1,-64(r1)
36         std     r3,48(r1)
37         DO_CALL(SYS_ify(brk))
38         ld     r6,48(r1)
39         ld      r5,.LC__curbrk@toc(r2)
40         std     r3,0(r5)
41         cmpld   r6,r3
42         addi    r1,r1,64
43         li      r3,0
44         blelr+
45         li      r3,ENOMEM
46         b       JUMPTARGET(__syscall_error)
47 END (BP_SYM (__brk))
49 weak_alias (BP_SYM (__brk), BP_SYM (brk))