[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcV9.td SparcV9_F3.td

Misha Brukman brukman at cs.uiuc.edu
Tue Jun 3 21:27:01 PDT 2003


Changes in directory llvm/lib/Target/Sparc:

SparcV9.td updated: 1.12 -> 1.13
SparcV9_F3.td updated: 1.8 -> 1.9

---
Log message:

Added instruction format class 3.15 and floating-point compare instructions.


---
Diffs of the changes:

Index: llvm/lib/Target/Sparc/SparcV9.td
diff -u llvm/lib/Target/Sparc/SparcV9.td:1.12 llvm/lib/Target/Sparc/SparcV9.td:1.13
--- llvm/lib/Target/Sparc/SparcV9.td:1.12	Mon Jun  2 22:20:14 2003
+++ llvm/lib/Target/Sparc/SparcV9.td	Tue Jun  3 21:26:14 2003
@@ -188,15 +188,12 @@
 def FSUBQ : F3_16<2, 0b110100, 0x47, "fsubq">;    // fsubq f, f, f
 
 // Section A.13: Floating-point compare - p159
-// FIXME: FCMPS, FCMPD, FCMPQ !!!
-#if 0
-def FSTOX : F3_14<2, 0b110100, 0b011001001, "fstod">;   // fstod rs2, rd
-def FDTOX : F3_14<2, 0b110100, 0b011001101, "fstoq">;   // fstoq rs2, rd
-def FQTOX : F3_14<2, 0b110100, 0b011000110, "fstos">;   // fstos rs2, rd
-def FSTOI : F3_14<2, 0b110100, 0b011001110, "fdtoq">;   // fdtoq rs2, rd
-def FDTOI : F3_14<2, 0b110100, 0b011000111, "fqtos">;   // fqtos rs2, rd
-def FQTOI : F3_14<2, 0b110100, 0b011001011, "fqtod">;   // fqtod rs2, rd
-#endif
+def FCMPS  : F3_15<2, 0b110101, 0b010100001, "fcmps">;   // fcmps  %fcc, r1, r2
+def FCMPD  : F3_15<2, 0b110101, 0b010100010, "fcmpd">;   // fcmpd  %fcc, r1, r2
+def FCMPQ  : F3_15<2, 0b110101, 0b010100011, "fcmpq">;   // fcmpq  %fcc, r1, r2
+def FCMPES : F3_15<2, 0b110101, 0b010100101, "fcmpes">;  // fcmpes %fcc, r1, r2
+def FCMPED : F3_15<2, 0b110101, 0b010100110, "fcmped">;  // fcmped %fcc, r1, r2
+def FCMPEQ : F3_15<2, 0b110101, 0b010100111, "fcmpeq">;  // fcmpeq %fcc, r1, r2
 
 // Section A.14: Convert floating-point to integer - p161
 def FSTOX : F3_14<2, 0b110100, 0b010000001, "fstox">;   // fstox rs2, rd


Index: llvm/lib/Target/Sparc/SparcV9_F3.td
diff -u llvm/lib/Target/Sparc/SparcV9_F3.td:1.8 llvm/lib/Target/Sparc/SparcV9_F3.td:1.9
--- llvm/lib/Target/Sparc/SparcV9_F3.td:1.8	Mon Jun  2 22:20:14 2003
+++ llvm/lib/Target/Sparc/SparcV9_F3.td	Tue Jun  3 21:26:14 2003
@@ -202,12 +202,26 @@
 }
 
 class F3_14<bits<2> opVal, bits<6> op3Val,
-            bits<9> opfval, string name> : F3_rs2rd {
+            bits<9> opfVal, string name> : F3_rs2rd {
   set op  = opVal;
   set op3 = op3Val;
   set Name = name;
   //set Inst{18-14} = dontcare;
-  set Inst{13-5} = opfval;
+  set Inst{13-5} = opfVal;
+}
+
+class F3_15<bits<2> opVal, bits<6> op3Val,
+            bits<9> opfVal, string name> : F3 {
+  bits<2> cc;
+  bits<5> rs1;
+  bits<5> rs2;
+
+  set op  = opVal;
+  set op3 = op3Val;
+  set Inst{26-25} = cc;
+  set Inst{18-14} = rs1;
+  set Inst{13-5}  = opfVal;
+  set Inst{4-0}   = rs2;
 }
   
 class F3_16<bits<2> opVal,  bits<6> op3Val,





More information about the llvm-commits mailing list