summaryrefslogtreecommitdiff
path: root/lib/libc/arch/powerpc64/SYS.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/arch/powerpc64/SYS.h')
-rw-r--r--lib/libc/arch/powerpc64/SYS.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libc/arch/powerpc64/SYS.h b/lib/libc/arch/powerpc64/SYS.h
index 9964c48093d..ea96ed19e92 100644
--- a/lib/libc/arch/powerpc64/SYS.h
+++ b/lib/libc/arch/powerpc64/SYS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: SYS.h,v 1.5 2022/12/07 23:25:59 guenther Exp $ */
+/* $OpenBSD: SYS.h,v 1.6 2023/12/10 16:45:52 deraadt Exp $ */
/*-
* Copyright (c) 1994
* Andrew Cagney. All rights reserved.
@@ -69,7 +69,8 @@
ENTRY(_thread_sys_ ## x) \
RETGUARD_SETUP(_thread_sys_ ## x, %r11); \
li %r0, SYS_ ## y ; \
- sc ; \
+ 97: sc ; \
+ PINSYSCALL(SYS_ ## y, 97b); \
RETGUARD_CHECK(_thread_sys_ ## x, %r11); \
blr; \
__END(_thread_sys_,x)
@@ -77,7 +78,8 @@
#define PSEUDO_HIDDEN(x,y) ENTRY(_thread_sys_ ## x) \
RETGUARD_SETUP(_thread_sys_ ## x, %r11); \
li %r0, SYS_ ## y ; \
- sc ; \
+ 97: sc ; \
+ PINSYSCALL(SYS_ ## y, 97b); \
cmpwi %r0, 0 ; \
beq .L_ret ; \
stw %r0, R13_OFFSET_ERRNO(%r13); \