- M_ASUB_IMM(2 * 8, REG_SP);
-
- /* offset to where first integer arg is saved on stack */
- off = (2 * 8) + (6 * 8) + (1 * 4);
- /* offset to where first float arg is saved on stack */
- foff = off + (INT_ARG_CNT * 8);
- /* offset to where first argument is passed on stack */
- aoff = (2 * 8) + stackframesize + (cd->stackframesize * 4);
- /* offset to destination on stack */
- doff = 0;
-
- iargctr = fargctr = 0;
-
- ICONST(REG_ITMP1, 0);
-
- for (i = 0; i < md->paramcount && i < 8; i++) {
- t = md->paramtypes[i].type;
-
- M_IST(REG_ITMP1, REG_SP, doff);
- M_IST(REG_ITMP1, REG_SP, doff + 4);
-
- if (IS_FLT_DBL_TYPE(t)) {
- if (fargctr < 2) { /* passed in register */
- N_STD(REG_FA0 + fargctr, doff, RN, REG_SP);
- fargctr += 1;
- } else { /* passed on stack */
- if (IS_2_WORD_TYPE(t)) {
- N_MVC(doff, 8, REG_SP, aoff, REG_SP);
- aoff += 8;
- } else {
- N_MVC(doff + 4, 4, REG_SP, aoff, REG_SP);
- aoff += 4;
- }
- }
- } else {
- if (IS_2_WORD_TYPE(t)) {
- if (iargctr < 4) { /* passed in 2 registers */
- N_STM(REG_A0 + iargctr, REG_A0 + iargctr + 1, doff, REG_SP);
- iargctr += 2;
- } else { /* passed on stack */
- N_MVC(doff, 8, REG_SP, aoff, REG_SP);
- aoff += 8;
- }
- } else {
- if (iargctr < 5) { /* passed in register */
- N_ST(REG_A0 + iargctr, doff + 4, RN, REG_SP);
- iargctr += 1;
- } else { /* passed on stack */
- N_MVC(doff + 4, 4, REG_SP, aoff, REG_SP);
- aoff += 4;
- }
- }