All pastes #40370 Raw Edit

Miscellany

public text v1 · immutable
#40370 ·published 2006-02-06 19:13 UTC
rendered paste body
#if defined(__APPLE__)
        if (((call->stack_usage-4) % 16) != 0) {
                // we need to align the stack to a 16-byte boundary (not including the push of $eip) before callings
                MONO_INST_NEW (cfg, arg, OP_X86_OUTARG_ALIGN_STACK);
                arg->inst_c0 = 16-((call->stack_usage-4) % 16);
                arg->next = call->out_args;
                call->out_args = arg;
//printf ("(%i) %i alignment needed\n", call->stack_usage, arg->inst_c0);
                call->stack_usage += arg->inst_c0;
        }
#endif