Pārlūkot izejas kodu

m68k: added a helper function to check if a register is an FPU register

Karoly Balogh 2 gadi atpakaļ
vecāks
revīzija
f2d6b4d530
1 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  1. 6 0
      compiler/m68k/cpubase.pas

+ 6 - 0
compiler/m68k/cpubase.pas

@@ -300,6 +300,7 @@ unit cpubase;
 
     function isaddressregister(reg : tregister) : boolean;
     function isintregister(reg : tregister) : boolean;
+    function isfpuregister(reg : tregister) : boolean;
     function fpuregopsize: TOpSize; {$ifdef USEINLINE}inline;{$endif USEINLINE}
     function fpuregsize: aint; {$ifdef USEINLINE}inline;{$endif USEINLINE}
     function needs_unaligned(const refalignment: aint; const size: tcgsize): boolean;
@@ -517,6 +518,11 @@ implementation
         result:=getregtype(reg)=R_INTREGISTER;
       end;
 
+    function isfpuregister(reg : tregister) : boolean; {$ifdef USEINLINE}inline;{$endif USEINLINE}
+      begin
+        result:=getregtype(reg)=R_FPUREGISTER;
+      end;
+
     function fpuregopsize: TOpSize; {$ifdef USEINLINE}inline;{$endif USEINLINE}
       const
         fpu_regopsize: array[boolean] of TOpSize = ( S_FX, S_FD );