【发布时间】:2015-02-11 16:14:24
【问题描述】:
根据this page,MOVQ 可以接受以下内容:
MOVQ mm, mm/m64
Move quadword from mm/m64 to mm.
MOVQ mm/m64, mm
Move quadword from mm to mm/m64.
MOVQ xmm1, xmm2/m64
Move quadword from xmm2/mem64 to xmm1.
MOVQ xmm2/m64, xmm1
Move quadword from xmm1 to xmm2/mem64.
但是,我的 Free Pascal 编译器接受这个:
MOVQ xmm1, rcx
这是来自寄存器的移动,它支持我的 MOVD,而不是 MOVQ。
Agner Fog 的instruction tables 同意上述定义。
为什么编译器会接受这个(并且它正在工作)?
【问题讨论】:
-
Intel® 64 and IA-32 Architectures Software Developer’s Manual Volume 2 (2A, 2B & 2C): Instruction Set Reference, A-Z在MOVQ上有两个部分,一个是没有r/m64的MOVQ,另一个是MOVD/MOVQ组合,有r/m64。编译器是对的。
标签: assembly cpu-registers freepascal