Mon Jan 10 16:43:30 2011 UTC ()
Add hazard nops required by MIPS1 in noreorder case.
(Umm, is it easier to remove noreorder and all BDslot insns?)


(tsutsui)
diff -r1.6 -r1.7 src/sys/arch/pmax/stand/common/bootinit.S
diff -r1.6 -r1.7 src/sys/arch/pmax/stand/common/bootread.S
diff -r1.7 -r1.8 src/sys/arch/pmax/stand/common/clear_cache.S
diff -r1.7 -r1.8 src/sys/arch/pmax/stand/common/printf.S
diff -r1.3 -r1.4 src/sys/arch/pmax/stand/common/getchar.S

cvs diff -r1.6 -r1.7 src/sys/arch/pmax/stand/common/bootinit.S (expand / switch to unified diff)

--- src/sys/arch/pmax/stand/common/bootinit.S 2011/01/10 15:25:15 1.6
+++ src/sys/arch/pmax/stand/common/bootinit.S 2011/01/10 16:43:29 1.7
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: bootinit.S,v 1.6 2011/01/10 15:25:15 tsutsui Exp $ */ 1/* $NetBSD: bootinit.S,v 1.7 2011/01/10 16:43:29 tsutsui Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1999 The NetBSD Foundation, Inc. 4 * Copyright (c) 1999 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 Jonathan Stone, Michael Hitch and Simon Burge. 8 * by Jonathan Stone, Michael Hitch and Simon Burge.
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.
@@ -26,18 +26,19 @@ @@ -26,18 +26,19 @@
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 <mips/asm.h> 32#include <mips/asm.h>
33#include <mips/cpuregs.h> 33#include <mips/cpuregs.h>
34#include <machine/dec_prom.h> 34#include <machine/dec_prom.h>
35 35
36 .set noreorder 36 .set noreorder
37LEAF(bootinit) 37LEAF(bootinit)
38 lw v0, _C_LABEL(callv) # get pointer to call back vectors 38 lw v0, _C_LABEL(callv) # get pointer to call back vectors
 39 nop
39 lw v0, 0x54(v0) # offset for callv->_bootinit 40 lw v0, 0x54(v0) # offset for callv->_bootinit
40 nop 41 nop
41 j v0 # call PROM bootinit 42 j v0 # call PROM bootinit
42 nop 43 nop
43END(bootinit) 44END(bootinit)

cvs diff -r1.6 -r1.7 src/sys/arch/pmax/stand/common/bootread.S (expand / switch to unified diff)

--- src/sys/arch/pmax/stand/common/bootread.S 2011/01/10 15:25:15 1.6
+++ src/sys/arch/pmax/stand/common/bootread.S 2011/01/10 16:43:29 1.7
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: bootread.S,v 1.6 2011/01/10 15:25:15 tsutsui Exp $ */ 1/* $NetBSD: bootread.S,v 1.7 2011/01/10 16:43:29 tsutsui Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1999 The NetBSD Foundation, Inc. 4 * Copyright (c) 1999 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 Jonathan Stone, Michael Hitch and Simon Burge. 8 * by Jonathan Stone, Michael Hitch and Simon Burge.
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.
@@ -26,18 +26,19 @@ @@ -26,18 +26,19 @@
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 <mips/asm.h> 32#include <mips/asm.h>
33#include <mips/cpuregs.h> 33#include <mips/cpuregs.h>
34#include <machine/dec_prom.h> 34#include <machine/dec_prom.h>
35 35
36 .set noreorder 36 .set noreorder
37LEAF(bootread) 37LEAF(bootread)
38 lw v0, _C_LABEL(callv) # get pointer to call back vectors 38 lw v0, _C_LABEL(callv) # get pointer to call back vectors
 39 nop
39 lw v0, 0x58(v0) # offset for callv->_bootread 40 lw v0, 0x58(v0) # offset for callv->_bootread
40 nop 41 nop
41 j v0 # call PROM bootread 42 j v0 # call PROM bootread
42 nop 43 nop
43END(bootread) 44END(bootread)

cvs diff -r1.7 -r1.8 src/sys/arch/pmax/stand/common/clear_cache.S (expand / switch to unified diff)

--- src/sys/arch/pmax/stand/common/clear_cache.S 2011/01/10 15:25:15 1.7
+++ src/sys/arch/pmax/stand/common/clear_cache.S 2011/01/10 16:43:29 1.8
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: clear_cache.S,v 1.7 2011/01/10 15:25:15 tsutsui Exp $ */ 1/* $NetBSD: clear_cache.S,v 1.8 2011/01/10 16:43:29 tsutsui Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1999 The NetBSD Foundation, Inc. 4 * Copyright (c) 1999 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 Jonathan Stone, Michael Hitch and Simon Burge. 8 * by Jonathan Stone, Michael Hitch and Simon Burge.
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.
@@ -26,18 +26,19 @@ @@ -26,18 +26,19 @@
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 <mips/asm.h> 32#include <mips/asm.h>
33#include <mips/cpuregs.h> 33#include <mips/cpuregs.h>
34#include <machine/dec_prom.h> 34#include <machine/dec_prom.h>
35 35
36 .set noreorder 36 .set noreorder
37LEAF(clear_cache) 37LEAF(clear_cache)
38 lw v0, _C_LABEL(callv) # get pointer to call back vectors 38 lw v0, _C_LABEL(callv) # get pointer to call back vectors
 39 nop
39 lw v0, 0x7c(v0) # offset for callv->_clear_cache 40 lw v0, 0x7c(v0) # offset for callv->_clear_cache
40 nop 41 nop
41 j v0 # call PROM clear_cache 42 j v0 # call PROM clear_cache
42 nop 43 nop
43END(clear_cache) 44END(clear_cache)

cvs diff -r1.7 -r1.8 src/sys/arch/pmax/stand/common/printf.S (expand / switch to unified diff)

--- src/sys/arch/pmax/stand/common/printf.S 2011/01/10 15:25:15 1.7
+++ src/sys/arch/pmax/stand/common/printf.S 2011/01/10 16:43:29 1.8
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: printf.S,v 1.7 2011/01/10 15:25:15 tsutsui Exp $ */ 1/* $NetBSD: printf.S,v 1.8 2011/01/10 16:43:29 tsutsui Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1999 The NetBSD Foundation, Inc. 4 * Copyright (c) 1999 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 Jonathan Stone, Michael Hitch and Simon Burge. 8 * by Jonathan Stone, Michael Hitch and Simon Burge.
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.
@@ -26,26 +26,27 @@ @@ -26,26 +26,27 @@
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 <mips/asm.h> 32#include <mips/asm.h>
33#include <mips/cpuregs.h> 33#include <mips/cpuregs.h>
34#include <machine/dec_prom.h> 34#include <machine/dec_prom.h>
35 35
36 .set noreorder 36 .set noreorder
37LEAF(printf) 37LEAF(printf)
38 lw v0, _C_LABEL(callv) # get pointer to call back vectors 38 lw v0, _C_LABEL(callv) # get pointer to call back vectors
 39 nop
39 lw t9, 0x30(v0) # offset for callv->_printf 40 lw t9, 0x30(v0) # offset for callv->_printf
40 nop 41 nop
41#ifdef __mips_n32 42#ifdef __mips_n32
42 /* 43 /*
43 * If someone calls printf with more than 4 args on n32, 44 * If someone calls printf with more than 4 args on n32,
44 * we need to synthesize a o32 call. For now we assume no more than 45 * we need to synthesize a o32 call. For now we assume no more than
45 * 8 arguments and no 64bit values. 46 * 8 arguments and no 64bit values.
46 */ 47 */
47 subu sp, sp, 48 48 subu sp, sp, 48
48 sw a4, 16(sp) 49 sw a4, 16(sp)
49 sw a5, 20(sp) 50 sw a5, 20(sp)
50 sw a6, 24(sp) 51 sw a6, 24(sp)
51 sw a7, 28(sp) 52 sw a7, 28(sp)

