Deleted Added
full compact
1,2c1,2
< /* $NetBSD: SYS.h,v 1.18 2003/10/29 12:28:33 pooka Exp $ */
< /* $FreeBSD: head/lib/libc/mips/SYS.h 178580 2008-04-26 12:08:02Z imp $ */
---
> /* $NetBSD: SYS.h,v 1.19 2009/12/14 01:07:41 matt Exp $ */
> /* $FreeBSD: head/lib/libc/mips/SYS.h 209231 2010-06-16 12:55:14Z jchandra $ */
82,83c82,90
< # define PIC_PROLOGUE(x,sr) .set noreorder; .cpload sr; .set reorder
< # define PIC_CALL(l,sr) la sr, _C_LABEL(l); jr sr
---
> # if defined(__mips_o32) || defined(__mips_o64)
> # define PIC_PROLOGUE(x) SETUP_GP
> # define PIC_TAILCALL(l) PTR_LA t9, _C_LABEL(l); jr t9
> # define PIC_RETURN() j ra
> # else
> # define PIC_PROLOGUE(x) SETUP_GP64(t3, x)
> # define PIC_TAILCALL(l) PTR_LA t9, _C_LABEL(l); RESTORE_GP64; jr t9
> # define PIC_RETURN() RESTORE_GP64; j ra
> # endif
85,87c92,95
< # define PIC_PROLOGUE(x,sr)
< # define PIC_CALL(l,sr) j _C_LABEL(l)
< #endif
---
> # define PIC_PROLOGUE(x)
> # define PIC_TAILCALL(l) j _C_LABEL(l)
> # define PIC_RETURN()
> #endif /* __ABICALLS__ */
89c97
< # define SYSTRAP(x) li v0, SYS_ ## x; syscall;
---
> # define SYSTRAP(x) li v0,SYS_ ## x; syscall;
109c117
< .weak _C_LABEL(x); \
---
> .weak _C_LABEL(x); \
119c127
< .weak _C_LABEL(x); \
---
> .weak _C_LABEL(x); \
123c131
< PIC_PROLOGUE(x,t9); \
---
> PIC_PROLOGUE(__sys_ ## x); \
126c134
< j ra; \
---
> PIC_RETURN(); \
128,129c136,137
< PIC_CALL(__cerror,t9); \
< END(__sys_ ## x)
---
> PIC_TAILCALL(__cerror); \
> END(__sys_ ## x)