mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 06:33:24 +00:00
Add the missing call to Error when a bad X86 scale expression is parsed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152443 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2d70e263c2
commit
58dfaa1465
@ -876,8 +876,10 @@ X86Operand *X86AsmParser::ParseMemOperand(unsigned SegReg, SMLoc MemStart) {
|
|||||||
SMLoc Loc = Parser.getTok().getLoc();
|
SMLoc Loc = Parser.getTok().getLoc();
|
||||||
|
|
||||||
int64_t ScaleVal;
|
int64_t ScaleVal;
|
||||||
if (getParser().ParseAbsoluteExpression(ScaleVal))
|
if (getParser().ParseAbsoluteExpression(ScaleVal)){
|
||||||
|
Error(Loc, "expected scale expression");
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Validate the scale amount.
|
// Validate the scale amount.
|
||||||
if (ScaleVal != 1 && ScaleVal != 2 && ScaleVal != 4 && ScaleVal != 8){
|
if (ScaleVal != 1 && ScaleVal != 2 && ScaleVal != 4 && ScaleVal != 8){
|
||||||
|
@ -20,3 +20,7 @@ movl 0(%rax), 0(%edx) // error: invalid operand for instruction
|
|||||||
|
|
||||||
// 32: error: instruction requires a CPU feature not currently enabled
|
// 32: error: instruction requires a CPU feature not currently enabled
|
||||||
sysexitq
|
sysexitq
|
||||||
|
|
||||||
|
// rdar://10710167
|
||||||
|
// 64: error: expected scale expression
|
||||||
|
lea (%rsp, %rbp, $4), %rax
|
||||||
|
Loading…
x
Reference in New Issue
Block a user