void Assembler::patchBranch(CodeAddress jmp, CodeAddress dest) { auto di = DecodedInstruction(jmp); // Detect Far branch if (di.isFarBranch()) { patchAbsolute(jmp, dest); return; } // Regular patch for branch by offset type if (!di.setNearBranchTarget(dest)) assert(false && "Can't patch a branch with such a big offset"); }
ConditionCode smashableJccCond(TCA inst) { return DecodedInstruction(inst).jccCondCode(); }