Skip to content

Commit

Permalink
Add implicitdisp to ZydisOperandDefinition
Browse files Browse the repository at this point in the history
  • Loading branch information
NaC-L committed Jun 20, 2024
1 parent 5a68f63 commit 2c366f5
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 136 deletions.
1 change: 1 addition & 0 deletions include/Zydis/Internal/SharedData.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ typedef struct ZydisOperandDefinition_
} reg;
struct
{
ZyanU8 implicitdisp ZYAN_BITFIELD(1);
ZyanU8 seg ZYAN_BITFIELD(3);
ZyanU8 base ZYAN_BITFIELD(ZYDIS_IMPLMEM_BASE_REQUIRED_BITS);
} mem;
Expand Down
4 changes: 4 additions & 0 deletions src/Decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -1586,6 +1586,10 @@ static void ZydisDecodeOperandImplicitMemory(const ZydisDecoder* decoder,
ZydisRegisterEncode(ZYDIS_REGCLASS_SEGMENT, definition->op.mem.seg - 1);
ZYAN_ASSERT(operand->mem.segment);
}
if (definition->op.mem.implicitdisp)
{
operand->mem.disp.value = -(definition->size[context->eosz_index]);
}
}
#endif

Expand Down
Loading

0 comments on commit 2c366f5

Please sign in to comment.