Sun Jan 29 23:27:24 2012 UTC ()
Since it's in a separate file now, we cannot use direct branch to label.


(uwe)
diff -r1.2 -r1.3 src/lib/csu/arch/sh3/crt0.S

cvs diff -r1.2 -r1.3 src/lib/csu/arch/sh3/crt0.S (expand / switch to unified diff)

--- src/lib/csu/arch/sh3/crt0.S 2012/01/28 12:21:13 1.2
+++ src/lib/csu/arch/sh3/crt0.S 2012/01/29 23:27:24 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: crt0.S,v 1.2 2012/01/28 12:21:13 uwe Exp $ */ 1/* $NetBSD: crt0.S,v 1.3 2012/01/29 23:27:24 uwe Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1998 Christos Zoulas 4 * Copyright (c) 1998 Christos Zoulas
5 * Copyright (c) 1995 Christopher G. Demetriou 5 * Copyright (c) 1995 Christopher G. Demetriou
6 * All rights reserved. 6 * All rights reserved.
7 *  7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -27,27 +27,31 @@ @@ -27,27 +27,31 @@
27 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 27 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
28 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 28 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 *  34 *
35 * <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>> 35 * <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
36 */ 36 */
37 37
38#include <machine/asm.h> 38#include <machine/asm.h>
39 39
40RCSID("$NetBSD: crt0.S,v 1.2 2012/01/28 12:21:13 uwe Exp $") 40RCSID("$NetBSD: crt0.S,v 1.3 2012/01/29 23:27:24 uwe Exp $")
41 41
42STRONG_ALIAS(_start,__start) 42STRONG_ALIAS(_start,__start)
43 43
44/* 44/*
45 * Kernel setregs() passes all arguments in registers to avoid 45 * Kernel setregs() passes all arguments in registers to avoid
46 * copyout. This trampoline pushes 5th and 6th arguments into stack, 46 * copyout. This trampoline pushes 5th and 6th arguments into stack,
47 * where C ABI expects them to be, and calls the real startup code 47 * where C ABI expects them to be, and calls the real startup code
48 * written in C. 48 * written in C.
49 */ 49 */
50_ENTRY(__start) 50_ENTRY(__start)
 51 mov.l .L___start, r0
51 mov.l r9, @-sp 52 mov.l r9, @-sp
52 bra ___start 53 braf r0
53 mov.l r8, @-sp 54 mov.l r8, @-sp
 55
 56 .p2align 2
 57.L___start: .long _C_LABEL(___start)