1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-01-11 20:30:08 +00:00

Added missing fragment. Closes #531

This commit is contained in:
jespergravgaard 2020-10-03 08:12:56 +02:00
parent 1df52a8c5b
commit a22a0e483d
62 changed files with 591 additions and 301 deletions

View File

@ -1,4 +1,4 @@
//KICKC FRAGMENT CACHE 11cb56b840 11cb56d1f2
//KICKC FRAGMENT CACHE 117c74c070 117c74db73
//FRAGMENT vbuz1=vbuc1
lda #{c1}
sta {z1}

View File

@ -1,4 +1,4 @@
//KICKC FRAGMENT CACHE 11cb56b840 11cb56d1f2
//KICKC FRAGMENT CACHE 117c74c070 117c74db73
//FRAGMENT _deref_pbuc1=vbuc2
lda #{c2}
sta {c1}

View File

@ -1,4 +1,4 @@
//KICKC FRAGMENT CACHE 11cb56b840 11cb56d1f2
//KICKC FRAGMENT CACHE 117c74c070 117c74db73
//FRAGMENT vbuz1=vbuc1
lda #{c1}
sta {z1}

View File

@ -1,4 +1,4 @@
//KICKC FRAGMENT CACHE 11cb56b840 11cb56d1f2
//KICKC FRAGMENT CACHE 117c74c070 117c74db73
//FRAGMENT vbuz1=vbuc1
lda #{c1}
sta {z1}
@ -14649,50 +14649,6 @@ beq {la1}
//FRAGMENT _deref_pbsc1=_deref_pbsc2
lda {c2}
sta {c1}
//FRAGMENT vwsz1_eq_vwsz2_then_la1
lda {z1}
cmp {z2}
bne !+
lda {z1}+1
cmp {z2}+1
beq {la1}
!:
//FRAGMENT vwsz1_neq_vwsz2_then_la1
lda {z1}+1
cmp {z2}+1
bne {la1}
lda {z1}
cmp {z2}
bne {la1}
//FRAGMENT vwsz1_lt_vwsz2_then_la1
lda {z1}
cmp {z2}
lda {z1}+1
sbc {z2}+1
bvc !+
eor #$80
!:
bmi {la1}
!e:
//FRAGMENT vwsz1_gt_vwsz2_then_la1
lda {z2}
cmp {z1}
lda {z2}+1
sbc {z1}+1
bvc !+
eor #$80
!:
bmi {la1}
!e:
//FRAGMENT vwsz1_ge_vwsz2_then_la1
lda {z1}
cmp {z2}
lda {z1}+1
sbc {z2}+1
bvc !+
eor #$80
!:
bpl {la1}
//FRAGMENT vbuz1=_deref_pbuc1_plus_1
ldy {c1}
iny
@ -16295,6 +16251,14 @@ lda ({z1}),y
ldy #0
cmp ({z2}),y
beq {la1}
//FRAGMENT vwsz1_eq_vwsz2_then_la1
lda {z1}
cmp {z2}
bne !+
lda {z1}+1
cmp {z2}+1
beq {la1}
!:
//FRAGMENT vbsz1_le_0_then_la1
lda {z1}
cmp #1
@ -17563,6 +17527,190 @@ lda #{c2}
sta {c1},y
lda #0
sta {c1}+1,y
//FRAGMENT vwuz1=pwuc1_derefidx_vbuz2_plus_pwuc1_derefidx_vbuz3
ldx {z2}
ldy {z3}
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vwuz1=pwuc1_derefidx_vbuxx_plus_pwuc1_derefidx_vbuz2
ldy {z2}
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vwuz1=pwuc1_derefidx_vbuyy_plus_pwuc1_derefidx_vbuz2
ldx {z2}
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vwuz1=pwuc1_derefidx_vbuz2_plus_pwuc1_derefidx_vbuaa
ldx {z2}
tay
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vwuz1=pwuc1_derefidx_vbuxx_plus_pwuc1_derefidx_vbuaa
tay
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vwuz1=pwuc1_derefidx_vbuyy_plus_pwuc1_derefidx_vbuaa
tax
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vwuz1=pwuc1_derefidx_vbuz2_plus_pwuc1_derefidx_vbuxx
ldy {z2}
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vwuz1=pwuc1_derefidx_vbuxx_plus_pwuc1_derefidx_vbuxx
txa
tay
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vwuz1=pwuc1_derefidx_vbuyy_plus_pwuc1_derefidx_vbuxx
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vwuz1=pwuc1_derefidx_vbuz2_plus_pwuc1_derefidx_vbuyy
ldx {z2}
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vwuz1=pwuc1_derefidx_vbuxx_plus_pwuc1_derefidx_vbuyy
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vwuz1=pwuc1_derefidx_vbuyy_plus_pwuc1_derefidx_vbuyy
tya
tax
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vbuz1=vbuxx_plus_2
inx
inx
stx {z1}
//FRAGMENT vbuz1=vbuyy_plus_2
iny
iny
sty {z1}
//FRAGMENT vbuz1=_deref_pbuz2_plus__deref_pbuz3
ldy #0
lda ({z2}),y
clc
ldy #0
adc ({z3}),y
sta {z1}
//FRAGMENT vbuaa=_deref_pbuz1_plus__deref_pbuz2
ldy #0
lda ({z1}),y
clc
ldy #0
adc ({z2}),y
//FRAGMENT vbuxx=_deref_pbuz1_plus__deref_pbuz2
ldy #0
lda ({z1}),y
clc
ldy #0
adc ({z2}),y
tax
//FRAGMENT vbuyy=_deref_pbuz1_plus__deref_pbuz2
ldy #0
lda ({z1}),y
clc
ldy #0
adc ({z2}),y
tay
//FRAGMENT pbuc1_derefidx_vbuz1=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuz1
ldy {z1}
lda {c1},y
clc
adc {c2},y
sta {c1},y
//FRAGMENT pbuc1_derefidx_vbuz1=pbuc1_derefidx_vbuz1_plus_vbuc2
lda #{c2}
ldy {z1}
clc
adc {c1},y
sta {c1},y
//FRAGMENT pbuc1_derefidx_vbuaa=pbuc1_derefidx_vbuaa_plus_pbuc2_derefidx_vbuaa
tax
tay
lda {c1},x
clc
adc {c2},x
sta {c1},y
//FRAGMENT pbuc1_derefidx_vbuxx=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuxx
lda {c1},x
clc
adc {c2},x
sta {c1},x
//FRAGMENT pbuc1_derefidx_vbuyy=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuyy
lda {c1},y
clc
adc {c2},y
sta {c1},y
//FRAGMENT pbuc1_derefidx_vbuxx=pbuc1_derefidx_vbuxx_plus_vbuc2
lda #{c2}
clc
adc {c1},x
sta {c1},x
//FRAGMENT pbuc1_derefidx_vbuyy=pbuc1_derefidx_vbuyy_plus_vbuc2
lda #{c2}
clc
adc {c1},y
sta {c1},y
//FRAGMENT _deref_pbuz1=_deref_pbuz2_plus__deref_pbuz3
ldy #0
lda ({z2}),y
@ -18116,6 +18264,13 @@ lda {z1}+3
cmp {z2}+3
beq {la1}
!:
//FRAGMENT vwsz1_neq_vwsz2_then_la1
lda {z1}+1
cmp {z2}+1
bne {la1}
lda {z1}
cmp {z2}
bne {la1}
//FRAGMENT vdsz1=vdsz1_plus_vwsz2
lda {z2}+1
ora #$7f
@ -18590,202 +18745,3 @@ sta {c1},x
lda #{c2}
ora {c1},y
sta {c1},y
//FRAGMENT vwuz1=pwuc1_derefidx_vbuz2_plus_pwuc1_derefidx_vbuz3
ldx {z2}
ldy {z3}
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vwuz1=pwuc1_derefidx_vbuxx_plus_pwuc1_derefidx_vbuz2
ldy {z2}
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vwuz1=pwuc1_derefidx_vbuyy_plus_pwuc1_derefidx_vbuz2
ldx {z2}
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vwuz1=pwuc1_derefidx_vbuz2_plus_pwuc1_derefidx_vbuaa
ldx {z2}
tay
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vwuz1=pwuc1_derefidx_vbuxx_plus_pwuc1_derefidx_vbuaa
tay
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vwuz1=pwuc1_derefidx_vbuyy_plus_pwuc1_derefidx_vbuaa
tax
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vwuz1=pwuc1_derefidx_vbuz2_plus_pwuc1_derefidx_vbuxx
ldy {z2}
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vwuz1=pwuc1_derefidx_vbuxx_plus_pwuc1_derefidx_vbuxx
txa
tay
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vwuz1=pwuc1_derefidx_vbuyy_plus_pwuc1_derefidx_vbuxx
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vwuz1=pwuc1_derefidx_vbuz2_plus_pwuc1_derefidx_vbuyy
ldx {z2}
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vwuz1=pwuc1_derefidx_vbuxx_plus_pwuc1_derefidx_vbuyy
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vwuz1=pwuc1_derefidx_vbuyy_plus_pwuc1_derefidx_vbuyy
tya
tax
lda {c1},x
clc
adc {c1},y
sta {z1}
lda {c1}+1,x
adc {c1}+1,y
sta {z1}+1
//FRAGMENT vbuz1=vbuxx_plus_2
inx
inx
stx {z1}
//FRAGMENT vbuz1=vbuyy_plus_2
iny
iny
sty {z1}
//FRAGMENT vbuz1=_deref_pbuz2_plus__deref_pbuz3
ldy #0
lda ({z2}),y
clc
ldy #0
adc ({z3}),y
sta {z1}
//FRAGMENT vbuaa=_deref_pbuz1_plus__deref_pbuz2
ldy #0
lda ({z1}),y
clc
ldy #0
adc ({z2}),y
//FRAGMENT vbuxx=_deref_pbuz1_plus__deref_pbuz2
ldy #0
lda ({z1}),y
clc
ldy #0
adc ({z2}),y
tax
//FRAGMENT vbuyy=_deref_pbuz1_plus__deref_pbuz2
ldy #0
lda ({z1}),y
clc
ldy #0
adc ({z2}),y
tay
//FRAGMENT vwuz1=_deref_pwuz2_plus__deref_pwuz3
NO_SYNTHESIS
//FRAGMENT vwuz1=_deref_pwuz2_plus__deref_pwuz1
ldy #0
clc
lda ({z1}),y
adc ({z2}),y
pha
iny
lda ({z1}),y
adc ({z2}),y
sta ({z1}),y
dey
pla
sta ({z1}),y
//FRAGMENT pbuc1_derefidx_vbuz1=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuz1
ldy {z1}
lda {c1},y
clc
adc {c2},y
sta {c1},y
//FRAGMENT pbuc1_derefidx_vbuz1=pbuc1_derefidx_vbuz1_plus_vbuc2
lda #{c2}
ldy {z1}
clc
adc {c1},y
sta {c1},y
//FRAGMENT pbuc1_derefidx_vbuaa=pbuc1_derefidx_vbuaa_plus_pbuc2_derefidx_vbuaa
tax
tay
lda {c1},x
clc
adc {c2},x
sta {c1},y
//FRAGMENT pbuc1_derefidx_vbuxx=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuxx
lda {c1},x
clc
adc {c2},x
sta {c1},x
//FRAGMENT pbuc1_derefidx_vbuyy=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuyy
lda {c1},y
clc
adc {c2},y
sta {c1},y
//FRAGMENT pbuc1_derefidx_vbuxx=pbuc1_derefidx_vbuxx_plus_vbuc2
lda #{c2}
clc
adc {c1},x
sta {c1},x
//FRAGMENT pbuc1_derefidx_vbuyy=pbuc1_derefidx_vbuyy_plus_vbuc2
lda #{c2}
clc
adc {c1},y
sta {c1},y

View File

@ -1,4 +1,4 @@
//KICKC FRAGMENT CACHE 11cb56b840 11cb56d1f2
//KICKC FRAGMENT CACHE 117c74c070 117c74db73
//FRAGMENT vbuz1=_deref_pbuc1
lda {c1}
sta {z1}

View File

@ -0,0 +1,7 @@
ldy #0
!:
lda ({z1}),y
sta {c1},y
iny
dex
bne !-

View File

@ -0,0 +1,5 @@
lda {c1}
bne !+
dec {c1}+1
!:
dec {c1}

View File

@ -0,0 +1,4 @@
inc {c1}
bne !+
inc {c1}+1
!:

View File

@ -0,0 +1,3 @@
lda {c1}
ora {c1}+1
beq {la1}

View File

@ -0,0 +1,3 @@
lda {c1}
ora {c1}+1
bne {la1}

View File

@ -0,0 +1,10 @@
ldy #0
sec
lda ({z2}),y
sbc #1
sta ({z1}),y
iny
lda ({z2}),y
sbc #0
sta ({z1}),y

View File

@ -0,0 +1,9 @@
ldy #0
clc
lda ({z1}),y
adc {m2}
sta ({z1}),y
iny
lda ({z1}),y
adc {m2}+1
sta ({z1}),y

View File

@ -0,0 +1,8 @@
ldy #0
lda ({z1}),y
asl
sta ({z1}),y
iny
lda ({z1}),y
rol
sta ({z1}),y

View File

@ -0,0 +1,13 @@
ldy #0
ldx #3
!:
lda ({z1}),y
asl
sta ({z1}),y
iny
lda ({z1}),y
rol
sta ({z1}),y
dey
dex
bne !-

View File

@ -0,0 +1,6 @@
ldy #0
lda ({z2}),y
sta ({z1}),y
iny
lda ({z2}),y
sta ({z1}),y

View File

@ -0,0 +1,9 @@
ldy #0
sec
lda ({z2}),y
sbc {m3}
sta ({z1}),y
iny
lda ({z2}),y
sbc {m3}+1
sta ({z1}),y

View File

@ -0,0 +1,9 @@
ldy #0
clc
lda ({z2}),y
adc {m3}
sta ({z1}),y
iny
lda ({z2}),y
adc {m3}+1
sta ({z1}),y

View File

@ -0,0 +1,10 @@
ldy #0
clc
lda ({z2}),y
adc #1
sta ({z1}),y
iny
lda ({z2}),y
adc #0
sta ({z1}),y

View File

@ -0,0 +1,5 @@
ldy #0
lda ({z1}),y
iny
ora ({z1}),y
beq {la1}

View File

@ -0,0 +1,8 @@
ldy #1
lda ({z1}),y
bne !+
dey
lda ({z1}),y
cmp #{c1}
beq {la1}
!:

View File

@ -0,0 +1,10 @@
ldy #0
lda ({z1}),y
cmp {m2}
iny
lda ({z1}),y
sbc {m2}+1
bvc !+
eor #$80
!:
bpl {la1}

View File

@ -0,0 +1,10 @@
ldy #0
lda ({z2}),y
cmp ({z1}),y
iny
lda ({z2}),y
sbc ({z1}),y
bvc !+
eor #$80
!:
bmi {la1}

View File

@ -0,0 +1,5 @@
ldy #0
lda ({z1}),y
iny
ora ({z1}),y
bne {la1}

View File

@ -0,0 +1,8 @@
ldy #0
lda ({z1}),y
cmp {m2}
bne {la1}
iny
lda ({z1}),y
cmp {m2}+1
bne {la1}

View File

@ -0,0 +1,5 @@
lda {c1}
bne !+
dec {c1}+1
!:
dec {c1}

View File

@ -0,0 +1,4 @@
inc {c1}
bne !+
inc {c1}+1
!:

View File

@ -0,0 +1,3 @@
lda {c1}
ora {c1}+1
beq {la1}

View File

@ -0,0 +1,3 @@
lda {c1}
ora {c1}+1
bne {la1}

View File

@ -0,0 +1,10 @@
ldy #0
sec
lda ({z2}),y
sbc #1
sta ({z1}),y
iny
lda ({z2}),y
sbc #0
sta ({z1}),y

View File

@ -0,0 +1,6 @@
ldy #0
lda ({z2}),y
sta ({z1}),y
iny
lda ({z2}),y
sta ({z1}),y

View File

@ -0,0 +1,9 @@
ldy #0
sec
lda ({z2}),y
sbc {m3}
sta ({z1}),y
iny
lda ({z2}),y
sbc {m3}+1
sta ({z1}),y

View File

@ -0,0 +1,9 @@
ldy #0
clc
lda ({z2}),y
adc {m3}
sta ({z1}),y
iny
lda ({z2}),y
adc {m3}+1
sta ({z1}),y

View File

@ -0,0 +1,10 @@
ldy #0
clc
lda ({z2}),y
adc #1
sta ({z1}),y
iny
lda ({z2}),y
adc #0
sta ({z1}),y

View File

@ -0,0 +1,5 @@
ldy #0
lda ({z1}),y
iny
ora ({z1}),y
beq {la1}

View File

@ -0,0 +1,8 @@
ldy #1
lda ({z1}),y
bne !+
dey
lda ({z1}),y
cmp #{c1}
beq {la1}
!:

View File

@ -1,6 +1,5 @@
ldy #0
lda ({z1}),y
bne {la1}
iny
lda ({z1}),y
bne {la1}
ora ({z1}),y
bne {la1}

View File

@ -0,0 +1,8 @@
ldy #0
lda ({z1}),y
cmp {m2}
bne {la1}
iny
lda ({z1}),y
cmp {m2}+1
bne {la1}

View File

@ -0,0 +1,2 @@
ldy {c1},x
sta ({z1}),y

View File

@ -0,0 +1,11 @@
ldy #0
clc
lda ({z1}),y
adc ({z2}),y
pha
iny
lda ({z1}),y
adc ({z2}),y
sta {z1}+1
pla
sta {z1}

View File

@ -0,0 +1,11 @@
ldy #0
clc
lda ({z1}),y
adc ({z2}),y
pha
iny
lda ({z1}),y
adc ({z2}),y
sta {z1}+1
pla
sta {z1}

View File

@ -0,0 +1,7 @@
lda #<{c1}
clc
adc {m1}
sta {m1}
lda #>{c1}
adc {m1}+1
sta {m1}+1

View File

@ -0,0 +1,7 @@
lda #<{c1}
cmp {c2}
bne !+
lda #>{c1}
cmp {c2}+1
beq {la1}
!:

View File

@ -0,0 +1,7 @@
lda #<{c1}
cmp {c2}
bne !+
lda #>{c1}
cmp {c2}+1
beq {la1}
!:

View File

@ -0,0 +1,8 @@
asl {m1}
rol {m1}+1
asl {m1}
rol {m1}+1
asl {m1}
rol {m1}+1
asl {m1}
rol {m1}+1

View File

@ -0,0 +1,3 @@
lda {m1}
ora {m1}+1
beq {la1}

View File

@ -0,0 +1,10 @@
ldy #0
lda {m1}
cmp ({z2}),y
iny
lda {m1}+1
sbc ({z2}),y
bvc !+
eor #$80
!:
bpl {la1}

View File

@ -6,4 +6,3 @@ bvc !+
eor #$80
!:
bmi {la1}
!e:

View File

@ -6,4 +6,3 @@ bvc !+
eor #$80
!:
bmi {la1}
!e:

View File

@ -5,5 +5,4 @@ sbc {m1}+1
bvc !+
eor #$80
!:
bmi {la1}
!e:
bmi {la1}

View File

@ -0,0 +1,10 @@
ldy #0
lda ({z1}),y
asl
pha
iny
lda ({z1}),y
rol
sta {z1}+1
pla
sta {z1}

View File

@ -0,0 +1,11 @@
ldy #0
sec
lda ({z2}),y
sbc ({z1}),y
pha
iny
lda ({z2}),y
sbc ({z1}),y
sta {z1}+1
pla
sta {z1}

View File

@ -0,0 +1,6 @@
lda {c1}
asl
sta {m1}
lda {c1}+1
rol
sta {m1}+1

View File

@ -0,0 +1,9 @@
ldy #0
clc
lda ({z2}),y
adc ({z3}),y
sta {m1}
iny
lda ({z2}),y
adc ({z3}),y
sta {m1}+1

View File

@ -0,0 +1,8 @@
ldy #0
lda ({z2}),y
asl
sta {m1}
iny
lda ({z2}),y
rol
sta {m1}+1

View File

@ -0,0 +1,10 @@
ldy #0
lda ({z1}),y
asl
pha
iny
lda ({z1}),y
rol
sta {z1}+1
pla
sta {z1}

View File

@ -0,0 +1,11 @@
ldy #0
sec
lda ({z2}),y
sbc ({z1}),y
pha
iny
lda ({z2}),y
sbc ({z1}),y
sta {z1}+1
pla
sta {z1}

View File

@ -0,0 +1,9 @@
lda ({z1}),y
asl
pha
iny
lda ({z1}),y
rol
sta {z1}+1
pla
sta {z1}

View File

@ -0,0 +1,7 @@
lda ({z2}),y
asl
sta {z1}
iny
lda ({z2}),y
rol
sta {z1}+1

View File

@ -660,6 +660,8 @@ class AsmFragmentTemplateSynthesisRule {
// Replace second (of 2) M4 with XX
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)m4(.*vb.)m4(.*)", lvalZM4+"|"+rvalXx, "ldx {m4}", "$1m4$2xx$3", null, null));
// Correct wrong ordered Z2/Z1
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)z2(.*)z1(.*)", twoZM1+"|"+twoZM2, null, "$1z1$2z2$3", null, mapZM2Swap, false));
// Correct wrong ordered Z2/Z1
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)m2(.*)m1(.*)", twoZM1+"|"+twoZM2, null, "$1m1$2m2$3", null, mapZM2Swap, false));
// Correct wrong ordered Z3/Z2

View File

