有什么区别
ldw r8,0(r4)
and
mov r8, r4
Load word 说“从内存复制”,但是当 load word 从 r4 复制时,它是从寄存器复制而不是从内存复制,对吧?
The lw
instruction (I assume that's what you meant since ldw
isn't a standard MIPS instruction, though all the loads will be similar in the context of this answer) loads a word from the memory address specified by 0 + r4
, while move
1 simply transfers the value of r4
into r8
.
例如,假设r4
目前1234
以及存储在的单词1234
记忆中是5678
.
区别在于:
move r8, r4 ; r8 is now 1234
lw r8, 0(r4) ; r8 is now 5678
1 The move
instruction" is actually a pseudo-instruction where move $rt, $rs
is encoded as addi $rt, $rs, 0
.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)