add an assert to catch unknown opcodes earlier

This commit is contained in:
James Fulop 2019-11-26 16:20:49 -08:00 committed by Бранимир Караџић
parent 1d2ea72c70
commit e6ba3e49af

View File

@ -1065,6 +1065,8 @@ namespace bgfx
// +-------------------------------- extended
_instruction.opcode = DxbcOpcode::Enum( (token & UINT32_C(0x000007ff) ) );
BX_CHECK(_instruction.opcode < DxbcOpcode::Enum::Count, "unknown opcode");
_instruction.length = uint8_t( (token & UINT32_C(0x7f000000) ) >> 24);
bool extended = 0 != (token & UINT32_C(0x80000000) );