在两个内存位置之间使用movl [英] Use movl between two memory location

查看:171
本文介绍了在两个内存位置之间使用movl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读了这本书,上面写着:
IA32施加了一个限制,即移动指令不能同时将两个操作数都引用到内存位置.将值从一个内存位置复制到另一个内存需要两个指令-第一个指令将源值加载到寄存器中,第二个指令将此寄存器值写入目的地中.

我想知道为什么我不能在一个内存位置和另一个内存位置之间使用movl吗?

非常感谢.
(一个人可以告诉我如何找到答案或告诉我原因).

I read the book, it says:
IA32 imposes the restriction that a move instruction cannot have both operands refer to memory locations. Copying a value from one memory location to another requires two instructions—the first to load the source value into a register, and the second to write this register value to the destination.

I want to know why I can''t use movl between one memory location and the other?

Thank you very much.
(One can tell me how can I find the answer or tell me why)

推荐答案

您所引用的书已经告诉您答案:CPU不是设计好的具有内存到内存的功能.大多数常见的CPU都有从内存到CPU寄存器的指令.

如果您想了解更多详细信息,则需要查找有关CPU设计的书.
The book you quoted already tells you the answer: the CPU wasn''t designed with memory to memory capabilities. Most common CPU''s have instructions that operate from memory to a CPU register.

If you want to know more details, you need to find a book on CPU designs.


这篇关于在两个内存位置之间使用movl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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