summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2017-02-23 22:50:07 +0000
committerpatrick <patrick@openbsd.org>2017-02-23 22:50:07 +0000
commitabf75f7ee8b8927dcf5acd4addac869d8705012f (patch)
tree87986f3e7819705ecd42a145b63defe08354359d
parentSHA-1 collisions have now been found so update some man pages. As noted by (diff)
downloadwireguard-openbsd-abf75f7ee8b8927dcf5acd4addac869d8705012f.tar.xz
wireguard-openbsd-abf75f7ee8b8927dcf5acd4addac869d8705012f.zip
The assembly for sigpending(2) wasn't correctly implemented either. I
suppose this still stems from the first steps where we tried to get at least some userland stuff to compile. This change properly saves the pointer before doing the syscall and stores the return value in the pointer on return. This makes sigpending regress pass.
-rw-r--r--lib/libc/arch/aarch64/sys/sigpending.S5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/arch/aarch64/sys/sigpending.S b/lib/libc/arch/aarch64/sys/sigpending.S
index 65265363115..076473b1ccb 100644
--- a/lib/libc/arch/aarch64/sys/sigpending.S
+++ b/lib/libc/arch/aarch64/sys/sigpending.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: sigpending.S,v 1.1 2017/01/11 18:09:24 patrick Exp $ */
+/* $OpenBSD: sigpending.S,v 1.2 2017/02/23 22:50:07 patrick Exp $ */
/* $NetBSD: sigpending.S,v 1.5 2003/08/07 16:42:05 agc Exp $ */
/*-
@@ -35,9 +35,10 @@
#include "SYS.h"
SYSENTRY(sigpending)
- ldr w0, [x0]
+ mov x2, x0
SYSTRAP(sigpending)
bcs CERROR
+ str w0, [x2]
mov x0, #0
ret
SYSCALL_END(sigpending)