Skip to content

Commit

Permalink
[inline asm] dot operator while using imm generates wrong ir + asm - …
Browse files Browse the repository at this point in the history
…llvm part

Inline asm dot operator while using imm generates wrong ir and asm

This also fixes bugzilla 32987:
https://bugs.llvm.org//show_bug.cgi?id=32987

The clang part of the review that contains the test can be found here:
https://reviews.llvm.org/D33040

commit on behald of zizhar

Differential Revision:
https://reviews.llvm.org/D33039



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306300 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Marina Yatsina committed Jun 26, 2017
1 parent 699f4c4 commit 2db1a71
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Target/X86/AsmParser/X86AsmParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1705,8 +1705,7 @@ bool X86AsmParser::ParseIntelDotOperator(const MCExpr *Disp,
if (isParsingInlineAsm() && Tok.is(AsmToken::Identifier)) {
SMLoc Loc = SMLoc::getFromPointer(DotDispStr.data());
unsigned Len = DotDispStr.size();
unsigned Val = OrigDispVal + DotDispVal;
InstInfo->AsmRewrites->emplace_back(AOK_DotOperator, Loc, Len, Val);
InstInfo->AsmRewrites->emplace_back(AOK_DotOperator, Loc, Len, DotDispVal);
}

NewDisp = MCConstantExpr::create(OrigDispVal + DotDispVal, getContext());
Expand Down

0 comments on commit 2db1a71

Please sign in to comment.