mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-03 04:50:13 +02:00
* some debugging infrastructure
git-svn-id: trunk@25900 -
This commit is contained in:
parent
bfbb0c5b9d
commit
d575a435c3
@ -23,6 +23,8 @@ unit popt386;
|
|||||||
|
|
||||||
{$i fpcdefs.inc}
|
{$i fpcdefs.inc}
|
||||||
|
|
||||||
|
{ $define DEBUG_AOPTCPU}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses Aasmbase,aasmtai,aasmdata,aasmcpu,verbose;
|
uses Aasmbase,aasmtai,aasmdata,aasmcpu,verbose;
|
||||||
@ -35,7 +37,7 @@ procedure PostPeepHoleOpts(asml: TAsmList; BlockStart, BlockEnd: tai);
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
globtype,systems,
|
cutils,globtype,systems,
|
||||||
globals,cgbase,procinfo,
|
globals,cgbase,procinfo,
|
||||||
symsym,
|
symsym,
|
||||||
{$ifdef finaldestdebug}
|
{$ifdef finaldestdebug}
|
||||||
@ -502,8 +504,25 @@ function MatchOperand(const oper1: TOper; const oper2: TOper): boolean; inline;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ First pass of peephole optimizations }
|
||||||
procedure PeepHoleOptPass1(Asml: TAsmList; BlockStart, BlockEnd: tai);
|
procedure PeepHoleOptPass1(Asml: TAsmList; BlockStart, BlockEnd: tai);
|
||||||
{First pass of peepholeoptimizations}
|
|
||||||
|
{$ifdef DEBUG_AOPTCPU}
|
||||||
|
procedure DebugMsg(const s: string;p : tai);
|
||||||
|
begin
|
||||||
|
asml.insertbefore(tai_comment.Create(strpnew(s)), p);
|
||||||
|
end;
|
||||||
|
{$else DEBUG_AOPTCPU}
|
||||||
|
procedure DebugMsg(const s: string;p : tai);inline;
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
{$endif DEBUG_AOPTCPU}
|
||||||
|
|
||||||
|
function WriteOk : Boolean;
|
||||||
|
begin
|
||||||
|
writeln('Ok');
|
||||||
|
Result:=True;
|
||||||
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
l : longint;
|
l : longint;
|
||||||
|
Loading…
Reference in New Issue
Block a user