* Return true if the given instruction can be instrumented. */
| 420 | * Return true if the given instruction can be instrumented. |
| 421 | */ |
| 422 | static bool canPatch(const Instr *I) |
| 423 | { |
| 424 | switch (I->STATE[0]) |
| 425 | { |
| 426 | case STATE_INSTRUCTION: case STATE_FREE: |
| 427 | return true; |
| 428 | default: |
| 429 | return false; |
| 430 | } |
| 431 | } |
| 432 | |
| 433 | /* |
| 434 | * Tactic B0: replace the instruction with an illegal instruction. |