[cc65] Optimization possible?

From: Thomas Giesel <skoe1directbox.com>
Date: 2009-10-19 19:40:54
Hi all,

Accidently I found the piece of code below. Is it possible to optimize
the ldx L000F out? I don't know if the compiler knows that the value
isn't used later.

(v is a static signed char, compiled with -O)

;
; while (--v >= 0)
;
L0012:  dec     L000F
        ldx     L000F
        bmi     L0013
;
; array[v] = 0;
;
        ldy     L000F
        lda     #$00
        sta     _array,y
;
; }

Regards,

Thomas

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Oct 19 19:41:04 2009

This archive was generated by hypermail 2.1.8 : 2009-10-19 19:41:07 CEST