mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-17 06:33:21 +00:00
X86: only access operands if they are present
If there is no associated immediate (MS style inline asm), do not try to access the operand, assume that it is valid. This should fix the buildbots after SVN r225941. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225950 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
497b958447
commit
e1f65e239a
@ -2277,6 +2277,8 @@ bool X86AsmParser::validateInstruction(MCInst &Inst, const OperandVector &Ops) {
|
||||
switch (Inst.getOpcode()) {
|
||||
default: return true;
|
||||
case X86::INT:
|
||||
if (Inst.getNumOperands() == 0)
|
||||
return true;
|
||||
assert(Inst.getOperand(0).isImm() && "expected immediate");
|
||||
if (Inst.getOperand(0).getImm() > 255) {
|
||||
Error(Ops[1]->getStartLoc(), "interrupt vector must be in range [0-255]");
|
||||
|
Loading…
x
Reference in New Issue
Block a user