1 /* $NetBSD: brk.S,v 1.1 2014/09/03 19:34:26 matt Exp $ */
5 #if defined(LIBC_SCCS) && !defined(lint)
6 __RCSID("$NetBSD: brk.S,v 1.1 2014/09/03 19:34:26 matt Exp $")
7 #endif /* LIBC_SCCS && !lint */
9 .hidden _C_LABEL(__curbrk)
10 .hidden _C_LABEL(__minbrk)
11 .globl _C_LABEL(__curbrk)
12 .globl _C_LABEL(__minbrk)
31 l.movhi r6,gotoffhi(_C_LABEL(__minbrk))
32 l.ori r6,r6,gotofflo(_C_LABEL(__minbrk))
35 l.movhi r6,hi(_C_LABEL(__minbrk))
36 l.ori r6,r6,lo(_C_LABEL(__minbrk))
38 l.lwz r5,0(r6) # r5 = __minbrk
39 l.sfgts r5,r3 # if (__minbrk <= r3)
40 l.cmov r5,r5,r3 # choose larger
41 l.or r3,r5,r0 # new break value
42 _DOSYSCALL(break) # assume, that r5 is kept
43 l.bf _C_LABEL(__cerror)
45 l.sw __SIZEOF_POINTER__(r6),r5
46 l.xor r11, r11, r11 # return 0