[llvm-commits] [llvm] r129722 - in /llvm/trunk: lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp lib/Target/X86/InstPrinter/X86ATTInstPrinter.h utils/TableGen/AsmWriterEmitter.cpp
Eric Christopher
echristo at apple.com
Mon Apr 18 14:28:11 PDT 2011
Author: echristo
Date: Mon Apr 18 16:28:11 2011
New Revision: 129722
URL: http://llvm.org/viewvc/llvm-project?rev=129722&view=rev
Log:
Invert the meaning of printAliasInstr's return value. It now returns
true on success and false on failure. Update callers.
Modified:
llvm/trunk/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp
llvm/trunk/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h
llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
Modified: llvm/trunk/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp?rev=129722&r1=129721&r2=129722&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp Mon Apr 18 16:28:11 2011
@@ -42,7 +42,8 @@
}
void X86ATTInstPrinter::printInst(const MCInst *MI, raw_ostream &OS) {
- if (printAliasInstr(MI, OS))
+ // Try to print any aliases first.
+ if (!printAliasInstr(MI, OS))
printInstruction(MI, OS);
// If verbose assembly is enabled, we can print some informative comments.
Modified: llvm/trunk/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h?rev=129722&r1=129721&r2=129722&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h (original)
+++ llvm/trunk/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h Mon Apr 18 16:28:11 2011
@@ -31,6 +31,8 @@
// Methods used to print the alias of an instruction.
unsigned ComputeAvailableFeatures(const X86Subtarget *Subtarget) const;
+ // Autogenerated by tblgen, returns true if we successfully printed an
+ // alias.
bool printAliasInstr(const MCInst *MI, raw_ostream &OS);
// Autogenerated by tblgen.
Modified: llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp?rev=129722&r1=129721&r2=129722&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp Mon Apr 18 16:28:11 2011
@@ -975,11 +975,11 @@
CasesO << '\n';
}
- CasesO.indent(4) << "return true;\n";
+ CasesO.indent(4) << "return false;\n";
}
if (CasesO.str().empty() || !isMC) {
- O << " return true;\n";
+ O << " return false;\n";
O << "}\n\n";
O << "#endif // PRINT_ALIAS_INSTR\n";
return;
@@ -990,7 +990,7 @@
if (NeedAvailableFeatures)
O.indent(2) << "unsigned AvailableFeatures = getAvailableFeatures();\n\n";
O.indent(2) << "switch (MI->getOpcode()) {\n";
- O.indent(2) << "default: return true;\n";
+ O.indent(2) << "default: return false;\n";
O << CasesO.str();
O.indent(2) << "}\n\n";
@@ -1019,7 +1019,7 @@
O << " }\n";
O << " }\n\n";
- O << " return false;\n";
+ O << " return true;\n";
O << "}\n\n";
O << "#endif // PRINT_ALIAS_INSTR\n";
More information about the llvm-commits
mailing list