* Send a `lea offset(%rip),%r64' instruction. */
| 1537 | * Send a `lea offset(%rip),%r64' instruction. |
| 1538 | */ |
| 1539 | void sendLeaFromPCRelToR64(FILE *out, const char *offset, int regno) |
| 1540 | { |
| 1541 | const uint8_t REX[] = |
| 1542 | {0x48, 0x48, 0x48, 0x48, 0x4c, 0x4c, 0x00, |
| 1543 | 0x48, 0x4c, 0x4c, 0x48, 0x48, 0x4c, 0x4c, 0x4c, 0x4c, 0x48}; |
| 1544 | const uint8_t MODRM[] = |
| 1545 | {0x3d, 0x35, 0x15, 0x0d, 0x05, 0x0d, 0x00, |
| 1546 | 0x05, 0x15, 0x1d, 0x1d, 0x2d, 0x25, 0x2d, 0x35, 0x3d, 0x25}; |
| 1547 | fprintf(out, "%u,%u,%u,%s,", |
| 1548 | REX[regno], 0x8d, MODRM[regno], offset); |
| 1549 | } |
| 1550 | |
| 1551 | /* |
| 1552 | * Send a `lea offset(%rip),%r64' instruction. |
no test coverage detected