1 /* $NetBSD: brk.S,v 1.9 2000/06/26 06:25:43 kleink Exp $ */
5 .globl _C_LABEL(__curbrk)
6 .globl _C_LABEL(__minbrk)
15 .long _C_LABEL(_end) # XXX not used yet
22 bl _GLOBAL_OFFSET_TABLE_@local-4
25 lwz %r5,_C_LABEL(_end)@got(%r9)
27 lis %r5,_C_LABEL(_end)@ha # r5 = &_end
28 addi %r5,%r5,_C_LABEL(_end)@l
30 cmplw %r5,%r3 # if (&_end <= r3)
34 mr %r3,%r5 # new break value
36 sc # assume, that r5 is kept
39 lwz %r6,_C_LABEL(__curbrk)@got(%r9)
42 lis %r6,_C_LABEL(__curbrk)@ha # record new break
43 stw %r5,_C_LABEL(__curbrk)@l(%r6)
48 b PIC_PLT(_C_LABEL(__cerror))