Selaa lähdekoodia

* r/esp cannot be used as index register

git-svn-id: trunk@49567 -
florian 4 vuotta sitten
vanhempi
commit
ba1b0883c2
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  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^.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 (
                 ) or (
                   (taicpu(hp1).oper[0]^.ref^.index = taicpu(p).oper[1]^.reg) and
                   (taicpu(hp1).oper[0]^.ref^.index = taicpu(p).oper[1]^.reg) and
                   (taicpu(hp1).oper[0]^.ref^.base = NR_NO)
                   (taicpu(hp1).oper[0]^.ref^.base = NR_NO)