Browse Source

* fix stackmisalignment calculation to take care of pushf/push cs, before r43503,
it was correct by coincidence

git-svn-id: trunk@43506 -

florian 5 years ago
parent
commit
a7e72617a6
1 changed files with 2 additions and 1 deletions
  1. 2 1
      compiler/x86/cgx86.pas

+ 2 - 1
compiler/x86/cgx86.pas

@@ -3548,7 +3548,8 @@ unit cgx86;
             list.concat(Taicpu.Op_reg(A_PUSH,S_L,NR_ECX));
             list.concat(Taicpu.Op_reg(A_PUSH,S_L,NR_EBX));
             list.concat(Taicpu.Op_reg(A_PUSH,S_L,NR_EAX));
-            inc(stackmisalignment,4*2+6*4);
+            { pushf, push %cs, 4*selector registers, 6*general purpose registers }
+            inc(stackmisalignment,4+4+4*2+6*4);
           end;
 {$endif i386}