diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-03-20 18:03:34 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-03-20 18:03:34 +0000 |
commit | 697cbbfb00c318f98d6eb51945f077e2bfe8781e (patch) | |
tree | 5e9badf081c1c2df5cee211ca2efe5451a07faf4 /include | |
parent | e9d81f0ad8a7fa75776e1bc4cf396061d2ab041c (diff) | |
download | external_llvm-697cbbfb00c318f98d6eb51945f077e2bfe8781e.zip external_llvm-697cbbfb00c318f98d6eb51945f077e2bfe8781e.tar.gz external_llvm-697cbbfb00c318f98d6eb51945f077e2bfe8781e.tar.bz2 |
For inline asm output operand that matches an input. Encode the input operand index in the high bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67387 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/InlineAsm.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/llvm/InlineAsm.h b/include/llvm/InlineAsm.h index 879b2e8..6347cae 100644 --- a/include/llvm/InlineAsm.h +++ b/include/llvm/InlineAsm.h @@ -128,6 +128,24 @@ public: static inline bool classof(const Value *V) { return V->getValueID() == Value::InlineAsmVal; } + + /// getNumOperandRegisters - Extract the number of registers field from the + /// inline asm operand flag. + static unsigned getNumOperandRegisters(unsigned Flag) { + return (Flag & 0xffff) >> 3; + } + + /// isOutputOperandTiedToUse - Return true if the flag of the inline asm + /// operand indicates it is an output that's matched to an input operand. + static bool isOutputOperandTiedToUse(unsigned Flag, unsigned &UseIdx) { + if (Flag & 0x80000000) { + UseIdx = Flag >> 16; + return true; + } + return false; + } + + }; } // End llvm namespace |