diff options
author | Chris Lattner <sabre@nondot.org> | 2004-04-13 17:19:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-04-13 17:19:31 +0000 |
commit | 440bbc257edf23026a006a1f86199b082cec39e6 (patch) | |
tree | e039b929dde6e5b9ea4582ee5f6157c3769521d6 /lib | |
parent | e47f4ff9f60e786e34c6d625ad8e682de66680c5 (diff) | |
download | external_llvm-440bbc257edf23026a006a1f86199b082cec39e6.zip external_llvm-440bbc257edf23026a006a1f86199b082cec39e6.tar.gz external_llvm-440bbc257edf23026a006a1f86199b082cec39e6.tar.bz2 |
Add immediate forms of in/out. Use let to shorten lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12895 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/X86/X86InstrInfo.td | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td index 8850e09..7ffb889 100644 --- a/lib/Target/X86/X86InstrInfo.td +++ b/lib/Target/X86/X86InstrInfo.td @@ -151,7 +151,6 @@ class Im32i8<string n, bits<8> o, Format f> : X86Inst<n, o, f, Mem32, Imm8>; // 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 @@ def REP_STOSD : I<"rep stosd", 0xAB, RawFrm>, REP, //===----------------------------------------------------------------------===// // 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 +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] +} -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 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... |