OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [libgloss/] [m32r/] [crt0.S] - Diff between revs 39 and 56

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 39 Rev 56
Line 7... Line 7...
        ldi     fp, #0
        ldi     fp, #0
 
 
# Clear the BSS.  Do it in two parts for efficiency: longwords first
# Clear the BSS.  Do it in two parts for efficiency: longwords first
# for most of it, then the remaining 0 to 3 bytes.
# for most of it, then the remaining 0 to 3 bytes.
 
 
        ld24    r2, __bss_start ; R2 = start of BSS
        seth    r2, #shigh(__bss_start)
        ld24    r3, _end        ; R3 = end of BSS + 1
        add3    r2, r2, #low(__bss_start); R2 = start of BSS
 
        seth    r3, #shigh(_end)
 
        add3    r3, r3, #low(_end)      ; R3 = end of BSS + 1
 
 
        sub     r3, r2          ; R3 = BSS size in bytes
        sub     r3, r2          ; R3 = BSS size in bytes
        mv      r4, r3
        mv      r4, r3
        srli    r4, #2          ; R4 = BSS size in longwords (rounded down)
        srli    r4, #2          ; R4 = BSS size in longwords (rounded down)
        ldi     r1, #0          ; clear R1 for longword store
        ldi     r1, #0          ; clear R1 for longword store
        addi    r2, #-4         ; account for pre-inc store
        addi    r2, #-4         ; account for pre-inc store

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.