Index: lib/Target/X86/X86ISelLowering.cpp =================================================================== --- lib/Target/X86/X86ISelLowering.cpp +++ lib/Target/X86/X86ISelLowering.cpp @@ -2991,11 +2991,15 @@ "Var args not supported with calling conv' regcall, fastcc, ghc or hipe"); if (CallConv == CallingConv::X86_INTR) { - bool isLegal = Ins.size() == 1 || - (Ins.size() == 2 && ((Is64Bit && Ins[1].VT == MVT::i64) || - (!Is64Bit && Ins[1].VT == MVT::i32))); - if (!isLegal) + bool IsArgnLegal = Ins.size() == 1 || Ins.size() == 2; + if(!IsArgnLegal) report_fatal_error("X86 interrupts may take one or two arguments"); + bool IsArg2Legal = (Ins.size() == 2 && + ((Is64Bit && Ins[1].VT == MVT::i64) || + (!Is64Bit && Ins[1].VT == MVT::i32))); + if (!IsArg2Legal) + report_fatal_error("X86 interrupts' second argument must be a " + "machine-sized word"); } // Assign locations to all of the incoming arguments.