Pārlūkot izejas kodu

* i8086 fix after r25010: i8086 doesn't support lea sp,[sp-XXX]

git-svn-id: trunk@25012 -
nickysn 12 gadi atpakaļ
vecāks
revīzija
7e70a5f763
1 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  1. 6 0
      compiler/x86/cgx86.pas

+ 6 - 0
compiler/x86/cgx86.pas

@@ -2320,6 +2320,11 @@ unit cgx86;
     procedure tcgx86.g_stackpointer_alloc(list : TAsmList;localsize : longint);
 
       procedure decrease_sp(a : tcgint);
+{$ifdef i8086}
+        begin
+          list.concat(Taicpu.Op_const_reg(A_SUB,S_W,a,NR_STACK_POINTER_REG));
+        end;
+{$else i8086}
         var
           href : treference;
         begin
@@ -2327,6 +2332,7 @@ unit cgx86;
           { normally, lea is a better choice than a sub to adjust the stack pointer }
           list.concat(Taicpu.op_ref_reg(A_LEA,TCGSize2OpSize[OS_ADDR],href,NR_STACK_POINTER_REG));
         end;
+{$endif i8086}
 
 {$ifdef x86}
 {$ifndef NOTARGETWIN}