asar icon indicating copy to clipboard operation
asar copied to clipboard

label optimizer is too aggressive with +/- labels

Open trillllian opened this issue 1 year ago • 0 comments
trafficstars

(alternative title: label optimizer barely knows +/- labels exist)

org $8000
lda (+)-1
+

miscompiles to A5 01. +/- labels are only considered in getlen if the entire argument is a label reference, not if you do any math on it.

i really don't know how to fix this without rewriting most of the math parser. i don't even know how it should work: the label optimizer is very fragile and heuristic-based and i don't know what the "right" heuristics would be.

trillllian avatar Feb 03 '24 09:02 trillllian