Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sh3/sh3 Support __PIC__ build, in order to avoid te...
details: https://anonhg.NetBSD.org/src/rev/199e82649845
branches: trunk
changeset: 1023609:199e82649845
user: rin <rin%NetBSD.org@localhost>
date: Sat Sep 18 06:32:41 2021 +0000
description:
Support __PIC__ build, in order to avoid text relocations for
/usr/tests/net/in_cksum/in_cksum.
Now, all the tests for in_cksum successfully pass for sh[34].
No binary changes for kernel.
diffstat:
sys/arch/sh3/sh3/cpu_in_cksum.S | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (54 lines):
diff -r aab8cf3aed0f -r 199e82649845 sys/arch/sh3/sh3/cpu_in_cksum.S
--- a/sys/arch/sh3/sh3/cpu_in_cksum.S Sat Sep 18 06:31:46 2021 +0000
+++ b/sys/arch/sh3/sh3/cpu_in_cksum.S Sat Sep 18 06:32:41 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_in_cksum.S,v 1.6 2021/09/18 06:31:46 rin Exp $ */
+/* $NetBSD: cpu_in_cksum.S,v 1.7 2021/09/18 06:32:41 rin Exp $ */
/*-
* Copyright (c) 2000 SHIMIZU Ryo <ryo%misakimix.org@localhost>
@@ -34,7 +34,7 @@
#include <machine/asm.h>
#include "assym.h"
-__KERNEL_RCSID(0, "$NetBSD: cpu_in_cksum.S,v 1.6 2021/09/18 06:31:46 rin Exp $")
+__KERNEL_RCSID(0, "$NetBSD: cpu_in_cksum.S,v 1.7 2021/09/18 06:32:41 rin Exp $")
#define reg_tmp0 r0
@@ -98,6 +98,7 @@
*/
ENTRY(cpu_in_cksum)
sts.l pr,@-sp
+ PIC_PROLOGUE(.L_got)
tst reg_len, reg_len
bt/s mbuf_loop_done
@@ -222,6 +223,7 @@
in_cksum_return:
not reg_sum,r0
+ PIC_EPILOGUE
lds.l @sp+,pr
rts
extu.w r0,r0
@@ -233,15 +235,17 @@
mov.l reg_sum,@-sp /* save: call clobbered register */
- jsr @reg_tmp3
+1: CALL reg_tmp3
mov reg_tmp0,r4
bra in_cksum_return
mov.l @sp+,reg_sum /* restore */
.align 2
+.L_got:
+ PIC_GOT_DATUM
.L_printf:
- .long _C_LABEL(printf)
+ CALL_DATUM(_C_LABEL(printf), 1b)
.align 2 /* mova target */
.L_message_out_of_data:
Home |
Main Index |
Thread Index |
Old Index