summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-28 01:02:58 +0000
committerChris Lattner <sabre@nondot.org>2007-04-28 01:02:58 +0000
commitc48e2c31009ee788e407f31489728c266024be56 (patch)
tree12b2db43e0681f931cf11803c2a6023ba4a2a48e /llvm/lib
parentacbf6a401dd2e2a2012638d9c6ad5b7d363dd1c2 (diff)
downloadbcm5719-llvm-c48e2c31009ee788e407f31489728c266024be56.tar.gz
bcm5719-llvm-c48e2c31009ee788e407f31489728c266024be56.zip
represent indirect operands explicitly in inline asm strings.
llvm-svn: 36522
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/VMCore/InlineAsm.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/llvm/lib/VMCore/InlineAsm.cpp b/llvm/lib/VMCore/InlineAsm.cpp
index 5f051374598..ca4ecad058c 100644
--- a/llvm/lib/VMCore/InlineAsm.cpp
+++ b/llvm/lib/VMCore/InlineAsm.cpp
@@ -55,21 +55,22 @@ bool InlineAsm::ConstraintInfo::Parse(const std::string &Str,
// Initialize
Type = isInput;
isEarlyClobber = false;
- isIndirectOutput = false;
hasMatchingInput = false;
isCommutative = false;
+ isIndirect = false;
- // Parse the prefix.
+ // Parse prefixes.
if (*I == '~') {
Type = isClobber;
++I;
} else if (*I == '=') {
++I;
Type = isOutput;
- if (I != E && *I == '=') {
- isIndirectOutput = true;
- ++I;
- }
+ }
+
+ if (*I == '*') {
+ isIndirect = true;
+ ++I;
}
if (I == E) return true; // Just a prefix, like "==" or "~".
@@ -184,12 +185,12 @@ bool InlineAsm::Verify(const FunctionType *Ty, const std::string &ConstStr) {
for (unsigned i = 0, e = Constraints.size(); i != e; ++i) {
switch (Constraints[i].Type) {
case InlineAsm::isOutput:
- if (!Constraints[i].isIndirectOutput) {
+ if (!Constraints[i].isIndirect) {
if (NumInputs || NumClobbers) return false; // outputs come first.
++NumOutputs;
break;
}
- // FALLTHROUGH for IndirectOutputs.
+ // FALLTHROUGH for Indirect Outputs.
case InlineAsm::isInput:
if (NumClobbers) return false; // inputs before clobbers.
++NumInputs;
OpenPOWER on IntegriCloud