mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-15 12:42:35 +02:00
+ print info about the registers, in which new values are written (as reported
by RegLoadedWithNewValue), when DEBUG_INSTRUCTIONREGISTERDEPENDENCIES is defined git-svn-id: trunk@35996 -
This commit is contained in:
parent
66c350d8d2
commit
a9617b623f
@ -1584,6 +1584,7 @@ Unit AoptObj;
|
||||
ri: tregisterindex;
|
||||
reg: TRegister;
|
||||
commentstr: AnsiString;
|
||||
registers_found: Boolean;
|
||||
begin
|
||||
p:=tai(AsmL.First);
|
||||
while (p<>AsmL.Last) Do
|
||||
@ -1591,12 +1592,31 @@ Unit AoptObj;
|
||||
if p.typ=ait_instruction then
|
||||
begin
|
||||
commentstr:='Instruction reads';
|
||||
registers_found:=false;
|
||||
for ri in tregisterindex do
|
||||
begin
|
||||
reg:=regnumber_table[ri];
|
||||
if (reg<>NR_NO) and InstructionLoadsFromReg(reg,p) then
|
||||
commentstr:=commentstr+' '+std_regname(reg);
|
||||
begin
|
||||
commentstr:=commentstr+' '+std_regname(reg);
|
||||
registers_found:=true;
|
||||
end;
|
||||
end;
|
||||
if not registers_found then
|
||||
commentstr:=commentstr+' no registers';
|
||||
commentstr:=commentstr+' and writes new values in';
|
||||
registers_found:=false;
|
||||
for ri in tregisterindex do
|
||||
begin
|
||||
reg:=regnumber_table[ri];
|
||||
if (reg<>NR_NO) and RegLoadedWithNewValue(reg,p) then
|
||||
begin
|
||||
commentstr:=commentstr+' '+std_regname(reg);
|
||||
registers_found:=true;
|
||||
end;
|
||||
end;
|
||||
if not registers_found then
|
||||
commentstr:=commentstr+' no registers';
|
||||
AsmL.InsertAfter(tai_comment.Create(strpnew(commentstr)),p);
|
||||
end;
|
||||
p:=tai(p.next);
|
||||
|
Loading…
Reference in New Issue
Block a user