Stub out exception handling instructions we don't expect to appear

This commit is contained in:
baldurk
2020-06-08 15:45:49 +01:00
parent 657a5a0c39
commit bfea4427aa
@@ -133,14 +133,6 @@ enum class FunctionRecord : uint32_t
INST_STOREATOMIC = 45,
INST_CMPXCHG = 46,
INST_LANDINGPAD = 47,
INST_CLEANUPRET = 48,
INST_CATCHRET = 49,
INST_CATCHPAD = 50,
INST_CLEANUPPAD = 51,
INST_CATCHSWITCH = 52,
OPERAND_BUNDLE = 55,
INST_UNOP = 56,
INST_CALLBR = 57,
};
enum class ParamAttrRecord : uint32_t
@@ -1323,6 +1315,14 @@ Program::Program(const byte *bytes, size_t length)
f.instructions.push_back(inst);
}
else if(IS_KNOWN(op.id, FunctionRecord::INST_LANDINGPAD) ||
IS_KNOWN(op.id, FunctionRecord::INST_LANDINGPAD_OLD) ||
IS_KNOWN(op.id, FunctionRecord::INST_VAARG) ||
IS_KNOWN(op.id, FunctionRecord::INST_INVOKE) ||
IS_KNOWN(op.id, FunctionRecord::INST_RESUME))
{
RDCERR("Unexpected instruction %u in DXIL", op.id);
}
else
{
RDCERR("Unexpected record in FUNCTION_BLOCK");