从this SPARC code开始,我希望有人确认我对可能进入SPARC程序集的set
指令感到困惑:
main:
/* I := J */
! Store address of J into local register %l7
set J, %l7
! Load value located by adress %l7 (address of J) into %l0 register
! So put J value into %l0 register
ld [%l7], %l0
! Store address of I into local register %l7
set I, %l7
! Store value of %l0 (value of J) at adress of I
st %l0, [%l7]
! Finally, J value has overwritten the value of I
最后,我们可以说J值已经覆盖了I的值。它是否正确?
很抱歉这个简单的问题,但我对mov
,set
和st
说明感到困惑。感谢