- Cleanedup toolchain

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@381 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
2009-03-14 17:19:29 +00:00
parent 5f24a7e1dc
commit 58f704112c
15 changed files with 184 additions and 329 deletions
+39 -4
View File
@@ -1,15 +1,50 @@
.file "startup.S"
.section .etext,"ax"
.section .rodata
.data
argv0: .asciz "\"This-MIPS-program\""
argv: .word argv0
.text
.section .start, "ax"
.extern _init
.align 2
.globl _start
_start:
.set noreorder
# jump init
la $8, _init
jr $8
# Set stack pointer
la $sp, stack_ptr
# Set global pointer
la $gp, _gp
# zero bss
la $8, __bss_start
la $9, _end
$zeroise:
sw $0, 0($8)
bne $8, $9, $zeroise
addiu $8, 4
# Call _init
la $k0, _init
jalr $k0
nop
# Set environment
li $a0, 1
la $a1, argv
# Call main
la $k0, main
jalr $k0
nop
# Terminate after main returns
_terminate:
nop
la $t0, exit
jalr $t0
move $a0, $v0
.set reorder