diff --git a/decode.c b/decode.c index 91b09f4..099284c 100644 --- a/decode.c +++ b/decode.c @@ -517,7 +517,7 @@ fd_decode(const uint8_t* buffer, size_t len_sz, int mode_int, uintptr_t address, uint8_t imm_size; if (DESC_IMM_BYTE(desc)) imm_size = 1; - else if (UNLIKELY(instr->type == FDI_RET_IMM)) + else if (UNLIKELY(instr->type == FDI_RET_IMM || instr->type == FDI_RETF)) imm_size = 2; else if (UNLIKELY(instr->type == FDI_ENTER)) imm_size = 3; diff --git a/instrs.txt b/instrs.txt index b8dab26..37bea62 100644 --- a/instrs.txt +++ b/instrs.txt @@ -203,8 +203,9 @@ c7//f8 D IMM - - - XBEGIN # ENTER immediate handled in code c8 I IMM32 - - - ENTER DEF64 INSTR_WIDTH c9 NP - - - - LEAVE DEF64 INSTR_WIDTH -#ca RETf TODO, ONLY32 -#cb RETf TODO, ONLY32 +# RETF immediate size handled in code +ca I IMM16 - - - RETF DEF64 INSTR_WIDTH +cb NP - - - - RETF DEF64 INSTR_WIDTH cc NP - - - - INT3 cd I IMM8 - - - INT IMM_8 ce NP - - - - INTO ONLY32