summaryrefslogtreecommitdiff
path: root/include/llvm/MC
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-10-19 20:57:14 +0000
committerChad Rosier <mcrosier@apple.com>2012-10-19 20:57:14 +0000
commit96d58e64cfe88356f8be4ce622b829fbd9fb5908 (patch)
treeaa5883e266315318a6b7835bbd46cb0652797d13 /include/llvm/MC
parente2b95ebfb031c3defc75417521e89ef289a94171 (diff)
downloadllvm-96d58e64cfe88356f8be4ce622b829fbd9fb5908.tar.gz
llvm-96d58e64cfe88356f8be4ce622b829fbd9fb5908.tar.bz2
llvm-96d58e64cfe88356f8be4ce622b829fbd9fb5908.tar.xz
[ms-inline asm] Have the TargetParser callback to Sema to determine the size of
a memory operand. Retain this information and then add the sizing directives to the IR. This allows the backend to do proper instruction selection. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166316 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC')
-rw-r--r--include/llvm/MC/MCParser/MCParsedAsmOperand.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/MC/MCParser/MCParsedAsmOperand.h b/include/llvm/MC/MCParser/MCParsedAsmOperand.h
index 280145bfbc..7d0914ebb4 100644
--- a/include/llvm/MC/MCParser/MCParsedAsmOperand.h
+++ b/include/llvm/MC/MCParser/MCParsedAsmOperand.h
@@ -57,12 +57,17 @@ public:
/// isMem - Is this a memory operand?
virtual bool isMem() const = 0;
+ virtual unsigned getMemSize() const { return 0; }
/// getStartLoc - Get the location of the first token of this operand.
virtual SMLoc getStartLoc() const = 0;
/// getEndLoc - Get the location of the last token of this operand.
virtual SMLoc getEndLoc() const = 0;
+ /// needSizeDirective - Do we need to emit a sizing directive for this
+ /// operand? Only valid when parsing MS-style inline assembly.
+ virtual bool needSizeDirective() const { return false; }
+
/// print - Print a debug representation of the operand to the given stream.
virtual void print(raw_ostream &OS) const = 0;
/// dump - Print to the debug stream.