mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-06-03 07:29:37 +00:00
moved fragment cache to target folder. generated during test stage.
This commit is contained in:
parent
c9ec085ad2
commit
c9284e7ede
|
@ -10,7 +10,7 @@ variables:
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
- .m2/repository/
|
- .m2/repository/
|
||||||
- target/
|
- target/fragment-cache/
|
||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
|
@ -24,9 +24,10 @@ test:
|
||||||
script:
|
script:
|
||||||
- mvn $MAVEN_CLI_OPTS test
|
- mvn $MAVEN_CLI_OPTS test
|
||||||
artifacts:
|
artifacts:
|
||||||
name: jacoco
|
name: test
|
||||||
paths:
|
paths:
|
||||||
- target/site/jacoco/
|
- target/site/jacoco/
|
||||||
|
- target/fragment-cache/
|
||||||
|
|
||||||
release:
|
release:
|
||||||
stage: package
|
stage: package
|
||||||
|
|
|
@ -44,6 +44,14 @@
|
||||||
<include>*/*.asm</include>
|
<include>*/*.asm</include>
|
||||||
</includes>
|
</includes>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.build.directory}/fragment-cache</directory>
|
||||||
|
<outputDirectory>fragment/cache</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.asm</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>src/test/kc/examples</directory>
|
<directory>src/test/kc/examples</directory>
|
||||||
<outputDirectory>examples</outputDirectory>
|
<outputDirectory>examples</outputDirectory>
|
||||||
|
|
239
src/main/fragment/cache/fragment-cache-csg65ce02.asm
vendored
239
src/main/fragment/cache/fragment-cache-csg65ce02.asm
vendored
|
@ -1,239 +0,0 @@
|
||||||
//KICKC FRAGMENT CACHE 1472899f88 147289c4f1
|
|
||||||
//FRAGMENT vbuzz=vbuc1
|
|
||||||
ldz #{c1}
|
|
||||||
//FRAGMENT vbuzz_lt_vbuc1_then_la1
|
|
||||||
cpz #{c1}
|
|
||||||
bcc {la1}
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuzz=vbuzz
|
|
||||||
tza
|
|
||||||
tax
|
|
||||||
sta {c1},x
|
|
||||||
//FRAGMENT vbuzz=_inc_vbuzz
|
|
||||||
inz
|
|
||||||
//FRAGMENT vbsz1=_deref_pbsc1
|
|
||||||
lda {c1}
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbsz1=_neg_vbsz2
|
|
||||||
lda {z2}
|
|
||||||
neg
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT _deref_pbsc1=vbsz1
|
|
||||||
lda {z1}
|
|
||||||
sta {c1}
|
|
||||||
//FRAGMENT vbsz1=vbsz2_ror_2
|
|
||||||
lda {z2}
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbsaa=_deref_pbsc1
|
|
||||||
lda {c1}
|
|
||||||
//FRAGMENT vbsxx=_deref_pbsc1
|
|
||||||
ldx {c1}
|
|
||||||
//FRAGMENT vbsz1=_neg_vbsaa
|
|
||||||
neg
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbsz1=_neg_vbsxx
|
|
||||||
txa
|
|
||||||
neg
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbsz1=_neg_vbsyy
|
|
||||||
tya
|
|
||||||
neg
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbsz1=_neg_vbszz
|
|
||||||
tza
|
|
||||||
neg
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbsaa=_neg_vbsz1
|
|
||||||
lda {z1}
|
|
||||||
neg
|
|
||||||
//FRAGMENT vbsaa=_neg_vbsaa
|
|
||||||
neg
|
|
||||||
//FRAGMENT vbsaa=_neg_vbsxx
|
|
||||||
txa
|
|
||||||
neg
|
|
||||||
//FRAGMENT vbsaa=_neg_vbsyy
|
|
||||||
tya
|
|
||||||
neg
|
|
||||||
//FRAGMENT vbsaa=_neg_vbszz
|
|
||||||
tza
|
|
||||||
neg
|
|
||||||
//FRAGMENT vbsxx=_neg_vbsz1
|
|
||||||
lda {z1}
|
|
||||||
neg
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbsxx=_neg_vbsaa
|
|
||||||
neg
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbsxx=_neg_vbsxx
|
|
||||||
txa
|
|
||||||
neg
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbsxx=_neg_vbsyy
|
|
||||||
tya
|
|
||||||
neg
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbsxx=_neg_vbszz
|
|
||||||
tza
|
|
||||||
neg
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbsyy=_neg_vbsz1
|
|
||||||
lda {z1}
|
|
||||||
neg
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbsyy=_neg_vbsaa
|
|
||||||
neg
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbsyy=_neg_vbsxx
|
|
||||||
txa
|
|
||||||
neg
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbsyy=_neg_vbsyy
|
|
||||||
tya
|
|
||||||
neg
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbsyy=_neg_vbszz
|
|
||||||
tza
|
|
||||||
neg
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbszz=_neg_vbsz1
|
|
||||||
lda {z1}
|
|
||||||
neg
|
|
||||||
taz
|
|
||||||
//FRAGMENT vbszz=_neg_vbsaa
|
|
||||||
neg
|
|
||||||
taz
|
|
||||||
//FRAGMENT vbszz=_neg_vbsxx
|
|
||||||
txa
|
|
||||||
neg
|
|
||||||
taz
|
|
||||||
//FRAGMENT vbszz=_neg_vbsyy
|
|
||||||
tya
|
|
||||||
neg
|
|
||||||
taz
|
|
||||||
//FRAGMENT vbszz=_neg_vbszz
|
|
||||||
tza
|
|
||||||
neg
|
|
||||||
taz
|
|
||||||
//FRAGMENT _deref_pbsc1=vbsaa
|
|
||||||
sta {c1}
|
|
||||||
//FRAGMENT vbsz1=vbsaa_ror_2
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbsz1=vbsxx_ror_2
|
|
||||||
txa
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbsz1=vbsyy_ror_2
|
|
||||||
tya
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbsz1=vbszz_ror_2
|
|
||||||
tza
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbsaa=vbsz1_ror_2
|
|
||||||
lda {z1}
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
//FRAGMENT vbsaa=vbsaa_ror_2
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
//FRAGMENT vbsaa=vbsxx_ror_2
|
|
||||||
txa
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
//FRAGMENT vbsaa=vbsyy_ror_2
|
|
||||||
tya
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
//FRAGMENT vbsaa=vbszz_ror_2
|
|
||||||
tza
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
//FRAGMENT vbsxx=vbsz1_ror_2
|
|
||||||
lda {z1}
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbsxx=vbsaa_ror_2
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbsxx=vbsxx_ror_2
|
|
||||||
txa
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbsxx=vbsyy_ror_2
|
|
||||||
tya
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbsxx=vbszz_ror_2
|
|
||||||
tza
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbsyy=vbsz1_ror_2
|
|
||||||
lda {z1}
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbsyy=vbsaa_ror_2
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbsyy=vbsxx_ror_2
|
|
||||||
txa
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbsyy=vbsyy_ror_2
|
|
||||||
tya
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbsyy=vbszz_ror_2
|
|
||||||
tza
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbszz=vbsz1_ror_2
|
|
||||||
lda {z1}
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
taz
|
|
||||||
//FRAGMENT vbszz=vbsaa_ror_2
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
taz
|
|
||||||
//FRAGMENT vbszz=vbsxx_ror_2
|
|
||||||
txa
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
taz
|
|
||||||
//FRAGMENT vbszz=vbsyy_ror_2
|
|
||||||
tya
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
taz
|
|
||||||
//FRAGMENT vbszz=vbszz_ror_2
|
|
||||||
tza
|
|
||||||
asr
|
|
||||||
asr
|
|
||||||
taz
|
|
||||||
//FRAGMENT vbsyy=_deref_pbsc1
|
|
||||||
ldy {c1}
|
|
||||||
//FRAGMENT vbszz=_deref_pbsc1
|
|
||||||
ldz {c1}
|
|
||||||
//FRAGMENT _deref_pbsc1=vbsxx
|
|
||||||
stx {c1}
|
|
||||||
//FRAGMENT _deref_pbsc1=vbsyy
|
|
||||||
sty {c1}
|
|
||||||
//FRAGMENT _deref_pbsc1=vbszz
|
|
||||||
stz {c1}
|
|
2810
src/main/fragment/cache/fragment-cache-mega45gs02.asm
vendored
2810
src/main/fragment/cache/fragment-cache-mega45gs02.asm
vendored
File diff suppressed because it is too large
Load Diff
113
src/main/fragment/cache/fragment-cache-mos6502.asm
vendored
113
src/main/fragment/cache/fragment-cache-mos6502.asm
vendored
|
@ -1,113 +0,0 @@
|
||||||
//KICKC FRAGMENT CACHE 1472899f88 147289c4f1
|
|
||||||
//FRAGMENT vbuz1=vbuc1
|
|
||||||
lda #{c1}
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuz1_lt_vbuc1_then_la1
|
|
||||||
lda {z1}
|
|
||||||
cmp #{c1}
|
|
||||||
bcc {la1}
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuz1=vbuc2
|
|
||||||
lda #{c2}
|
|
||||||
ldy {z1}
|
|
||||||
sta {c1},y
|
|
||||||
//FRAGMENT vbuz1=vbuz2_band_vbuc1
|
|
||||||
lda #{c1}
|
|
||||||
and {z2}
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuz1_neq_0_then_la1
|
|
||||||
lda {z1}
|
|
||||||
bne {la1}
|
|
||||||
//FRAGMENT vbuz1=vbuz1_plus_vbuc1
|
|
||||||
lda #{c1}
|
|
||||||
clc
|
|
||||||
adc {z1}
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuz1=_inc_vbuz1
|
|
||||||
inc {z1}
|
|
||||||
//FRAGMENT vbuaa_lt_vbuc1_then_la1
|
|
||||||
cmp #{c1}
|
|
||||||
bcc {la1}
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuaa=vbuc2
|
|
||||||
tay
|
|
||||||
lda #{c2}
|
|
||||||
sta {c1},y
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuxx=vbuc2
|
|
||||||
lda #{c2}
|
|
||||||
sta {c1},x
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuyy=vbuc2
|
|
||||||
lda #{c2}
|
|
||||||
sta {c1},y
|
|
||||||
//FRAGMENT vbuaa=vbuz1_band_vbuc1
|
|
||||||
lda #{c1}
|
|
||||||
and {z1}
|
|
||||||
//FRAGMENT vbuxx=vbuz1_band_vbuc1
|
|
||||||
lda #{c1}
|
|
||||||
and {z1}
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=vbuz1_band_vbuc1
|
|
||||||
lda #{c1}
|
|
||||||
and {z1}
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuz1=vbuxx_band_vbuc1
|
|
||||||
txa
|
|
||||||
and #{c1}
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuaa=vbuxx_band_vbuc1
|
|
||||||
txa
|
|
||||||
and #{c1}
|
|
||||||
//FRAGMENT vbuxx=vbuxx_band_vbuc1
|
|
||||||
txa
|
|
||||||
and #{c1}
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=vbuxx_band_vbuc1
|
|
||||||
txa
|
|
||||||
and #{c1}
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuz1=vbuyy_band_vbuc1
|
|
||||||
tya
|
|
||||||
and #{c1}
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuaa=vbuyy_band_vbuc1
|
|
||||||
tya
|
|
||||||
and #{c1}
|
|
||||||
//FRAGMENT vbuxx=vbuyy_band_vbuc1
|
|
||||||
tya
|
|
||||||
and #{c1}
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=vbuyy_band_vbuc1
|
|
||||||
tya
|
|
||||||
and #{c1}
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuaa_neq_0_then_la1
|
|
||||||
cmp #0
|
|
||||||
bne {la1}
|
|
||||||
//FRAGMENT vbuxx=vbuxx_plus_vbuc1
|
|
||||||
txa
|
|
||||||
clc
|
|
||||||
adc #{c1}
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=vbuyy_plus_vbuc1
|
|
||||||
tya
|
|
||||||
clc
|
|
||||||
adc #{c1}
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuxx_lt_vbuc1_then_la1
|
|
||||||
cpx #{c1}
|
|
||||||
bcc {la1}
|
|
||||||
//FRAGMENT vbuxx=vbuc1
|
|
||||||
ldx #{c1}
|
|
||||||
//FRAGMENT vbuxx=_inc_vbuxx
|
|
||||||
inx
|
|
||||||
//FRAGMENT vbuyy=vbuc1
|
|
||||||
ldy #{c1}
|
|
||||||
//FRAGMENT vbuyy_lt_vbuc1_then_la1
|
|
||||||
cpy #{c1}
|
|
||||||
bcc {la1}
|
|
||||||
//FRAGMENT vbuyy=_inc_vbuyy
|
|
||||||
iny
|
|
||||||
//FRAGMENT vbuxx_neq_0_then_la1
|
|
||||||
cpx #0
|
|
||||||
bne {la1}
|
|
||||||
//FRAGMENT vbuyy_neq_0_then_la1
|
|
||||||
cpy #0
|
|
||||||
bne {la1}
|
|
16222
src/main/fragment/cache/fragment-cache-mos6502x.asm
vendored
16222
src/main/fragment/cache/fragment-cache-mos6502x.asm
vendored
File diff suppressed because it is too large
Load Diff
794
src/main/fragment/cache/fragment-cache-rom6502x.asm
vendored
794
src/main/fragment/cache/fragment-cache-rom6502x.asm
vendored
|
@ -1,794 +0,0 @@
|
||||||
//KICKC FRAGMENT CACHE 1472899f88 147289c4f1
|
|
||||||
//FRAGMENT _deref_pbuc1=_inc__deref_pbuc1
|
|
||||||
inc {c1}
|
|
||||||
//FRAGMENT isr_hardware_all_entry
|
|
||||||
pha @clob_none
|
|
||||||
txa @clob_x
|
|
||||||
pha @clob_x
|
|
||||||
tya @clob_y
|
|
||||||
pha @clob_y
|
|
||||||
//FRAGMENT isr_hardware_all_exit
|
|
||||||
pla @clob_y
|
|
||||||
tay @clob_y
|
|
||||||
pla @clob_x
|
|
||||||
tax @clob_x
|
|
||||||
pla @clob_none
|
|
||||||
rti
|
|
||||||
//FRAGMENT vbuz1=vbuc1
|
|
||||||
lda #{c1}
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1
|
|
||||||
ldy {z1}
|
|
||||||
lda {c2},y
|
|
||||||
sta {c1},y
|
|
||||||
//FRAGMENT vbuz1=_inc_vbuz1
|
|
||||||
inc {z1}
|
|
||||||
//FRAGMENT vbuz1_neq_vbuc1_then_la1
|
|
||||||
lda #{c1}
|
|
||||||
cmp {z1}
|
|
||||||
bne {la1}
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuaa=pbuc2_derefidx_vbuaa
|
|
||||||
tay
|
|
||||||
lda {c2},y
|
|
||||||
sta {c1},y
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx
|
|
||||||
lda {c2},x
|
|
||||||
sta {c1},x
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuyy
|
|
||||||
lda {c2},y
|
|
||||||
sta {c1},y
|
|
||||||
//FRAGMENT vbuxx_neq_vbuc1_then_la1
|
|
||||||
cpx #{c1}
|
|
||||||
bne {la1}
|
|
||||||
//FRAGMENT vbuxx=vbuc1
|
|
||||||
ldx #{c1}
|
|
||||||
//FRAGMENT vbuxx=_inc_vbuxx
|
|
||||||
inx
|
|
||||||
//FRAGMENT vbuyy=vbuc1
|
|
||||||
ldy #{c1}
|
|
||||||
//FRAGMENT vbuyy=_inc_vbuyy
|
|
||||||
iny
|
|
||||||
//FRAGMENT vbuyy_neq_vbuc1_then_la1
|
|
||||||
cpy #{c1}
|
|
||||||
bne {la1}
|
|
||||||
//FRAGMENT _deref_pbuc1=vbuc2
|
|
||||||
lda #{c2}
|
|
||||||
sta {c1}
|
|
||||||
//FRAGMENT _deref_pbuc1=_deref_pbuc1_bor_vbuc2
|
|
||||||
lda #{c2}
|
|
||||||
ora {c1}
|
|
||||||
sta {c1}
|
|
||||||
//FRAGMENT _deref_qprc1=pprc2
|
|
||||||
lda #<{c2}
|
|
||||||
sta {c1}
|
|
||||||
lda #>{c2}
|
|
||||||
sta {c1}+1
|
|
||||||
//FRAGMENT vbuz1=vbuz2
|
|
||||||
lda {z2}
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT 0_eq_vbuz1_then_la1
|
|
||||||
lda {z1}
|
|
||||||
beq {la1}
|
|
||||||
//FRAGMENT vbuz1_eq_vbuc1_then_la1
|
|
||||||
lda #{c1}
|
|
||||||
cmp {z1}
|
|
||||||
beq {la1}
|
|
||||||
//FRAGMENT vbuz1=vbuz2_plus_1
|
|
||||||
ldy {z2}
|
|
||||||
iny
|
|
||||||
sty {z1}
|
|
||||||
//FRAGMENT vbuz1_lt_vbuc1_then_la1
|
|
||||||
lda {z1}
|
|
||||||
cmp #{c1}
|
|
||||||
bcc {la1}
|
|
||||||
//FRAGMENT vbuz1=vbuz2_rol_2
|
|
||||||
lda {z2}
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz2
|
|
||||||
ldy {z2}
|
|
||||||
lda {c2},y
|
|
||||||
ldy {z1}
|
|
||||||
sta {c1},y
|
|
||||||
//FRAGMENT vbuz1=vbuz1_minus_vbuc1
|
|
||||||
lax {z1}
|
|
||||||
axs #{c1}
|
|
||||||
stx {z1}
|
|
||||||
//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2_plus_pbuc2_derefidx_vbuz3
|
|
||||||
ldy {z2}
|
|
||||||
lda {c1},y
|
|
||||||
ldy {z3}
|
|
||||||
clc
|
|
||||||
adc {c2},y
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuz1=vbuz2
|
|
||||||
lda {z2}
|
|
||||||
ldy {z1}
|
|
||||||
sta {c1},y
|
|
||||||
//FRAGMENT vbuz1_ge_vbuc1_then_la1
|
|
||||||
lda {z1}
|
|
||||||
cmp #{c1}
|
|
||||||
bcs {la1}
|
|
||||||
//FRAGMENT vbuz1=vbuz1_plus_vbuc1
|
|
||||||
lax {z1}
|
|
||||||
axs #-[{c1}]
|
|
||||||
stx {z1}
|
|
||||||
//FRAGMENT vbuz1=_deref_pbuc1_band_vbuc2
|
|
||||||
lda #{c2}
|
|
||||||
and {c1}
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuz1=vbuc2
|
|
||||||
lda #{c2}
|
|
||||||
ldy {z1}
|
|
||||||
sta {c1},y
|
|
||||||
//FRAGMENT 0_neq_vbuz1_then_la1
|
|
||||||
lda {z1}
|
|
||||||
bne {la1}
|
|
||||||
//FRAGMENT vwuz1=vwuc1
|
|
||||||
lda #<{c1}
|
|
||||||
sta {z1}
|
|
||||||
lda #>{c1}
|
|
||||||
sta {z1}+1
|
|
||||||
//FRAGMENT pvoz1=pvoc1
|
|
||||||
lda #<{c1}
|
|
||||||
sta {z1}
|
|
||||||
lda #>{c1}
|
|
||||||
sta {z1}+1
|
|
||||||
//FRAGMENT vwuz1=vbuc1
|
|
||||||
lda #<{c1}
|
|
||||||
sta {z1}
|
|
||||||
lda #>{c1}
|
|
||||||
sta {z1}+1
|
|
||||||
//FRAGMENT vbuz1=vbuz2_rol_1
|
|
||||||
lda {z2}
|
|
||||||
asl
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuz1=vbuz2_bor_vbuz3
|
|
||||||
lda {z2}
|
|
||||||
ora {z3}
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT pbuz1=pbuc1
|
|
||||||
lda #<{c1}
|
|
||||||
sta {z1}
|
|
||||||
lda #>{c1}
|
|
||||||
sta {z1}+1
|
|
||||||
//FRAGMENT vwuz1_lt_vwuc1_then_la1
|
|
||||||
lda {z1}+1
|
|
||||||
cmp #>{c1}
|
|
||||||
bcc {la1}
|
|
||||||
bne !+
|
|
||||||
lda {z1}
|
|
||||||
cmp #<{c1}
|
|
||||||
bcc {la1}
|
|
||||||
!:
|
|
||||||
//FRAGMENT vbuz1=_deref_pbuz2
|
|
||||||
ldy #0
|
|
||||||
lda ({z2}),y
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT _deref_pbuc1=vbuz1
|
|
||||||
lda {z1}
|
|
||||||
sta {c1}
|
|
||||||
//FRAGMENT pbuz1=_inc_pbuz1
|
|
||||||
inc {z1}
|
|
||||||
bne !+
|
|
||||||
inc {z1}+1
|
|
||||||
!:
|
|
||||||
//FRAGMENT vwuz1=_inc_vwuz1
|
|
||||||
inc {z1}
|
|
||||||
bne !+
|
|
||||||
inc {z1}+1
|
|
||||||
!:
|
|
||||||
//FRAGMENT vbuz1=_byte1_pvoz2
|
|
||||||
lda {z2}+1
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuz1=_byte0_pvoz2
|
|
||||||
lda {z2}
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vwuz1_lt_vwuz2_then_la1
|
|
||||||
lda {z1}+1
|
|
||||||
cmp {z2}+1
|
|
||||||
bcc {la1}
|
|
||||||
bne !+
|
|
||||||
lda {z1}
|
|
||||||
cmp {z2}
|
|
||||||
bcc {la1}
|
|
||||||
!:
|
|
||||||
//FRAGMENT vbuz1=vbuaa
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuaa=vbuz1
|
|
||||||
lda {z1}
|
|
||||||
//FRAGMENT vbuxx=vbuz1
|
|
||||||
ldx {z1}
|
|
||||||
//FRAGMENT 0_eq_vbuaa_then_la1
|
|
||||||
cmp #0
|
|
||||||
beq {la1}
|
|
||||||
//FRAGMENT vbuaa=vbuz1_plus_1
|
|
||||||
lda {z1}
|
|
||||||
clc
|
|
||||||
adc #1
|
|
||||||
//FRAGMENT vbuaa_lt_vbuc1_then_la1
|
|
||||||
cmp #{c1}
|
|
||||||
bcc {la1}
|
|
||||||
//FRAGMENT vbuaa=vbuz1_rol_2
|
|
||||||
lda {z1}
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
//FRAGMENT vbuxx=vbuz1_rol_2
|
|
||||||
lda {z1}
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=vbuz1_rol_2
|
|
||||||
lda {z1}
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuz1=vbuaa_rol_2
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuaa=vbuaa_rol_2
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
//FRAGMENT vbuxx=vbuaa_rol_2
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=vbuaa_rol_2
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuz1=vbuxx_rol_2
|
|
||||||
txa
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuaa=vbuxx_rol_2
|
|
||||||
txa
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
//FRAGMENT vbuxx=vbuxx_rol_2
|
|
||||||
txa
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=vbuxx_rol_2
|
|
||||||
txa
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuz1=vbuyy_rol_2
|
|
||||||
tya
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuaa=vbuyy_rol_2
|
|
||||||
tya
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
//FRAGMENT vbuxx=vbuyy_rol_2
|
|
||||||
tya
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=vbuyy_rol_2
|
|
||||||
tya
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
tay
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuaa=pbuc2_derefidx_vbuz1
|
|
||||||
ldx {z1}
|
|
||||||
tay
|
|
||||||
lda {c2},x
|
|
||||||
sta {c1},y
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuz1
|
|
||||||
ldy {z1}
|
|
||||||
lda {c2},y
|
|
||||||
sta {c1},x
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuz1
|
|
||||||
ldx {z1}
|
|
||||||
lda {c2},x
|
|
||||||
sta {c1},y
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuxx
|
|
||||||
lda {c2},x
|
|
||||||
ldy {z1}
|
|
||||||
sta {c1},y
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuaa=pbuc2_derefidx_vbuxx
|
|
||||||
tay
|
|
||||||
lda {c2},x
|
|
||||||
sta {c1},y
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuxx
|
|
||||||
lda {c2},x
|
|
||||||
sta {c1},y
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuyy
|
|
||||||
lda {c2},y
|
|
||||||
ldy {z1}
|
|
||||||
sta {c1},y
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuaa=pbuc2_derefidx_vbuyy
|
|
||||||
tax
|
|
||||||
lda {c2},y
|
|
||||||
sta {c1},x
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuyy
|
|
||||||
lda {c2},y
|
|
||||||
sta {c1},x
|
|
||||||
//FRAGMENT vbuxx=vbuxx_minus_vbuc1
|
|
||||||
txa
|
|
||||||
axs #{c1}
|
|
||||||
//FRAGMENT vbuyy=vbuyy_minus_vbuc1
|
|
||||||
tya
|
|
||||||
sec
|
|
||||||
sbc #{c1}
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuz2
|
|
||||||
ldy {z1}
|
|
||||||
lda {c1},y
|
|
||||||
ldy {z2}
|
|
||||||
clc
|
|
||||||
adc {c2},y
|
|
||||||
//FRAGMENT vbuxx=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuz2
|
|
||||||
ldx {z1}
|
|
||||||
lda {c1},x
|
|
||||||
ldx {z2}
|
|
||||||
clc
|
|
||||||
adc {c2},x
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuz2
|
|
||||||
ldy {z1}
|
|
||||||
lda {c1},y
|
|
||||||
ldy {z2}
|
|
||||||
clc
|
|
||||||
adc {c2},y
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2_plus_pbuc2_derefidx_vbuxx
|
|
||||||
lda {c2},x
|
|
||||||
ldy {z2}
|
|
||||||
clc
|
|
||||||
adc {c1},y
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuxx
|
|
||||||
lda {c2},x
|
|
||||||
ldy {z1}
|
|
||||||
clc
|
|
||||||
adc {c1},y
|
|
||||||
//FRAGMENT vbuxx=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuxx
|
|
||||||
lda {c2},x
|
|
||||||
ldx {z1}
|
|
||||||
clc
|
|
||||||
adc {c1},x
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuxx
|
|
||||||
lda {c2},x
|
|
||||||
ldy {z1}
|
|
||||||
clc
|
|
||||||
adc {c1},y
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2_plus_pbuc2_derefidx_vbuyy
|
|
||||||
lda {c2},y
|
|
||||||
ldy {z2}
|
|
||||||
clc
|
|
||||||
adc {c1},y
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuyy
|
|
||||||
lda {c2},y
|
|
||||||
ldy {z1}
|
|
||||||
clc
|
|
||||||
adc {c1},y
|
|
||||||
//FRAGMENT vbuxx=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuyy
|
|
||||||
lda {c2},y
|
|
||||||
ldx {z1}
|
|
||||||
clc
|
|
||||||
adc {c1},x
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuyy
|
|
||||||
lda {c2},y
|
|
||||||
ldy {z1}
|
|
||||||
clc
|
|
||||||
adc {c1},y
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuz1=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuz2
|
|
||||||
lda {c1},x
|
|
||||||
ldy {z2}
|
|
||||||
clc
|
|
||||||
adc {c2},y
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuaa=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuz1
|
|
||||||
lda {c1},x
|
|
||||||
ldy {z1}
|
|
||||||
clc
|
|
||||||
adc {c2},y
|
|
||||||
//FRAGMENT vbuxx=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuz1
|
|
||||||
lda {c1},x
|
|
||||||
ldx {z1}
|
|
||||||
clc
|
|
||||||
adc {c2},x
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuz1
|
|
||||||
lda {c1},x
|
|
||||||
ldy {z1}
|
|
||||||
clc
|
|
||||||
adc {c2},y
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuz1=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuxx
|
|
||||||
lda {c1},x
|
|
||||||
clc
|
|
||||||
adc {c2},x
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuaa=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuxx
|
|
||||||
lda {c1},x
|
|
||||||
clc
|
|
||||||
adc {c2},x
|
|
||||||
//FRAGMENT vbuxx=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuxx
|
|
||||||
lda {c1},x
|
|
||||||
clc
|
|
||||||
adc {c2},x
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuxx
|
|
||||||
lda {c1},x
|
|
||||||
clc
|
|
||||||
adc {c2},x
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuz1=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuyy
|
|
||||||
lda {c1},x
|
|
||||||
clc
|
|
||||||
adc {c2},y
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuaa=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuyy
|
|
||||||
lda {c1},x
|
|
||||||
clc
|
|
||||||
adc {c2},y
|
|
||||||
//FRAGMENT vbuxx=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuyy
|
|
||||||
lda {c1},x
|
|
||||||
clc
|
|
||||||
adc {c2},y
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuyy
|
|
||||||
lda {c1},x
|
|
||||||
clc
|
|
||||||
adc {c2},y
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuz1=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuz2
|
|
||||||
lda {c1},y
|
|
||||||
ldy {z2}
|
|
||||||
clc
|
|
||||||
adc {c2},y
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuaa=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuz1
|
|
||||||
lda {c1},y
|
|
||||||
ldy {z1}
|
|
||||||
clc
|
|
||||||
adc {c2},y
|
|
||||||
//FRAGMENT vbuxx=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuz1
|
|
||||||
lda {c1},y
|
|
||||||
ldx {z1}
|
|
||||||
clc
|
|
||||||
adc {c2},x
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuz1
|
|
||||||
lda {c1},y
|
|
||||||
ldy {z1}
|
|
||||||
clc
|
|
||||||
adc {c2},y
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuz1=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuxx
|
|
||||||
lda {c1},y
|
|
||||||
clc
|
|
||||||
adc {c2},x
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuaa=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuxx
|
|
||||||
lda {c1},y
|
|
||||||
clc
|
|
||||||
adc {c2},x
|
|
||||||
//FRAGMENT vbuxx=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuxx
|
|
||||||
lda {c1},y
|
|
||||||
clc
|
|
||||||
adc {c2},x
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuxx
|
|
||||||
lda {c1},y
|
|
||||||
clc
|
|
||||||
adc {c2},x
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuz1=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuyy
|
|
||||||
lda {c1},y
|
|
||||||
clc
|
|
||||||
adc {c2},y
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuaa=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuyy
|
|
||||||
lda {c1},y
|
|
||||||
clc
|
|
||||||
adc {c2},y
|
|
||||||
//FRAGMENT vbuxx=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuyy
|
|
||||||
lda {c1},y
|
|
||||||
clc
|
|
||||||
adc {c2},y
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuyy
|
|
||||||
lda {c1},y
|
|
||||||
clc
|
|
||||||
adc {c2},y
|
|
||||||
tay
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuz1=vbuaa
|
|
||||||
ldy {z1}
|
|
||||||
sta {c1},y
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuz1=vbuxx
|
|
||||||
ldy {z1}
|
|
||||||
txa
|
|
||||||
sta {c1},y
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuz1=vbuyy
|
|
||||||
tya
|
|
||||||
ldy {z1}
|
|
||||||
sta {c1},y
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuxx=vbuz1
|
|
||||||
lda {z1}
|
|
||||||
sta {c1},x
|
|
||||||
//FRAGMENT vbuxx_lt_vbuc1_then_la1
|
|
||||||
cpx #{c1}
|
|
||||||
bcc {la1}
|
|
||||||
//FRAGMENT vbuxx_ge_vbuc1_then_la1
|
|
||||||
cpx #{c1}
|
|
||||||
bcs {la1}
|
|
||||||
//FRAGMENT vbuxx=vbuxx_plus_vbuc1
|
|
||||||
txa
|
|
||||||
axs #-[{c1}]
|
|
||||||
//FRAGMENT vbuyy=vbuyy_plus_vbuc1
|
|
||||||
tya
|
|
||||||
clc
|
|
||||||
adc #{c1}
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuaa=_deref_pbuc1_band_vbuc2
|
|
||||||
lda #{c2}
|
|
||||||
and {c1}
|
|
||||||
//FRAGMENT vbuxx=_deref_pbuc1_band_vbuc2
|
|
||||||
lda #{c2}
|
|
||||||
and {c1}
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=_deref_pbuc1_band_vbuc2
|
|
||||||
lda #{c2}
|
|
||||||
and {c1}
|
|
||||||
tay
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuaa=vbuc2
|
|
||||||
tay
|
|
||||||
lda #{c2}
|
|
||||||
sta {c1},y
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuxx=vbuc2
|
|
||||||
lda #{c2}
|
|
||||||
sta {c1},x
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuyy=vbuc2
|
|
||||||
lda #{c2}
|
|
||||||
sta {c1},y
|
|
||||||
//FRAGMENT 0_neq_vbuxx_then_la1
|
|
||||||
cpx #0
|
|
||||||
bne {la1}
|
|
||||||
//FRAGMENT vbuz1=vbuaa_rol_1
|
|
||||||
asl
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuz1=vbuxx_rol_1
|
|
||||||
txa
|
|
||||||
asl
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuz1=vbuyy_rol_1
|
|
||||||
tya
|
|
||||||
asl
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuaa=vbuz1_rol_1
|
|
||||||
lda {z1}
|
|
||||||
asl
|
|
||||||
//FRAGMENT vbuaa=vbuaa_rol_1
|
|
||||||
asl
|
|
||||||
//FRAGMENT vbuaa=vbuxx_rol_1
|
|
||||||
txa
|
|
||||||
asl
|
|
||||||
//FRAGMENT vbuaa=vbuyy_rol_1
|
|
||||||
tya
|
|
||||||
asl
|
|
||||||
//FRAGMENT vbuxx=vbuz1_rol_1
|
|
||||||
lda {z1}
|
|
||||||
asl
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuxx=vbuaa_rol_1
|
|
||||||
asl
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuxx=vbuxx_rol_1
|
|
||||||
txa
|
|
||||||
asl
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuxx=vbuyy_rol_1
|
|
||||||
tya
|
|
||||||
asl
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=vbuz1_rol_1
|
|
||||||
lda {z1}
|
|
||||||
asl
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuyy=vbuaa_rol_1
|
|
||||||
asl
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuyy=vbuxx_rol_1
|
|
||||||
txa
|
|
||||||
asl
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuyy=vbuyy_rol_1
|
|
||||||
tya
|
|
||||||
asl
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuz1=vbuxx_bor_vbuz2
|
|
||||||
txa
|
|
||||||
ora {z2}
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuz1=vbuyy_bor_vbuz2
|
|
||||||
tya
|
|
||||||
ora {z2}
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuz1=vbuz2_bor_vbuaa
|
|
||||||
ora {z2}
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuz1=vbuxx_bor_vbuaa
|
|
||||||
stx $ff
|
|
||||||
ora $ff
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuz1=vbuyy_bor_vbuaa
|
|
||||||
sty $ff
|
|
||||||
ora $ff
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuz1=vbuz2_bor_vbuxx
|
|
||||||
txa
|
|
||||||
ora {z2}
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuz1=vbuxx_bor_vbuxx
|
|
||||||
stx {z1}
|
|
||||||
//FRAGMENT vbuaa=_deref_pbuz1
|
|
||||||
ldy #0
|
|
||||||
lda ({z1}),y
|
|
||||||
//FRAGMENT vbuxx=_deref_pbuz1
|
|
||||||
ldy #0
|
|
||||||
lda ({z1}),y
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=_deref_pbuz1
|
|
||||||
ldy #0
|
|
||||||
lda ({z1}),y
|
|
||||||
tay
|
|
||||||
//FRAGMENT _deref_pbuc1=vbuaa
|
|
||||||
sta {c1}
|
|
||||||
//FRAGMENT vbuaa=_byte1_pvoz1
|
|
||||||
lda {z1}+1
|
|
||||||
//FRAGMENT vbuxx=_byte1_pvoz1
|
|
||||||
ldx {z1}+1
|
|
||||||
//FRAGMENT vbuaa=_byte0_pvoz1
|
|
||||||
lda {z1}
|
|
||||||
//FRAGMENT vbuxx=_byte0_pvoz1
|
|
||||||
ldx {z1}
|
|
||||||
//FRAGMENT _deref_pbuc1=vbuxx
|
|
||||||
stx {c1}
|
|
||||||
//FRAGMENT _deref_pbuc1=vbuyy
|
|
||||||
sty {c1}
|
|
||||||
//FRAGMENT vbuyy=_byte1_pvoz1
|
|
||||||
ldy {z1}+1
|
|
||||||
//FRAGMENT vbuyy=_byte0_pvoz1
|
|
||||||
ldy {z1}
|
|
||||||
//FRAGMENT vbuyy_lt_vbuc1_then_la1
|
|
||||||
cpy #{c1}
|
|
||||||
bcc {la1}
|
|
||||||
//FRAGMENT 0_neq_vbuyy_then_la1
|
|
||||||
cpy #0
|
|
||||||
bne {la1}
|
|
||||||
//FRAGMENT 0_eq_vbuxx_then_la1
|
|
||||||
cpx #0
|
|
||||||
beq {la1}
|
|
||||||
//FRAGMENT 0_eq_vbuyy_then_la1
|
|
||||||
cpy #0
|
|
||||||
beq {la1}
|
|
||||||
//FRAGMENT vbuz1=vbuz2_bor_vbuyy
|
|
||||||
tya
|
|
||||||
ora {z2}
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuaa=vbuc1
|
|
||||||
lda #{c1}
|
|
||||||
//FRAGMENT vbuaa=vbuz1_bor_vbuz2
|
|
||||||
lda {z1}
|
|
||||||
ora {z2}
|
|
||||||
//FRAGMENT vbuaa=vbuz1_bor_vbuaa
|
|
||||||
ora {z1}
|
|
||||||
//FRAGMENT vbuaa=vbuz1_bor_vbuxx
|
|
||||||
txa
|
|
||||||
ora {z1}
|
|
||||||
//FRAGMENT vbuaa=vbuz1_bor_vbuyy
|
|
||||||
tya
|
|
||||||
ora {z1}
|
|
||||||
//FRAGMENT vbuz1=vbuxx
|
|
||||||
stx {z1}
|
|
||||||
//FRAGMENT vbuxx=vbuz1_bor_vbuz2
|
|
||||||
lda {z1}
|
|
||||||
ora {z2}
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuxx=vbuz1_bor_vbuaa
|
|
||||||
ora {z1}
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuxx=vbuz1_bor_vbuxx
|
|
||||||
txa
|
|
||||||
ora {z1}
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuxx=vbuz1_bor_vbuyy
|
|
||||||
tya
|
|
||||||
ora {z1}
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuz1=vbuyy
|
|
||||||
sty {z1}
|
|
||||||
//FRAGMENT vbuyy=vbuz1_bor_vbuz2
|
|
||||||
lda {z1}
|
|
||||||
ora {z2}
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuyy=vbuz1_bor_vbuaa
|
|
||||||
ora {z1}
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuyy=vbuz1_bor_vbuxx
|
|
||||||
txa
|
|
||||||
ora {z1}
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuyy=vbuz1_bor_vbuyy
|
|
||||||
tya
|
|
||||||
ora {z1}
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuz1=vbuxx_bor_vbuyy
|
|
||||||
txa
|
|
||||||
sty $ff
|
|
||||||
ora $ff
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuaa=vbuxx_bor_vbuz1
|
|
||||||
txa
|
|
||||||
ora {z1}
|
|
||||||
//FRAGMENT vbuaa=vbuxx_bor_vbuaa
|
|
||||||
stx $ff
|
|
||||||
ora $ff
|
|
||||||
//FRAGMENT vbuaa=vbuxx_bor_vbuyy
|
|
||||||
txa
|
|
||||||
sty $ff
|
|
||||||
ora $ff
|
|
||||||
//FRAGMENT vbuxx=vbuxx_bor_vbuz1
|
|
||||||
txa
|
|
||||||
ora {z1}
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuxx=vbuxx_bor_vbuaa
|
|
||||||
stx $ff
|
|
||||||
ora $ff
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuxx=vbuxx_bor_vbuyy
|
|
||||||
txa
|
|
||||||
sty $ff
|
|
||||||
ora $ff
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=vbuxx_bor_vbuz1
|
|
||||||
txa
|
|
||||||
ora {z1}
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuyy=vbuxx_bor_vbuaa
|
|
||||||
stx $ff
|
|
||||||
ora $ff
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuyy=vbuxx_bor_vbuyy
|
|
||||||
txa
|
|
||||||
sty $ff
|
|
||||||
ora $ff
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuyy=vbuz1
|
|
||||||
ldy {z1}
|
|
||||||
//FRAGMENT vbuyy_ge_vbuc1_then_la1
|
|
||||||
cpy #{c1}
|
|
||||||
bcs {la1}
|
|
||||||
//FRAGMENT vbuaa=vbuyy_bor_vbuaa
|
|
||||||
sty $ff
|
|
||||||
ora $ff
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuxx=vbuaa
|
|
||||||
sta {c1},x
|
|
||||||
//FRAGMENT pbuc1_derefidx_vbuyy=vbuaa
|
|
||||||
sta {c1},y
|
|
||||||
//FRAGMENT vbuxx=vbuz1_plus_1
|
|
||||||
ldx {z1}
|
|
||||||
inx
|
|
||||||
//FRAGMENT vbuyy=vbuz1_plus_1
|
|
||||||
ldy {z1}
|
|
||||||
iny
|
|
||||||
//FRAGMENT vbuxx=vbuaa
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=vbuaa
|
|
||||||
tay
|
|
246
src/main/fragment/cache/fragment-cache-wdc65c02.asm
vendored
246
src/main/fragment/cache/fragment-cache-wdc65c02.asm
vendored
|
@ -1,246 +0,0 @@
|
||||||
//KICKC FRAGMENT CACHE 1472899f88 147289c4f1
|
|
||||||
//FRAGMENT vbuz1=_deref_pbuc1
|
|
||||||
lda {c1}
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuz1=vbuz2_plus_1
|
|
||||||
lda {z2}
|
|
||||||
inc
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT _deref_pbuc1=vbuz1
|
|
||||||
lda {z1}
|
|
||||||
sta {c1}
|
|
||||||
//FRAGMENT vbuaa=_deref_pbuc1
|
|
||||||
lda {c1}
|
|
||||||
//FRAGMENT vbuxx=_deref_pbuc1
|
|
||||||
ldx {c1}
|
|
||||||
//FRAGMENT vbuz1=vbuaa_plus_1
|
|
||||||
inc
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuz1=vbuxx_plus_1
|
|
||||||
inx
|
|
||||||
stx {z1}
|
|
||||||
//FRAGMENT _deref_pbuc1=vbuaa
|
|
||||||
sta {c1}
|
|
||||||
//FRAGMENT vbuyy=_deref_pbuc1
|
|
||||||
ldy {c1}
|
|
||||||
//FRAGMENT vbuz1=vbuyy_plus_1
|
|
||||||
iny
|
|
||||||
sty {z1}
|
|
||||||
//FRAGMENT vbuaa=vbuz1_plus_1
|
|
||||||
lda {z1}
|
|
||||||
inc
|
|
||||||
//FRAGMENT vbuaa=vbuaa_plus_1
|
|
||||||
inc
|
|
||||||
//FRAGMENT vbuaa=vbuxx_plus_1
|
|
||||||
txa
|
|
||||||
inc
|
|
||||||
//FRAGMENT vbuaa=vbuyy_plus_1
|
|
||||||
tya
|
|
||||||
inc
|
|
||||||
//FRAGMENT vbuxx=vbuz1_plus_1
|
|
||||||
ldx {z1}
|
|
||||||
inx
|
|
||||||
//FRAGMENT _deref_pbuc1=vbuxx
|
|
||||||
stx {c1}
|
|
||||||
//FRAGMENT vbuxx=vbuaa_plus_1
|
|
||||||
tax
|
|
||||||
inx
|
|
||||||
//FRAGMENT vbuxx=vbuxx_plus_1
|
|
||||||
inx
|
|
||||||
//FRAGMENT vbuxx=vbuyy_plus_1
|
|
||||||
tya
|
|
||||||
inc
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=vbuz1_plus_1
|
|
||||||
ldy {z1}
|
|
||||||
iny
|
|
||||||
//FRAGMENT _deref_pbuc1=vbuyy
|
|
||||||
sty {c1}
|
|
||||||
//FRAGMENT vbuyy=vbuaa_plus_1
|
|
||||||
tay
|
|
||||||
iny
|
|
||||||
//FRAGMENT vbuyy=vbuxx_plus_1
|
|
||||||
txa
|
|
||||||
inc
|
|
||||||
tay
|
|
||||||
//FRAGMENT vbuyy=vbuyy_plus_1
|
|
||||||
iny
|
|
||||||
//FRAGMENT vbuz1=vbuc1
|
|
||||||
lda #{c1}
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT isr_rom_min_cx16_entry
|
|
||||||
|
|
||||||
//FRAGMENT _deref_pbuc1=_deref_pbuc1_bor_vbuc2
|
|
||||||
lda #{c2}
|
|
||||||
ora {c1}
|
|
||||||
sta {c1}
|
|
||||||
//FRAGMENT _deref_pbuc1=_deref_pbuc1_band_vbuc2
|
|
||||||
lda #{c2}
|
|
||||||
and {c1}
|
|
||||||
sta {c1}
|
|
||||||
//FRAGMENT vbuz1_neq_vbuc1_then_la1
|
|
||||||
lda #{c1}
|
|
||||||
cmp {z1}
|
|
||||||
bne {la1}
|
|
||||||
//FRAGMENT vbuz1=_dec_vbuz1
|
|
||||||
dec {z1}
|
|
||||||
//FRAGMENT vbuz1_neq_0_then_la1
|
|
||||||
lda {z1}
|
|
||||||
bne {la1}
|
|
||||||
//FRAGMENT vbuz1_ge_vbuc1_then_la1
|
|
||||||
lda {z1}
|
|
||||||
cmp #{c1}
|
|
||||||
bcs {la1}
|
|
||||||
//FRAGMENT vbuz1=_inc_vbuz1
|
|
||||||
inc {z1}
|
|
||||||
//FRAGMENT vbuz1=vbuz2
|
|
||||||
lda {z2}
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT vbuz1_lt_vbuc1_then_la1
|
|
||||||
lda {z1}
|
|
||||||
cmp #{c1}
|
|
||||||
bcc {la1}
|
|
||||||
//FRAGMENT _deref_pbuc1=vbuc2
|
|
||||||
lda #{c2}
|
|
||||||
sta {c1}
|
|
||||||
//FRAGMENT isr_rom_min_cx16_exit
|
|
||||||
jmp $e049
|
|
||||||
//FRAGMENT pbuz1=pbuc1_plus_pbuc2_derefidx_vbuz2
|
|
||||||
ldy {z2}
|
|
||||||
lda {c2},y
|
|
||||||
clc
|
|
||||||
adc #<{c1}
|
|
||||||
sta {z1}
|
|
||||||
lda #>{c1}
|
|
||||||
adc #0
|
|
||||||
sta {z1}+1
|
|
||||||
//FRAGMENT vbuz1=vbuz1_plus_vbuc1
|
|
||||||
lda #{c1}
|
|
||||||
clc
|
|
||||||
adc {z1}
|
|
||||||
sta {z1}
|
|
||||||
//FRAGMENT pbuz1_derefidx_vbuz2=pbuc1_derefidx_vbuz2
|
|
||||||
ldy {z2}
|
|
||||||
lda {c1},y
|
|
||||||
sta ({z1}),y
|
|
||||||
//FRAGMENT _deref_pbuc1=pbuc2_derefidx_vbuz1
|
|
||||||
ldy {z1}
|
|
||||||
lda {c2},y
|
|
||||||
sta {c1}
|
|
||||||
//FRAGMENT _deref_qprc1=pprc2
|
|
||||||
lda #<{c2}
|
|
||||||
sta {c1}
|
|
||||||
lda #>{c2}
|
|
||||||
sta {c1}+1
|
|
||||||
//FRAGMENT pbuz1=pbuc1
|
|
||||||
lda #<{c1}
|
|
||||||
sta {z1}
|
|
||||||
lda #>{c1}
|
|
||||||
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=vbuc1
|
|
||||||
lda #{c1}
|
|
||||||
ldy #0
|
|
||||||
sta ({z1}),y
|
|
||||||
//FRAGMENT pbuz1=_inc_pbuz1
|
|
||||||
inc {z1}
|
|
||||||
bne !+
|
|
||||||
inc {z1}+1
|
|
||||||
!:
|
|
||||||
//FRAGMENT vbuaa_neq_vbuc1_then_la1
|
|
||||||
cmp #{c1}
|
|
||||||
bne {la1}
|
|
||||||
//FRAGMENT vbuaa=vbuz1
|
|
||||||
lda {z1}
|
|
||||||
//FRAGMENT vbuxx=vbuz1
|
|
||||||
ldx {z1}
|
|
||||||
//FRAGMENT vbuaa_lt_vbuc1_then_la1
|
|
||||||
cmp #{c1}
|
|
||||||
bcc {la1}
|
|
||||||
//FRAGMENT pbuz1=pbuc1_plus_pbuc2_derefidx_vbuaa
|
|
||||||
tay
|
|
||||||
lda {c2},y
|
|
||||||
clc
|
|
||||||
adc #<{c1}
|
|
||||||
sta {z1}
|
|
||||||
lda #>{c1}
|
|
||||||
adc #0
|
|
||||||
sta {z1}+1
|
|
||||||
//FRAGMENT pbuz1=pbuc1_plus_pbuc2_derefidx_vbuxx
|
|
||||||
lda {c2},x
|
|
||||||
clc
|
|
||||||
adc #<{c1}
|
|
||||||
sta {z1}
|
|
||||||
lda #>{c1}
|
|
||||||
adc #0
|
|
||||||
sta {z1}+1
|
|
||||||
//FRAGMENT pbuz1=pbuc1_plus_pbuc2_derefidx_vbuyy
|
|
||||||
lda {c2},y
|
|
||||||
clc
|
|
||||||
adc #<{c1}
|
|
||||||
sta {z1}
|
|
||||||
lda #>{c1}
|
|
||||||
adc #0
|
|
||||||
sta {z1}+1
|
|
||||||
//FRAGMENT vbuxx=vbuxx_plus_vbuc1
|
|
||||||
txa
|
|
||||||
clc
|
|
||||||
adc #{c1}
|
|
||||||
tax
|
|
||||||
//FRAGMENT vbuyy=vbuyy_plus_vbuc1
|
|
||||||
tya
|
|
||||||
clc
|
|
||||||
adc #{c1}
|
|
||||||
tay
|
|
||||||
//FRAGMENT pbuz1_derefidx_vbuaa=pbuc1_derefidx_vbuaa
|
|
||||||
tay
|
|
||||||
lda {c1},y
|
|
||||||
sta ({z1}),y
|
|
||||||
//FRAGMENT pbuz1_derefidx_vbuxx=pbuc1_derefidx_vbuxx
|
|
||||||
txa
|
|
||||||
tay
|
|
||||||
lda {c1},y
|
|
||||||
sta ({z1}),y
|
|
||||||
//FRAGMENT pbuz1_derefidx_vbuyy=pbuc1_derefidx_vbuyy
|
|
||||||
lda {c1},y
|
|
||||||
sta ({z1}),y
|
|
||||||
//FRAGMENT _deref_pbuc1=pbuc2_derefidx_vbuaa
|
|
||||||
tay
|
|
||||||
lda {c2},y
|
|
||||||
sta {c1}
|
|
||||||
//FRAGMENT _deref_pbuc1=pbuc2_derefidx_vbuxx
|
|
||||||
lda {c2},x
|
|
||||||
sta {c1}
|
|
||||||
//FRAGMENT _deref_pbuc1=pbuc2_derefidx_vbuyy
|
|
||||||
lda {c2},y
|
|
||||||
sta {c1}
|
|
||||||
//FRAGMENT vbuxx_neq_vbuc1_then_la1
|
|
||||||
cpx #{c1}
|
|
||||||
bne {la1}
|
|
||||||
//FRAGMENT vbuxx_lt_vbuc1_then_la1
|
|
||||||
cpx #{c1}
|
|
||||||
bcc {la1}
|
|
||||||
//FRAGMENT vbuxx=vbuc1
|
|
||||||
ldx #{c1}
|
|
||||||
//FRAGMENT vbuxx=_inc_vbuxx
|
|
||||||
inx
|
|
||||||
//FRAGMENT vbuyy=vbuc1
|
|
||||||
ldy #{c1}
|
|
||||||
//FRAGMENT vbuyy_lt_vbuc1_then_la1
|
|
||||||
cpy #{c1}
|
|
||||||
bcc {la1}
|
|
||||||
//FRAGMENT vbuyy=_inc_vbuyy
|
|
||||||
iny
|
|
||||||
//FRAGMENT vbuaa=vbuc1
|
|
||||||
lda #{c1}
|
|
||||||
//FRAGMENT vbuaa=_inc_vbuaa
|
|
||||||
inc
|
|
||||||
//FRAGMENT vbuyy_neq_vbuc1_then_la1
|
|
||||||
cpy #{c1}
|
|
||||||
bne {la1}
|
|
|
@ -1,6 +1,7 @@
|
||||||
package dk.camelot64.kickc;
|
package dk.camelot64.kickc;
|
||||||
|
|
||||||
import dk.camelot64.kickc.asm.AsmProgram;
|
import dk.camelot64.kickc.asm.AsmProgram;
|
||||||
|
import dk.camelot64.kickc.fragment.AsmFragmentTemplateCache;
|
||||||
import dk.camelot64.kickc.fragment.AsmFragmentTemplateUsages;
|
import dk.camelot64.kickc.fragment.AsmFragmentTemplateUsages;
|
||||||
import dk.camelot64.kickc.fragment.synthesis.AsmFragmentSynthesisResult;
|
import dk.camelot64.kickc.fragment.synthesis.AsmFragmentSynthesisResult;
|
||||||
import dk.camelot64.kickc.fragment.synthesis.AsmFragmentTemplateMasterSynthesizer;
|
import dk.camelot64.kickc.fragment.synthesis.AsmFragmentTemplateMasterSynthesizer;
|
||||||
|
@ -238,7 +239,8 @@ public class KickC implements Callable<Integer> {
|
||||||
TmpDirManager.init(program.getAsmFragmentBaseFolder());
|
TmpDirManager.init(program.getAsmFragmentBaseFolder());
|
||||||
|
|
||||||
// Initialize the master ASM fragment synthesizer
|
// Initialize the master ASM fragment synthesizer
|
||||||
program.initAsmFragmentMasterSynthesizer(!optimizeNoFragmentCache);
|
final Path asmFragmentCacheFolder = optimizeNoFragmentCache ? null : program.getAsmFragmentBaseFolder().resolve(AsmFragmentTemplateCache.CACHE_FOLDER_NAME);
|
||||||
|
program.initAsmFragmentMasterSynthesizer(asmFragmentCacheFolder);
|
||||||
|
|
||||||
Path currentPath = new File(".").toPath();
|
Path currentPath = new File(".").toPath();
|
||||||
|
|
||||||
|
|
|
@ -112,9 +112,8 @@ public class AsmFragmentTemplateCache {
|
||||||
* @param log The compile log
|
* @param log The compile log
|
||||||
* @return The map with all best fragments from the cache file. null if the cache file is not found.
|
* @return The map with all best fragments from the cache file. null if the cache file is not found.
|
||||||
*/
|
*/
|
||||||
public static AsmFragmentTemplateCache load(TargetCpu cpu, Path baseFragmentFolder, CompileLog log) {
|
public static AsmFragmentTemplateCache load(TargetCpu cpu, Path cacheFolder, Path baseFragmentFolder, CompileLog log) {
|
||||||
final AsmFragmentSystemHash fragmentSystemHash = AsmFragmentSystemHash.calculate(baseFragmentFolder, false);
|
final AsmFragmentSystemHash fragmentSystemHash = AsmFragmentSystemHash.calculate(baseFragmentFolder, false);
|
||||||
Path cacheFolder = baseFragmentFolder.resolve(CACHE_FOLDER_NAME);
|
|
||||||
final Date before = new Date();
|
final Date before = new Date();
|
||||||
if(!cacheFolder.toFile().exists()) {
|
if(!cacheFolder.toFile().exists()) {
|
||||||
if(log.isVerboseFragmentLog())
|
if(log.isVerboseFragmentLog())
|
||||||
|
@ -226,7 +225,7 @@ public class AsmFragmentTemplateCache {
|
||||||
fragmentFilePrint.close();
|
fragmentFilePrint.close();
|
||||||
final Date after = new Date();
|
final Date after = new Date();
|
||||||
final long millis = after.getTime() - before.getTime();
|
final long millis = after.getTime() - before.getTime();
|
||||||
//if(log.isVerboseFragmentLog())
|
if(log.isVerboseFragmentLog())
|
||||||
log.append("Saved cached fragments " + this.cache.size() + " to " + cacheFile.getPath() + " in " + millis + "ms");
|
log.append("Saved cached fragments " + this.cache.size() + " to " + cacheFile.getPath() + " in " + millis + "ms");
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
throw new RuntimeException("Error saving fragment cache file " + cacheFile, e);
|
throw new RuntimeException("Error saving fragment cache file " + cacheFile, e);
|
||||||
|
|
|
@ -12,6 +12,8 @@ import java.util.Map;
|
||||||
*/
|
*/
|
||||||
public class AsmFragmentTemplateMasterSynthesizer {
|
public class AsmFragmentTemplateMasterSynthesizer {
|
||||||
|
|
||||||
|
/** Fragment cache folder. Null if a memory cache is used. */
|
||||||
|
private final Path cacheFragmentFolder;
|
||||||
/** Fragment base folder. */
|
/** Fragment base folder. */
|
||||||
private final Path baseFragmentFolder;
|
private final Path baseFragmentFolder;
|
||||||
/** Use the fragment synthesis cache */
|
/** Use the fragment synthesis cache */
|
||||||
|
@ -23,9 +25,9 @@ public class AsmFragmentTemplateMasterSynthesizer {
|
||||||
private Map<TargetCpu, AsmFragmentTemplateSynthesizer> synthesizers;
|
private Map<TargetCpu, AsmFragmentTemplateSynthesizer> synthesizers;
|
||||||
|
|
||||||
/** Create master synthesizer. */
|
/** Create master synthesizer. */
|
||||||
public AsmFragmentTemplateMasterSynthesizer(Path baseFragmentFolder, boolean useFragmentCache, CompileLog log) {
|
public AsmFragmentTemplateMasterSynthesizer(Path cacheFragmentFolder, Path baseFragmentFolder, CompileLog log) {
|
||||||
|
this.cacheFragmentFolder = cacheFragmentFolder;
|
||||||
this.baseFragmentFolder = baseFragmentFolder;
|
this.baseFragmentFolder = baseFragmentFolder;
|
||||||
this.useFragmentCache = useFragmentCache;
|
|
||||||
this.log = log;
|
this.log = log;
|
||||||
this.synthesizers = new LinkedHashMap<>();
|
this.synthesizers = new LinkedHashMap<>();
|
||||||
}
|
}
|
||||||
|
@ -33,7 +35,7 @@ public class AsmFragmentTemplateMasterSynthesizer {
|
||||||
public AsmFragmentTemplateSynthesizer getSynthesizer(TargetCpu targetCpu) {
|
public AsmFragmentTemplateSynthesizer getSynthesizer(TargetCpu targetCpu) {
|
||||||
AsmFragmentTemplateSynthesizer synthesizer = synthesizers.get(targetCpu);
|
AsmFragmentTemplateSynthesizer synthesizer = synthesizers.get(targetCpu);
|
||||||
if(synthesizer==null) {
|
if(synthesizer==null) {
|
||||||
synthesizer = new AsmFragmentTemplateSynthesizer(targetCpu, baseFragmentFolder, useFragmentCache, log);
|
synthesizer = new AsmFragmentTemplateSynthesizer(targetCpu, cacheFragmentFolder, baseFragmentFolder, log);
|
||||||
synthesizers.put(targetCpu, synthesizer);
|
synthesizers.put(targetCpu, synthesizer);
|
||||||
}
|
}
|
||||||
return synthesizer;
|
return synthesizer;
|
||||||
|
|
|
@ -28,13 +28,13 @@ import java.util.stream.Collectors;
|
||||||
public class AsmFragmentTemplateSynthesizer {
|
public class AsmFragmentTemplateSynthesizer {
|
||||||
|
|
||||||
/** Create synthesizer. */
|
/** Create synthesizer. */
|
||||||
public AsmFragmentTemplateSynthesizer(TargetCpu targetCpu, Path baseFragmentFolder, boolean useFragmentCache, CompileLog log) {
|
public AsmFragmentTemplateSynthesizer(TargetCpu targetCpu, Path fragmentCacheFolder, Path baseFragmentFolder, CompileLog log) {
|
||||||
this.baseFragmentFolder = baseFragmentFolder;
|
this.baseFragmentFolder = baseFragmentFolder;
|
||||||
this.targetCpu = targetCpu;
|
this.targetCpu = targetCpu;
|
||||||
this.synthesisGraph = new LinkedHashMap<>();
|
this.synthesisGraph = new LinkedHashMap<>();
|
||||||
this.bestTemplateUpdate = new ArrayDeque<>();
|
this.bestTemplateUpdate = new ArrayDeque<>();
|
||||||
if (useFragmentCache)
|
if (fragmentCacheFolder!=null)
|
||||||
this.fragmentCache = AsmFragmentTemplateCache.load(targetCpu, baseFragmentFolder, log);
|
this.fragmentCache = AsmFragmentTemplateCache.load(targetCpu, fragmentCacheFolder, baseFragmentFolder, log);
|
||||||
else
|
else
|
||||||
this.fragmentCache = AsmFragmentTemplateCache.memoryCache(targetCpu);
|
this.fragmentCache = AsmFragmentTemplateCache.memoryCache(targetCpu);
|
||||||
}
|
}
|
||||||
|
|
|
@ -215,8 +215,8 @@ public class Program {
|
||||||
return asmFragmentMasterSynthesizer;
|
return asmFragmentMasterSynthesizer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initAsmFragmentMasterSynthesizer(boolean useFragmentCache) {
|
public void initAsmFragmentMasterSynthesizer(Path asmFragmentCacheFolder) {
|
||||||
this.asmFragmentMasterSynthesizer = new AsmFragmentTemplateMasterSynthesizer(asmFragmentBaseFolder, useFragmentCache, getLog());
|
this.asmFragmentMasterSynthesizer = new AsmFragmentTemplateMasterSynthesizer(asmFragmentCacheFolder, asmFragmentBaseFolder, getLog());
|
||||||
}
|
}
|
||||||
|
|
||||||
public TargetPlatform getTargetPlatform() {
|
public TargetPlatform getTargetPlatform() {
|
||||||
|
|
|
@ -31,7 +31,7 @@ abstract class ReferenceHelper {
|
||||||
boolean testOutput(
|
boolean testOutput(
|
||||||
String fileName,
|
String fileName,
|
||||||
String extension,
|
String extension,
|
||||||
String outputString) throws IOException {
|
String outputString) {
|
||||||
// Read reference file
|
// Read reference file
|
||||||
List<String> refLines;
|
List<String> refLines;
|
||||||
try {
|
try {
|
||||||
|
@ -84,14 +84,18 @@ abstract class ReferenceHelper {
|
||||||
return str.substring(st, len);
|
return str.substring(st, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<String> getOutLines(String outputString) throws IOException {
|
private List<String> getOutLines(String outputString) {
|
||||||
BufferedReader rdr = new BufferedReader(new StringReader(outputString));
|
try {
|
||||||
List<String> outLines = new ArrayList<>();
|
BufferedReader rdr = new BufferedReader(new StringReader(outputString));
|
||||||
for (String line = rdr.readLine(); line != null; line = rdr.readLine()) {
|
List<String> outLines = new ArrayList<>();
|
||||||
outLines.add(line);
|
for (String line = rdr.readLine(); line != null; line = rdr.readLine()) {
|
||||||
|
outLines.add(line);
|
||||||
|
}
|
||||||
|
rdr.close();
|
||||||
|
return outLines;
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException("Error getting lines.", e);
|
||||||
}
|
}
|
||||||
rdr.close();
|
|
||||||
return outLines;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<String> loadReferenceLines(String fileName, String extension) throws URISyntaxException, IOException {
|
private List<String> loadReferenceLines(String fileName, String extension) throws URISyntaxException, IOException {
|
||||||
|
@ -106,16 +110,20 @@ abstract class ReferenceHelper {
|
||||||
|
|
||||||
abstract URI loadReferenceFile(String fileName, String extension) throws IOException, URISyntaxException ;
|
abstract URI loadReferenceFile(String fileName, String extension) throws IOException, URISyntaxException ;
|
||||||
|
|
||||||
File writeOutputFile(String fileName, String extension, String outputString) throws IOException {
|
File writeOutputFile(String fileName, String extension, String outputString) {
|
||||||
// Write output file
|
try {
|
||||||
File file = getTmpFile(fileName, extension);
|
// Write output file
|
||||||
FileOutputStream outputStream = new FileOutputStream(file);
|
File file = getTmpFile(fileName, extension);
|
||||||
OutputStreamWriter writer = new OutputStreamWriter(outputStream);
|
FileOutputStream outputStream = new FileOutputStream(file);
|
||||||
writer.write(outputString);
|
OutputStreamWriter writer = new OutputStreamWriter(outputStream);
|
||||||
writer.close();
|
writer.write(outputString);
|
||||||
outputStream.close();
|
writer.close();
|
||||||
System.out.println("Output written to " + file.getAbsolutePath());
|
outputStream.close();
|
||||||
return file;
|
System.out.println("Output written to " + file.getAbsolutePath());
|
||||||
|
return file;
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException("Error writing output file "+fileName, e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
File getTmpFile(String fileName, String extension) {
|
File getTmpFile(String fileName, String extension) {
|
||||||
|
|
|
@ -24,7 +24,7 @@ public class TestFragments {
|
||||||
|
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
public static void setUp() {
|
public static void setUp() {
|
||||||
asmFragmentTemplateSynthesizer = new AsmFragmentTemplateSynthesizer(TargetCpu.MOS6502X, new File("src/main/fragment/").toPath(), false, new CompileLog());
|
asmFragmentTemplateSynthesizer = new AsmFragmentTemplateSynthesizer(TargetCpu.MOS6502X, null, new File("src/main/fragment/").toPath(), new CompileLog());
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterAll
|
@AfterAll
|
||||||
|
@ -193,7 +193,7 @@ public class TestFragments {
|
||||||
*/
|
*/
|
||||||
private void testFragmentExists(String signature) {
|
private void testFragmentExists(String signature) {
|
||||||
CompileLog log = new CompileLog();
|
CompileLog log = new CompileLog();
|
||||||
asmFragmentTemplateSynthesizer = new AsmFragmentTemplateSynthesizer(TargetCpu.MOS6502X, new File("src/main/fragment/").toPath(), false, new CompileLog());
|
asmFragmentTemplateSynthesizer = new AsmFragmentTemplateSynthesizer(TargetCpu.MOS6502X, null, new File("src/main/fragment/").toPath(), new CompileLog());
|
||||||
log.setSysOut(true);
|
log.setSysOut(true);
|
||||||
//log.setVerboseFragmentLog(true);
|
//log.setVerboseFragmentLog(true);
|
||||||
List<AsmFragmentSynthesisResult> templates =
|
List<AsmFragmentSynthesisResult> templates =
|
||||||
|
@ -211,7 +211,7 @@ public class TestFragments {
|
||||||
|
|
||||||
private void testFragments(String fileName, Collection<String> signatures) throws IOException {
|
private void testFragments(String fileName, Collection<String> signatures) throws IOException {
|
||||||
CompileLog log = new CompileLog();
|
CompileLog log = new CompileLog();
|
||||||
asmFragmentTemplateSynthesizer = new AsmFragmentTemplateSynthesizer(TargetCpu.MOS6502X, new File("src/main/fragment/").toPath(), false, new CompileLog());
|
asmFragmentTemplateSynthesizer = new AsmFragmentTemplateSynthesizer(TargetCpu.MOS6502X, null, new File("src/main/fragment/").toPath(), new CompileLog());
|
||||||
List<String> sigs = new ArrayList<>(signatures);
|
List<String> sigs = new ArrayList<>(signatures);
|
||||||
|
|
||||||
// Always test max 1000 signatures
|
// Always test max 1000 signatures
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package dk.camelot64.kickc.test;
|
package dk.camelot64.kickc.test;
|
||||||
|
|
||||||
import dk.camelot64.kickc.*;
|
|
||||||
import dk.camelot64.kickc.Compiler;
|
import dk.camelot64.kickc.Compiler;
|
||||||
|
import dk.camelot64.kickc.*;
|
||||||
import dk.camelot64.kickc.asm.AsmProgram;
|
import dk.camelot64.kickc.asm.AsmProgram;
|
||||||
import dk.camelot64.kickc.model.CompileError;
|
import dk.camelot64.kickc.model.CompileError;
|
||||||
import dk.camelot64.kickc.model.Program;
|
import dk.camelot64.kickc.model.Program;
|
||||||
|
@ -16,6 +16,7 @@ import java.io.*;
|
||||||
import java.lang.management.GarbageCollectorMXBean;
|
import java.lang.management.GarbageCollectorMXBean;
|
||||||
import java.lang.management.ManagementFactory;
|
import java.lang.management.ManagementFactory;
|
||||||
import java.lang.management.MemoryUsage;
|
import java.lang.management.MemoryUsage;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
import java.nio.file.*;
|
import java.nio.file.*;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -88,11 +89,11 @@ public class TestPrograms {
|
||||||
return log;
|
return log;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void assertError(String kcFile, String expectError) throws IOException {
|
protected void assertError(String kcFile, String expectError) {
|
||||||
assertError(kcFile, expectError, true);
|
assertError(kcFile, expectError, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void assertError(String kcFile, String expectError, boolean expectSource) throws IOException {
|
protected void assertError(String kcFile, String expectError, boolean expectSource) {
|
||||||
try {
|
try {
|
||||||
compileAndCompare(kcFile);
|
compileAndCompare(kcFile);
|
||||||
} catch(CompileError e) {
|
} catch(CompileError e) {
|
||||||
|
@ -114,27 +115,27 @@ public class TestPrograms {
|
||||||
fail("Expected compile error.");
|
fail("Expected compile error.");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void compileAndCompare(String filename) throws IOException {
|
protected void compileAndCompare(String filename) {
|
||||||
TestPrograms tester = new TestPrograms();
|
TestPrograms tester = new TestPrograms();
|
||||||
tester.testFile(filename, null, null);
|
tester.testFile(filename, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void compileAndCompare(String filename, CompileLog compileLog) throws IOException {
|
protected void compileAndCompare(String filename, CompileLog compileLog) {
|
||||||
TestPrograms tester = new TestPrograms();
|
TestPrograms tester = new TestPrograms();
|
||||||
tester.testFile(filename, null, compileLog);
|
tester.testFile(filename, null, compileLog);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void compileAndCompare(String filename, int upliftCombinations) throws IOException {
|
protected void compileAndCompare(String filename, int upliftCombinations) {
|
||||||
TestPrograms tester = new TestPrograms();
|
TestPrograms tester = new TestPrograms();
|
||||||
tester.testFile(filename, upliftCombinations, null);
|
tester.testFile(filename, upliftCombinations, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void compileAndCompare(String filename, int upliftCombinations, CompileLog log) throws IOException {
|
protected void compileAndCompare(String filename, int upliftCombinations, CompileLog log) {
|
||||||
TestPrograms tester = new TestPrograms();
|
TestPrograms tester = new TestPrograms();
|
||||||
tester.testFile(filename, upliftCombinations, log);
|
tester.testFile(filename, upliftCombinations, log);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void testFile(String fileName, Integer upliftCombinations, CompileLog compileLog) throws IOException {
|
private void testFile(String fileName, Integer upliftCombinations, CompileLog compileLog) {
|
||||||
System.out.println("Testing output for " + fileName);
|
System.out.println("Testing output for " + fileName);
|
||||||
Compiler compiler = new Compiler();
|
Compiler compiler = new Compiler();
|
||||||
//compiler.enableZeroPageCoalesce();
|
//compiler.enableZeroPageCoalesce();
|
||||||
|
@ -155,7 +156,14 @@ public class TestPrograms {
|
||||||
files.add(filePath);
|
files.add(filePath);
|
||||||
Program program = compiler.getProgram();
|
Program program = compiler.getProgram();
|
||||||
// Initialize the master ASM fragment synthesizer
|
// Initialize the master ASM fragment synthesizer
|
||||||
program.initAsmFragmentMasterSynthesizer(true);
|
final Path targetPath;
|
||||||
|
try {
|
||||||
|
targetPath = Paths.get(getClass().getResource("/").toURI()).getParent();
|
||||||
|
} catch (URISyntaxException e) {
|
||||||
|
throw new RuntimeException("Error resolving fragment cache folder.", e);
|
||||||
|
}
|
||||||
|
final Path cacheFolder = targetPath.resolve("fragment-cache");
|
||||||
|
program.initAsmFragmentMasterSynthesizer(cacheFolder);
|
||||||
final File platformFile = SourceLoader.loadFile(TargetPlatform.DEFAULT_NAME + "." + CTargetPlatformParser.FILE_EXTENSION, filePath, program.getTargetPlatformPaths());
|
final File platformFile = SourceLoader.loadFile(TargetPlatform.DEFAULT_NAME + "." + CTargetPlatformParser.FILE_EXTENSION, filePath, program.getTargetPlatformPaths());
|
||||||
final TargetPlatform targetPlatform = CTargetPlatformParser.parseTargetPlatformFile(TargetPlatform.DEFAULT_NAME, platformFile, filePath, program.getTargetPlatformPaths());
|
final TargetPlatform targetPlatform = CTargetPlatformParser.parseTargetPlatformFile(TargetPlatform.DEFAULT_NAME, platformFile, filePath, program.getTargetPlatformPaths());
|
||||||
program.setTargetPlatform(targetPlatform);
|
program.setTargetPlatform(targetPlatform);
|
||||||
|
@ -176,7 +184,11 @@ public class TestPrograms {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
compileAsm(fileName, program);
|
try {
|
||||||
|
compileAsm(fileName, program);
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException("Error compiling file "+fileName, e);
|
||||||
|
}
|
||||||
boolean success = true;
|
boolean success = true;
|
||||||
ReferenceHelper helper = new ReferenceHelperFolder(refPath);
|
ReferenceHelper helper = new ReferenceHelperFolder(refPath);
|
||||||
String baseFileName = FileNameUtils.removeExtension(fileName);
|
String baseFileName = FileNameUtils.removeExtension(fileName);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user