FictionTools/z88dk/src/sccz80/codegen.c
/* Add the primary and secondary registers (result in primary) */
Add the primary and secondary registers (result in primary)
Add the primary and secondary registers ( result in primary )
void zadd(LVALUE* lval)
{
    switch (lval->val_type) {
    case KIND_LONG:
    case KIND_CPTR:
        if ( c_speed_optimisation & OPT_ADD32 && !IS_8080() && !IS_GBZ80() ) {
            ol("pop\tbc");        
            ol("add\thl,bc");
            ol("ex\tde,hl");
            ol("pop\tbc");
            ol("adc\thl,bc");
            ol("ex\tde,hl");
        } else {
            callrts("l_long_add"); 
        }
        Zsp += 4;
        break;
    case KIND_DOUBLE:
        callrts("fadd");
        Zsp += c_fp_size;
        break;
    default:
        ol("add\thl,de");	
    }
}
void zadd ( LVALUE * lval ) { switch ( lval -> val_type ) { case KIND_LONG : case KIND_CPTR : if ( c_speed_optimisation & OPT_ADD32 && ! IS_8080 ( ) && ! IS_GBZ80 ( ) ) { ol ( " \t " ) ; ol ( " \t " ) ; ol ( " \t " ) ; ol ( " \t " ) ; ol ( " \t " ) ; ol ( " \t " ) ; } else { callrts ( " " ) ; } Zsp += 4 ; break ; case KIND_DOUBLE : callrts ( " " ) ; Zsp += c_fp_size ; break ; default : ol ( " \t " ) ; } }
Add the primary and secondary registers (result in primary)
Add the primary and secondary registers ( result in primary )
/* 7 bytes, 54T */ /* 3 bytes, 76 + 17 = 93T */ // 11T