2 ms·
You got the arguments backward. SPARC uses the proper order (source,dest) So it would be something like: ld [%l0],%o0 ; Load whatever is pointed
by lokedhs 6y ago
You got the arguments backward. SPARC uses the proper order (source,dest)
So it would be something like:
ld [%l0],%o0 ; Load whatever is pointed to by %l0 into %o0
call some_function ; Stores the old pc in %o7
; Result is now in %o0
some_function:
save ; Move the register window
; The argument is now in %i0
ld %i0,%l0 ; This does not overwrite the caller's l0
ret ; Return, essentially a jump to %i7
restore ; Called due to delay slot, restores the window