Add hazard nops required by MIPS1 in noreorder case. (Umm, is it easier to remove noreorder and all BDslot insns?)diff -r1.6 -r1.7 src/sys/arch/pmax/stand/common/bootinit.S
(tsutsui)
--- 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 | |
37 | LEAF(bootinit) | 37 | LEAF(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 | |
43 | END(bootinit) | 44 | END(bootinit) |
--- 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 | |
37 | LEAF(bootread) | 37 | LEAF(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 | |
43 | END(bootread) | 44 | END(bootread) |
--- 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 | |
37 | LEAF(clear_cache) | 37 | LEAF(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 | |
43 | END(clear_cache) | 44 | END(clear_cache) |
--- 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 | |
37 | LEAF(printf) | 37 | LEAF(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) |
--- 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 | |
37 | LEAF(getchar) | 37 | LEAF(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 | |
43 | END(getchar) | 44 | END(getchar) |