[llvm-commits] CVS: llvm/lib/Target/X86/X86InstrInfo.td
Chris Lattner
lattner at cs.uiuc.edu
Tue Apr 13 12:21:01 PDT 2004
Changes in directory llvm/lib/Target/X86:
X86InstrInfo.td updated: 1.75 -> 1.76
---
Log message:
Add immediate forms of in/out. Use let to shorten lines
---
Diffs of the changes: (+20 -8)
Index: llvm/lib/Target/X86/X86InstrInfo.td
diff -u llvm/lib/Target/X86/X86InstrInfo.td:1.75 llvm/lib/Target/X86/X86InstrInfo.td:1.76
--- llvm/lib/Target/X86/X86InstrInfo.td:1.75 Sun Apr 11 22:02:48 2004
+++ llvm/lib/Target/X86/X86InstrInfo.td Tue Apr 13 12:19:31 2004
@@ -151,7 +151,6 @@
// Helper for shift instructions
class UsesCL { list<Register> Uses = [CL]; bit printImplicitUsesAfter = 1; }
-class PrintImpUsesAfter {bit printImplicitUsesAfter = 1;}
class PrintImpDefsAfter {bit printImplicitDefsAfter = 1;}
//===----------------------------------------------------------------------===//
@@ -248,13 +247,26 @@
//===----------------------------------------------------------------------===//
// Input/Output Instructions...
//
-def IN8 : I<"in", 0xEC, RawFrm>, Imp<[DX],[AL]>, PrintImpUsesAfter, PrintImpDefsAfter; // in AL = I/O address DX
-def IN16 : I<"in", 0xED, RawFrm>, Imp<[DX],[AX]>, OpSize, PrintImpUsesAfter, PrintImpDefsAfter; // in AX = I/O address DX
-def IN32 : I<"in", 0xED, RawFrm>, Imp<[DX],[EAX]>, PrintImpUsesAfter, PrintImpDefsAfter; // in EAX = I/O address DX
-
-def OUT8 : I<"out", 0xEE, RawFrm>, Imp<[DX, AL], []>, PrintImpUsesAfter;
-def OUT16 : I<"out", 0xEF, RawFrm>, Imp<[DX, AX], []>, OpSize, PrintImpUsesAfter;
-def OUT32 : I<"out", 0xEF, RawFrm>, Imp<[DX, EAX], []>, PrintImpUsesAfter;
+let printImplicitUsesAfter = 1, printImplicitDefsAfter = 1 in {
+ def IN8rr : I<"in", 0xEC, RawFrm>, Imp<[DX], [AL]>; // AL = in I/O address DX
+ def IN16rr : I<"in", 0xED, RawFrm>, Imp<[DX], [AX]>, OpSize; // AX = in I/O address DX
+ def IN32rr : I<"in", 0xED, RawFrm>, Imp<[DX],[EAX]>; // EAX = in I/O address DX
+}
+
+let printImplicitDefsBefore = 1 in {
+ def IN8ri : Ii16<"in", 0xE4, RawFrm>, Imp<[], [AL]>; // AL = in [I/O address]
+ def IN16ri : Ii16<"in", 0xE5, RawFrm>, Imp<[], [AX]>, OpSize; // AX = in [I/O address]
+ def IN32ri : Ii16<"in", 0xE5, RawFrm>, Imp<[],[EAX]>; // EAX = in [I/O address]
+}
+
+let printImplicitUsesAfter = 1 in {
+ def OUT8rr : I<"out", 0xEE, RawFrm>, Imp<[DX, AL], []>;
+ def OUT16rr : I<"out", 0xEF, RawFrm>, Imp<[DX, AX], []>, OpSize;
+ def OUT32rr : I<"out", 0xEF, RawFrm>, Imp<[DX, EAX], []>;
+ def OUT8ir : Ii16<"out", 0xE6, RawFrm>, Imp<[AL], []>;
+ def OUT16ir : Ii16<"out", 0xE7, RawFrm>, Imp<[AX], []>, OpSize;
+ def OUT32ir : Ii16<"out", 0xE7, RawFrm>, Imp<[EAX], []>;
+}
//===----------------------------------------------------------------------===//
// Move Instructions...
More information about the llvm-commits
mailing list