Set the destination register field based on the target specific flags
authorChris Lattner <sabre@nondot.org>
Wed, 30 Oct 2002 01:15:31 +0000 (01:15 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 30 Oct 2002 01:15:31 +0000 (01:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4442 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86InstrInfo.cpp
lib/Target/X86/X86InstrInfo.def

index 6d2bf1d49697fbce75c2e38c7273239eb93821b5..c81ddb19003ee82dbdc1d170a177b211a695eb05 100644 (file)
 // descriptors
 //
 static const MachineInstrDescriptor X86Insts[] = {
-#define I(ENUM, NAME, FLAGS, TSFLAGS) \
-             { NAME, -1, -1, 0, false, 0, 0, TSFLAGS, FLAGS },
+#define I(ENUM, NAME, FLAGS, TSFLAGS)   \
+             { NAME,                    \
+               -1, /* Always vararg */  \
+               ((TSFLAGS) & X86II::Void) ? -1 : 0,  /* Result is in 0 */ \
+               0, false, 0, 0, TSFLAGS, FLAGS, TSFLAGS },
 #include "X86InstrInfo.def"
 };
 
index bd4e47be4d3755b76bad420d525a721b3db4166e..2388b9bf38d24f8070a4af3a5f72823eb527571f 100644 (file)
@@ -5,6 +5,10 @@
 // specified below, and is used to make all of the information relevant to an
 // instruction be in one place.
 //
+// Note that X86 Instructions always have the destination register listed as
+// operand 0, unless it does not produce a value (in which case the TSFlags will
+// include X86II::Void).
+//
 //===----------------------------------------------------------------------===//
 
 // NOTE: No include guards desired