mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
X86 MC: Don't crash on empty memory operand parens
Instead, create an absolute memory operand. Fixes PR20504. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214457 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7895ae3135
commit
0b3444cca9
@ -1880,8 +1880,10 @@ std::unique_ptr<X86Operand> X86AsmParser::ParseMemOperand(unsigned SegReg,
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
return X86Operand::CreateMem(SegReg, Disp, BaseReg, IndexReg, Scale,
|
if (SegReg || BaseReg || IndexReg)
|
||||||
MemStart, MemEnd);
|
return X86Operand::CreateMem(SegReg, Disp, BaseReg, IndexReg, Scale,
|
||||||
|
MemStart, MemEnd);
|
||||||
|
return X86Operand::CreateMem(Disp, MemStart, MemEnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool X86AsmParser::ParseInstruction(ParseInstructionInfo &Info, StringRef Name,
|
bool X86AsmParser::ParseInstruction(ParseInstructionInfo &Info, StringRef Name,
|
||||||
|
@ -52,6 +52,11 @@
|
|||||||
call *%eax
|
call *%eax
|
||||||
# CHECK: calll *4(%eax)
|
# CHECK: calll *4(%eax)
|
||||||
call *4(%eax)
|
call *4(%eax)
|
||||||
|
foo:
|
||||||
|
calll foo()
|
||||||
|
# CHECK: calll foo{{$}}
|
||||||
|
calll foo(,)
|
||||||
|
# CHECK: calll foo{{$}}
|
||||||
|
|
||||||
# CHECK: movl %gs:8, %eax
|
# CHECK: movl %gs:8, %eax
|
||||||
movl %gs:8, %eax
|
movl %gs:8, %eax
|
||||||
|
Loading…
Reference in New Issue
Block a user