mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-16 17:02:46 +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;
|
ri: tregisterindex;
|
||||||
reg: TRegister;
|
reg: TRegister;
|
||||||
commentstr: AnsiString;
|
commentstr: AnsiString;
|
||||||
|
registers_found: Boolean;
|
||||||
begin
|
begin
|
||||||
p:=tai(AsmL.First);
|
p:=tai(AsmL.First);
|
||||||
while (p<>AsmL.Last) Do
|
while (p<>AsmL.Last) Do
|
||||||
@ -1591,12 +1592,31 @@ Unit AoptObj;
|
|||||||
if p.typ=ait_instruction then
|
if p.typ=ait_instruction then
|
||||||
begin
|
begin
|
||||||
commentstr:='Instruction reads';
|
commentstr:='Instruction reads';
|
||||||
|
registers_found:=false;
|
||||||
for ri in tregisterindex do
|
for ri in tregisterindex do
|
||||||
begin
|
begin
|
||||||
reg:=regnumber_table[ri];
|
reg:=regnumber_table[ri];
|
||||||
if (reg<>NR_NO) and InstructionLoadsFromReg(reg,p) then
|
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;
|
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);
|
AsmL.InsertAfter(tai_comment.Create(strpnew(commentstr)),p);
|
||||||
end;
|
end;
|
||||||
p:=tai(p.next);
|
p:=tai(p.next);
|
||||||
|
Loading…
Reference in New Issue
Block a user