35,13 → 35,13 |
|
## User-space task entry point |
# |
# $a0 ($4) contains the PCB pointer |
# |
.ent __entry |
__entry: |
.frame $sp, 32, $31 |
.cpload $25 |
|
|
|
# Mips o32 may store its arguments on stack, make space (16 bytes), |
# so that it could work with -O0 |
# Make space additional 16 bytes for the stack frame |
48,18 → 48,42 |
|
addiu $sp, -32 |
.cprestore 16 # Allow PIC code |
|
jal __main |
nop |
|
jal __io_init |
nop |
|
jal main |
nop |
|
jal __exit |
nop |
.end |
|
# Pass pcb_ptr to __main() as the first argument. pcb_ptr is already |
# in $a0. As the first argument is passed in $a0, no operation |
# is needed. |
.ent __entry_driver |
__entry_driver: |
.frame $sp, 32, $31 |
.cpload $25 |
|
|
# Mips o32 may store its arguments on stack, make space (16 bytes), |
# so that it could work with -O0 |
# Make space additional 16 bytes for the stack frame |
|
addiu $sp, -32 |
.cprestore 16 # Allow PIC code |
|
jal __main |
nop |
|
jal main |
nop |
|
jal __exit |
nop |
.end |
|
# Alignment of output section data to 0x4000 |
.section .data |
.align 14 |