MCPcopy Create free account
hub / github.com/WheretIB/nullc / GenCodeCmdPushVTop

Function GenCodeCmdPushVTop

NULLC/CodeGen_X86.cpp:2303–2325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2301
2302
2303void GenCodeCmdPushVTop(VMCmd cmd)
2304{
2305 (void)cmd;
2306 EMIT_COMMENT("PUSHT");
2307
2308 EMIT_OP_REG(o_push, rEBP);
2309 EMIT_OP_REG_REG(o_mov, rEBP, rEDI);
2310
2311 assert(cmd.argument % 16 == 0);
2312 if(cmd.argument)
2313 EMIT_OP_REG_NUM(o_add, rEDI, cmd.argument);
2314 // Clear stack frame
2315 if(cmd.argument - cmd.helper)
2316 {
2317 EMIT_OP_NUM(o_push, cmd.argument - cmd.helper);
2318 EMIT_OP_NUM(o_push, 0);
2319 EMIT_OP_REG_RPTR(o_lea, rEAX, sNONE, rNONE, 1, rEBP, cmd.helper + paramBase);
2320 EMIT_OP_REG(o_push, rEAX);
2321 EMIT_OP_REG_NUM(o_mov, rECX, (int)(intptr_t)memset);
2322 EMIT_OP_REG(o_call, rECX);
2323 EMIT_OP_REG_NUM(o_add, rESP, 12);
2324 }
2325}
2326
2327void GenCodeCmdAdd(VMCmd cmd)
2328{

Callers

nothing calls this directly

Calls 7

EMIT_COMMENTFunction · 0.85
EMIT_OP_REGFunction · 0.85
EMIT_OP_REG_REGFunction · 0.85
assertFunction · 0.85
EMIT_OP_REG_NUMFunction · 0.85
EMIT_OP_NUMFunction · 0.85
EMIT_OP_REG_RPTRFunction · 0.85

Tested by

no test coverage detected