[llvm-commits] CVS: llvm/utils/TableGen/SubtargetEmitter.cpp
Evan Cheng
evan.cheng at apple.com
Fri Jan 27 00:09:57 PST 2006
Changes in directory llvm/utils/TableGen:
SubtargetEmitter.cpp updated: 1.16 -> 1.17
---
Log message:
Subtarget feature can now set any variable to any value
---
Diffs of the changes: (+4 -3)
SubtargetEmitter.cpp | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
Index: llvm/utils/TableGen/SubtargetEmitter.cpp
diff -u llvm/utils/TableGen/SubtargetEmitter.cpp:1.16 llvm/utils/TableGen/SubtargetEmitter.cpp:1.17
--- llvm/utils/TableGen/SubtargetEmitter.cpp:1.16 Thu Jan 26 19:41:55 2006
+++ llvm/utils/TableGen/SubtargetEmitter.cpp Fri Jan 27 02:09:42 2006
@@ -473,10 +473,11 @@
Record *R = Features[i];
std::string Instance = R->getName();
std::string Name = R->getValueAsString("Name");
- std::string Type = R->getValueAsString("Type");
+ std::string Value = R->getValueAsString("Value");
std::string Attribute = R->getValueAsString("Attribute");
-
- OS << " " << Attribute << " = (Bits & " << Instance << ") != 0;\n";
+
+ OS << " if ((Bits & " << Instance << ") != 0) "
+ << Attribute << " = " << Value << ";\n";
}
if (HasItineraries) {
More information about the llvm-commits
mailing list