[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcV9_F3.td
Misha Brukman
brukman at cs.uiuc.edu
Mon Jun 2 20:13:02 PDT 2003
Changes in directory llvm/lib/Target/Sparc:
SparcV9_F3.td updated: 1.6 -> 1.7
---
Log message:
* Removed unused classes: the rd field is always mentioned as the last reg.
* Added new classes which start building from rs1, adding rs2, and then rd.
* Fixed order of operands in classes 3.11, 3.12, 3.16, and 3.17 .
* Fixed comments to reflect Real Life (tm).
* Removed "don't care" commented out assignments and dead classes (#if 0).
---
Diffs of the changes:
Index: llvm/lib/Target/Sparc/SparcV9_F3.td
diff -u llvm/lib/Target/Sparc/SparcV9_F3.td:1.6 llvm/lib/Target/Sparc/SparcV9_F3.td:1.7
--- llvm/lib/Target/Sparc/SparcV9_F3.td:1.6 Mon Jun 2 16:16:54 2003
+++ llvm/lib/Target/Sparc/SparcV9_F3.td Mon Jun 2 20:11:58 2003
@@ -14,45 +14,15 @@
set Inst{24-19} = op3;
}
-class F3_rd : F3 {
- bits<5> rd;
- set Inst{29-25} = rd;
-}
-
-class F3_rdsimm13 : F3_rd {
- bits<13> simm13;
- set Inst{12-0} = simm13;
-}
-
-class F3_rdsimm13rs1 : F3_rdsimm13 {
- bits<5> rs1;
- set Inst{18-14} = rs1;
-}
-
-// F3_rdrs1 - Common superclass of instructions that use rd & rs1
-class F3_rdrs1 : F3_rd {
- bits<5> rs1;
- set Inst{18-14} = rs1;
-}
-
-// F3_rs1rdrs2 - Common superclass of instructions with rd, rs1, & rs2 fields
-class F3_rdrs1rs2 : F3_rdrs1 {
- bits<5> rs2;
- set Inst{4-0} = rs2;
-}
-
-// F3_rs1 - Common class of instructions that do not have an rd field,
-// but start at rs1
+// F3_rs1 - Common class of instructions that have an rs1 field
class F3_rs1 : F3 {
bits<5> rs1;
- //set Inst{29-25} = dontcare;
set Inst{18-14} = rs1;
}
// F3_rs1rs2 - Common class of instructions that only have rs1 and rs2 fields
class F3_rs1rs2 : F3_rs1 {
bits<5> rs2;
- //set Inst{12-5} = dontcare;
set Inst{4-0} = rs2;
}
@@ -74,6 +44,12 @@
set Inst{29-25} = rd;
}
+// F3_rs1rd - Common class of instructions that have an rs1 and rd fields
+class F3_rs1rd : F3_rs1 {
+ bits<5> rd;
+ set Inst{29-25} = rd;
+}
+
// F3_rs2 - Common class of instructions that don't use an rs1
class F3_rs2 : F3 {
bits<5> rs2;
@@ -86,6 +62,12 @@
set Inst{29-25} = rd;
}
+// F3_rd - Common class of instructions that only have an rd field
+class F3_rd : F3 {
+ bits<5> rd;
+ set Inst{29-25} = rd;
+}
+
// Specific F3 classes...
//
@@ -105,26 +87,6 @@
set Inst{13} = 1; // i field = 1
}
-#if 0
-// The ordering is actually incorrect in these: in the assemble syntax,
-// rd appears last!
-class F3_1a<bits<2> opVal, bits<6> op3val, string name> : F3_rdrs1rs2 {
- set op = opVal;
- set op3 = op3val;
- set Name = name;
- set Inst{13} = 0; // i field = 0
- //set Inst{12-5} = dontcare;
-}
-
-class F3_2a<bits<2> opVal, bits<6> op3val, string name> : F3_rdsimm13rs1 {
- set op = opVal;
- set op3 = op3val;
- set Name = name;
- set Inst{13} = 1; // i field = 1
-}
-#endif
-
-
class F3_3<bits<2> opVal, bits<6> op3val, string name> : F3_rs1rs2 {
set op = opVal;
set op3 = op3val;
@@ -165,7 +127,7 @@
//FIXME: classes 7-10 not defined!!
-class F3_11<bits<2> opVal, bits<6> op3Val, string name> : F3_rdrs1rs2 {
+class F3_11<bits<2> opVal, bits<6> op3Val, string name> : F3_rs1rs2rd {
bit x;
set op = opVal;
set op3 = op3Val;
@@ -175,14 +137,14 @@
//set Inst{11-5} = dontcare;
}
-class F3_12<bits<2> opVal, bits<6> op3Val, string name> : F3_rd {
+class F3_12<bits<2> opVal, bits<6> op3Val, string name> : F3_rs1 {
bits<5> shcnt;
- bits<5> rs1;
+ bits<5> rd;
set op = opVal;
set op3 = op3Val;
set Name = name;
- set Inst{18-14} = rs1;
+ set Inst{29-25} = rd;
set Inst{13} = 1; // i field = 1
set Inst{12} = 0; // x field = 0
//set Inst{11-5} = dontcare;
@@ -213,14 +175,14 @@
}
class F3_16<bits<2> opVal, bits<6> op3Val,
- bits<9> opfval, string name> : F3_rdrs1rs2 {
+ bits<9> opfval, string name> : F3_rs1rs2rd {
set op = opVal;
set op3 = op3Val;
set Name = name;
set Inst{13-5} = opfval;
}
-class F3_17<bits<2> opVal, bits<6> op3Val, string name> : F3_rdrs1 {
+class F3_17<bits<2> opVal, bits<6> op3Val, string name> : F3_rs1rd {
set op = opVal;
set op3 = op3Val;
set Name = name;
More information about the llvm-commits
mailing list