From: IrgendwerA8 Date: Tue, 22 May 2018 17:10:07 +0000 (+0200) Subject: Removed optimizations which break the compiler ones. X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=refs%2Fpull%2F657%2Fhead;p=cc65 Removed optimizations which break the compiler ones. --- diff --git a/libsrc/runtime/mulax3.s b/libsrc/runtime/mulax3.s index 82cc033c3..472bc60ec 100644 --- a/libsrc/runtime/mulax3.s +++ b/libsrc/runtime/mulax3.s @@ -15,11 +15,11 @@ rol ptr1+1 clc adc ptr1 - tay + pha txa adc ptr1+1 tax - tya + pla rts .endproc diff --git a/libsrc/runtime/mulax5.s b/libsrc/runtime/mulax5.s index bf5eaefe8..99f0ffce0 100644 --- a/libsrc/runtime/mulax5.s +++ b/libsrc/runtime/mulax5.s @@ -3,6 +3,7 @@ ; ; CC65 runtime: Multiply the primary register by 5 ; +; Don't touch the Y-register here, the optimizer relies on it! .export mulax5 .importzp ptr1 @@ -17,11 +18,11 @@ rol ptr1+1 clc adc ptr1 - tay + pha txa adc ptr1+1 tax - tya + pla rts .endproc diff --git a/libsrc/runtime/mulax7.s b/libsrc/runtime/mulax7.s index 3414ebc9e..6f2b2bf61 100644 --- a/libsrc/runtime/mulax7.s +++ b/libsrc/runtime/mulax7.s @@ -4,6 +4,7 @@ ; ; CC65 runtime: Multiply the primary register by 7 ; +; Don't touch the Y-register here, the optimizer relies on it! .export mulax7 .importzp ptr1 @@ -20,12 +21,12 @@ rol ptr1+1 ; * 8 sec sbc ptr1 - tay + pha txa eor #$ff adc ptr1+1 ; * (8 - 1) tax - tya + pla rts .endproc diff --git a/libsrc/runtime/mulax9.s b/libsrc/runtime/mulax9.s index d175d55aa..064eb458b 100644 --- a/libsrc/runtime/mulax9.s +++ b/libsrc/runtime/mulax9.s @@ -4,6 +4,7 @@ ; ; CC65 runtime: Multiply the primary register by 9 ; +; Don't touch the Y-register here, the optimizer relies on it! .export mulax9 .importzp ptr1 @@ -20,11 +21,11 @@ rol ptr1+1 ; * 8 clc adc ptr1 ; * (8+1) - tay + pha txa adc ptr1+1 tax - tya + pla rts .endproc