aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/MC/MCParser/AsmParser.cpp6
-rw-r--r--lib/Target/X86/AsmParser/X86AsmParser.cpp5
2 files changed, 4 insertions, 7 deletions
diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp
index b47a6bd..0a65720 100644
--- a/lib/MC/MCParser/AsmParser.cpp
+++ b/lib/MC/MCParser/AsmParser.cpp
@@ -3667,12 +3667,6 @@ bool AsmParser::ParseMSInlineAsm(void *AsmLoc, std::string &AsmString,
AsmStrRewrites.push_back(AsmRewrite(AOK_SizeDirective,
Operand->getStartLoc(), 0,
Operand->getMemSize()));
-
- // Don't emit the offset directive.
- if (Operand->isOffsetOf())
- AsmStrRewrites.push_back(AsmRewrite(AOK_Skip,
- Operand->getOffsetOfLoc(), 7));
-
if (isOutput) {
std::string Constraint = "=";
++InputIdx;
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp
index 7f47ef4..a3e90af 100644
--- a/lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp
@@ -879,13 +879,16 @@ X86Operand *X86AsmParser::ParseIntelOffsetOfOperator(SMLoc Start) {
Start = Parser.getTok().getLoc();
assert (Parser.getTok().is(AsmToken::Identifier) && "Expected an identifier");
- SMLoc End;
+ SMLoc End;
const MCExpr *Val;
if (getParser().ParseExpression(Val, End))
return 0;
End = Parser.getTok().getLoc();
+ // Don't emit the offset operator.
+ InstInfo->AsmRewrites->push_back(AsmRewrite(AOK_Skip, OffsetOfLoc, 7));
+
// The offset operator will have an 'r' constraint, thus we need to create
// register operand to ensure proper matching. Just pick a GPR based on
// the size of a pointer.