save a few bytes by removing a dupe tail from two cases now

This commit is contained in:
Brooke Vibber 2023-01-04 20:33:42 -08:00
parent 38091e535f
commit 41915cf122

View file

@ -56,13 +56,6 @@ FRX = $ec
zero: ; 18 cyc, 23 cyc zero: ; 18 cyc, 23 cyc
lsr result + 3 ; 5 cyc lsr result + 3 ; 5 cyc
ror result + 2 ; 5 cyc
ror result + 1 ; 5 cyc
.if bitnum >= 8
; we can save 5 cycles * 8 bits = 40 cycles total by skipping this byte
; when it's all uninitialized data
ror result ; 5 cyc
.endif
jmp next ; 3 cyc jmp next ; 3 cyc
one: ; 32 cyc, 37 cyc one: ; 32 cyc, 37 cyc
@ -75,6 +68,7 @@ one: ; 32 cyc, 37 cyc
adc arg2 + 1 ; 3 cyc adc arg2 + 1 ; 3 cyc
ror a ; 2 cyc ror a ; 2 cyc
sta result + 3 ; 3 cyc sta result + 3 ; 3 cyc
next:
ror result + 2 ; 5 cyc ror result + 2 ; 5 cyc
ror result + 1 ; 5 cyc ror result + 1 ; 5 cyc
.if bitnum >= 8 .if bitnum >= 8
@ -83,7 +77,6 @@ one: ; 32 cyc, 37 cyc
ror result ; 5 cyc ror result ; 5 cyc
.endif .endif
next:
.endmacro .endmacro