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