<div dir="ltr"><div>there is an if-else code in X86DisassemblerDecoder.c that does exactly the same thing on both paths. so this patch removes the redundant path.</div><div><br></div><div>thanks,</div><div>Jun</div><div><br>
</div><div><br></div><div>diff --git a/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c b/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c</div><div>index 20e61da..3932ea1 100644</div><div>--- a/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c</div>
<div>+++ b/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c</div><div>@@ -550,11 +550,6 @@ static int readPrefixes(struct InternalInstruction* insn) {</div><div> insn->addressSize = (hasAdSize ? 4 : 8);</div>
<div> insn->displacementSize = 4;</div><div> insn->immediateSize = 4;</div><div>- } else if (insn->rexPrefix) {</div><div>- insn->registerSize = (hasOpSize ? 2 : 4);</div><div>
- insn->addressSize = (hasAdSize ? 4 : 8);</div><div>- insn->displacementSize = (hasOpSize ? 2 : 4);</div><div>- insn->immediateSize = (hasOpSize ? 2 : 4);</div><div> } else {</div>
<div> insn->registerSize = (hasOpSize ? 2 : 4);</div><div> insn->addressSize = (hasAdSize ? 4 : 8);</div><div><br></div></div>