MCPcopy Create free account
hub / github.com/GJDuck/e9patch / sendMovFromI64ToR64

Function sendMovFromI64ToR64

src/e9tool/e9codegen.cpp:1509–1520  ·  view source on GitHub ↗

* Send a `movabs $i64,%r64' instruction. */

Source from the content-addressed store, hash-verified

1507 * Send a `movabs $i64,%r64' instruction.
1508 */
1509void sendMovFromI64ToR64(FILE *out, intptr_t value, int regno)
1510{
1511 const uint8_t REX[] =
1512 {0x48, 0x48, 0x48, 0x48, 0x49, 0x49, 0x00,
1513 0x48, 0x49, 0x49, 0x48, 0x48, 0x49, 0x49, 0x49, 0x49, 0x48};
1514 const uint8_t OPCODE[] =
1515 {0xbf, 0xbe, 0xba, 0xb9, 0xb8, 0xb9, 0x00,
1516 0xb8, 0xba, 0xbb, 0xbb, 0xbd, 0xbc, 0xbd, 0xbe, 0xbf, 0xbc};
1517 fprintf(out, "%u,%u,{\"int64\":", REX[regno], OPCODE[regno]);
1518 sendInteger(out, value);
1519 fputs("},", out);
1520}
1521
1522/*
1523 * Send a `movabs $i64,%r64' instruction.

Callers 2

sendLoadValueMetadataFunction · 0.85
sendLoadArgumentMetadataFunction · 0.85

Calls 2

fputsFunction · 0.85
fprintfFunction · 0.50

Tested by

no test coverage detected