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 -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -