No empty .Rs/.Re
[netbsd-mini2440.git] / sys / arch / mvme68k / stand / libbug / bugstart.s
blob22381e7d63360d662c5349f432da1733a7434223
1 /* $NetBSD: bugstart.s,v 1.1 2000/12/05 21:54:33 scw Exp $ */
3 #define _LOCORE
4 #include <machine/prom.h>
5 #undef _LOCORE
6 #include <machine/asm.h>
8 .data
9 .even
11 GLOBAL(bugargs)
12 .space MVMEPROM_ARGS_MAX*4
14 .text
15 .even
17 .long _C_LABEL(start) - 0x10
18 .long _C_LABEL(start)
20 #define BUG_ARG(which) _C_LABEL(bugargs) + (which)
22 ENTRY_NOPROFILE(_start)
23 ENTRY_NOPROFILE(start)
24 moveml %d0/%a0,%sp@-
25 lea _C_LABEL(edata),%a0
26 movl #_C_LABEL(end) - 4,%d0
27 subl %a0,%d0
28 lsrl #2,%d0
29 1: clrl %a0@+
30 dbra %d0,1b
31 moveml %sp@+,%d0/%a0
32 movl MVMEPROM_REG_DEVLUN, BUG_ARG(MVMEPROM_ARGS_DEVLUN)
33 movl MVMEPROM_REG_CTRLLUN, BUG_ARG(MVMEPROM_ARGS_CTRLLUN)
34 movl MVMEPROM_REG_FLAGS, BUG_ARG(MVMEPROM_ARGS_FLAGS)
35 movl MVMEPROM_REG_CTRLADDR, BUG_ARG(MVMEPROM_ARGS_CTRLADDR)
36 movl MVMEPROM_REG_ENTRY, BUG_ARG(MVMEPROM_ARGS_ENTRY)
37 movl MVMEPROM_REG_CONFBLK, BUG_ARG(MVMEPROM_ARGS_CONFBLK)
38 movl MVMEPROM_REG_NBARGSTART, BUG_ARG(MVMEPROM_ARGS_NBARGSTART)
39 movl MVMEPROM_REG_NBARGEND, BUG_ARG(MVMEPROM_ARGS_NBARGEND)
40 movl MVMEPROM_REG_ARGSTART, BUG_ARG(MVMEPROM_ARGS_ARGSTART)
41 movl MVMEPROM_REG_ARGEND, BUG_ARG(MVMEPROM_ARGS_ARGEND)
42 jmp _C_LABEL(_bugstart)
44 ENTRY_NOPROFILE(bugexec)
45 addql #4,%sp
46 movl BUG_ARG(MVMEPROM_ARGS_DEVLUN), MVMEPROM_REG_DEVLUN
47 movl BUG_ARG(MVMEPROM_ARGS_CTRLLUN), MVMEPROM_REG_CTRLLUN
48 movl BUG_ARG(MVMEPROM_ARGS_FLAGS), MVMEPROM_REG_FLAGS
49 movl BUG_ARG(MVMEPROM_ARGS_CTRLADDR), MVMEPROM_REG_CTRLADDR
50 movl BUG_ARG(MVMEPROM_ARGS_ENTRY), MVMEPROM_REG_ENTRY
51 movl BUG_ARG(MVMEPROM_ARGS_CONFBLK), MVMEPROM_REG_CONFBLK
52 movl BUG_ARG(MVMEPROM_ARGS_NBARGSTART), MVMEPROM_REG_NBARGSTART
53 movl BUG_ARG(MVMEPROM_ARGS_NBARGEND), MVMEPROM_REG_NBARGEND
54 movl BUG_ARG(MVMEPROM_ARGS_ARGSTART), MVMEPROM_REG_ARGSTART
55 movl BUG_ARG(MVMEPROM_ARGS_ARGEND), MVMEPROM_REG_ARGEND
56 ENTRY_NOPROFILE(__main)
57 rts