mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-04 09:54:09 +00:00
[ms-inline asm] When parsing inline assembly we set the base register to a
non-zero value as we don't know the actual value at this point. This is necessary to get the matching correct in some cases. However, the actual value set as the base register doesn't matter, since we're just matching not emitting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166523 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fac14ab179
commit
2a784131fe
@ -808,8 +808,15 @@ X86Operand *X86AsmParser::ParseIntelMemOperand(unsigned SegReg, SMLoc Start) {
|
||||
NeedSizeDir = Size > 0;
|
||||
}
|
||||
}
|
||||
return X86Operand::CreateMem(Disp, Start, End, OffsetOfLoc, Size, OffsetOf,
|
||||
NeedSizeDir);
|
||||
if (!isParsingInlineAsm())
|
||||
return X86Operand::CreateMem(Disp, Start, End, OffsetOfLoc, Size);
|
||||
else
|
||||
// When parsing inline assembly we set the basereg to a non-zero value as we
|
||||
// don't know the actualy value at this time. This is necessary to get the
|
||||
// matching correct in some cases.
|
||||
return X86Operand::CreateMem(/*SegReg*/0, Disp, /*BaseReg*/1, /*IndexReg*/0,
|
||||
/*Scale*/1, Start, End, OffsetOfLoc, Size,
|
||||
OffsetOf, NeedSizeDir);
|
||||
}
|
||||
|
||||
X86Operand *X86AsmParser::ParseIntelOperand() {
|
||||
|
Loading…
Reference in New Issue
Block a user