Removed optimizations which break the compiler ones.

This commit is contained in:
IrgendwerA8 2018-05-22 19:10:07 +02:00
parent 808d3ab471
commit 6175271651
4 changed files with 11 additions and 8 deletions

View file

@ -15,11 +15,11 @@
rol ptr1+1 rol ptr1+1
clc clc
adc ptr1 adc ptr1
tay pha
txa txa
adc ptr1+1 adc ptr1+1
tax tax
tya pla
rts rts
.endproc .endproc

View file

@ -3,6 +3,7 @@
; ;
; CC65 runtime: Multiply the primary register by 5 ; CC65 runtime: Multiply the primary register by 5
; ;
; Don't touch the Y-register here, the optimizer relies on it!
.export mulax5 .export mulax5
.importzp ptr1 .importzp ptr1
@ -17,11 +18,11 @@
rol ptr1+1 rol ptr1+1
clc clc
adc ptr1 adc ptr1
tay pha
txa txa
adc ptr1+1 adc ptr1+1
tax tax
tya pla
rts rts
.endproc .endproc

View file

@ -4,6 +4,7 @@
; ;
; CC65 runtime: Multiply the primary register by 7 ; CC65 runtime: Multiply the primary register by 7
; ;
; Don't touch the Y-register here, the optimizer relies on it!
.export mulax7 .export mulax7
.importzp ptr1 .importzp ptr1
@ -20,12 +21,12 @@
rol ptr1+1 ; * 8 rol ptr1+1 ; * 8
sec sec
sbc ptr1 sbc ptr1
tay pha
txa txa
eor #$ff eor #$ff
adc ptr1+1 ; * (8 - 1) adc ptr1+1 ; * (8 - 1)
tax tax
tya pla
rts rts
.endproc .endproc

View file

@ -4,6 +4,7 @@
; ;
; CC65 runtime: Multiply the primary register by 9 ; CC65 runtime: Multiply the primary register by 9
; ;
; Don't touch the Y-register here, the optimizer relies on it!
.export mulax9 .export mulax9
.importzp ptr1 .importzp ptr1
@ -20,11 +21,11 @@
rol ptr1+1 ; * 8 rol ptr1+1 ; * 8
clc clc
adc ptr1 ; * (8+1) adc ptr1 ; * (8+1)
tay pha
txa txa
adc ptr1+1 adc ptr1+1
tax tax
tya pla
rts rts
.endproc .endproc