The real x87 floating point registers should not be allocatable. They
authorAlkis Evlogimenos <alkis@evlogimenos.com>
Tue, 21 Sep 2004 21:22:11 +0000 (21:22 +0000)
committerAlkis Evlogimenos <alkis@evlogimenos.com>
Tue, 21 Sep 2004 21:22:11 +0000 (21:22 +0000)
are only used by the stackifier when transforming FPn register
allocations to the real stack file x87 registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16472 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86RegisterInfo.td

index 4262a9ffd70aefb2e47e5e924b0ab5965b71a98b..628a239d0143726815d5604bcfb550ca919180ae 100644 (file)
@@ -86,5 +86,13 @@ def R32 : RegisterClass<i32, 32, [EAX, ECX, EDX, ESI, EDI, EBX, EBP, ESP]> {
 
 def RFP : RegisterClass<f80, 32, [FP0, FP1, FP2, FP3, FP4, FP5, FP6]>;
 
-// Floating point stack registers.
-def RST : RegisterClass<f80, 32, [ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7]>;
+// Floating point stack registers (these are not allocatable by the
+// register allocator - the floating point stackifier is responsible
+// for transforming FPn allocations to STn registers)
+def RST : RegisterClass<f80, 32, [ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7]> {
+  let Methods = [{
+    iterator allocation_order_end(MachineFunction &MF) const {
+      return begin();
+    }
+  }];
+}