Ver Fonte

+ TUsedRegs.Dump

git-svn-id: trunk@38067 -
florian há 7 anos atrás
pai
commit
52510ea933
1 ficheiros alterados com 15 adições e 0 exclusões
  1. 15 0
      compiler/aoptobj.pas

+ 15 - 0
compiler/aoptobj.pas

@@ -85,6 +85,9 @@ Unit AoptObj;
         Function IsUsed(Reg: TRegister): Boolean;
         { get all the currently used registers }
         Function GetUsedRegs: TRegSet;
+
+        { outputs  the current set }
+        Procedure Dump(var t : text);
       Private
         Typ : TRegisterType;
         UsedRegs: TRegSet;
@@ -452,6 +455,18 @@ Unit AoptObj;
       End;
 
 
+    procedure TUsedRegs.Dump(var t: text);
+      var
+        i: dword;
+      begin
+        write(t,Typ,' ');
+        for i:=low(TRegSet) to high(TRegSet) do
+          if i in UsedRegs then
+            write(t,i,' ');
+         writeln(t);
+      end;
+
+
     Destructor TUsedRegs.Destroy;
       Begin
         inherited destroy;