MCPcopy Create free account
hub / github.com/LUX-Core/lux / generateProgram

Method generateProgram

src/crypto/RandomX/assembly_generator_x86.cpp:54–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 static const char* regScratchpadAddr = "rsi";
53
54 void AssemblyGeneratorX86::generateProgram(Program& prog) {
55 for (unsigned i = 0; i < RegistersCount; ++i) {
56 registerUsage[i] = -1;
57 }
58 asmCode.str(std::string()); //clear
59 for (unsigned i = 0; i < prog.getSize(); ++i) {
60 asmCode << "randomx_isn_" << i << ":" << std::endl;
61 Instruction& instr = prog(i);
62 instr.src %= RegistersCount;
63 instr.dst %= RegistersCount;
64 generateCode(instr, i);
65 }
66 }
67
68 void AssemblyGeneratorX86::generateAsm(SuperscalarProgram& prog) {
69 asmCode.str(std::string()); //clear

Callers

nothing calls this directly

Calls 2

strMethod · 0.80
getSizeMethod · 0.45

Tested by

no test coverage detected