source: rtems/c/src/lib/libbsp/sh/shsim/start/start.S @ 86ec6ed

4.104.114.84.95
Last change on this file since 86ec6ed was 86ec6ed, checked in by Joel Sherrill <joel.sherrill@…>, on 11/27/00 at 16:00:50

2000-11-27 Joel Sherrill <joel@…>

  • The shsim is for the SH simulator in gdb. It should be able to be used with multiple SH CPU models.
  • .cvsignore, ChangeLog?, Makefile.am, README, bsp_specs, configure.in, clock/.cvsignore, clock/Makefile.am, clock/clockdrv.c, console/.cvsignore, console/Makefile.am, console/console-io.c, console/console-support.S, include/.cvsignore, include/Makefile.am, include/bsp.h, start/.cvsignore, start/Makefile.am, start/regs.S, start/start.S, startup/.cvsignore, startup/Makefile.am, startup/bspstart.c, startup/linkcmds, wrapup/.cvsignore, wrapup/Makefile.am: New files.
  • Property mode set to 100644
File size: 1.0 KB
Line 
1        .section .text
2        .global start
3start:
4        mov.l   stack_k,r15
5
6        ! zero out bss
7        mov.l   edata_k,r0
8        mov.l   end_k,r1
9        mov     #0,r2
10start_l:
11         mov.l  r2,@r0
12        add     #4,r0
13        cmp/ge  r0,r1
14        bt      start_l
15
16#if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY)
17        mov.l set_fpscr_k, r1
18        jsr @r1
19        mov #0,r4
20        lds r3,fpscr
21#endif /*  defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__) */
22
23        ! call the mainline     
24        mov.l   boot_card_k,r0
25        jsr     @r0
26        or      r0,r0
27
28        ! call exit
29        mov     r0,r4
30        mov.l   exit_k,r0
31        jsr     @r0
32        or      r0,r0
33
34        .align 2
35#if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
36set_fpscr_k:
37        .long   ___set_fpscr
38#endif /*  defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(SH4_SINGLE_ONLY) */
39stack_k:
40        .long   _stack 
41edata_k:
42        .long   _edata
43end_k:
44        .long   _end
45boot_card_k:
46        .long   _boot_card
47exit_k:
48        .long   _exit
49
50#ifdef __ELF__
51        .section .stack,"aw"
52#else
53        .section .stack
54#endif
55_stack: .long   0xdeaddead
Note: See TracBrowser for help on using the repository browser.