diff options
author | Jens Arnold <amiconn@rockbox.org> | 2005-10-18 21:20:23 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2005-10-18 21:20:23 +0000 |
commit | 074b73856b9013c702350319e134c4fa0682c508 (patch) | |
tree | f120fee0b4b188c2afc9f24b65e82e0a08960bf0 /firmware/crt0.S | |
parent | b4f0afd429eebfb48798d9f7dba54a12b14a38bb (diff) |
Coldfire: More compact init code.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7641 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/crt0.S')
-rw-r--r-- | firmware/crt0.S | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/firmware/crt0.S b/firmware/crt0.S index fee5a30fee..6a15324567 100644 --- a/firmware/crt0.S +++ b/firmware/crt0.S @@ -267,48 +267,42 @@ irq_handler: lea _iramstart,%a3 lea _iramend,%a4 .iramloop: + move.l (%a2)+,(%a3)+ cmp.l %a3,%a4 - beq .iramloopend - move.w (%a2)+,(%a3)+ - bra .iramloop -.iramloopend: + bhi.b .iramloop #endif lea _edata,%a2 lea _end,%a4 - clr.l %d0 .edataloop: + clr.l (%a2)+ cmp.l %a2,%a4 - beq .edataloopend - move.w %d0,(%a2)+ - bra .edataloop -.edataloopend: + bhi.b .edataloop lea _datacopy,%a2 lea _datastart,%a3 lea _dataend,%a4 + cmp.l %a2,%a3 + beq.b .nodatacopy .dataloop: + move.l (%a2)+,(%a3)+ cmp.l %a3,%a4 - beq .dataloopend - move.w (%a2)+,(%a3)+ - bra .dataloop -.dataloopend: + bhi.b .dataloop +.nodatacopy: /* Munge the main stack */ + move.l #0xdeadbeef,%d0 lea stackbegin,%a2 lea stackend,%a4 - move.l #0xdeadbeef,%d0 + move.l %a4,%sp .mungeloop: - cmp.l %a2,%a4 - beq .mungeloopend move.l %d0,(%a2)+ - bra .mungeloop -.mungeloopend: + cmp.l %a2,%a4 + bhi.b .mungeloop - lea stackend,%sp jsr main .hoo: - bra .hoo + bra.b .hoo .section .resetvectors vectors: |