| 1926 | |
| 1927 | |
| 1928 | void GenCodeCmdCallProlog(VMCmd cmd) |
| 1929 | { |
| 1930 | if(cmd.helper & bitRetSimple) |
| 1931 | { |
| 1932 | if((asmOperType)(cmd.helper & 0x0FFF) == OTYPE_INT) |
| 1933 | { |
| 1934 | EMIT_OP_REG(o_push, rEAX); |
| 1935 | }else{ // double or long |
| 1936 | EMIT_OP_REG(o_push, rEAX); |
| 1937 | EMIT_OP_REG(o_push, rEDX); |
| 1938 | } |
| 1939 | }else{ |
| 1940 | assert(cmd.helper % 4 == 0); |
| 1941 | if(cmd.helper == 4) |
| 1942 | { |
| 1943 | EMIT_OP_REG(o_push, rEAX); |
| 1944 | }else if(cmd.helper == 8){ |
| 1945 | EMIT_OP_REG(o_push, rEAX); |
| 1946 | EMIT_OP_REG(o_push, rEDX); |
| 1947 | }else if(cmd.helper == 12){ |
| 1948 | EMIT_OP_REG(o_push, rEAX); |
| 1949 | EMIT_OP_REG(o_push, rEDX); |
| 1950 | EMIT_OP_REG(o_push, rECX); |
| 1951 | }else if(cmd.helper == 16){ |
| 1952 | EMIT_OP_REG(o_push, rEAX); |
| 1953 | EMIT_OP_REG(o_push, rEDX); |
| 1954 | EMIT_OP_REG(o_push, rECX); |
| 1955 | EMIT_OP_REG(o_push, rEBX); |
| 1956 | }else if(cmd.helper > 16){ |
| 1957 | EMIT_OP_REG_NUM(o_sub, rESP, cmd.helper); |
| 1958 | |
| 1959 | EMIT_OP_REG_REG(o_mov, rEBX, rEDI); |
| 1960 | |
| 1961 | EMIT_OP_REG_RPTR(o_lea, rESI, sNONE, rEAX, paramBase); |
| 1962 | EMIT_OP_REG_REG(o_mov, rEDI, rESP); |
| 1963 | EMIT_OP_REG_NUM(o_mov, rECX, cmd.helper >> 2); |
| 1964 | EMIT_OP(o_rep_movsd); |
| 1965 | |
| 1966 | EMIT_OP_REG_REG(o_mov, rEDI, rEBX); |
| 1967 | } |
| 1968 | } |
| 1969 | } |
| 1970 | |
| 1971 | void GenCodeCmdCall(VMCmd cmd) |
| 1972 | { |
no test coverage detected