llvm.org GIT mirror llvm / 3eafccc
Use the operand vector instead so inline assembly can be validated too The buildbots got upset after r225941, this should hopefully fix things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225954 91177308-0d34-0410-b5e6-96231b3b80d8 David Majnemer 5 years ago
1 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
22762276 switch (Inst.getOpcode()) {
22772277 default: return true;
22782278 case X86::INT:
2279 if (Inst.getNumOperands() == 0)
2280 return true;
2281 assert(Inst.getOperand(0).isImm() && "expected immediate");
2282 if (Inst.getOperand(0).getImm() > 255) {
2283 Error(Ops[1]->getStartLoc(), "interrupt vector must be in range [0-255]");
2279 X86Operand &Op = static_cast(*Ops[1]);
2280 assert(Op.isImm() && "expected immediate");
2281 int64_t Res;
2282 if (!Op.getImm()->EvaluateAsAbsolute(Res) || Res > 255) {
2283 Error(Op.getStartLoc(), "interrupt vector must be in range [0-255]");
22842284 return false;
22852285 }
22862286 return true;