| 459 | } |
| 460 | |
| 461 | void state_check(const void *addr, const void *state_0, intptr_t rsp, |
| 462 | intptr_t rax, intptr_t r15) |
| 463 | { |
| 464 | const STATE *state = (const STATE *)state_0; |
| 465 | if (rsp != state->rsp) |
| 466 | { |
| 467 | fprintf(stderr, "%p: %%rsp mismatch (0x%lx vs 0x%lx)\n", addr, rsp, |
| 468 | state->rsp); |
| 469 | abort(); |
| 470 | } |
| 471 | if ((intptr_t)addr != state->rip) |
| 472 | { |
| 473 | fprintf(stderr, "%p: %%rip mismatch (0x%p vs 0x%lx)\n", addr, addr, |
| 474 | state->rip); |
| 475 | abort(); |
| 476 | } |
| 477 | if (rax != state->rax) |
| 478 | { |
| 479 | fprintf(stderr, "%p: %%rax mismatch (0x%lx vs 0x%lx)\n", addr, rax, |
| 480 | state->rax); |
| 481 | abort(); |
| 482 | } |
| 483 | if (r15 != state->r15) |
| 484 | { |
| 485 | fprintf(stderr, "%p: %%r15 mismatch (0x%lx vs 0x%lx)\n", addr, r15, |
| 486 | state->r15); |
| 487 | abort(); |
| 488 | } |
| 489 | } |
| 490 | |
| 491 | struct NODE |
| 492 | { |