From 6175271651d769610d5aa3fbd46b6ad61ee56056 Mon Sep 17 00:00:00 2001 From: IrgendwerA8 Date: Tue, 22 May 2018 19:10:07 +0200 Subject: [PATCH] Removed optimizations which break the compiler ones. --- libsrc/runtime/mulax3.s | 4 ++-- libsrc/runtime/mulax5.s | 5 +++-- libsrc/runtime/mulax7.s | 5 +++-- libsrc/runtime/mulax9.s | 5 +++-- 4 files changed, 11 insertions(+), 8 deletions(-) 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