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

Function GenCodeCmdCallEpilog

NULLC/CodeGen_X86.cpp:1901–1925  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1899}
1900
1901void GenCodeCmdCallEpilog(unsigned int size)
1902{
1903 if(size == 0)
1904 return;
1905 if(size <= 32)
1906 {
1907 unsigned int currShift = 0;
1908 while(currShift < size)
1909 {
1910 EMIT_OP_RPTR(o_pop, sDWORD, rEDI, paramBase + currShift);
1911 currShift += 4;
1912 }
1913 assert(currShift == size);
1914 }else{
1915 EMIT_OP_REG_REG(o_mov, rEBX, rEDI);
1916
1917 EMIT_OP_REG_REG(o_mov, rESI, rESP);
1918 EMIT_OP_REG_RPTR(o_lea, rEDI, sNONE, rEDI, paramBase);
1919 EMIT_OP_REG_NUM(o_mov, rECX, size >> 2);
1920 EMIT_OP(o_rep_movsd);
1921
1922 EMIT_OP_REG_REG(o_mov, rEDI, rEBX);
1923 EMIT_OP_REG_NUM(o_add, rESP, size);
1924 }
1925}
1926
1927
1928void GenCodeCmdCallProlog(VMCmd cmd)

Callers 2

GenCodeCmdCallFunction · 0.85
GenCodeCmdCallPtrFunction · 0.85

Calls 6

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

Tested by

no test coverage detected