What's the proper way to update a value passed in assembly?
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
add %l0, %l1, %i1
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
ld [%o1], %i1
st %l1, [%fp-8]
and they don't seem to change what I need to be changed.