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
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());