From cfd15b71270607e700cd53206c73913a584ecb4b Mon Sep 17 00:00:00 2001 From: florian Date: Sat, 27 Jan 2001 21:29:35 +0000 Subject: [PATCH] * behavior -Oa optimized --- compiler/i386/n386cal.pas | 7 ++++++- compiler/i386/n386flw.pas | 22 ++++++++++++++++++++-- compiler/i386/popt386.pas | 7 +++++-- compiler/t_go32v2.pas | 17 +++++------------ 4 files changed, 36 insertions(+), 17 deletions(-) diff --git a/compiler/i386/n386cal.pas b/compiler/i386/n386cal.pas index 25c04ccc35..8862e28f97 100644 --- a/compiler/i386/n386cal.pas +++ b/compiler/i386/n386cal.pas @@ -390,6 +390,7 @@ implementation {$endif GDB} end; end; + { if pop_allowed and (cs_align in aktglobalswitches) then begin pop_esp:=true; @@ -410,6 +411,7 @@ implementation emit_reg(A_PUSH,S_L,R_EDI); end else + } pop_esp:=false; if (resulttype<>pdef(voiddef)) and ret_in_param(resulttype) then @@ -1585,7 +1587,10 @@ begin end. { $Log$ - Revision 1.17 2001-01-08 21:46:46 peter + Revision 1.18 2001-01-27 21:29:35 florian + * behavior -Oa optimized + + Revision 1.17 2001/01/08 21:46:46 peter * don't push high value for open array with cdecl;external; Revision 1.16 2000/12/25 00:07:32 peter diff --git a/compiler/i386/n386flw.pas b/compiler/i386/n386flw.pas index 52179b68a7..306fbddbda 100644 --- a/compiler/i386/n386flw.pas +++ b/compiler/i386/n386flw.pas @@ -119,6 +119,16 @@ implementation if nodetype=whilen then emitjmp(C_None,lcont); + + { align loop target } + if not(cs_littlesize in aktglobalswitches) then + begin + if (cs_align in aktglobalswitches) then + exprasmList.concat(Tai_align.Create_op(16,$90)) + else + exprasmList.concat(Tai_align.Create_op(4,$90)) + end; + emitlab(lloop); aktcontinuelabel:=lcont; @@ -346,7 +356,12 @@ implementation { align loop target } if not(cs_littlesize in aktglobalswitches) then - exprasmList.concat(Tai_align.Create_op(4,$90)); + begin + if (cs_align in aktglobalswitches) then + exprasmList.concat(Tai_align.Create_op(16,$90)) + else + exprasmList.concat(Tai_align.Create_op(4,$90)) + end; emitlab(l3); @@ -1381,7 +1396,10 @@ begin end. { $Log$ - Revision 1.7 2001-01-06 23:35:05 jonas + Revision 1.8 2001-01-27 21:29:35 florian + * behavior -Oa optimized + + Revision 1.7 2001/01/06 23:35:05 jonas * fixed webbug 1323 Revision 1.6 2001/01/05 17:36:58 florian diff --git a/compiler/i386/popt386.pas b/compiler/i386/popt386.pas index 2305d73281..0f9edfb913 100644 --- a/compiler/i386/popt386.pas +++ b/compiler/i386/popt386.pas @@ -1644,7 +1644,7 @@ Procedure PeepHoleOptPass2(AsmL: TAAsmOutput; BlockStart, BlockEnd: Tai); (Taicpu(p).opcode=A_MOV) and (Taicpu(p).opsize in [S_L,S_W]) and (Taicpu(p).oper[0].typ in [top_reg,top_ref]) and - (Taicpu(p).oper[1].typ in [top_reg,top_ref]); + (Taicpu(p).oper[1].typ in [top_reg]); end; {$endif USECMOV} @@ -2001,7 +2001,10 @@ End. { $Log$ - Revision 1.8 2001-01-10 10:29:36 jonas + Revision 1.9 2001-01-27 21:29:35 florian + * behavior -Oa optimized + + Revision 1.8 2001/01/10 10:29:36 jonas * really fixed problems with -Op2 opts (merged) Revision 1.7 2001/01/07 15:49:49 jonas diff --git a/compiler/t_go32v2.pas b/compiler/t_go32v2.pas index cb93a9797c..70558a59e6 100644 --- a/compiler/t_go32v2.pas +++ b/compiler/t_go32v2.pas @@ -66,14 +66,10 @@ procedure TLinkerGo32v2.SetDefaultInfo; begin with Info do begin -{$ifdef OPTALIGN} if cs_align in aktglobalswitches then ExeCmd[1]:='ld $SCRIPT $OPT $STRIP -o $EXE' else ExeCmd[1]:='ld -oformat coff-go32-exe $OPT $STRIP -o $EXE @$RES' -{$else OPTALIGN} - ExeCmd[1]:='ld -oformat coff-go32-exe $OPT $STRIP -o $EXE @$RES'; -{$endif OPTALIGN} end; end; @@ -295,15 +291,11 @@ begin if (cs_link_strip in aktglobalswitches) then StripStr:='-s'; -{$ifdef OPTALIGN} if cs_align in aktglobalswitches then WriteScript(false) else + { Write used files and libraries } WriteResponseFile(false); -{$else OPTALIGN} -{ Write used files and libraries } - WriteResponseFile(false); -{$endif OPTALIGN} { Call linker } SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr); @@ -311,9 +303,7 @@ begin Replace(cmdstr,'$OPT',Info.ExtraOptions); Replace(cmdstr,'$RES',outputexedir+Info.ResName); Replace(cmdstr,'$STRIP',StripStr); -{$ifdef OPTALIGN} Replace(cmdstr,'$SCRIPT','--script='+outputexedir+Info.ResName); -{$endif OPTALIGN} success:=DoExec(FindUtil(BinStr),cmdstr,true,false); { Remove ReponseFile } @@ -429,7 +419,10 @@ end; end. { $Log$ - Revision 1.6 2000-12-25 00:07:30 peter + Revision 1.7 2001-01-27 21:29:35 florian + * behavior -Oa optimized + + Revision 1.6 2000/12/25 00:07:30 peter + new tlinkedlist class (merge of old tstringqueue,tcontainer and tlinkedlist objects)