diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1999-11-14 00:59:10 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1999-11-14 00:59:10 +0000 |
commit | 6a2bb1797b59856f6504ef9c3721dfb1268e615f (patch) | |
tree | 72c4b5ff3b80b8faa4c07415ca5a38cc60c93c92 | |
parent | 59517dcadfdf2256156311b10a3071f41647fc11 (diff) |
this seem proper now
-rw-r--r-- | lib/libc/arch/hppa/SYS.h | 36 | ||||
-rw-r--r-- | lib/libc/arch/hppa/sys/cerror.S | 7 |
2 files changed, 22 insertions, 21 deletions
diff --git a/lib/libc/arch/hppa/SYS.h b/lib/libc/arch/hppa/SYS.h index e296f1e3832..432db82f44a 100644 --- a/lib/libc/arch/hppa/SYS.h +++ b/lib/libc/arch/hppa/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.4 1999/09/16 19:19:46 mickey Exp $ */ +/* $OpenBSD: SYS.h,v 1.5 1999/11/14 00:59:07 mickey Exp $ */ /* * Copyright (c) 1998-1999 Michael Shalayeff @@ -41,24 +41,32 @@ #define __EXIT(p,x) EXIT(__CONCAT(p,x)) +#define __SYSCALL(p,x) !\ + .import errno, data !\ + stw rp, HPPA_FRAME_ERP(sr0,sp) !\ + ldil L%SYSCALLGATE, r1 !\ + ble 4(sr7, r1) !\ + ldi __CONCAT(SYS_,x), t1 !\ + comb,=,n r0, t1, __CONCAT(x,$noerr) !\ + ldil L%errno, r1 !\ + stw t1, R%errno(r1) !\ + ldi -1, ret0 !\ + ldi -1, ret1 !\ + .label __CONCAT(x,$noerr) !\ + ldw HPPA_FRAME_ERP(sr0,sp), rp + #define __RSYSCALL(p,x) !\ __ENTRY(p,x) !\ - stw rp, HPPA_FRAME_ERP(sr0,sp) !\ - ldil L%SYSCALLGATE, r1 !\ - ble 4(sr7, r1) !\ - ldi __CONCAT(SYS_,x),r22 !\ - or,<> r0,r22,r0 !\ - ldw HPPA_FRAME_ERP(sr0,sp),rp !\ + __SYSCALL(p,x) !\ + bv r0(rp) !\ + nop !\ __EXIT(p,x) #define __PSEUDO(p,x,y) !\ __ENTRY(p,x) !\ - stw rp, HPPA_FRAME_ERP(sr0,sp) !\ - ldil L%SYSCALLGATE, r1 !\ - ble 4(sr7, r1) !\ - ldi __CONCAT(SYS_,y),r22 !\ - or,<> r0,r22,r0 !\ - ldw HPPA_FRAME_ERP(sr0,sp),rp !\ + __SYSCALL(p,y) !\ + bv r0(rp) !\ + nop !\ __EXIT(p,x) /* @@ -88,4 +96,4 @@ __EXIT(p,x) # define PSEUDO(x,y) __PSEUDO(,x,y) /*# define SYSENTRY(x) __ENTRY(,x)*/ #endif _THREAD_SAFE - .import cerror, code + diff --git a/lib/libc/arch/hppa/sys/cerror.S b/lib/libc/arch/hppa/sys/cerror.S deleted file mode 100644 index ec77fea0cc8..00000000000 --- a/lib/libc/arch/hppa/sys/cerror.S +++ /dev/null @@ -1,7 +0,0 @@ -#include "SYS.h" - -cerror - bv r0(rp) - nop - - .end |