Re: [cc65] Hello, and a memory corruption (?) issue when optimizing

From: Maik Merten <maikmerten1googlemail.com>
Date: 2013-06-14 20:24:29
Hello all,

Am 14.06.2013 11:19, schrieb Greg King:
> It should be added to some "known bugs" resource (if we can think of a
> good description).

given that I think I identified the OptStore1 optimization to have a 
part in this bug, do you have an opinion if this may indeed be the 
cause? OptStore1 is described as

/* Search for the sequence
  *
  *      ldy     #n
  *      jsr     staxysp
  *      ldy     #n+1
  *      jsr     ldaxysp
  *
  * and remove the useless load, provided that the next insn doesn't use 
flags
  * from the load.
  */


I appended an archive with draw.s (generated with -O --disable-opt 
OptStore1) and draw-optstore1.s (generated simply with -O), and a 
graphical diff for a quick glance.

If OptStore1 is indeed to blame, perhaps it should be disabled by 
default until a proper fix is available? This would be a one-line "fix" ;-)


Maik

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.

vimdiff.png
Received on Fri Jun 14 20:24:44 2013

This archive was generated by hypermail 2.1.8 : 2013-06-15 17:37:38 CEST