| 231 | } |
| 232 | |
| 233 | void PrintDebug(x64JitWriter& jit, const char* message) { |
| 234 | // LogMessage has variadic parameters, this shouldn't be problem on x86_64 |
| 235 | // but paranoia calls for safety |
| 236 | /* |
| 237 | union { |
| 238 | void (*PrintFunc)(const char* message); |
| 239 | std::uint64_t address; |
| 240 | } func; |
| 241 | |
| 242 | func.PrintFunc = &PrintFunc; |
| 243 | |
| 244 | // Shadow space |
| 245 | MSVC_ONLY(jit.sub(rsp, 40)); |
| 246 | |
| 247 | MSVC_ONLY(jit.mov(rcx, reinterpret_cast<std::uint64_t>(message))); |
| 248 | GCC_ONLY(jit.mov(rdi, reinterpret_cast<std::uint64_t>(message))); |
| 249 | |
| 250 | jit.mov(rax, func.address); |
| 251 | jit.call(rax); |
| 252 | |
| 253 | // Free shadow space |
| 254 | MSVC_ONLY(jit.add(rsp, 40));*/ |
| 255 | } |
| 256 | |
| 257 | void _PrintRegs(std::uint64_t* rsp, int numregs) { |
| 258 | g_pSM->LogMessage(myself, "RSP - %p", rsp); |
no outgoing calls
no test coverage detected