FictionTools/z88dk/src/sccz80/codegen.c
/*
 * Increment value held in main register
 */
Increment value held in main register
Increment value held in main register
void inc(LVALUE* lval)
{
    switch (lval->val_type) {
    case KIND_DOUBLE:
        dpush();
        switch ( c_maths_mode ) {
        case MATHS_IEEE:
            vlongconst(0x3f800000); 
            break;
        case MATHS_MBFS:
            vlongconst(0x81000000); 
            break;
        default:
            vconst(1);
            zconvert_to_double(KIND_INT, 1);
        }
        callrts("fadd");
        Zsp += c_fp_size;
        break;
    case KIND_LONG:
    case KIND_CPTR:
        callrts("l_inclong");
        break;
    default:
        ol("inc\thl");
    }
}
void inc ( LVALUE * lval ) { switch ( lval -> val_type ) { case KIND_DOUBLE : dpush ( ) ; switch ( c_maths_mode ) { case MATHS_IEEE : vlongconst ( 0x3f800000 ) ; break ; case MATHS_MBFS : vlongconst ( 0x81000000 ) ; break ; default : vconst ( 1 ) ; zconvert_to_double ( KIND_INT , 1 ) ; } callrts ( " " ) ; Zsp += c_fp_size ; break ; case KIND_LONG : case KIND_CPTR : callrts ( " " ) ; break ; default : ol ( " \t " ) ; } }
Increment value held in main register
Increment value held in main register
// FA = value to be incremented // +1.0 // +1.0