Просмотр исходного кода

* don't use LEA in the code generator on i8086, as this breaks it quite badly.
While it is possible to use 16-bit LEA on the i8086, it's probably not worth
doing it in the code generator, because of the unpleasant register
restrictions that 16-bit references have.

git-svn-id: trunk@25989 -

nickysn 11 лет назад
Родитель
Сommit
d0f988f7a8
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      compiler/x86/cgx86.pas

+ 4 - 0
compiler/x86/cgx86.pas

@@ -70,8 +70,10 @@ unit cgx86;
         procedure a_op_ref_reg(list : TAsmList; Op: TOpCG; size: TCGSize; const ref: TReference; reg: TRegister); override;
         procedure a_op_reg_ref(list : TAsmList; Op: TOpCG; size: TCGSize;reg: TRegister; const ref: TReference); override;
 
+{$ifndef i8086}
         procedure a_op_const_reg_reg(list : TAsmList; op : Topcg; size : Tcgsize; a : tcgint; src,dst : Tregister); override;
         procedure a_op_reg_reg_reg(list : TAsmList; op : TOpCg; size : tcgsize; src1,src2,dst : tregister); override;
+{$endif not i8086}
 
         { move instructions }
         procedure a_load_const_reg(list : TAsmList; tosize: tcgsize; a : tcgint;reg : tregister);override;
@@ -1550,6 +1552,7 @@ unit cgx86;
       end;
 
 
+{$ifndef i8086}
     procedure tcgx86.a_op_const_reg_reg(list:TAsmList;op:Topcg;size:Tcgsize;
                                         a:tcgint;src,dst:Tregister);
       var
@@ -1616,6 +1619,7 @@ unit cgx86;
         else
           inherited a_op_reg_reg_reg(list,op,size,src1,src2,dst);
       end;
+{$endif not i8086}
 
 
     procedure tcgx86.a_op_const_reg(list : TAsmList; Op: TOpCG; size: TCGSize; a: tcgint; reg: TRegister);