sparc - What's the proper way to update a value passed in assembly? -
i'm using sparc architecture. have update number of long passed argument without returning it, don't know how because input registers used both parameters , returning value. i've seen using instructions such as
add %l0, %l1, %i1
that it's possible modify contents of register, far can tell changes "copy" of parameter rather parameter itself. i've experimented load command , store command in ways such as
ld [%o1], %i1
and
st %l1, [%fp-8]
and don't seem change need changed.
i figured out. save instruction makes argument available in in register (in case, %i1), , there it's just
st %l1, [%i1 + 1]
and have make sure number in place of 4 compatible number of bytes between elements of array. in case +1 works char array.
Comments
Post a Comment