Sat May 9 08:25:34 2020 UTC ()
No need to .import __cerror as SYS.h does it


(skrll)
diff -r1.9 -r1.10 src/lib/libc/arch/hppa/sys/__vfork14.S
diff -r1.6 -r1.7 src/lib/libc/arch/hppa/sys/ptrace.S

cvs diff -r1.9 -r1.10 src/lib/libc/arch/hppa/sys/__vfork14.S (expand / switch to unified diff)

--- src/lib/libc/arch/hppa/sys/__vfork14.S 2020/05/05 20:43:47 1.9
+++ src/lib/libc/arch/hppa/sys/__vfork14.S 2020/05/09 08:25:33 1.10
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: __vfork14.S,v 1.9 2020/05/05 20:43:47 skrll Exp $ */ 1/* $NetBSD: __vfork14.S,v 1.10 2020/05/09 08:25:33 skrll Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2001 The NetBSD Foundation, Inc. 4 * Copyright (c) 2001 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Matt Fredette. 8 * by Matt Fredette.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -42,27 +42,25 @@ ENTRY(__vfork14, 0) @@ -42,27 +42,25 @@ ENTRY(__vfork14, 0)
42 * So we must save values in registers, specifically, 42 * So we must save values in registers, specifically,
43 * registers that the kernel is willing to preserve 43 * registers that the kernel is willing to preserve
44 * across the syscall. Normally, this would be callee- 44 * across the syscall. Normally, this would be callee-
45 * saved registers, with the kernel being the callee, 45 * saved registers, with the kernel being the callee,
46 * but the problem is that we, too, are a callee, and 46 * but the problem is that we, too, are a callee, and
47 * would have to save that very same register somewhere, 47 * would have to save that very same register somewhere,
48 * because *our* caller is counting on us to do so. 48 * because *our* caller is counting on us to do so.
49 * 49 *
50 * What we need is a normally caller-saved register, 50 * What we need is a normally caller-saved register,
51 * that the kernel is willing to save for us. The 51 * that the kernel is willing to save for us. The
52 * syscall entry code in locore.S has been modified 52 * syscall entry code in locore.S has been modified
53 * to do just this for the t4 register. 53 * to do just this for the t4 register.
54 */ 54 */
55 .import __cerror, code 
56 
57 copy %rp, %t4 55 copy %rp, %t4
58 ldil L%SYSCALLGATE, %r1 56 ldil L%SYSCALLGATE, %r1
59 ble 4(%sr2, %r1) 57 ble 4(%sr2, %r1)
60 ldi SYS___vfork14, %t1 58 ldi SYS___vfork14, %t1
61 comb,=,n %r0, %t1, 1f 59 comb,=,n %r0, %t1, 1f
62 b __cerror 60 b __cerror
631: 611:
64 copy %t4, %rp // delay slot of branch to __cerror 62 copy %t4, %rp // delay slot of branch to __cerror
65 addi -1, %ret1, %ret1 63 addi -1, %ret1, %ret1
66 bv %r0(%rp) 64 bv %r0(%rp)
67 and %ret0, %ret1, %ret0 65 and %ret0, %ret1, %ret0
68EXIT(__vfork14) 66EXIT(__vfork14)

cvs diff -r1.6 -r1.7 src/lib/libc/arch/hppa/sys/ptrace.S (expand / switch to unified diff)

--- src/lib/libc/arch/hppa/sys/ptrace.S 2008/04/28 20:22:56 1.6
+++ src/lib/libc/arch/hppa/sys/ptrace.S 2020/05/09 08:25:33 1.7
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ptrace.S,v 1.6 2008/04/28 20:22:56 martin Exp $ */ 1/* $NetBSD: ptrace.S,v 1.7 2020/05/09 08:25:33 skrll Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2001 The NetBSD Foundation, Inc. 4 * Copyright (c) 2001 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Matt Fredette. 8 * by Matt Fredette.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -22,28 +22,26 @@ @@ -22,28 +22,26 @@
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32#include <sys/errno.h> 32#include <sys/errno.h>
33#include "SYS.h" 33#include "SYS.h"
34 34
35 .import __cerror, code 
36 
37/* 35/*
38 * int ptrace(int request, pid_t pid, void * addr, int data); 36 * int ptrace(int request, pid_t pid, void * addr, int data);
39 */ 37 */
40 38
41ENTRY(ptrace, HPPA_FRAME_SIZE) 39ENTRY(ptrace, HPPA_FRAME_SIZE)
42 stw %rp, HPPA_FRAME_CRP(%sp) 40 stw %rp, HPPA_FRAME_CRP(%sp)
43 stw %arg0, HPPA_FRAME_ARG(0)(%sp) 41 stw %arg0, HPPA_FRAME_ARG(0)(%sp)
44 stw %arg1, HPPA_FRAME_ARG(1)(%sp) 42 stw %arg1, HPPA_FRAME_ARG(1)(%sp)
45 stw %arg2, HPPA_FRAME_ARG(2)(%sp) 43 stw %arg2, HPPA_FRAME_ARG(2)(%sp)
46 stw %arg3, HPPA_FRAME_ARG(3)(%sp) 44 stw %arg3, HPPA_FRAME_ARG(3)(%sp)
47 ldo HPPA_FRAME_SIZE(%sp),%sp 45 ldo HPPA_FRAME_SIZE(%sp),%sp
48 bl __cerror, %rp 46 bl __cerror, %rp
49 copy %r0, %t1 47 copy %r0, %t1