[patch] remove redundant code in X86DisassemblerDecoder.c

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.

thanks,
Jun

diff --git a/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c b/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c
index 20e61da…3932ea1 100644
— a/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c
+++ b/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c
@@ -550,11 +550,6 @@ static int readPrefixes(struct InternalInstruction* insn) {
insn->addressSize = (hasAdSize ? 4 : 8);
insn->displacementSize = 4;
insn->immediateSize = 4;

  • } else if (insn->rexPrefix) {
  • insn->registerSize = (hasOpSize ? 2 : 4);
  • insn->addressSize = (hasAdSize ? 4 : 8);
  • insn->displacementSize = (hasOpSize ? 2 : 4);
  • insn->immediateSize = (hasOpSize ? 2 : 4);
    } else {
    insn->registerSize = (hasOpSize ? 2 : 4);
    insn->addressSize = (hasAdSize ? 4 : 8);

LGTM.