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

Function GenCodeCmdMovCmplxStk

NULLC/CodeGen_X86.cpp:1614–1642  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1612}
1613
1614void GenCodeCmdMovCmplxStk(VMCmd cmd)
1615{
1616 EMIT_COMMENT("MOV complex stack");
1617 EMIT_OP_REG(o_pop, rEDX);
1618
1619 if(cmd.helper == 0)
1620 return;
1621 if(cmd.helper <= 32)
1622 {
1623 unsigned int currShift = 0;
1624 while(currShift < cmd.helper)
1625 {
1626 EMIT_OP_RPTR(o_pop, sDWORD, rEDX, cmd.argument + currShift);
1627 currShift += 4;
1628 }
1629 EMIT_OP_REG_NUM(o_sub, rESP, cmd.helper);
1630 assert(currShift == cmd.helper);
1631 }else{
1632 EMIT_OP_REG_REG(o_mov, rEBX, rEDI);
1633
1634 EMIT_OP_REG_REG(o_mov, rESI, rESP);
1635 EMIT_OP_REG_RPTR(o_lea, rEDI, sNONE, rEDX, cmd.argument);
1636 EMIT_OP_REG_NUM(o_mov, rECX, cmd.helper >> 2);
1637 EMIT_OP(o_rep_movsd);
1638
1639 EMIT_OP_REG_REG(o_mov, rEDI, rEBX);
1640 }
1641 KILL_REG(rEBX);KILL_REG(rECX);KILL_REG(rEDX);
1642}
1643
1644void GenCodeCmdPop(VMCmd cmd)
1645{

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected