负载字和移动之间的区别? [英] Difference between load word and move?

查看:164
本文介绍了负载字和移动之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是什么

LDW r8,0(R4)

MOV R8,R4

?负载话说回来,但是当从R4负载workd拷贝是从寄存器复制和不正确的内存从内存中拷贝?

? Load word says it "copies from memory" but when load workd copies from r4 it is copying from register and not memory right?

推荐答案

LW 指令(我假定这就是你的意思,因为 LDW 不是一个标准的MIPS指令,但所有的负荷将是这个答案的情况下类似)加载从的内存地址的字的由 0指定+ R4 ,而移动 1 只需把值 R4 R8

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 move1 simply transfers the value of r4 into r8.

例如,假设 R4 目前 1234 并保存在字1234 在内存 5678

For example, let's say r4 is currently 1234 and the word stored at 1234 in memory is 5678.

的差别是这样的:

move r8, r4            ; r8 is now 1234
lw   r8, 0(r4)         ; r8 is now 5678


1 移动指令其实是一个伪指令,其中动$ RT,$ RS 为en codeD为阿迪$ RT,$ RS,0


1 The move instruction" is actually a pseudo-instruction where move $rt, $rs is encoded as addi $rt, $rs, 0.

这篇关于负载字和移动之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