Explorar el Código

* r/esp cannot be used as index register

git-svn-id: trunk@49567 -
florian hace 4 años
padre
commit
ba1b0883c2
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      compiler/x86/aoptx86.pas

+ 3 - 1
compiler/x86/aoptx86.pas

@@ -8418,7 +8418,9 @@ unit aoptx86;
               (
                 (
                   (taicpu(hp1).oper[0]^.ref^.base = taicpu(p).oper[1]^.reg) and
-                  (taicpu(hp1).oper[0]^.ref^.index = NR_NO)
+                  (taicpu(hp1).oper[0]^.ref^.index = NR_NO) and
+                  { r/esp cannot be an index }
+                  (taicpu(p).oper[0]^.reg<>NR_STACK_POINTER_REG)
                 ) or (
                   (taicpu(hp1).oper[0]^.ref^.index = taicpu(p).oper[1]^.reg) and
                   (taicpu(hp1).oper[0]^.ref^.base = NR_NO)