functions.c
// Calculate the final size and padding of the stack
Calculate the final size and padding of the stack
Calculate the final size and padding of the stack
void finalize_function_param_allocation(FunctionParamAllocation *fpa) {
    fpa->padding = ((fpa->offset + fpa->biggest_alignment  - 1) & (~(fpa->biggest_alignment - 1))) - fpa->offset;
    fpa->size = fpa->offset + fpa->padding;
    if (debug_function_param_allocation) {
        printf("  --------------------------------------------------------------\n");
        printf("  total                        size   0x%04x with padding 0x%04x\n", fpa->size, fpa->padding);
    }
}
void finalize_function_param_allocation ( FunctionParamAllocation * fpa ) { fpa -> padding = ( ( fpa -> offset + fpa -> biggest_alignment - 1 ) & ( ~ ( fpa -> biggest_alignment - 1 ) ) ) - fpa -> offset ; fpa -> size = fpa -> offset + fpa -> padding ; if ( debug_function_param_allocation ) { printf ( " \n " ) ; printf ( " \n " , fpa -> size , fpa -> padding ) ; } }
Calculate the final size and padding of the stack
Calculate the final size and padding of the stack