[LLVMdev] [patch] remove redundant code in X86DisassemblerDecoder.c
Jun Koi
junkoi2004 at gmail.com
Wed Sep 11 22:44:01 PDT 2013
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);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130912/e6156dfb/attachment.html>
More information about the llvm-dev
mailing list