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

Subversion Repositories or1k

[/] [or1k/] [branches/] [newlib/] [newlib/] [newlib/] [libc/] [sys/] [sysnecv850/] [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 3... Line 3...
        .section .text
        .section .text
        .global _start
        .global _start
 
 
_start:
_start:
 
 
 
#if defined __v850e__ || defined __v850ea__
 
 
        movea   255,            r0,     r20
        movea   255,            r0,     r20
 
        mov     65535,          r21
 
        mov     hilo(_stack),   sp
 
        mov     hilo(__ep),     ep
 
        mov     hilo(__gp),     gp
 
        mov     hilo(__ctbp),   r6
 
        ldsr    r6,             ctbp
 
        mov     hilo(_edata),   r6
 
        mov     hilo(_end),     r7
 
.L0:
 
        st.w    r0,             0[r6]
 
        addi    4,              r6,     r6
 
        cmp     r7,             r6
 
        bl      .L0
 
.L1:
 
        jarl    ___main,        r31
 
        addi    -12,            sp,     sp
 
        mov     0,              r6
 
        mov     0,              r7
 
        mov     0,              r8
 
        jarl    _main,          r31
 
        mov     r10,            r6
 
        jarl    _exit,          r31
 
 
 
# else
 
        movea   255,            r0,     r20
        mov     r0,             r21
        mov     r0,             r21
        ori     65535,          r0,     r21
        ori     65535,          r0,     r21
        movhi   hi(_stack),     r0,     sp
        movhi   hi(_stack),     r0,     sp
        movea   lo(_stack),     sp,     sp
        movea   lo(_stack),     sp,     sp
        movhi   hi(__ep),       r0,     ep
        movhi   hi(__ep),       r0,     ep
        movea   lo(__ep),       ep,     ep
        movea   lo(__ep),       ep,     ep
        movhi   hi(__gp),       r0,     gp
        movhi   hi(__gp),       r0,     gp
        movea   lo(__gp),       gp,     gp
        movea   lo(__gp),       gp,     gp
 
 
 
        /* Initialise the call table base pointer.
 
        We do this even though we are supposedly
 
        assembling this file for the v850 as this
 
        allows us to use the same binary for all
 
        versions of the v850 architecture.  */
 
 
 
        movhi   hi(__ctbp),     r0,     r6
 
        movea   lo(__ctbp),     r6,     r6
 
        ldsr    r6,             ctbp
 
 
        movhi   hi(_edata),     r0,     r6
        movhi   hi(_edata),     r0,     r6
        movea   lo(_edata),     r6,     r6
        movea   lo(_edata),     r6,     r6
        movhi   hi(_end),       r0,     r7
        movhi   hi(_end),       r0,     r7
        movea   lo(_end),       r7,     r7
        movea   lo(_end),       r7,     r7
.L0:
.L0:
Line 32... Line 69...
        mov     0,              r8
        mov     0,              r8
        jarl    _main,          r31
        jarl    _main,          r31
        mov     r10,            r6
        mov     r10,            r6
        jarl    _exit,          r31
        jarl    _exit,          r31
 
 
 
# endif
 
 
        .section .stack
        .section .stack
_stack: .long   1
_stack: .long   1

powered by: WebSVN 2.1.0

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