Writing Fibonacci in MIPS (caller saved)

preview_player
Показать описание
MIPS code writing example of a recursive function (with 2 recursive calls), using caller-saved registers
Рекомендации по теме
Комментарии
Автор

Any idea why I might be getting "Runtime exception at 0x00400060: address out of range 0x7fbffffc" at the line sw $v0, 8($sp)?

Rmontgomery
Автор

great tutorial, but your add should be an addi, cheers :)

TheBumi
Автор

it's bge instead of bgt, otherwise it would not calculate the correct sequence

daadii
Автор

is it possible to not use registers and to make it only with stack pointer?

lefterismagkoutas
Автор

You... don't ever run it? M8, I'm garbage at this stuff and even I can pick out issues with with this, ones you would likely be aware of if you bothered trying to run it.

ScoopsPlz
Автор

Thanks for this video. It is really helpful!

sukritkapil
Автор

Why do you save v0 on the stack you could aswell use a temporary register. Still dont figured out 100% why we use this stack thing so often.

rickk
Автор

Thank you very much, greatly appreciate it. =)

EsmirAlvarez
Автор

Why do we do the 'jr $ra' ? kindly explain ?

SrajanBhatnagar
Автор

at 2:17 you just store $a0 in your stack. Actually, in MIPS reference call you first gotta move $a0 to $s0(for example), since we just use the $a registers for arguments and $s registers to save numbers or variables for example for recursive functions. But this should work, tho....

Muhsin
Автор

wft are you talking? add xx xx imm isn't exist dude

張大刀-gy