summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2011-09-19 08:10:14 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2011-09-19 08:10:14 +0000
commit4f9704608aeed0799cbe4a2e29b50808896fa0fd (patch)
tree56f878b2d69bf60d67ea92da96eeee70d3d5666f /lib/libc
parentb2438ee2bb4a26dc92329b2f1125d35146f43dae (diff)
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.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/arch/hppa64/SYS.h6
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 !\