From d0f988f7a8daf127442f6e1a427d4d78ef5eaff2 Mon Sep 17 00:00:00 2001 From: nickysn Date: Thu, 7 Nov 2013 17:00:58 +0000 Subject: [PATCH] * 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 - --- compiler/x86/cgx86.pas | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/x86/cgx86.pas b/compiler/x86/cgx86.pas index bcf4a6dbca..67dc0fcc65 100644 --- a/compiler/x86/cgx86.pas +++ b/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);