From 2949824a69d5152555ec7d8f1be27c95f7ac34ed Mon Sep 17 00:00:00 2001 From: michael Date: Fri, 14 Jul 2000 05:11:48 +0000 Subject: [PATCH] + Patch to 1.1 --- compiler/aopt386.pas | 11 ++++----- compiler/cg386mat.pas | 9 ++++--- compiler/cpubase.pas | 34 ++++++-------------------- compiler/csopt386.pas | 29 ++++------------------ compiler/daopt386.pas | 44 ++++++++-------------------------- compiler/new/aoptobj.pas | 9 ++++--- compiler/new/i386/aoptcpud.pas | 33 ++++++------------------- compiler/options.pas | 16 ++++--------- compiler/pdecl.pas | 9 ++++--- compiler/popt386.pas | 24 ++++--------------- compiler/tcadd.pas | 7 +++--- compiler/version.pas | 9 ++++--- 12 files changed, 60 insertions(+), 174 deletions(-) diff --git a/compiler/aopt386.pas b/compiler/aopt386.pas index 931d703acd..fe6d06ad7d 100644 --- a/compiler/aopt386.pas +++ b/compiler/aopt386.pas @@ -21,12 +21,6 @@ **************************************************************************** } -{$ifdef newOptimizations} -{$define foropt} -{$define replacereg} -{$define arithopt} -{$define foldarithops} -{$endif newOptimizations} Unit aopt386; @@ -101,7 +95,10 @@ End. { $Log$ - Revision 1.2 2000-07-13 11:32:31 michael + Revision 1.3 2000-07-14 05:11:48 michael + + Patch to 1.1 + + Revision 1.2 2000/07/13 11:32:31 michael + removed logs } diff --git a/compiler/cg386mat.pas b/compiler/cg386mat.pas index 908c72cb21..fa62660f6a 100644 --- a/compiler/cg386mat.pas +++ b/compiler/cg386mat.pas @@ -53,9 +53,7 @@ implementation procedure secondmoddiv(var p : ptree); var hreg1 : tregister; -{$ifdef newOptimizations} hreg2 : tregister; -{$endif} shrdiv, andmod, pushed,popeax,popedx : boolean; power : longint; @@ -140,7 +138,6 @@ implementation "Cardinal($ffffffff) div 16" overflows! (JM)} If is_signed(p^.left^.resulttype) Then Begin -{$ifdef newOptimizations} If (aktOptProcessor <> class386) and not(CS_LittleSize in aktglobalswitches) then { use a sequence without jumps, saw this in @@ -180,7 +177,6 @@ implementation emit_const_reg(A_SAR,S_L,power,hreg1); end else -{$endif newOptimizations} begin { a jump, but less operations } emit_reg_reg(A_TEST,S_L,hreg1,hreg1); @@ -990,7 +986,10 @@ implementation end. { $Log$ - Revision 1.2 2000-07-13 11:32:35 michael + Revision 1.3 2000-07-14 05:11:48 michael + + Patch to 1.1 + + Revision 1.2 2000/07/13 11:32:35 michael + removed logs } diff --git a/compiler/cpubase.pas b/compiler/cpubase.pas index 30d4c445a5..190c2e9aec 100644 --- a/compiler/cpubase.pas +++ b/compiler/cpubase.pas @@ -26,12 +26,6 @@ } unit cpubase; -{$ifdef newOptimizations} -{$define foropt} -{$define replacereg} -{$define arithopt} -{$define foldarithops} -{$endif newOptimizations} interface {$ifdef TP} @@ -606,33 +600,16 @@ Type {modify the contents of a register with the purpose of using this changed content afterwards (add/sub/..., but e.g. not rep or movsd)} -{$ifdef arithopt} Ch_MEAX, Ch_MECX, Ch_MEDX, Ch_MEBX, Ch_MESP, Ch_MEBP, Ch_MESI, Ch_MEDI, -{$endif arithopt} Ch_CDirFlag {clear direction flag}, Ch_SDirFlag {set dir flag}, Ch_RFlags, Ch_WFlags, Ch_RWFlags, Ch_FPU, - Ch_Rop1, Ch_Wop1, Ch_RWop1,{$ifdef arithopt}Ch_Mop1,{$endif} - Ch_Rop2, Ch_Wop2, Ch_RWop2,{$ifdef arithopt}Ch_Mop2,{$endif} - Ch_Rop3, Ch_WOp3, Ch_RWOp3,{$ifdef arithopt}Ch_Mop3,{$endif} - + Ch_Rop1, Ch_Wop1, Ch_RWop1,Ch_Mop1, + Ch_Rop2, Ch_Wop2, Ch_RWop2,Ch_Mop2, + Ch_Rop3, Ch_WOp3, Ch_RWOp3,Ch_Mop3, Ch_WMemEDI, Ch_All ); -{$ifndef arithopt} -Const - Ch_MEAX = Ch_RWEAX; - Ch_MECX = Ch_RWECX; - Ch_MEDX = Ch_RWEDX; - Ch_MEBX = Ch_RWEBX; - Ch_MESP = Ch_RWESP; - Ch_MEBP = Ch_RWEBP; - Ch_MESI = Ch_RWESI; - Ch_MEDI = Ch_RWEDI; - Ch_Mop1 = Ch_RWOp1; - Ch_Mop2 = Ch_RWOp2; - Ch_Mop3 = Ch_RWOp3; -{$endif arithopt} const MaxCh = 3; { Max things a instruction can change } @@ -919,7 +896,10 @@ end; end. { $Log$ - Revision 1.2 2000-07-13 11:32:39 michael + Revision 1.3 2000-07-14 05:11:48 michael + + Patch to 1.1 + + Revision 1.2 2000/07/13 11:32:39 michael + removed logs } diff --git a/compiler/csopt386.pas b/compiler/csopt386.pas index 443b4eca6b..a90f28e5ea 100644 --- a/compiler/csopt386.pas +++ b/compiler/csopt386.pas @@ -23,12 +23,6 @@ } Unit CSOpt386; -{$ifdef newOptimizations} -{$define foropt} -{$define replacereg} -{$define arithopt} -{$define foldarithops} -{$endif newOptimizations} Interface @@ -384,7 +378,6 @@ begin {$endif replaceregdebug} end; -{$ifdef replacereg} function FindRegDealloc(reg: tregister; p: pai): boolean; { assumes reg is a 32bit register } begin @@ -739,9 +732,7 @@ begin end; {$endif replaceregdebug} End; -{$endif replacereg} -{$ifdef arithopt} Function FindRegWithConst(p: Pai; size: topsize; l: longint; Var Res: TRegister): Boolean; {Finds a register which contains the constant l} Var Counter: TRegister; @@ -773,7 +764,6 @@ Begin res := counter; FindRegWithConst := tmpResult; End; -{$endif arithopt} Procedure DoCSE(AsmL: PAasmOutput; First, Last: Pai); {marks the instructions that can be removed by RemoveInstructs. They're not @@ -782,13 +772,7 @@ Procedure DoCSE(AsmL: PAasmOutput; First, Last: Pai); Var Cnt, Cnt2: Longint; p, hp1, hp2: Pai; hp3, hp4: pai; -{$ifdef replacereg} hp5 : pai; -{$else} - {$ifdef csdebug} - hp5 : pai; - {$endif} -{$endif} RegInfo: TRegInfo; RegCounter: TRegister; TmpState: Byte; @@ -888,21 +872,17 @@ Begin {old reg new reg} (RegInfo.New2OldReg[RegCounter] <> RegCounter) Then Begin -{$ifdef replacereg} getLastInstruction(p,hp3); If not(regCounter in usableRegs + [R_EDI,R_ESI]) or not ReplaceReg(asmL,RegInfo.New2OldReg[RegCounter], regCounter,hp3, PPaiProp(hp4^.optInfo)^.Regs[regCounter],true,hp5) then begin -{$endif replacereg} hp3 := New(Paicpu,Op_Reg_Reg(A_MOV, S_L, {old reg new reg} RegInfo.New2OldReg[RegCounter], RegCounter)); InsertLLItem(AsmL, Pai(hp2^.previous), hp2, hp3); -{$ifdef replacereg} end -{$endif replacereg} End Else { imagine the following code: } @@ -1019,7 +999,6 @@ Begin End; End; End; -{$ifdef replacereg} top_Reg: { try to replace the new reg with the old reg } if not(PPaiProp(p^.optInfo)^.canBeRemoved) and @@ -1043,7 +1022,6 @@ Begin end; end end; -{$endif replacereg} top_symbol,Top_Const: Begin Case Paicpu(p)^.oper[1].typ Of @@ -1060,7 +1038,6 @@ Begin allocRegBetween(asmL,regCounter,startMod,p); end; End; -{$ifdef arithopt} Top_Ref: if (paicpu(p)^.oper[0].typ = top_const) and getLastInstruction(p,hp1) and @@ -1070,7 +1047,6 @@ Begin allocRegBetween(AsmL,reg32(regCounter), PPaiProp(hp1^.optinfo)^.regs[regCounter].startMod,p); end; -{$endif arithopt} End; End; End; @@ -1140,7 +1116,10 @@ End. { $Log$ - Revision 1.2 2000-07-13 11:32:39 michael + Revision 1.3 2000-07-14 05:11:48 michael + + Patch to 1.1 + + Revision 1.2 2000/07/13 11:32:39 michael + removed logs } diff --git a/compiler/daopt386.pas b/compiler/daopt386.pas index 223a948365..1947126559 100644 --- a/compiler/daopt386.pas +++ b/compiler/daopt386.pas @@ -29,13 +29,6 @@ Unit DAOpt386; -{$ifdef newOptimizations} -{$define foropt} -{$define replacereg} -{$define arithopt} -{$define foldarithops} -{$endif newOptimizations} - Interface Uses @@ -809,21 +802,21 @@ begin RegReadByInstruction := true; exit end; - Ch_RWOp1,Ch_ROp1{$ifdef arithopt},Ch_MOp1{$endif}: + Ch_RWOp1,Ch_ROp1,Ch_MOp1: if (p^.oper[0].typ = top_reg) and (reg32(p^.oper[0].reg) = reg) then begin RegReadByInstruction := true; exit end; - Ch_RWOp2,Ch_ROp2{$ifdef arithopt},Ch_MOp2{$endif}: + Ch_RWOp2,Ch_ROp2,Ch_MOp2: if (p^.oper[1].typ = top_reg) and (reg32(p^.oper[1].reg) = reg) then begin RegReadByInstruction := true; exit end; - Ch_RWOp3,Ch_ROp3{$ifdef arithopt},Ch_MOp3{$endif}: + Ch_RWOp3,Ch_ROp3,Ch_MOp3: if (p^.oper[2].typ = top_reg) and (reg32(p^.oper[2].reg) = reg) then begin @@ -934,13 +927,13 @@ Begin Case InstrProp.Ch[Cnt] Of Ch_WEAX..Ch_MEDI: TmpResult := Reg = TCh2Reg(InstrProp.Ch[Cnt]); - Ch_RWOp1,Ch_WOp1{$ifdef arithopt},Ch_Mop1{$endif arithopt}: + Ch_RWOp1,Ch_WOp1,Ch_Mop1: TmpResult := (paicpu(p1)^.oper[0].typ = top_reg) and (Reg32(paicpu(p1)^.oper[0].reg) = reg); - Ch_RWOp2,Ch_WOp2{$ifdef arithopt},Ch_Mop2{$endif arithopt}: + Ch_RWOp2,Ch_WOp2,Ch_Mop2: TmpResult := (paicpu(p1)^.oper[1].typ = top_reg) and (Reg32(paicpu(p1)^.oper[1].reg) = reg); - Ch_RWOp3,Ch_WOp3{$ifdef arithopt},Ch_Mop3{$endif arithopt}: + Ch_RWOp3,Ch_WOp3,Ch_Mop3: TmpResult := (paicpu(p1)^.oper[2].typ = top_reg) and (Reg32(paicpu(p1)^.oper[2].reg) = reg); Ch_FPU: TmpResult := Reg in [R_ST..R_ST7,R_MM0..R_MM7]; @@ -1680,7 +1673,6 @@ Begin DFAPass1 := BlockEnd; End; -{$ifdef arithopt} Procedure AddInstr2RegContents({$ifdef statedebug} asml: paasmoutput; {$endif} p: paicpu; reg: TRegister); {$ifdef statedebug} @@ -1730,7 +1722,6 @@ Begin DestroyOp(p, oper); End End; -{$endif arithopt} Procedure DoDFAPass2( {$Ifdef StateDebug} @@ -2107,22 +2098,13 @@ Begin DestroyReg(CurProp, R_EDX, true) End Else - {$ifdef arithopt} AddInstr2OpContents( {$ifdef statedebug}asml,{$endif} Paicpu(p), Paicpu(p)^.oper[1]) - {$else arithopt} - DestroyOp(p, Paicpu(p)^.oper[1]) - {$endif arithopt} Else - {$ifdef arithopt} AddInstr2OpContents({$ifdef statedebug}asml,{$endif} Paicpu(p), Paicpu(p)^.oper[2]); - {$else arithopt} - DestroyOp(p, Paicpu(p)^.oper[2]); - {$endif arithopt} End; -{$ifdef arithopt} A_LEA: begin readop(curprop,paicpu(p)^.oper[0]); @@ -2139,7 +2121,6 @@ Begin destroyreg(curprop,paicpu(p)^.oper[1].reg,true); end; end; -{$endif arithopt} Else Begin Cnt := 1; @@ -2159,11 +2140,9 @@ Begin {$endif statedebug} DestroyReg(CurProp, TCh2Reg(InstrProp.Ch[Cnt]), true); End; -{$ifdef arithopt} Ch_MEAX..Ch_MEDI: AddInstr2RegContents({$ifdef statedebug} asml,{$endif} Paicpu(p),TCh2Reg(InstrProp.Ch[Cnt])); -{$endif arithopt} Ch_CDirFlag: CurProp^.DirFlag := F_NotSet; Ch_SDirFlag: CurProp^.DirFlag := F_Set; Ch_Rop1: ReadOp(CurProp, Paicpu(p)^.oper[0]); @@ -2175,33 +2154,27 @@ Begin ReadOp(CurProp, Paicpu(p)^.oper[0]); DestroyOp(p, Paicpu(p)^.oper[0]); End; -{$ifdef arithopt} Ch_Mop1: AddInstr2OpContents({$ifdef statedebug} asml, {$endif} Paicpu(p), Paicpu(p)^.oper[0]); -{$endif arithopt} Ch_Wop2..Ch_RWop2: Begin If (InstrProp.Ch[Cnt] = Ch_RWop2) Then ReadOp(CurProp, Paicpu(p)^.oper[1]); DestroyOp(p, Paicpu(p)^.oper[1]); End; -{$ifdef arithopt} Ch_Mop2: AddInstr2OpContents({$ifdef statedebug} asml, {$endif} Paicpu(p), Paicpu(p)^.oper[1]); -{$endif arithopt} Ch_WOp3..Ch_RWOp3: Begin If (InstrProp.Ch[Cnt] = Ch_RWOp3) Then ReadOp(CurProp, Paicpu(p)^.oper[2]); DestroyOp(p, Paicpu(p)^.oper[2]); End; -{$ifdef arithopt} Ch_Mop3: AddInstr2OpContents({$ifdef statedebug} asml, {$endif} Paicpu(p), Paicpu(p)^.oper[2]); -{$endif arithopt} Ch_WMemEDI: Begin ReadReg(CurProp, R_EDI); @@ -2337,7 +2310,10 @@ End. { $Log$ - Revision 1.2 2000-07-13 11:32:40 michael + Revision 1.3 2000-07-14 05:11:48 michael + + Patch to 1.1 + + Revision 1.2 2000/07/13 11:32:40 michael + removed logs } diff --git a/compiler/new/aoptobj.pas b/compiler/new/aoptobj.pas index 119ac61387..45118933f7 100644 --- a/compiler/new/aoptobj.pas +++ b/compiler/new/aoptobj.pas @@ -152,7 +152,6 @@ Type TInstrSinceLastMod); { destroy the contents of all registers } Procedure DestroyAllRegs(var InstrSinceLastMod: TInstrSinceLastMod); -{$ifdef arithopt} { a register's contents are modified, but not destroyed (the new value } { depends on the old one) } Procedure ModifyReg(reg: TRegister; var InstrSinceLastMod: @@ -161,7 +160,6 @@ Type { depends on the old one) } Procedure ModifyOp(const oper: TOper; var InstrSinceLastMod: TInstrSinceLastMod); -{$endif arithopt} { increase the write state of a register (call every time a register is } { written to) } @@ -558,7 +556,6 @@ Begin End; End; -{$ifdef arithopt} Procedure TPaiProp.ModifyReg(reg: TRegister; Var InstrSinceLastMod: TInstrSinceLastMod); Begin @@ -589,7 +586,6 @@ Begin DestroyOp(oper, InstrSinceLastMod); End End; -{$endif arithopt} Procedure TPaiProp.IncWState(Reg: TRegister);{$ifdef inl} inline;{$endif inl} Begin @@ -791,7 +787,10 @@ End. { $Log$ - Revision 1.1 2000-07-13 06:30:07 michael + Revision 1.2 2000-07-14 05:11:49 michael + + Patch to 1.1 + + Revision 1.1 2000/07/13 06:30:07 michael + Initial import Revision 1.8 2000/01/07 01:14:52 peter diff --git a/compiler/new/i386/aoptcpud.pas b/compiler/new/i386/aoptcpud.pas index 5b60671dc6..b26af6f598 100644 --- a/compiler/new/i386/aoptcpud.pas +++ b/compiler/new/i386/aoptcpud.pas @@ -75,17 +75,9 @@ Begin CurProp^.DestroyReg(R_EDX, InstrSinceLastMod) End Else - {$ifdef arithopt} CurProp^.ModifyOp(p^.oper[1], InstrSinceLastMod) - {$else arithopt} - CurProp^.DestroyOp(p^.oper[1], InstrSinceLastMod) - {$endif arithopt} Else - {$ifdef arithopt} CurProp^.ModifyOp(p^.oper[2], InstrSinceLastMod); - {$else arithopt} - CurProp^.DestroyOp(p^.oper[2], InstrsinceLastMod); - {$endif arithopt} End; A_XOR: Begin @@ -100,11 +92,7 @@ Begin CurProp^.Regs[RegMaxSize(p^.oper[0].reg)].StartMod := Pointer(0) End Else -{$Ifdef ArithOpt} CurProp^.ModifyOp(p^.oper[1], InstrSinceLastMod); -{$Else ArithOpt} - CurProp^.DestroyOp(p^.oper[1], InstrSinceLastMod); -{$EndIf ArithOpt} End Else Begin @@ -122,10 +110,8 @@ Begin CurProp^.ReadReg(TCh2Reg(InstrProp.Ch[Cnt])); CurProp^.DestroyReg(TCh2Reg(InstrProp.Ch[Cnt]),InstrSinceLastMod); End; - {$ifdef arithopt} Ch_MEAX..Ch_MEDI: CurProp^.ModifyReg(TCh2Reg(InstrProp.Ch[Cnt]), InstrSinceLastMod); - {$endif arithopt} Ch_CDirFlag: CurProp^.CondRegs.ClearFlag(DirFlag); Ch_SDirFlag: CurProp^.CondRegs.SetFlag(DirFlag); Ch_Rop1: CurProp^.ReadOp(p^.oper[0]); @@ -137,30 +123,24 @@ Begin CurProp^.ReadOp(p^.oper[0]); CurProp^.DestroyOp(p^.oper[0], InstrSinceLastMod); End; - {$ifdef arithopt} Ch_Mop1: CurProp^.ModifyOp(p^.oper[0], InstrSinceLastMod); - {$endif arithopt} Ch_Wop2..Ch_RWop2: Begin If (InstrProp.Ch[Cnt] = Ch_RWop2) Then CurProp^.ReadOp(p^.oper[1]); CurProp^.DestroyOp(p^.oper[1], InstrSinceLastMod); End; - {$ifdef arithopt} Ch_Mop2: CurProp^.ModifyOp(p^.oper[1], InstrSinceLastMod); - {$endif arithopt} Ch_Wop3..Ch_RWop3: Begin If (InstrProp.Ch[Cnt] = Ch_RWop3) Then CurProp^.ReadOp(p^.oper[2]); CurProp^.DestroyOp(p^.oper[2], InstrSinceLastMod); End; - {$ifdef arithopt} Ch_Mop3: CurProp^.ModifyOp(p^.oper[2], InstrSinceLastMod); - {$endif arithopt} Ch_WMemEDI: Begin CurProp^.ReadReg(R_EDI); @@ -211,15 +191,13 @@ Begin Begin Case InstrProp.Ch[Cnt] Of Ch_REAX..Ch_REDI,Ch_RWEAX..Ch_RWEDI - {$ifdef arithopt} ,Ch_MEAX..Ch_MEDI - {$endif arithopt}: TmpResult := Reg = TCh2Reg(InstrProp.Ch[Cnt]); - Ch_ROp1,Ch_RWOp1{$ifdef arithopt},Ch_Mop1{$endif arithopt}: + Ch_ROp1,Ch_RWOp1,Ch_Mop1: TmpResult := RegInOp(Reg,PInstr(p)^.oper[0]); - Ch_ROp2,Ch_RWOp2{$ifdef arithopt},Ch_Mop2{$endif arithopt}: + Ch_ROp2,Ch_RWOp2,Ch_Mop2: TmpResult := RegInOp(Reg,PInstr(p)^.oper[1]); - Ch_ROp3,Ch_RWOp3{$ifdef arithopt},Ch_Mop3{$endif arithopt}: + Ch_ROp3,Ch_RWOp3,Ch_Mop3: TmpResult := RegInOp(Reg,PInstr(p)^.oper[2]); Ch_WOp1: TmpResult := (PInstr(p)^.oper[0].typ = top_ref) And RegInRef(Reg,PInstr(p)^.oper[0].ref^); @@ -257,7 +235,10 @@ End. { $Log$ - Revision 1.1 2000-07-13 06:30:10 michael + Revision 1.2 2000-07-14 05:11:49 michael + + Patch to 1.1 + + Revision 1.1 2000/07/13 06:30:10 michael + Initial import Revision 1.5 2000/01/07 01:14:57 peter diff --git a/compiler/options.pas b/compiler/options.pas index c0695800b5..f8bbf5d9c1 100644 --- a/compiler/options.pas +++ b/compiler/options.pas @@ -1204,7 +1204,6 @@ begin disable_configfile:=false; { default defines } def_symbol(target_info.short_name); - def_symbol('FPK'); def_symbol('FPC'); def_symbol('VER'+version_nr); def_symbol('VER'+version_nr+'_'+release_nr); @@ -1214,14 +1213,6 @@ begin {$endif} { Temporary defines, until things settle down } - def_symbol('INT64'); - def_symbol('HASRESOURCESTRINGS'); - def_symbol('HASSAVEREGISTERS'); - def_symbol('NEWVMTOFFSET'); - def_symbol('HASINTERNMATH'); - def_symbol('SYSTEMTVARREC'); - def_symbol('INCLUDEOK'); - def_symbol('NEWMM'); def_symbol('HASWIDECHAR'); {$ifdef SUPPORT_FIXED} @@ -1233,8 +1224,6 @@ begin { for the RTL } def_symbol('CARDINALMULFIXED'); {$endif cardinalmulfix} - def_symbol('CORRECTFLDCW'); - def_symbol('ENHANCEDRAISE'); { New since 1.09 } def_symbol('HASOUT'); @@ -1491,7 +1480,10 @@ end; end. { $Log$ - Revision 1.3 2000-07-13 12:08:26 michael + Revision 1.4 2000-07-14 05:11:48 michael + + Patch to 1.1 + + Revision 1.3 2000/07/13 12:08:26 michael + patched to 1.1.0 with former 1.09patch from peter Revision 1.2 2000/07/13 11:32:44 michael diff --git a/compiler/pdecl.pas b/compiler/pdecl.pas index f8f312b9ca..bf3259563b 100644 --- a/compiler/pdecl.pas +++ b/compiler/pdecl.pas @@ -581,11 +581,7 @@ unit pdecl; if export_aktvarsym then begin inc(aktvarsym^.refs); -{$ifdef INCLUDEOK} include(aktvarsym^.varoptions,vo_is_exported); -{$else} - aktvarsym^.varoptions:=aktvarsym^.varoptions+[vo_is_exported]; -{$endif} end; if extern_aktvarsym then include(aktvarsym^.varoptions,vo_is_external); @@ -1236,7 +1232,10 @@ unit pdecl; end. { $Log$ - Revision 1.3 2000-07-13 12:08:26 michael + Revision 1.4 2000-07-14 05:11:49 michael + + Patch to 1.1 + + Revision 1.3 2000/07/13 12:08:26 michael + patched to 1.1.0 with former 1.09patch from peter Revision 1.2 2000/07/13 11:32:44 michael diff --git a/compiler/popt386.pas b/compiler/popt386.pas index 8015222bb7..0bb3e2701b 100644 --- a/compiler/popt386.pas +++ b/compiler/popt386.pas @@ -22,12 +22,6 @@ } Unit POpt386; -{$ifdef newOptimizations} -{$define foropt} -{$define replacereg} -{$define arithopt} -{$define foldarithops} -{$endif newOptimizations} Interface @@ -109,9 +103,7 @@ Procedure PeepHoleOptPass1(Asml: PAasmOutput; BlockStart, BlockEnd: Pai); Var l : longint; p,hp1,hp2 : pai; -{$ifdef foropt} hp3,hp4: pai; -{$endif foropt} TmpBool1, TmpBool2: Boolean; TmpRef: TReference; @@ -387,7 +379,6 @@ Begin If (Paicpu(p)^.oper[0].typ = top_const) And (Paicpu(p)^.oper[1].typ in [top_reg,top_ref]) And (Paicpu(p)^.oper[0].val = 0) Then -{$ifdef foropt} If GetNextInstruction(p, hp1) And (hp1^.typ = ait_instruction) And (Paicpu(hp1)^.is_jmp) and @@ -422,7 +413,6 @@ Begin continue; End Else -{$endif foropt} {change "cmp $0, %reg" to "test %reg, %reg"} If (Paicpu(p)^.oper[1].typ = top_reg) Then Begin @@ -749,14 +739,9 @@ Begin {changes "lea (%reg1), %reg2" into "mov %reg1, %reg2"} If (Paicpu(p)^.oper[0].ref^.Base In [R_EAX..R_EDI]) And (Paicpu(p)^.oper[0].ref^.Index = R_NO) And -{$ifndef newOptimizations} - (Paicpu(p)^.oper[0].ref^.Offset = 0) And -{$endif newOptimizations} (Not(Assigned(Paicpu(p)^.oper[0].ref^.Symbol))) Then If (Paicpu(p)^.oper[0].ref^.Base <> Paicpu(p)^.oper[1].reg) -{$ifdef newOptimizations} and (Paicpu(p)^.oper[0].ref^.Offset = 0) -{$endif newOptimizations} Then Begin hp1 := New(Paicpu, op_reg_reg(A_MOV, S_L,Paicpu(p)^.oper[0].ref^.Base, @@ -767,9 +752,7 @@ Begin Continue; End Else -{$ifdef newOptimizations} if (Paicpu(p)^.oper[0].ref^.Offset = 0) then -{$endif newOptimizations} Begin hp1 := Pai(p^.Next); AsmL^.Remove(p); @@ -777,7 +760,6 @@ Begin p := hp1; Continue; End -{$ifdef newOptimizations} else with Paicpu(p)^.oper[0].ref^ do if (Base = Paicpu(p)^.oper[1].reg) then @@ -799,7 +781,6 @@ Begin end; end; end; -{$endif newOptimizations} End; A_MOV: @@ -1932,7 +1913,10 @@ End. { $Log$ - Revision 1.2 2000-07-13 11:32:45 michael + Revision 1.3 2000-07-14 05:11:49 michael + + Patch to 1.1 + + Revision 1.2 2000/07/13 11:32:45 michael + removed logs } diff --git a/compiler/tcadd.pas b/compiler/tcadd.pas index ec86048951..b78c2417d0 100644 --- a/compiler/tcadd.pas +++ b/compiler/tcadd.pas @@ -843,14 +843,12 @@ implementation calcregisters(p,0,0,0) else calcregisters(p,1,0,0); -{$ifdef newoptimizations} {$ifdef i386} { not always necessary, only if it is not a constant char and } { not a regvar, but don't know how to check this here (JM) } if is_char(rd) then inc(p^.registers32); {$endif i386} -{$endif newoptimizations} convdone:=true; end else @@ -1280,7 +1278,10 @@ implementation end. { $Log$ - Revision 1.2 2000-07-13 11:32:50 michael + Revision 1.3 2000-07-14 05:11:49 michael + + Patch to 1.1 + + Revision 1.2 2000/07/13 11:32:50 michael + removed logs } diff --git a/compiler/version.pas b/compiler/version.pas index accb84f946..4b452ebecd 100644 --- a/compiler/version.pas +++ b/compiler/version.pas @@ -34,11 +34,7 @@ interface {$ifdef newcg} minorpatch = ' NCG'; {$else newcg} - {$ifdef newoptimizations} - minorpatch = ' OPT'; - {$else} minorpatch = ''; - {$endif} {$endif newcg} { date string } @@ -98,7 +94,10 @@ begin end. { $Log$ - Revision 1.3 2000-07-13 12:08:28 michael + Revision 1.4 2000-07-14 05:11:49 michael + + Patch to 1.1 + + Revision 1.3 2000/07/13 12:08:28 michael + patched to 1.1.0 with former 1.09patch from peter Revision 1.2 2000/07/13 11:32:54 michael