Skip to content
This repository has been archived by the owner on Oct 15, 2023. It is now read-only.

call vs jmp format inconsistency #18

Open
robertmuth opened this issue Nov 23, 2021 · 1 comment
Open

call vs jmp format inconsistency #18

robertmuth opened this issue Nov 23, 2021 · 1 comment
Labels

Comments

@robertmuth
Copy link

For (indirect) jmps the format is "D":

 ["jmp"              , "R:r32/m32"                                       , "D"       , "FF /4"                        , "X86 BND          Control=Jump"],
 ["jmp"              , "R:r64/m64"                                       , "D"       , "FF /4"                        , "X64 BND          Control=Jump"],

But calls the format is "M":

["call"             , "R:r16/m16"                                       , "M"       , "66 FF /2"                     , "X86 BND          Control=Call OF=U SF=U ZF=U AF=U PF=U CF=U"],
 ["call"             , "R:r32/m32"                                       , "M"       , "FF /2"                        , "X86 BND          Control=Call OF=U SF=U ZF=U AF=U PF=U CF=U"],
 ["call"             , "R:r64/m64"                                       , "M"       , "FF /2"                        , "X64 BND          Control=Call OF=U SF=U ZF=U AF=U PF=U CF=

I think it should also be "M" for indirect jmps

@kobalicek
Copy link
Member

Thanks, this is a bug actually - D is a displacement encoded in the instruction, these should be all M.

@kobalicek kobalicek added the bug label Nov 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants