36c36
< __FBSDID("$FreeBSD: head/lib/libc/mips/sys/sbrk.S 178580 2008-04-26 12:08:02Z imp $");
---
> __FBSDID("$FreeBSD: head/lib/libc/mips/sys/sbrk.S 209231 2010-06-16 12:55:14Z jchandra $");
55,68c55,58
< #ifdef __ABICALLS__
< .set noreorder
< .cpload t9
< .set reorder
< #endif
< addu sp, sp, -16
< sw s0, 0(sp) # Preserve s0 value in stack
< # it should be the same on return
< # We can't use v1 as temporary
< # register since syscall uses it
< # to return 64-bit values
< lw s0, _C_LABEL(__curbrk)
< li v0, SYS_break
< addu a0, a0, s0 # compute current break
---
> PIC_PROLOGUE(__sys_sbrk)
> PTR_LA t0, _C_LABEL(__curbrk)
> PTR_L t0, 0(t0)
> PTR_ADDU a0, a0, t0
69a60
> li v0, SYS_break
74,77c65,68
< move v0, s0 # return old val of curbrk from above
< lw s0, 0(sp)
< addu sp, sp, 16
< sw a0, _C_LABEL(__curbrk) # save current val of curbrk from above
---
> move v0, t0 # return old val of curbrk from above
> PTR_LA t0, _C_LABEL(__curbrk)
> PTR_S a0, 0(t0) # save current val of curbrk from above
> PIC_RETURN()
81,84c72
< lw s0, 0(sp)
< addu sp, sp, 16
< la t9, _C_LABEL(__cerror)
< jr t9
---
> PIC_TAILCALL(__cerror)
< __FBSDID("$FreeBSD: head/lib/libc/mips/sys/sbrk.S 178580 2008-04-26 12:08:02Z imp $");
---
> __FBSDID("$FreeBSD: head/lib/libc/mips/sys/sbrk.S 209231 2010-06-16 12:55:14Z jchandra $");
55,68c55,58
< #ifdef __ABICALLS__
< .set noreorder
< .cpload t9
< .set reorder
< #endif
< addu sp, sp, -16
< sw s0, 0(sp) # Preserve s0 value in stack
< # it should be the same on return
< # We can't use v1 as temporary
< # register since syscall uses it
< # to return 64-bit values
< lw s0, _C_LABEL(__curbrk)
< li v0, SYS_break
< addu a0, a0, s0 # compute current break
---
> PIC_PROLOGUE(__sys_sbrk)
> PTR_LA t0, _C_LABEL(__curbrk)
> PTR_L t0, 0(t0)
> PTR_ADDU a0, a0, t0
69a60
> li v0, SYS_break
74,77c65,68
< move v0, s0 # return old val of curbrk from above
< lw s0, 0(sp)
< addu sp, sp, 16
< sw a0, _C_LABEL(__curbrk) # save current val of curbrk from above
---
> move v0, t0 # return old val of curbrk from above
> PTR_LA t0, _C_LABEL(__curbrk)
> PTR_S a0, 0(t0) # save current val of curbrk from above
> PIC_RETURN()
81,84c72
< lw s0, 0(sp)
< addu sp, sp, 16
< la t9, _C_LABEL(__cerror)
< jr t9
---
> PIC_TAILCALL(__cerror)