forked from len0rd/rockbox
Coldfire: More compact init code.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7641 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b4f0afd429
commit
074b73856b
1 changed files with 14 additions and 20 deletions
|
|
@ -267,48 +267,42 @@ irq_handler:
|
||||||
lea _iramstart,%a3
|
lea _iramstart,%a3
|
||||||
lea _iramend,%a4
|
lea _iramend,%a4
|
||||||
.iramloop:
|
.iramloop:
|
||||||
|
move.l (%a2)+,(%a3)+
|
||||||
cmp.l %a3,%a4
|
cmp.l %a3,%a4
|
||||||
beq .iramloopend
|
bhi.b .iramloop
|
||||||
move.w (%a2)+,(%a3)+
|
|
||||||
bra .iramloop
|
|
||||||
.iramloopend:
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
lea _edata,%a2
|
lea _edata,%a2
|
||||||
lea _end,%a4
|
lea _end,%a4
|
||||||
clr.l %d0
|
|
||||||
.edataloop:
|
.edataloop:
|
||||||
|
clr.l (%a2)+
|
||||||
cmp.l %a2,%a4
|
cmp.l %a2,%a4
|
||||||
beq .edataloopend
|
bhi.b .edataloop
|
||||||
move.w %d0,(%a2)+
|
|
||||||
bra .edataloop
|
|
||||||
.edataloopend:
|
|
||||||
|
|
||||||
lea _datacopy,%a2
|
lea _datacopy,%a2
|
||||||
lea _datastart,%a3
|
lea _datastart,%a3
|
||||||
lea _dataend,%a4
|
lea _dataend,%a4
|
||||||
|
cmp.l %a2,%a3
|
||||||
|
beq.b .nodatacopy
|
||||||
.dataloop:
|
.dataloop:
|
||||||
|
move.l (%a2)+,(%a3)+
|
||||||
cmp.l %a3,%a4
|
cmp.l %a3,%a4
|
||||||
beq .dataloopend
|
bhi.b .dataloop
|
||||||
move.w (%a2)+,(%a3)+
|
.nodatacopy:
|
||||||
bra .dataloop
|
|
||||||
.dataloopend:
|
|
||||||
|
|
||||||
/* Munge the main stack */
|
/* Munge the main stack */
|
||||||
|
move.l #0xdeadbeef,%d0
|
||||||
lea stackbegin,%a2
|
lea stackbegin,%a2
|
||||||
lea stackend,%a4
|
lea stackend,%a4
|
||||||
move.l #0xdeadbeef,%d0
|
move.l %a4,%sp
|
||||||
.mungeloop:
|
.mungeloop:
|
||||||
cmp.l %a2,%a4
|
|
||||||
beq .mungeloopend
|
|
||||||
move.l %d0,(%a2)+
|
move.l %d0,(%a2)+
|
||||||
bra .mungeloop
|
cmp.l %a2,%a4
|
||||||
.mungeloopend:
|
bhi.b .mungeloop
|
||||||
|
|
||||||
lea stackend,%sp
|
|
||||||
jsr main
|
jsr main
|
||||||
.hoo:
|
.hoo:
|
||||||
bra .hoo
|
bra.b .hoo
|
||||||
|
|
||||||
.section .resetvectors
|
.section .resetvectors
|
||||||
vectors:
|
vectors:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue