1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-12-22 21:29:50 +00:00

Improved sign extension in fragments.

This commit is contained in:
jespergravgaard 2021-06-23 09:57:58 +02:00
parent 822d168dd8
commit 8d797ac308
10 changed files with 12795 additions and 156 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -792,3 +792,401 @@ iny
tax
//FRAGMENT vbuyy=vbuaa
tay
//FRAGMENT vbuz1=vbuz2_band_vbuc1
lda #{c1}
and {z2}
sta {z1}
//FRAGMENT _deref_pbuc1=_dec__deref_pbuc1
dec {c1}
//FRAGMENT pbuz1=pbuc1_plus_vbuz2
lda {z2}
clc
adc #<{c1}
sta {z1}
lda #>{c1}
adc #0
sta {z1}+1
//FRAGMENT pvoz1=pvoz2
lda {z2}
sta {z1}
lda {z2}+1
sta {z1}+1
//FRAGMENT vbuz1=vbuz1_plus_2
lda {z1}
clc
adc #2
sta {z1}
//FRAGMENT vbuz1=pbuz2_derefidx_vbuc1
ldy #{c1}
lda ({z2}),y
sta {z1}
//FRAGMENT pbuz1=pbuz2_plus_vbuc1
lda #{c1}
clc
adc {z2}
sta {z1}
lda #0
adc {z2}+1
sta {z1}+1
//FRAGMENT pbuz1_neq_pbuc1_then_la1
lda {z1}+1
cmp #>{c1}
bne {la1}
lda {z1}
cmp #<{c1}
bne {la1}
//FRAGMENT _deref_pbuz1=_deref_pbuz2
ldy #0
lda ({z2}),y
ldy #0
sta ({z1}),y
//FRAGMENT vbuz1=vbuaa_band_vbuc1
and #{c1}
sta {z1}
//FRAGMENT vbuz1=vbuxx_band_vbuc1
lda #{c1}
sax {z1}
//FRAGMENT vbuz1=vbuyy_band_vbuc1
tya
and #{c1}
sta {z1}
//FRAGMENT vbuaa=vbuz1_band_vbuc1
lda #{c1}
and {z1}
//FRAGMENT vbuaa=vbuaa_band_vbuc1
and #{c1}
//FRAGMENT vbuaa=vbuxx_band_vbuc1
txa
and #{c1}
//FRAGMENT vbuaa=vbuyy_band_vbuc1
tya
and #{c1}
//FRAGMENT vbuxx=vbuz1_band_vbuc1
lda #{c1}
and {z1}
tax
//FRAGMENT vbuxx=vbuaa_band_vbuc1
ldx #{c1}
axs #0
//FRAGMENT vbuyy=vbuz1_band_vbuc1
lda #{c1}
and {z1}
tay
//FRAGMENT pbuz1=pbuc1_plus_vbuaa
clc
adc #<{c1}
sta {z1}
lda #>{c1}
adc #0
sta {z1}+1
//FRAGMENT pbuz1=pbuc1_plus_vbuxx
txa
clc
adc #<{c1}
sta {z1}
lda #>{c1}
adc #0
sta {z1}+1
//FRAGMENT pbuz1=pbuc1_plus_vbuyy
tya
clc
adc #<{c1}
sta {z1}
lda #>{c1}
adc #0
sta {z1}+1
//FRAGMENT vbuxx=vbuxx_plus_2
inx
inx
//FRAGMENT vbuaa=pbuz1_derefidx_vbuc1
ldy #{c1}
lda ({z1}),y
//FRAGMENT vbuxx=pbuz1_derefidx_vbuc1
ldy #{c1}
lda ({z1}),y
tax
//FRAGMENT vbuyy=pbuz1_derefidx_vbuc1
ldy #{c1}
lda ({z1}),y
tay
//FRAGMENT pbuz1=pbuz1_plus_vbuc1
lda #{c1}
clc
adc {z1}
sta {z1}
bcc !+
inc {z1}+1
!:
//FRAGMENT vbuz1=_dec_vbuz1
dec {z1}
//FRAGMENT pbuz1=pbuz2
lda {z2}
sta {z1}
lda {z2}+1
sta {z1}+1
//FRAGMENT _deref_pbuz1=pbuc1_derefidx_vbuz2
ldy {z2}
lda {c1},y
ldy #0
sta ({z1}),y
//FRAGMENT pbuz1=_inc_pbuz2
clc
lda {z2}
adc #1
sta {z1}
lda {z2}+1
adc #0
sta {z1}+1
//FRAGMENT _deref_pbuz1=vbuc1
lda #{c1}
ldy #0
sta ({z1}),y
//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2
ldy {z2}
lda {c1},y
sta {z1}
//FRAGMENT vbuz1_ge_vbuz2_then_la1
lda {z1}
cmp {z2}
bcs {la1}
//FRAGMENT vbuz1=vbuz1_minus_vbuz2
lda {z1}
sec
sbc {z2}
sta {z1}
//FRAGMENT vwuz1=_word_vbuz2
lda {z2}
sta {z1}
lda #0
sta {z1}+1
//FRAGMENT vwuz1=vwuz2_rol_5
lda {z2}
asl
sta {z1}
lda {z2}+1
rol
sta {z1}+1
asl {z1}
rol {z1}+1
asl {z1}
rol {z1}+1
asl {z1}
rol {z1}+1
asl {z1}
rol {z1}+1
//FRAGMENT pbuz1=pbuc1_plus_vwuz2
clc
lda {z2}
adc #<{c1}
sta {z1}
lda {z2}+1
adc #>{c1}
sta {z1}+1
//FRAGMENT pbuz1=pbuz2_plus_vbuz3
lda {z3}
clc
adc {z2}
sta {z1}
lda #0
adc {z2}+1
sta {z1}+1
//FRAGMENT pbuz1=pbuz1_minus_vbuc1
sec
lda {z1}
sbc #{c1}
sta {z1}
lda {z1}+1
sbc #0
sta {z1}+1
//FRAGMENT vbuz1=_deref_pbuc1
lda {c1}
sta {z1}
//FRAGMENT _deref_pbuz1=vbuz2
lda {z2}
ldy #0
sta ({z1}),y
//FRAGMENT vbuxx=vbuxx_band_vbuc1
lda #{c1}
axs #0
//FRAGMENT vbuyy=vbuxx_band_vbuc1
txa
and #{c1}
tay
//FRAGMENT vbuxx=vbuyy_band_vbuc1
ldx #{c1}
tya
axs #0
//FRAGMENT vbuyy=vbuyy_band_vbuc1
tya
and #{c1}
tay
//FRAGMENT _deref_pbuz1=pbuc1_derefidx_vbuaa
tay
lda {c1},y
ldy #0
sta ({z1}),y
//FRAGMENT _deref_pbuz1=pbuc1_derefidx_vbuxx
lda {c1},x
ldy #0
sta ({z1}),y
//FRAGMENT _deref_pbuz1=pbuc1_derefidx_vbuyy
lda {c1},y
ldy #0
sta ({z1}),y
//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1
ldy {z1}
lda {c1},y
//FRAGMENT vbuxx=pbuc1_derefidx_vbuz1
ldy {z1}
ldx {c1},y
//FRAGMENT vbuyy=pbuc1_derefidx_vbuz1
ldx {z1}
ldy {c1},x
//FRAGMENT vbuz1=pbuc1_derefidx_vbuaa
tay
lda {c1},y
sta {z1}
//FRAGMENT vbuaa=pbuc1_derefidx_vbuaa
tay
lda {c1},y
//FRAGMENT vbuxx=pbuc1_derefidx_vbuaa
tay
ldx {c1},y
//FRAGMENT vbuyy=pbuc1_derefidx_vbuaa
tax
ldy {c1},x
//FRAGMENT vbuz1=pbuc1_derefidx_vbuxx
lda {c1},x
sta {z1}
//FRAGMENT 0_neq_vbuaa_then_la1
cmp #0
bne {la1}
//FRAGMENT vbuaa_ge_vbuz1_then_la1
cmp {z1}
bcs {la1}
//FRAGMENT vbuxx=vbuxx_minus_vbuz1
txa
sec
sbc {z1}
tax
//FRAGMENT vbuz1=vbuz1_minus_vbuaa
eor #$ff
sec
adc {z1}
sta {z1}
//FRAGMENT vbuxx=vbuxx_minus_vbuaa
sta $ff
txa
sec
sbc $ff
tax
//FRAGMENT vbuz1=vbuz1_minus_vbuxx
txa
eor #$ff
sec
adc {z1}
sta {z1}
//FRAGMENT vbuxx=vbuxx_minus_vbuxx
lda #0
tax
//FRAGMENT vbuz1=vbuz1_minus_vbuyy
tya
eor #$ff
sec
adc {z1}
sta {z1}
//FRAGMENT vbuxx=vbuxx_minus_vbuyy
txa
sty $ff
sec
sbc $ff
tax
//FRAGMENT vwuz1=_word_vbuaa
sta {z1}
lda #0
sta {z1}+1
//FRAGMENT vwuz1=_word_vbuxx
txa
sta {z1}
lda #0
sta {z1}+1
//FRAGMENT vwuz1=_word_vbuyy
tya
sta {z1}
lda #0
sta {z1}+1
//FRAGMENT vbuaa_eq_vbuc1_then_la1
cmp #{c1}
beq {la1}
//FRAGMENT vbuaa=_deref_pbuc1
lda {c1}
//FRAGMENT vbuxx=_deref_pbuc1
ldx {c1}
//FRAGMENT _deref_pbuz1=vbuaa
ldy #0
sta ({z1}),y
//FRAGMENT _deref_pbuz1=vbuxx
txa
ldy #0
sta ({z1}),y
//FRAGMENT _deref_pbuz1=vbuyy
tya
ldy #0
sta ({z1}),y
//FRAGMENT vbuxx_ge_vbuz1_then_la1
cpx {z1}
bcs {la1}
//FRAGMENT vbuxx_eq_vbuc1_then_la1
cpx #{c1}
beq {la1}
//FRAGMENT vbuyy=_deref_pbuc1
ldy {c1}
//FRAGMENT vbuz1_ge_vbuxx_then_la1
lda {z1}
stx $ff
cmp $ff
bcs {la1}
//FRAGMENT vbuz1_ge_vbuyy_then_la1
lda {z1}
sty $ff
cmp $ff
bcs {la1}
//FRAGMENT vbuxx_ge_vbuyy_then_la1
sty $ff
cpx $ff
bcs {la1}
//FRAGMENT vbuaa=vbuxx
txa
//FRAGMENT vbuyy=vbuxx
txa
tay
//FRAGMENT vbuyy_eq_vbuc1_then_la1
cpy #{c1}
beq {la1}
//FRAGMENT vbuaa=vbuyy
tya
//FRAGMENT vbuxx=vbuyy
tya
tax
//FRAGMENT vbuyy_ge_vbuz1_then_la1
cpy {z1}
bcs {la1}
//FRAGMENT vwuz1=vwuz1_rol_5
asl {z1}
rol {z1}+1
asl {z1}
rol {z1}+1
asl {z1}
rol {z1}+1
asl {z1}
rol {z1}+1
asl {z1}
rol {z1}+1
//FRAGMENT pbuz1=pbuc1_plus_vwuz1
clc
lda {z1}
adc #<{c1}
sta {z1}
lda {z1}+1
adc #>{c1}
sta {z1}+1

File diff suppressed because it is too large Load Diff

View File

@ -175,11 +175,11 @@ anim: {
// BYTE1(xr)
lda.z xr+1
// signed int xpos = ((signed char) BYTE1(xr)) + 24 /*border*/ + 149
tax
sta.z $ff
clc
adc #<$18+$95
sta.z xpos
txa
lda.z $ff
ora #$7f
bmi !+
lda #0

View File

@ -2180,10 +2180,7 @@ Statement [38] anim::xr#1 = anim::xr#0 - anim::$10 [ anim::angle#9 anim::i#10 an
Statement [41] anim::$11 = (signed word)mulf8s_prepared::m#4 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#0 anim::xr#1 anim::$11 ] ( anim:3 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#0 anim::xr#1 anim::$11 ] { } ) always clobbers reg byte a
Statement [42] anim::$12 = anim::$11 << 1 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#0 anim::xr#1 anim::$12 ] ( anim:3 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#0 anim::xr#1 anim::$12 ] { } ) always clobbers reg byte a
Statement [43] anim::yr#1 = anim::yr#0 + anim::$12 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::xr#1 anim::yr#1 ] ( anim:3 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::xr#1 anim::yr#1 ] { } ) always clobbers reg byte a
Statement [45] anim::xpos#0 = (signed byte)anim::$14 + $18+$95 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#1 anim::xpos#0 ] ( anim:3 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#1 anim::xpos#0 ] { } ) always clobbers reg byte a reg byte x
Removing always clobbered register reg byte x as potential for zp[1]:3 [ anim::angle#9 anim::angle#1 ]
Removing always clobbered register reg byte x as potential for zp[1]:4 [ anim::i#10 anim::i#1 ]
Removing always clobbered register reg byte x as potential for zp[1]:5 [ anim::sprite_msb#10 anim::sprite_msb#5 anim::sprite_msb#1 anim::sprite_msb#2 ]
Statement [45] anim::xpos#0 = (signed byte)anim::$14 + $18+$95 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#1 anim::xpos#0 ] ( anim:3 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#1 anim::xpos#0 ] { } ) always clobbers reg byte a
Statement [49] anim::sprite_msb#2 = anim::sprite_msb#1 | $80 [ anim::angle#9 anim::i#10 anim::yr#1 anim::xpos#0 anim::sprite_msb#2 ] ( anim:3 [ anim::angle#9 anim::i#10 anim::yr#1 anim::xpos#0 anim::sprite_msb#2 ] { } ) always clobbers reg byte a
Statement [53] anim::i2#0 = anim::i#10 << 1 [ anim::angle#9 anim::i#10 anim::sprite_msb#5 anim::xpos#0 anim::ypos#0 anim::i2#0 ] ( anim:3 [ anim::angle#9 anim::i#10 anim::sprite_msb#5 anim::xpos#0 anim::ypos#0 anim::i2#0 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:61 [ anim::ypos#0 ]
@ -2228,6 +2225,9 @@ Statement [123] clock::return#0 = $ffffffff - *CIA2_TIMER_AB [ clock::return#0 ]
Statement [125] print_uint_at::w#0 = word1 print_ulong_at::dw#0 [ print_ulong_at::dw#0 print_uint_at::w#0 ] ( anim:3::print_ulong_at:66 [ anim::angle#1 print_ulong_at::dw#0 print_uint_at::w#0 ] { { print_ulong_at::dw#0 = anim::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } } ) always clobbers reg byte a
Statement [127] print_uint_at::w#1 = word0 print_ulong_at::dw#0 [ print_uint_at::w#1 ] ( anim:3::print_ulong_at:66 [ anim::angle#1 print_uint_at::w#1 ] { { print_ulong_at::dw#0 = anim::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } } ) always clobbers reg byte a
Statement asm { ldxmemB sec sm1: ldamulf_sqr1_lo,x sm2: sbcmulf_sqr2_lo,x staresL sm3: ldamulf_sqr1_hi,x sm4: sbcmulf_sqr2_hi,x stamemB } always clobbers reg byte a reg byte x
Removing always clobbered register reg byte x as potential for zp[1]:3 [ anim::angle#9 anim::angle#1 ]
Removing always clobbered register reg byte x as potential for zp[1]:4 [ anim::i#10 anim::i#1 ]
Removing always clobbered register reg byte x as potential for zp[1]:5 [ anim::sprite_msb#10 anim::sprite_msb#5 anim::sprite_msb#1 anim::sprite_msb#2 ]
Removing always clobbered register reg byte x as potential for zp[1]:34 [ anim::x#0 ]
Removing always clobbered register reg byte x as potential for zp[1]:35 [ anim::y#0 ]
Removing always clobbered register reg byte x as potential for zp[1]:21 [ mulf8s_prepared::b#4 mulf8s_prepared::b#1 mulf8s_prepared::b#3 mulf8s_prepared::b#0 mulf8s_prepared::b#2 ]
@ -2264,7 +2264,7 @@ Statement [38] anim::xr#1 = anim::xr#0 - anim::$10 [ anim::angle#9 anim::i#10 an
Statement [41] anim::$11 = (signed word)mulf8s_prepared::m#4 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#0 anim::xr#1 anim::$11 ] ( anim:3 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#0 anim::xr#1 anim::$11 ] { } ) always clobbers reg byte a
Statement [42] anim::$12 = anim::$11 << 1 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#0 anim::xr#1 anim::$12 ] ( anim:3 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#0 anim::xr#1 anim::$12 ] { } ) always clobbers reg byte a
Statement [43] anim::yr#1 = anim::yr#0 + anim::$12 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::xr#1 anim::yr#1 ] ( anim:3 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::xr#1 anim::yr#1 ] { } ) always clobbers reg byte a
Statement [45] anim::xpos#0 = (signed byte)anim::$14 + $18+$95 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#1 anim::xpos#0 ] ( anim:3 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#1 anim::xpos#0 ] { } ) always clobbers reg byte a reg byte x
Statement [45] anim::xpos#0 = (signed byte)anim::$14 + $18+$95 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#1 anim::xpos#0 ] ( anim:3 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#1 anim::xpos#0 ] { } ) always clobbers reg byte a
Statement [49] anim::sprite_msb#2 = anim::sprite_msb#1 | $80 [ anim::angle#9 anim::i#10 anim::yr#1 anim::xpos#0 anim::sprite_msb#2 ] ( anim:3 [ anim::angle#9 anim::i#10 anim::yr#1 anim::xpos#0 anim::sprite_msb#2 ] { } ) always clobbers reg byte a
Statement [53] anim::i2#0 = anim::i#10 << 1 [ anim::angle#9 anim::i#10 anim::sprite_msb#5 anim::xpos#0 anim::ypos#0 anim::i2#0 ] ( anim:3 [ anim::angle#9 anim::i#10 anim::sprite_msb#5 anim::xpos#0 anim::ypos#0 anim::i2#0 ] { } ) always clobbers reg byte a
Statement [56] SPRITES_YPOS[anim::i2#0] = anim::ypos#0 [ anim::angle#9 anim::i#10 anim::sprite_msb#5 ] ( anim:3 [ anim::angle#9 anim::i#10 anim::sprite_msb#5 ] { } ) always clobbers reg byte a
@ -2327,7 +2327,7 @@ Statement [38] anim::xr#1 = anim::xr#0 - anim::$10 [ anim::angle#9 anim::i#10 an
Statement [41] anim::$11 = (signed word)mulf8s_prepared::m#4 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#0 anim::xr#1 anim::$11 ] ( anim:3 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#0 anim::xr#1 anim::$11 ] { } ) always clobbers reg byte a
Statement [42] anim::$12 = anim::$11 << 1 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#0 anim::xr#1 anim::$12 ] ( anim:3 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#0 anim::xr#1 anim::$12 ] { } ) always clobbers reg byte a
Statement [43] anim::yr#1 = anim::yr#0 + anim::$12 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::xr#1 anim::yr#1 ] ( anim:3 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::xr#1 anim::yr#1 ] { } ) always clobbers reg byte a
Statement [45] anim::xpos#0 = (signed byte)anim::$14 + $18+$95 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#1 anim::xpos#0 ] ( anim:3 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#1 anim::xpos#0 ] { } ) always clobbers reg byte a reg byte x
Statement [45] anim::xpos#0 = (signed byte)anim::$14 + $18+$95 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#1 anim::xpos#0 ] ( anim:3 [ anim::angle#9 anim::i#10 anim::sprite_msb#10 anim::yr#1 anim::xpos#0 ] { } ) always clobbers reg byte a
Statement [49] anim::sprite_msb#2 = anim::sprite_msb#1 | $80 [ anim::angle#9 anim::i#10 anim::yr#1 anim::xpos#0 anim::sprite_msb#2 ] ( anim:3 [ anim::angle#9 anim::i#10 anim::yr#1 anim::xpos#0 anim::sprite_msb#2 ] { } ) always clobbers reg byte a
Statement [53] anim::i2#0 = anim::i#10 << 1 [ anim::angle#9 anim::i#10 anim::sprite_msb#5 anim::xpos#0 anim::ypos#0 anim::i2#0 ] ( anim:3 [ anim::angle#9 anim::i#10 anim::sprite_msb#5 anim::xpos#0 anim::ypos#0 anim::i2#0 ] { } ) always clobbers reg byte a
Statement [56] SPRITES_YPOS[anim::i2#0] = anim::ypos#0 [ anim::angle#9 anim::i#10 anim::sprite_msb#5 ] ( anim:3 [ anim::angle#9 anim::i#10 anim::sprite_msb#5 ] { } ) always clobbers reg byte a
@ -2451,53 +2451,53 @@ Uplift Scope [RADIX]
Uplift Scope [main]
Uplift Scope []
Uplifting [print_char_at] best 43977 combination reg byte x [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] zp[2]:32 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ]
Uplifting [print_uchar_at] best 43969 combination reg byte a [ print_uchar_at::$0 ] reg byte y [ print_uchar_at::$2 ] zp[2]:29 [ print_uchar_at::at#2 print_uchar_at::at#0 print_uchar_at::at#1 ] zp[1]:28 [ print_uchar_at::b#2 print_uchar_at::b#0 print_uchar_at::b#1 ]
Uplifting [mulf8u_prepared] best 43963 combination reg byte a [ mulf8u_prepared::b#0 ] zp[2]:94 [ mulf8u_prepared::return#0 ] zp[2]:84 [ mulf8u_prepared::return#2 ]
Uplifting [mulf8s_prepared] best 43939 combination zp[2]:22 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 ] reg byte a [ mulf8s_prepared::$6 ] reg byte a [ mulf8s_prepared::$11 ] reg byte a [ mulf8s_prepared::$9 ] reg byte a [ mulf8s_prepared::$12 ] zp[1]:21 [ mulf8s_prepared::b#4 mulf8s_prepared::b#1 mulf8s_prepared::b#3 mulf8s_prepared::b#0 mulf8s_prepared::b#2 ]
Uplifting [print_char_at] best 44177 combination reg byte x [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] zp[2]:32 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ]
Uplifting [print_uchar_at] best 44169 combination reg byte a [ print_uchar_at::$0 ] reg byte y [ print_uchar_at::$2 ] zp[2]:29 [ print_uchar_at::at#2 print_uchar_at::at#0 print_uchar_at::at#1 ] zp[1]:28 [ print_uchar_at::b#2 print_uchar_at::b#0 print_uchar_at::b#1 ]
Uplifting [mulf8u_prepared] best 44163 combination reg byte a [ mulf8u_prepared::b#0 ] zp[2]:94 [ mulf8u_prepared::return#0 ] zp[2]:84 [ mulf8u_prepared::return#2 ]
Uplifting [mulf8s_prepared] best 44139 combination zp[2]:22 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 ] reg byte a [ mulf8s_prepared::$6 ] reg byte a [ mulf8s_prepared::$11 ] reg byte a [ mulf8s_prepared::$9 ] reg byte a [ mulf8s_prepared::$12 ] zp[1]:21 [ mulf8s_prepared::b#4 mulf8s_prepared::b#1 mulf8s_prepared::b#3 mulf8s_prepared::b#0 mulf8s_prepared::b#2 ]
Limited combination testing to 100 combinations of 512 possible.
Uplifting [anim] best 42539 combination zp[1]:5 [ anim::sprite_msb#10 anim::sprite_msb#5 anim::sprite_msb#1 anim::sprite_msb#2 ] zp[2]:36 [ anim::$4 ] zp[2]:40 [ anim::$6 ] zp[2]:44 [ anim::$9 ] zp[2]:46 [ anim::$10 ] zp[2]:50 [ anim::$11 ] zp[2]:52 [ anim::$12 ] reg byte a [ anim::$17 ] reg byte a [ anim::$21 ] reg byte a [ anim::$24 ] zp[1]:4 [ anim::i#10 anim::i#1 ] zp[1]:56 [ anim::$14 ] zp[1]:62 [ anim::i2#0 ] zp[1]:61 [ anim::ypos#0 ] zp[2]:48 [ anim::xr#1 ] zp[2]:57 [ anim::xpos#0 ] zp[2]:54 [ anim::yr#1 ] zp[1]:35 [ anim::y#0 ] zp[4]:68 [ anim::$26 ] zp[4]:72 [ anim::cyclecount#0 ] zp[2]:38 [ anim::xr#0 ] zp[2]:42 [ anim::yr#0 ] zp[1]:34 [ anim::x#0 ] zp[1]:3 [ anim::angle#9 anim::angle#1 ]
Uplifting [anim] best 42739 combination zp[1]:5 [ anim::sprite_msb#10 anim::sprite_msb#5 anim::sprite_msb#1 anim::sprite_msb#2 ] zp[2]:36 [ anim::$4 ] zp[2]:40 [ anim::$6 ] zp[2]:44 [ anim::$9 ] zp[2]:46 [ anim::$10 ] zp[2]:50 [ anim::$11 ] zp[2]:52 [ anim::$12 ] reg byte a [ anim::$17 ] reg byte a [ anim::$21 ] reg byte a [ anim::$24 ] zp[1]:4 [ anim::i#10 anim::i#1 ] zp[1]:56 [ anim::$14 ] zp[1]:62 [ anim::i2#0 ] zp[1]:61 [ anim::ypos#0 ] zp[2]:48 [ anim::xr#1 ] zp[2]:57 [ anim::xpos#0 ] zp[2]:54 [ anim::yr#1 ] zp[1]:35 [ anim::y#0 ] zp[4]:68 [ anim::$26 ] zp[4]:72 [ anim::cyclecount#0 ] zp[2]:38 [ anim::xr#0 ] zp[2]:42 [ anim::yr#0 ] zp[1]:34 [ anim::x#0 ] zp[1]:3 [ anim::angle#9 anim::angle#1 ]
Limited combination testing to 100 combinations of 3840 possible.
Uplifting [mulf_init] best 42309 combination zp[2]:18 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] zp[2]:12 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] zp[2]:6 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] reg byte x [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] reg byte a [ mulf_init::$1 ] reg byte a [ mulf_init::$4 ] reg byte a [ mulf_init::$5 ] zp[1]:14 [ mulf_init::x_255#2 mulf_init::x_255#1 ] zp[1]:17 [ mulf_init::dir#2 mulf_init::dir#4 ] zp[1]:8 [ mulf_init::c#2 mulf_init::c#1 ] zp[2]:15 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] zp[2]:9 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ]
Uplifting [mulf_init] best 42509 combination zp[2]:18 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] zp[2]:12 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] zp[2]:6 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] reg byte x [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] reg byte a [ mulf_init::$1 ] reg byte a [ mulf_init::$4 ] reg byte a [ mulf_init::$5 ] zp[1]:14 [ mulf_init::x_255#2 mulf_init::x_255#1 ] zp[1]:17 [ mulf_init::dir#2 mulf_init::dir#4 ] zp[1]:8 [ mulf_init::c#2 mulf_init::c#1 ] zp[2]:15 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] zp[2]:9 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ]
Limited combination testing to 100 combinations of 1024 possible.
Uplifting [mulf8u_prepare] best 41706 combination reg byte a [ mulf8u_prepare::a#2 mulf8u_prepare::a#3 mulf8u_prepare::a#4 ]
Uplifting [print_uint_at] best 41706 combination zp[2]:24 [ print_uint_at::w#2 print_uint_at::w#0 print_uint_at::w#1 ] zp[2]:26 [ print_uint_at::at#2 ]
Uplifting [print_ulong_at] best 41706 combination zp[4]:76 [ print_ulong_at::dw#0 ]
Uplifting [clock] best 41706 combination zp[4]:90 [ clock::return#0 ] zp[4]:64 [ clock::return#2 ]
Uplifting [init] best 41556 combination reg byte x [ init::i#2 init::i#1 ]
Uplifting [MOS6526_CIA] best 41556 combination
Uplifting [MOS6569_VICII] best 41556 combination
Uplifting [MOS6581_SID] best 41556 combination
Uplifting [clock_start] best 41556 combination
Uplifting [RADIX] best 41556 combination
Uplifting [main] best 41556 combination
Uplifting [] best 41556 combination
Uplifting [mulf8u_prepare] best 41906 combination reg byte a [ mulf8u_prepare::a#2 mulf8u_prepare::a#3 mulf8u_prepare::a#4 ]
Uplifting [print_uint_at] best 41906 combination zp[2]:24 [ print_uint_at::w#2 print_uint_at::w#0 print_uint_at::w#1 ] zp[2]:26 [ print_uint_at::at#2 ]
Uplifting [print_ulong_at] best 41906 combination zp[4]:76 [ print_ulong_at::dw#0 ]
Uplifting [clock] best 41906 combination zp[4]:90 [ clock::return#0 ] zp[4]:64 [ clock::return#2 ]
Uplifting [init] best 41756 combination reg byte x [ init::i#2 init::i#1 ]
Uplifting [MOS6526_CIA] best 41756 combination
Uplifting [MOS6569_VICII] best 41756 combination
Uplifting [MOS6581_SID] best 41756 combination
Uplifting [clock_start] best 41756 combination
Uplifting [RADIX] best 41756 combination
Uplifting [main] best 41756 combination
Uplifting [] best 41756 combination
Attempting to uplift remaining variables inzp[1]:28 [ print_uchar_at::b#2 print_uchar_at::b#0 print_uchar_at::b#1 ]
Uplifting [print_uchar_at] best 41556 combination zp[1]:28 [ print_uchar_at::b#2 print_uchar_at::b#0 print_uchar_at::b#1 ]
Uplifting [print_uchar_at] best 41756 combination zp[1]:28 [ print_uchar_at::b#2 print_uchar_at::b#0 print_uchar_at::b#1 ]
Attempting to uplift remaining variables inzp[1]:21 [ mulf8s_prepared::b#4 mulf8s_prepared::b#1 mulf8s_prepared::b#3 mulf8s_prepared::b#0 mulf8s_prepared::b#2 ]
Uplifting [mulf8s_prepared] best 40355 combination reg byte y [ mulf8s_prepared::b#4 mulf8s_prepared::b#1 mulf8s_prepared::b#3 mulf8s_prepared::b#0 mulf8s_prepared::b#2 ]
Uplifting [mulf8s_prepared] best 40555 combination reg byte y [ mulf8s_prepared::b#4 mulf8s_prepared::b#1 mulf8s_prepared::b#3 mulf8s_prepared::b#0 mulf8s_prepared::b#2 ]
Attempting to uplift remaining variables inzp[1]:5 [ anim::sprite_msb#10 anim::sprite_msb#5 anim::sprite_msb#1 anim::sprite_msb#2 ]
Uplifting [anim] best 40355 combination zp[1]:5 [ anim::sprite_msb#10 anim::sprite_msb#5 anim::sprite_msb#1 anim::sprite_msb#2 ]
Uplifting [anim] best 40555 combination zp[1]:5 [ anim::sprite_msb#10 anim::sprite_msb#5 anim::sprite_msb#1 anim::sprite_msb#2 ]
Attempting to uplift remaining variables inzp[1]:4 [ anim::i#10 anim::i#1 ]
Uplifting [anim] best 40355 combination zp[1]:4 [ anim::i#10 anim::i#1 ]
Uplifting [anim] best 40555 combination zp[1]:4 [ anim::i#10 anim::i#1 ]
Attempting to uplift remaining variables inzp[1]:14 [ mulf_init::x_255#2 mulf_init::x_255#1 ]
Uplifting [mulf_init] best 40235 combination reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ]
Uplifting [mulf_init] best 40435 combination reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ]
Attempting to uplift remaining variables inzp[1]:17 [ mulf_init::dir#2 mulf_init::dir#4 ]
Uplifting [mulf_init] best 40235 combination zp[1]:17 [ mulf_init::dir#2 mulf_init::dir#4 ]
Uplifting [mulf_init] best 40435 combination zp[1]:17 [ mulf_init::dir#2 mulf_init::dir#4 ]
Attempting to uplift remaining variables inzp[1]:8 [ mulf_init::c#2 mulf_init::c#1 ]
Uplifting [mulf_init] best 40235 combination zp[1]:8 [ mulf_init::c#2 mulf_init::c#1 ]
Uplifting [mulf_init] best 40435 combination zp[1]:8 [ mulf_init::c#2 mulf_init::c#1 ]
Attempting to uplift remaining variables inzp[1]:56 [ anim::$14 ]
Uplifting [anim] best 39635 combination reg byte a [ anim::$14 ]
Uplifting [anim] best 39835 combination reg byte a [ anim::$14 ]
Attempting to uplift remaining variables inzp[1]:62 [ anim::i2#0 ]
Uplifting [anim] best 38935 combination reg byte x [ anim::i2#0 ]
Uplifting [anim] best 39135 combination reg byte x [ anim::i2#0 ]
Attempting to uplift remaining variables inzp[1]:61 [ anim::ypos#0 ]
Uplifting [anim] best 38735 combination reg byte y [ anim::ypos#0 ]
Uplifting [anim] best 38935 combination reg byte y [ anim::ypos#0 ]
Attempting to uplift remaining variables inzp[1]:35 [ anim::y#0 ]
Uplifting [anim] best 38735 combination zp[1]:35 [ anim::y#0 ]
Uplifting [anim] best 38935 combination zp[1]:35 [ anim::y#0 ]
Attempting to uplift remaining variables inzp[1]:34 [ anim::x#0 ]
Uplifting [anim] best 38735 combination zp[1]:34 [ anim::x#0 ]
Uplifting [anim] best 38935 combination zp[1]:34 [ anim::x#0 ]
Attempting to uplift remaining variables inzp[1]:3 [ anim::angle#9 anim::angle#1 ]
Uplifting [anim] best 38735 combination zp[1]:3 [ anim::angle#9 anim::angle#1 ]
Uplifting [anim] best 38935 combination zp[1]:3 [ anim::angle#9 anim::angle#1 ]
Coalescing zero page register [ zp[2]:26 [ print_uint_at::at#2 ] ] with [ zp[2]:29 [ print_uchar_at::at#2 print_uchar_at::at#0 print_uchar_at::at#1 ] ] - score: 2
Coalescing zero page register [ zp[2]:22 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 ] ] with [ zp[2]:36 [ anim::$4 ] ] - score: 1
Coalescing zero page register [ zp[2]:22 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 anim::$4 ] ] with [ zp[2]:40 [ anim::$6 ] ] - score: 1
@ -2821,11 +2821,11 @@ anim: {
// [44] anim::$14 = byte1 anim::xr#1 -- vbuaa=_byte1_vwsz1
lda.z xr+1
// [45] anim::xpos#0 = (signed byte)anim::$14 + $18+$95 -- vwsz1=vbsaa_plus_vwsc1
tax
sta.z $ff
clc
adc #<$18+$95
sta.z xpos
txa
lda.z $ff
ora #$7f
bmi !+
lda #0
@ -3875,7 +3875,7 @@ reg byte y [ print_uchar_at::$2 ]
FINAL ASSEMBLER
Score: 28434
Score: 28634
// File Comments
// 2D rotattion of 8 sprites
@ -4145,11 +4145,11 @@ anim: {
lda.z xr+1
// signed int xpos = ((signed char) BYTE1(xr)) + 24 /*border*/ + 149
// [45] anim::xpos#0 = (signed byte)anim::$14 + $18+$95 -- vwsz1=vbsaa_plus_vwsc1
tax
sta.z $ff
clc
adc #<$18+$95
sta.z xpos
txa
lda.z $ff
ora #$7f
bmi !+
lda #0

View File

@ -909,24 +909,23 @@ muls16s: {
rts
__b4:
// m = m + b
clc
lda.z b
adc.z m
sta.z m
lda.z b+1
adc.z m+1
sta.z m+1
lda.z b+1
ora #$7f
bmi !+
lda #0
!:
sta.z $ff
lda.z m
clc
adc.z b
sta.z m
lda.z m+1
adc.z b+1
sta.z m+1
lda.z m+2
adc.z $ff
adc.z m+2
sta.z m+2
lda.z m+3
adc.z $ff
lda.z $ff
adc.z m+3
sta.z m+3
// for(signed word j = 0; j!=a; j++)
inc.z j

View File

@ -5314,41 +5314,41 @@ Uplift Scope [print_cls]
Uplift Scope [RADIX]
Uplift Scope [main]
Uplifting [mul16u] best 554243 combination zp[4]:44 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp[4]:48 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp[2]:42 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] zp[2]:40 [ mul16u::b#2 mul16u::b#0 mul16u::b#1 ] zp[4]:194 [ mul16u::return#2 ] zp[4]:105 [ mul16u::return#3 ]
Uplifting [muls16s] best 554243 combination zp[4]:60 [ muls16s::return#0 muls16s::m#3 muls16s::m#1 muls16s::m#5 muls16s::m#2 ] zp[2]:58 [ muls16s::j#2 muls16s::j#1 ] zp[2]:64 [ muls16s::i#2 muls16s::i#1 ] zp[2]:139 [ muls16s::b#0 ] zp[2]:137 [ muls16s::a#0 ] zp[4]:141 [ muls16s::return#2 ]
Uplifting [muls16u] best 554243 combination zp[2]:34 [ muls16u::i#2 muls16u::i#1 ] zp[4]:36 [ muls16u::return#0 muls16u::m#3 muls16u::m#1 ] zp[2]:95 [ muls16u::b#0 ] zp[2]:93 [ muls16u::a#0 ] zp[4]:97 [ muls16u::return#2 ]
Uplifting [print_char] best 553922 combination reg byte a [ print_char::ch#7 print_char::ch#0 print_char::ch#5 print_char::ch#6 ]
Uplifting [] best 553922 combination zp[2]:77 [ print_char_cursor#140 print_char_cursor#89 print_char_cursor#136 print_char_cursor#157 print_char_cursor#152 print_char_cursor#223 print_char_cursor#148 print_char_cursor#1 print_char_cursor#183 print_char_cursor#21 print_char_cursor#190 print_char_cursor#145 print_char_cursor#141 ] zp[2]:56 [ print_line_cursor#23 print_line_cursor#45 print_line_cursor#0 ]
Uplifting [print_uchar] best 553904 combination reg byte a [ print_uchar::$0 ] reg byte x [ print_uchar::$2 ] reg byte x [ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ]
Uplifting [print_str] best 553904 combination zp[2]:32 [ print_str::str#15 print_str::str#18 print_str::str#0 ]
Uplifting [mulf16u] best 553904 combination zp[2]:52 [ mulf16u::a#2 mulf16u::a#1 mulf16u::a#0 ] zp[2]:54 [ mulf16u::b#2 mulf16u::b#1 mulf16u::b#0 ] zp[4]:190 [ mulf16u::return#0 ] zp[4]:210 [ mulf16u::return#2 ] zp[4]:113 [ mulf16u::return#3 ]
Uplifting [mul16s] best 553904 combination zp[4]:66 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] zp[2]:198 [ mul16s::$6 ] zp[2]:200 [ mul16s::$11 ] zp[2]:202 [ mul16s::$9 ] zp[2]:204 [ mul16s::$12 ] zp[4]:206 [ mul16s::return#0 ] zp[4]:153 [ mul16s::return#2 ] zp[2]:151 [ mul16s::b#0 ] zp[2]:149 [ mul16s::a#0 ]
Uplifting [mulf16s] best 553904 combination zp[4]:70 [ mulf16s::m#4 mulf16s::m#5 mulf16s::m#1 mulf16s::m#0 mulf16s::m#2 ] zp[2]:214 [ mulf16s::$6 ] zp[2]:216 [ mulf16s::$11 ] zp[2]:218 [ mulf16s::$9 ] zp[2]:220 [ mulf16s::$12 ] zp[4]:222 [ mulf16s::return#0 ] zp[4]:165 [ mulf16s::return#2 ] zp[2]:163 [ mulf16s::b#0 ] zp[2]:161 [ mulf16s::a#0 ]
Uplifting [print_uint] best 553904 combination zp[2]:75 [ print_uint::w#5 print_uint::w#3 print_uint::w#4 print_uint::w#0 print_uint::w#1 print_uint::w#2 ]
Uplifting [print_ulong] best 553904 combination zp[4]:79 [ print_ulong::dw#4 print_ulong::dw#1 print_ulong::dw#2 print_ulong::dw#3 print_ulong::dw#0 ]
Uplifting [mul16u_compare] best 552004 combination zp[2]:17 [ mul16u_compare::a#2 mul16u_compare::a#6 mul16u_compare::a#1 ] reg byte x [ mul16u_compare::ok#3 mul16u_compare::ok#4 ] reg byte y [ mul16u_compare::j#10 mul16u_compare::j#1 ] zp[2]:19 [ mul16u_compare::b#2 mul16u_compare::b#6 mul16u_compare::b#1 ] zp[1]:16 [ mul16u_compare::i#12 mul16u_compare::i#1 ] zp[4]:117 [ mul16u_compare::mf#0 ] zp[4]:101 [ mul16u_compare::ms#0 ] zp[4]:109 [ mul16u_compare::mn#0 ]
Uplifting [mul16s_compare] best 550104 combination zp[2]:24 [ mul16s_compare::a#2 mul16s_compare::a#6 mul16s_compare::a#1 ] reg byte x [ mul16s_compare::ok#3 mul16s_compare::ok#4 ] reg byte y [ mul16s_compare::j#10 mul16s_compare::j#1 ] zp[2]:26 [ mul16s_compare::b#2 mul16s_compare::b#6 mul16s_compare::b#1 ] zp[1]:23 [ mul16s_compare::i#12 mul16s_compare::i#1 ] zp[4]:169 [ mul16s_compare::mf#0 ] zp[4]:145 [ mul16s_compare::ms#0 ] zp[4]:157 [ mul16s_compare::mn#0 ]
Uplifting [print_slong] best 550104 combination zp[4]:85 [ print_slong::dw#6 print_slong::dw#0 print_slong::dw#4 print_slong::dw#1 print_slong::dw#2 print_slong::dw#3 ]
Uplifting [print_sint] best 550104 combination zp[2]:83 [ print_sint::w#5 print_sint::w#0 print_sint::w#3 print_sint::w#1 print_sint::w#2 ]
Uplifting [memset] best 550104 combination zp[2]:30 [ memset::dst#2 memset::dst#1 ]
Uplifting [mulf_init] best 549874 combination zp[2]:14 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] zp[2]:8 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] zp[2]:2 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] reg byte x [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] reg byte a [ mulf_init::$1 ] reg byte a [ mulf_init::$4 ] reg byte a [ mulf_init::$5 ] zp[1]:10 [ mulf_init::x_255#2 mulf_init::x_255#1 ] zp[1]:13 [ mulf_init::dir#2 mulf_init::dir#4 ] zp[1]:4 [ mulf_init::c#2 mulf_init::c#1 ] zp[2]:11 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] zp[2]:5 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ]
Uplifting [mul16u] best 551243 combination zp[4]:44 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp[4]:48 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp[2]:42 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] zp[2]:40 [ mul16u::b#2 mul16u::b#0 mul16u::b#1 ] zp[4]:194 [ mul16u::return#2 ] zp[4]:105 [ mul16u::return#3 ]
Uplifting [muls16s] best 551243 combination zp[4]:60 [ muls16s::return#0 muls16s::m#3 muls16s::m#1 muls16s::m#5 muls16s::m#2 ] zp[2]:58 [ muls16s::j#2 muls16s::j#1 ] zp[2]:64 [ muls16s::i#2 muls16s::i#1 ] zp[2]:139 [ muls16s::b#0 ] zp[2]:137 [ muls16s::a#0 ] zp[4]:141 [ muls16s::return#2 ]
Uplifting [muls16u] best 551243 combination zp[2]:34 [ muls16u::i#2 muls16u::i#1 ] zp[4]:36 [ muls16u::return#0 muls16u::m#3 muls16u::m#1 ] zp[2]:95 [ muls16u::b#0 ] zp[2]:93 [ muls16u::a#0 ] zp[4]:97 [ muls16u::return#2 ]
Uplifting [print_char] best 550922 combination reg byte a [ print_char::ch#7 print_char::ch#0 print_char::ch#5 print_char::ch#6 ]
Uplifting [] best 550922 combination zp[2]:77 [ print_char_cursor#140 print_char_cursor#89 print_char_cursor#136 print_char_cursor#157 print_char_cursor#152 print_char_cursor#223 print_char_cursor#148 print_char_cursor#1 print_char_cursor#183 print_char_cursor#21 print_char_cursor#190 print_char_cursor#145 print_char_cursor#141 ] zp[2]:56 [ print_line_cursor#23 print_line_cursor#45 print_line_cursor#0 ]
Uplifting [print_uchar] best 550904 combination reg byte a [ print_uchar::$0 ] reg byte x [ print_uchar::$2 ] reg byte x [ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ]
Uplifting [print_str] best 550904 combination zp[2]:32 [ print_str::str#15 print_str::str#18 print_str::str#0 ]
Uplifting [mulf16u] best 550904 combination zp[2]:52 [ mulf16u::a#2 mulf16u::a#1 mulf16u::a#0 ] zp[2]:54 [ mulf16u::b#2 mulf16u::b#1 mulf16u::b#0 ] zp[4]:190 [ mulf16u::return#0 ] zp[4]:210 [ mulf16u::return#2 ] zp[4]:113 [ mulf16u::return#3 ]
Uplifting [mul16s] best 550904 combination zp[4]:66 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] zp[2]:198 [ mul16s::$6 ] zp[2]:200 [ mul16s::$11 ] zp[2]:202 [ mul16s::$9 ] zp[2]:204 [ mul16s::$12 ] zp[4]:206 [ mul16s::return#0 ] zp[4]:153 [ mul16s::return#2 ] zp[2]:151 [ mul16s::b#0 ] zp[2]:149 [ mul16s::a#0 ]
Uplifting [mulf16s] best 550904 combination zp[4]:70 [ mulf16s::m#4 mulf16s::m#5 mulf16s::m#1 mulf16s::m#0 mulf16s::m#2 ] zp[2]:214 [ mulf16s::$6 ] zp[2]:216 [ mulf16s::$11 ] zp[2]:218 [ mulf16s::$9 ] zp[2]:220 [ mulf16s::$12 ] zp[4]:222 [ mulf16s::return#0 ] zp[4]:165 [ mulf16s::return#2 ] zp[2]:163 [ mulf16s::b#0 ] zp[2]:161 [ mulf16s::a#0 ]
Uplifting [print_uint] best 550904 combination zp[2]:75 [ print_uint::w#5 print_uint::w#3 print_uint::w#4 print_uint::w#0 print_uint::w#1 print_uint::w#2 ]
Uplifting [print_ulong] best 550904 combination zp[4]:79 [ print_ulong::dw#4 print_ulong::dw#1 print_ulong::dw#2 print_ulong::dw#3 print_ulong::dw#0 ]
Uplifting [mul16u_compare] best 549004 combination zp[2]:17 [ mul16u_compare::a#2 mul16u_compare::a#6 mul16u_compare::a#1 ] reg byte x [ mul16u_compare::ok#3 mul16u_compare::ok#4 ] reg byte y [ mul16u_compare::j#10 mul16u_compare::j#1 ] zp[2]:19 [ mul16u_compare::b#2 mul16u_compare::b#6 mul16u_compare::b#1 ] zp[1]:16 [ mul16u_compare::i#12 mul16u_compare::i#1 ] zp[4]:117 [ mul16u_compare::mf#0 ] zp[4]:101 [ mul16u_compare::ms#0 ] zp[4]:109 [ mul16u_compare::mn#0 ]
Uplifting [mul16s_compare] best 547104 combination zp[2]:24 [ mul16s_compare::a#2 mul16s_compare::a#6 mul16s_compare::a#1 ] reg byte x [ mul16s_compare::ok#3 mul16s_compare::ok#4 ] reg byte y [ mul16s_compare::j#10 mul16s_compare::j#1 ] zp[2]:26 [ mul16s_compare::b#2 mul16s_compare::b#6 mul16s_compare::b#1 ] zp[1]:23 [ mul16s_compare::i#12 mul16s_compare::i#1 ] zp[4]:169 [ mul16s_compare::mf#0 ] zp[4]:145 [ mul16s_compare::ms#0 ] zp[4]:157 [ mul16s_compare::mn#0 ]
Uplifting [print_slong] best 547104 combination zp[4]:85 [ print_slong::dw#6 print_slong::dw#0 print_slong::dw#4 print_slong::dw#1 print_slong::dw#2 print_slong::dw#3 ]
Uplifting [print_sint] best 547104 combination zp[2]:83 [ print_sint::w#5 print_sint::w#0 print_sint::w#3 print_sint::w#1 print_sint::w#2 ]
Uplifting [memset] best 547104 combination zp[2]:30 [ memset::dst#2 memset::dst#1 ]
Uplifting [mulf_init] best 546874 combination zp[2]:14 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] zp[2]:8 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] zp[2]:2 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] reg byte x [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] reg byte a [ mulf_init::$1 ] reg byte a [ mulf_init::$4 ] reg byte a [ mulf_init::$5 ] zp[1]:10 [ mulf_init::x_255#2 mulf_init::x_255#1 ] zp[1]:13 [ mulf_init::dir#2 mulf_init::dir#4 ] zp[1]:4 [ mulf_init::c#2 mulf_init::c#1 ] zp[2]:11 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] zp[2]:5 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ]
Limited combination testing to 100 combinations of 1024 possible.
Uplifting [mul16u_error] best 549874 combination zp[2]:121 [ mul16u_error::a#0 ] zp[2]:123 [ mul16u_error::b#0 ] zp[4]:125 [ mul16u_error::ms#0 ] zp[4]:129 [ mul16u_error::mn#0 ] zp[4]:133 [ mul16u_error::mf#0 ]
Uplifting [mul16s_error] best 549874 combination zp[2]:173 [ mul16s_error::a#0 ] zp[2]:175 [ mul16s_error::b#0 ] zp[4]:177 [ mul16s_error::ms#0 ] zp[4]:181 [ mul16s_error::mn#0 ] zp[4]:185 [ mul16s_error::mf#0 ]
Uplifting [print_ln] best 549874 combination
Uplifting [print_cls] best 549874 combination
Uplifting [RADIX] best 549874 combination
Uplifting [main] best 549874 combination
Uplifting [mul16u_error] best 546874 combination zp[2]:121 [ mul16u_error::a#0 ] zp[2]:123 [ mul16u_error::b#0 ] zp[4]:125 [ mul16u_error::ms#0 ] zp[4]:129 [ mul16u_error::mn#0 ] zp[4]:133 [ mul16u_error::mf#0 ]
Uplifting [mul16s_error] best 546874 combination zp[2]:173 [ mul16s_error::a#0 ] zp[2]:175 [ mul16s_error::b#0 ] zp[4]:177 [ mul16s_error::ms#0 ] zp[4]:181 [ mul16s_error::mn#0 ] zp[4]:185 [ mul16s_error::mf#0 ]
Uplifting [print_ln] best 546874 combination
Uplifting [print_cls] best 546874 combination
Uplifting [RADIX] best 546874 combination
Uplifting [main] best 546874 combination
Attempting to uplift remaining variables inzp[1]:16 [ mul16u_compare::i#12 mul16u_compare::i#1 ]
Uplifting [mul16u_compare] best 549874 combination zp[1]:16 [ mul16u_compare::i#12 mul16u_compare::i#1 ]
Uplifting [mul16u_compare] best 546874 combination zp[1]:16 [ mul16u_compare::i#12 mul16u_compare::i#1 ]
Attempting to uplift remaining variables inzp[1]:23 [ mul16s_compare::i#12 mul16s_compare::i#1 ]
Uplifting [mul16s_compare] best 549874 combination zp[1]:23 [ mul16s_compare::i#12 mul16s_compare::i#1 ]
Uplifting [mul16s_compare] best 546874 combination zp[1]:23 [ mul16s_compare::i#12 mul16s_compare::i#1 ]
Attempting to uplift remaining variables inzp[1]:10 [ mulf_init::x_255#2 mulf_init::x_255#1 ]
Uplifting [mulf_init] best 549754 combination reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ]
Uplifting [mulf_init] best 546754 combination reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ]
Attempting to uplift remaining variables inzp[1]:13 [ mulf_init::dir#2 mulf_init::dir#4 ]
Uplifting [mulf_init] best 549754 combination zp[1]:13 [ mulf_init::dir#2 mulf_init::dir#4 ]
Uplifting [mulf_init] best 546754 combination zp[1]:13 [ mulf_init::dir#2 mulf_init::dir#4 ]
Attempting to uplift remaining variables inzp[1]:4 [ mulf_init::c#2 mulf_init::c#1 ]
Uplifting [mulf_init] best 549754 combination zp[1]:4 [ mulf_init::c#2 mulf_init::c#1 ]
Uplifting [mulf_init] best 546754 combination zp[1]:4 [ mulf_init::c#2 mulf_init::c#1 ]
Coalescing zero page register [ zp[2]:17 [ mul16u_compare::a#2 mul16u_compare::a#6 mul16u_compare::a#1 ] ] with [ zp[2]:52 [ mulf16u::a#2 mulf16u::a#1 mulf16u::a#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:17 [ mul16u_compare::a#2 mul16u_compare::a#6 mul16u_compare::a#1 mulf16u::a#2 mulf16u::a#1 mulf16u::a#0 ] ] with [ zp[2]:93 [ muls16u::a#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:17 [ mul16u_compare::a#2 mul16u_compare::a#6 mul16u_compare::a#1 mulf16u::a#2 mulf16u::a#1 mulf16u::a#0 muls16u::a#0 ] ] with [ zp[2]:121 [ mul16u_error::a#0 ] ] - score: 1
@ -6912,24 +6912,23 @@ muls16s: {
// muls16s::@4
__b4:
// [204] muls16s::m#1 = muls16s::m#3 + muls16s::b#0 -- vdsz1=vdsz1_plus_vwsz2
clc
lda.z b
adc.z m
sta.z m
lda.z b+1
adc.z m+1
sta.z m+1
lda.z b+1
ora #$7f
bmi !+
lda #0
!:
sta.z $ff
lda.z m
clc
adc.z b
sta.z m
lda.z m+1
adc.z b+1
sta.z m+1
lda.z m+2
adc.z $ff
adc.z m+2
sta.z m+2
lda.z m+3
adc.z $ff
lda.z $ff
adc.z m+3
sta.z m+3
// [205] muls16s::j#1 = ++ muls16s::j#2 -- vwsz1=_inc_vwsz1
inc.z j
@ -8416,7 +8415,7 @@ reg byte x [ print_uchar::$2 ]
FINAL ASSEMBLER
Score: 464677
Score: 461677
// File Comments
// Test the fast multiplication library
@ -9791,24 +9790,23 @@ muls16s: {
__b4:
// m = m + b
// [204] muls16s::m#1 = muls16s::m#3 + muls16s::b#0 -- vdsz1=vdsz1_plus_vwsz2
clc
lda.z b
adc.z m
sta.z m
lda.z b+1
adc.z m+1
sta.z m+1
lda.z b+1
ora #$7f
bmi !+
lda #0
!:
sta.z $ff
lda.z m
clc
adc.z b
sta.z m
lda.z m+1
adc.z b+1
sta.z m+1
lda.z m+2
adc.z $ff
adc.z m+2
sta.z m+2
lda.z m+3
adc.z $ff
lda.z $ff
adc.z m+3
sta.z m+3
// for(signed word j = 0; j!=a; j++)
// [205] muls16s::j#1 = ++ muls16s::j#2 -- vwsz1=_inc_vwsz1

View File

@ -807,11 +807,11 @@ muls8s: {
__b4:
// m = m + b
txa
pha
sta.z $ff
clc
adc.z m
sta.z m
pla
lda.z $ff
ora #$7f
bmi !+
lda #0

View File

@ -5416,65 +5416,65 @@ Uplift Scope [RADIX]
Uplift Scope [main]
Uplift Scope [mulf_init_asm]
Uplifting [mul8u] best 317283 combination zp[2]:39 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] zp[2]:41 [ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ] reg byte a [ mul8u::$1 ] reg byte x [ mul8u::a#3 mul8u::a#6 mul8u::a#1 mul8u::a#2 mul8u::a#0 ] reg byte a [ mul8u::b#2 mul8u::b#0 mul8u::b#1 ] zp[2]:119 [ mul8u::return#2 ] zp[2]:75 [ mul8u::return#3 ]
Uplifting [muls8s] best 296983 combination zp[2]:44 [ muls8s::return#0 muls8s::m#3 muls8s::m#1 muls8s::m#5 muls8s::m#2 ] reg byte y [ muls8s::j#2 muls8s::j#1 ] reg byte y [ muls8s::i#2 muls8s::i#1 ] reg byte x [ muls8s::b#0 ] zp[1]:87 [ muls8s::a#0 ] zp[2]:89 [ muls8s::return#2 ]
Uplifting [muls8u] best 286683 combination reg byte y [ muls8u::i#2 muls8u::i#1 ] zp[2]:35 [ muls8u::return#0 muls8u::m#3 muls8u::m#1 ] reg byte x [ muls8u::b#0 ] zp[1]:63 [ muls8u::a#0 ] zp[2]:65 [ muls8u::return#2 ]
Uplifting [mulf8u_prepared] best 286674 combination reg byte a [ mulf8u_prepared::b#2 mulf8u_prepared::b#1 mulf8u_prepared::b#0 ] zp[2]:127 [ mulf8u_prepared::return#0 ] zp[2]:129 [ mulf8u_prepared::return#3 ] zp[2]:111 [ mulf8u_prepared::return#2 ]
Uplifting [print_char] best 286623 combination reg byte a [ print_char::ch#7 print_char::ch#0 print_char::ch#5 print_char::ch#6 ]
Uplifting [mulf8s_prepared] best 286599 combination zp[2]:55 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 ] reg byte a [ mulf8s_prepared::$6 ] reg byte a [ mulf8s_prepared::$11 ] reg byte a [ mulf8s_prepared::$9 ] reg byte a [ mulf8s_prepared::$12 ] zp[1]:116 [ mulf8s_prepared::b#0 ]
Uplifting [mul8u] best 316283 combination zp[2]:39 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] zp[2]:41 [ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ] reg byte a [ mul8u::$1 ] reg byte x [ mul8u::a#3 mul8u::a#6 mul8u::a#1 mul8u::a#2 mul8u::a#0 ] reg byte a [ mul8u::b#2 mul8u::b#0 mul8u::b#1 ] zp[2]:119 [ mul8u::return#2 ] zp[2]:75 [ mul8u::return#3 ]
Uplifting [muls8s] best 295983 combination zp[2]:44 [ muls8s::return#0 muls8s::m#3 muls8s::m#1 muls8s::m#5 muls8s::m#2 ] reg byte y [ muls8s::j#2 muls8s::j#1 ] reg byte y [ muls8s::i#2 muls8s::i#1 ] reg byte x [ muls8s::b#0 ] zp[1]:87 [ muls8s::a#0 ] zp[2]:89 [ muls8s::return#2 ]
Uplifting [muls8u] best 285683 combination reg byte y [ muls8u::i#2 muls8u::i#1 ] zp[2]:35 [ muls8u::return#0 muls8u::m#3 muls8u::m#1 ] reg byte x [ muls8u::b#0 ] zp[1]:63 [ muls8u::a#0 ] zp[2]:65 [ muls8u::return#2 ]
Uplifting [mulf8u_prepared] best 285674 combination reg byte a [ mulf8u_prepared::b#2 mulf8u_prepared::b#1 mulf8u_prepared::b#0 ] zp[2]:127 [ mulf8u_prepared::return#0 ] zp[2]:129 [ mulf8u_prepared::return#3 ] zp[2]:111 [ mulf8u_prepared::return#2 ]
Uplifting [print_char] best 285623 combination reg byte a [ print_char::ch#7 print_char::ch#0 print_char::ch#5 print_char::ch#6 ]
Uplifting [mulf8s_prepared] best 285599 combination zp[2]:55 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 ] reg byte a [ mulf8s_prepared::$6 ] reg byte a [ mulf8s_prepared::$11 ] reg byte a [ mulf8s_prepared::$9 ] reg byte a [ mulf8s_prepared::$12 ] zp[1]:116 [ mulf8s_prepared::b#0 ]
Limited combination testing to 100 combinations of 512 possible.
Uplifting [] best 286599 combination zp[2]:50 [ print_char_cursor#87 print_char_cursor#145 print_char_cursor#138 print_char_cursor#1 print_char_cursor#158 print_char_cursor#192 print_char_cursor#193 print_char_cursor#101 print_char_cursor#18 print_char_cursor#231 print_char_cursor#146 ] zp[2]:30 [ print_line_cursor#24 print_line_cursor#47 print_line_cursor#10 print_line_cursor#0 ]
Uplifting [print_uchar] best 286572 combination reg byte a [ print_uchar::$0 ] reg byte x [ print_uchar::$2 ] reg byte x [ print_uchar::b#5 print_uchar::b#3 print_uchar::b#4 print_uchar::b#0 print_uchar::b#1 print_uchar::b#2 ]
Uplifting [mulf8u_prepare] best 286563 combination reg byte a [ mulf8u_prepare::a#2 mulf8u_prepare::a#1 mulf8u_prepare::a#0 ]
Uplifting [mul8s] best 286539 combination zp[2]:47 [ mul8s::m#4 mul8s::m#5 mul8s::m#1 mul8s::m#0 mul8s::m#2 ] reg byte a [ mul8s::$6 ] reg byte a [ mul8s::$11 ] reg byte a [ mul8s::$9 ] reg byte a [ mul8s::$12 ] zp[1]:100 [ mul8s::b#0 ] zp[1]:99 [ mul8s::a#0 ]
Uplifting [] best 285599 combination zp[2]:50 [ print_char_cursor#87 print_char_cursor#145 print_char_cursor#138 print_char_cursor#1 print_char_cursor#158 print_char_cursor#192 print_char_cursor#193 print_char_cursor#101 print_char_cursor#18 print_char_cursor#231 print_char_cursor#146 ] zp[2]:30 [ print_line_cursor#24 print_line_cursor#47 print_line_cursor#10 print_line_cursor#0 ]
Uplifting [print_uchar] best 285572 combination reg byte a [ print_uchar::$0 ] reg byte x [ print_uchar::$2 ] reg byte x [ print_uchar::b#5 print_uchar::b#3 print_uchar::b#4 print_uchar::b#0 print_uchar::b#1 print_uchar::b#2 ]
Uplifting [mulf8u_prepare] best 285563 combination reg byte a [ mulf8u_prepare::a#2 mulf8u_prepare::a#1 mulf8u_prepare::a#0 ]
Uplifting [mul8s] best 285539 combination zp[2]:47 [ mul8s::m#4 mul8s::m#5 mul8s::m#1 mul8s::m#0 mul8s::m#2 ] reg byte a [ mul8s::$6 ] reg byte a [ mul8s::$11 ] reg byte a [ mul8s::$9 ] reg byte a [ mul8s::$12 ] zp[1]:100 [ mul8s::b#0 ] zp[1]:99 [ mul8s::a#0 ]
Limited combination testing to 100 combinations of 2304 possible.
Uplifting [print_str] best 286539 combination zp[2]:28 [ print_str::str#16 print_str::str#19 print_str::str#0 ]
Uplifting [mulf8u] best 285935 combination reg byte a [ mulf8u::a#0 ] reg byte x [ mulf8u::b#0 ] zp[2]:113 [ mulf8u::return#0 ] zp[2]:71 [ mulf8u::return#2 ]
Uplifting [print_uint] best 285935 combination zp[2]:32 [ print_uint::w#6 print_uint::w#3 print_uint::w#4 print_uint::w#5 print_uint::w#2 print_uint::w#1 print_uint::w#0 ]
Uplifting [mulf8s] best 285329 combination zp[2]:117 [ mulf8s::return#0 ] reg byte x [ mulf8s::b#0 ] zp[2]:95 [ mulf8s::return#2 ] reg byte a [ mulf8s::a#0 ]
Uplifting [mul8s_compare] best 284329 combination reg byte x [ mul8s_compare::ok#3 mul8s_compare::ok#4 ] zp[1]:24 [ mul8s_compare::b#10 mul8s_compare::b#1 ] zp[1]:23 [ mul8s_compare::a#10 mul8s_compare::a#1 ] zp[2]:101 [ mul8s_compare::mn#0 ] zp[2]:91 [ mul8s_compare::ms#0 ] zp[2]:97 [ mul8s_compare::mf#0 ]
Uplifting [print_sint] best 284329 combination zp[2]:58 [ print_sint::w#6 print_sint::w#0 print_sint::w#4 print_sint::w#1 print_sint::w#2 print_sint::w#3 ]
Uplifting [print_schar] best 284317 combination reg byte x [ print_schar::b#5 print_schar::b#0 print_schar::b#3 print_schar::b#1 print_schar::b#2 ]
Uplifting [mul8u_compare] best 283317 combination reg byte x [ mul8u_compare::ok#3 mul8u_compare::ok#4 ] zp[1]:21 [ mul8u_compare::b#10 mul8u_compare::b#1 ] zp[1]:20 [ mul8u_compare::a#7 mul8u_compare::a#1 ] zp[2]:77 [ mul8u_compare::mn#0 ] zp[2]:67 [ mul8u_compare::ms#0 ] zp[2]:73 [ mul8u_compare::mf#0 ]
Uplifting [memset] best 283317 combination zp[2]:26 [ memset::dst#2 memset::dst#1 ]
Uplifting [mulf_init] best 283087 combination zp[2]:14 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] zp[2]:8 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] zp[2]:2 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] reg byte x [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] reg byte a [ mulf_init::$1 ] reg byte a [ mulf_init::$4 ] reg byte a [ mulf_init::$5 ] zp[1]:10 [ mulf_init::x_255#2 mulf_init::x_255#1 ] zp[1]:13 [ mulf_init::dir#2 mulf_init::dir#4 ] zp[1]:4 [ mulf_init::c#2 mulf_init::c#1 ] zp[2]:11 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] zp[2]:5 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ]
Uplifting [print_str] best 285539 combination zp[2]:28 [ print_str::str#16 print_str::str#19 print_str::str#0 ]
Uplifting [mulf8u] best 284935 combination reg byte a [ mulf8u::a#0 ] reg byte x [ mulf8u::b#0 ] zp[2]:113 [ mulf8u::return#0 ] zp[2]:71 [ mulf8u::return#2 ]
Uplifting [print_uint] best 284935 combination zp[2]:32 [ print_uint::w#6 print_uint::w#3 print_uint::w#4 print_uint::w#5 print_uint::w#2 print_uint::w#1 print_uint::w#0 ]
Uplifting [mulf8s] best 284329 combination zp[2]:117 [ mulf8s::return#0 ] reg byte x [ mulf8s::b#0 ] zp[2]:95 [ mulf8s::return#2 ] reg byte a [ mulf8s::a#0 ]
Uplifting [mul8s_compare] best 283329 combination reg byte x [ mul8s_compare::ok#3 mul8s_compare::ok#4 ] zp[1]:24 [ mul8s_compare::b#10 mul8s_compare::b#1 ] zp[1]:23 [ mul8s_compare::a#10 mul8s_compare::a#1 ] zp[2]:101 [ mul8s_compare::mn#0 ] zp[2]:91 [ mul8s_compare::ms#0 ] zp[2]:97 [ mul8s_compare::mf#0 ]
Uplifting [print_sint] best 283329 combination zp[2]:58 [ print_sint::w#6 print_sint::w#0 print_sint::w#4 print_sint::w#1 print_sint::w#2 print_sint::w#3 ]
Uplifting [print_schar] best 283317 combination reg byte x [ print_schar::b#5 print_schar::b#0 print_schar::b#3 print_schar::b#1 print_schar::b#2 ]
Uplifting [mul8u_compare] best 282317 combination reg byte x [ mul8u_compare::ok#3 mul8u_compare::ok#4 ] zp[1]:21 [ mul8u_compare::b#10 mul8u_compare::b#1 ] zp[1]:20 [ mul8u_compare::a#7 mul8u_compare::a#1 ] zp[2]:77 [ mul8u_compare::mn#0 ] zp[2]:67 [ mul8u_compare::ms#0 ] zp[2]:73 [ mul8u_compare::mf#0 ]
Uplifting [memset] best 282317 combination zp[2]:26 [ memset::dst#2 memset::dst#1 ]
Uplifting [mulf_init] best 282087 combination zp[2]:14 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] zp[2]:8 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] zp[2]:2 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] reg byte x [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] reg byte a [ mulf_init::$1 ] reg byte a [ mulf_init::$4 ] reg byte a [ mulf_init::$5 ] zp[1]:10 [ mulf_init::x_255#2 mulf_init::x_255#1 ] zp[1]:13 [ mulf_init::dir#2 mulf_init::dir#4 ] zp[1]:4 [ mulf_init::c#2 mulf_init::c#1 ] zp[2]:11 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] zp[2]:5 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ]
Limited combination testing to 100 combinations of 1024 possible.
Uplifting [mulf_tables_cmp] best 283087 combination zp[2]:16 [ mulf_tables_cmp::kc_sqr#2 mulf_tables_cmp::kc_sqr#1 ] zp[2]:18 [ mulf_tables_cmp::asm_sqr#2 mulf_tables_cmp::asm_sqr#1 ]
Uplifting [mul8u_error] best 283081 combination reg byte x [ mul8u_error::a#0 ] zp[1]:80 [ mul8u_error::b#0 ] zp[2]:81 [ mul8u_error::ms#0 ] zp[2]:83 [ mul8u_error::mn#0 ] zp[2]:85 [ mul8u_error::mf#0 ]
Uplifting [mul8s_error] best 283075 combination reg byte x [ mul8s_error::a#0 ] zp[1]:104 [ mul8s_error::b#0 ] zp[2]:105 [ mul8s_error::ms#0 ] zp[2]:107 [ mul8s_error::mn#0 ] zp[2]:109 [ mul8s_error::mf#0 ]
Uplifting [print_ln] best 283075 combination
Uplifting [print_cls] best 283075 combination
Uplifting [RADIX] best 283075 combination
Uplifting [main] best 283075 combination
Uplifting [mulf_init_asm] best 283075 combination
Uplifting [mulf_tables_cmp] best 282087 combination zp[2]:16 [ mulf_tables_cmp::kc_sqr#2 mulf_tables_cmp::kc_sqr#1 ] zp[2]:18 [ mulf_tables_cmp::asm_sqr#2 mulf_tables_cmp::asm_sqr#1 ]
Uplifting [mul8u_error] best 282081 combination reg byte x [ mul8u_error::a#0 ] zp[1]:80 [ mul8u_error::b#0 ] zp[2]:81 [ mul8u_error::ms#0 ] zp[2]:83 [ mul8u_error::mn#0 ] zp[2]:85 [ mul8u_error::mf#0 ]
Uplifting [mul8s_error] best 282075 combination reg byte x [ mul8s_error::a#0 ] zp[1]:104 [ mul8s_error::b#0 ] zp[2]:105 [ mul8s_error::ms#0 ] zp[2]:107 [ mul8s_error::mn#0 ] zp[2]:109 [ mul8s_error::mf#0 ]
Uplifting [print_ln] best 282075 combination
Uplifting [print_cls] best 282075 combination
Uplifting [RADIX] best 282075 combination
Uplifting [main] best 282075 combination
Uplifting [mulf_init_asm] best 282075 combination
Attempting to uplift remaining variables inzp[1]:87 [ muls8s::a#0 ]
Uplifting [muls8s] best 283075 combination zp[1]:87 [ muls8s::a#0 ]
Uplifting [muls8s] best 282075 combination zp[1]:87 [ muls8s::a#0 ]
Attempting to uplift remaining variables inzp[1]:63 [ muls8u::a#0 ]
Uplifting [muls8u] best 283075 combination zp[1]:63 [ muls8u::a#0 ]
Uplifting [muls8u] best 282075 combination zp[1]:63 [ muls8u::a#0 ]
Attempting to uplift remaining variables inzp[1]:116 [ mulf8s_prepared::b#0 ]
Uplifting [mulf8s_prepared] best 283075 combination zp[1]:116 [ mulf8s_prepared::b#0 ]
Uplifting [mulf8s_prepared] best 282075 combination zp[1]:116 [ mulf8s_prepared::b#0 ]
Attempting to uplift remaining variables inzp[1]:24 [ mul8s_compare::b#10 mul8s_compare::b#1 ]
Uplifting [mul8s_compare] best 283075 combination zp[1]:24 [ mul8s_compare::b#10 mul8s_compare::b#1 ]
Uplifting [mul8s_compare] best 282075 combination zp[1]:24 [ mul8s_compare::b#10 mul8s_compare::b#1 ]
Attempting to uplift remaining variables inzp[1]:21 [ mul8u_compare::b#10 mul8u_compare::b#1 ]
Uplifting [mul8u_compare] best 283075 combination zp[1]:21 [ mul8u_compare::b#10 mul8u_compare::b#1 ]
Uplifting [mul8u_compare] best 282075 combination zp[1]:21 [ mul8u_compare::b#10 mul8u_compare::b#1 ]
Attempting to uplift remaining variables inzp[1]:100 [ mul8s::b#0 ]
Uplifting [mul8s] best 282774 combination reg byte y [ mul8s::b#0 ]
Uplifting [mul8s] best 281774 combination reg byte y [ mul8s::b#0 ]
Attempting to uplift remaining variables inzp[1]:99 [ mul8s::a#0 ]
Uplifting [mul8s] best 282774 combination zp[1]:99 [ mul8s::a#0 ]
Uplifting [mul8s] best 281774 combination zp[1]:99 [ mul8s::a#0 ]
Attempting to uplift remaining variables inzp[1]:23 [ mul8s_compare::a#10 mul8s_compare::a#1 ]
Uplifting [mul8s_compare] best 282774 combination zp[1]:23 [ mul8s_compare::a#10 mul8s_compare::a#1 ]
Uplifting [mul8s_compare] best 281774 combination zp[1]:23 [ mul8s_compare::a#10 mul8s_compare::a#1 ]
Attempting to uplift remaining variables inzp[1]:20 [ mul8u_compare::a#7 mul8u_compare::a#1 ]
Uplifting [mul8u_compare] best 282774 combination zp[1]:20 [ mul8u_compare::a#7 mul8u_compare::a#1 ]
Uplifting [mul8u_compare] best 281774 combination zp[1]:20 [ mul8u_compare::a#7 mul8u_compare::a#1 ]
Attempting to uplift remaining variables inzp[1]:10 [ mulf_init::x_255#2 mulf_init::x_255#1 ]
Uplifting [mulf_init] best 282654 combination reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ]
Uplifting [mulf_init] best 281654 combination reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ]
Attempting to uplift remaining variables inzp[1]:13 [ mulf_init::dir#2 mulf_init::dir#4 ]
Uplifting [mulf_init] best 282654 combination zp[1]:13 [ mulf_init::dir#2 mulf_init::dir#4 ]
Uplifting [mulf_init] best 281654 combination zp[1]:13 [ mulf_init::dir#2 mulf_init::dir#4 ]
Attempting to uplift remaining variables inzp[1]:4 [ mulf_init::c#2 mulf_init::c#1 ]
Uplifting [mulf_init] best 282654 combination zp[1]:4 [ mulf_init::c#2 mulf_init::c#1 ]
Uplifting [mulf_init] best 281654 combination zp[1]:4 [ mulf_init::c#2 mulf_init::c#1 ]
Attempting to uplift remaining variables inzp[1]:80 [ mul8u_error::b#0 ]
Uplifting [mul8u_error] best 282654 combination zp[1]:80 [ mul8u_error::b#0 ]
Uplifting [mul8u_error] best 281654 combination zp[1]:80 [ mul8u_error::b#0 ]
Attempting to uplift remaining variables inzp[1]:104 [ mul8s_error::b#0 ]
Uplifting [mul8s_error] best 282654 combination zp[1]:104 [ mul8s_error::b#0 ]
Uplifting [mul8s_error] best 281654 combination zp[1]:104 [ mul8s_error::b#0 ]
Coalescing zero page register [ zp[2]:18 [ mulf_tables_cmp::asm_sqr#2 mulf_tables_cmp::asm_sqr#1 ] ] with [ zp[2]:32 [ print_uint::w#6 print_uint::w#3 print_uint::w#4 print_uint::w#5 print_uint::w#2 print_uint::w#1 print_uint::w#0 ] ] - score: 1
Coalescing zero page register [ zp[1]:20 [ mul8u_compare::a#7 mul8u_compare::a#1 ] ] with [ zp[1]:63 [ muls8u::a#0 ] ] - score: 1
Coalescing zero page register [ zp[1]:21 [ mul8u_compare::b#10 mul8u_compare::b#1 ] ] with [ zp[1]:80 [ mul8u_error::b#0 ] ] - score: 1
@ -6985,11 +6985,11 @@ muls8s: {
__b4:
// [231] muls8s::m#1 = muls8s::m#3 + muls8s::b#0 -- vwsz1=vwsz1_plus_vbsxx
txa
pha
sta.z $ff
clc
adc.z m
sta.z m
pla
lda.z $ff
ora #$7f
bmi !+
lda #0
@ -8462,7 +8462,7 @@ reg byte a [ mulf8s_prepared::$12 ]
FINAL ASSEMBLER
Score: 231450
Score: 230450
// File Comments
// Test the fast multiplication library
@ -9785,11 +9785,11 @@ muls8s: {
// m = m + b
// [231] muls8s::m#1 = muls8s::m#3 + muls8s::b#0 -- vwsz1=vwsz1_plus_vbsxx
txa
pha
sta.z $ff
clc
adc.z m
sta.z m
pla
lda.z $ff
ora #$7f
bmi !+
lda #0