title: How can I pass floating point numbers through $a0 in MIPS?
body: <p>I am writing a MIPS library in which I am planning to pass all the arguments through <code>$aX</code> registers and return all the values through <code>$vX</code> registers.</p>
  
  <p>I have written the following function:</p>
  
  <pre><code># PrintFloat - prints a float
  # arguments:
  #   $a0 = arress of the float
  # return value:
  #   n/a
  PrintFloat: 
      move $f12, $a0
      li $v0, 2
      syscall
      # return 
      jr $ra 
  </code></pre>
  
  <p>this function is not compiling in MARS.  </p>
  
  <p>I have three questions here:</p>
  
  <ol>
  <li>Is it not possible to pass floats through <code>$a</code> registers at all?</li>
  <li>Should I design the library to pass the arguments through <code>$sp</code> instead (using <code>$sp</code> is comparatively messy)?</li>
  <li>Do I need to create stack frames in every trivial functions like this in order to make it non-leaf safe?</li>
  </ol>