FictionTools/z88dk/src/sccz80/codegen.c
/* Divide the secondary register by the primary */
/*      (quotient in primary, remainder in secondary) */
Divide the secondary register by the primary
(quotient in primary, remainder in secondary)
Divide the secondary register by the primary ( quotient in primary remainder in secondary )
void zdiv(LVALUE* lval)
{
    switch (lval->val_type) {
    case KIND_LONG:
    case KIND_CPTR:
        if (ulvalue(lval))
            callrts("l_long_div_u");
        else
            callrts("l_long_div");
        Zsp += 4;
        break;
    case KIND_DOUBLE:
        callrts("fdiv");
        Zsp += c_fp_size;
        break;
    default:
        if (ulvalue(lval))
            callrts("l_div_u");
        else
            callrts("l_div");
    }
}
void zdiv ( LVALUE * lval ) { switch ( lval -> val_type ) { case KIND_LONG : case KIND_CPTR : if ( ulvalue ( lval ) ) callrts ( " " ) ; else callrts ( " " ) ; Zsp += 4 ; break ; case KIND_DOUBLE : callrts ( " " ) ; Zsp += c_fp_size ; break ; default : if ( ulvalue ( lval ) ) callrts ( " " ) ; else callrts ( " " ) ; } }
Divide the secondary register by the primary
(quotient in primary, remainder in secondary)
Divide the secondary register by the primary ( quotient in primary remainder in secondary )