* Tactic B2: replace the instruction with a punned jump. */
| 467 | * Tactic B2: replace the instruction with a punned jump. |
| 468 | */ |
| 469 | static Patch *tactic_B2(Binary &B, Instr *I, const Trampoline *T, |
| 470 | Tactic tactic = TACTIC_B2) |
| 471 | { |
| 472 | if (I->size >= JMP_SIZE || !option_tactic_B2 || !canPatch(I)) |
| 473 | return nullptr; |
| 474 | const Alloc *A = allocatePunnedJump(B, I, /*offset=*/0, I, T); |
| 475 | if (A == nullptr) |
| 476 | return nullptr; |
| 477 | Patch *P = new Patch(I, tactic, A); |
| 478 | patchJump(P, /*offset=*/0); |
| 479 | return P; |
| 480 | } |
| 481 | |
| 482 | /* |
| 483 | * Tactic T1: replace the instruction with a prefixed punned jump. |
no test coverage detected