Skip to content
Snippets Groups Projects
Commit 8ff5f29f authored by whh8b's avatar whh8b
Browse files

DWCIS takes optional parameter to account for jump.

parent 3ef03f71
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,6 @@
namespace Utils {
extern size_t CALLBACK_TRAMPOLINE_SIZE;
int DetermineWorstCaseInsnSize(libIRDB::Instruction_t*);
int DetermineWorstCaseInsnSize(libIRDB::Instruction_t*, bool account_for_jump = true);
}
#endif
......@@ -4,7 +4,7 @@ namespace zipr {
namespace Utils {
size_t CALLBACK_TRAMPOLINE_SIZE=9;
using namespace libIRDB;
int DetermineWorstCaseInsnSize(Instruction_t* insn)
int DetermineWorstCaseInsnSize(Instruction_t* insn, bool account_for_jump)
{
int required_size=0;
......@@ -64,7 +64,10 @@ int DetermineWorstCaseInsnSize(Instruction_t* insn)
}
// add an extra 5 for a "trampoline" in case we have to end this fragment early
return required_size+5;
if (account_for_jump)
return required_size+5;
else
return required_size;
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment