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

Function GenCodeCmdPushCmplxStk

NULLC/CodeGen_X86.cpp:1413–1441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1411}
1412
1413void GenCodeCmdPushCmplxStk(VMCmd cmd)
1414{
1415 EMIT_COMMENT("PUSH complex stack");
1416 EMIT_OP_REG(o_pop, rEDX);
1417
1418 if(cmd.helper == 0)
1419 return;
1420 if(cmd.helper <= 32)
1421 {
1422 unsigned int currShift = cmd.helper;
1423 while(currShift >= 4)
1424 {
1425 currShift -= 4;
1426 EMIT_OP_RPTR(o_push, sDWORD, rEDX, cmd.argument+currShift);
1427 }
1428 assert(currShift == 0);
1429 }else{
1430 EMIT_OP_REG_NUM(o_sub, rESP, cmd.helper);
1431 EMIT_OP_REG_REG(o_mov, rEBX, rEDI);
1432
1433 EMIT_OP_REG_RPTR(o_lea, rESI, sNONE, rEDX, cmd.argument);
1434 EMIT_OP_REG_REG(o_mov, rEDI, rESP);
1435 EMIT_OP_REG_NUM(o_mov, rECX, cmd.helper >> 2);
1436 EMIT_OP(o_rep_movsd);
1437
1438 EMIT_OP_REG_REG(o_mov, rEDI, rEBX);
1439 }
1440 KILL_REG(rEBX);KILL_REG(rECX);KILL_REG(rEDX);
1441}
1442
1443
1444void GenCodeCmdPushImmt(VMCmd cmd)

Callers

nothing calls this directly

Calls 8

EMIT_COMMENTFunction · 0.85
EMIT_OP_REGFunction · 0.85
EMIT_OP_RPTRFunction · 0.85
assertFunction · 0.85
EMIT_OP_REG_NUMFunction · 0.85
EMIT_OP_REG_REGFunction · 0.85
EMIT_OP_REG_RPTRFunction · 0.85
EMIT_OPFunction · 0.85

Tested by

no test coverage detected