* Send a `mov $value,%r32' instruction. */
| 1445 | * Send a `mov $value,%r32' instruction. |
| 1446 | */ |
| 1447 | void sendSExtFromI32ToR64(FILE *out, const char *value, int regno) |
| 1448 | { |
| 1449 | const uint8_t REX[] = |
| 1450 | {0x48, 0x48, 0x48, 0x48, 0x49, 0x49, 0x00, |
| 1451 | 0x48, 0x49, 0x49, 0x48, 0x48, 0x49, 0x49, 0x49, 0x49, 0x48}; |
| 1452 | const uint8_t MODRM[] = |
| 1453 | {0xc7, 0xc6, 0xc2, 0xc1, 0xc0, 0xc1, 0x00, |
| 1454 | 0xc0, 0xc2, 0xc3, 0xc3, 0xc5, 0xc4, 0xc5, 0xc6, 0xc7, 0xc4}; |
| 1455 | fprintf(out, "%u,%u,%u,%s,", |
| 1456 | REX[regno], 0xc7, MODRM[regno], value); |
| 1457 | } |
| 1458 | |
| 1459 | /* |
| 1460 | * Send a `mov $value,%r32' instruction. |
no test coverage detected