[LLVMdev] bug in X86 disasm code?

Craig Topper craig.topper at gmail.com
Thu Sep 12 09:27:20 PDT 2013


The encoding where ESP as a base should be indicates that there's an
additonal byte (the SIB byte) following this byte. The ESP base will be
encoded in the SIB byte in this case.


On Thu, Sep 12, 2013 at 1:24 AM, Jun Koi <junkoi2004 at gmail.com> wrote:

> hi,
>
> i found this code in X86DisassemblerDecoder.h
>
> #define EA_BASES_32BIT  \
>   ENTRY(EAX)            \
>   ENTRY(ECX)            \
>   ENTRY(EDX)            \
>   ENTRY(EBX)            \
>   ENTRY(sib)            \
>   ENTRY(EBP)            \
>   ENTRY(ESI)            \
>   ENTRY(EDI)            \
>   ENTRY(R8D)            \
>   ENTRY(R9D)            \
>   ENTRY(R10D)           \
>   ENTRY(R11D)           \
>   ENTRY(R12D)           \
>   ENTRY(R13D)           \
>   ENTRY(R14D)           \
>   ENTRY(R15D)
>
>
> the ENTRY(sib) looks suspicious. that should be ENTRY(ESP), no?
>
> thanks.
> J
>



-- 
~Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130912/4858f6d7/attachment.html>


More information about the llvm-dev mailing list