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

Misha Brukman brukman at cs.uiuc.edu
Wed Jun 4 20:07:01 PDT 2003


Changes in directory llvm/lib/Target/Sparc:

SparcV9.td updated: 1.15 -> 1.16

---
Log message:

All store instructions really want 'rd' in the first field.

Special cases: STFSRx and STXFSRx - they operate on predefined rd=0 or rd=1, and
expect %fsr as the parameter in assembly. They are disabled (since not used)
until an encoding, both for code generation and output, is chosen.


---
Diffs of the changes:

Index: llvm/lib/Target/Sparc/SparcV9.td
diff -u llvm/lib/Target/Sparc/SparcV9.td:1.15 llvm/lib/Target/Sparc/SparcV9.td:1.16
--- llvm/lib/Target/Sparc/SparcV9.td:1.15	Tue Jun  3 23:48:31 2003
+++ llvm/lib/Target/Sparc/SparcV9.td	Wed Jun  4 20:06:10 2003
@@ -678,7 +678,8 @@
 // Section A.51: Store Barrier - p224
 // Not currently used in the Sparc backend
 
-// Section A.52: Store Floating-point -p225
+// Section A.52: Store Floating-point - p225
+// Store instructions all want their rd register first
 def STFr  : F3_1rd<3, 0b100100, "st">;                      // st r, [r+r]
 def STFi  : F3_2rd<3, 0b100100, "st">;                      // st r, [r+i]
 def STDFr : F3_1rd<3, 0b100111, "std">;                     // std r, [r+r]
@@ -690,25 +691,31 @@
 def STQFi : F3_2rd<3, 0b100110, "stq">;                     // stq r, [r+i]
 #endif
 
+// FIXME: An encoding needs to be chosen here, because STFSRx expect rd=0,
+// while STXFSRx expect rd=1, but assembly syntax dictates %fsr as first arg.
+// These are being disabled because they aren't used in the Sparc backend.
+#if 0
 set isDeprecated = 1 in {
-  def STFSRr : F3_1<3, 0b100101, "st">;                   // st r, [r+r]
-  def STFSRi : F3_2<3, 0b100101, "st">;                   // st r, [r+i]
+  def STFSRr : F3_1<3, 0b100101, "st">;                   // st  %fsr, [r+r]
+  def STFSRi : F3_2<3, 0b100101, "st">;                   // st  %fsr, [r+i]
 }
-def STXFSRr : F3_1<3, 0b100101, "stq">;                   // stx r, [r+r]
-def STXFSRi : F3_2<3, 0b100101, "stq">;                   // stx r, [r+i]
+def STXFSRr : F3_1<3, 0b100101, "stx">;                   // stx %fsr, [r+r]
+def STXFSRi : F3_2<3, 0b100101, "stx">;                   // stx %fsr, [r+i]
+#endif
 
 // Section A.53: Store Floating-Point into Alternate Space - p227
 // Not currently used in the Sparc backend
 
 // Section A.54: Store Integer - p229
-def STBr : F3_1<3, 0b000101, "stb">;                     // stb r, [r+r]
-def STBi : F3_2<3, 0b000101, "stb">;                     // stb r, [r+i]
-def STHr : F3_1<3, 0b000110, "stb">;                     // stb r, [r+r]
-def STHi : F3_2<3, 0b000110, "stb">;                     // stb r, [r+i]
-def STWr : F3_1<3, 0b000100, "stb">;                     // stb r, [r+r]
-def STWi : F3_2<3, 0b000100, "stb">;                     // stb r, [r+i]
-def STXr : F3_1<3, 0b001110, "stb">;                     // stb r, [r+r]
-def STXi : F3_2<3, 0b001110, "stb">;                     // stb r, [r+i]
+// Store instructions all want their rd register first
+def STBr : F3_1rd<3, 0b000101, "stb">;                     // stb r, [r+r]
+def STBi : F3_2rd<3, 0b000101, "stb">;                     // stb r, [r+i]
+def STHr : F3_1rd<3, 0b000110, "sth">;                     // stb r, [r+r]
+def STHi : F3_2rd<3, 0b000110, "sth">;                     // stb r, [r+i]
+def STWr : F3_1rd<3, 0b000100, "stw">;                     // stb r, [r+r]
+def STWi : F3_2rd<3, 0b000100, "stw">;                     // stb r, [r+i]
+def STXr : F3_1rd<3, 0b001110, "stx">;                     // stb r, [r+r]
+def STXi : F3_2rd<3, 0b001110, "stx">;                     // stb r, [r+i]
 
 // Section A.55: Store Integer into Alternate Space - p231
 // Not currently used in the Sparc backend





More information about the llvm-commits mailing list