Re: [cc65] Optimization suggestion?

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2008-07-24 14:10:41
On Thu, Jul 24, 2008 at 02:07:05PM +0200, Christian Krüger wrote:
> Couldn't be the sequence:
>
>     ldx     #$00
>     lda     _i
>     pha
>     clc
>     adc     #$01
>     sta     _i
>     pla
>     jmp     L0121
>
> - which is generated quite often due to upcounting loops -
> replaced by:
>
>     inc	_i
>     jmp     L0121
>
> ?
>
> (same for down-counting -1 loops...)

Can you give me a short(!) sample of the C code that generated this assembly
and the optimization settings used?

Thanks


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Jul 24 14:10:50 2008

This archive was generated by hypermail 2.1.8 : 2008-07-24 14:10:52 CEST