title: What's the proper way to update a value passed in assembly?
body: <p>I'm using the SPARC architecture.
  I have to update the number of a long passed as an argument without returning it, but I don't know how to do that because the input registers are used for both the parameters and for returning a value.
  I've seen from using instructions such as</p>
  
  <pre><code>add   %l0, %l1, %i1
  </code></pre>
  
  <p>that it's possible to modify the contents of an i register, but as far as I can tell that changes the "copy" of the parameter rather than the parameter itself. I've experimented with the load command and store command in ways such as</p>
  
  <pre><code>ld    [%o1], %i1
  </code></pre>
  
  <p>and</p>
  
  <pre><code>st    %l1, [%fp-8]
  </code></pre>
  
  <p>and they don't seem to change what I need to be changed.</p>