mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-17 06:00:08 +00:00
Wed May 29 00:57:37 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/bsd/osf/alpha/brk.S, sysdeps/unix/sysv/linux/alpha/brk.S (__curbrk): Store the entire break value, not just the low 32 bits to accomodate large memories. Tue May 28 10:46:04 1996 Richard Henderson <rth@tamu.edu> * sysdeps/unix/sysv/linux/alpha/brk.S: Rather than attempt to dynamically resolve _end for initializing __curbrk, support the brk(0) query idiom.
This commit is contained in:
parent
e872219f50
commit
d663482017
@ -23,17 +23,7 @@ break value (instead of the new, requested one). */
|
|||||||
#include <sysdep.h>
|
#include <sysdep.h>
|
||||||
#include <errnos.h>
|
#include <errnos.h>
|
||||||
|
|
||||||
#ifndef HAVE_GNU_LD
|
.comm __curbrk, 8
|
||||||
#define _end end
|
|
||||||
#endif
|
|
||||||
|
|
||||||
.extern _end,8
|
|
||||||
|
|
||||||
.data
|
|
||||||
|
|
||||||
.globl __curbrk
|
|
||||||
__curbrk:
|
|
||||||
.quad _end
|
|
||||||
|
|
||||||
.text
|
.text
|
||||||
LEAF(__brk, 0)
|
LEAF(__brk, 0)
|
||||||
@ -42,11 +32,15 @@ LEAF(__brk, 0)
|
|||||||
|
|
||||||
ldi v0, __NR_brk
|
ldi v0, __NR_brk
|
||||||
call_pal PAL_callsys
|
call_pal PAL_callsys
|
||||||
|
|
||||||
|
/* Correctly handle the brk(0) query case. */
|
||||||
|
cmoveq a0, v0, a0
|
||||||
|
|
||||||
subq a0, v0, t0
|
subq a0, v0, t0
|
||||||
bne t0, error
|
bne t0, error
|
||||||
|
|
||||||
/* Update __curbrk and return cleanly. */
|
/* Update __curbrk and return cleanly. */
|
||||||
stl a0, __curbrk
|
stq a0, __curbrk
|
||||||
mov zero, v0
|
mov zero, v0
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -54,6 +48,6 @@ LEAF(__brk, 0)
|
|||||||
error: ldi v0, ENOMEM
|
error: ldi v0, ENOMEM
|
||||||
jmp zero, syscall_error
|
jmp zero, syscall_error
|
||||||
|
|
||||||
.end __brk
|
END(__brk)
|
||||||
|
|
||||||
weak_alias (__brk, brk)
|
weak_alias (__brk, brk)
|
||||||
|
Loading…
Reference in New Issue
Block a user