generate slightly better code for ud2

This commit is contained in:
Fabian 2022-11-21 20:01:07 -06:00
parent cf61ac635a
commit 625fdcd4a2
3 changed files with 3 additions and 2 deletions

View file

@ -443,7 +443,7 @@ const encodings = [
// Technically has a next instruction, but Linux uses this for assertions
// and embeds the assertion message after this instruction, which is likely
// the most common use case of ud2
{ opcode: 0x0F0B, skip: 1, block_boundary: 1, no_next_instruction: 1, },
{ opcode: 0x0F0B, skip: 1, block_boundary: 1, custom: 1, no_next_instruction: 1, },
{ opcode: 0x0F0C, skip: 1, block_boundary: 1, },
{ opcode: 0x0F0D, skip: 1, block_boundary: 1, },
{ opcode: 0x0F0E, skip: 1, block_boundary: 1, },

View file

@ -449,7 +449,6 @@ pub unsafe fn instr_0F09() {
}
#[no_mangle]
pub unsafe fn instr_0F0A() { undefined_instruction(); }
#[no_mangle]
pub unsafe fn instr_0F0B() {
// UD2
trigger_ud();

View file

@ -5064,6 +5064,8 @@ pub fn instr_0F31_jit(ctx: &mut JitContext) {
ctx.builder.block_end();
}
pub fn instr_0F0B_jit(ctx: &mut JitContext) { codegen::gen_trigger_ud(ctx) }
pub fn instr_0F18_mem_jit(_ctx: &mut JitContext, _modrm_byte: ModrmByte, _reg: u32) {}
pub fn instr_0F18_reg_jit(_ctx: &mut JitContext, _r1: u32, _r2: u32) {}