Explorar o código

* r/esp cannot be used as index register

git-svn-id: trunk@49567 -
florian %!s(int64=4) %!d(string=hai) anos
pai
achega
ba1b0883c2
Modificáronse 1 ficheiros con 3 adicións e 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)