[LLVMdev] registerSize on X86 confused?
Jun Koi
junkoi2004 at gmail.com
Mon Mar 31 08:48:17 PDT 2014
Hi,
In file X86DisassemblerDecoder.c, we have function readPrefixes() with
below code:
.....
} else if (insn->mode == MODE_32BIT) {
insn->registerSize = (hasOpSize ? 2 : 4);
insn->addressSize = (hasAdSize ? 2 : 4);
insn->displacementSize = (hasAdSize ? 2 : 4);
insn->immediateSize = (hasOpSize ? 2 : 4);
}
....
This is confused to me: so we have registerSize to be either 2 or 4 bytes.
But we might have instruction like:
adc al, 0x89
This case we should have registerSize = 1 for AL. So is this a bug, or I am
misunderstanding the meaning of this "registerSize" ??
Thank you.
Jun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140331/66ae8d36/attachment.html>
More information about the llvm-dev
mailing list