[llvm-commits] CVS: llvm/lib/Target/SparcV8/SparcV8Instrs.td SparcV8Instrs_F2.td SparcV8Instrs_F3.td SparcV8RegisterInfo.cpp

Chris Lattner lattner at cs.uiuc.edu
Sat Feb 28 13:38:01 PST 2004


Changes in directory llvm/lib/Target/SparcV8:

SparcV8Instrs.td updated: 1.4 -> 1.5
SparcV8Instrs_F2.td updated: 1.1 -> 1.2
SparcV8Instrs_F3.td updated: 1.1 -> 1.2
SparcV8RegisterInfo.cpp updated: 1.1 -> 1.2

---
Log message:

Bring this directory into "it actually compiles" land


---
Diffs of the changes:  (+20 -8)

Index: llvm/lib/Target/SparcV8/SparcV8Instrs.td
diff -u llvm/lib/Target/SparcV8/SparcV8Instrs.td:1.4 llvm/lib/Target/SparcV8/SparcV8Instrs.td:1.5
--- llvm/lib/Target/SparcV8/SparcV8Instrs.td:1.4	Sat Feb 28 13:31:32 2004
+++ llvm/lib/Target/SparcV8/SparcV8Instrs.td	Sat Feb 28 13:37:18 2004
@@ -35,6 +35,17 @@
 // Instructions
 //===----------------------------------------------------------------------===//
 
+// Pseudo instructions.
+def PHI : InstV8 {
+  let Name = "PHI";
+}
+def ADJCALLSTACKDOWN : InstV8 {
+  let Name = "ADJCALLSTACKDOWN";
+}
+def ADJCALLSTACKUP : InstV8 {
+  let Name = "ADJCALLSTACKUP";
+}
+
 // Section B.20: SAVE and RESTORE - p117
 def SAVEr    : F3_1<2, 0b111100, "save">;           // save    r, r, r
 def SAVEi    : F3_2<2, 0b111100, "save">;           // save    r, i, r


Index: llvm/lib/Target/SparcV8/SparcV8Instrs_F2.td
diff -u llvm/lib/Target/SparcV8/SparcV8Instrs_F2.td:1.1 llvm/lib/Target/SparcV8/SparcV8Instrs_F2.td:1.2
--- llvm/lib/Target/SparcV8/SparcV8Instrs_F2.td:1.1	Wed Feb 25 14:52:20 2004
+++ llvm/lib/Target/SparcV8/SparcV8Instrs_F2.td	Sat Feb 28 13:37:18 2004
@@ -31,7 +31,7 @@
   let Inst{29-25} = rd;
 }
 
-class F2_2<bits<4> cond, bits<3> op2Val, string name> : F2 {
+class F2_2<bits<4> condVal, bits<3> op2Val, string name> : F2 {
   bits<4>   cond;
   bit       annul = 0;     // currently unused
 


Index: llvm/lib/Target/SparcV8/SparcV8Instrs_F3.td
diff -u llvm/lib/Target/SparcV8/SparcV8Instrs_F3.td:1.1 llvm/lib/Target/SparcV8/SparcV8Instrs_F3.td:1.2
--- llvm/lib/Target/SparcV8/SparcV8Instrs_F3.td:1.1	Wed Feb 25 14:52:20 2004
+++ llvm/lib/Target/SparcV8/SparcV8Instrs_F3.td	Sat Feb 28 13:37:18 2004
@@ -47,6 +47,7 @@
   let Inst{12-0} = simm13;
 }
 
+/*
 class F3_3<bits<2> opVal, bits<6> op3val, bits<9> opfVal, string name> 
   : F3_rs1rs2 {
   bits<5> rs2;
@@ -58,4 +59,4 @@
   let Inst{13-5} = opfVal;
   let Inst{4-0}  = rs2;
 }
-
+*/
\ No newline at end of file


Index: llvm/lib/Target/SparcV8/SparcV8RegisterInfo.cpp
diff -u llvm/lib/Target/SparcV8/SparcV8RegisterInfo.cpp:1.1 llvm/lib/Target/SparcV8/SparcV8RegisterInfo.cpp:1.2
--- llvm/lib/Target/SparcV8/SparcV8RegisterInfo.cpp:1.1	Wed Feb 25 13:28:19 2004
+++ llvm/lib/Target/SparcV8/SparcV8RegisterInfo.cpp	Sat Feb 28 13:37:18 2004
@@ -17,8 +17,8 @@
 using namespace llvm;
 
 SparcV8RegisterInfo::SparcV8RegisterInfo()
-  : SparcV8GenRegisterInfo(SparcV8::ADJCALLSTACKDOWN,
-                           SparcV8::ADJCALLSTACKUP) {}
+  : SparcV8GenRegisterInfo(V8::ADJCALLSTACKDOWN,
+                           V8::ADJCALLSTACKUP) {}
 
 int SparcV8RegisterInfo::storeRegToStackSlot(
   MachineBasicBlock &MBB,
@@ -80,6 +80,9 @@
 const TargetRegisterClass*
 SparcV8RegisterInfo::getRegClassForType(const Type* Ty) const {
   switch (Ty->getPrimitiveID()) {
+  case Type::FloatTyID:
+  case Type::DoubleTyID:
+    assert(0 && "Floating point registers not supported yet!");
   case Type::LongTyID:
   case Type::ULongTyID: assert(0 && "Long values can't fit in registers!");
   default:              assert(0 && "Invalid type to getClass!");
@@ -90,10 +93,7 @@
   case Type::UShortTyID:
   case Type::IntTyID:
   case Type::UIntTyID:
-  case Type::PointerTyID: return &GPRCInstance;
-    
-  case Type::FloatTyID:
-  case Type::DoubleTyID: return &FPRCInstance;
+  case Type::PointerTyID: return &IntRegsInstance;
   }
 }
 





More information about the llvm-commits mailing list