diff --git a/irdb-libs/ir_builders/fill_in_indtargs.cpp b/irdb-libs/ir_builders/fill_in_indtargs.cpp index a80f436d80f90f1bec56d260700af096cd7facd5..42aef929f9c499ccf789fb7da8dfe4128cb36be3 100644 --- a/irdb-libs/ir_builders/fill_in_indtargs.cpp +++ b/irdb-libs/ir_builders/fill_in_indtargs.cpp @@ -2801,7 +2801,33 @@ V2: break; } - if(!found_cmp && !found_and && intermediate_write_instr != nullptr + +#if 0 + + killing the following of a move instruction, which generally would be good because of this case: + + + 0x000000000001bf9b <+1131>: cmp eax,0x12 + 0x000000000001bf9e <+1134>: ja 0x1ccf8 <process_section_headers+4552> + 0x000000000001bfa4 <+1140>: cmp eax,0x1 + 0x000000000001bfa7 <+1143>: jbe 0x1c6e0 <process_section_headers+2992> + 0x000000000001bfad <+1149>: mov ecx,eax + 0x000000000001bfaf <+1151>: cmp eax,0x12 + 0x000000000001bfb2 <+1154>: ja 0x1c6e2 <process_section_headers+2994> + 0x000000000001bfb8 <+1160>: lea rdi,[rip+0x66305] # 0x822c4 + 0x000000000001bfbf <+1167>: movsxd rdx,DWORD PTR [rdi+rcx*4] + 0x000000000001bfc3 <+1171>: add rdx,rdi + 0x000000000001bfc6 <+1174>: notrack jmp rdx + + + Zipr followed the move back and found the cmp eax,0x1 and detected the switch table size as 0x1. very bad. + it is not clear whether 0x1c6e0 falls through to the switch, but it very well could. We really need to stop + looking for the switch table size at any cmp instruction unless we can determine better with the above. + +#endif + + + if(false && !found_cmp && !found_and && intermediate_write_instr != nullptr && intermediate_write_instr->getDisassembly().rfind("mov", 0) != string::npos) { auto decoded_instr = DecodedInstruction_t::factory(intermediate_write_instr); if(decoded_instr->getOperand(1)->isRegister()){