[llvm-branch-commits] [llvm-branch] r119206 - in /llvm/branches/Apple/whitney: docs/CodeGenerator.html utils/TableGen/AsmMatcherEmitter.cpp
Daniel Dunbar
daniel at zuster.org
Mon Nov 15 13:43:36 PST 2010
Author: ddunbar
Date: Mon Nov 15 15:43:35 2010
New Revision: 119206
URL: http://llvm.org/viewvc/llvm-project?rev=119206&view=rev
Log:
Merge r117840:
--
Author: Chris Lattner <clattner at apple.com>
Date: Sat Oct 30 19:47:49 2010 +0000
fix typos and some serious bugs in feature handling (but not for
cases that are currently exercised). Thanks to Frits van Bommel for
the great review!
Modified:
llvm/branches/Apple/whitney/docs/CodeGenerator.html
llvm/branches/Apple/whitney/utils/TableGen/AsmMatcherEmitter.cpp
Modified: llvm/branches/Apple/whitney/docs/CodeGenerator.html
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/whitney/docs/CodeGenerator.html?rev=119206&r1=119205&r2=119206&view=diff
==============================================================================
--- llvm/branches/Apple/whitney/docs/CodeGenerator.html (original)
+++ llvm/branches/Apple/whitney/docs/CodeGenerator.html Mon Nov 15 15:43:35 2010
@@ -1909,7 +1909,7 @@
<div class="doc_text">
-<p>The first phase of alias processing is simple instruction mneomonic
+<p>The first phase of alias processing is simple instruction mnemonic
remapping for classes of instructions which are allowed with two different
mnemonics. This phase is a simple and unconditionally remapping from one input
mnemonic to one output mnemonic. It isn't possible for this form of alias to
Modified: llvm/branches/Apple/whitney/utils/TableGen/AsmMatcherEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/whitney/utils/TableGen/AsmMatcherEmitter.cpp?rev=119206&r1=119205&r2=119206&view=diff
==============================================================================
--- llvm/branches/Apple/whitney/utils/TableGen/AsmMatcherEmitter.cpp (original)
+++ llvm/branches/Apple/whitney/utils/TableGen/AsmMatcherEmitter.cpp Mon Nov 15 15:43:35 2010
@@ -1571,21 +1571,25 @@
// We can't have two aliases from the same mnemonic with no predicate.
PrintError(ToVec[AliasWithNoPredicate]->getLoc(),
"two MnemonicAliases with the same 'from' mnemonic!");
- PrintError(R->getLoc(), "this is the other MnemonicAliases.");
- throw std::string("ERROR: Invalid MnemonicAliases definitions!");
+ PrintError(R->getLoc(), "this is the other MnemonicAlias.");
+ throw std::string("ERROR: Invalid MnemonicAlias definitions!");
}
AliasWithNoPredicate = i;
continue;
}
+ if (!MatchCode.empty())
+ MatchCode += "else ";
MatchCode += "if ((Features & " + FeatureMask + ") == "+FeatureMask+")\n";
MatchCode += " Mnemonic = \"" +R->getValueAsString("ToMnemonic")+"\";\n";
}
if (AliasWithNoPredicate != -1) {
Record *R = ToVec[AliasWithNoPredicate];
- MatchCode += "Mnemonic = \"" + R->getValueAsString("ToMnemonic") + "\";";
+ if (!MatchCode.empty())
+ MatchCode += "else\n ";
+ MatchCode += "Mnemonic = \"" + R->getValueAsString("ToMnemonic")+"\";\n";
}
MatchCode += "return;";
More information about the llvm-branch-commits
mailing list