cvs diff -r1.3 -r1.4 src/sys/arch/pmax/stand/common/getchar.S (expand / switch to unified diff)

--- src/sys/arch/pmax/stand/common/getchar.S 2011/01/10 15:25:15 1.3
+++ src/sys/arch/pmax/stand/common/getchar.S 2011/01/10 16:43:29 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: getchar.S,v 1.3 2011/01/10 15:25:15 tsutsui Exp $ */ 1/* $NetBSD: getchar.S,v 1.4 2011/01/10 16:43:29 tsutsui Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1999 The NetBSD Foundation, Inc. 4 * Copyright (c) 1999 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 Jonathan Stone, Michael Hitch and Simon Burge. 8 * by Jonathan Stone, Michael Hitch and Simon Burge.
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.
@@ -26,18 +26,19 @@ @@ -26,18 +26,19 @@
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 <mips/asm.h> 32#include <mips/asm.h>
33#include <mips/cpuregs.h> 33#include <mips/cpuregs.h>
34#include <machine/dec_prom.h> 34#include <machine/dec_prom.h>
35 35
36 .set noreorder 36 .set noreorder
37LEAF(getchar) 37LEAF(getchar)
38 lw v0, _C_LABEL(callv) # get pointer to call back vectors 38 lw v0, _C_LABEL(callv) # get pointer to call back vectors
 39 nop
39 lw v0, 0x24(v0) # offset for callv->_getchar 40 lw v0, 0x24(v0) # offset for callv->_getchar
40 nop 41 nop
41 j v0 # call PROM getchar 42 j v0 # call PROM getchar
42 nop 43 nop
43END(getchar) 44END(getchar)