From 96d58e64cfe88356f8be4ce622b829fbd9fb5908 Mon Sep 17 00:00:00 2001 From: Chad Rosier <mcrosier@apple.com> Date: Fri, 19 Oct 2012 20:57:14 +0000 Subject: [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 --- include/llvm/MC/MCParser/MCParsedAsmOperand.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/llvm/MC/MCParser/MCParsedAsmOperand.h b/include/llvm/MC/MCParser/MCParsedAsmOperand.h index 280145b..7d0914e 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. -- cgit v1.1