Convert to normal Motorola syntax for addressing. %r@ -> (%r) %r@- -> -(%r) %r@+ -> (%r)+ %r@(n) n(%r) etc. No object differences.diff -r1.4 -r1.5 src/common/lib/libc/arch/m68k/atomic/atomic_add.S
(matt)
--- src/common/lib/libc/arch/m68k/atomic/atomic_add.S 2008/05/25 15:56:11 1.4
+++ src/common/lib/libc/arch/m68k/atomic/atomic_add.S 2013/07/16 20:49:41 1.5
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: atomic_add.S,v 1.4 2008/05/25 15:56:11 chs Exp $ */ | 1 | /* $NetBSD: atomic_add.S,v 1.5 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2007 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2007 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 Jason R. Thorpe. | 8 | * by Jason R. Thorpe. | |
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. | |
@@ -25,41 +25,41 @@ | @@ -25,41 +25,41 @@ | |||
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 "atomic_op_asm.h" | 32 | #include "atomic_op_asm.h" | |
33 | 33 | |||
34 | .text | 34 | .text | |
35 | .align 2 | 35 | .align 2 | |
36 | 36 | |||
37 | ENTRY(_atomic_add_32) | 37 | ENTRY(_atomic_add_32) | |
38 | movl %sp@(4), %a0 | 38 | movl 4(%sp), %a0 | |
39 | movl %sp@(8), %d0 | 39 | movl 8(%sp), %d0 | |
40 | addl %d0, %a0@ | 40 | addl %d0, %a0@ | |
41 | rts | 41 | rts | |
42 | ATOMIC_OP_ALIAS(atomic_add_32,_atomic_add_32) | 42 | ATOMIC_OP_ALIAS(atomic_add_32,_atomic_add_32) | |
43 | ATOMIC_OP_ALIAS(atomic_add_int,_atomic_add_32) | 43 | ATOMIC_OP_ALIAS(atomic_add_int,_atomic_add_32) | |
44 | STRONG_ALIAS(_atomic_add_int,_atomic_add_32) | 44 | STRONG_ALIAS(_atomic_add_int,_atomic_add_32) | |
45 | ATOMIC_OP_ALIAS(atomic_add_long,_atomic_add_32) | 45 | ATOMIC_OP_ALIAS(atomic_add_long,_atomic_add_32) | |
46 | STRONG_ALIAS(_atomic_add_long,_atomic_add_32) | 46 | STRONG_ALIAS(_atomic_add_long,_atomic_add_32) | |
47 | ATOMIC_OP_ALIAS(atomic_add_ptr,_atomic_add_32) | 47 | ATOMIC_OP_ALIAS(atomic_add_ptr,_atomic_add_32) | |
48 | STRONG_ALIAS(_atomic_add_ptr,_atomic_add_32) | 48 | STRONG_ALIAS(_atomic_add_ptr,_atomic_add_32) | |
49 | 49 | |||
50 | ENTRY(_atomic_add_32_nv) | 50 | ENTRY(_atomic_add_32_nv) | |
51 | movl %sp@(4), %a0 | 51 | movl 4(%sp), %a0 | |
52 | 1: movl %a0@, %d0 | 52 | 1: movl (%a0), %d0 | |
53 | movl %d0, %d1 | 53 | movl %d0, %d1 | |
54 | addl %sp@(8), %d0 | 54 | addl 8(%sp), %d0 | |
55 | casl %d1, %d0, %a0@ | 55 | casl %d1, %d0, %a0@ | |
56 | bne 1b | 56 | bne 1b | |
57 | movl %d0, %a0 /* pointers return also in %a0 */ | 57 | movl %d0, %a0 /* pointers return also in %a0 */ | |
58 | rts | 58 | rts | |
59 | ATOMIC_OP_ALIAS(atomic_add_32_nv,_atomic_add_32_nv) | 59 | ATOMIC_OP_ALIAS(atomic_add_32_nv,_atomic_add_32_nv) | |
60 | ATOMIC_OP_ALIAS(atomic_add_int_nv,_atomic_add_32_nv) | 60 | ATOMIC_OP_ALIAS(atomic_add_int_nv,_atomic_add_32_nv) | |
61 | STRONG_ALIAS(_atomic_add_int_nv,_atomic_add_32_nv) | 61 | STRONG_ALIAS(_atomic_add_int_nv,_atomic_add_32_nv) | |
62 | ATOMIC_OP_ALIAS(atomic_add_long_nv,_atomic_add_32_nv) | 62 | ATOMIC_OP_ALIAS(atomic_add_long_nv,_atomic_add_32_nv) | |
63 | STRONG_ALIAS(_atomic_add_long_nv,_atomic_add_32_nv) | 63 | STRONG_ALIAS(_atomic_add_long_nv,_atomic_add_32_nv) | |
64 | ATOMIC_OP_ALIAS(atomic_add_ptr_nv,_atomic_add_32_nv) | 64 | ATOMIC_OP_ALIAS(atomic_add_ptr_nv,_atomic_add_32_nv) | |
65 | STRONG_ALIAS(_atomic_add_ptr_nv,_atomic_add_32_nv) | 65 | STRONG_ALIAS(_atomic_add_ptr_nv,_atomic_add_32_nv) |
--- src/common/lib/libc/arch/m68k/atomic/atomic_dec.S 2008/05/25 15:56:11 1.4
+++ src/common/lib/libc/arch/m68k/atomic/atomic_dec.S 2013/07/16 20:49:41 1.5
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: atomic_dec.S,v 1.4 2008/05/25 15:56:11 chs Exp $ */ | 1 | /* $NetBSD: atomic_dec.S,v 1.5 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2007 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2007 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 Jason R. Thorpe. | 8 | * by Jason R. Thorpe. | |
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. | |
@@ -24,40 +24,40 @@ | @@ -24,40 +24,40 @@ | |||
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 "atomic_op_asm.h" | 32 | #include "atomic_op_asm.h" | |
33 | 33 | |||
34 | .text | 34 | .text | |
35 | 35 | |||
36 | ENTRY(_atomic_dec_32) | 36 | ENTRY(_atomic_dec_32) | |
37 | movl %sp@(4), %a0 | 37 | movl 4(%sp), %a0 | |
38 | subql #1, %a0@ | 38 | subql #1, %a0@ | |
39 | rts | 39 | rts | |
40 | ATOMIC_OP_ALIAS(atomic_dec_32,_atomic_dec_32) | 40 | ATOMIC_OP_ALIAS(atomic_dec_32,_atomic_dec_32) | |
41 | ATOMIC_OP_ALIAS(atomic_dec_uint,_atomic_dec_32) | 41 | ATOMIC_OP_ALIAS(atomic_dec_uint,_atomic_dec_32) | |
42 | STRONG_ALIAS(_atomic_dec_uint,_atomic_dec_32) | 42 | STRONG_ALIAS(_atomic_dec_uint,_atomic_dec_32) | |
43 | ATOMIC_OP_ALIAS(atomic_dec_ulong,_atomic_dec_32) | 43 | ATOMIC_OP_ALIAS(atomic_dec_ulong,_atomic_dec_32) | |
44 | STRONG_ALIAS(_atomic_dec_ulong,_atomic_dec_32) | 44 | STRONG_ALIAS(_atomic_dec_ulong,_atomic_dec_32) | |
45 | ATOMIC_OP_ALIAS(atomic_dec_ptr,_atomic_dec_32) | 45 | ATOMIC_OP_ALIAS(atomic_dec_ptr,_atomic_dec_32) | |
46 | STRONG_ALIAS(_atomic_dec_ptr,_atomic_dec_32) | 46 | STRONG_ALIAS(_atomic_dec_ptr,_atomic_dec_32) | |
47 | 47 | |||
48 | ENTRY(_atomic_dec_32_nv) | 48 | ENTRY(_atomic_dec_32_nv) | |
49 | movl %sp@(4), %a0 | 49 | movl 4(%sp), %a0 | |
50 | 1: movl %a0@, %d0 | 50 | 1: movl (%a0), %d0 | |
51 | movl %d0, %d1 | 51 | movl %d0, %d1 | |
52 | subql #1, %d0 | 52 | subql #1, %d0 | |
53 | casl %d1, %d0, %a0@ | 53 | casl %d1, %d0, %a0@ | |
54 | bne 1b | 54 | bne 1b | |
55 | movl %d0, %a0 /* pointers return also in %a0 */ | 55 | movl %d0, %a0 /* pointers return also in %a0 */ | |
56 | rts | 56 | rts | |
57 | ATOMIC_OP_ALIAS(atomic_dec_32_nv,_atomic_dec_32_nv) | 57 | ATOMIC_OP_ALIAS(atomic_dec_32_nv,_atomic_dec_32_nv) | |
58 | ATOMIC_OP_ALIAS(atomic_dec_uint_nv,_atomic_dec_32_nv) | 58 | ATOMIC_OP_ALIAS(atomic_dec_uint_nv,_atomic_dec_32_nv) | |
59 | STRONG_ALIAS(_atomic_dec_uint_nv,_atomic_dec_32_nv) | 59 | STRONG_ALIAS(_atomic_dec_uint_nv,_atomic_dec_32_nv) | |
60 | ATOMIC_OP_ALIAS(atomic_dec_ulong_nv,_atomic_dec_32_nv) | 60 | ATOMIC_OP_ALIAS(atomic_dec_ulong_nv,_atomic_dec_32_nv) | |
61 | STRONG_ALIAS(_atomic_dec_ulong_nv,_atomic_dec_32_nv) | 61 | STRONG_ALIAS(_atomic_dec_ulong_nv,_atomic_dec_32_nv) | |
62 | ATOMIC_OP_ALIAS(atomic_dec_ptr_nv,_atomic_dec_32_nv) | 62 | ATOMIC_OP_ALIAS(atomic_dec_ptr_nv,_atomic_dec_32_nv) | |
63 | STRONG_ALIAS(_atomic_dec_ptr_nv,_atomic_dec_32_nv) | 63 | STRONG_ALIAS(_atomic_dec_ptr_nv,_atomic_dec_32_nv) |
--- src/common/lib/libc/arch/m68k/atomic/atomic_inc.S 2008/05/25 15:56:11 1.4
+++ src/common/lib/libc/arch/m68k/atomic/atomic_inc.S 2013/07/16 20:49:41 1.5
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: atomic_inc.S,v 1.4 2008/05/25 15:56:11 chs Exp $ */ | 1 | /* $NetBSD: atomic_inc.S,v 1.5 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2007 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2007 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 Jason R. Thorpe. | 8 | * by Jason R. Thorpe. | |
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. | |
@@ -24,40 +24,40 @@ | @@ -24,40 +24,40 @@ | |||
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 "atomic_op_asm.h" | 32 | #include "atomic_op_asm.h" | |
33 | 33 | |||
34 | .text | 34 | .text | |
35 | 35 | |||
36 | ENTRY(_atomic_inc_32) | 36 | ENTRY(_atomic_inc_32) | |
37 | movl %sp@(4), %a0 | 37 | movl 4(%sp), %a0 | |
38 | addql #1, %a0@ | 38 | addql #1, %a0@ | |
39 | rts | 39 | rts | |
40 | ATOMIC_OP_ALIAS(atomic_inc_32,_atomic_inc_32) | 40 | ATOMIC_OP_ALIAS(atomic_inc_32,_atomic_inc_32) | |
41 | ATOMIC_OP_ALIAS(atomic_inc_uint,_atomic_inc_32) | 41 | ATOMIC_OP_ALIAS(atomic_inc_uint,_atomic_inc_32) | |
42 | STRONG_ALIAS(_atomic_inc_uint,_atomic_inc_32) | 42 | STRONG_ALIAS(_atomic_inc_uint,_atomic_inc_32) | |
43 | ATOMIC_OP_ALIAS(atomic_inc_ulong,_atomic_inc_32) | 43 | ATOMIC_OP_ALIAS(atomic_inc_ulong,_atomic_inc_32) | |
44 | STRONG_ALIAS(_atomic_inc_ulong,_atomic_inc_32) | 44 | STRONG_ALIAS(_atomic_inc_ulong,_atomic_inc_32) | |
45 | ATOMIC_OP_ALIAS(atomic_inc_ptr,_atomic_inc_32) | 45 | ATOMIC_OP_ALIAS(atomic_inc_ptr,_atomic_inc_32) | |
46 | STRONG_ALIAS(_atomic_inc_ptr,_atomic_inc_32) | 46 | STRONG_ALIAS(_atomic_inc_ptr,_atomic_inc_32) | |
47 | 47 | |||
48 | ENTRY(_atomic_inc_32_nv) | 48 | ENTRY(_atomic_inc_32_nv) | |
49 | movl %sp@(4), %a0 | 49 | movl 4(%sp), %a0 | |
50 | 1: movl %a0@, %d0 | 50 | 1: movl (%a0), %d0 | |
51 | movl %d0, %d1 | 51 | movl %d0, %d1 | |
52 | addql #1, %d0 | 52 | addql #1, %d0 | |
53 | casl %d1, %d0, %a0@ | 53 | casl %d1, %d0, %a0@ | |
54 | bne 1b | 54 | bne 1b | |
55 | movl %d0, %a0 /* pointers return also in %a0 */ | 55 | movl %d0, %a0 /* pointers return also in %a0 */ | |
56 | rts | 56 | rts | |
57 | ATOMIC_OP_ALIAS(atomic_inc_32_nv,_atomic_inc_32_nv) | 57 | ATOMIC_OP_ALIAS(atomic_inc_32_nv,_atomic_inc_32_nv) | |
58 | ATOMIC_OP_ALIAS(atomic_inc_uint_nv,_atomic_inc_32_nv) | 58 | ATOMIC_OP_ALIAS(atomic_inc_uint_nv,_atomic_inc_32_nv) | |
59 | STRONG_ALIAS(_atomic_inc_uint_nv,_atomic_inc_32_nv) | 59 | STRONG_ALIAS(_atomic_inc_uint_nv,_atomic_inc_32_nv) | |
60 | ATOMIC_OP_ALIAS(atomic_inc_ulong_nv,_atomic_inc_32_nv) | 60 | ATOMIC_OP_ALIAS(atomic_inc_ulong_nv,_atomic_inc_32_nv) | |
61 | STRONG_ALIAS(_atomic_inc_ulong_nv,_atomic_inc_32_nv) | 61 | STRONG_ALIAS(_atomic_inc_ulong_nv,_atomic_inc_32_nv) | |
62 | ATOMIC_OP_ALIAS(atomic_inc_ptr_nv,_atomic_inc_32_nv) | 62 | ATOMIC_OP_ALIAS(atomic_inc_ptr_nv,_atomic_inc_32_nv) | |
63 | STRONG_ALIAS(_atomic_inc_ptr_nv,_atomic_inc_32_nv) | 63 | STRONG_ALIAS(_atomic_inc_ptr_nv,_atomic_inc_32_nv) |
--- src/common/lib/libc/arch/m68k/atomic/atomic_swap.S 2008/05/25 15:56:11 1.4
+++ src/common/lib/libc/arch/m68k/atomic/atomic_swap.S 2013/07/16 20:49:41 1.5
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: atomic_swap.S,v 1.4 2008/05/25 15:56:11 chs Exp $ */ | 1 | /* $NetBSD: atomic_swap.S,v 1.5 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2007 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2007 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 Jason R. Thorpe. | 8 | * by Jason R. Thorpe. | |
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. | |
@@ -24,28 +24,28 @@ | @@ -24,28 +24,28 @@ | |||
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 "atomic_op_asm.h" | 32 | #include "atomic_op_asm.h" | |
33 | 33 | |||
34 | .text | 34 | .text | |
35 | 35 | |||
36 | ENTRY(_atomic_swap_32) | 36 | ENTRY(_atomic_swap_32) | |
37 | movl %sp@(4), %a0 | 37 | movl 4(%sp), %a0 | |
38 | 1: movl %a0@, %d0 | 38 | 1: movl (%a0), %d0 | |
39 | movl %sp@(8), %d1 | 39 | movl 8(%sp), %d1 | |
40 | casl %d0, %d1, %a0@ | 40 | casl %d0, %d1, %a0@ | |
41 | bne 1b | 41 | bne 1b | |
42 | /* %d0 now contains the old value */ | 42 | /* %d0 now contains the old value */ | |
43 | movl %d0, %a0 /* pointers return also in %a0 */ | 43 | movl %d0, %a0 /* pointers return also in %a0 */ | |
44 | rts | 44 | rts | |
45 | ATOMIC_OP_ALIAS(atomic_swap_32,_atomic_swap_32) | 45 | ATOMIC_OP_ALIAS(atomic_swap_32,_atomic_swap_32) | |
46 | ATOMIC_OP_ALIAS(atomic_swap_uint,_atomic_swap_32) | 46 | ATOMIC_OP_ALIAS(atomic_swap_uint,_atomic_swap_32) | |
47 | STRONG_ALIAS(_atomic_swap_uint,_atomic_swap_32) | 47 | STRONG_ALIAS(_atomic_swap_uint,_atomic_swap_32) | |
48 | ATOMIC_OP_ALIAS(atomic_swap_ulong,_atomic_swap_32) | 48 | ATOMIC_OP_ALIAS(atomic_swap_ulong,_atomic_swap_32) | |
49 | STRONG_ALIAS(_atomic_swap_ulong,_atomic_swap_32) | 49 | STRONG_ALIAS(_atomic_swap_ulong,_atomic_swap_32) | |
50 | ATOMIC_OP_ALIAS(atomic_swap_ptr,_atomic_swap_32) | 50 | ATOMIC_OP_ALIAS(atomic_swap_ptr,_atomic_swap_32) | |
51 | STRONG_ALIAS(_atomic_swap_ptr,_atomic_swap_32) | 51 | STRONG_ALIAS(_atomic_swap_ptr,_atomic_swap_32) |
--- src/common/lib/libc/arch/m68k/atomic/atomic_and.S 2008/05/25 15:56:11 1.6
+++ src/common/lib/libc/arch/m68k/atomic/atomic_and.S 2013/07/16 20:49:41 1.7
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: atomic_and.S,v 1.6 2008/05/25 15:56:11 chs Exp $ */ | 1 | /* $NetBSD: atomic_and.S,v 1.7 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2007 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2007 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 Jason R. Thorpe. | 8 | * by Jason R. Thorpe. | |
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. | |
@@ -24,40 +24,40 @@ | @@ -24,40 +24,40 @@ | |||
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 "atomic_op_asm.h" | 32 | #include "atomic_op_asm.h" | |
33 | 33 | |||
34 | .text | 34 | .text | |
35 | 35 | |||
36 | ENTRY(_atomic_and_32) | 36 | ENTRY(_atomic_and_32) | |
37 | movl %sp@(4), %a0 | 37 | movl 4(%sp), %a0 | |
38 | movl %sp@(8), %d0 | 38 | movl 8(%sp), %d0 | |
39 | andl %d0, %a0@ | 39 | andl %d0, %a0@ | |
40 | rts | 40 | rts | |
41 | ATOMIC_OP_ALIAS(atomic_and_32,_atomic_and_32) | 41 | ATOMIC_OP_ALIAS(atomic_and_32,_atomic_and_32) | |
42 | ATOMIC_OP_ALIAS(atomic_and_uint,_atomic_and_32) | 42 | ATOMIC_OP_ALIAS(atomic_and_uint,_atomic_and_32) | |
43 | STRONG_ALIAS(_atomic_and_uint,_atomic_and_32) | 43 | STRONG_ALIAS(_atomic_and_uint,_atomic_and_32) | |
44 | ATOMIC_OP_ALIAS(atomic_and_ulong,_atomic_and_32) | 44 | ATOMIC_OP_ALIAS(atomic_and_ulong,_atomic_and_32) | |
45 | STRONG_ALIAS(_atomic_and_ulong,_atomic_and_32) | 45 | STRONG_ALIAS(_atomic_and_ulong,_atomic_and_32) | |
46 | ATOMIC_OP_ALIAS(atomic_and_ptr,_atomic_and_32) | 46 | ATOMIC_OP_ALIAS(atomic_and_ptr,_atomic_and_32) | |
47 | STRONG_ALIAS(_atomic_and_ptr,_atomic_and_32) | 47 | STRONG_ALIAS(_atomic_and_ptr,_atomic_and_32) | |
48 | 48 | |||
49 | ENTRY(_atomic_and_32_nv) | 49 | ENTRY(_atomic_and_32_nv) | |
50 | movl %sp@(4), %a0 | 50 | movl 4(%sp), %a0 | |
51 | 1: movl %a0@, %d0 | 51 | 1: movl (%a0), %d0 | |
52 | movl %d0, %d1 | 52 | movl %d0, %d1 | |
53 | andl %sp@(8), %d0 | 53 | andl 8(%sp), %d0 | |
54 | casl %d1, %d0, %a0@ | 54 | casl %d1, %d0, %a0@ | |
55 | bne 1b | 55 | bne 1b | |
56 | rts | 56 | rts | |
57 | ATOMIC_OP_ALIAS(atomic_and_32_nv,_atomic_and_32_nv) | 57 | ATOMIC_OP_ALIAS(atomic_and_32_nv,_atomic_and_32_nv) | |
58 | ATOMIC_OP_ALIAS(atomic_and_uint_nv,_atomic_and_32_nv) | 58 | ATOMIC_OP_ALIAS(atomic_and_uint_nv,_atomic_and_32_nv) | |
59 | STRONG_ALIAS(_atomic_and_uint_nv,_atomic_and_32_nv) | 59 | STRONG_ALIAS(_atomic_and_uint_nv,_atomic_and_32_nv) | |
60 | ATOMIC_OP_ALIAS(atomic_and_ulong_nv,_atomic_and_32_nv) | 60 | ATOMIC_OP_ALIAS(atomic_and_ulong_nv,_atomic_and_32_nv) | |
61 | STRONG_ALIAS(_atomic_and_ulong_nv,_atomic_and_32_nv) | 61 | STRONG_ALIAS(_atomic_and_ulong_nv,_atomic_and_32_nv) | |
62 | ATOMIC_OP_ALIAS(atomic_and_ptr_nv,_atomic_and_32_nv) | 62 | ATOMIC_OP_ALIAS(atomic_and_ptr_nv,_atomic_and_32_nv) | |
63 | STRONG_ALIAS(_atomic_and_ptr_nv,_atomic_and_32_nv) | 63 | STRONG_ALIAS(_atomic_and_ptr_nv,_atomic_and_32_nv) |
--- src/common/lib/libc/arch/m68k/atomic/atomic_or.S 2008/05/25 15:56:11 1.6
+++ src/common/lib/libc/arch/m68k/atomic/atomic_or.S 2013/07/16 20:49:41 1.7
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: atomic_or.S,v 1.6 2008/05/25 15:56:11 chs Exp $ */ | 1 | /* $NetBSD: atomic_or.S,v 1.7 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2007 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2007 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 Jason R. Thorpe. | 8 | * by Jason R. Thorpe. | |
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. | |
@@ -24,40 +24,40 @@ | @@ -24,40 +24,40 @@ | |||
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 "atomic_op_asm.h" | 32 | #include "atomic_op_asm.h" | |
33 | 33 | |||
34 | .text | 34 | .text | |
35 | 35 | |||
36 | ENTRY(_atomic_or_32) | 36 | ENTRY(_atomic_or_32) | |
37 | movl %sp@(4), %a0 | 37 | movl 4(%sp), %a0 | |
38 | movl %sp@(8), %d0 | 38 | movl 8(%sp), %d0 | |
39 | orl %d0, %a0@ | 39 | orl %d0, %a0@ | |
40 | rts | 40 | rts | |
41 | ATOMIC_OP_ALIAS(atomic_or_32,_atomic_or_32) | 41 | ATOMIC_OP_ALIAS(atomic_or_32,_atomic_or_32) | |
42 | ATOMIC_OP_ALIAS(atomic_or_uint,_atomic_or_32) | 42 | ATOMIC_OP_ALIAS(atomic_or_uint,_atomic_or_32) | |
43 | STRONG_ALIAS(_atomic_or_uint,_atomic_or_32) | 43 | STRONG_ALIAS(_atomic_or_uint,_atomic_or_32) | |
44 | ATOMIC_OP_ALIAS(atomic_or_ulong,_atomic_or_32) | 44 | ATOMIC_OP_ALIAS(atomic_or_ulong,_atomic_or_32) | |
45 | STRONG_ALIAS(_atomic_or_ulong,_atomic_or_32) | 45 | STRONG_ALIAS(_atomic_or_ulong,_atomic_or_32) | |
46 | ATOMIC_OP_ALIAS(atomic_or_ptr,_atomic_or_32) | 46 | ATOMIC_OP_ALIAS(atomic_or_ptr,_atomic_or_32) | |
47 | STRONG_ALIAS(_atomic_or_ptr,_atomic_or_32) | 47 | STRONG_ALIAS(_atomic_or_ptr,_atomic_or_32) | |
48 | 48 | |||
49 | ENTRY(_atomic_or_32_nv) | 49 | ENTRY(_atomic_or_32_nv) | |
50 | movl %sp@(4), %a0 | 50 | movl 4(%sp), %a0 | |
51 | 1: movl %a0@, %d0 | 51 | 1: movl (%a0), %d0 | |
52 | movl %d0, %d1 | 52 | movl %d0, %d1 | |
53 | orl %sp@(8), %d0 | 53 | orl 8(%sp), %d0 | |
54 | casl %d1, %d0, %a0@ | 54 | casl %d1, %d0, %a0@ | |
55 | bne 1b | 55 | bne 1b | |
56 | rts | 56 | rts | |
57 | ATOMIC_OP_ALIAS(atomic_or_32_nv,_atomic_or_32_nv) | 57 | ATOMIC_OP_ALIAS(atomic_or_32_nv,_atomic_or_32_nv) | |
58 | ATOMIC_OP_ALIAS(atomic_or_uint_nv,_atomic_or_32_nv) | 58 | ATOMIC_OP_ALIAS(atomic_or_uint_nv,_atomic_or_32_nv) | |
59 | STRONG_ALIAS(_atomic_or_uint_nv,_atomic_or_32_nv) | 59 | STRONG_ALIAS(_atomic_or_uint_nv,_atomic_or_32_nv) | |
60 | ATOMIC_OP_ALIAS(atomic_or_ulong_nv,_atomic_or_32_nv) | 60 | ATOMIC_OP_ALIAS(atomic_or_ulong_nv,_atomic_or_32_nv) | |
61 | STRONG_ALIAS(_atomic_or_ulong_nv,_atomic_or_32_nv) | 61 | STRONG_ALIAS(_atomic_or_ulong_nv,_atomic_or_32_nv) | |
62 | ATOMIC_OP_ALIAS(atomic_or_ptr_nv,_atomic_or_32_nv) | 62 | ATOMIC_OP_ALIAS(atomic_or_ptr_nv,_atomic_or_32_nv) | |
63 | STRONG_ALIAS(_atomic_or_ptr_nv,_atomic_or_32_nv) | 63 | STRONG_ALIAS(_atomic_or_ptr_nv,_atomic_or_32_nv) |
--- src/common/lib/libc/arch/m68k/atomic/atomic_cas.S 2008/05/25 15:56:11 1.5
+++ src/common/lib/libc/arch/m68k/atomic/atomic_cas.S 2013/07/16 20:49:41 1.6
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: atomic_cas.S,v 1.5 2008/05/25 15:56:11 chs Exp $ */ | 1 | /* $NetBSD: atomic_cas.S,v 1.6 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2007, 2008 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 Jason R. Thorpe. | 8 | * by Jason R. Thorpe. | |
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. | |
@@ -24,29 +24,29 @@ | @@ -24,29 +24,29 @@ | |||
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 "atomic_op_asm.h" | 32 | #include "atomic_op_asm.h" | |
33 | 33 | |||
34 | .text | 34 | .text | |
35 | 35 | |||
36 | ENTRY(_atomic_cas_32) | 36 | ENTRY(_atomic_cas_32) | |
37 | movl %sp@(4), %a0 | 37 | movl 4(%sp), %a0 | |
38 | movl %sp@(8), %d0 | 38 | movl 8(%sp), %d0 | |
39 | movl %sp@(12), %d1 | 39 | movl 12(%sp), %d1 | |
40 | casl %d0, %d1, %a0@ | 40 | casl %d0, %d1, %a0@ | |
41 | /* %d0 now contains the old value */ | 41 | /* %d0 now contains the old value */ | |
42 | movl %d0, %a0 /* pointers return also in %a0 */ | 42 | movl %d0, %a0 /* pointers return also in %a0 */ | |
43 | rts | 43 | rts | |
44 | 44 | |||
45 | ATOMIC_OP_ALIAS(atomic_cas_32,_atomic_cas_32) | 45 | ATOMIC_OP_ALIAS(atomic_cas_32,_atomic_cas_32) | |
46 | ATOMIC_OP_ALIAS(atomic_cas_uint,_atomic_cas_32) | 46 | ATOMIC_OP_ALIAS(atomic_cas_uint,_atomic_cas_32) | |
47 | STRONG_ALIAS(_atomic_cas_uint,_atomic_cas_32) | 47 | STRONG_ALIAS(_atomic_cas_uint,_atomic_cas_32) | |
48 | ATOMIC_OP_ALIAS(atomic_cas_ulong,_atomic_cas_32) | 48 | ATOMIC_OP_ALIAS(atomic_cas_ulong,_atomic_cas_32) | |
49 | STRONG_ALIAS(_atomic_cas_ulong,_atomic_cas_32) | 49 | STRONG_ALIAS(_atomic_cas_ulong,_atomic_cas_32) | |
50 | ATOMIC_OP_ALIAS(atomic_cas_ptr,_atomic_cas_32) | 50 | ATOMIC_OP_ALIAS(atomic_cas_ptr,_atomic_cas_32) | |
51 | STRONG_ALIAS(_atomic_cas_ptr,_atomic_cas_32) | 51 | STRONG_ALIAS(_atomic_cas_ptr,_atomic_cas_32) | |
52 | 52 |
--- src/common/lib/libc/arch/m68k/atomic/atomic_cas_68000.S 2008/05/25 15:56:11 1.3
+++ src/common/lib/libc/arch/m68k/atomic/atomic_cas_68000.S 2013/07/16 20:49:41 1.4
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: atomic_cas_68000.S,v 1.3 2008/05/25 15:56:11 chs Exp $ */ | 1 | /* $NetBSD: atomic_cas_68000.S,v 1.4 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2008 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2008 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 Steve C. Woodford. | 8 | * by Steve C. Woodford. | |
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. | |
@@ -27,23 +27,23 @@ | @@ -27,23 +27,23 @@ | |||
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/ras.h> | 32 | #include <sys/ras.h> | |
33 | #include "atomic_op_asm.h" | 33 | #include "atomic_op_asm.h" | |
34 | 34 | |||
35 | .text | 35 | .text | |
36 | 36 | |||
37 | ENTRY(_atomic_cas_up) | 37 | ENTRY(_atomic_cas_up) | |
38 | .hidden _C_LABEL(_atomic_cas_up) | 38 | .hidden _C_LABEL(_atomic_cas_up) | |
39 | 39 | |||
40 | movl %sp@(4), %a0 /* Fetch ptr */ | 40 | movl 4(%sp), %a0 /* Fetch ptr */ | |
41 | 41 | |||
42 | RAS_START_ASM_HIDDEN(_atomic_cas) | 42 | RAS_START_ASM_HIDDEN(_atomic_cas) | |
43 | movl %a0@, %d0 /* d0 = *ptr */ | 43 | movl (%a0), %d0 /* d0 = *ptr */ | |
44 | cmpl %sp@(8), %d0 /* Same as old? */ | 44 | cmpl 8(%sp), %d0 /* Same as old? */ | |
45 | jne 1f /* Nope */ | 45 | jne 1f /* Nope */ | |
46 | movl %sp@(12), %a0@ /* *ptr = new */ | 46 | movl 12(%sp), (%a0) /* *ptr = new */ | |
47 | RAS_END_ASM_HIDDEN(_atomic_cas) | 47 | RAS_END_ASM_HIDDEN(_atomic_cas) | |
48 | 1: rts | 48 | 1: rts | |
49 | 49 |
--- src/common/lib/libc/arch/m68k/gen/bswap16.S 2007/09/19 20:31:34 1.2
+++ src/common/lib/libc/arch/m68k/gen/bswap16.S 2013/07/16 20:49:41 1.3
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: bswap16.S,v 1.2 2007/09/19 20:31:34 he Exp $ */ | 1 | /* $NetBSD: bswap16.S,v 1.3 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (C) 1996 Scott Reynolds. All rights reserved. | 4 | * Copyright (C) 1996 Scott Reynolds. All rights reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * 3. The name of the author may not be used to endorse or promote products | 14 | * 3. The name of the author may not be used to endorse or promote products | |
@@ -23,16 +23,16 @@ | @@ -23,16 +23,16 @@ | |||
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
27 | */ | 27 | */ | |
28 | 28 | |||
29 | #include <machine/asm.h> | 29 | #include <machine/asm.h> | |
30 | 30 | |||
31 | #if defined(_KERNEL) || defined(_STANDALONE) | 31 | #if defined(_KERNEL) || defined(_STANDALONE) | |
32 | _ENTRY(_C_LABEL(bswap16)) | 32 | _ENTRY(_C_LABEL(bswap16)) | |
33 | #else /* defined(_KERNEL) || defined(_STANDALONE) */ | 33 | #else /* defined(_KERNEL) || defined(_STANDALONE) */ | |
34 | _ENTRY(_C_LABEL(__bswap16)) | 34 | _ENTRY(_C_LABEL(__bswap16)) | |
35 | #endif /* defined(_KERNEL) || defined(_STANDALONE) */ | 35 | #endif /* defined(_KERNEL) || defined(_STANDALONE) */ | |
36 | movl %sp@(4),%d0 | 36 | movl 4(%sp),%d0 | |
37 | rolw #8,%d0 | 37 | rolw #8,%d0 | |
38 | rts | 38 | rts |
--- src/common/lib/libc/arch/m68k/gen/bswap32.S 2007/09/19 20:31:34 1.2
+++ src/common/lib/libc/arch/m68k/gen/bswap32.S 2013/07/16 20:49:41 1.3
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: bswap32.S,v 1.2 2007/09/19 20:31:34 he Exp $ */ | 1 | /* $NetBSD: bswap32.S,v 1.3 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (C) 1996 Scott Reynolds. All rights reserved. | 4 | * Copyright (C) 1996 Scott Reynolds. All rights reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * 3. The name of the author may not be used to endorse or promote products | 14 | * 3. The name of the author may not be used to endorse or promote products | |
@@ -23,18 +23,18 @@ | @@ -23,18 +23,18 @@ | |||
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
27 | */ | 27 | */ | |
28 | 28 | |||
29 | #include <machine/asm.h> | 29 | #include <machine/asm.h> | |
30 | 30 | |||
31 | #if defined(_KERNEL) || defined(_STANDALONE) | 31 | #if defined(_KERNEL) || defined(_STANDALONE) | |
32 | _ENTRY(_C_LABEL(bswap32)) | 32 | _ENTRY(_C_LABEL(bswap32)) | |
33 | #else /* defined(_KERNEL) || defined(_STANDALONE) */ | 33 | #else /* defined(_KERNEL) || defined(_STANDALONE) */ | |
34 | _ENTRY(_C_LABEL(__bswap32)) | 34 | _ENTRY(_C_LABEL(__bswap32)) | |
35 | #endif /* defined(_KERNEL) || defined(_STANDALONE) */ | 35 | #endif /* defined(_KERNEL) || defined(_STANDALONE) */ | |
36 | movl %sp@(4),%d0 | 36 | movl 4(%sp),%d0 | |
37 | rolw #8,%d0 | 37 | rolw #8,%d0 | |
38 | swap %d0 | 38 | swap %d0 | |
39 | rolw #8,%d0 | 39 | rolw #8,%d0 | |
40 | rts | 40 | rts |
--- src/common/lib/libc/arch/m68k/gen/Attic/divsi3.S 2006/01/05 22:33:34 1.2
+++ src/common/lib/libc/arch/m68k/gen/Attic/divsi3.S 2013/07/16 20:49:41 1.3
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: divsi3.S,v 1.2 2006/01/05 22:33:34 he Exp $ */ | 1 | /* $NetBSD: divsi3.S,v 1.3 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,39 +29,39 @@ | @@ -29,39 +29,39 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)divsi3.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)divsi3.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: divsi3.S,v 1.2 2006/01/05 22:33:34 he Exp $") | 42 | RCSID("$NetBSD: divsi3.S,v 1.3 2013/07/16 20:49:41 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* int / int */ | 46 | /* int / int */ | |
47 | ENTRY(__divsi3) | 47 | ENTRY(__divsi3) | |
48 | #ifndef __mc68010__ | 48 | #ifndef __mc68010__ | |
49 | movel %sp@(4),%d0 | 49 | movel 4(%sp),%d0 | |
50 | divsl %sp@(8),%d0 | 50 | divsl 8(%sp),%d0 | |
51 | rts | 51 | rts | |
52 | #else | 52 | #else | |
53 | | NB: this requires that __udivsi3 preserve %a0: | 53 | | NB: this requires that __udivsi3 preserve %a0: | |
54 | movel %sp@(4), %d1 | load the dividend | 54 | movel 4(%sp), %d1 | load the dividend | |
55 | bpl 1f | 55 | bpl 1f | |
56 | negl %sp@(4) | store abs(dividend) | 56 | negl 4(%sp) | store abs(dividend) | |
57 | 1: movel %sp@(8), %d0 | load the divisor | 57 | 1: movel 8(%sp), %d0 | load the divisor | |
58 | bpl 2f | 58 | bpl 2f | |
59 | negl %sp@(8) | store abs(divisor) | 59 | negl 8(%sp) | store abs(divisor) | |
60 | 2: eorl %d1, %d0 | 60 | 2: eorl %d1, %d0 | |
61 | bpl 3f | branch if sgn(divisor) == sgn(dividend) | 61 | bpl 3f | branch if sgn(divisor) == sgn(dividend) | |
62 | movel %sp@+, %a0 | pop return address | 62 | movel (%sp)+, %a0 | pop return address | |
63 | pea %pc@(Lret) | push our return address | 63 | pea (Lret,%pc) | push our return address | |
64 | 3: jmp _C_LABEL(__udivsi3) | 64 | 3: jmp _C_LABEL(__udivsi3) | |
65 | Lret: negl %d0 | negate quotient | 65 | Lret: negl %d0 | negate quotient | |
66 | jmp %a0@ | 66 | jmp (%a0) | |
67 | #endif /* __mc68010__ */ | 67 | #endif /* __mc68010__ */ |
--- src/common/lib/libc/arch/m68k/gen/mulsi3.S 2006/01/05 22:33:34 1.2
+++ src/common/lib/libc/arch/m68k/gen/mulsi3.S 2013/07/16 20:49:41 1.3
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: mulsi3.S,v 1.2 2006/01/05 22:33:34 he Exp $ */ | 1 | /* $NetBSD: mulsi3.S,v 1.3 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,40 +29,40 @@ | @@ -29,40 +29,40 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)mulsi3.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)mulsi3.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: mulsi3.S,v 1.2 2006/01/05 22:33:34 he Exp $") | 42 | RCSID("$NetBSD: mulsi3.S,v 1.3 2013/07/16 20:49:41 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* int * int */ | 46 | /* int * int */ | |
47 | ENTRY(__mulsi3) | 47 | ENTRY(__mulsi3) | |
48 | #ifndef __mc68010__ | 48 | #ifndef __mc68010__ | |
49 | movel %sp@(4),%d0 | 49 | movel 4(%sp),%d0 | |
50 | mulsl %sp@(8),%d0 | 50 | mulsl 8(%sp),%d0 | |
51 | #else | 51 | #else | |
52 | | NB: this requires that __udivsi3 preserve %a0 and return | 52 | | NB: this requires that __udivsi3 preserve %a0 and return | |
53 | | the modulus in %d1: | 53 | | the modulus in %d1: | |
54 | movew %sp@(6), %d0 | 54 | movew 6(%sp), %d0 | |
55 | movel %d0, %a0 | save B | 55 | movel %d0, %a0 | save B | |
56 | muluw %sp@(8), %d0 | %d0 holds B * C | 56 | muluw 8(%sp), %d0 | %d0 holds B * C | |
57 | movew %sp@(10), %d1 | 57 | movew 10(%sp), %d1 | |
58 | movel %d1, %a1 | save D | 58 | movel %d1, %a1 | save D | |
59 | muluw %sp@(4), %d1 | %d1 holds A * D | 59 | muluw 4(%sp), %d1 | %d1 holds A * D | |
60 | addw %d1, %d0 | %d0 holds (B * C) + (A * D) | 60 | addw %d1, %d0 | %d0 holds (B * C) + (A * D) | |
61 | swap %d0 | 61 | swap %d0 | |
62 | clrw %d0 | %d0 holds ((B * C) + (A * D)) << 16 | 62 | clrw %d0 | %d0 holds ((B * C) + (A * D)) << 16 | |
63 | exg %a0, %d0 | restore B | 63 | exg %a0, %d0 | restore B | |
64 | movel %a1, %d1 | restore D | 64 | movel %a1, %d1 | restore D | |
65 | muluw %d1, %d0 | %d0 holds B * D | 65 | muluw %d1, %d0 | %d0 holds B * D | |
66 | addl %a0, %d0 | final result | 66 | addl %a0, %d0 | final result | |
67 | #endif /* __mc68010__ */ | 67 | #endif /* __mc68010__ */ | |
68 | rts | 68 | rts |
--- src/common/lib/libc/arch/m68k/gen/Attic/udivsi3.S 2006/01/05 22:33:34 1.2
+++ src/common/lib/libc/arch/m68k/gen/Attic/udivsi3.S 2013/07/16 20:49:41 1.3
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: udivsi3.S,v 1.2 2006/01/05 22:33:34 he Exp $ */ | 1 | /* $NetBSD: udivsi3.S,v 1.3 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,40 +29,40 @@ | @@ -29,40 +29,40 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)udivsi3.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)udivsi3.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: udivsi3.S,v 1.2 2006/01/05 22:33:34 he Exp $") | 42 | RCSID("$NetBSD: udivsi3.S,v 1.3 2013/07/16 20:49:41 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* unsigned / unsigned */ | 46 | /* unsigned / unsigned */ | |
47 | ENTRY(__udivsi3) | 47 | ENTRY(__udivsi3) | |
48 | #ifndef __mc68010__ | 48 | #ifndef __mc68010__ | |
49 | movel %sp@(4),%d0 | 49 | movel 4(%sp),%d0 | |
50 | divul %sp@(8),%d0 | 50 | divul 8(%sp),%d0 | |
51 | rts | 51 | rts | |
52 | #else | 52 | #else | |
53 | movel %d2, %sp@- | save %d2 | 53 | movel %d2, -(%sp) | save %d2 | |
54 | movel %sp@(12), %d0 | load divisor | 54 | movel 12(%sp), %d0 | load divisor | |
55 | movel %sp@(8), %d1 | load dividend | 55 | movel 8(%sp), %d1 | load dividend | |
56 | 56 | |||
57 | | first, we divide the divisor and dividend by two until | 57 | | first, we divide the divisor and dividend by two until | |
58 | | the divisor fits into 16 bits: | 58 | | the divisor fits into 16 bits: | |
59 | 1: cmpil #0x10000, %d0 | 59 | 1: cmpil #0x10000, %d0 | |
60 | bcs 2f | 60 | bcs 2f | |
61 | lsrl #1, %d0 | 61 | lsrl #1, %d0 | |
62 | lsrl #1, %d1 | 62 | lsrl #1, %d1 | |
63 | bra 1b | 63 | bra 1b | |
64 | 2: | 64 | 2: | |
65 | 65 | |||
66 | | now we can do the divide. to avoid overflow, we have to | 66 | | now we can do the divide. to avoid overflow, we have to | |
67 | | do the divide in two parts, high and low, and add the | 67 | | do the divide in two parts, high and low, and add the | |
68 | | results together: | 68 | | results together: | |
@@ -90,37 +90,37 @@ ENTRY(__udivsi3) | @@ -90,37 +90,37 @@ ENTRY(__udivsi3) | |||
90 | | quotient. however, it might be one too big. | 90 | | quotient. however, it might be one too big. | |
91 | | | 91 | | | |
92 | | to adjust this quotient, we multiply it by the original | 92 | | to adjust this quotient, we multiply it by the original | |
93 | | divisor and subtract the result from the original dividend. | 93 | | divisor and subtract the result from the original dividend. | |
94 | | if the result is nonnegative, our guessed quotient was | 94 | | if the result is nonnegative, our guessed quotient was | |
95 | | correct, and the subtraction result is our remainder. | 95 | | correct, and the subtraction result is our remainder. | |
96 | | if the result is negative, our guessed quotient was one | 96 | | if the result is negative, our guessed quotient was one | |
97 | | too big, and the subtraction result plus the original | 97 | | too big, and the subtraction result plus the original | |
98 | | divisor is our remainder. | 98 | | divisor is our remainder. | |
99 | | | 99 | | | |
100 | | as in mulsi3, we have to do the multiply in stages to avoid | 100 | | as in mulsi3, we have to do the multiply in stages to avoid | |
101 | | overflow: | 101 | | overflow: | |
102 | 102 | |||
103 | movel %sp@(12), %d2 | load divisor | 103 | movel 12(%sp), %d2 | load divisor | |
104 | swap %d2 | 104 | swap %d2 | |
105 | movel %d0, %d1 | 105 | movel %d0, %d1 | |
106 | muluw %d2, %d1 | high(divisor) * low(guess) | 106 | muluw %d2, %d1 | high(divisor) * low(guess) | |
107 | moveal %d1, %a1 | save high(divisor) * low(guess) | 107 | moveal %d1, %a1 | save high(divisor) * low(guess) | |
108 | swap %d2 | 108 | swap %d2 | |
109 | movel %d0, %d1 | 109 | movel %d0, %d1 | |
110 | swap %d1 | 110 | swap %d1 | |
111 | muluw %d2, %d1 | low(divisor) * high(guess) | 111 | muluw %d2, %d1 | low(divisor) * high(guess) | |
112 | addl %a1, %d1 | 112 | addl %a1, %d1 | |
113 | swap %d1 | 113 | swap %d1 | |
114 | clrw %d1 | %d1 = finished high multiply result | 114 | clrw %d1 | %d1 = finished high multiply result | |
115 | moveal %d2, %a1 | save original divisor | 115 | moveal %d2, %a1 | save original divisor | |
116 | muluw %d0, %d2 | low(guess) * low(divisor) | 116 | muluw %d0, %d2 | low(guess) * low(divisor) | |
117 | addl %d1, %d2 | %d2 = guess * divisor | 117 | addl %d1, %d2 | %d2 = guess * divisor | |
118 | 118 | |||
119 | movel %sp@(8), %d1 | load original dividend | 119 | movel 8(%sp), %d1 | load original dividend | |
120 | subl %d2, %d1 | subtract | 120 | subl %d2, %d1 | subtract | |
121 | bcc 3f | 121 | bcc 3f | |
122 | subql #1, %d0 | adjust quotient | 122 | subql #1, %d0 | adjust quotient | |
123 | addl %a1, %d1 | adjust remainder | 123 | addl %a1, %d1 | adjust remainder | |
124 | 3: movel %sp@+, %d2 | restore %d2 | 124 | 3: movel (%sp)+, %d2 | restore %d2 | |
125 | rts | 125 | rts | |
126 | #endif /* __mc68010__ */ | 126 | #endif /* __mc68010__ */ |
--- src/common/lib/libc/arch/m68k/gen/Attic/umodsi3.S 2006/01/05 22:33:34 1.2
+++ src/common/lib/libc/arch/m68k/gen/Attic/umodsi3.S 2013/07/16 20:49:41 1.3
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: umodsi3.S,v 1.2 2006/01/05 22:33:34 he Exp $ */ | 1 | /* $NetBSD: umodsi3.S,v 1.3 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,31 +29,31 @@ | @@ -29,31 +29,31 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)umodsi3.s 5.1 (Berkeley) 6/7/90")( | 40 | RCSID("from: @(#)umodsi3.s 5.1 (Berkeley) 6/7/90")( | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: umodsi3.S,v 1.2 2006/01/05 22:33:34 he Exp $") | 42 | RCSID("$NetBSD: umodsi3.S,v 1.3 2013/07/16 20:49:41 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* unsigned % unsigned */ | 46 | /* unsigned % unsigned */ | |
47 | ENTRY(__umodsi3) | 47 | ENTRY(__umodsi3) | |
48 | #ifndef __mc68010__ | 48 | #ifndef __mc68010__ | |
49 | movel %sp@(4),%d1 | 49 | movel 4(%sp),%d1 | |
50 | divull %sp@(8),%d0:%d1 | 50 | divull 8(%sp),%d0:%d1 | |
51 | rts | 51 | rts | |
52 | #else | 52 | #else | |
53 | | NB: this requires that __udivsi3 preserve the %a0 | 53 | | NB: this requires that __udivsi3 preserve the %a0 | |
54 | | register, and that it returns the modulus in %d1: | 54 | | register, and that it returns the modulus in %d1: | |
55 | movel %sp@+, %a0 | pop the return address | 55 | movel (%sp)+, %a0 | pop the return address | |
56 | jsr _C_LABEL(__udivsi3) | 56 | jsr _C_LABEL(__udivsi3) | |
57 | movel %d1, %d0 | move the modulus into %d0 | 57 | movel %d1, %d0 | move the modulus into %d0 | |
58 | jmp %a0@ | return | 58 | jmp (%a0) | return | |
59 | #endif /* __mc68010__ */ | 59 | #endif /* __mc68010__ */ |
--- src/common/lib/libc/arch/m68k/gen/bswap64.S 2005/12/20 19:28:49 1.1
+++ src/common/lib/libc/arch/m68k/gen/bswap64.S 2013/07/16 20:49:41 1.2
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: bswap64.S,v 1.1 2005/12/20 19:28:49 christos Exp $ */ | 1 | /* $NetBSD: bswap64.S,v 1.2 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (C) 1996 Scott Reynolds. All rights reserved. | 4 | * Copyright (C) 1996 Scott Reynolds. All rights reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * 3. The name of the author may not be used to endorse or promote products | 14 | * 3. The name of the author may not be used to endorse or promote products | |
@@ -19,22 +19,22 @@ | @@ -19,22 +19,22 @@ | |||
19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | |
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | |
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
27 | */ | 27 | */ | |
28 | 28 | |||
29 | #include <machine/asm.h> | 29 | #include <machine/asm.h> | |
30 | 30 | |||
31 | ENTRY(bswap64) | 31 | ENTRY(bswap64) | |
32 | movl %sp@(4),%d1 | 32 | movl 4(%sp),%d1 | |
33 | movl %sp@(8),%d0 | 33 | movl 8(%sp),%d0 | |
34 | rolw #8,%d1 | 34 | rolw #8,%d1 | |
35 | rolw #8,%d0 | 35 | rolw #8,%d0 | |
36 | swap %d1 | 36 | swap %d1 | |
37 | swap %d0 | 37 | swap %d0 | |
38 | rolw #8,%d0 | 38 | rolw #8,%d0 | |
39 | rolw #8,%d1 | 39 | rolw #8,%d1 | |
40 | rts | 40 | rts |
--- src/common/lib/libc/arch/m68k/gen/Attic/modsi3.S 2006/01/13 16:07:59 1.3
+++ src/common/lib/libc/arch/m68k/gen/Attic/modsi3.S 2013/07/16 20:49:41 1.4
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: modsi3.S,v 1.3 2006/01/13 16:07:59 christos Exp $ */ | 1 | /* $NetBSD: modsi3.S,v 1.4 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,40 +29,40 @@ | @@ -29,40 +29,40 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)modsi3.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)modsi3.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: modsi3.S,v 1.3 2006/01/13 16:07:59 christos Exp $") | 42 | RCSID("$NetBSD: modsi3.S,v 1.4 2013/07/16 20:49:41 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* int % int */ | 46 | /* int % int */ | |
47 | ENTRY(__modsi3) | 47 | ENTRY(__modsi3) | |
48 | #ifndef __mc68010__ | 48 | #ifndef __mc68010__ | |
49 | movel %sp@(4),%d1 | 49 | movel 4(%sp),%d1 | |
50 | divsll %sp@(8),%d0:%d1 | 50 | divsll 8(%sp),%d0:%d1 | |
51 | rts | 51 | rts | |
52 | #else | 52 | #else | |
53 | | NB: this requires that __udivsi3 preserve %a0 and return | 53 | | NB: this requires that __udivsi3 preserve %a0 and return | |
54 | | the modulus in %d1: | 54 | | the modulus in %d1: | |
55 | movel %sp@+, %a0 | pop return address | 55 | movel (%sp)+, %a0 | pop return address | |
56 | movel %sp@(4), %d1 | load the divisor | 56 | movel 4(%sp), %d1 | load the divisor | |
57 | bpl 1f | 57 | bpl 1f | |
58 | negl %sp@(4) | store abs(divisor) | 58 | negl 4(%sp) | store abs(divisor) | |
59 | 1: movel %sp@, %d0 | load the dividend | 59 | 1: movel (%sp), %d0 | load the dividend | |
60 | pea %pc@(Lret) | push our return address | 60 | pea (Lret,%pc) | push our return address | |
61 | bpl 2f | 61 | bpl 2f | |
62 | negl %sp@(4) | store abs(dividend) | 62 | negl 4(%sp) | store abs(dividend) | |
63 | subql #2, %sp@ | adjust return address | 63 | subql #2, (%sp) | adjust return address | |
64 | 2: jmp _C_LABEL(__udivsi3) | 64 | 2: jmp _C_LABEL(__udivsi3) | |
65 | negl %d1 | negate modulus | 65 | negl %d1 | negate modulus | |
66 | Lret: movl %d1, %d0 | move modulus into %d0 | 66 | Lret: movl %d1, %d0 | move modulus into %d0 | |
67 | jmp %a0@ | 67 | jmp (%a0) | |
68 | #endif /* __mc68010__ */ | 68 | #endif /* __mc68010__ */ |
--- src/common/lib/libc/arch/m68k/net/htonl.S 2005/12/20 19:28:49 1.1
+++ src/common/lib/libc/arch/m68k/net/htonl.S 2013/07/16 20:49:41 1.2
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: htonl.S,v 1.1 2005/12/20 19:28:49 christos Exp $ */ | 1 | /* $NetBSD: htonl.S,v 1.2 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,22 +29,22 @@ | @@ -29,22 +29,22 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)htonl.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)htonl.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: htonl.S,v 1.1 2005/12/20 19:28:49 christos Exp $") | 42 | RCSID("$NetBSD: htonl.S,v 1.2 2013/07/16 20:49:41 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* netorder = htonl(hostorder) */ | 46 | /* netorder = htonl(hostorder) */ | |
47 | 47 | |||
48 | ENTRY(htonl) | 48 | ENTRY(htonl) | |
49 | movl %sp@(4),%d0 | 49 | movl 4(%sp),%d0 | |
50 | rts | 50 | rts |
--- src/common/lib/libc/arch/m68k/net/htons.S 2005/12/20 19:28:49 1.1
+++ src/common/lib/libc/arch/m68k/net/htons.S 2013/07/16 20:49:41 1.2
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: htons.S,v 1.1 2005/12/20 19:28:49 christos Exp $ */ | 1 | /* $NetBSD: htons.S,v 1.2 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,23 +29,23 @@ | @@ -29,23 +29,23 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)htons.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)htons.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: htons.S,v 1.1 2005/12/20 19:28:49 christos Exp $") | 42 | RCSID("$NetBSD: htons.S,v 1.2 2013/07/16 20:49:41 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* hostorder = htons(netorder) */ | 46 | /* hostorder = htons(netorder) */ | |
47 | 47 | |||
48 | ENTRY(htons) | 48 | ENTRY(htons) | |
49 | clrl %d0 | 49 | clrl %d0 | |
50 | movw %sp@(6),%d0 | 50 | movw 6(%sp),%d0 | |
51 | rts | 51 | rts |
--- src/common/lib/libc/arch/m68k/net/ntohl.S 2005/12/20 19:28:49 1.1
+++ src/common/lib/libc/arch/m68k/net/ntohl.S 2013/07/16 20:49:41 1.2
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ntohl.S,v 1.1 2005/12/20 19:28:49 christos Exp $ */ | 1 | /* $NetBSD: ntohl.S,v 1.2 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,22 +29,22 @@ | @@ -29,22 +29,22 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)ntohl.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)ntohl.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: ntohl.S,v 1.1 2005/12/20 19:28:49 christos Exp $") | 42 | RCSID("$NetBSD: ntohl.S,v 1.2 2013/07/16 20:49:41 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* hostorder = ntohl(netorder) */ | 46 | /* hostorder = ntohl(netorder) */ | |
47 | 47 | |||
48 | ENTRY(ntohl) | 48 | ENTRY(ntohl) | |
49 | movl %sp@(4),%d0 | 49 | movl 4(%sp),%d0 | |
50 | rts | 50 | rts |
--- src/common/lib/libc/arch/m68k/net/ntohs.S 2005/12/20 19:28:49 1.1
+++ src/common/lib/libc/arch/m68k/net/ntohs.S 2013/07/16 20:49:41 1.2
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ntohs.S,v 1.1 2005/12/20 19:28:49 christos Exp $ */ | 1 | /* $NetBSD: ntohs.S,v 1.2 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,23 +29,23 @@ | @@ -29,23 +29,23 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)ntohs.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)ntohs.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: ntohs.S,v 1.1 2005/12/20 19:28:49 christos Exp $") | 42 | RCSID("$NetBSD: ntohs.S,v 1.2 2013/07/16 20:49:41 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* hostorder = ntohs(netorder) */ | 46 | /* hostorder = ntohs(netorder) */ | |
47 | 47 | |||
48 | ENTRY(ntohs) | 48 | ENTRY(ntohs) | |
49 | clrl %d0 | 49 | clrl %d0 | |
50 | movw %sp@(6),%d0 | 50 | movw 6(%sp),%d0 | |
51 | rts | 51 | rts |
--- src/common/lib/libc/arch/m68k/string/bcmp.S 2008/04/28 20:22:52 1.2
+++ src/common/lib/libc/arch/m68k/string/bcmp.S 2013/07/16 20:49:41 1.3
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: bcmp.S,v 1.2 2008/04/28 20:22:52 martin Exp $ */ | 1 | /* $NetBSD: bcmp.S,v 1.3 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1997 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1997 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 J.T. Conklin. | 8 | * by J.T. Conklin. | |
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. | |
@@ -58,110 +58,110 @@ | @@ -58,110 +58,110 @@ | |||
58 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 58 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
60 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 60 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
61 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 61 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
62 | * SUCH DAMAGE. | 62 | * SUCH DAMAGE. | |
63 | */ | 63 | */ | |
64 | 64 | |||
65 | #include <machine/asm.h> | 65 | #include <machine/asm.h> | |
66 | 66 | |||
67 | #if defined(LIBC_SCCS) && !defined(lint) | 67 | #if defined(LIBC_SCCS) && !defined(lint) | |
68 | #if 0 | 68 | #if 0 | |
69 | RCSID("from: @(#)bcmp.s 5.1 (Berkeley) 5/12/90") | 69 | RCSID("from: @(#)bcmp.s 5.1 (Berkeley) 5/12/90") | |
70 | #else | 70 | #else | |
71 | RCSID("$NetBSD: bcmp.S,v 1.2 2008/04/28 20:22:52 martin Exp $") | 71 | RCSID("$NetBSD: bcmp.S,v 1.3 2013/07/16 20:49:41 matt Exp $") | |
72 | #endif | 72 | #endif | |
73 | #endif /* LIBC_SCCS and not lint */ | 73 | #endif /* LIBC_SCCS and not lint */ | |
74 | 74 | |||
75 | ENTRY(bcmp) | 75 | ENTRY(bcmp) | |
76 | movl %sp@(4),%a0 | string 1 | 76 | movl 4(%sp),%a0 | string 1 | |
77 | movl %sp@(8),%a1 | string 2 | 77 | movl 8(%sp),%a1 | string 2 | |
78 | movl %sp@(12),%d1 | length | 78 | movl 12(%sp),%d1 | length | |
79 | 79 | |||
80 | /* | 80 | /* | |
81 | * It isn't worth the overhead of aligning to {long}word boundries | 81 | * It isn't worth the overhead of aligning to {long}word boundries | |
82 | * if the string is too short. | 82 | * if the string is too short. | |
83 | */ | 83 | */ | |
84 | cmpl #8,%d1 | 84 | cmpl #8,%d1 | |
85 | jlt Lbcbyte | 85 | jlt Lbcbyte | |
86 | 86 | |||
87 | #ifdef __mc68010__ | 87 | #ifdef __mc68010__ | |
88 | /* | 88 | /* | |
89 | * The 68010 cannot access a word or long on an odd boundary, | 89 | * The 68010 cannot access a word or long on an odd boundary, | |
90 | * period. If the source and the destination addresses aren't | 90 | * period. If the source and the destination addresses aren't | |
91 | * of the same evenness, we're forced to do a bytewise compare. | 91 | * of the same evenness, we're forced to do a bytewise compare. | |
92 | */ | 92 | */ | |
93 | movl %a0,%d0 | 93 | movl %a0,%d0 | |
94 | addl %a1,%d0 | 94 | addl %a1,%d0 | |
95 | btst #0,%d0 | 95 | btst #0,%d0 | |
96 | jne Lbcbyte | 96 | jne Lbcbyte | |
97 | #endif /* __mc68010__ */ | 97 | #endif /* __mc68010__ */ | |
98 | 98 | |||
99 | /* word align */ | 99 | /* word align */ | |
100 | movl %a0,%d0 | 100 | movl %a0,%d0 | |
101 | btst #0,%d0 | 101 | btst #0,%d0 | |
102 | jeq Lbcalgndw | 102 | jeq Lbcalgndw | |
103 | cmpmb %a0@+,%a1@+ | 103 | cmpmb (%a0)+,(%a1)+ | |
104 | jne Lbcnoteq | 104 | jne Lbcnoteq | |
105 | subql #1,%d1 | 105 | subql #1,%d1 | |
106 | Lbcalgndw: | 106 | Lbcalgndw: | |
107 | /* long word align */ | 107 | /* long word align */ | |
108 | btst #1,%d0 | 108 | btst #1,%d0 | |
109 | jeq Lbcalgndl | 109 | jeq Lbcalgndl | |
110 | cmpmw %a0@+,%a1@+ | 110 | cmpmw (%a0)+,(%a1)+ | |
111 | jne Lbcnoteq | 111 | jne Lbcnoteq | |
112 | subql #2,%d1 | 112 | subql #2,%d1 | |
113 | Lbcalgndl: | 113 | Lbcalgndl: | |
114 | /* compare by 8 longwords */ | 114 | /* compare by 8 longwords */ | |
115 | movl %d1,%d0 | 115 | movl %d1,%d0 | |
116 | lsrl #5,%d0 | cnt = len / 32 | 116 | lsrl #5,%d0 | cnt = len / 32 | |
117 | jeq Lbclong | if (cnt) | 117 | jeq Lbclong | if (cnt) | |
118 | andl #31,%d1 | len %= 32 | 118 | andl #31,%d1 | len %= 32 | |
119 | subql #1,%d0 | set up for dbf | 119 | subql #1,%d0 | set up for dbf | |
120 | Lbc32loop: | 120 | Lbc32loop: | |
121 | cmpml %a0@+,%a1@+ | compare 8 longwords | 121 | cmpml (%a0)+,(%a1)+ | compare 8 longwords | |
122 | jne Lbcnoteq | not equal, return non-zero | 122 | jne Lbcnoteq | not equal, return non-zero | |
123 | cmpml %a0@+,%a1@+ | 123 | cmpml (%a0)+,(%a1)+ | |
124 | jne Lbcnoteq | 124 | jne Lbcnoteq | |
125 | cmpml %a0@+,%a1@+ | 125 | cmpml (%a0)+,(%a1)+ | |
126 | jne Lbcnoteq | 126 | jne Lbcnoteq | |
127 | cmpml %a0@+,%a1@+ | 127 | cmpml (%a0)+,(%a1)+ | |
128 | jne Lbcnoteq | 128 | jne Lbcnoteq | |
129 | cmpml %a0@+,%a1@+ | 129 | cmpml (%a0)+,(%a1)+ | |
130 | jne Lbcnoteq | 130 | jne Lbcnoteq | |
131 | cmpml %a0@+,%a1@+ | 131 | cmpml (%a0)+,(%a1)+ | |
132 | jne Lbcnoteq | 132 | jne Lbcnoteq | |
133 | cmpml %a0@+,%a1@+ | 133 | cmpml (%a0)+,(%a1)+ | |
134 | jne Lbcnoteq | 134 | jne Lbcnoteq | |
135 | cmpml %a0@+,%a1@+ | 135 | cmpml (%a0)+,(%a1)+ | |
136 | jne Lbcnoteq | 136 | jne Lbcnoteq | |
137 | dbf %d0,Lbc32loop | till done | 137 | dbf %d0,Lbc32loop | till done | |
138 | clrw %d0 | 138 | clrw %d0 | |
139 | subql #1,%d0 | 139 | subql #1,%d0 | |
140 | jcc Lbc32loop | 140 | jcc Lbc32loop | |
141 | 141 | |||
142 | Lbclong: | 142 | Lbclong: | |
143 | /* compare by longwords */ | 143 | /* compare by longwords */ | |
144 | movl %d1,%d0 | 144 | movl %d1,%d0 | |
145 | lsrl #2,%d0 | cnt = len / 4 | 145 | lsrl #2,%d0 | cnt = len / 4 | |
146 | jeq Lbcbyte | if (cnt) | 146 | jeq Lbcbyte | if (cnt) | |
147 | subql #1,%d0 | set up for dbf | 147 | subql #1,%d0 | set up for dbf | |
148 | Lbclloop: | 148 | Lbclloop: | |
149 | cmpml %a0@+,%a1@+ | compare a longword | 149 | cmpml (%a0)+,(%a1)+ | compare a longword | |
150 | jne Lbcnoteq | not equal, return non-zero | 150 | jne Lbcnoteq | not equal, return non-zero | |
151 | dbf %d0,Lbclloop | till done | 151 | dbf %d0,Lbclloop | till done | |
152 | andl #3,%d1 | len %= 4 | 152 | andl #3,%d1 | len %= 4 | |
153 | jeq Lbcdone | 153 | jeq Lbcdone | |
154 | 154 | |||
155 | subql #1,%d1 | set up for dbf | 155 | subql #1,%d1 | set up for dbf | |
156 | Lbcbloop: | 156 | Lbcbloop: | |
157 | cmpmb %a0@+,%a1@+ | compare a byte | 157 | cmpmb (%a0)+,(%a1)+ | compare a byte | |
158 | jne Lbcnoteq | not equal, return non-zero | 158 | jne Lbcnoteq | not equal, return non-zero | |
159 | Lbcbyte: | 159 | Lbcbyte: | |
160 | dbf %d1,Lbcbloop | 160 | dbf %d1,Lbcbloop | |
161 | Lbcdone: | 161 | Lbcdone: | |
162 | movql #0,%d0 | 162 | movql #0,%d0 | |
163 | rts | 163 | rts | |
164 | 164 | |||
165 | Lbcnoteq: | 165 | Lbcnoteq: | |
166 | movql #1,%d0 | 166 | movql #1,%d0 | |
167 | rts | 167 | rts |
--- src/common/lib/libc/arch/m68k/string/bcopy.S 2008/04/28 20:22:52 1.2
+++ src/common/lib/libc/arch/m68k/string/bcopy.S 2013/07/16 20:49:41 1.3
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: bcopy.S,v 1.2 2008/04/28 20:22:52 martin Exp $ */ | 1 | /* $NetBSD: bcopy.S,v 1.3 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1997 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1997 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 J.T. Conklin. | 8 | * by J.T. Conklin. | |
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. | |
@@ -58,48 +58,48 @@ | @@ -58,48 +58,48 @@ | |||
58 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 58 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
60 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 60 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
61 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 61 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
62 | * SUCH DAMAGE. | 62 | * SUCH DAMAGE. | |
63 | */ | 63 | */ | |
64 | 64 | |||
65 | #include <machine/asm.h> | 65 | #include <machine/asm.h> | |
66 | 66 | |||
67 | #if defined(LIBC_SCCS) && !defined(lint) | 67 | #if defined(LIBC_SCCS) && !defined(lint) | |
68 | #if 0 | 68 | #if 0 | |
69 | RCSID("from: @(#)bcopy.s 5.1 (Berkeley) 5/12/90") | 69 | RCSID("from: @(#)bcopy.s 5.1 (Berkeley) 5/12/90") | |
70 | #else | 70 | #else | |
71 | RCSID("$NetBSD: bcopy.S,v 1.2 2008/04/28 20:22:52 martin Exp $") | 71 | RCSID("$NetBSD: bcopy.S,v 1.3 2013/07/16 20:49:41 matt Exp $") | |
72 | #endif | 72 | #endif | |
73 | #endif /* LIBC_SCCS and not lint */ | 73 | #endif /* LIBC_SCCS and not lint */ | |
74 | 74 | |||
75 | 75 | |||
76 | #ifdef MEMCOPY | 76 | #ifdef MEMCOPY | |
77 | ENTRY(memcpy) | 77 | ENTRY(memcpy) | |
78 | #else | 78 | #else | |
79 | #ifdef MEMMOVE | 79 | #ifdef MEMMOVE | |
80 | ENTRY(memmove) | 80 | ENTRY(memmove) | |
81 | #else | 81 | #else | |
82 | ENTRY(bcopy) | 82 | ENTRY(bcopy) | |
83 | #endif | 83 | #endif | |
84 | #endif | 84 | #endif | |
85 | #if defined(MEMCOPY) || defined(MEMMOVE) | 85 | #if defined(MEMCOPY) || defined(MEMMOVE) | |
86 | movl %sp@(4),%a1 | dest address | 86 | movl 4(%sp),%a1 | dest address | |
87 | movl %sp@(8),%a0 | src address | 87 | movl 8(%sp),%a0 | src address | |
88 | #else | 88 | #else | |
89 | movl %sp@(4),%a0 | src address | 89 | movl 4(%sp),%a0 | src address | |
90 | movl %sp@(8),%a1 | dest address | 90 | movl 8(%sp),%a1 | dest address | |
91 | #endif | 91 | #endif | |
92 | movl %sp@(12),%d1 | count | 92 | movl 12(%sp),%d1 | count | |
93 | 93 | |||
94 | cmpl %a1,%a0 | src after dest? | 94 | cmpl %a1,%a0 | src after dest? | |
95 | jlt Lbcback | yes, must copy backwards | 95 | jlt Lbcback | yes, must copy backwards | |
96 | 96 | |||
97 | /* | 97 | /* | |
98 | * It isn't worth the overhead of aligning to {long}word boundries | 98 | * It isn't worth the overhead of aligning to {long}word boundries | |
99 | * if the string is too short. | 99 | * if the string is too short. | |
100 | */ | 100 | */ | |
101 | cmpl #8,%d1 | 101 | cmpl #8,%d1 | |
102 | jlt Lbcfbyte | 102 | jlt Lbcfbyte | |
103 | 103 | |||
104 | #ifdef __mc68010__ | 104 | #ifdef __mc68010__ | |
105 | /* | 105 | /* | |
@@ -107,75 +107,75 @@ ENTRY(bcopy) | @@ -107,75 +107,75 @@ ENTRY(bcopy) | |||
107 | * period. If the source and the destination addresses aren't | 107 | * period. If the source and the destination addresses aren't | |
108 | * of the same evenness, we're forced to do a bytewise copy. | 108 | * of the same evenness, we're forced to do a bytewise copy. | |
109 | */ | 109 | */ | |
110 | movl %a0,%d0 | 110 | movl %a0,%d0 | |
111 | addl %a1,%d0 | 111 | addl %a1,%d0 | |
112 | btst #0,%d0 | 112 | btst #0,%d0 | |
113 | jne Lbcfbyte | 113 | jne Lbcfbyte | |
114 | #endif /* __mc68010__ */ | 114 | #endif /* __mc68010__ */ | |
115 | 115 | |||
116 | /* word align */ | 116 | /* word align */ | |
117 | movl %a1,%d0 | 117 | movl %a1,%d0 | |
118 | btst #0,%d0 | if (dst & 1) | 118 | btst #0,%d0 | if (dst & 1) | |
119 | jeq Lbcfalgndw | | 119 | jeq Lbcfalgndw | | |
120 | movb %a0@+,%a1@+ | *(char *)dst++ = *(char *) src++ | 120 | movb (%a0)+,(%a1)+ | *(char *)dst++ = *(char *) src++ | |
121 | subql #1,%d1 | len-- | 121 | subql #1,%d1 | len-- | |
122 | Lbcfalgndw: | 122 | Lbcfalgndw: | |
123 | /* long word align */ | 123 | /* long word align */ | |
124 | btst #1,%d0 | if (dst & 2) | 124 | btst #1,%d0 | if (dst & 2) | |
125 | jeq Lbcfalgndl | 125 | jeq Lbcfalgndl | |
126 | movw %a0@+,%a1@+ | *(short *)dst++ = *(short *) dst++ | 126 | movw (%a0)+,(%a1)+ | *(short *)dst++ = *(short *) dst++ | |
127 | subql #2,%d1 | len -= 2 | 127 | subql #2,%d1 | len -= 2 | |
128 | Lbcfalgndl: | 128 | Lbcfalgndl: | |
129 | /* copy by 8 longwords */ | 129 | /* copy by 8 longwords */ | |
130 | movel %d1,%d0 | 130 | movel %d1,%d0 | |
131 | lsrl #5,%d0 | cnt = len / 32 | 131 | lsrl #5,%d0 | cnt = len / 32 | |
132 | jeq Lbcflong | if (cnt) | 132 | jeq Lbcflong | if (cnt) | |
133 | andl #31,%d1 | len %= 32 | 133 | andl #31,%d1 | len %= 32 | |
134 | subql #1,%d0 | set up for dbf | 134 | subql #1,%d0 | set up for dbf | |
135 | Lbcf32loop: | 135 | Lbcf32loop: | |
136 | movl %a0@+,%a1@+ | copy 8 long words | 136 | movl (%a0)+,(%a1)+ | copy 8 long words | |
137 | movl %a0@+,%a1@+ | 137 | movl (%a0)+,(%a1)+ | |
138 | movl %a0@+,%a1@+ | 138 | movl (%a0)+,(%a1)+ | |
139 | movl %a0@+,%a1@+ | 139 | movl (%a0)+,(%a1)+ | |
140 | movl %a0@+,%a1@+ | 140 | movl (%a0)+,(%a1)+ | |
141 | movl %a0@+,%a1@+ | 141 | movl (%a0)+,(%a1)+ | |
142 | movl %a0@+,%a1@+ | 142 | movl (%a0)+,(%a1)+ | |
143 | movl %a0@+,%a1@+ | 143 | movl (%a0)+,(%a1)+ | |
144 | dbf %d0,Lbcf32loop | till done | 144 | dbf %d0,Lbcf32loop | till done | |
145 | clrw %d0 | 145 | clrw %d0 | |
146 | subql #1,%d0 | 146 | subql #1,%d0 | |
147 | jcc Lbcf32loop | 147 | jcc Lbcf32loop | |
148 | 148 | |||
149 | Lbcflong: | 149 | Lbcflong: | |
150 | /* copy by longwords */ | 150 | /* copy by longwords */ | |
151 | movel %d1,%d0 | 151 | movel %d1,%d0 | |
152 | lsrl #2,%d0 | cnt = len / 4 | 152 | lsrl #2,%d0 | cnt = len / 4 | |
153 | jeq Lbcfbyte | if (cnt) | 153 | jeq Lbcfbyte | if (cnt) | |
154 | subql #1,%d0 | set up for dbf | 154 | subql #1,%d0 | set up for dbf | |
155 | Lbcflloop: | 155 | Lbcflloop: | |
156 | movl %a0@+,%a1@+ | copy longwords | 156 | movl (%a0)+,(%a1)+ | copy longwords | |
157 | dbf %d0,Lbcflloop | til done | 157 | dbf %d0,Lbcflloop | til done | |
158 | andl #3,%d1 | len %= 4 | 158 | andl #3,%d1 | len %= 4 | |
159 | jeq Lbcdone | 159 | jeq Lbcdone | |
160 | 160 | |||
161 | subql #1,%d1 | set up for dbf | 161 | subql #1,%d1 | set up for dbf | |
162 | Lbcfbloop: | 162 | Lbcfbloop: | |
163 | movb %a0@+,%a1@+ | copy bytes | 163 | movb (%a0)+,(%a1)+ | copy bytes | |
164 | Lbcfbyte: | 164 | Lbcfbyte: | |
165 | dbf %d1,Lbcfbloop | till done | 165 | dbf %d1,Lbcfbloop | till done | |
166 | Lbcdone: | 166 | Lbcdone: | |
167 | #if defined(MEMCOPY) || defined(MEMMOVE) | 167 | #if defined(MEMCOPY) || defined(MEMMOVE) | |
168 | movl %sp@(4),%d0 | dest address | 168 | movl 4(%sp),%d0 | dest address | |
169 | #if defined(__SVR4_ABI__) | 169 | #if defined(__SVR4_ABI__) | |
170 | moveal %d0,%a0 | 170 | moveal %d0,%a0 | |
171 | #endif | 171 | #endif | |
172 | #endif | 172 | #endif | |
173 | rts | 173 | rts | |
174 | 174 | |||
175 | 175 | |||
176 | Lbcback: | 176 | Lbcback: | |
177 | addl %d1,%a0 | src pointer to end | 177 | addl %d1,%a0 | src pointer to end | |
178 | addl %d1,%a1 | dest pointer to end | 178 | addl %d1,%a1 | dest pointer to end | |
179 | 179 | |||
180 | /* | 180 | /* | |
181 | * It isn't worth the overhead of aligning to {long}word boundries | 181 | * It isn't worth the overhead of aligning to {long}word boundries | |
@@ -190,67 +190,67 @@ Lbcback: | @@ -190,67 +190,67 @@ Lbcback: | |||
190 | * period. If the source and the destination addresses aren't | 190 | * period. If the source and the destination addresses aren't | |
191 | * of the same evenness, we're forced to do a bytewise copy. | 191 | * of the same evenness, we're forced to do a bytewise copy. | |
192 | */ | 192 | */ | |
193 | movl %a0,%d0 | 193 | movl %a0,%d0 | |
194 | addl %a1,%d0 | 194 | addl %a1,%d0 | |
195 | btst #0,%d0 | 195 | btst #0,%d0 | |
196 | jne Lbcbbyte | 196 | jne Lbcbbyte | |
197 | #endif /* __mc68010__ */ | 197 | #endif /* __mc68010__ */ | |
198 | 198 | |||
199 | /* word align */ | 199 | /* word align */ | |
200 | movl %a1,%d0 | 200 | movl %a1,%d0 | |
201 | btst #0,%d0 | if (dst & 1) | 201 | btst #0,%d0 | if (dst & 1) | |
202 | jeq Lbcbalgndw | | 202 | jeq Lbcbalgndw | | |
203 | movb %a0@-,%a1@- | *(char *)dst-- = *(char *) src-- | 203 | movb -(%a0),-(%a1) | *(char *)dst-- = *(char *) src-- | |
204 | subql #1,%d1 | len-- | 204 | subql #1,%d1 | len-- | |
205 | Lbcbalgndw: | 205 | Lbcbalgndw: | |
206 | /* long word align */ | 206 | /* long word align */ | |
207 | btst #1,%d0 | if (dst & 2) | 207 | btst #1,%d0 | if (dst & 2) | |
208 | jeq Lbcbalgndl | 208 | jeq Lbcbalgndl | |
209 | movw %a0@-,%a1@- | *(short *)dst-- = *(short *) dst-- | 209 | movw -(%a0),-(%a1) | *(short *)dst-- = *(short *) dst-- | |
210 | subql #2,%d1 | len -= 2 | 210 | subql #2,%d1 | len -= 2 | |
211 | Lbcbalgndl: | 211 | Lbcbalgndl: | |
212 | /* copy by 8 longwords */ | 212 | /* copy by 8 longwords */ | |
213 | movel %d1,%d0 | 213 | movel %d1,%d0 | |
214 | lsrl #5,%d0 | cnt = len / 32 | 214 | lsrl #5,%d0 | cnt = len / 32 | |
215 | jeq Lbcblong | if (cnt) | 215 | jeq Lbcblong | if (cnt) | |
216 | andl #31,%d1 | len %= 32 | 216 | andl #31,%d1 | len %= 32 | |
217 | subql #1,%d0 | set up for dbf | 217 | subql #1,%d0 | set up for dbf | |
218 | Lbcb32loop: | 218 | Lbcb32loop: | |
219 | movl %a0@-,%a1@- | copy 8 long words | 219 | movl -(%a0),-(%a1) | copy 8 long words | |
220 | movl %a0@-,%a1@- | 220 | movl -(%a0),-(%a1) | |
221 | movl %a0@-,%a1@- | 221 | movl -(%a0),-(%a1) | |
222 | movl %a0@-,%a1@- | 222 | movl -(%a0),-(%a1) | |
223 | movl %a0@-,%a1@- | 223 | movl -(%a0),-(%a1) | |
224 | movl %a0@-,%a1@- | 224 | movl -(%a0),-(%a1) | |
225 | movl %a0@-,%a1@- | 225 | movl -(%a0),-(%a1) | |
226 | movl %a0@-,%a1@- | 226 | movl -(%a0),-(%a1) | |
227 | dbf %d0,Lbcb32loop | till done | 227 | dbf %d0,Lbcb32loop | till done | |
228 | clrw %d0 | 228 | clrw %d0 | |
229 | subql #1,%d0 | 229 | subql #1,%d0 | |
230 | jcc Lbcb32loop | 230 | jcc Lbcb32loop | |
231 | 231 | |||
232 | Lbcblong: | 232 | Lbcblong: | |
233 | /* copy by longwords */ | 233 | /* copy by longwords */ | |
234 | movel %d1,%d0 | 234 | movel %d1,%d0 | |
235 | lsrl #2,%d0 | cnt = len / 4 | 235 | lsrl #2,%d0 | cnt = len / 4 | |
236 | jeq Lbcbbyte | if (cnt) | 236 | jeq Lbcbbyte | if (cnt) | |
237 | subql #1,%d0 | set up for dbf | 237 | subql #1,%d0 | set up for dbf | |
238 | Lbcblloop: | 238 | Lbcblloop: | |
239 | movl %a0@-,%a1@- | copy longwords | 239 | movl -(%a0),-(%a1) | copy longwords | |
240 | dbf %d0,Lbcblloop | til done | 240 | dbf %d0,Lbcblloop | til done | |
241 | andl #3,%d1 | len %= 4 | 241 | andl #3,%d1 | len %= 4 | |
242 | jeq Lbcdone | 242 | jeq Lbcdone | |
243 | 243 | |||
244 | subql #1,%d1 | set up for dbf | 244 | subql #1,%d1 | set up for dbf | |
245 | Lbcbbloop: | 245 | Lbcbbloop: | |
246 | movb %a0@-,%a1@- | copy bytes | 246 | movb -(%a0),-(%a1) | copy bytes | |
247 | Lbcbbyte: | 247 | Lbcbbyte: | |
248 | dbf %d1,Lbcbbloop | till done | 248 | dbf %d1,Lbcbbloop | till done | |
249 | 249 | |||
250 | #if defined(MEMCOPY) || defined(MEMMOVE) | 250 | #if defined(MEMCOPY) || defined(MEMMOVE) | |
251 | movl %sp@(4),%d0 | dest address | 251 | movl 4(%sp),%d0 | dest address | |
252 | #if defined(__SVR4_ABI__) | 252 | #if defined(__SVR4_ABI__) | |
253 | moveal %d0,%a0 | 253 | moveal %d0,%a0 | |
254 | #endif | 254 | #endif | |
255 | #endif | 255 | #endif | |
256 | rts | 256 | rts |
--- src/common/lib/libc/arch/m68k/string/bzero.S 2008/04/28 20:22:52 1.2
+++ src/common/lib/libc/arch/m68k/string/bzero.S 2013/07/16 20:49:41 1.3
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: bzero.S,v 1.2 2008/04/28 20:22:52 martin Exp $ */ | 1 | /* $NetBSD: bzero.S,v 1.3 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1997 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1997 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 J.T. Conklin. | 8 | * by J.T. Conklin. | |
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. | |
@@ -58,84 +58,84 @@ | @@ -58,84 +58,84 @@ | |||
58 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 58 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
60 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 60 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
61 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 61 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
62 | * SUCH DAMAGE. | 62 | * SUCH DAMAGE. | |
63 | */ | 63 | */ | |
64 | 64 | |||
65 | #include <machine/asm.h> | 65 | #include <machine/asm.h> | |
66 | 66 | |||
67 | #if defined(LIBC_SCCS) && !defined(lint) | 67 | #if defined(LIBC_SCCS) && !defined(lint) | |
68 | #if 0 | 68 | #if 0 | |
69 | RCSID("from: @(#)bzero.s 5.1 (Berkeley) 5/12/90") | 69 | RCSID("from: @(#)bzero.s 5.1 (Berkeley) 5/12/90") | |
70 | #else | 70 | #else | |
71 | RCSID("$NetBSD: bzero.S,v 1.2 2008/04/28 20:22:52 martin Exp $") | 71 | RCSID("$NetBSD: bzero.S,v 1.3 2013/07/16 20:49:41 matt Exp $") | |
72 | #endif | 72 | #endif | |
73 | #endif /* LIBC_SCCS and not lint */ | 73 | #endif /* LIBC_SCCS and not lint */ | |
74 | 74 | |||
75 | ENTRY(bzero) | 75 | ENTRY(bzero) | |
76 | movl %d2,%sp@- | 76 | movl %d2,-(%sp) | |
77 | movl %sp@(8),%a0 | destination | 77 | movl 8(%sp),%a0 | destination | |
78 | movl %sp@(12),%d1 | count | 78 | movl 12(%sp),%d1 | count | |
79 | 79 | |||
80 | movql #0,%d2 | 80 | movql #0,%d2 | |
81 | 81 | |||
82 | /* | 82 | /* | |
83 | * It isn't worth the overhead of aligning to {long}word boundries | 83 | * It isn't worth the overhead of aligning to {long}word boundries | |
84 | * if the string is too short. | 84 | * if the string is too short. | |
85 | */ | 85 | */ | |
86 | cmpl #8,%d1 | 86 | cmpl #8,%d1 | |
87 | jlt Lbzbyte | 87 | jlt Lbzbyte | |
88 | 88 | |||
89 | /* word align */ | 89 | /* word align */ | |
90 | movl %a0,%d0 | 90 | movl %a0,%d0 | |
91 | btst #0,%d0 | if (dst & 1) | 91 | btst #0,%d0 | if (dst & 1) | |
92 | jeq Lbzalgndw | | 92 | jeq Lbzalgndw | | |
93 | movb %d2,%a0@+ | *(char *)dst++ = 0 | 93 | movb %d2,(%a0)+ | *(char *)dst++ = 0 | |
94 | subql #1,%d1 | len-- | 94 | subql #1,%d1 | len-- | |
95 | Lbzalgndw: | 95 | Lbzalgndw: | |
96 | /* long word align */ | 96 | /* long word align */ | |
97 | btst #1,%d0 | if (dst & 2) | 97 | btst #1,%d0 | if (dst & 2) | |
98 | jeq Lbzalgndl | | 98 | jeq Lbzalgndl | | |
99 | movw %d2,%a0@+ | *(short *)dst++ = 0 | 99 | movw %d2,(%a0)+ | *(short *)dst++ = 0 | |
100 | subql #2,%d1 | len -= 2 | 100 | subql #2,%d1 | len -= 2 | |
101 | Lbzalgndl: | 101 | Lbzalgndl: | |
102 | /* zero by 8 longwords */ | 102 | /* zero by 8 longwords */ | |
103 | movel %d1,%d0 | 103 | movel %d1,%d0 | |
104 | lsrl #5,%d0 | cnt = len / 32 | 104 | lsrl #5,%d0 | cnt = len / 32 | |
105 | jeq Lbzlong | if (cnt) | 105 | jeq Lbzlong | if (cnt) | |
106 | andl #31,%d1 | len %= 32 | 106 | andl #31,%d1 | len %= 32 | |
107 | subql #1,%d0 | set up for dbf | 107 | subql #1,%d0 | set up for dbf | |
108 | Lbz32loop: | 108 | Lbz32loop: | |
109 | movl %d2,%a0@+ | zero 8 long words | 109 | movl %d2,(%a0)+ | zero 8 long words | |
110 | movl %d2,%a0@+ | 110 | movl %d2,(%a0)+ | |
111 | movl %d2,%a0@+ | 111 | movl %d2,(%a0)+ | |
112 | movl %d2,%a0@+ | 112 | movl %d2,(%a0)+ | |
113 | movl %d2,%a0@+ | 113 | movl %d2,(%a0)+ | |
114 | movl %d2,%a0@+ | 114 | movl %d2,(%a0)+ | |
115 | movl %d2,%a0@+ | 115 | movl %d2,(%a0)+ | |
116 | movl %d2,%a0@+ | 116 | movl %d2,(%a0)+ | |
117 | dbf %d0,Lbz32loop | till done | 117 | dbf %d0,Lbz32loop | till done | |
118 | clrw %d0 | 118 | clrw %d0 | |
119 | subql #1,%d0 | 119 | subql #1,%d0 | |
120 | jcc Lbz32loop | 120 | jcc Lbz32loop | |
121 | 121 | |||
122 | Lbzlong: | 122 | Lbzlong: | |
123 | /* copy by longwords */ | 123 | /* copy by longwords */ | |
124 | movel %d1,%d0 | 124 | movel %d1,%d0 | |
125 | lsrl #2,%d0 | cnt = len / 4 | 125 | lsrl #2,%d0 | cnt = len / 4 | |
126 | jeq Lbzbyte | if (cnt) | 126 | jeq Lbzbyte | if (cnt) | |
127 | subql #1,%d0 | set up for dbf | 127 | subql #1,%d0 | set up for dbf | |
128 | Lbzlloop: | 128 | Lbzlloop: | |
129 | movl %d2,%a0@+ | clear longwords | 129 | movl %d2,(%a0)+ | clear longwords | |
130 | dbf %d0,Lbzlloop | till done | 130 | dbf %d0,Lbzlloop | till done | |
131 | andl #3,%d1 | len %= 4 | 131 | andl #3,%d1 | len %= 4 | |
132 | jeq Lbzdone | 132 | jeq Lbzdone | |
133 | 133 | |||
134 | subql #1,%d1 | set up for dbf | 134 | subql #1,%d1 | set up for dbf | |
135 | Lbzbloop: | 135 | Lbzbloop: | |
136 | movb %d2,%a0@+ | zero bytes | 136 | movb %d2,(%a0)+ | zero bytes | |
137 | Lbzbyte: | 137 | Lbzbyte: | |
138 | dbf %d1,Lbzbloop | till done | 138 | dbf %d1,Lbzbloop | till done | |
139 | Lbzdone: | 139 | Lbzdone: | |
140 | movl %sp@+,%d2 | 140 | movl (%sp)+,%d2 | |
141 | rts | 141 | rts |
--- src/common/lib/libc/arch/m68k/string/ffs.S 2011/07/09 14:57:29 1.2
+++ src/common/lib/libc/arch/m68k/string/ffs.S 2013/07/16 20:49:41 1.3
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ffs.S,v 1.2 2011/07/09 14:57:29 mrg Exp $ */ | 1 | /* $NetBSD: ffs.S,v 1.3 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,48 +29,48 @@ | @@ -29,48 +29,48 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)ffs.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)ffs.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: ffs.S,v 1.2 2011/07/09 14:57:29 mrg Exp $") | 42 | RCSID("$NetBSD: ffs.S,v 1.3 2013/07/16 20:49:41 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* bit = ffs(value) */ | 46 | /* bit = ffs(value) */ | |
47 | 47 | |||
48 | WEAK_ALIAS(__ffssi2,ffs) | 48 | WEAK_ALIAS(__ffssi2,ffs) | |
49 | 49 | |||
50 | #ifndef __mc68010__ | 50 | #ifndef __mc68010__ | |
51 | 51 | |||
52 | ENTRY(ffs) | 52 | ENTRY(ffs) | |
53 | movl %sp@(4),%d0 | 53 | movl 4(%sp),%d0 | |
54 | movl %d0,%d1 | 54 | movl %d0,%d1 | |
55 | negl %d0 | 55 | negl %d0 | |
56 | andl %d0,%d1 | 56 | andl %d0,%d1 | |
57 | movql #32,%d0 | 57 | movql #32,%d0 | |
58 | bfffo %d1{#0:#32},%d1 | 58 | bfffo %d1{#0:#32},%d1 | |
59 | subl %d1,%d0 | 59 | subl %d1,%d0 | |
60 | rts | 60 | rts | |
61 | 61 | |||
62 | #else /* __mc68010__ */ | 62 | #else /* __mc68010__ */ | |
63 | 63 | |||
64 | ENTRY(ffs) | 64 | ENTRY(ffs) | |
65 | movl %sp@(4),%d0 | 65 | movl 4(%sp),%d0 | |
66 | jeq L2 | 66 | jeq L2 | |
67 | movql #31,%d1 | 67 | movql #31,%d1 | |
68 | L1: | 68 | L1: | |
69 | lsrl #1,%d0 | 69 | lsrl #1,%d0 | |
70 | dbcs %d1,L1 | 70 | dbcs %d1,L1 | |
71 | movql #32,%d0 | 71 | movql #32,%d0 | |
72 | subl %d1,%d0 | 72 | subl %d1,%d0 | |
73 | L2: | 73 | L2: | |
74 | rts | 74 | rts | |
75 | 75 | |||
76 | #endif /* __mc68010__ */ | 76 | #endif /* __mc68010__ */ |
--- src/common/lib/libc/arch/m68k/string/memset.S 2008/04/28 20:22:52 1.2
+++ src/common/lib/libc/arch/m68k/string/memset.S 2013/07/16 20:49:41 1.3
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: memset.S,v 1.2 2008/04/28 20:22:52 martin Exp $ */ | 1 | /* $NetBSD: memset.S,v 1.3 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1997 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1997 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 J.T. Conklin. | 8 | * by J.T. Conklin. | |
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. | |
@@ -58,105 +58,105 @@ | @@ -58,105 +58,105 @@ | |||
58 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 58 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
60 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 60 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
61 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 61 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
62 | * SUCH DAMAGE. | 62 | * SUCH DAMAGE. | |
63 | */ | 63 | */ | |
64 | 64 | |||
65 | #include <machine/asm.h> | 65 | #include <machine/asm.h> | |
66 | 66 | |||
67 | #if defined(LIBC_SCCS) && !defined(lint) | 67 | #if defined(LIBC_SCCS) && !defined(lint) | |
68 | #if 0 | 68 | #if 0 | |
69 | RCSID("from: @(#)bzero.s 5.1 (Berkeley) 5/12/90") | 69 | RCSID("from: @(#)bzero.s 5.1 (Berkeley) 5/12/90") | |
70 | #else | 70 | #else | |
71 | RCSID("$NetBSD: memset.S,v 1.2 2008/04/28 20:22:52 martin Exp $") | 71 | RCSID("$NetBSD: memset.S,v 1.3 2013/07/16 20:49:41 matt Exp $") | |
72 | #endif | 72 | #endif | |
73 | #endif /* LIBC_SCCS and not lint */ | 73 | #endif /* LIBC_SCCS and not lint */ | |
74 | 74 | |||
75 | ENTRY(memset) | 75 | ENTRY(memset) | |
76 | movl %d2,%sp@- | 76 | movl %d2,-(%sp) | |
77 | movl %sp@(8),%a0 | destination | 77 | movl 8(%sp),%a0 | destination | |
78 | movl %sp@(16),%d1 | count | 78 | movl 16(%sp),%d1 | count | |
79 | movb %sp@(15),%d2 | character | 79 | movb 15(%sp),%d2 | character | |
80 | 80 | |||
81 | /* | 81 | /* | |
82 | * It isn't worth the overhead of aligning to {long}word boundries | 82 | * It isn't worth the overhead of aligning to {long}word boundries | |
83 | * if the string is too short. | 83 | * if the string is too short. | |
84 | */ | 84 | */ | |
85 | cmpl #15,%d1 | 85 | cmpl #15,%d1 | |
86 | jlt Lbzbyte | 86 | jlt Lbzbyte | |
87 | 87 | |||
88 | clrl %d0 | replicate byte to fill longword | 88 | clrl %d0 | replicate byte to fill longword | |
89 | movb %d2,%d0 | 89 | movb %d2,%d0 | |
90 | movl %d0,%d2 | 90 | movl %d0,%d2 | |
91 | lsll #8,%d0 | 91 | lsll #8,%d0 | |
92 | orl %d0,%d2 | 92 | orl %d0,%d2 | |
93 | lsll #8,%d0 | 93 | lsll #8,%d0 | |
94 | orl %d0,%d2 | 94 | orl %d0,%d2 | |
95 | lsll #8,%d0 | 95 | lsll #8,%d0 | |
96 | orl %d0,%d2 | 96 | orl %d0,%d2 | |
97 | 97 | |||
98 | /* word align */ | 98 | /* word align */ | |
99 | movl %a0,%d0 | 99 | movl %a0,%d0 | |
100 | btst #0,%d0 | if (dst & 1) | 100 | btst #0,%d0 | if (dst & 1) | |
101 | jeq Lbzalgndw | | 101 | jeq Lbzalgndw | | |
102 | movb %d2,%a0@+ | *(char *)dst++ = X | 102 | movb %d2,(%a0)+ | *(char *)dst++ = X | |
103 | subql #1,%d1 | len-- | 103 | subql #1,%d1 | len-- | |
104 | addql #1,%d0 | 104 | addql #1,%d0 | |
105 | Lbzalgndw: | 105 | Lbzalgndw: | |
106 | #ifndef __mc68010__ | 106 | #ifndef __mc68010__ | |
107 | /* long word align */ | 107 | /* long word align */ | |
108 | btst #1,%d0 | if (dst & 2) | 108 | btst #1,%d0 | if (dst & 2) | |
109 | jeq Lbzalgndl | | 109 | jeq Lbzalgndl | | |
110 | movw %d2,%a0@+ | *(short *)dst++ = X | 110 | movw %d2,(%a0)+ | *(short *)dst++ = X | |
111 | subql #2,%d1 | len -= 2 | 111 | subql #2,%d1 | len -= 2 | |
112 | Lbzalgndl: | 112 | Lbzalgndl: | |
113 | /* set by 8 longwords */ | 113 | /* set by 8 longwords */ | |
114 | movel %d1,%d0 | 114 | movel %d1,%d0 | |
115 | lsrl #5,%d0 | cnt = len / 32 | 115 | lsrl #5,%d0 | cnt = len / 32 | |
116 | jeq Lbzlong | if (cnt) | 116 | jeq Lbzlong | if (cnt) | |
117 | andl #31,%d1 | len %= 32 | 117 | andl #31,%d1 | len %= 32 | |
118 | subql #1,%d0 | set up for dbf | 118 | subql #1,%d0 | set up for dbf | |
119 | Lbz32loop: | 119 | Lbz32loop: | |
120 | movl %d2,%a0@+ | set 8 long words | 120 | movl %d2,(%a0)+ | set 8 long words | |
121 | movl %d2,%a0@+ | 121 | movl %d2,(%a0)+ | |
122 | movl %d2,%a0@+ | 122 | movl %d2,(%a0)+ | |
123 | movl %d2,%a0@+ | 123 | movl %d2,(%a0)+ | |
124 | movl %d2,%a0@+ | 124 | movl %d2,(%a0)+ | |
125 | movl %d2,%a0@+ | 125 | movl %d2,(%a0)+ | |
126 | movl %d2,%a0@+ | 126 | movl %d2,(%a0)+ | |
127 | movl %d2,%a0@+ | 127 | movl %d2,(%a0)+ | |
128 | dbf %d0,Lbz32loop | till done | 128 | dbf %d0,Lbz32loop | till done | |
129 | clrw %d0 | 129 | clrw %d0 | |
130 | subql #1,%d0 | 130 | subql #1,%d0 | |
131 | jcc Lbz32loop | 131 | jcc Lbz32loop | |
132 | #endif /* !__mc68010__ */ | 132 | #endif /* !__mc68010__ */ | |
133 | 133 | |||
134 | Lbzlong: | 134 | Lbzlong: | |
135 | /* set by longwords */ | 135 | /* set by longwords */ | |
136 | movel %d1,%d0 | 136 | movel %d1,%d0 | |
137 | lsrl #2,%d0 | cnt = len / 4 | 137 | lsrl #2,%d0 | cnt = len / 4 | |
138 | jeq Lbzbyte | if (cnt) | 138 | jeq Lbzbyte | if (cnt) | |
139 | subql #1,%d0 | set up for dbf | 139 | subql #1,%d0 | set up for dbf | |
140 | Lbzlloop: | 140 | Lbzlloop: | |
141 | movl %d2,%a0@+ | clear longwords | 141 | movl %d2,(%a0)+ | clear longwords | |
142 | dbf %d0,Lbzlloop | till done | 142 | dbf %d0,Lbzlloop | till done | |
143 | #ifdef __mc68010__ | 143 | #ifdef __mc68010__ | |
144 | clrw %d0 | 144 | clrw %d0 | |
145 | subql #1,%d0 | 145 | subql #1,%d0 | |
146 | jcc Lbzlloop | 146 | jcc Lbzlloop | |
147 | #endif /* __mc68010__ */ | 147 | #endif /* __mc68010__ */ | |
148 | andl #3,%d1 | len %= 4 | 148 | andl #3,%d1 | len %= 4 | |
149 | jeq Lbzdone | 149 | jeq Lbzdone | |
150 | 150 | |||
151 | subql #1,%d1 | set up for dbf | 151 | subql #1,%d1 | set up for dbf | |
152 | Lbzbloop: | 152 | Lbzbloop: | |
153 | movb %d2,%a0@+ | set bytes | 153 | movb %d2,(%a0)+ | set bytes | |
154 | Lbzbyte: | 154 | Lbzbyte: | |
155 | dbf %d1,Lbzbloop | till done | 155 | dbf %d1,Lbzbloop | till done | |
156 | Lbzdone: | 156 | Lbzdone: | |
157 | movl %sp@(8),%d0 | return destination | 157 | movl 8(%sp),%d0 | return destination | |
158 | #ifdef __SVR4_ABI__ | 158 | #ifdef __SVR4_ABI__ | |
159 | moveal %d0,%a0 | 159 | moveal %d0,%a0 | |
160 | #endif | 160 | #endif | |
161 | movl %sp@+,%d2 | 161 | movl (%sp)+,%d2 | |
162 | rts | 162 | rts |
--- src/common/lib/libc/arch/m68k/string/strchr.S 2009/07/17 19:37:57 1.2
+++ src/common/lib/libc/arch/m68k/string/strchr.S 2013/07/16 20:49:41 1.3
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: strchr.S,v 1.2 2009/07/17 19:37:57 dsl Exp $ */ | 1 | /* $NetBSD: strchr.S,v 1.3 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,35 +29,35 @@ | @@ -29,35 +29,35 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)index.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)index.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: strchr.S,v 1.2 2009/07/17 19:37:57 dsl Exp $") | 42 | RCSID("$NetBSD: strchr.S,v 1.3 2013/07/16 20:49:41 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | ENTRY(strchr) | 46 | ENTRY(strchr) | |
47 | movl %sp@(4),%a0 | string | 47 | movl 4(%sp),%a0 | string | |
48 | movb %sp@(11),%d0 | char to look for | 48 | movb 11(%sp),%d0 | char to look for | |
49 | ixloop: | 49 | ixloop: | |
50 | cmpb %a0@,%d0 | found our char? | 50 | cmpb (%a0),%d0 | found our char? | |
51 | jeq ixfound | yes, break out | 51 | jeq ixfound | yes, break out | |
52 | tstb %a0@+ | null? | 52 | tstb (%a0)+ | null? | |
53 | jne ixloop | no, keep going | 53 | jne ixloop | no, keep going | |
54 | moveq #0,%d0 | not found, return null | 54 | moveq #0,%d0 | not found, return null | |
55 | #ifdef __SVR4_ABI__ | 55 | #ifdef __SVR4_ABI__ | |
56 | moveal %d0,%a0 | 56 | moveal %d0,%a0 | |
57 | #endif | 57 | #endif | |
58 | rts | 58 | rts | |
59 | ixfound: | 59 | ixfound: | |
60 | movl %a0,%d0 | found, return pointer | 60 | movl %a0,%d0 | found, return pointer | |
61 | rts | 61 | rts | |
62 | 62 | |||
63 | STRONG_ALIAS(index,strchr) | 63 | STRONG_ALIAS(index,strchr) |
--- src/common/lib/libc/arch/m68k/string/strcmp.S 2008/04/28 20:22:52 1.2
+++ src/common/lib/libc/arch/m68k/string/strcmp.S 2013/07/16 20:49:41 1.3
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: strcmp.S,v 1.2 2008/04/28 20:22:52 martin Exp $ */ | 1 | /* $NetBSD: strcmp.S,v 1.3 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1997 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1997 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 Hiroshi Horimoto <horimoto@cs-aoi.cs.sist.ac.jp> and | 8 | * by Hiroshi Horimoto <horimoto@cs-aoi.cs.sist.ac.jp> and | |
9 | * by J.T. Conklin <jtc@NetBSD.org>. | 9 | * by J.T. Conklin <jtc@NetBSD.org>. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -23,49 +23,49 @@ | @@ -23,49 +23,49 @@ | |||
23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
24 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 24 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
26 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 26 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
30 | * POSSIBILITY OF SUCH DAMAGE. | 30 | * POSSIBILITY OF SUCH DAMAGE. | |
31 | */ | 31 | */ | |
32 | 32 | |||
33 | #include <machine/asm.h> | 33 | #include <machine/asm.h> | |
34 | 34 | |||
35 | #if defined(LIBC_SCCS) && !defined(lint) | 35 | #if defined(LIBC_SCCS) && !defined(lint) | |
36 | RCSID("$NetBSD: strcmp.S,v 1.2 2008/04/28 20:22:52 martin Exp $") | 36 | RCSID("$NetBSD: strcmp.S,v 1.3 2013/07/16 20:49:41 matt Exp $") | |
37 | #endif /* LIBC_SCCS and not lint */ | 37 | #endif /* LIBC_SCCS and not lint */ | |
38 | 38 | |||
39 | ENTRY(strcmp) | 39 | ENTRY(strcmp) | |
40 | movl %sp@(4),%a0 | 40 | movl 4(%sp),%a0 | |
41 | movl %sp@(8),%a1 | 41 | movl 8(%sp),%a1 | |
42 | L1: /* unrolled by 4 for 680[23]0's */ | 42 | L1: /* unrolled by 4 for 680[23]0's */ | |
43 | movb %a0@+,%d1 | 43 | movb (%a0)+,%d1 | |
44 | jeq L2 | 44 | jeq L2 | |
45 | subb %a1@+,%d1 | 45 | subb (%a1)+,%d1 | |
46 | jne L3 | 46 | jne L3 | |
47 | 47 | |||
48 | movb %a0@+,%d1 | 48 | movb (%a0)+,%d1 | |
49 | jeq L2 | 49 | jeq L2 | |
50 | subb %a1@+,%d1 | 50 | subb (%a1)+,%d1 | |
51 | jne L3 | 51 | jne L3 | |
52 | 52 | |||
53 | movb %a0@+,%d1 | 53 | movb (%a0)+,%d1 | |
54 | jeq L2 | 54 | jeq L2 | |
55 | subb %a1@+,%d1 | 55 | subb (%a1)+,%d1 | |
56 | jne L3 | 56 | jne L3 | |
57 | 57 | |||
58 | movb %a0@+,%d1 | 58 | movb (%a0)+,%d1 | |
59 | jeq L2 | 59 | jeq L2 | |
60 | subb %a1@+,%d1 | 60 | subb (%a1)+,%d1 | |
61 | jeq L1 | 61 | jeq L1 | |
62 | 62 | |||
63 | L3: scs %d0 | 63 | L3: scs %d0 | |
64 | EXTBL(%d0) | 64 | EXTBL(%d0) | |
65 | movb %d1,%d0 | 65 | movb %d1,%d0 | |
66 | rts | 66 | rts | |
67 | 67 | |||
68 | L2: movq #0,%d0 | 68 | L2: movq #0,%d0 | |
69 | movb %a1@,%d0 | 69 | movb (%a1),%d0 | |
70 | negl %d0 | 70 | negl %d0 | |
71 | rts | 71 | rts |
--- src/common/lib/libc/arch/m68k/string/strncmp.S 2008/04/28 20:22:52 1.2
+++ src/common/lib/libc/arch/m68k/string/strncmp.S 2013/07/16 20:49:42 1.3
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: strncmp.S,v 1.2 2008/04/28 20:22:52 martin Exp $ */ | 1 | /* $NetBSD: strncmp.S,v 1.3 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1997 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1997 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 Hiroshi Horimoto <horimoto@cs-aoi.cs.sist.ac.jp> and | 8 | * by Hiroshi Horimoto <horimoto@cs-aoi.cs.sist.ac.jp> and | |
9 | * by J.T. Conklin <jtc@NetBSD.org>. | 9 | * by J.T. Conklin <jtc@NetBSD.org>. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -23,56 +23,56 @@ | @@ -23,56 +23,56 @@ | |||
23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
24 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 24 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
26 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 26 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
30 | * POSSIBILITY OF SUCH DAMAGE. | 30 | * POSSIBILITY OF SUCH DAMAGE. | |
31 | */ | 31 | */ | |
32 | 32 | |||
33 | #include <machine/asm.h> | 33 | #include <machine/asm.h> | |
34 | 34 | |||
35 | #if defined(LIBC_SCCS) && !defined(lint) | 35 | #if defined(LIBC_SCCS) && !defined(lint) | |
36 | RCSID("$NetBSD: strncmp.S,v 1.2 2008/04/28 20:22:52 martin Exp $") | 36 | RCSID("$NetBSD: strncmp.S,v 1.3 2013/07/16 20:49:42 matt Exp $") | |
37 | #endif /* LIBC_SCCS and not lint */ | 37 | #endif /* LIBC_SCCS and not lint */ | |
38 | 38 | |||
39 | ENTRY(strncmp) | 39 | ENTRY(strncmp) | |
40 | movl %sp@(12),%d0 | 40 | movl 12(%sp),%d0 | |
41 | jeq L4 | 41 | jeq L4 | |
42 | movl %sp@(4),%a0 | 42 | movl 4(%sp),%a0 | |
43 | movl %sp@(8),%a1 | 43 | movl 8(%sp),%a1 | |
44 | L1: /* unroll by 4 for m680[23]0's */ | 44 | L1: /* unroll by 4 for m680[23]0's */ | |
45 | movb %a0@+,%d1 | 45 | movb (%a0)+,%d1 | |
46 | jeq L2 | 46 | jeq L2 | |
47 | subb %a1@+,%d1 | 47 | subb (%a1)+,%d1 | |
48 | jne L3 | 48 | jne L3 | |
49 | subql #1,%d0 | 49 | subql #1,%d0 | |
50 | jeq L4 | 50 | jeq L4 | |
51 | 51 | |||
52 | movb %a0@+,%d1 | 52 | movb (%a0)+,%d1 | |
53 | jeq L2 | 53 | jeq L2 | |
54 | subb %a1@+,%d1 | 54 | subb (%a1)+,%d1 | |
55 | jne L3 | 55 | jne L3 | |
56 | subql #1,%d0 | 56 | subql #1,%d0 | |
57 | jeq L4 | 57 | jeq L4 | |
58 | 58 | |||
59 | movb %a0@+,%d1 | 59 | movb (%a0)+,%d1 | |
60 | jeq L2 | 60 | jeq L2 | |
61 | subb %a1@+,%d1 | 61 | subb (%a1)+,%d1 | |
62 | jne L3 | 62 | jne L3 | |
63 | subql #1,%d0 | 63 | subql #1,%d0 | |
64 | jeq L4 | 64 | jeq L4 | |
65 | 65 | |||
66 | movb %a0@+,%d1 | 66 | movb (%a0)+,%d1 | |
67 | jeq L2 | 67 | jeq L2 | |
68 | subb %a1@+,%d1 | 68 | subb (%a1)+,%d1 | |
69 | jne L3 | 69 | jne L3 | |
70 | subql #1,%d0 | 70 | subql #1,%d0 | |
71 | jne L1 | 71 | jne L1 | |
72 | L4: rts | 72 | L4: rts | |
73 | 73 | |||
74 | L2: subb %a1@,%d1 | 74 | L2: subb (%a1),%d1 | |
75 | L3: scs %d0 | 75 | L3: scs %d0 | |
76 | EXTBL(%d0) | 76 | EXTBL(%d0) | |
77 | movb %d1,%d0 | 77 | movb %d1,%d0 | |
78 | rts | 78 | rts |
--- src/common/lib/libc/arch/m68k/string/strrchr.S 2009/07/17 19:37:57 1.2
+++ src/common/lib/libc/arch/m68k/string/strrchr.S 2013/07/16 20:49:42 1.3
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: strrchr.S,v 1.2 2009/07/17 19:37:57 dsl Exp $ */ | 1 | /* $NetBSD: strrchr.S,v 1.3 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,32 +29,32 @@ | @@ -29,32 +29,32 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)rindex.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)rindex.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: strrchr.S,v 1.2 2009/07/17 19:37:57 dsl Exp $") | 42 | RCSID("$NetBSD: strrchr.S,v 1.3 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | ENTRY(strrchr) | 46 | ENTRY(strrchr) | |
47 | movl %sp@(4),%a1 | string | 47 | movl 4(%sp),%a1 | string | |
48 | movb %sp@(11),%d0 | char to look for | 48 | movb 11(%sp),%d0 | char to look for | |
49 | subl %a0,%a0 | clear rindex pointer | 49 | subl %a0,%a0 | clear rindex pointer | |
50 | rixloop: | 50 | rixloop: | |
51 | cmpb %a1@,%d0 | found our char? | 51 | cmpb (%a1),%d0 | found our char? | |
52 | jne rixnope | no, check for null | 52 | jne rixnope | no, check for null | |
53 | movl %a1,%a0 | yes, remember location | 53 | movl %a1,%a0 | yes, remember location | |
54 | rixnope: | 54 | rixnope: | |
55 | tstb %a1@+ | null? | 55 | tstb (%a1)+ | null? | |
56 | jne rixloop | no, keep going | 56 | jne rixloop | no, keep going | |
57 | movl %a0,%d0 | return value | 57 | movl %a0,%d0 | return value | |
58 | rts | 58 | rts | |
59 | 59 | |||
60 | STRONG_ALIAS(rindex,strrchr) | 60 | STRONG_ALIAS(rindex,strrchr) |
--- src/common/lib/libc/arch/m68k/string/memcmp.S 2005/12/20 19:28:49 1.1
+++ src/common/lib/libc/arch/m68k/string/memcmp.S 2013/07/16 20:49:41 1.2
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: memcmp.S,v 1.1 2005/12/20 19:28:49 christos Exp $ */ | 1 | /* $NetBSD: memcmp.S,v 1.2 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,72 +29,72 @@ | @@ -29,72 +29,72 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)bcmp.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)bcmp.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: memcmp.S,v 1.1 2005/12/20 19:28:49 christos Exp $") | 42 | RCSID("$NetBSD: memcmp.S,v 1.2 2013/07/16 20:49:41 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* memcmp(s1, s2, n) */ | 46 | /* memcmp(s1, s2, n) */ | |
47 | 47 | |||
48 | /* | 48 | /* | |
49 | * This is probably not the best we can do, but it is still 2-10 times | 49 | * This is probably not the best we can do, but it is still 2-10 times | |
50 | * faster than the C version in the portable gen directory. | 50 | * faster than the C version in the portable gen directory. | |
51 | * | 51 | * | |
52 | * Things that might help: | 52 | * Things that might help: | |
53 | * - longword align when possible (only on the 68020) | 53 | * - longword align when possible (only on the 68020) | |
54 | * - use nested DBcc instructions or use one and limit size to 64K | 54 | * - use nested DBcc instructions or use one and limit size to 64K | |
55 | */ | 55 | */ | |
56 | ENTRY(memcmp) | 56 | ENTRY(memcmp) | |
57 | movl %sp@(4),%a0 | string 1 | 57 | movl 4(%sp),%a0 | string 1 | |
58 | movl %sp@(8),%a1 | string 2 | 58 | movl 8(%sp),%a1 | string 2 | |
59 | movl %sp@(12),%d0 | length | 59 | movl 12(%sp),%d0 | length | |
60 | jeq bcdone | if zero, nothing to do | 60 | jeq bcdone | if zero, nothing to do | |
61 | movl %a0,%d1 | 61 | movl %a0,%d1 | |
62 | btst #0,%d1 | string 1 address odd? | 62 | btst #0,%d1 | string 1 address odd? | |
63 | jeq bceven | no, skip alignment | 63 | jeq bceven | no, skip alignment | |
64 | cmpmb %a0@+,%a1@+ | yes, compare a byte | 64 | cmpmb (%a0)+,(%a1)+ | yes, compare a byte | |
65 | jne bcnoteq | not equal, return non-zero | 65 | jne bcnoteq | not equal, return non-zero | |
66 | subql #1,%d0 | adjust count | 66 | subql #1,%d0 | adjust count | |
67 | jeq bcdone | count 0, reutrn zero | 67 | jeq bcdone | count 0, reutrn zero | |
68 | bceven: | 68 | bceven: | |
69 | movl %a1,%d1 | 69 | movl %a1,%d1 | |
70 | btst #0,%d1 | string 2 address odd? | 70 | btst #0,%d1 | string 2 address odd? | |
71 | jne bcbloop | yes, no hope for alignment, compare bytes | 71 | jne bcbloop | yes, no hope for alignment, compare bytes | |
72 | movl %d0,%d1 | no, both even | 72 | movl %d0,%d1 | no, both even | |
73 | lsrl #2,%d1 | convert count to longword count | 73 | lsrl #2,%d1 | convert count to longword count | |
74 | jeq bcbloop | count 0, skip longword loop | 74 | jeq bcbloop | count 0, skip longword loop | |
75 | bclloop: | 75 | bclloop: | |
76 | cmpml %a0@+,%a1@+ | compare a longword | 76 | cmpml (%a0)+,(%a1)+ | compare a longword | |
77 | jne bcnoteql | not equal, return non-zero | 77 | jne bcnoteql | not equal, return non-zero | |
78 | subql #1,%d1 | adjust count | 78 | subql #1,%d1 | adjust count | |
79 | jne bclloop | still more, keep comparing | 79 | jne bclloop | still more, keep comparing | |
80 | andl #3,%d0 | what remains | 80 | andl #3,%d0 | what remains | |
81 | jeq bcdone | nothing, all done | 81 | jeq bcdone | nothing, all done | |
82 | bcbloop: | 82 | bcbloop: | |
83 | cmpmb %a0@+,%a1@+ | compare a byte | 83 | cmpmb (%a0)+,(%a1)+ | compare a byte | |
84 | jne bcnoteq | not equal, return non-zero | 84 | jne bcnoteq | not equal, return non-zero | |
85 | subql #1,%d0 | adjust count | 85 | subql #1,%d0 | adjust count | |
86 | jne bcbloop | still more, keep going | 86 | jne bcbloop | still more, keep going | |
87 | rts | 87 | rts | |
88 | bcnoteql: | 88 | bcnoteql: | |
89 | subql #4,%a0 | 89 | subql #4,%a0 | |
90 | subql #4,%a1 | 90 | subql #4,%a1 | |
91 | movl #4,%d0 | 91 | movl #4,%d0 | |
92 | jra bcbloop | 92 | jra bcbloop | |
93 | bcnoteq: | 93 | bcnoteq: | |
94 | clrl %d0 | 94 | clrl %d0 | |
95 | clrl %d1 | 95 | clrl %d1 | |
96 | movb %a0@-,%d0 | 96 | movb -(%a0),%d0 | |
97 | movb %a1@-,%d1 | 97 | movb -(%a1),%d1 | |
98 | subl %d1,%d0 | 98 | subl %d1,%d0 | |
99 | bcdone: | 99 | bcdone: | |
100 | rts | 100 | rts |
--- src/common/lib/libc/arch/m68k/string/strcat.S 2005/12/20 19:28:49 1.1
+++ src/common/lib/libc/arch/m68k/string/strcat.S 2013/07/16 20:49:41 1.2
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: strcat.S,v 1.1 2005/12/20 19:28:49 christos Exp $ */ | 1 | /* $NetBSD: strcat.S,v 1.2 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,32 +29,32 @@ | @@ -29,32 +29,32 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)strcpy.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)strcpy.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: strcat.S,v 1.1 2005/12/20 19:28:49 christos Exp $") | 42 | RCSID("$NetBSD: strcat.S,v 1.2 2013/07/16 20:49:41 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | ENTRY(strcat) | 46 | ENTRY(strcat) | |
47 | movl %sp@(8),%a0 | a0 = fromaddr | 47 | movl 8(%sp),%a0 | a0 = fromaddr | |
48 | movl %sp@(4),%d0 | return value is toaddr | 48 | movl 4(%sp),%d0 | return value is toaddr | |
49 | movl %d0,%a1 | a1 = toaddr | 49 | movl %d0,%a1 | a1 = toaddr | |
50 | Lslloop: | 50 | Lslloop: | |
51 | tstb %a1@+ | null? | 51 | tstb (%a1)+ | null? | |
52 | jne Lslloop | no, keep going | 52 | jne Lslloop | no, keep going | |
53 | subql #1,%a1 | 53 | subql #1,%a1 | |
54 | Lscloop: | 54 | Lscloop: | |
55 | movb %a0@+,%a1@+ | copy a byte | 55 | movb (%a0)+,(%a1)+ | copy a byte | |
56 | jne Lscloop | copied non-null, keep going | 56 | jne Lscloop | copied non-null, keep going | |
57 | #ifdef __SVR4_ABI__ | 57 | #ifdef __SVR4_ABI__ | |
58 | moveal %d0,%a0 | 58 | moveal %d0,%a0 | |
59 | #endif | 59 | #endif | |
60 | rts | 60 | rts |
--- src/common/lib/libc/arch/m68k/string/strcpy.S 2005/12/20 19:28:49 1.1
+++ src/common/lib/libc/arch/m68k/string/strcpy.S 2013/07/16 20:49:41 1.2
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: strcpy.S,v 1.1 2005/12/20 19:28:49 christos Exp $ */ | 1 | /* $NetBSD: strcpy.S,v 1.2 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,28 +29,28 @@ | @@ -29,28 +29,28 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)strcpy.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)strcpy.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: strcpy.S,v 1.1 2005/12/20 19:28:49 christos Exp $") | 42 | RCSID("$NetBSD: strcpy.S,v 1.2 2013/07/16 20:49:41 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | ENTRY(strcpy) | 46 | ENTRY(strcpy) | |
47 | movl %sp@(8),%a0 | a0 = fromaddr | 47 | movl 8(%sp),%a0 | a0 = fromaddr | |
48 | movl %sp@(4),%d0 | return value is toaddr | 48 | movl 4(%sp),%d0 | return value is toaddr | |
49 | movl %d0,%a1 | a1 = toaddr | 49 | movl %d0,%a1 | a1 = toaddr | |
50 | Lscloop: | 50 | Lscloop: | |
51 | movb %a0@+,%a1@+ | copy a byte | 51 | movb (%a0)+,(%a1)+ | copy a byte | |
52 | jne Lscloop | copied non-null, keep going | 52 | jne Lscloop | copied non-null, keep going | |
53 | #ifdef __SVR4_ABI__ | 53 | #ifdef __SVR4_ABI__ | |
54 | moveal %d0,%a0 | 54 | moveal %d0,%a0 | |
55 | #endif | 55 | #endif | |
56 | rts | 56 | rts |
--- src/common/lib/libc/arch/m68k/string/strlen.S 2005/12/20 19:28:49 1.1
+++ src/common/lib/libc/arch/m68k/string/strlen.S 2013/07/16 20:49:41 1.2
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: strlen.S,v 1.1 2005/12/20 19:28:49 christos Exp $ */ | 1 | /* $NetBSD: strlen.S,v 1.2 2013/07/16 20:49:41 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,26 +29,26 @@ | @@ -29,26 +29,26 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)strlen.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)strlen.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: strlen.S,v 1.1 2005/12/20 19:28:49 christos Exp $") | 42 | RCSID("$NetBSD: strlen.S,v 1.2 2013/07/16 20:49:41 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | ENTRY(strlen) | 46 | ENTRY(strlen) | |
47 | movl %sp@(4),%a0 | string | 47 | movl 4(%sp),%a0 | string | |
48 | movl %a0,%d0 | 48 | movl %a0,%d0 | |
49 | notl %d0 | 49 | notl %d0 | |
50 | Lslloop: | 50 | Lslloop: | |
51 | tstb %a0@+ | null? | 51 | tstb (%a0)+ | null? | |
52 | jne Lslloop | no, keep going | 52 | jne Lslloop | no, keep going | |
53 | addl %a0,%d0 | 53 | addl %a0,%d0 | |
54 | rts | 54 | rts |
--- src/common/lib/libc/arch/m68k/string/strncpy.S 2005/12/20 19:28:49 1.1
+++ src/common/lib/libc/arch/m68k/string/strncpy.S 2013/07/16 20:49:42 1.2
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: strncpy.S,v 1.1 2005/12/20 19:28:49 christos Exp $ */ | 1 | /* $NetBSD: strncpy.S,v 1.2 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,45 +29,45 @@ | @@ -29,45 +29,45 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)strncpy.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)strncpy.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: strncpy.S,v 1.1 2005/12/20 19:28:49 christos Exp $") | 42 | RCSID("$NetBSD: strncpy.S,v 1.2 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | ENTRY(strncpy) | 46 | ENTRY(strncpy) | |
47 | movl %sp@(4),%d0 | return value is toaddr | 47 | movl 4(%sp),%d0 | return value is toaddr | |
48 | movl %sp@(12),%d1 | count | 48 | movl 12(%sp),%d1 | count | |
49 | jeq Lscdone | nothing to do | 49 | jeq Lscdone | nothing to do | |
50 | movl %sp@(8),%a0 | a0 = fromaddr | 50 | movl 8(%sp),%a0 | a0 = fromaddr | |
51 | movl %d0,%a1 | a1 = toaddr | 51 | movl %d0,%a1 | a1 = toaddr | |
52 | subql #1,%d1 | 52 | subql #1,%d1 | |
53 | Lscloop: | 53 | Lscloop: | |
54 | movb %a0@+,%a1@+ | copy a byte | 54 | movb (%a0)+,(%a1)+ | copy a byte | |
55 | dbeq %d1,Lscloop | loop through low word of d1 | 55 | dbeq %d1,Lscloop | loop through low word of d1 | |
56 | jeq Lscpadding | copied null, padding if necessary | 56 | jeq Lscpadding | copied null, padding if necessary | |
57 | clrw %d1 | clear low word of d1 | 57 | clrw %d1 | clear low word of d1 | |
58 | subql #1,%d1 | adjust count for long copies | 58 | subql #1,%d1 | adjust count for long copies | |
59 | jcc Lscloop | more room, keep going | 59 | jcc Lscloop | more room, keep going | |
60 | Lscdone: | 60 | Lscdone: | |
61 | #ifdef __SVR4_ABI__ | 61 | #ifdef __SVR4_ABI__ | |
62 | moveal %d0,%a0 | 62 | moveal %d0,%a0 | |
63 | #endif | 63 | #endif | |
64 | rts | 64 | rts | |
65 | 65 | |||
66 | Lscploop: | 66 | Lscploop: | |
67 | clrb %a1@+ | clear a byte | 67 | clrb (%a1)+ | clear a byte | |
68 | dbra %d1,Lscploop | keep going | 68 | dbra %d1,Lscploop | keep going | |
69 | clrw %d1 | 69 | clrw %d1 | |
70 | Lscpadding: | 70 | Lscpadding: | |
71 | subql #1,%d1 | 71 | subql #1,%d1 | |
72 | jcc Lscploop | 72 | jcc Lscploop | |
73 | jra Lscdone | 73 | jra Lscdone |
--- src/lib/libc/arch/m68k/gen/_setjmp.S 2003/08/07 16:42:10 1.7
+++ src/lib/libc/arch/m68k/gen/_setjmp.S 2013/07/16 20:49:42 1.8
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: _setjmp.S,v 1.7 2003/08/07 16:42:10 agc Exp $ */ | 1 | /* $NetBSD: _setjmp.S,v 1.8 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,60 +29,60 @@ | @@ -29,60 +29,60 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)_setjmp.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)_setjmp.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: _setjmp.S,v 1.7 2003/08/07 16:42:10 agc Exp $") | 42 | RCSID("$NetBSD: _setjmp.S,v 1.8 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* | 46 | /* | |
47 | * C library -- _setjmp, _longjmp | 47 | * C library -- _setjmp, _longjmp | |
48 | * | 48 | * | |
49 | * _longjmp(a,v) | 49 | * _longjmp(a,v) | |
50 | * will generate a "return(v)" from | 50 | * will generate a "return(v)" from | |
51 | * the last call to | 51 | * the last call to | |
52 | * _setjmp(a) | 52 | * _setjmp(a) | |
53 | * by restoring registers from the stack, | 53 | * by restoring registers from the stack, | |
54 | * The previous signal state is NOT restored. | 54 | * The previous signal state is NOT restored. | |
55 | */ | 55 | */ | |
56 | 56 | |||
57 | ENTRY(_setjmp) | 57 | ENTRY(_setjmp) | |
58 | movl %sp@(4),%a0 /* save area pointer */ | 58 | movl 4(%sp),%a0 /* save area pointer */ | |
59 | clrl %a0@+ /* no old onstack */ | 59 | clrl (%a0)+ /* no old onstack */ | |
60 | clrl %a0@+ /* no old sigmask */ | 60 | clrl (%a0)+ /* no old sigmask */ | |
61 | movl %sp,%a0@+ /* save old SP */ | 61 | movl %sp,(%a0)+ /* save old SP */ | |
62 | movl %a6,%a0@+ /* save old FP */ | 62 | movl %a6,(%a0)+ /* save old FP */ | |
63 | clrl %a0@+ /* no old AP */ | 63 | clrl (%a0)+ /* no old AP */ | |
64 | movl %sp@,%a0@+ /* save old PC */ | 64 | movl (%sp),(%a0)+ /* save old PC */ | |
65 | clrl %a0@+ /* clear PS */ | 65 | clrl (%a0)+ /* clear PS */ | |
66 | moveml #0x3CFC,%a0@ /* save other non-scratch regs */ | 66 | moveml #0x3CFC,(%a0) /* save other non-scratch regs */ | |
67 | clrl %d0 /* return zero */ | 67 | clrl %d0 /* return zero */ | |
68 | rts | 68 | rts | |
69 | 69 | |||
70 | ENTRY(_longjmp) | 70 | ENTRY(_longjmp) | |
71 | movl %sp@(4),%a0 /* save area pointer */ | 71 | movl 4(%sp),%a0 /* save area pointer */ | |
72 | addql #8,%a0 /* skip onstack/sigmask */ | 72 | addql #8,%a0 /* skip onstack/sigmask */ | |
73 | tstl %a0@ /* ensure non-zero SP */ | 73 | tstl (%a0) /* ensure non-zero SP */ | |
74 | jeq botch /* oops! */ | 74 | jeq botch /* oops! */ | |
75 | movl %sp@(8),%d0 /* grab return value */ | 75 | movl 8(%sp),%d0 /* grab return value */ | |
76 | jne ok /* non-zero ok */ | 76 | jne ok /* non-zero ok */ | |
77 | moveq #1,%d0 /* else make non-zero */ | 77 | moveq #1,%d0 /* else make non-zero */ | |
78 | ok: | 78 | ok: | |
79 | movl %a0@+,%sp /* restore SP */ | 79 | movl (%a0)+,%sp /* restore SP */ | |
80 | movl %a0@+,%a6 /* restore FP */ | 80 | movl (%a0)+,%a6 /* restore FP */ | |
81 | addql #4,%a0 /* skip AP */ | 81 | addql #4,%a0 /* skip AP */ | |
82 | movl %a0@+,%sp@ /* restore PC */ | 82 | movl (%a0)+,(%sp) /* restore PC */ | |
83 | moveml %a0@(4),#0x3CFC /* restore non-scratch regs */ | 83 | moveml 4(%a0),#0x3CFC /* restore non-scratch regs */ | |
84 | rts | 84 | rts | |
85 | 85 | |||
86 | botch: | 86 | botch: | |
87 | jbsr PIC_PLT(_C_LABEL(longjmperror)) | 87 | jbsr PIC_PLT(_C_LABEL(longjmperror)) | |
88 | stop #0 | 88 | stop #0 |
--- src/lib/libc/arch/m68k/gen/Attic/fpsetmask.S 2002/01/13 21:45:44 1.7
+++ src/lib/libc/arch/m68k/gen/Attic/fpsetmask.S 2013/07/16 20:49:42 1.8
@@ -1,23 +1,23 @@ | @@ -1,23 +1,23 @@ | |||
1 | /* $NetBSD: fpsetmask.S,v 1.7 2002/01/13 21:45:44 thorpej Exp $ */ | 1 | /* $NetBSD: fpsetmask.S,v 1.8 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Written by Charles M. Hannum, Apr 9, 1995 | 4 | * Written by Charles M. Hannum, Apr 9, 1995 | |
5 | * Public Domain. | 5 | * Public Domain. | |
6 | */ | 6 | */ | |
7 | 7 | |||
8 | #include <machine/asm.h> | 8 | #include <machine/asm.h> | |
9 | 9 | |||
10 | #ifdef WEAK_ALIAS | 10 | #ifdef WEAK_ALIAS | |
11 | WEAK_ALIAS(fpsetmask, _fpsetmask) | 11 | WEAK_ALIAS(fpsetmask, _fpsetmask) | |
12 | ENTRY(_fpsetmask) | 12 | ENTRY(_fpsetmask) | |
13 | #else | 13 | #else | |
14 | ENTRY(fpsetmask) | 14 | ENTRY(fpsetmask) | |
15 | #endif | 15 | #endif | |
16 | movel %d2,%sp@- | 16 | movel %d2,-(%sp) | |
17 | fmovel %fpcr,%d1 | 17 | fmovel %fpcr,%d1 | |
18 | movel %sp@(8),%d2 | 18 | movel 8(%sp),%d2 | |
19 | bfextu %d1{#18:#5},%d0 | 19 | bfextu %d1{#18:#5},%d0 | |
20 | bfins %d2,%d1{#18:#5} | 20 | bfins %d2,%d1{#18:#5} | |
21 | movel %sp@+,%d2 | 21 | movel (%sp)+,%d2 | |
22 | fmovel %d1,%fpcr | 22 | fmovel %d1,%fpcr | |
23 | rts | 23 | rts |
--- src/lib/libc/arch/m68k/gen/Attic/fpsetsticky.S 2002/01/13 21:45:45 1.7
+++ src/lib/libc/arch/m68k/gen/Attic/fpsetsticky.S 2013/07/16 20:49:42 1.8
@@ -1,23 +1,23 @@ | @@ -1,23 +1,23 @@ | |||
1 | /* $NetBSD: fpsetsticky.S,v 1.7 2002/01/13 21:45:45 thorpej Exp $ */ | 1 | /* $NetBSD: fpsetsticky.S,v 1.8 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Written by Charles M. Hannum, Apr 9, 1995 | 4 | * Written by Charles M. Hannum, Apr 9, 1995 | |
5 | * Public domain. | 5 | * Public domain. | |
6 | */ | 6 | */ | |
7 | 7 | |||
8 | #include <machine/asm.h> | 8 | #include <machine/asm.h> | |
9 | 9 | |||
10 | #ifdef WEAK_ALIAS | 10 | #ifdef WEAK_ALIAS | |
11 | WEAK_ALIAS(fpsetsticky, _fpsetsticky) | 11 | WEAK_ALIAS(fpsetsticky, _fpsetsticky) | |
12 | ENTRY(_fpsetsticky) | 12 | ENTRY(_fpsetsticky) | |
13 | #else | 13 | #else | |
14 | ENTRY(fpsetsticky) | 14 | ENTRY(fpsetsticky) | |
15 | #endif | 15 | #endif | |
16 | movel %d2,%sp@- | 16 | movel %d2,-(%sp) | |
17 | fmovel %fpsr,%d1 | 17 | fmovel %fpsr,%d1 | |
18 | movel %sp@(8),%d2 | 18 | movel 8(%sp),%d2 | |
19 | bfextu %d1{#24:#5},%d0 | 19 | bfextu %d1{#24:#5},%d0 | |
20 | bfins %d2,%d1{#24:#5} | 20 | bfins %d2,%d1{#24:#5} | |
21 | movel %sp@+,%d2 | 21 | movel (%sp)+,%d2 | |
22 | fmovel %d1,%fpsr | 22 | fmovel %d1,%fpsr | |
23 | rts | 23 | rts |
--- src/lib/libc/arch/m68k/gen/Attic/muldf3.S 2003/08/07 16:42:11 1.7
+++ src/lib/libc/arch/m68k/gen/Attic/muldf3.S 2013/07/16 20:49:42 1.8
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: muldf3.S,v 1.7 2003/08/07 16:42:11 agc Exp $ */ | 1 | /* $NetBSD: muldf3.S,v 1.8 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,27 +29,27 @@ | @@ -29,27 +29,27 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)muldf3.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)muldf3.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: muldf3.S,v 1.7 2003/08/07 16:42:11 agc Exp $") | 42 | RCSID("$NetBSD: muldf3.S,v 1.8 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* double * double */ | 46 | /* double * double */ | |
47 | ENTRY(__muldf3) | 47 | ENTRY(__muldf3) | |
48 | fmoved %sp@(4),%fp0 | 48 | fmoved 4(%sp),%fp0 | |
49 | fmuld %sp@(12),%fp0 | 49 | fmuld 12(%sp),%fp0 | |
50 | #ifndef __SVR4_ABI__ | 50 | #ifndef __SVR4_ABI__ | |
51 | fmoved %fp0,%sp@- | 51 | fmoved %fp0,-(%sp) | |
52 | movel %sp@+,%d0 | 52 | movel (%sp)+,%d0 | |
53 | movel %sp@+,%d1 | 53 | movel (%sp)+,%d1 | |
54 | #endif | 54 | #endif | |
55 | rts | 55 | rts |
--- src/lib/libc/arch/m68k/gen/negdf2.S 2003/08/07 16:42:11 1.7
+++ src/lib/libc/arch/m68k/gen/negdf2.S 2013/07/16 20:49:42 1.8
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: negdf2.S,v 1.7 2003/08/07 16:42:11 agc Exp $ */ | 1 | /* $NetBSD: negdf2.S,v 1.8 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,27 +29,27 @@ | @@ -29,27 +29,27 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)negdf2.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)negdf2.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: negdf2.S,v 1.7 2003/08/07 16:42:11 agc Exp $") | 42 | RCSID("$NetBSD: negdf2.S,v 1.8 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* -double */ | 46 | /* -double */ | |
47 | ENTRY(__negdf2) | 47 | ENTRY(__negdf2) | |
48 | #if defined(__SVR4_ABI__) && defined(__HAVE_68881__) | 48 | #if defined(__SVR4_ABI__) && defined(__HAVE_68881__) | |
49 | fnegd %sp@(4),%fp0 | 49 | fnegd 4(%sp),%fp0 | |
50 | #else | 50 | #else | |
51 | movel %sp@(4),%d0 | 51 | movel 4(%sp),%d0 | |
52 | movel %sp@(8),%d1 | 52 | movel 8(%sp),%d1 | |
53 | bchg #31,%d0 | 53 | bchg #31,%d0 | |
54 | #endif | 54 | #endif | |
55 | rts | 55 | rts |
--- src/lib/libc/arch/m68k/gen/negsf2.S 2003/08/07 16:42:11 1.7
+++ src/lib/libc/arch/m68k/gen/negsf2.S 2013/07/16 20:49:42 1.8
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: negsf2.S,v 1.7 2003/08/07 16:42:11 agc Exp $ */ | 1 | /* $NetBSD: negsf2.S,v 1.8 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,26 +29,26 @@ | @@ -29,26 +29,26 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID"from: @(#)negsf2.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID"from: @(#)negsf2.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: negsf2.S,v 1.7 2003/08/07 16:42:11 agc Exp $") | 42 | RCSID("$NetBSD: negsf2.S,v 1.8 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* -single */ | 46 | /* -single */ | |
47 | ENTRY(__negsf2) | 47 | ENTRY(__negsf2) | |
48 | #if defined(__SVR4_ABI__) && defined(__HAVE_68881__) | 48 | #if defined(__SVR4_ABI__) && defined(__HAVE_68881__) | |
49 | fnegs %sp@(4),%fp0 | 49 | fnegs 4(%sp),%fp0 | |
50 | #else | 50 | #else | |
51 | movel %sp@(4),%d0 | 51 | movel 4(%sp),%d0 | |
52 | bchg #31,%d0 | 52 | bchg #31,%d0 | |
53 | #endif | 53 | #endif | |
54 | rts | 54 | rts |
--- src/lib/libc/arch/m68k/gen/Attic/adddf3.S 2003/08/07 16:42:10 1.6
+++ src/lib/libc/arch/m68k/gen/Attic/adddf3.S 2013/07/16 20:49:42 1.7
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: adddf3.S,v 1.6 2003/08/07 16:42:10 agc Exp $ */ | 1 | /* $NetBSD: adddf3.S,v 1.7 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,27 +29,27 @@ | @@ -29,27 +29,27 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)adddf3.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)adddf3.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: adddf3.S,v 1.6 2003/08/07 16:42:10 agc Exp $") | 42 | RCSID("$NetBSD: adddf3.S,v 1.7 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* double + double */ | 46 | /* double + double */ | |
47 | ENTRY(__adddf3) | 47 | ENTRY(__adddf3) | |
48 | fmoved %sp@(4),%fp0 | 48 | fmoved 4(%sp),%fp0 | |
49 | faddd %sp@(12),%fp0 | 49 | faddd 12(%sp),%fp0 | |
50 | #ifndef __SVR4_ABI__ | 50 | #ifndef __SVR4_ABI__ | |
51 | fmoved %fp0,%sp@- | 51 | fmoved %fp0,-(%sp) | |
52 | movel %sp@+,%d0 | 52 | movel (%sp)+,%d0 | |
53 | movel %sp@+,%d1 | 53 | movel (%sp)+,%d1 | |
54 | #endif | 54 | #endif | |
55 | rts | 55 | rts |
--- src/lib/libc/arch/m68k/gen/Attic/addsf3.S 2003/08/07 16:42:10 1.6
+++ src/lib/libc/arch/m68k/gen/Attic/addsf3.S 2013/07/16 20:49:42 1.7
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: addsf3.S,v 1.6 2003/08/07 16:42:10 agc Exp $ */ | 1 | /* $NetBSD: addsf3.S,v 1.7 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,25 +29,25 @@ | @@ -29,25 +29,25 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)addsf3.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)addsf3.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: addsf3.S,v 1.6 2003/08/07 16:42:10 agc Exp $") | 42 | RCSID("$NetBSD: addsf3.S,v 1.7 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* single + single */ | 46 | /* single + single */ | |
47 | ENTRY(__addsf3) | 47 | ENTRY(__addsf3) | |
48 | fmoves %sp@(4),%fp0 | 48 | fmoves 4(%sp),%fp0 | |
49 | fadds %sp@(8),%fp0 | 49 | fadds 8(%sp),%fp0 | |
50 | #ifndef __SVR4_ABI__ | 50 | #ifndef __SVR4_ABI__ | |
51 | fmoves %fp0,%d0 | 51 | fmoves %fp0,%d0 | |
52 | #endif | 52 | #endif | |
53 | rts | 53 | rts |
--- src/lib/libc/arch/m68k/gen/alloca.S 2003/08/07 16:42:10 1.6
+++ src/lib/libc/arch/m68k/gen/alloca.S 2013/07/16 20:49:42 1.7
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: alloca.S,v 1.6 2003/08/07 16:42:10 agc Exp $ */ | 1 | /* $NetBSD: alloca.S,v 1.7 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,31 +29,31 @@ | @@ -29,31 +29,31 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)alloca.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)alloca.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: alloca.S,v 1.6 2003/08/07 16:42:10 agc Exp $") | 42 | RCSID("$NetBSD: alloca.S,v 1.7 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* like alloc, but automatic free in return */ | 46 | /* like alloc, but automatic free in return */ | |
47 | 47 | |||
48 | ENTRY(alloca) | 48 | ENTRY(alloca) | |
49 | movl %sp@,%a1 /* save return addr */ | 49 | movl (%sp),%a1 /* save return addr */ | |
50 | movl %sp,%d0 /* get current SP value */ | 50 | movl %sp,%d0 /* get current SP value */ | |
51 | subl %sp@(4),%d0 /* allocate requested space */ | 51 | subl 4(%sp),%d0 /* allocate requested space */ | |
52 | andb #~3,%d0 /* longword align for efficiency */ | 52 | andb #~3,%d0 /* longword align for efficiency */ | |
53 | addql #8,%d0 /* reuse space of call frame */ | 53 | addql #8,%d0 /* reuse space of call frame */ | |
54 | movl %d0,%sp /* set new SP value */ | 54 | movl %d0,%sp /* set new SP value */ | |
55 | lea %sp@(-4),%sp /* account for argument pop in caller */ | 55 | lea -4(%sp),%sp /* account for argument pop in caller */ | |
56 | #ifdef __SVR4_ABI__ | 56 | #ifdef __SVR4_ABI__ | |
57 | moveal %d0,%a0 | 57 | moveal %d0,%a0 | |
58 | #endif | 58 | #endif | |
59 | jmp %a1@ /* funny return */ | 59 | jmp (%a1) /* funny return */ |
--- src/lib/libc/arch/m68k/gen/Attic/divdf3.S 2003/08/07 16:42:10 1.6
+++ src/lib/libc/arch/m68k/gen/Attic/divdf3.S 2013/07/16 20:49:42 1.7
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: divdf3.S,v 1.6 2003/08/07 16:42:10 agc Exp $ */ | 1 | /* $NetBSD: divdf3.S,v 1.7 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,27 +29,27 @@ | @@ -29,27 +29,27 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)divdf3.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)divdf3.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: divdf3.S,v 1.6 2003/08/07 16:42:10 agc Exp $") | 42 | RCSID("$NetBSD: divdf3.S,v 1.7 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* double / double */ | 46 | /* double / double */ | |
47 | ENTRY(__divdf3) | 47 | ENTRY(__divdf3) | |
48 | fmoved %sp@(4),%fp0 | 48 | fmoved 4(%sp),%fp0 | |
49 | fdivd %sp@(12),%fp0 | 49 | fdivd 12(%sp),%fp0 | |
50 | #ifndef __SVR4_ABI__ | 50 | #ifndef __SVR4_ABI__ | |
51 | fmoved %fp0,%sp@- | 51 | fmoved %fp0,-(%sp) | |
52 | movel %sp@+,%d0 | 52 | movel (%sp)+,%d0 | |
53 | movel %sp@+,%d1 | 53 | movel (%sp)+,%d1 | |
54 | #endif | 54 | #endif | |
55 | rts | 55 | rts |
--- src/lib/libc/arch/m68k/gen/Attic/divsf3.S 2003/08/07 16:42:10 1.6
+++ src/lib/libc/arch/m68k/gen/Attic/divsf3.S 2013/07/16 20:49:42 1.7
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: divsf3.S,v 1.6 2003/08/07 16:42:10 agc Exp $ */ | 1 | /* $NetBSD: divsf3.S,v 1.7 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,25 +29,25 @@ | @@ -29,25 +29,25 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)divsf3.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)divsf3.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: divsf3.S,v 1.6 2003/08/07 16:42:10 agc Exp $") | 42 | RCSID("$NetBSD: divsf3.S,v 1.7 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* single / single */ | 46 | /* single / single */ | |
47 | ENTRY(__divsf3) | 47 | ENTRY(__divsf3) | |
48 | fmoves %sp@(4),%fp0 | 48 | fmoves 4(%sp),%fp0 | |
49 | fdivs %sp@(8),%fp0 | 49 | fdivs 8(%sp),%fp0 | |
50 | #ifndef __SVR4_ABI__ | 50 | #ifndef __SVR4_ABI__ | |
51 | fmoves %fp0,%d0 | 51 | fmoves %fp0,%d0 | |
52 | #endif | 52 | #endif | |
53 | rts | 53 | rts |
--- src/lib/libc/arch/m68k/gen/Attic/extendsfdf2.S 2003/08/07 16:42:10 1.6
+++ src/lib/libc/arch/m68k/gen/Attic/extendsfdf2.S 2013/07/16 20:49:42 1.7
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: extendsfdf2.S,v 1.6 2003/08/07 16:42:10 agc Exp $ */ | 1 | /* $NetBSD: extendsfdf2.S,v 1.7 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,26 +29,26 @@ | @@ -29,26 +29,26 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)extendsfdf2.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)extendsfdf2.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: extendsfdf2.S,v 1.6 2003/08/07 16:42:10 agc Exp $") | 42 | RCSID("$NetBSD: extendsfdf2.S,v 1.7 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* (double) float */ | 46 | /* (double) float */ | |
47 | ENTRY(__extendsfdf2) | 47 | ENTRY(__extendsfdf2) | |
48 | fmoves %sp@(4),%fp0 | 48 | fmoves 4(%sp),%fp0 | |
49 | #ifndef __SVR4_ABI__ | 49 | #ifndef __SVR4_ABI__ | |
50 | fmoved %fp0,%sp@- | 50 | fmoved %fp0,-(%sp) | |
51 | movel %sp@+,%d0 | 51 | movel (%sp)+,%d0 | |
52 | movel %sp@+,%d1 | 52 | movel (%sp)+,%d1 | |
53 | #endif | 53 | #endif | |
54 | rts | 54 | rts |
--- src/lib/libc/arch/m68k/gen/Attic/floatsidf.S 2003/08/07 16:42:10 1.6
+++ src/lib/libc/arch/m68k/gen/Attic/floatsidf.S 2013/07/16 20:49:42 1.7
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: floatsidf.S,v 1.6 2003/08/07 16:42:10 agc Exp $ */ | 1 | /* $NetBSD: floatsidf.S,v 1.7 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,27 +29,27 @@ | @@ -29,27 +29,27 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)floatsidf.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)floatsidf.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: floatsidf.S,v 1.6 2003/08/07 16:42:10 agc Exp $") | 42 | RCSID("$NetBSD: floatsidf.S,v 1.7 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* (double) int */ | 46 | /* (double) int */ | |
47 | ENTRY(__floatsidf) | 47 | ENTRY(__floatsidf) | |
48 | fmovel %sp@(4),%fp0 | 48 | fmovel 4(%sp),%fp0 | |
49 | #ifndef __SVR4_ABI__ | 49 | #ifndef __SVR4_ABI__ | |
50 | fmoved %fp0,%sp@- | 50 | fmoved %fp0,-(%sp) | |
51 | movel %sp@+,%d0 | 51 | movel (%sp)+,%d0 | |
52 | movel %sp@+,%d1 | 52 | movel (%sp)+,%d1 | |
53 | #endif | 53 | #endif | |
54 | rts | 54 | rts | |
55 | 55 |
--- src/lib/libc/arch/m68k/gen/Attic/modf.S 2003/08/07 16:42:11 1.6
+++ src/lib/libc/arch/m68k/gen/Attic/modf.S 2013/07/16 20:49:42 1.7
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: modf.S,v 1.6 2003/08/07 16:42:11 agc Exp $ */ | 1 | /* $NetBSD: modf.S,v 1.7 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,33 +29,33 @@ | @@ -29,33 +29,33 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)modf.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)modf.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: modf.S,v 1.6 2003/08/07 16:42:11 agc Exp $") | 42 | RCSID("$NetBSD: modf.S,v 1.7 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* | 46 | /* | |
47 | * double modf(val, iptr) | 47 | * double modf(val, iptr) | |
48 | * returns: xxx and n (in *iptr) where val == n.xxx | 48 | * returns: xxx and n (in *iptr) where val == n.xxx | |
49 | */ | 49 | */ | |
50 | ENTRY(modf) | 50 | ENTRY(modf) | |
51 | fmoved %sp@(4),%fp0 | 51 | fmoved 4(%sp),%fp0 | |
52 | movel %sp@(12),%a0 | 52 | movel 12(%sp),%a0 | |
53 | fintrzx %fp0,%fp1 | 53 | fintrzx %fp0,%fp1 | |
54 | fmoved %fp1,%a0@ | 54 | fmoved %fp1,(%a0) | |
55 | fsubx %fp1,%fp0 | 55 | fsubx %fp1,%fp0 | |
56 | #ifndef __SVR4_ABI__ | 56 | #ifndef __SVR4_ABI__ | |
57 | fmoved %fp0,%sp@- | 57 | fmoved %fp0,-(%sp) | |
58 | movel %sp@+,%d0 | 58 | movel (%sp)+,%d0 | |
59 | movel %sp@+,%d1 | 59 | movel (%sp)+,%d1 | |
60 | #endif | 60 | #endif | |
61 | rts | 61 | rts |
--- src/lib/libc/arch/m68k/gen/Attic/mulsf3.S 2003/08/07 16:42:11 1.6
+++ src/lib/libc/arch/m68k/gen/Attic/mulsf3.S 2013/07/16 20:49:42 1.7
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: mulsf3.S,v 1.6 2003/08/07 16:42:11 agc Exp $ */ | 1 | /* $NetBSD: mulsf3.S,v 1.7 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,25 +29,25 @@ | @@ -29,25 +29,25 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)mulsf3.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)mulsf3.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: mulsf3.S,v 1.6 2003/08/07 16:42:11 agc Exp $") | 42 | RCSID("$NetBSD: mulsf3.S,v 1.7 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* single * single */ | 46 | /* single * single */ | |
47 | ENTRY(__mulsf3) | 47 | ENTRY(__mulsf3) | |
48 | fmoves %sp@(4),%fp0 | 48 | fmoves 4(%sp),%fp0 | |
49 | fmuls %sp@(8),%fp0 | 49 | fmuls 8(%sp),%fp0 | |
50 | #ifndef __SVR4_ABI__ | 50 | #ifndef __SVR4_ABI__ | |
51 | fmoves %fp0,%d0 | 51 | fmoves %fp0,%d0 | |
52 | #endif | 52 | #endif | |
53 | rts | 53 | rts |
--- src/lib/libc/arch/m68k/gen/Attic/subdf3.S 2003/08/07 16:42:11 1.6
+++ src/lib/libc/arch/m68k/gen/Attic/subdf3.S 2013/07/16 20:49:42 1.7
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: subdf3.S,v 1.6 2003/08/07 16:42:11 agc Exp $ */ | 1 | /* $NetBSD: subdf3.S,v 1.7 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,27 +29,27 @@ | @@ -29,27 +29,27 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)subdf3.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)subdf3.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: subdf3.S,v 1.6 2003/08/07 16:42:11 agc Exp $") | 42 | RCSID("$NetBSD: subdf3.S,v 1.7 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* double - double */ | 46 | /* double - double */ | |
47 | ENTRY(__subdf3) | 47 | ENTRY(__subdf3) | |
48 | fmoved %sp@(4),%fp0 | 48 | fmoved 4(%sp),%fp0 | |
49 | fsubd %sp@(12),%fp0 | 49 | fsubd 12(%sp),%fp0 | |
50 | #ifndef __SVR4_ABI__ | 50 | #ifndef __SVR4_ABI__ | |
51 | fmoved %fp0,%sp@- | 51 | fmoved %fp0,-(%sp) | |
52 | movel %sp@+,%d0 | 52 | movel (%sp)+,%d0 | |
53 | movel %sp@+,%d1 | 53 | movel (%sp)+,%d1 | |
54 | #endif | 54 | #endif | |
55 | rts | 55 | rts |
--- src/lib/libc/arch/m68k/gen/Attic/subsf3.S 2003/08/07 16:42:11 1.6
+++ src/lib/libc/arch/m68k/gen/Attic/subsf3.S 2013/07/16 20:49:42 1.7
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: subsf3.S,v 1.6 2003/08/07 16:42:11 agc Exp $ */ | 1 | /* $NetBSD: subsf3.S,v 1.7 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,25 +29,25 @@ | @@ -29,25 +29,25 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)subsf3.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)subsf3.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: subsf3.S,v 1.6 2003/08/07 16:42:11 agc Exp $") | 42 | RCSID("$NetBSD: subsf3.S,v 1.7 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* single - single */ | 46 | /* single - single */ | |
47 | ENTRY(__subsf3) | 47 | ENTRY(__subsf3) | |
48 | fmoves %sp@(4),%fp0 | 48 | fmoves 4(%sp),%fp0 | |
49 | fsubs %sp@(8),%fp0 | 49 | fsubs 8(%sp),%fp0 | |
50 | #ifndef __SVR4_ABI__ | 50 | #ifndef __SVR4_ABI__ | |
51 | fmoves %fp0,%d0 | 51 | fmoves %fp0,%d0 | |
52 | #endif | 52 | #endif | |
53 | rts | 53 | rts |
--- src/lib/libc/arch/m68k/gen/Attic/truncdfsf2.S 2003/08/07 16:42:11 1.6
+++ src/lib/libc/arch/m68k/gen/Attic/truncdfsf2.S 2013/07/16 20:49:42 1.7
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: truncdfsf2.S,v 1.6 2003/08/07 16:42:11 agc Exp $ */ | 1 | /* $NetBSD: truncdfsf2.S,v 1.7 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,24 +29,24 @@ | @@ -29,24 +29,24 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)truncdfsf2.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)truncdfsf2.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: truncdfsf2.S,v 1.6 2003/08/07 16:42:11 agc Exp $") | 42 | RCSID("$NetBSD: truncdfsf2.S,v 1.7 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* (float) double */ | 46 | /* (float) double */ | |
47 | ENTRY(__truncdfsf2) | 47 | ENTRY(__truncdfsf2) | |
48 | fmoved %sp@(4),%fp0 | 48 | fmoved 4(%sp),%fp0 | |
49 | #ifndef __SVR4_ABI__ | 49 | #ifndef __SVR4_ABI__ | |
50 | fmoves %fp0,%d0 | 50 | fmoves %fp0,%d0 | |
51 | #endif | 51 | #endif | |
52 | rts | 52 | rts |
--- src/lib/libc/arch/m68k/gen/ashlsi3.S 2003/08/07 16:42:10 1.5
+++ src/lib/libc/arch/m68k/gen/ashlsi3.S 2013/07/16 20:49:42 1.6
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ashlsi3.S,v 1.5 2003/08/07 16:42:10 agc Exp $ */ | 1 | /* $NetBSD: ashlsi3.S,v 1.6 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,23 +29,23 @@ | @@ -29,23 +29,23 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)ashlsi3.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)ashlsi3.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: ashlsi3.S,v 1.5 2003/08/07 16:42:10 agc Exp $") | 42 | RCSID("$NetBSD: ashlsi3.S,v 1.6 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* int << int */ | 46 | /* int << int */ | |
47 | ENTRY(__ashlsi3) | 47 | ENTRY(__ashlsi3) | |
48 | movel %sp@(8),%d1 | 48 | movel 8(%sp),%d1 | |
49 | movel %sp@(4),%d0 | 49 | movel 4(%sp),%d0 | |
50 | asll %d1,%d0 | 50 | asll %d1,%d0 | |
51 | rts | 51 | rts |
--- src/lib/libc/arch/m68k/gen/ashrsi3.S 2003/08/07 16:42:10 1.5
+++ src/lib/libc/arch/m68k/gen/ashrsi3.S 2013/07/16 20:49:42 1.6
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ashrsi3.S,v 1.5 2003/08/07 16:42:10 agc Exp $ */ | 1 | /* $NetBSD: ashrsi3.S,v 1.6 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,23 +29,23 @@ | @@ -29,23 +29,23 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)ashrsi3.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)ashrsi3.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: ashrsi3.S,v 1.5 2003/08/07 16:42:10 agc Exp $") | 42 | RCSID("$NetBSD: ashrsi3.S,v 1.6 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* int >> int */ | 46 | /* int >> int */ | |
47 | ENTRY(__ashrsi3) | 47 | ENTRY(__ashrsi3) | |
48 | movel %sp@(8),%d1 | 48 | movel 8(%sp),%d1 | |
49 | movel %sp@(4),%d0 | 49 | movel 4(%sp),%d0 | |
50 | asrl %d1,%d0 | 50 | asrl %d1,%d0 | |
51 | rts | 51 | rts |
--- src/lib/libc/arch/m68k/gen/Attic/cmpdf2.S 2003/08/07 16:42:10 1.5
+++ src/lib/libc/arch/m68k/gen/Attic/cmpdf2.S 2013/07/16 20:49:42 1.6
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: cmpdf2.S,v 1.5 2003/08/07 16:42:10 agc Exp $ */ | 1 | /* $NetBSD: cmpdf2.S,v 1.6 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,30 +29,30 @@ | @@ -29,30 +29,30 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)cmpdf2.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)cmpdf2.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: cmpdf2.S,v 1.5 2003/08/07 16:42:10 agc Exp $") | 42 | RCSID("$NetBSD: cmpdf2.S,v 1.6 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* double > double: 1 */ | 46 | /* double > double: 1 */ | |
47 | /* double < double: -1 */ | 47 | /* double < double: -1 */ | |
48 | /* double == double: 0 */ | 48 | /* double == double: 0 */ | |
49 | ENTRY(__cmpdf2) | 49 | ENTRY(__cmpdf2) | |
50 | fmoved %sp@(4),%fp0 | 50 | fmoved 4(%sp),%fp0 | |
51 | fcmpd %sp@(12),%fp0 | 51 | fcmpd 12(%sp),%fp0 | |
52 | fbgt Lagtb | 52 | fbgt Lagtb | |
53 | fslt %d0 | 53 | fslt %d0 | |
54 | extbl %d0 | 54 | extbl %d0 | |
55 | rts | 55 | rts | |
56 | Lagtb: | 56 | Lagtb: | |
57 | moveq #1,%d0 | 57 | moveq #1,%d0 | |
58 | rts | 58 | rts |
--- src/lib/libc/arch/m68k/gen/Attic/cmpsf2.S 2003/08/07 16:42:10 1.5
+++ src/lib/libc/arch/m68k/gen/Attic/cmpsf2.S 2013/07/16 20:49:42 1.6
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: cmpsf2.S,v 1.5 2003/08/07 16:42:10 agc Exp $ */ | 1 | /* $NetBSD: cmpsf2.S,v 1.6 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,30 +29,30 @@ | @@ -29,30 +29,30 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)cmpsf2.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)cmpsf2.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: cmpsf2.S,v 1.5 2003/08/07 16:42:10 agc Exp $") | 42 | RCSID("$NetBSD: cmpsf2.S,v 1.6 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* single > single: 1 */ | 46 | /* single > single: 1 */ | |
47 | /* single < single: -1 */ | 47 | /* single < single: -1 */ | |
48 | /* single == single: 0 */ | 48 | /* single == single: 0 */ | |
49 | ENTRY(__cmpsf2) | 49 | ENTRY(__cmpsf2) | |
50 | fmoves %sp@(4),%fp0 | 50 | fmoves 4(%sp),%fp0 | |
51 | fcmps %sp@(8),%fp0 | 51 | fcmps 8(%sp),%fp0 | |
52 | fbgt Lagtb | 52 | fbgt Lagtb | |
53 | fslt %d0 | 53 | fslt %d0 | |
54 | extbl %d0 | 54 | extbl %d0 | |
55 | rts | 55 | rts | |
56 | Lagtb: | 56 | Lagtb: | |
57 | moveq #1,%d0 | 57 | moveq #1,%d0 | |
58 | rts | 58 | rts |
--- src/lib/libc/arch/m68k/gen/Attic/fixdfsi.S 2003/08/07 16:42:10 1.5
+++ src/lib/libc/arch/m68k/gen/Attic/fixdfsi.S 2013/07/16 20:49:42 1.6
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: fixdfsi.S,v 1.5 2003/08/07 16:42:10 agc Exp $ */ | 1 | /* $NetBSD: fixdfsi.S,v 1.6 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,22 +29,22 @@ | @@ -29,22 +29,22 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)fixdfsi.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)fixdfsi.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: fixdfsi.S,v 1.5 2003/08/07 16:42:10 agc Exp $") | 42 | RCSID("$NetBSD: fixdfsi.S,v 1.6 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* (int) double */ | 46 | /* (int) double */ | |
47 | ENTRY(__fixdfsi) | 47 | ENTRY(__fixdfsi) | |
48 | fintrzd %sp@(4),%fp0 | 48 | fintrzd 4(%sp),%fp0 | |
49 | fmovel %fp0,%d0 | 49 | fmovel %fp0,%d0 | |
50 | rts | 50 | rts |
--- src/lib/libc/arch/m68k/gen/Attic/fixunsdfsi.S 2003/08/07 16:42:10 1.5
+++ src/lib/libc/arch/m68k/gen/Attic/fixunsdfsi.S 2013/07/16 20:49:42 1.6
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: fixunsdfsi.S,v 1.5 2003/08/07 16:42:10 agc Exp $ */ | 1 | /* $NetBSD: fixunsdfsi.S,v 1.6 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,29 +29,29 @@ | @@ -29,29 +29,29 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)fixunsdfsi.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)fixunsdfsi.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: fixunsdfsi.S,v 1.5 2003/08/07 16:42:10 agc Exp $") | 42 | RCSID("$NetBSD: fixunsdfsi.S,v 1.6 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* (unsigned) double */ | 46 | /* (unsigned) double */ | |
47 | ENTRY(__fixunsdfsi) | 47 | ENTRY(__fixunsdfsi) | |
48 | fintrzd %sp@(4),%fp0 | 48 | fintrzd 4(%sp),%fp0 | |
49 | fcmpd #0r2147483648.0,%fp0 | 49 | fcmpd #0r2147483648.0,%fp0 | |
50 | fbge Lwaybig | 50 | fbge Lwaybig | |
51 | fmovel %fp0,%d0 | 51 | fmovel %fp0,%d0 | |
52 | rts | 52 | rts | |
53 | Lwaybig: | 53 | Lwaybig: | |
54 | fsubd #0r2147483648.0,%fp0 | 54 | fsubd #0r2147483648.0,%fp0 | |
55 | fmovel %fp0,%d0 | 55 | fmovel %fp0,%d0 | |
56 | bset #31,%d0 | 56 | bset #31,%d0 | |
57 | rts | 57 | rts |
--- src/lib/libc/arch/m68k/gen/lshlsi3.S 2003/08/07 16:42:10 1.5
+++ src/lib/libc/arch/m68k/gen/lshlsi3.S 2013/07/16 20:49:42 1.6
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: lshlsi3.S,v 1.5 2003/08/07 16:42:10 agc Exp $ */ | 1 | /* $NetBSD: lshlsi3.S,v 1.6 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,23 +29,23 @@ | @@ -29,23 +29,23 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)lshlsi3.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)lshlsi3.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: lshlsi3.S,v 1.5 2003/08/07 16:42:10 agc Exp $") | 42 | RCSID("$NetBSD: lshlsi3.S,v 1.6 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* unsigned << unsigned */ | 46 | /* unsigned << unsigned */ | |
47 | ENTRY(__lshlsi3) | 47 | ENTRY(__lshlsi3) | |
48 | movel %sp@(8),%d1 | 48 | movel 8(%sp),%d1 | |
49 | movel %sp@(4),%d0 | 49 | movel 4(%sp),%d0 | |
50 | lsll %d1,%d0 | 50 | lsll %d1,%d0 | |
51 | rts | 51 | rts |
--- src/lib/libc/arch/m68k/gen/lshrsi3.S 2003/08/07 16:42:10 1.5
+++ src/lib/libc/arch/m68k/gen/lshrsi3.S 2013/07/16 20:49:42 1.6
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: lshrsi3.S,v 1.5 2003/08/07 16:42:10 agc Exp $ */ | 1 | /* $NetBSD: lshrsi3.S,v 1.6 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,23 +29,23 @@ | @@ -29,23 +29,23 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)lshrsi3.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)lshrsi3.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: lshrsi3.S,v 1.5 2003/08/07 16:42:10 agc Exp $") | 42 | RCSID("$NetBSD: lshrsi3.S,v 1.6 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* unsigned >> unsigned */ | 46 | /* unsigned >> unsigned */ | |
47 | ENTRY(__lshrsi3) | 47 | ENTRY(__lshrsi3) | |
48 | movel %sp@(8),%d1 | 48 | movel 8(%sp),%d1 | |
49 | movel %sp@(4),%d0 | 49 | movel 4(%sp),%d0 | |
50 | lsrl %d1,%d0 | 50 | lsrl %d1,%d0 | |
51 | rts | 51 | rts |
--- src/lib/libc/arch/m68k/gen/resumecontext.S 2008/04/28 20:22:56 1.5
+++ src/lib/libc/arch/m68k/gen/resumecontext.S 2013/07/16 20:49:42 1.6
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: resumecontext.S,v 1.5 2008/04/28 20:22:56 martin Exp $ */ | 1 | /* $NetBSD: resumecontext.S,v 1.6 2013/07/16 20:49:42 matt 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 Klaus Klein. | 8 | * by Klaus Klein. | |
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,38 +22,38 @@ | @@ -22,38 +22,38 @@ | |||
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 <machine/asm.h> | 32 | #include <machine/asm.h> | |
33 | 33 | |||
34 | #if defined(LIBC_SCCS) && !defined(lint) | 34 | #if defined(LIBC_SCCS) && !defined(lint) | |
35 | RCSID("$NetBSD: resumecontext.S,v 1.5 2008/04/28 20:22:56 martin Exp $") | 35 | RCSID("$NetBSD: resumecontext.S,v 1.6 2013/07/16 20:49:42 matt Exp $") | |
36 | #endif /* LIBC_SCCS && !lint */ | 36 | #endif /* LIBC_SCCS && !lint */ | |
37 | 37 | |||
38 | /* | 38 | /* | |
39 | * This assembly-language implementation differs from the (obvious) | 39 | * This assembly-language implementation differs from the (obvious) | |
40 | * C-language implementation only in not clobbering the previous | 40 | * C-language implementation only in not clobbering the previous | |
41 | * function's return address (us), which is the point of the exercise. | 41 | * function's return address (us), which is the point of the exercise. | |
42 | */ | 42 | */ | |
43 | 43 | |||
44 | ENTRY(_resumecontext) | 44 | ENTRY(_resumecontext) | |
45 | subl #(4 + 1024),%sp /* retaddr preservation + ucontext_t */ | 45 | subl #(4 + 1024),%sp /* retaddr preservation + ucontext_t */ | |
46 | lea %sp@,%a0 | 46 | lea (%sp),%a0 | |
47 | movl %a0,%sp@- | 47 | movl %a0,-(%sp) | |
48 | jbsr PIC_PLT(_C_LABEL(_getcontext)) | 48 | jbsr PIC_PLT(_C_LABEL(_getcontext)) | |
49 | movl %sp@(4 + 4),%sp@ /* uc_link */ | 49 | movl (4 + 4)(%sp),(%sp) /* uc_link */ | |
50 | tstl %sp@ /* check for NULL */ | 50 | tstl (%sp) /* check for NULL */ | |
51 | jne 1f | 51 | jne 1f | |
52 | jbsr PIC_PLT(_C_LABEL(exit)) /* cleanly exit(0) */ | 52 | jbsr PIC_PLT(_C_LABEL(exit)) /* cleanly exit(0) */ | |
53 | jmp 2f | 53 | jmp 2f | |
54 | 1: jbsr PIC_PLT(_C_LABEL(setcontext)) | 54 | 1: jbsr PIC_PLT(_C_LABEL(setcontext)) | |
55 | /* NOTREACHED */ | 55 | /* NOTREACHED */ | |
56 | /* But just in case... */ | 56 | /* But just in case... */ | |
57 | 2: movl #-1,%sp@ | 57 | 2: movl #-1,(%sp) | |
58 | jbsr PIC_PLT(_C_LABEL(_exit)) | 58 | jbsr PIC_PLT(_C_LABEL(_exit)) | |
59 | /* NOTREACHED */ | 59 | /* NOTREACHED */ |
--- src/lib/libc/arch/m68k/gen/umulsi3.S 2003/08/07 16:42:12 1.5
+++ src/lib/libc/arch/m68k/gen/umulsi3.S 2013/07/16 20:49:42 1.6
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: umulsi3.S,v 1.5 2003/08/07 16:42:12 agc Exp $ */ | 1 | /* $NetBSD: umulsi3.S,v 1.6 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,22 +29,22 @@ | @@ -29,22 +29,22 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)umulsi3.s 5.1 (Berkeley) 6/7/90") | 40 | RCSID("from: @(#)umulsi3.s 5.1 (Berkeley) 6/7/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: umulsi3.S,v 1.5 2003/08/07 16:42:12 agc Exp $") | 42 | RCSID("$NetBSD: umulsi3.S,v 1.6 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* unsigned * unsigned */ | 46 | /* unsigned * unsigned */ | |
47 | ENTRY(__umulsi3) | 47 | ENTRY(__umulsi3) | |
48 | movel %sp@(4),%d0 | 48 | movel 4(%sp),%d0 | |
49 | mulul %sp@(8),%d0 | 49 | mulul 8(%sp),%d0 | |
50 | rts | 50 | rts |
--- src/lib/libc/arch/m68k/gen/fabs.S 2008/04/28 20:22:56 1.8
+++ src/lib/libc/arch/m68k/gen/fabs.S 2013/07/16 20:49:42 1.9
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: fabs.S,v 1.8 2008/04/28 20:22:56 martin Exp $ */ | 1 | /* $NetBSD: fabs.S,v 1.9 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1996 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1996 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 | 8 | * by | |
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. | |
@@ -21,25 +21,25 @@ | @@ -21,25 +21,25 @@ | |||
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
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 <machine/asm.h> | 32 | #include <machine/asm.h> | |
33 | 33 | |||
34 | RCSID("$NetBSD: fabs.S,v 1.8 2008/04/28 20:22:56 martin Exp $") | 34 | RCSID("$NetBSD: fabs.S,v 1.9 2013/07/16 20:49:42 matt Exp $") | |
35 | 35 | |||
36 | ENTRY(fabs) | 36 | ENTRY(fabs) | |
37 | #if defined(__SVR4_ABI__) && defined(__HAVE_68881__) | 37 | #if defined(__SVR4_ABI__) && defined(__HAVE_68881__) | |
38 | bclr #31,%sp@(4) | 38 | bclr #31,4(%sp) | |
39 | fmoved %sp@(4),%fp0 | 39 | fmoved 4(%sp),%fp0 | |
40 | #else | 40 | #else | |
41 | movl %sp@(4),%d0 | 41 | movl 4(%sp),%d0 | |
42 | movl %sp@(8),%d1 | 42 | movl 8(%sp),%d1 | |
43 | bclr #31,%d0 | 43 | bclr #31,%d0 | |
44 | #endif | 44 | #endif | |
45 | rts | 45 | rts |
--- src/lib/libc/arch/m68k/gen/Attic/fpsetround.S 2002/01/13 21:45:44 1.8
+++ src/lib/libc/arch/m68k/gen/Attic/fpsetround.S 2013/07/16 20:49:42 1.9
@@ -1,23 +1,23 @@ | @@ -1,23 +1,23 @@ | |||
1 | /* $NetBSD: fpsetround.S,v 1.8 2002/01/13 21:45:44 thorpej Exp $ */ | 1 | /* $NetBSD: fpsetround.S,v 1.9 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Written by J.T. Conklin, Apr 6, 1995 | 4 | * Written by J.T. Conklin, Apr 6, 1995 | |
5 | * Public Domain. | 5 | * Public Domain. | |
6 | */ | 6 | */ | |
7 | 7 | |||
8 | #include <machine/asm.h> | 8 | #include <machine/asm.h> | |
9 | 9 | |||
10 | #ifdef WEAK_ALIAS | 10 | #ifdef WEAK_ALIAS | |
11 | WEAK_ALIAS(fpsetround, _fpsetround) | 11 | WEAK_ALIAS(fpsetround, _fpsetround) | |
12 | ENTRY(_fpsetround) | 12 | ENTRY(_fpsetround) | |
13 | #else | 13 | #else | |
14 | ENTRY(fpsetround) | 14 | ENTRY(fpsetround) | |
15 | #endif | 15 | #endif | |
16 | movel %d2,%sp@- | 16 | movel %d2,-(%sp) | |
17 | fmovel %fpcr,%d1 | 17 | fmovel %fpcr,%d1 | |
18 | movel %sp@(8),%d2 | 18 | movel 8(%sp),%d2 | |
19 | bfextu %d1{#26,#2},%d0 | 19 | bfextu %d1{#26,#2},%d0 | |
20 | bfins %d2,%d1{#26:#2} | 20 | bfins %d2,%d1{#26:#2} | |
21 | movel %sp@+,%d2 | 21 | movel (%sp)+,%d2 | |
22 | fmovel %d1,%fpcr | 22 | fmovel %d1,%fpcr | |
23 | rts | 23 | rts |
--- src/lib/libc/arch/m68k/gen/sigsetjmp.S 2006/03/09 16:20:27 1.8
+++ src/lib/libc/arch/m68k/gen/sigsetjmp.S 2013/07/16 20:49:42 1.9
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: sigsetjmp.S,v 1.8 2006/03/09 16:20:27 christos Exp $ */ | 1 | /* $NetBSD: sigsetjmp.S,v 1.9 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,49 +29,49 @@ | @@ -29,49 +29,49 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)_setjmp.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)_setjmp.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: sigsetjmp.S,v 1.8 2006/03/09 16:20:27 christos Exp $") | 42 | RCSID("$NetBSD: sigsetjmp.S,v 1.9 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* | 46 | /* | |
47 | * C library -- sigsetjmp, siglongjmp | 47 | * C library -- sigsetjmp, siglongjmp | |
48 | * | 48 | * | |
49 | * siglongjmp(a,v) | 49 | * siglongjmp(a,v) | |
50 | * will generate a "return(v)" from | 50 | * will generate a "return(v)" from | |
51 | * the last call to | 51 | * the last call to | |
52 | * sigsetjmp(a,m) | 52 | * sigsetjmp(a,m) | |
53 | * by restoring registers from the stack, | 53 | * by restoring registers from the stack, | |
54 | * The previous signal state is restored if 'm' was non-zero. | 54 | * The previous signal state is restored if 'm' was non-zero. | |
55 | */ | 55 | */ | |
56 | 56 | |||
57 | /* grab _JBLEN */ | 57 | /* grab _JBLEN */ | |
58 | #include <m68k/setjmp.h> | 58 | #include <m68k/setjmp.h> | |
59 | 59 | |||
60 | ENTRY(__sigsetjmp14) | 60 | ENTRY(__sigsetjmp14) | |
61 | movl %sp@(8),%d1 /* grab the mask */ | 61 | movl 8(%sp),%d1 /* grab the mask */ | |
62 | movl %sp@(4),%a0 /* grab the area pointer */ | 62 | movl 4(%sp),%a0 /* grab the area pointer */ | |
63 | movl %d1,%a0@(_JBLEN * 4) /* save at end of area */ | 63 | movl %d1,(_JBLEN * 4)(%a0) /* save at end of area */ | |
64 | tstl %d1 | 64 | tstl %d1 | |
65 | bne dosig | 65 | bne dosig | |
66 | jra PIC_PLT(_C_LABEL(_setjmp)) | 66 | jra PIC_PLT(_C_LABEL(_setjmp)) | |
67 | dosig: | 67 | dosig: | |
68 | jra PIC_PLT(_C_LABEL(__setjmp14)) | 68 | jra PIC_PLT(_C_LABEL(__setjmp14)) | |
69 | 69 | |||
70 | 70 | |||
71 | ENTRY(__siglongjmp14) | 71 | ENTRY(__siglongjmp14) | |
72 | movl %sp@(4),%a0 /* save area pointer */ | 72 | movl 4(%sp),%a0 /* save area pointer */ | |
73 | tstl %a0@(_JBLEN * 4) /* check mask... */ | 73 | tstl (_JBLEN * 4)(%a0) /* check mask... */ | |
74 | bne didsig | 74 | bne didsig | |
75 | jra PIC_PLT(_C_LABEL(_longjmp)) | 75 | jra PIC_PLT(_C_LABEL(_longjmp)) | |
76 | didsig: | 76 | didsig: | |
77 | jra PIC_PLT(_C_LABEL(__longjmp14)) | 77 | jra PIC_PLT(_C_LABEL(__longjmp14)) |
--- src/lib/libc/arch/m68k/gen/flt_rounds_softfloat.S 2004/09/26 21:13:27 1.2
+++ src/lib/libc/arch/m68k/gen/flt_rounds_softfloat.S 2013/07/16 20:49:42 1.3
@@ -1,32 +1,32 @@ | @@ -1,32 +1,32 @@ | |||
1 | /* $NetBSD: flt_rounds_softfloat.S,v 1.2 2004/09/26 21:13:27 jmmv Exp $ */ | 1 | /* $NetBSD: flt_rounds_softfloat.S,v 1.3 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Written by J.T. Conklin, Apr 6, 1995 | 4 | * Written by J.T. Conklin, Apr 6, 1995 | |
5 | * Public domain. | 5 | * Public domain. | |
6 | 6 | |||
7 | * Broken by Bruce O'Neel Aug 4 2003 | 7 | * Broken by Bruce O'Neel Aug 4 2003 | |
8 | gcc no longer seems to export fpCCR so this fails. | 8 | gcc no longer seems to export fpCCR so this fails. | |
9 | for now just return 0. | 9 | for now just return 0. | |
10 | */ | 10 | */ | |
11 | 11 | |||
12 | #include <machine/asm.h> | 12 | #include <machine/asm.h> | |
13 | 13 | |||
14 | .text | 14 | .text | |
15 | .even | 15 | .even | |
16 | 16 | |||
17 | /* NB: this is tied to the gcc-2.95 lb1sf68.asm: */ | 17 | /* NB: this is tied to the gcc-2.95 lb1sf68.asm: */ | |
18 | _map: | 18 | _map: | |
19 | .byte 1 /* round to nearest */ | 19 | .byte 1 /* round to nearest */ | |
20 | .byte 0 /* round to zero */ | 20 | .byte 0 /* round to zero */ | |
21 | .byte 2 /* round to positive infinity */ | 21 | .byte 2 /* round to positive infinity */ | |
22 | .byte 3 /* round to negative infinity */ | 22 | .byte 3 /* round to negative infinity */ | |
23 | 23 | |||
24 | ENTRY(__flt_rounds) | 24 | ENTRY(__flt_rounds) | |
25 | /* lea _C_LABEL(_fpCCR),%a0 | check the rounding mode */ | 25 | /* lea _C_LABEL(_fpCCR),%a0 | check the rounding mode */ | |
26 | /* movew %a0@(6),%d0 | rounding mode in d0 */ | 26 | /* movew 6(%a0),%d0 | rounding mode in d0 */ | |
27 | /* lea _map,%a0 */ | 27 | /* lea _map,%a0 */ | |
28 | moveb #0,%d0 | 28 | moveb #0,%d0 | |
29 | rts | 29 | rts | |
30 | 30 | |||
31 | 31 | |||
32 | 32 |
--- src/lib/libc/arch/m68k/gen/setjmp.S 2006/03/09 16:20:27 1.12
+++ src/lib/libc/arch/m68k/gen/setjmp.S 2013/07/16 20:49:42 1.13
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: setjmp.S,v 1.12 2006/03/09 16:20:27 christos Exp $ */ | 1 | /* $NetBSD: setjmp.S,v 1.13 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,65 +29,65 @@ | @@ -29,65 +29,65 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)setjmp.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)setjmp.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: setjmp.S,v 1.12 2006/03/09 16:20:27 christos Exp $") | 42 | RCSID("$NetBSD: setjmp.S,v 1.13 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* | 46 | /* | |
47 | * C library -- setjmp, longjmp | 47 | * C library -- setjmp, longjmp | |
48 | * | 48 | * | |
49 | * longjmp(a,v) | 49 | * longjmp(a,v) | |
50 | * will generate a "return(v)" from | 50 | * will generate a "return(v)" from | |
51 | * the last call to | 51 | * the last call to | |
52 | * setjmp(a) | 52 | * setjmp(a) | |
53 | * by restoring registers from the stack, | 53 | * by restoring registers from the stack, | |
54 | * and a struct sigcontext, see <signal.h> | 54 | * and a struct sigcontext, see <signal.h> | |
55 | */ | 55 | */ | |
56 | 56 | |||
57 | ENTRY(__setjmp14) | 57 | ENTRY(__setjmp14) | |
58 | /* Get signal stack info. Note overlay of ss_sp and ss_size! */ | 58 | /* Get signal stack info. Note overlay of ss_sp and ss_size! */ | |
59 | lea %sp@(-12),%sp /* sizeof(stack_t) */ | 59 | lea -12(%sp),%sp /* sizeof(stack_t) */ | |
60 | clrl %sp@ /* ss = NULL */ | 60 | clrl (%sp) /* ss = NULL */ | |
61 | movl %sp,%sp@(4) /* oss = stack_t on stack */ | 61 | movl %sp,4(%sp) /* oss = stack_t on stack */ | |
62 | jbsr PIC_PLT(_C_LABEL(__sigaltstack14)) | 62 | jbsr PIC_PLT(_C_LABEL(__sigaltstack14)) | |
63 | 63 | |||
64 | movl %sp@(8),%d0 /* ss_flags */ | 64 | movl 8(%sp),%d0 /* ss_flags */ | |
65 | andl #1,%d0 /* extract SS_ONSTACK */ | 65 | andl #1,%d0 /* extract SS_ONSTACK */ | |
66 | lea %sp@(12),%sp /* pop stack_t */ | 66 | lea 12(%sp),%sp /* pop stack_t */ | |
67 | 67 | |||
68 | /* Get pointer to jmp_buf; a sigcontext is at the beginning. */ | 68 | /* Get pointer to jmp_buf; a sigcontext is at the beginning. */ | |
69 | movl %sp@(4),%a0 | 69 | movl 4(%sp),%a0 | |
70 | movl %d0,%a0@ /* store onstack */ | 70 | movl %d0,(%a0) /* store onstack */ | |
71 | clrl %a0@(4) /* unused word (old style signal mask) */ | 71 | clrl 4(%a0) /* unused word (old style signal mask) */ | |
72 | 72 | |||
73 | /* Get the signal mask. */ | 73 | /* Get the signal mask. */ | |
74 | pea %a0@(28) /* oset = &sc.sc_mask */ | 74 | pea 28(%a0) /* oset = &sc.sc_mask */ | |
75 | movl #0,%sp@- /* set = NULL */ | 75 | movl #0,-(%sp) /* set = NULL */ | |
76 | movl #0,%sp@- /* action = 0 <ignored> */ | 76 | movl #0,-(%sp) /* action = 0 <ignored> */ | |
77 | jbsr PIC_PLT(_C_LABEL(__sigprocmask14)) | 77 | jbsr PIC_PLT(_C_LABEL(__sigprocmask14)) | |
78 | addl #12,%sp | 78 | addl #12,%sp | |
79 | 79 | |||
80 | movl %sp@(4),%a0 /* get jmp_buf pointer again */ | 80 | movl 4(%sp),%a0 /* get jmp_buf pointer again */ | |
81 | lea %sp@(4),%a1 /* adjust SP since we won't rts */ | 81 | lea 4(%sp),%a1 /* adjust SP since we won't rts */ | |
82 | movl %a1,%a0@(8) /* save SP */ | 82 | movl %a1,8(%a0) /* save SP */ | |
83 | movl %a6,%a0@(12) /* save FP */ | 83 | movl %a6,12(%a0) /* save FP */ | |
84 | clrl %a0@(16) /* no AP */ | 84 | clrl 16(%a0) /* no AP */ | |
85 | movl %sp@,%a0@(20) /* save return PC */ | 85 | movl (%sp),20(%a0) /* save return PC */ | |
86 | clrl %a0@(24) /* clear PS */ | 86 | clrl 24(%a0) /* clear PS */ | |
87 | 87 | |||
88 | /* Save remaining non-scratch regs after signal mask. */ | 88 | /* Save remaining non-scratch regs after signal mask. */ | |
89 | moveml #0x3CFC,%a0@(44) | 89 | moveml #0x3CFC,44(%a0) | |
90 | 90 | |||
91 | clrl %d0 /* return 0 */ | 91 | clrl %d0 /* return 0 */ | |
92 | rts | 92 | rts | |
93 | 93 |
--- src/lib/libc/arch/m68k/gen/swapcontext.S 2008/04/28 20:22:56 1.3
+++ src/lib/libc/arch/m68k/gen/swapcontext.S 2013/07/16 20:49:42 1.4
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: swapcontext.S,v 1.3 2008/04/28 20:22:56 martin Exp $ */ | 1 | /* $NetBSD: swapcontext.S,v 1.4 2013/07/16 20:49:42 matt 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 Klaus Klein. | 8 | * by Klaus Klein. | |
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,28 @@ | @@ -22,28 +22,28 @@ | |||
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.h" | 32 | #include "SYS.h" | |
33 | 33 | |||
34 | #if defined(LIBC_SCCS) && !defined(lint) | 34 | #if defined(LIBC_SCCS) && !defined(lint) | |
35 | RCSID("$NetBSD: swapcontext.S,v 1.3 2008/04/28 20:22:56 martin Exp $") | 35 | RCSID("$NetBSD: swapcontext.S,v 1.4 2013/07/16 20:49:42 matt Exp $") | |
36 | #endif /* LIBC_SCCS && !lint */ | 36 | #endif /* LIBC_SCCS && !lint */ | |
37 | 37 | |||
38 | ENTRY(swapcontext) | 38 | ENTRY(swapcontext) | |
39 | movl %sp@(4),%sp@- | push oucp on stack | 39 | movl 4(%sp),-(%sp) | push oucp on stack | |
40 | jbsr PIC_PLT(_C_LABEL(_getcontext)) | getcontext(oucp) | 40 | jbsr PIC_PLT(_C_LABEL(_getcontext)) | getcontext(oucp) | |
41 | tstl %d0 | OK? | 41 | tstl %d0 | OK? | |
42 | jne L1 | 42 | jne L1 | |
43 | movl %sp@,%a0 | 43 | movl (%sp),%a0 | |
44 | addql #8,%a0@(96) | adjust saved stack pointer (again) | 44 | addql #8,96(%a0) | adjust saved stack pointer (again) | |
45 | movl %sp@(4),%a0@(100) | adjust saved program counter (again) | 45 | movl 4(%sp),100(%a0) | adjust saved program counter (again) | |
46 | movl %sp@(12),%sp@ | push ucp on stack | 46 | movl 12(%sp),(%sp) | push ucp on stack | |
47 | jbsr PIC_PLT(_C_LABEL(setcontext)) | setcontext(ucp) | 47 | jbsr PIC_PLT(_C_LABEL(setcontext)) | setcontext(ucp) | |
48 | L1: addql #4,%sp | pop ucp | 48 | L1: addql #4,%sp | pop ucp | |
49 | rts | 49 | rts |
--- src/lib/libc/arch/m68k/quad/ashldi3.S 2008/04/28 20:22:56 1.4
+++ src/lib/libc/arch/m68k/quad/ashldi3.S 2013/07/16 20:49:42 1.5
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ashldi3.S,v 1.4 2008/04/28 20:22:56 martin Exp $ */ | 1 | /* $NetBSD: ashldi3.S,v 1.5 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1996 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1996 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 J.T. Conklin. | 8 | * by J.T. Conklin. | |
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. | |
@@ -27,34 +27,34 @@ | @@ -27,34 +27,34 @@ | |||
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 <machine/asm.h> | 32 | #include <machine/asm.h> | |
33 | 33 | |||
34 | | d0 msw | 34 | | d0 msw | |
35 | | d1 lsw | 35 | | d1 lsw | |
36 | | d2 shift | 36 | | d2 shift | |
37 | | d3 offset (32 - shift) | 37 | | d3 offset (32 - shift) | |
38 | 38 | |||
39 | ENTRY(__ashldi3) | 39 | ENTRY(__ashldi3) | |
40 | link %a6,#0 | 40 | link %fp,#0 | |
41 | moveml %d2-%d4,%sp@- | 41 | moveml %d2-%d4,-(%sp) | |
42 | movel %a6@(8),%d0 | 42 | movel 8(%fp),%d0 | |
43 | movel %a6@(12),%d1 | 43 | movel 12(%fp),%d1 | |
44 | movel %a6@(16),%d2 | 44 | movel 16(%fp),%d2 | |
45 | moveq #32,%d3 | 45 | moveq #32,%d3 | |
46 | subl %d2,%d3 | 46 | subl %d2,%d3 | |
47 | jgt L2 | 47 | jgt L2 | |
48 | negl %d3 | 48 | negl %d3 | |
49 | movel %d1,%d0 | 49 | movel %d1,%d0 | |
50 | asll %d3,%d0 | 50 | asll %d3,%d0 | |
51 | clrl %d1 | 51 | clrl %d1 | |
52 | jra L3 | 52 | jra L3 | |
53 | L2: asll %d2,%d0 | 53 | L2: asll %d2,%d0 | |
54 | movel %d1,%d4 | 54 | movel %d1,%d4 | |
55 | lsrl %d3,%d4 | 55 | lsrl %d3,%d4 | |
56 | orl %d4,%d0 | 56 | orl %d4,%d0 | |
57 | asll %d2,%d1 | 57 | asll %d2,%d1 | |
58 | L3: moveml %a6@(-12),%d2-%d4 | 58 | L3: moveml -12(%fp),%d2-%d4 | |
59 | unlk %a6 | 59 | unlk %fp | |
60 | rts | 60 | rts |
--- src/lib/libc/arch/m68k/quad/ashrdi3.S 2008/04/28 20:22:56 1.4
+++ src/lib/libc/arch/m68k/quad/ashrdi3.S 2013/07/16 20:49:42 1.5
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ashrdi3.S,v 1.4 2008/04/28 20:22:56 martin Exp $ */ | 1 | /* $NetBSD: ashrdi3.S,v 1.5 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1996 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1996 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 J.T. Conklin. | 8 | * by J.T. Conklin. | |
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. | |
@@ -27,35 +27,35 @@ | @@ -27,35 +27,35 @@ | |||
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 <machine/asm.h> | 32 | #include <machine/asm.h> | |
33 | 33 | |||
34 | | d0 msw | 34 | | d0 msw | |
35 | | d1 lsw | 35 | | d1 lsw | |
36 | | d2 shift | 36 | | d2 shift | |
37 | | d3 offset (32 - shift) | 37 | | d3 offset (32 - shift) | |
38 | 38 | |||
39 | ENTRY(__ashrdi3) | 39 | ENTRY(__ashrdi3) | |
40 | link %a6,#0 | 40 | link %fp,#0 | |
41 | moveml %d2-%d4,%sp@- | 41 | moveml %d2-%d4,-(%sp) | |
42 | movel %a6@(8),%d0 | 42 | movel 8(%fp),%d0 | |
43 | movel %a6@(12),%d1 | 43 | movel 12(%fp),%d1 | |
44 | movel %a6@(16),%d2 | 44 | movel 16(%fp),%d2 | |
45 | moveq #32,%d3 | 45 | moveq #32,%d3 | |
46 | subl %d2,%d3 | 46 | subl %d2,%d3 | |
47 | jgt L2 | 47 | jgt L2 | |
48 | negl %d3 | 48 | negl %d3 | |
49 | movel %d0,%d1 | 49 | movel %d0,%d1 | |
50 | asrl %d3,%d1 | 50 | asrl %d3,%d1 | |
51 | smi %d0 | 51 | smi %d0 | |
52 | extbl %d0 | 52 | extbl %d0 | |
53 | jra L3 | 53 | jra L3 | |
54 | L2: lsrl %d2,%d1 | 54 | L2: lsrl %d2,%d1 | |
55 | movel %d0,%d4 | 55 | movel %d0,%d4 | |
56 | asll %d3,%d4 | 56 | asll %d3,%d4 | |
57 | orl %d4,%d1 | 57 | orl %d4,%d1 | |
58 | asrl %d2,%d0 | 58 | asrl %d2,%d0 | |
59 | L3: moveml %a6@(-12),%d2-%d4 | 59 | L3: moveml -12(%fp),%d2-%d4 | |
60 | unlk %a6 | 60 | unlk %fp | |
61 | rts | 61 | rts |
--- src/lib/libc/arch/m68k/quad/lshrdi3.S 2008/04/28 20:22:56 1.5
+++ src/lib/libc/arch/m68k/quad/lshrdi3.S 2013/07/16 20:49:42 1.6
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: lshrdi3.S,v 1.5 2008/04/28 20:22:56 martin Exp $ */ | 1 | /* $NetBSD: lshrdi3.S,v 1.6 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1996 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1996 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 J.T. Conklin. | 8 | * by J.T. Conklin. | |
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. | |
@@ -27,34 +27,34 @@ | @@ -27,34 +27,34 @@ | |||
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 <machine/asm.h> | 32 | #include <machine/asm.h> | |
33 | 33 | |||
34 | | d0 msw | 34 | | d0 msw | |
35 | | d1 lsw | 35 | | d1 lsw | |
36 | | d2 shift | 36 | | d2 shift | |
37 | | d3 offset (32 - shift) | 37 | | d3 offset (32 - shift) | |
38 | 38 | |||
39 | ENTRY(__lshrdi3) | 39 | ENTRY(__lshrdi3) | |
40 | link %a6,#0 | 40 | link %fp,#0 | |
41 | moveml %d2-%d4,%sp@- | 41 | moveml %d2-%d4,-(%sp) | |
42 | movel %a6@(8),%d0 | 42 | movel 8(%fp),%d0 | |
43 | movel %a6@(12),%d1 | 43 | movel 12(%fp),%d1 | |
44 | movel %a6@(16),%d2 | 44 | movel 16(%fp),%d2 | |
45 | moveq #32,%d3 | 45 | moveq #32,%d3 | |
46 | subl %d2,%d3 | 46 | subl %d2,%d3 | |
47 | jgt L2 | 47 | jgt L2 | |
48 | negl %d3 | 48 | negl %d3 | |
49 | movel %d0,%d1 | 49 | movel %d0,%d1 | |
50 | lsrl %d3,%d1 | 50 | lsrl %d3,%d1 | |
51 | clrl %d0 | 51 | clrl %d0 | |
52 | jra L3 | 52 | jra L3 | |
53 | L2: lsrl %d2,%d1 | 53 | L2: lsrl %d2,%d1 | |
54 | movel %d0,%d4 | 54 | movel %d0,%d4 | |
55 | asll %d3,%d4 | 55 | asll %d3,%d4 | |
56 | orl %d4,%d1 | 56 | orl %d4,%d1 | |
57 | lsrl %d2,%d0 | 57 | lsrl %d2,%d0 | |
58 | L3: moveml %a6@(-12),%d2-%d4 | 58 | L3: moveml -12(%fp),%d2-%d4 | |
59 | unlk %a6 | 59 | unlk %fp | |
60 | rts | 60 | rts |
--- src/lib/libc/arch/m68k/stdlib/abs.S 2003/08/07 16:42:12 1.6
+++ src/lib/libc/arch/m68k/stdlib/abs.S 2013/07/16 20:49:42 1.7
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: abs.S,v 1.6 2003/08/07 16:42:12 agc Exp $ */ | 1 | /* $NetBSD: abs.S,v 1.7 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,30 +29,30 @@ | @@ -29,30 +29,30 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)abs.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)abs.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: abs.S,v 1.6 2003/08/07 16:42:12 agc Exp $") | 42 | RCSID("$NetBSD: abs.S,v 1.7 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* labs - long int absolute value */ | 46 | /* labs - long int absolute value */ | |
47 | 47 | |||
48 | ENTRY_NOPROFILE(labs) | 48 | ENTRY_NOPROFILE(labs) | |
49 | /* fall through to: */ | 49 | /* fall through to: */ | |
50 | 50 | |||
51 | /* abs - int absolute value */ | 51 | /* abs - int absolute value */ | |
52 | 52 | |||
53 | ENTRY(abs) | 53 | ENTRY(abs) | |
54 | movl %sp@(4),%d0 | 54 | movl 4(%sp),%d0 | |
55 | jge L1 | 55 | jge L1 | |
56 | negl %d0 | 56 | negl %d0 | |
57 | L1: | 57 | L1: | |
58 | rts | 58 | rts |
--- src/lib/libc/arch/m68k/stdlib/llabs.S 2008/08/04 21:29:28 1.4
+++ src/lib/libc/arch/m68k/stdlib/llabs.S 2013/07/16 20:49:42 1.5
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: llabs.S,v 1.4 2008/08/04 21:29:28 matt Exp $ */ | 1 | /* $NetBSD: llabs.S,v 1.5 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,35 +29,35 @@ | @@ -29,35 +29,35 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <machine/asm.h> | 36 | #include <machine/asm.h> | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)abs.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)abs.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: llabs.S,v 1.4 2008/08/04 21:29:28 matt Exp $") | 42 | RCSID("$NetBSD: llabs.S,v 1.5 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | #ifdef WEAK_ALIAS | 46 | #ifdef WEAK_ALIAS | |
47 | WEAK_ALIAS(llabs, _llabs) | 47 | WEAK_ALIAS(llabs, _llabs) | |
48 | WEAK_ALIAS(imaxabs, _llabs) | 48 | WEAK_ALIAS(imaxabs, _llabs) | |
49 | #endif | 49 | #endif | |
50 | /* llabs - long long int absolute value */ | 50 | /* llabs - long long int absolute value */ | |
51 | 51 | |||
52 | #ifdef WEAK_ALIAS | 52 | #ifdef WEAK_ALIAS | |
53 | ENTRY(_llabs) | 53 | ENTRY(_llabs) | |
54 | #else | 54 | #else | |
55 | ENTRY(llabs) | 55 | ENTRY(llabs) | |
56 | #endif | 56 | #endif | |
57 | movl %sp@(8),%d1 | 57 | movl 8(%sp),%d1 | |
58 | movl %sp@(4),%d0 | 58 | movl 4(%sp),%d0 | |
59 | jge L1 | 59 | jge L1 | |
60 | negl %d1 | 60 | negl %d1 | |
61 | negxl %d0 | 61 | negxl %d0 | |
62 | L1: | 62 | L1: | |
63 | rts | 63 | rts |
--- src/lib/libc/arch/m68k/string/memccpy.S 2001/02/05 00:17:22 1.1
+++ src/lib/libc/arch/m68k/string/memccpy.S 2013/07/16 20:49:42 1.2
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: memccpy.S,v 1.1 2001/02/05 00:17:22 scottr Exp $ */ | 1 | /* $NetBSD: memccpy.S,v 1.2 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (C) 1999 Scott Reynolds. All rights reserved. | 4 | * Copyright (C) 1999 Scott Reynolds. All rights reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * 3. The name of the author may not be used to endorse or promote products | 14 | * 3. The name of the author may not be used to endorse or promote products | |
@@ -19,64 +19,64 @@ | @@ -19,64 +19,64 @@ | |||
19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | |
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | |
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
27 | */ | 27 | */ | |
28 | 28 | |||
29 | #include <machine/asm.h> | 29 | #include <machine/asm.h> | |
30 | 30 | |||
31 | #if defined(LIBC_SCCS) && !defined(lint) | 31 | #if defined(LIBC_SCCS) && !defined(lint) | |
32 | RCSID("$NetBSD: memccpy.S,v 1.1 2001/02/05 00:17:22 scottr Exp $") | 32 | RCSID("$NetBSD: memccpy.S,v 1.2 2013/07/16 20:49:42 matt Exp $") | |
33 | #endif /* LIBC_SCCS and not lint */ | 33 | #endif /* LIBC_SCCS and not lint */ | |
34 | 34 | |||
35 | ENTRY(memccpy) | 35 | ENTRY(memccpy) | |
36 | movl %sp@(16),%d0 | count | 36 | movl 16(%sp),%d0 | count | |
37 | jeq Lmcbail | nothing to do | 37 | jeq Lmcbail | nothing to do | |
38 | 38 | |||
39 | movl %sp@(4),%a0 | a0 = toaddr | 39 | movl 4(%sp),%a0 | a0 = toaddr | |
40 | subql #1,%d0 | prepare count for DBcc loop | 40 | subql #1,%d0 | prepare count for DBcc loop | |
41 | movl %sp@(8),%a1 | a1 = fromaddr | 41 | movl 8(%sp),%a1 | a1 = fromaddr | |
42 | movl %sp@(12),%d1 | d1 = terminator | 42 | movl 12(%sp),%d1 | d1 = terminator | |
43 | jeq Lmcloop | handle ASCII NUL specially | 43 | jeq Lmcloop | handle ASCII NUL specially | |
44 | 44 | |||
45 | movl %d2,%sp@- | save scratch register | 45 | movl %d2,-(%sp) | save scratch register | |
46 | Lmcnzloop: | 46 | Lmcnzloop: | |
47 | movb %a1@+,%d2 | move a byte | 47 | movb (%a1)+,%d2 | move a byte | |
48 | movb %d2,%a0@+ | 48 | movb %d2,(%a0)+ | |
49 | cmpb %d2,%d1 | found the terminator? | 49 | cmpb %d2,%d1 | found the terminator? | |
50 | dbeq %d0,Lmcnzloop | if not, keep transferring, | 50 | dbeq %d0,Lmcnzloop | if not, keep transferring, | |
51 | jeq Lmcnzdone | otherwise done | 51 | jeq Lmcnzdone | otherwise done | |
52 | clrw %d0 | check to see if more to do | 52 | clrw %d0 | check to see if more to do | |
53 | subql #1,%d0 | 53 | subql #1,%d0 | |
54 | jcc Lmcnzloop | yes, keep going... | 54 | jcc Lmcnzloop | yes, keep going... | |
55 | 55 | |||
56 | movl %sp@+,%d2 | restore scratch register | 56 | movl (%sp)+,%d2 | restore scratch register | |
57 | movql #0,%d0 | no terminator found, return NULL | 57 | movql #0,%d0 | no terminator found, return NULL | |
58 | #ifdef __SVR4_ABI__ | 58 | #ifdef __SVR4_ABI__ | |
59 | movl %d0,%a0 | XXX maybe use lea to avoid stall? | 59 | movl %d0,%a0 | XXX maybe use lea to avoid stall? | |
60 | #endif | 60 | #endif | |
61 | rts | 61 | rts | |
62 | 62 | |||
63 | Lmcloop: | 63 | Lmcloop: | |
64 | movb %a1@+,%a0@+ | move a byte; was it NUL? | 64 | movb (%a1)+,(%a0)+ | move a byte; was it NUL? | |
65 | dbeq %d0,Lmcloop | if not, keep transferring, | 65 | dbeq %d0,Lmcloop | if not, keep transferring, | |
66 | jeq Lmcdone | otherwise done | 66 | jeq Lmcdone | otherwise done | |
67 | clrw %d0 | check to see if more to do | 67 | clrw %d0 | check to see if more to do | |
68 | subql #1,%d0 | 68 | subql #1,%d0 | |
69 | jcc Lmcloop | yes, keep going... | 69 | jcc Lmcloop | yes, keep going... | |
70 | | Note: %d0 is now -1! | 70 | | Note: %d0 is now -1! | |
71 | movql #0,%d0 | no terminator found, return NULL | 71 | movql #0,%d0 | no terminator found, return NULL | |
72 | Lmcbail: | 72 | Lmcbail: | |
73 | #ifdef __SVR4_ABI__ | 73 | #ifdef __SVR4_ABI__ | |
74 | movl %d0,%a0 | XXX maybe use lea to avoid stall? | 74 | movl %d0,%a0 | XXX maybe use lea to avoid stall? | |
75 | #endif | 75 | #endif | |
76 | rts | 76 | rts | |
77 | 77 | |||
78 | Lmcnzdone: | 78 | Lmcnzdone: | |
79 | movl %sp@+,%d2 | restore scratch register | 79 | movl (%sp)+,%d2 | restore scratch register | |
80 | Lmcdone: | 80 | Lmcdone: | |
81 | movl %a0,%d0 | 81 | movl %a0,%d0 | |
82 | rts | 82 | rts |
--- src/lib/libc/arch/m68k/string/swab.S 1999/10/25 23:48:16 1.7
+++ src/lib/libc/arch/m68k/string/swab.S 2013/07/16 20:49:42 1.8
@@ -1,20 +1,20 @@ | @@ -1,20 +1,20 @@ | |||
1 | /* $NetBSD: swab.S,v 1.7 1999/10/25 23:48:16 thorpej Exp $ */ | 1 | /* $NetBSD: swab.S,v 1.8 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | #include <machine/asm.h> | 3 | #include <machine/asm.h> | |
4 | 4 | |||
5 | ENTRY(swab) | 5 | ENTRY(swab) | |
6 | movl %sp@(4),%a0 | source | 6 | movl 4(%sp),%a0 | source | |
7 | movl %sp@(8),%a1 | destination | 7 | movl 8(%sp),%a1 | destination | |
8 | movl %sp@(12),%d0 | count | 8 | movl 12(%sp),%d0 | count | |
9 | lsrl #1,%d0 | count is in bytes; we need words | 9 | lsrl #1,%d0 | count is in bytes; we need words | |
10 | jeq swdone | 10 | jeq swdone | |
11 | 11 | |||
12 | swloop: | 12 | swloop: | |
13 | movw %a0@+,%d1 | 13 | movw (%a0)+,%d1 | |
14 | rorw #8,%d1 | 14 | rorw #8,%d1 | |
15 | movw %d1,%a1@+ | 15 | movw %d1,(%a1)+ | |
16 | subql #1,%d0 | 16 | subql #1,%d0 | |
17 | jne swloop | 17 | jne swloop | |
18 | 18 | |||
19 | swdone: | 19 | swdone: | |
20 | rts | 20 | rts |
--- src/lib/libc/arch/m68k/sys/__clone.S 2008/04/28 20:22:56 1.3
+++ src/lib/libc/arch/m68k/sys/__clone.S 2013/07/16 20:49:42 1.4
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: __clone.S,v 1.3 2008/04/28 20:22:56 martin Exp $ */ | 1 | /* $NetBSD: __clone.S,v 1.4 2013/07/16 20:49:42 matt 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 Steve C. Woodford. | 8 | * by Steve C. Woodford. | |
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. | |
@@ -30,36 +30,36 @@ | @@ -30,36 +30,36 @@ | |||
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 | #ifdef WEAK_ALIAS | 35 | #ifdef WEAK_ALIAS | |
36 | WEAK_ALIAS(clone, __clone) | 36 | WEAK_ALIAS(clone, __clone) | |
37 | #endif | 37 | #endif | |
38 | 38 | |||
39 | /* | 39 | /* | |
40 | * int clone(int (*fn)(void *), void *stack, int flags, void *arg); | 40 | * int clone(int (*fn)(void *), void *stack, int flags, void *arg); | |
41 | */ | 41 | */ | |
42 | ENTRY(__clone) | 42 | ENTRY(__clone) | |
43 | movl %sp@(4),%d0 /* NULL function pointer? */ | 43 | movl 4(%sp),%d0 /* NULL function pointer? */ | |
44 | jeq 2f /* Yup, bomb out */ | 44 | jeq 2f /* Yup, bomb out */ | |
45 | movl %d0,%a1 | 45 | movl %d0,%a1 | |
46 | movl %sp@(8),%d0 /* NULL stack? */ | 46 | movl 8(%sp),%d0 /* NULL stack? */ | |
47 | jeq 2f /* Yup, bomb out */ | 47 | jeq 2f /* Yup, bomb out */ | |
48 | movl %d0,%a0 | 48 | movl %d0,%a0 | |
49 | movl %sp@(16),%a0@- /* Push clone's `arg' on its new stack */ | 49 | movl 16(%sp),-(%a0) /* Push clone's `arg' on its new stack */ | |
50 | lea %a0@(-12),%a0 /* Fake syscall args for the clone */ | 50 | lea -12(%a0),%a0 /* Fake syscall args for the clone */ | |
51 | movl %a0,%sp@- /* Syscall arg: stack */ | 51 | movl %a0,-(%sp) /* Syscall arg: stack */ | |
52 | movl %sp@(16),%sp@- /* Syscall arg: flags */ | 52 | movl 16(%sp),-(%sp) /* Syscall arg: flags */ | |
53 | clrl %sp@- /* Fake return address */ | 53 | clrl -(%sp) /* Fake return address */ | |
54 | SYSTRAP(__clone) /* Note: `fn' in a1@ is preserved */ | 54 | SYSTRAP(__clone) /* Note: `fn' in (a1) is preserved */ | |
55 | lea %sp@(12),%sp /* Zap syscall args */ | 55 | lea 12(%sp),%sp /* Zap syscall args */ | |
56 | jcs 3f /* Punt if syscall failed */ | 56 | jcs 3f /* Punt if syscall failed */ | |
57 | tstl %d0 | 57 | tstl %d0 | |
58 | jne 1f /* We're the parent, just return. */ | 58 | jne 1f /* We're the parent, just return. */ | |
59 | jsr %a1@ /* We're the clone, call the function */ | 59 | jsr (%a1) /* We're the clone, call the function */ | |
60 | movl %d0,%sp@- /* If clone returns, invoke _exit(3) */ | 60 | movl %d0,-(%sp) /* If clone returns, invoke _exit(3) */ | |
61 | jbsr PIC_PLT(_C_LABEL(_exit)) | 61 | jbsr PIC_PLT(_C_LABEL(_exit)) | |
62 | /* NOTREACHED */ | 62 | /* NOTREACHED */ | |
63 | 1: rts | 63 | 1: rts | |
64 | 2: movl #EINVAL,%d0 | 64 | 2: movl #EINVAL,%d0 | |
65 | 3: jra PIC_PLT(CERROR) | 65 | 3: jra PIC_PLT(CERROR) |
--- src/lib/libc/arch/m68k/sys/getcontext.S 2008/04/28 20:22:56 1.3
+++ src/lib/libc/arch/m68k/sys/getcontext.S 2013/07/16 20:49:42 1.4
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: getcontext.S,v 1.3 2008/04/28 20:22:56 martin Exp $ */ | 1 | /* $NetBSD: getcontext.S,v 1.4 2013/07/16 20:49:42 matt 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 Klaus Klein. | 8 | * by Klaus Klein. | |
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,26 +22,26 @@ | @@ -22,26 +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.h" | 32 | #include "SYS.h" | |
33 | 33 | |||
34 | #if defined(SYSLIBC_SCCS) && !defined(lint) | 34 | #if defined(SYSLIBC_SCCS) && !defined(lint) | |
35 | RCSID("$NetBSD: getcontext.S,v 1.3 2008/04/28 20:22:56 martin Exp $") | 35 | RCSID("$NetBSD: getcontext.S,v 1.4 2013/07/16 20:49:42 matt Exp $") | |
36 | #endif /* SYSLIBC_SCCS && !lint */ | 36 | #endif /* SYSLIBC_SCCS && !lint */ | |
37 | 37 | |||
38 | #ifdef WEAK_ALIAS | 38 | #ifdef WEAK_ALIAS | |
39 | WEAK_ALIAS(getcontext, _getcontext) | 39 | WEAK_ALIAS(getcontext, _getcontext) | |
40 | #endif | 40 | #endif | |
41 | 41 | |||
42 | _SYSCALL(_getcontext,getcontext) | 42 | _SYSCALL(_getcontext,getcontext) | |
43 | movl %sp@(4),%a0 | 43 | movl 4(%sp),%a0 | |
44 | addql #4,%a0@(96) | adjust saved stack pointer | 44 | addql #4,96(%a0) | adjust saved stack pointer | |
45 | movl %sp@,%a0@(100) | adjust saved program counter | 45 | movl (%sp),100(%a0) | adjust saved program counter | |
46 | clrl %a0@(36) | arrange for return value of 0 | 46 | clrl 36(%a0) | arrange for return value of 0 | |
47 | rts | 47 | rts |
--- src/lib/libc/arch/m68k/sys/__sigtramp2.S 2008/05/02 18:34:17 1.2
+++ src/lib/libc/arch/m68k/sys/__sigtramp2.S 2013/07/16 20:49:42 1.3
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: __sigtramp2.S,v 1.2 2008/05/02 18:34:17 martin Exp $ */ | 1 | /* $NetBSD: __sigtramp2.S,v 1.3 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2003 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2003 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -31,20 +31,20 @@ | @@ -31,20 +31,20 @@ | |||
31 | /* | 31 | /* | |
32 | * The m68k signal trampoline is invoked only to return from | 32 | * The m68k signal trampoline is invoked only to return from | |
33 | * the signal; the kernel calls the signal handler directly. | 33 | * the signal; the kernel calls the signal handler directly. | |
34 | * | 34 | * | |
35 | * On entry, stack looks like: | 35 | * On entry, stack looks like: | |
36 | * | 36 | * | |
37 | * ucontext structure [12+sizeof(siginfo_t)] | 37 | * ucontext structure [12+sizeof(siginfo_t)] | |
38 | * siginfo structure [12] | 38 | * siginfo structure [12] | |
39 | * pointer to ucontext structure [8] | 39 | * pointer to ucontext structure [8] | |
40 | * pointer to siginfo structure [4] | 40 | * pointer to siginfo structure [4] | |
41 | * sp-> signal number [0] | 41 | * sp-> signal number [0] | |
42 | */ | 42 | */ | |
43 | ENTRY_NOPROFILE(__sigtramp_siginfo_2) | 43 | ENTRY_NOPROFILE(__sigtramp_siginfo_2) | |
44 | movl %sp@(8),%a0 /* get pointer to ucontext */ | 44 | movl 8(%sp),%a0 /* get pointer to ucontext */ | |
45 | movl %a0,%sp@(4) /* put it in the argument slot */ | 45 | movl %a0,4(%sp) /* put it in the argument slot */ | |
46 | /* fake return address already there */ | 46 | /* fake return address already there */ | |
47 | movl #SYS_setcontext,%d0 | 47 | movl #SYS_setcontext,%d0 | |
48 | trap #0 | 48 | trap #0 | |
49 | movl %d0,%sp@(4) /* error code */ | 49 | movl %d0,4(%sp) /* error code */ | |
50 | SYSTRAP(exit) /* exit */ | 50 | SYSTRAP(exit) /* exit */ |
--- src/lib/libc/arch/m68k/sys/__vfork14.S 2003/08/07 16:42:14 1.9
+++ src/lib/libc/arch/m68k/sys/__vfork14.S 2013/07/16 20:49:42 1.10
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: __vfork14.S,v 1.9 2003/08/07 16:42:14 agc Exp $ */ | 1 | /* $NetBSD: __vfork14.S,v 1.10 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,79 +29,66 @@ | @@ -29,79 +29,66 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include "SYS.h" | 36 | #include "SYS.h" | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)Ovfork.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)Ovfork.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: __vfork14.S,v 1.9 2003/08/07 16:42:14 agc Exp $") | 42 | RCSID("$NetBSD: __vfork14.S,v 1.10 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | /* | 46 | /* | |
47 | * @(#)vfork.s 4.1 (Berkeley) 12/21/80 | 47 | * @(#)vfork.s 4.1 (Berkeley) 12/21/80 | |
48 | * C library -- vfork | 48 | * C library -- vfork | |
49 | */ | 49 | */ | |
50 | 50 | |||
51 | /* | 51 | /* | |
52 | * pid = vfork(); | 52 | * pid = vfork(); | |
53 | * | 53 | * | |
54 | * d1 == 0 in parent process, d1 == 1 in child process. | 54 | * d1 == 0 in parent process, d1 == 1 in child process. | |
55 | * d0 == pid of child in parent, d0 == pid of parent in child. | 55 | * d0 == pid of child in parent, d0 == pid of parent in child. | |
56 | * | 56 | * | |
57 | * trickery here, due to keith sklower, uses ret to clear the stack, | 57 | * trickery here, due to keith sklower, uses ret to clear the stack, | |
58 | * and then returns with a jump indirect, since only one person can return | 58 | * and then returns with a jump indirect, since only one person can return | |
59 | * with a ret off this stack... we do the ret before we vfork! | 59 | * with a ret off this stack... we do the ret before we vfork! | |
60 | */ | 60 | */ | |
61 | 61 | |||
62 | ENTRY(__vfork14) | 62 | ENTRY(__vfork14) | |
63 | movl %sp@+,%a1 | 63 | movl (%sp)+,%a1 | |
64 | movl #SYS___vfork14,%d0 | 64 | movl #SYS___vfork14,%d0 | |
65 | trap #0 | 65 | trap #0 | |
66 | jcs err | 66 | jcs err | |
67 | subql #1,%d1 /* from 1 to 0 in child, 0 to -1 in parent */ | 67 | subql #1,%d1 /* from 1 to 0 in child, 0 to -1 in parent */ | |
68 | andl %d1,%d0 | 68 | andl %d1,%d0 | |
69 | jmp %a1@ | 69 | jmp (%a1) | |
70 | err: | 70 | err: | |
71 | #ifdef _REENTRANT | 71 | #ifdef _REENTRANT | |
72 | .globl _C_LABEL(__errno) | 72 | .globl _C_LABEL(__errno) | |
73 | movl %a1,%sp@- | 73 | movl %a1,-(%sp) | |
74 | movl %d0,%sp@- | 74 | movl %d0,-(%sp) | |
75 | #if defined(PIC) && !defined(__ELF__) | |||
76 | movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a1 | |||
77 | lea %pc@(0,a1:l),%a1 | |||
78 | movl %a1@(_C_LABEL(__errno):l),%a1 | |||
79 | jsr %a1@ | |||
80 | #else | |||
81 | jbsr PIC_PLT(_C_LABEL(__errno)) | 75 | jbsr PIC_PLT(_C_LABEL(__errno)) | |
82 | #endif /* PIC */ | |||
83 | #ifdef __SVR4_ABI__ | 76 | #ifdef __SVR4_ABI__ | |
84 | movl %sp@+,%a0@ | 77 | movl (%sp)+,(%a0) | |
85 | #else | 78 | #else | |
86 | movl %d0,%a1 | 79 | movl %d0,%a1 | |
87 | movl %sp@+,%a1@ | 80 | movl (%sp)+,(%a1) | |
88 | #endif | 81 | #endif | |
89 | movl %sp@+,%a1 | 82 | movl (%sp)+,%a1 | |
90 | #else | 83 | #else | |
91 | .globl _C_LABEL(errno) | 84 | .globl _C_LABEL(errno) | |
92 | #ifdef PIC | 85 | #ifdef PIC | |
93 | #ifdef __ELF__ | 86 | lea (_GLOBAL_OFFSET_TABLE_@GOTPC,%pc),%a0 | |
94 | lea %pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),%a0 | 87 | movl _C_LABEL(errno)@GOT:w(%a0),%a0 | |
95 | movl %a0@(_C_LABEL(errno)@GOT:w),%a0 | 88 | movl %d0,(%a0) | |
96 | #else | |||
97 | movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a0 | |||
98 | lea %pc@(0,a0:l),%a0 | |||
99 | movl %a0@(_C_LABEL(errno):w),%a0 | |||
100 | #endif | |||
101 | movl %d0,%a0@ | |||
102 | #else | 89 | #else | |
103 | movl %d0,_C_LABEL(errno) | 90 | movl %d0,_C_LABEL(errno) | |
104 | #endif /* PIC */ | 91 | #endif /* PIC */ | |
105 | #endif /* _REENTRANT */ | 92 | #endif /* _REENTRANT */ | |
106 | moveq #-1,%d0 | 93 | moveq #-1,%d0 | |
107 | jmp %a1@ | 94 | jmp (%a1) |
--- src/lib/libc/arch/m68k/sys/brk.S 2003/12/26 11:21:48 1.15
+++ src/lib/libc/arch/m68k/sys/brk.S 2013/07/16 20:49:42 1.16
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: brk.S,v 1.15 2003/12/26 11:21:48 martin Exp $ */ | 1 | /* $NetBSD: brk.S,v 1.16 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,66 +29,56 @@ | @@ -29,66 +29,56 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include "SYS.h" | 36 | #include "SYS.h" | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)brk.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)brk.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: brk.S,v 1.15 2003/12/26 11:21:48 martin Exp $") | 42 | RCSID("$NetBSD: brk.S,v 1.16 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | .globl _end | 46 | .globl _end | |
47 | .globl _C_LABEL(__minbrk) | 47 | .globl _C_LABEL(__minbrk) | |
48 | .globl CURBRK | 48 | .globl _C_LABEL(__curbrk) | |
49 | 49 | |||
50 | #ifdef WEAK_ALIAS | 50 | #ifdef WEAK_ALIAS | |
51 | WEAK_ALIAS(brk, _brk) | 51 | WEAK_ALIAS(brk, _brk) | |
52 | #endif | 52 | #endif | |
53 | 53 | |||
54 | .data | 54 | .data | |
55 | _C_LABEL(__minbrk): | 55 | _C_LABEL(__minbrk): | |
56 | .long _end | 56 | .long _end | |
57 | 57 | |||
58 | .text | 58 | .text | |
59 | 59 | |||
60 | ENTRY(_brk) | 60 | ENTRY(_brk) | |
61 | #ifdef PIC | 61 | #ifdef PIC | |
62 | #ifdef __ELF__ | 62 | lea (_GLOBAL_OFFSET_TABLE_@GOTPC,%pc),%a1 | |
63 | lea %pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),%a1 | 63 | movl _C_LABEL(__minbrk)@GOT:w(%a1),%a0 | |
64 | movl %a1@(_C_LABEL(__minbrk)@GOT:w),%a0 | 64 | movl (%a0),%d0 | |
65 | #else | |||
66 | movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a1 | |||
67 | lea %pc@(0,a1:l),%a1 | |||
68 | movl %a1@(_C_LABEL(__minbrk):w),%a0 | |||
69 | #endif | |||
70 | movl %a0@,%d0 | |||
71 | #else | 65 | #else | |
72 | movl _C_LABEL(__minbrk),%d0 | 66 | movl _C_LABEL(__minbrk),%d0 | |
73 | #endif | 67 | #endif | |
74 | cmpl %sp@(4),%d0 | 68 | cmpl 4(%sp),%d0 | |
75 | jls ok | 69 | jls ok | |
76 | movl %d0,%sp@(4) | 70 | movl %d0,4(%sp) | |
77 | ok: | 71 | ok: | |
78 | movl #SYS_break,%d0 | 72 | movl #SYS_break,%d0 | |
79 | trap #0 | 73 | trap #0 | |
80 | jcs err | 74 | jcs err | |
81 | #ifdef PIC | 75 | #ifdef PIC | |
82 | #ifdef __ELF__ | 76 | movl _C_LABEL(__curbrk)@GOT:w(%a1),%a0 | |
83 | movl %a1@(CURBRK@GOT:w),%a0 | 77 | movl 4(%sp),(%a0) | |
84 | #else | |||
85 | movl %a1@(CURBRK:w),%a0 | |||
86 | #endif | |||
87 | movl %sp@(4),%a0@ | |||
88 | #else | 78 | #else | |
89 | movl %sp@(4),CURBRK | 79 | movl 4(%sp),_C_LABEL(__curbrk) | |
90 | #endif | 80 | #endif | |
91 | clrl %d0 | 81 | clrl %d0 | |
92 | rts | 82 | rts | |
93 | err: | 83 | err: | |
94 | jra PIC_PLT(CERROR) | 84 | jra PIC_PLT(CERROR) |
--- src/lib/libc/arch/m68k/sys/cerror.S 2009/10/03 22:28:33 1.15
+++ src/lib/libc/arch/m68k/sys/cerror.S 2013/07/16 20:49:42 1.16
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: cerror.S,v 1.15 2009/10/03 22:28:33 phx Exp $ */ | 1 | /* $NetBSD: cerror.S,v 1.16 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,58 +29,45 @@ | @@ -29,58 +29,45 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include "SYS.h" | 36 | #include "SYS.h" | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)cerror.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)cerror.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: cerror.S,v 1.15 2009/10/03 22:28:33 phx Exp $") | 42 | RCSID("$NetBSD: cerror.S,v 1.16 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | #ifdef _REENTRANT | 46 | #ifdef _REENTRANT | |
47 | .globl _C_LABEL(__errno) | 47 | .globl _C_LABEL(__errno) | |
48 | #else | 48 | #else | |
49 | .globl _C_LABEL(errno) | 49 | .globl _C_LABEL(errno) | |
50 | #endif | 50 | #endif | |
51 | _ENTRY(CERROR) | 51 | _ENTRY(CERROR) | |
52 | #ifdef _REENTRANT | 52 | #ifdef _REENTRANT | |
53 | movl %d0,%sp@- | 53 | movl %d0,-(%sp) | |
54 | #if defined(PIC) && !defined(__ELF__) | |||
55 | movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a0 | |||
56 | lea %pc@(0,%a0:l),%a0 | |||
57 | movl %a0@(_C_LABEL(__errno):l),%a0 | |||
58 | jsr %a0@ | |||
59 | #else | |||
60 | jbsr PIC_PLT(_C_LABEL(__errno)) | 54 | jbsr PIC_PLT(_C_LABEL(__errno)) | |
61 | #endif | |||
62 | #ifndef __SVR4_ABI__ | 55 | #ifndef __SVR4_ABI__ | |
63 | movl %d0,%a0 | 56 | movl %d0,%a0 | |
64 | #endif | 57 | #endif | |
65 | movl %sp@+,%a0@ | 58 | movl (%sp)+,(%a0) | |
66 | #else | 59 | #else | |
67 | #ifdef PIC | 60 | #ifdef PIC | |
68 | #ifdef __ELF__ | 61 | lea (_GLOBAL_OFFSET_TABLE_@GOTPC,%pc),%a0 | |
69 | lea %pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),%a0 | 62 | movl _C_LABEL(errno)@GOT:w(%a0),%a0 | |
70 | movl %a0@(_C_LABEL(errno)@GOT:w),%a0 | 63 | movl %d0,(%a0) | |
71 | #else | |||
72 | movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a0 | |||
73 | lea %pc@(0,a0:l),%a0 | |||
74 | movl %a0@(_C_LABEL(errno):w),%a0 | |||
75 | #endif | |||
76 | movl %d0,%a0@ | |||
77 | #else | 64 | #else | |
78 | movl %d0,_C_LABEL(errno) | 65 | movl %d0,_C_LABEL(errno) | |
79 | #endif | 66 | #endif | |
80 | #endif /* _REENTRANT */ | 67 | #endif /* _REENTRANT */ | |
81 | movl #-1,%d0 | 68 | movl #-1,%d0 | |
82 | movl #-1,%d1 | 69 | movl #-1,%d1 | |
83 | #ifdef __SVR4_ABI__ | 70 | #ifdef __SVR4_ABI__ | |
84 | movl %d0,%a0 | 71 | movl %d0,%a0 | |
85 | #endif | 72 | #endif | |
86 | rts | 73 | rts |
--- src/lib/libc/arch/m68k/sys/pipe.S 2003/08/07 16:42:14 1.6
+++ src/lib/libc/arch/m68k/sys/pipe.S 2013/07/16 20:49:42 1.7
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: pipe.S,v 1.6 2003/08/07 16:42:14 agc Exp $ */ | 1 | /* $NetBSD: pipe.S,v 1.7 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,27 +29,27 @@ | @@ -29,27 +29,27 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include "SYS.h" | 36 | #include "SYS.h" | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)pipe.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)pipe.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: pipe.S,v 1.6 2003/08/07 16:42:14 agc Exp $") | 42 | RCSID("$NetBSD: pipe.S,v 1.7 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | #ifdef WEAK_ALIAS | 46 | #ifdef WEAK_ALIAS | |
47 | WEAK_ALIAS(pipe, _pipe) | 47 | WEAK_ALIAS(pipe, _pipe) | |
48 | #endif | 48 | #endif | |
49 | 49 | |||
50 | _SYSCALL(_pipe,pipe) | 50 | _SYSCALL(_pipe,pipe) | |
51 | movl %sp@(4),%a0 | 51 | movl 4(%sp),%a0 | |
52 | movl %d0,%a0@+ | 52 | movl %d0,(%a0)+ | |
53 | movl %d1,%a0@ | 53 | movl %d1,(%a0) | |
54 | clrl %d0 | 54 | clrl %d0 | |
55 | rts | 55 | rts |
--- src/lib/libc/arch/m68k/sys/ptrace.S 2003/08/07 16:42:14 1.11
+++ src/lib/libc/arch/m68k/sys/ptrace.S 2013/07/16 20:49:42 1.12
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ptrace.S,v 1.11 2003/08/07 16:42:14 agc Exp $ */ | 1 | /* $NetBSD: ptrace.S,v 1.12 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,58 +29,45 @@ | @@ -29,58 +29,45 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include "SYS.h" | 36 | #include "SYS.h" | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)ptrace.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)ptrace.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: ptrace.S,v 1.11 2003/08/07 16:42:14 agc Exp $") | 42 | RCSID("$NetBSD: ptrace.S,v 1.12 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | #ifdef _REENTRANT | 46 | #ifdef _REENTRANT | |
47 | .globl _C_LABEL(__errno) | 47 | .globl _C_LABEL(__errno) | |
48 | #else | 48 | #else | |
49 | .globl _C_LABEL(errno) | 49 | .globl _C_LABEL(errno) | |
50 | #endif | 50 | #endif | |
51 | 51 | |||
52 | ENTRY(ptrace) | 52 | ENTRY(ptrace) | |
53 | #ifdef _REENTRANT | 53 | #ifdef _REENTRANT | |
54 | #if defined(PIC) && !defined(__ELF__) | |||
55 | movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a0 | |||
56 | lea %pc@(0,%a0:l),%a0 | |||
57 | movl %a0@(_C_LABEL(__errno):l),%a0 | |||
58 | jsr %a0@ | |||
59 | #else | |||
60 | jbsr PIC_PLT(_C_LABEL(__errno)) | 54 | jbsr PIC_PLT(_C_LABEL(__errno)) | |
61 | #endif /* PIC */ | |||
62 | #ifndef __SVR4_ABI__ | 55 | #ifndef __SVR4_ABI__ | |
63 | movl %d0,%a0 | 56 | movl %d0,%a0 | |
64 | #endif | 57 | #endif | |
65 | clrl %a0@ | 58 | clrl (%a0) | |
66 | #else | 59 | #else | |
67 | #ifdef PIC | 60 | #ifdef PIC | |
68 | #ifdef __ELF__ | 61 | lea (_GLOBAL_OFFSET_TABLE_@GOTPC,%pc),%a0 | |
69 | lea %pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),%a0 | 62 | movl _C_LABEL(errno)@GOT:w(%a0),%a0 | |
70 | movl %a0@(_C_LABEL(errno)@GOT:w),%a0 | 63 | clrl (%a0) | |
71 | #else | |||
72 | movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a0 | |||
73 | lea %pc@(0,%a0:l),%a0 | |||
74 | movl %a0@(_C_LABEL(errno):w),%a0 | |||
75 | #endif | |||
76 | clrl %a0@ | |||
77 | #else | 64 | #else | |
78 | clrl _C_LABEL(errno) | 65 | clrl _C_LABEL(errno) | |
79 | #endif /* PIC */ | 66 | #endif /* PIC */ | |
80 | #endif /* _REENTRANT */ | 67 | #endif /* _REENTRANT */ | |
81 | movl #SYS_ptrace,%d0 | 68 | movl #SYS_ptrace,%d0 | |
82 | trap #0 | 69 | trap #0 | |
83 | jcs err | 70 | jcs err | |
84 | rts | 71 | rts | |
85 | err: | 72 | err: | |
86 | jra PIC_PLT(CERROR) | 73 | jra PIC_PLT(CERROR) |
--- src/lib/libc/arch/m68k/sys/sbrk.S 2003/08/07 16:42:14 1.14
+++ src/lib/libc/arch/m68k/sys/sbrk.S 2013/07/16 20:49:42 1.15
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: sbrk.S,v 1.14 2003/08/07 16:42:14 agc Exp $ */ | 1 | /* $NetBSD: sbrk.S,v 1.15 2013/07/16 20:49:42 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -29,60 +29,55 @@ | @@ -29,60 +29,55 @@ | |||
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | * SUCH DAMAGE. | 33 | * SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include "SYS.h" | 36 | #include "SYS.h" | |
37 | 37 | |||
38 | #if defined(LIBC_SCCS) && !defined(lint) | 38 | #if defined(LIBC_SCCS) && !defined(lint) | |
39 | #if 0 | 39 | #if 0 | |
40 | RCSID("from: @(#)sbrk.s 5.1 (Berkeley) 5/12/90") | 40 | RCSID("from: @(#)sbrk.s 5.1 (Berkeley) 5/12/90") | |
41 | #else | 41 | #else | |
42 | RCSID("$NetBSD: sbrk.S,v 1.14 2003/08/07 16:42:14 agc Exp $") | 42 | RCSID("$NetBSD: sbrk.S,v 1.15 2013/07/16 20:49:42 matt Exp $") | |
43 | #endif | 43 | #endif | |
44 | #endif /* LIBC_SCCS and not lint */ | 44 | #endif /* LIBC_SCCS and not lint */ | |
45 | 45 | |||
46 | .globl _end | 46 | .globl _end | |
47 | .globl CURBRK | 47 | .globl _C_LABEL(__curbrk) | |
48 | 48 | |||
49 | #ifdef WEAK_ALIAS | 49 | #ifdef WEAK_ALIAS | |
50 | WEAK_ALIAS(sbrk, _sbrk) | 50 | WEAK_ALIAS(sbrk, _sbrk) | |
51 | #endif | 51 | #endif | |
52 | 52 | |||
53 | .data | 53 | .data | |
54 | CURBRK: .long _end | 54 | _C_LABEL(__curbrk): | |
55 | .long _end | |||
55 | 56 | |||
56 | .text | 57 | .text | |
57 | 58 | |||
58 | ENTRY(_sbrk) | 59 | ENTRY(_sbrk) | |
59 | #ifdef PIC | 60 | #ifdef PIC | |
60 | #ifdef __ELF__ | 61 | lea (_GLOBAL_OFFSET_TABLE_@GOTPC,%pc),%a1 | |
61 | lea %pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),%a1 | 62 | movl _C_LABEL(__curbrk)@GOT:w(%a1),%a1 | |
62 | movl %a1@(CURBRK@GOT:w),%a1 | 63 | movl (%a1),%d0 | |
63 | #else | 64 | #else | |
64 | movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a1 | 65 | movl _C_LABEL(__curbrk),%d0 | |
65 | lea %pc@(0,%a1:l),%a1 | |||
66 | movl %a1@(CURBRK:w),%a1 | |||
67 | #endif | 66 | #endif | |
68 | movl %a1@,%d0 | 67 | addl %d0,4(%sp) | |
69 | #else | |||
70 | movl CURBRK,%d0 | |||
71 | #endif | |||
72 | addl %d0,%sp@(4) | |||
73 | movl #SYS_break,%d0 | 68 | movl #SYS_break,%d0 | |
74 | trap #0 | 69 | trap #0 | |
75 | jcs err | 70 | jcs err | |
76 | #ifdef PIC | 71 | #ifdef PIC | |
77 | movl %a1@,%d0 | 72 | movl (%a1),%d0 | |
78 | movl %sp@(4),%a1@ | 73 | movl 4(%sp),(%a1) | |
79 | #else | 74 | #else | |
80 | movl CURBRK,%d0 | 75 | movl _C_LABEL(__curbrk),%d0 | |
81 | movl %sp@(4),CURBRK | 76 | movl 4(%sp),_C_LABEL(__curbrk) | |
82 | #endif | 77 | #endif | |
83 | #ifdef __SVR4_ABI__ | 78 | #ifdef __SVR4_ABI__ | |
84 | movl %d0,%a0 | 79 | movl %d0,%a0 | |
85 | #endif | 80 | #endif | |
86 | rts | 81 | rts | |
87 | err: | 82 | err: | |
88 | jra PIC_PLT(CERROR) | 83 | jra PIC_PLT(CERROR) |