From 2ad8c74d02e29104c2a3aad602b4eac7ffa23871 Mon Sep 17 00:00:00 2001 From: Jason Hiser <jdhiser@gmail.com> Date: Tue, 11 Sep 2018 02:00:46 +0000 Subject: [PATCH] adjusted cmp sanity checking for switches Former-commit-id: 641a3c629f59485e1decbffd082a5bcef5e5b6e9 --- libIRDB/test/fill_in_indtargs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libIRDB/test/fill_in_indtargs.cpp b/libIRDB/test/fill_in_indtargs.cpp index e4dc62347..13dfc7666 100644 --- a/libIRDB/test/fill_in_indtargs.cpp +++ b/libIRDB/test/fill_in_indtargs.cpp @@ -1167,7 +1167,7 @@ I6 0xdd25 <+53>: movsxd rsi,DWORD PTR [rcx+rsi*4] I7 0xdd29 <+57>: add rsi,rcx I8 0xdd2c <+60>: jmp rsi -Note: Here the operands of the add are reversed, so lookup code was not finding I5 where it was expected. +Note: Here the operands of the add are reversed, so lookup code was not finding I5 where it was expected.c #endif @@ -1376,7 +1376,7 @@ Note: Here the operands of the add are reversed, so lookup code was not finding //Disassemble(I1,d1); DecodedInstruction_t d1(I1); table_size = d1.getImmediate()/*Instruction.Immediat*/; - if (table_size <= 0) + if (table_size <= 2) { // set table_size to be very large, so we can still do pinning appropriately cout<<"pic64: found I1 ('"<<d1.getDisassembly()/*CompleteInstr*/<<"'), but could not find size of switch table"<<endl; -- GitLab