diff --git a/lib/Target/Sparc/SparcRegisterInfo.td b/lib/Target/Sparc/SparcRegisterInfo.td index ccc3be6e449..b3f5a44c6b4 100644 --- a/lib/Target/Sparc/SparcRegisterInfo.td +++ b/lib/Target/Sparc/SparcRegisterInfo.td @@ -15,6 +15,10 @@ class Ri num> : Register { field bits<5> Num = num; // Numbers are identified with a 5 bit ID } +// Rf - 32-bit floating-point registers +class Rf num> : Register { + field bits<5> Num = num; // Numbers are identified with a 5 bit ID +} let Namespace = "V8" in { def G0 : Ri< 0>; def G1 : Ri< 1>; def G2 : Ri< 2>; def G3 : Ri< 3>; @@ -29,8 +33,15 @@ let Namespace = "V8" in { // Standard register aliases. def SP : Ri<14>; def FP : Ri<30>; - // Floating-point registers? - // ... + // Floating-point registers: + def F0 : Rf< 0>; def F1 : Rf< 1>; def F2 : Rf< 2>; def F3 : Rf< 3>; + def F4 : Rf< 4>; def F5 : Rf< 5>; def F6 : Rf< 6>; def F7 : Rf< 7>; + def F8 : Rf< 8>; def F9 : Rf< 9>; def F10 : Rf<10>; def F11 : Rf<11>; + def F12 : Rf<12>; def F13 : Rf<13>; def F14 : Rf<14>; def F15 : Rf<15>; + def F16 : Rf<16>; def F17 : Rf<17>; def F18 : Rf<18>; def F19 : Rf<19>; + def F20 : Rf<20>; def F21 : Rf<21>; def F22 : Rf<22>; def F23 : Rf<23>; + def F24 : Rf<24>; def F25 : Rf<25>; def F26 : Rf<26>; def F27 : Rf<27>; + def F28 : Rf<28>; def F29 : Rf<29>; def F30 : Rf<30>; def F31 : Rf<31>; } @@ -43,3 +54,7 @@ def IntRegs : RegisterClass; + +def FPRegs : RegisterClass; diff --git a/lib/Target/SparcV8/SparcV8RegisterInfo.td b/lib/Target/SparcV8/SparcV8RegisterInfo.td index ccc3be6e449..b3f5a44c6b4 100644 --- a/lib/Target/SparcV8/SparcV8RegisterInfo.td +++ b/lib/Target/SparcV8/SparcV8RegisterInfo.td @@ -15,6 +15,10 @@ class Ri num> : Register { field bits<5> Num = num; // Numbers are identified with a 5 bit ID } +// Rf - 32-bit floating-point registers +class Rf num> : Register { + field bits<5> Num = num; // Numbers are identified with a 5 bit ID +} let Namespace = "V8" in { def G0 : Ri< 0>; def G1 : Ri< 1>; def G2 : Ri< 2>; def G3 : Ri< 3>; @@ -29,8 +33,15 @@ let Namespace = "V8" in { // Standard register aliases. def SP : Ri<14>; def FP : Ri<30>; - // Floating-point registers? - // ... + // Floating-point registers: + def F0 : Rf< 0>; def F1 : Rf< 1>; def F2 : Rf< 2>; def F3 : Rf< 3>; + def F4 : Rf< 4>; def F5 : Rf< 5>; def F6 : Rf< 6>; def F7 : Rf< 7>; + def F8 : Rf< 8>; def F9 : Rf< 9>; def F10 : Rf<10>; def F11 : Rf<11>; + def F12 : Rf<12>; def F13 : Rf<13>; def F14 : Rf<14>; def F15 : Rf<15>; + def F16 : Rf<16>; def F17 : Rf<17>; def F18 : Rf<18>; def F19 : Rf<19>; + def F20 : Rf<20>; def F21 : Rf<21>; def F22 : Rf<22>; def F23 : Rf<23>; + def F24 : Rf<24>; def F25 : Rf<25>; def F26 : Rf<26>; def F27 : Rf<27>; + def F28 : Rf<28>; def F29 : Rf<29>; def F30 : Rf<30>; def F31 : Rf<31>; } @@ -43,3 +54,7 @@ def IntRegs : RegisterClass; + +def FPRegs : RegisterClass;