@ -219,11 +219,6 @@ Allocated zp[2]:14 [ main::$10 ]
Allocated zp[2]:16 [ main::$3 ]
Allocated zp[2]:18 [ main::$8 ]
Allocated zp[2]:20 [ main::$11 ]
Warning! Unknown fragment for statement [11] (word~) main::$3 ← *((word*~) main::$9) + *((word*~) main::$10)
Missing ASM fragment Fragment not found vwuz1=_deref_pwuz2_plus__deref_pwuz3. Attempted variations vwuz1=_deref_pwuz2_plus__deref_pwuz3
File C:\c64\kickc\src\test\kc\index-pointer-rewrite-7.c
Line 13
fibs[i]+fibs[i+1]
INITIAL ASM
Target platform is c64basic / MOS6502X
@ -329,8 +324,16 @@ main: {
lda.z __7+1
adc #>fibs
sta.z __10+1
// [11] (word~) main::$3 ← *((word*~) main::$9) + *((word*~) main::$10)
.assert "Missing ASM fragment Fragment not found vwuz1=_deref_pwuz2_plus__deref_pwuz3. Attempted variations vwuz1=_deref_pwuz2_plus__deref_pwuz3 ", 0, 1
// [11] (word~) main::$3 ← *((word*~) main::$9) + *((word*~) main::$10) -- vwuz1=_deref_pwuz2_plus__deref_pwuz3
ldy #0
clc
lda (__9),y
adc (__10),y
sta.z __3
iny
lda (__9),y
adc (__10),y
sta.z __3+1
// [12] (word~) main::$8 ← (word~) main::$1 << (byte) 1 -- vwuz1=vwuz2_rol_1
lda.z __1
asl
@ -376,10 +379,7 @@ Statement [7] (word~) main::$6 ← (word) main::i#2 << (byte) 1 [ main::i#2 main
Statement [8] (word~) main::$7 ← (word~) main::$2 << (byte) 1 [ main::i#2 main::$1 main::$6 main::$7 ] ( [ main::i#2 main::$1 main::$6 main::$7 ] { } ) always clobbers reg byte a
Statement [9] (word*~) main::$9 ← (const word*) fibs + (word~) main::$6 [ main::i#2 main::$1 main::$7 main::$9 ] ( [ main::i#2 main::$1 main::$7 main::$9 ] { } ) always clobbers reg byte a
Statement [10] (word*~) main::$10 ← (const word*) fibs + (word~) main::$7 [ main::i#2 main::$1 main::$9 main::$10 ] ( [ main::i#2 main::$1 main::$9 main::$10 ] { } ) always clobbers reg byte a
Potential register analysis [11] main::$3 ← *(main::$9) + *(main::$10) missing fragment Fragment not found vwuz1=_deref_pwuz2_plus__deref_pwuz3. Attempted variations vwuz1=_deref_pwuz2_plus__deref_pwuz3 allocation: zp[2]:16 [ main::$3 ] zp[2]:12 [ main::$9 ] zp[2]:14 [ main::$10 ]
MISSING FRAGMENTS
Fragment not found vwuz1=_deref_pwuz2_plus__deref_pwuz3. Attempted variations vwuz1=_deref_pwuz2_plus__deref_pwuz3
Statement [11] (word~) main::$3 ← *((word*~) main::$9) + *((word*~) main::$10) [ main::i#2 main::$1 main::$3 ] ( [ main::i#2 main::$1 main::$3 ] { } ) always clobbers reg byte a reg byte x reg byte y
Statement [11] (word~) main::$3 ← *((word*~) main::$9) + *((word*~) main::$10) [ main::i#2 main::$1 main::$3 ] ( [ main::i#2 main::$1 main::$3 ] { } ) always clobbers reg byte a reg byte y
Statement [12] (word~) main::$8 ← (word~) main::$1 << (byte) 1 [ main::i#2 main::$3 main::$8 ] ( [ main::i#2 main::$3 main::$8 ] { } ) always clobbers reg byte a
Statement [13] (word*~) main::$11 ← (const word*) fibs + (word~) main::$8 [ main::i#2 main::$3 main::$11 ] ( [ main::i#2 main::$3 main::$11 ] { } ) always clobbers reg byte a
Statement [14] *((word*~) main::$11) ← (word~) main::$3 [ main::i#2 ] ( [ main::i#2 ] { } ) always clobbers reg byte a reg byte y
@ -398,35 +398,10 @@ REGISTER UPLIFT SCOPES
Uplift Scope [main] 27.5: zp[2]:2 [ main::i#2 main::i#1 ] 22: zp[2]:14 [ main::$10 ] 22: zp[2]:18 [ main::$8 ] 22: zp[2]:20 [ main::$11 ] 11: zp[2]:6 [ main::$2 ] 11: zp[2]:8 [ main::$6 ] 11: zp[2]:10 [ main::$7 ] 11: zp[2]:12 [ main::$9 ] 7.33: zp[2]:16 [ main::$3 ] 3.14: zp[2]:4 [ main::$1 ]
Uplift Scope []
Warning! Unknown fragment for statement [11] (word~) main::$3 ← *((word*~) main::$9) + *((word*~) main::$10)
Missing ASM fragment Fragment not found vwuz1=_deref_pwuz2_plus__deref_pwuz3. Attempted variations vwuz1=_deref_pwuz2_plus__deref_pwuz3
File C:\c64\kickc\src\test\kc\index-pointer-rewrite-7.c
Line 13
fibs[i]+fibs[i+1]
Uplifting [main] best 2075 combination zp[2]:2 [ main::i#2 main::i#1 ] zp[2]:14 [ main::$10 ] zp[2]:18 [ main::$8 ] zp[2]:20 [ main::$11 ] zp[2]:6 [ main::$2 ] zp[2]:8 [ main::$6 ] zp[2]:10 [ main::$7 ] zp[2]:12 [ main::$9 ] zp[2]:16 [ main::$3 ] zp[2]:4 [ main::$1 ]
Warning! Unknown fragment for statement [11] (word~) main::$3 ← *((word*~) main::$9) + *((word*~) main::$10)
Missing ASM fragment Fragment not found vwuz1=_deref_pwuz2_plus__deref_pwuz3. Attempted variations vwuz1=_deref_pwuz2_plus__deref_pwuz3
File C:\c64\kickc\src\test\kc\index-pointer-rewrite-7.c
Line 13
fibs[i]+fibs[i+1]
Uplifting [] best 2075 combination
Warning! Unknown fragment for statement [11] (word~) main::$3 ← *((word*~) main::$9) + *((word*~) main::$10)
Missing ASM fragment Fragment not found vwuz1=_deref_pwuz2_plus__deref_pwuz3. Attempted variations vwuz1=_deref_pwuz2_plus__deref_pwuz3
File C:\c64\kickc\src\test\kc\index-pointer-rewrite-7.c
Line 13
fibs[i]+fibs[i+1]
Uplifting [main] best 2415 combination zp[2]:2 [ main::i#2 main::i#1 ] zp[2]:14 [ main::$10 ] zp[2]:18 [ main::$8 ] zp[2]:20 [ main::$11 ] zp[2]:6 [ main::$2 ] zp[2]:8 [ main::$6 ] zp[2]:10 [ main::$7 ] zp[2]:12 [ main::$9 ] zp[2]:16 [ main::$3 ] zp[2]:4 [ main::$1 ]
Uplifting [] best 2415 combination
Coalescing zero page register [ zp[2]:4 [ main::$1 ] ] with [ zp[2]:18 [ main::$8 ] ] - score: 1
Warning! Unknown fragment for statement [11] (word~) main::$3 ← *((word*~) main::$9) + *((word*~) main::$10)
Missing ASM fragment Fragment not found vwuz1=_deref_pwuz2_plus__deref_pwuz3. Attempted variations vwuz1=_deref_pwuz2_plus__deref_pwuz3
File C:\c64\kickc\src\test\kc\index-pointer-rewrite-7.c
Line 13
fibs[i]+fibs[i+1]
Coalescing zero page register [ zp[2]:6 [ main::$2 ] ] with [ zp[2]:10 [ main::$7 ] ] - score: 1
Warning! Unknown fragment for statement [11] (word~) main::$3 ← *((word*~) main::$9) + *((word*~) main::$10)
Missing ASM fragment Fragment not found vwuz1=_deref_pwuz2_plus__deref_pwuz3. Attempted variations vwuz1=_deref_pwuz2_plus__deref_pwuz3
File C:\c64\kickc\src\test\kc\index-pointer-rewrite-7.c
Line 13
fibs[i]+fibs[i+1]
Coalescing zero page register [ zp[2]:8 [ main::$6 ] ] with [ zp[2]:12 [ main::$9 ] ] - score: 1
Coalescing zero page register [ zp[2]:14 [ main::$10 ] ] with [ zp[2]:16 [ main::$3 ] ] - score: 1
Coalescing zero page register [ zp[2]:4 [ main::$1 main::$8 ] ] with [ zp[2]:20 [ main::$11 ] ] - score: 1

View File

@ -208,7 +208,6 @@ compare: {
eor #$80
!:
bmi __b10
!e:
lda #TT
sta.z r
jmp __b21
@ -253,7 +252,6 @@ compare: {
eor #$80
!:
bmi __b12
!e:
lda #TT
sta.z r
jmp __b23

View File

@ -2661,7 +2661,6 @@ compare: {
eor #$80
!:
bmi __b21_from___b4
!e:
// [52] phi from compare::@4 to compare::@15 [phi:compare::@4->compare::@15]
__b15_from___b4:
jmp __b15
@ -2740,7 +2739,6 @@ compare: {
eor #$80
!:
bmi __b23_from___b2
!e:
// [58] phi from compare::@2 to compare::@17 [phi:compare::@2->compare::@17]
__b17_from___b2:
jmp __b17
@ -3660,7 +3658,6 @@ compare: {
eor #$80
!:
bmi __b21_from___b4
!e:
// [52] phi from compare::@4 to compare::@15 [phi:compare::@4->compare::@15]
__b15_from___b4:
jmp __b15
@ -3739,7 +3736,6 @@ compare: {
eor #$80
!:
bmi __b23_from___b2
!e:
// [58] phi from compare::@2 to compare::@17 [phi:compare::@2->compare::@17]
__b17_from___b2:
jmp __b17
@ -4908,7 +4904,6 @@ compare: {
eor #$80
!:
bmi __b10
!e:
// [52] phi from compare::@4 to compare::@15 [phi:compare::@4->compare::@15]
// compare::@15
// [53] phi from compare::@15 to compare::@21 [phi:compare::@15->compare::@21]
@ -4977,7 +4972,6 @@ compare: {
eor #$80
!:
bmi __b12
!e:
// [58] phi from compare::@2 to compare::@17 [phi:compare::@2->compare::@17]
// compare::@17
// [59] phi from compare::@17 to compare::@23 [phi:compare::@17->compare::@23]