Assert that jump instructions can't also be nonfaulting

This commit is contained in:
Amaan Cheval 2018-02-15 11:29:02 +05:30 committed by Fabian
parent c3fa48e3fc
commit 6edb13d053

View file

@ -138,6 +138,12 @@ function gen_instruction_body(encodings, size)
if((e.opcode >>> 16) === 0xF3) has_F3 = true;
}
console.assert(
!encodings.some(e => e.nonfaulting && e.jump),
"Unsupported: instruction cannot be both a jump and nonfaulting. Opcode: 0x" + hex(encoding.opcode)
);
if(has_66 || has_F2 || has_F3)
{
console.assert((encoding.opcode & 0xFF00) === 0x0F00);