diff options
author | 2011-09-19 08:10:13 +0000 | |
---|---|---|
committer | 2011-09-19 08:10:13 +0000 | |
commit | 59c466c6a1deff29d3f2906e7972445722492e87 (patch) | |
tree | 624377e6992ba85b83c8eaf7a3d3e80b39ef7ef1 | |
parent | remove the /usr/share/man/ps* hierarchy and supporting variables; MANPS (diff) | |
download | wireguard-openbsd-59c466c6a1deff29d3f2906e7972445722492e87.tar.xz wireguard-openbsd-59c466c6a1deff29d3f2906e7972445722492e87.zip |
Clear the upper 32-bits of the system call address we load using ldil, since
that instruction does sign extension. Look at %r1 to determine whether a
system call was sucessful, since that is where the kernel puts the information.
-rw-r--r-- | lib/libc/arch/hppa64/SYS.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/arch/hppa64/SYS.h b/lib/libc/arch/hppa64/SYS.h index 33c55b3dfc3..87d86f1d721 100644 --- a/lib/libc/arch/hppa64/SYS.h +++ b/lib/libc/arch/hppa64/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.4 2011/04/21 13:29:58 jsing Exp $ */ +/* $OpenBSD: SYS.h,v 1.5 2011/09/19 08:10:13 kettenis Exp $ */ /* * Copyright (c) 1998-2002 Michael Shalayeff @@ -42,10 +42,11 @@ EXIT(__CONCAT(_thread_sys_,x)) #define SYSCALL(x) !\ std %rp, HPPA_FRAME_RP(%sr0,%sp) !\ ldil L%SYSCALLGATE, %r1 !\ + depd %r0, 31, 32, %r1 !\ ble 4(%sr7, %r1) !\ ldi __CONCAT(SYS_,x), %r1 !\ .import __cerror, code !\ - comb,<> %r0, %t1, __cerror !\ + comb,<> %r0, %r1, __cerror !\ ldd HPPA_FRAME_RP(%sr0,%sp), %rp #define PSEUDO(x,y) !\ @@ -59,6 +60,7 @@ SYSEXIT(x) SYSENTRY(x) !\ std %rp, HPPA_FRAME_RP(%sr0,%sp) !\ ldil L%SYSCALLGATE, %r1 !\ + depd %r0, 31, 32, %r1 !\ ble 4(%sr7, %r1) !\ ldi __CONCAT(SYS_,y), %r1 !\ ldd HPPA_FRAME_RP(%sr0,%sp), %rp !\ |