Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我只是有这个概念性问题,但我真的找不到给出明确解释的网站。
但是对于临时寄存器、保存寄存器和浮点寄存器,它们是否包含我们想要的值的地址,或者只是值,比如 100 或 200?
答案是两者兼而有之。当与这样的lw指令一起使用时,寄存器可以包含一个地址:
lw
lw $t1, 0($t2) # loads the value at address 0+$t2 into $t1
其他指令涉及包含值的寄存器:
add $t1, $t2, $t3 # loads value of $t2 + value of $t3 into $t1