assembly - When to use which registers? -


$t (temporaries) caller saved if needed. subroutines can use w/out saving. not preserved across procedure calls.

$s (saved values) callee saved. subroutine using 1 of these must save original , restore before exiting. preserved across procedure calls.

when use registers? far guess, when working subroutines, use $s registers, and, otherwise $t registers.

when use $f registers?

use $txx as possible. use $sxx program state needs preserved across calls. (a common bug , difficult find bug accidentally expecting $txx register have unchanged state across call.)

the $fxx registers floating point use only. not use them else - way lies madness.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -