1 /* $NetBSD: sbrk.S,v 1.12 2013/09/12 15:36:15 joerg Exp $ */
5 #if defined(LIBC_SCCS) && !defined(lint)
6 __RCSID("$NetBSD: sbrk.S,v 1.12 2013/09/12 15:36:15 joerg Exp $")
7 #endif /* LIBC_SCCS && !lint */
9 .globl _C_LABEL(__curbrk)
13 WEAK_ALIAS(sbrk, _sbrk)
26 lwz %r5,_C_LABEL(__curbrk)@got(%r5)
29 lis %r5,_C_LABEL(__curbrk)@ha
30 lwzu %r6,_C_LABEL(__curbrk)@l(%r5) # r6 = old break, r5 = &curbrk
33 mr %r7,%r3 # r7 = new break
34 _DOSYSCALL(break) # break(new_break)
36 mr %r3,%r6 # set return value
37 stw %r7,0(%r5) # record new break