* Pass exitcode correctly down to __libc_start_main in _haltproc

git-svn-id: trunk@34258 -
This commit is contained in:
pierre 2016-08-09 06:50:54 +00:00
parent ee3d204b72
commit b2467eae3b

View File

@ -147,8 +147,11 @@ _haltproc:
lw $sp,%lo(__fpc_ret_sp)($v0)
lui $v0,%hi(__fpc_ret_ra)
lw $ra,%lo(__fpc_ret_ra)($v0)
/* $a0 contains exitcode, we need to move it to $v0,
as it would be at return of C main unction. */
move $v0,$a0
jr $ra
nop
nop
hlt:
b hlt
.end _haltproc