浏览代码

+ added comment on movsd hack

git-svn-id: trunk@23031 -
florian 12 年之前
父节点
当前提交
ab1815273c
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      compiler/x86/rax86att.pas

+ 5 - 2
compiler/x86/rax86att.pas

@@ -882,8 +882,11 @@ Implementation
                 begin
                   actopcode:=tasmop(PtrUInt(iasmops.Find(copy(s,1,len))));
 
-                  if (actopcode = A_NONE) and
-                     (upper(s) = 'MOVSD') then actopcode := A_MOVSD;
+                  { movsd needs special handling because it has two namings in at&t syntax (movsl for string handling and
+                    movsd for the sse instruction) while only one in intel syntax (movsd, both string and sse)
+                    this cannot be expressed by the instruction table format so we have to hack around this here }
+                  if (actopcode = A_NONE) and (upper(s) = 'MOVSD') then
+                    actopcode := A_MOVSD;
 
                   { two-letter suffix is allowed by just a few instructions (movsx,movzx),
                     and it is always required whenever allowed }