浏览代码

- don't switch index into base in the gas assembly writer. This optimization
(and others) are performed in optimize_ref().

git-svn-id: trunk@37517 -

nickysn 7 年之前
父节点
当前提交
8cc230ef1a
共有 1 个文件被更改,包括 4 次插入14 次删除
  1. 4 14
      compiler/x86/agx86att.pas

+ 4 - 14
compiler/x86/agx86att.pas

@@ -192,20 +192,10 @@ interface
              owner.writer.AsmWrite('0');
              owner.writer.AsmWrite('0');
            if (index<>NR_NO) and (base=NR_NO) then
            if (index<>NR_NO) and (base=NR_NO) then
             begin
             begin
-              if scalefactor in [0,1] then
-                { Switching index to base position gives shorter
-                  assembler instructions }
-                begin
-                  owner.writer.AsmWrite('('+gas_regname(index)+')');
-                end
-              else
-                begin
-                  owner.writer.AsmWrite('(,'+gas_regname(index));
-                  if scalefactor<>0 then
-                   owner.writer.AsmWrite(','+tostr(scalefactor)+')')
-                  else
-                   owner.writer.AsmWrite(')');
-                end;
+              owner.writer.AsmWrite('(,'+gas_regname(index));
+              if scalefactor<>0 then
+                owner.writer.AsmWrite(','+tostr(scalefactor));
+              owner.writer.AsmWrite(')');
             end
             end
            else
            else
             if (index=NR_NO) and (base<>NR_NO) then
             if (index=NR_NO) and (base<>NR_NO) then