diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2018-01-03 17:39:24 -0700 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2018-01-03 17:39:24 -0700 |
commit | a6c1ed4716cf02626ea035beb6dd4a921642ba80 (patch) | |
tree | ef582c1b52819e27bdd16097ec03b69799d04ede /newlib/libc/sys/d10v/crt0.S | |
parent | f6c9a624fa8a6878a7fb2b02f55e4990a20feb59 (diff) |
Use libc from agbcc instead of standalone newlib\nYou must have AGBCC commit 80d029caec189587f8b9294b6c8a5a489b8f5f88 in order to compile pmd_red.gbalibc
Diffstat (limited to 'newlib/libc/sys/d10v/crt0.S')
-rw-r--r-- | newlib/libc/sys/d10v/crt0.S | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/newlib/libc/sys/d10v/crt0.S b/newlib/libc/sys/d10v/crt0.S deleted file mode 100644 index e17f0a4..0000000 --- a/newlib/libc/sys/d10v/crt0.S +++ /dev/null @@ -1,58 +0,0 @@ - .text - .global _start - .type _start,@function - .stabs "crt0.S",100,0,0,_start - .stabs "int:t(0,1)=r(0,1);-32768;32767;",128,0,0,0 - .stabs "_start:F(0,1)",36,0,1,_start - -_start: - -; R14 always contains memory base address (0) - - ldi r14,0 - -; Set the USER stack pointer. - - ldi sp, 0x8000 ; SW - mvtc sp, psw ; psw <- SW - ldi sp, _stack - ldi r0,0 ; zero arguments - ldi r1,0 - -; Clear the BSS. Do it in two parts for efficiency: longwords first -; for most of it, then the remaining 0 to 3 bytes. - - ldi r2, __bss_start ; R2 = start of BSS - ldi r3, _end ; R3 = end of BSS + 1 - sub r3, r2 ; R3 = BSS size in bytes - mv r4, r3 - srli r4, 2 ; R4 = BSS size in longwords (rounded down) -loop1: - cmpeqi r4, 0 ; more longords to zero out? - brf0t.s endloop1 ; nope - st2w r0, @r2+ ; yep, zero out another longword - subi r4, 1 ; decrement count - bra.l loop1 ; go do some more - -endloop1: - and3 r4, r3, 3 ; get no. of remaining BSS bytes to clear -loop2: - cmpeqi r4, 0 ; more bytes to zero out? - brf0t.s endloop2 ; nope - stb r0, @r2 ; yep, zero out another byte - addi r2, 1 ; bump address - subi r4, 1 ; decrement count - bra.s loop2 ; go do some more -endloop2: - -; Call main, then stop simulator - - bl main - bl exit - stop -.Lstart: - .size _start,.Lstart-_start - .stabs "",36,0,0,.Lstart-_start - - .section .stack -_stack: .long 1 |