Commit e9f366b9 authored by Pavel Pisa's avatar Pavel Pisa

eminaries/qtmips/call-syscall/l10-05-call-6args.S: describe omit-frame-pointer.

Signed-off-by: Pavel Pisa's avatarPavel Pisa <>
parent ad1af058
......@@ -35,6 +35,11 @@ final:
addiu $sp, $sp, -32 // allocate space for save and arguments
sw $ra, 28($sp) // store return address from main
sw $s8, 24($sp) // store farme pointer, not required there
or $s8, $sp, $zero // set fp to point to top of the stack, not required
// see -fomit-frame-pointer/-fno-omit-frame-pointer
addiu $v0, $zero, 6 // 6-th argument value
sw $v0, 20($sp) // 6-th argument to the stack
addiu $v0, $zero, 5 // 5-th argument value
......@@ -44,6 +49,10 @@ main:
addiu $a1, $zero, 2 // 2-nd argument value
jal complex // call complex function
addiu $a0, $zero, 1 // store 1-st argument, run in delay slot
or $sp, $s8, $zero // restore stack from frame pointer
lw $s8, 24($sp) // restore frame pointer, not required there
lw $ra, 28($sp) // restore return address
nop // on MIPS1 lw result not available directly
jr $ra // return from main, result in v0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment