mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-24 05:09:34 +00:00
[ms-inline asm] Make code layout more canonical with iniline asm handled last.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179875 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
76bb21bed8
commit
4acef770cf
@ -1341,20 +1341,20 @@ X86Operand *X86AsmParser::ParseIntelBracExpression(unsigned SegReg, SMLoc Start,
|
||||
int BaseReg = SM.getBaseReg();
|
||||
int IndexReg = SM.getIndexReg();
|
||||
int Scale = SM.getScale();
|
||||
|
||||
if (isParsingInlineAsm())
|
||||
return CreateMemForInlineAsm(SegReg, Disp, BaseReg, IndexReg, Scale, Start,
|
||||
End, Size, SM.getSymName());
|
||||
|
||||
// handle [-42]
|
||||
if (!BaseReg && !IndexReg) {
|
||||
if (!SegReg)
|
||||
return X86Operand::CreateMem(Disp, Start, End, Size);
|
||||
else
|
||||
return X86Operand::CreateMem(SegReg, Disp, 0, 0, 1, Start, End, Size);
|
||||
if (!isParsingInlineAsm()) {
|
||||
// handle [-42]
|
||||
if (!BaseReg && !IndexReg) {
|
||||
if (!SegReg)
|
||||
return X86Operand::CreateMem(Disp, Start, End, Size);
|
||||
else
|
||||
return X86Operand::CreateMem(SegReg, Disp, 0, 0, 1, Start, End, Size);
|
||||
}
|
||||
return X86Operand::CreateMem(SegReg, Disp, BaseReg, IndexReg, Scale, Start,
|
||||
End, Size);
|
||||
}
|
||||
return X86Operand::CreateMem(SegReg, Disp, BaseReg, IndexReg, Scale, Start,
|
||||
End, Size);
|
||||
|
||||
return CreateMemForInlineAsm(SegReg, Disp, BaseReg, IndexReg, Scale, Start,
|
||||
End, Size, SM.getSymName());
|
||||
}
|
||||
|
||||
// Inline assembly may use variable names with namespace alias qualifiers.
|
||||
|
Loading…
x
Reference in New Issue
Block a user