totalspectrum / spin2cpp

Tool to convert Parallax Propeller Spin code to PASM, C++ or C
Other
46 stars 17 forks source link

New optimization is buggy #420

Closed Wuerfel21 closed 1 year ago

Wuerfel21 commented 1 year ago

Optimization introduced in 72c5cb98bc3ddccdd409cb2bfd556b1375c7f22a is bugged:

totalspectrum commented 1 year ago

Aargh, thanks for catching that; I also missed a check for volatile instructions. There is already code that handles this for the add/sub cases, and I guess we could comment those out, but I did want the shl/shr cases handled because they come up sometimes in code that handles bytes and shorts.

totalspectrum commented 1 year ago

Removed the redundant add/sub optimizations.