mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-02-21 22:29:07 +00:00
Updated two tests.
This commit is contained in:
parent
d6af9dd779
commit
929ecd9cc0
@ -1,4 +1,4 @@
|
||||
//KICKC FRAGMENT CACHE d183e4015 d183e6153
|
||||
//KICKC FRAGMENT CACHE e7a682bbf e7a684e4f
|
||||
//FRAGMENT vbuzz=vbuc1
|
||||
ldz #{c1}
|
||||
//FRAGMENT vbuzz_lt_vbuc1_then_la1
|
||||
|
@ -1,87 +1,4 @@
|
||||
//KICKC FRAGMENT CACHE d183e4015 d183e6153
|
||||
//FRAGMENT vbuz1=vbuc1
|
||||
ldz #{c1}
|
||||
stz {z1}
|
||||
//FRAGMENT 0_neq_pbuc1_derefidx_vbuz1_then_la1
|
||||
ldy {z1}
|
||||
lda {c1},y
|
||||
cmp #0
|
||||
bne {la1}
|
||||
//FRAGMENT pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1
|
||||
ldy {z1}
|
||||
lda {c2},y
|
||||
sta {c1},y
|
||||
//FRAGMENT pbuc1_derefidx_vbuz1=vbuz1
|
||||
ldy {z1}
|
||||
tya
|
||||
sta {c1},y
|
||||
//FRAGMENT vbuz1=_inc_vbuz1
|
||||
inc {z1}
|
||||
//FRAGMENT 0_neq_pbuc1_derefidx_vbuaa_then_la1
|
||||
tay
|
||||
lda {c1},y
|
||||
cmp #0
|
||||
bne {la1}
|
||||
//FRAGMENT 0_neq_pbuc1_derefidx_vbuxx_then_la1
|
||||
lda {c1},x
|
||||
cmp #0
|
||||
bne {la1}
|
||||
//FRAGMENT 0_neq_pbuc1_derefidx_vbuyy_then_la1
|
||||
lda {c1},y
|
||||
cmp #0
|
||||
bne {la1}
|
||||
//FRAGMENT 0_neq_pbuc1_derefidx_vbuzz_then_la1
|
||||
tza
|
||||
tay
|
||||
lda {c1},y
|
||||
cmp #0
|
||||
bne {la1}
|
||||
//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 pbuc1_derefidx_vbuzz=pbuc2_derefidx_vbuzz
|
||||
tza
|
||||
tay
|
||||
lda {c2},y
|
||||
sta {c1},y
|
||||
//FRAGMENT pbuc1_derefidx_vbuxx=vbuxx
|
||||
txa
|
||||
sta {c1},x
|
||||
//FRAGMENT pbuc1_derefidx_vbuyy=vbuyy
|
||||
tya
|
||||
sta {c1},y
|
||||
//FRAGMENT pbuc1_derefidx_vbuzz=vbuzz
|
||||
tza
|
||||
tax
|
||||
sta {c1},x
|
||||
//FRAGMENT vbuxx=vbuc1
|
||||
ldx #{c1}
|
||||
//FRAGMENT vbuxx=_inc_vbuxx
|
||||
inx
|
||||
//FRAGMENT vbuyy=vbuc1
|
||||
ldy #{c1}
|
||||
//FRAGMENT vbuyy=_inc_vbuyy
|
||||
iny
|
||||
//FRAGMENT vbuzz=vbuc1
|
||||
ldz #{c1}
|
||||
//FRAGMENT vbuzz=_inc_vbuzz
|
||||
inz
|
||||
//FRAGMENT vduz1=vduc1
|
||||
lda #<{c1}
|
||||
sta {z1}
|
||||
lda #>{c1}
|
||||
sta {z1}+1
|
||||
lda #<{c1}>>$10
|
||||
sta {z1}+2
|
||||
lda #>{c1}>>$10
|
||||
sta {z1}+3
|
||||
//FRAGMENT vduz1=vwuc1
|
||||
NO_SYNTHESIS
|
||||
//FRAGMENT vduz1=vwsc1
|
||||
NO_SYNTHESIS
|
||||
//KICKC FRAGMENT CACHE e7a682bbf e7a684e4f
|
||||
//FRAGMENT _deref_pbuc1=vbuc2
|
||||
ldz #{c2}
|
||||
stz {c1}
|
||||
@ -116,11 +33,16 @@ inw {z1}
|
||||
lda #{c1}
|
||||
ldy #0
|
||||
sta ({z1}),y
|
||||
//FRAGMENT vbuz1=vbuc1
|
||||
ldz #{c1}
|
||||
stz {z1}
|
||||
//FRAGMENT isr_hardware_all_entry
|
||||
pha @clob_a
|
||||
phx @clob_x
|
||||
phy @clob_y
|
||||
phz @clob_z
|
||||
//FRAGMENT vbuz1=_inc_vbuz1
|
||||
inc {z1}
|
||||
//FRAGMENT vbuz1=vbuz2
|
||||
lda {z2}
|
||||
sta {z1}
|
||||
@ -163,6 +85,10 @@ ply @clob_y
|
||||
plx @clob_x
|
||||
pla @clob_a
|
||||
rti
|
||||
//FRAGMENT pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1
|
||||
ldy {z1}
|
||||
lda {c2},y
|
||||
sta {c1},y
|
||||
//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2_band_vbuc2
|
||||
lda #{c2}
|
||||
ldy {z2}
|
||||
@ -387,6 +313,17 @@ sta {c1}
|
||||
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 pbuc1_derefidx_vbuzz=pbuc2_derefidx_vbuzz
|
||||
tza
|
||||
tay
|
||||
lda {c2},y
|
||||
sta {c1},y
|
||||
//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1_band_vbuc2
|
||||
lda #{c2}
|
||||
ldy {z1}
|
||||
@ -1121,10 +1058,16 @@ sbc #1
|
||||
inc
|
||||
//FRAGMENT vbuxx=_dec_vbuxx
|
||||
dex
|
||||
//FRAGMENT vbuxx=_inc_vbuxx
|
||||
inx
|
||||
//FRAGMENT vbuyy=_dec_vbuyy
|
||||
dey
|
||||
//FRAGMENT vbuyy=_inc_vbuyy
|
||||
iny
|
||||
//FRAGMENT vbuzz=_dec_vbuzz
|
||||
dez
|
||||
//FRAGMENT vbuzz=_inc_vbuzz
|
||||
inz
|
||||
//FRAGMENT pbuc1_derefidx_vbuxx=vbuaa
|
||||
sta {c1},x
|
||||
//FRAGMENT pbuc1_derefidx_vbuxx=vbuyy
|
||||
@ -1159,9 +1102,15 @@ tya
|
||||
sta {c1},x
|
||||
//FRAGMENT vbuaa=vbuc1
|
||||
lda #{c1}
|
||||
//FRAGMENT vbuxx=vbuc1
|
||||
ldx #{c1}
|
||||
//FRAGMENT vbuyy=vbuc1
|
||||
ldy #{c1}
|
||||
//FRAGMENT vbuyy_lt_vbuc1_then_la1
|
||||
cpy #{c1}
|
||||
bcc {la1}
|
||||
//FRAGMENT vbuzz=vbuc1
|
||||
ldz #{c1}
|
||||
//FRAGMENT vbuzz_lt_vbuc1_then_la1
|
||||
cpz #{c1}
|
||||
bcc {la1}
|
||||
@ -1807,6 +1756,15 @@ beq {la1}
|
||||
//FRAGMENT _deref_pbuc1_eq_vbuzz_then_la1
|
||||
cpz {c1}
|
||||
beq {la1}
|
||||
//FRAGMENT vduz1=vduc1
|
||||
lda #<{c1}
|
||||
sta {z1}
|
||||
lda #>{c1}
|
||||
sta {z1}+1
|
||||
lda #<{c1}>>$10
|
||||
sta {z1}+2
|
||||
lda #>{c1}>>$10
|
||||
sta {z1}+3
|
||||
//FRAGMENT vduz1=vbuc1
|
||||
lda #{c1}
|
||||
sta {z1}
|
||||
@ -2455,6 +2413,44 @@ tax
|
||||
tay
|
||||
//FRAGMENT vbuzz=vbuaa
|
||||
taz
|
||||
//FRAGMENT 0_neq_pbuc1_derefidx_vbuz1_then_la1
|
||||
ldy {z1}
|
||||
lda {c1},y
|
||||
cmp #0
|
||||
bne {la1}
|
||||
//FRAGMENT pbuc1_derefidx_vbuz1=vbuz1
|
||||
ldy {z1}
|
||||
tya
|
||||
sta {c1},y
|
||||
//FRAGMENT 0_neq_pbuc1_derefidx_vbuaa_then_la1
|
||||
tay
|
||||
lda {c1},y
|
||||
cmp #0
|
||||
bne {la1}
|
||||
//FRAGMENT 0_neq_pbuc1_derefidx_vbuxx_then_la1
|
||||
lda {c1},x
|
||||
cmp #0
|
||||
bne {la1}
|
||||
//FRAGMENT 0_neq_pbuc1_derefidx_vbuyy_then_la1
|
||||
lda {c1},y
|
||||
cmp #0
|
||||
bne {la1}
|
||||
//FRAGMENT 0_neq_pbuc1_derefidx_vbuzz_then_la1
|
||||
tza
|
||||
tay
|
||||
lda {c1},y
|
||||
cmp #0
|
||||
bne {la1}
|
||||
//FRAGMENT pbuc1_derefidx_vbuxx=vbuxx
|
||||
txa
|
||||
sta {c1},x
|
||||
//FRAGMENT pbuc1_derefidx_vbuyy=vbuyy
|
||||
tya
|
||||
sta {c1},y
|
||||
//FRAGMENT pbuc1_derefidx_vbuzz=vbuzz
|
||||
tza
|
||||
tax
|
||||
sta {c1},x
|
||||
//FRAGMENT _deref_pduc1=vduz1
|
||||
ldq {z1}
|
||||
stq {c1}
|
||||
@ -2477,3 +2473,7 @@ sta {z1}+2
|
||||
lda {z1}+3
|
||||
adc #0
|
||||
sta {z1}+3
|
||||
//FRAGMENT vduz1=vwuc1
|
||||
NO_SYNTHESIS
|
||||
//FRAGMENT vduz1=vwsc1
|
||||
NO_SYNTHESIS
|
||||
|
@ -1,4 +1,4 @@
|
||||
//KICKC FRAGMENT CACHE d183e4015 d183e6153
|
||||
//KICKC FRAGMENT CACHE e7a682bbf e7a684e4f
|
||||
//FRAGMENT vbuz1=vbuc1
|
||||
lda #{c1}
|
||||
sta {z1}
|
||||
|
@ -1,4 +1,4 @@
|
||||
//KICKC FRAGMENT CACHE d183e4015 d183e6153
|
||||
//KICKC FRAGMENT CACHE e7a682bbf e7a684e4f
|
||||
//FRAGMENT vbuz1=vbuc1
|
||||
lda #{c1}
|
||||
sta {z1}
|
||||
|
@ -1,4 +1,4 @@
|
||||
//KICKC FRAGMENT CACHE d183e4015 d183e6153
|
||||
//KICKC FRAGMENT CACHE e7a682bbf e7a684e4f
|
||||
//FRAGMENT _deref_pbuc1=_inc__deref_pbuc1
|
||||
inc {c1}
|
||||
//FRAGMENT isr_hardware_all_entry
|
||||
|
@ -1,4 +1,4 @@
|
||||
//KICKC FRAGMENT CACHE d183e4015 d183e6153
|
||||
//KICKC FRAGMENT CACHE e7a682bbf e7a684e4f
|
||||
//FRAGMENT vbuz1=_deref_pbuc1
|
||||
lda {c1}
|
||||
sta {z1}
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Illustrates how inline assembler use internal labels and external references
|
||||
|
||||
byte* const SCREEN = (char*)$400;
|
||||
byte table[] = "cml!"z;
|
||||
char* const SCREEN = (char*)0x400;
|
||||
char table[] = "cml!";
|
||||
void main() {
|
||||
asm {
|
||||
ldx #0
|
||||
@ -13,4 +13,5 @@ void main() {
|
||||
bne nxt
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,8 @@
|
||||
// Illustrates how inline kickassembler can reference data from the outside program
|
||||
|
||||
byte table[] = "cml!"z;
|
||||
|
||||
char table[] = "cml!";
|
||||
void main() {
|
||||
byte* const SCREEN = (char*)$400;
|
||||
|
||||
char* const SCREEN = (char*)0x400;
|
||||
kickasm(uses SCREEN, uses table) {{
|
||||
ldx #0
|
||||
!:
|
||||
@ -14,5 +12,7 @@ void main() {
|
||||
cpx #4
|
||||
bne !-
|
||||
}}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -23,3 +23,4 @@ main: {
|
||||
}
|
||||
.segment Data
|
||||
table: .text "cml!"
|
||||
.byte 0
|
||||
|
@ -23,7 +23,7 @@ SYMBOL TABLE SSA
|
||||
__constant char * const SCREEN = (char *)$400
|
||||
void __start()
|
||||
void main()
|
||||
__constant char table[] = "cml!"z
|
||||
__constant char table[] = "cml!"
|
||||
|
||||
Simplifying constant pointer cast (char *) 1024
|
||||
Successful SSA optimization PassNCastSimplification
|
||||
@ -97,6 +97,7 @@ main: {
|
||||
// File Data
|
||||
.segment Data
|
||||
table: .text "cml!"
|
||||
.byte 0
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp __breturn
|
||||
@ -107,7 +108,7 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
FINAL SYMBOL TABLE
|
||||
__constant char * const SCREEN = (char *) 1024
|
||||
void main()
|
||||
__constant char table[] = "cml!"z
|
||||
__constant char table[] = "cml!"
|
||||
|
||||
|
||||
|
||||
@ -147,4 +148,5 @@ main: {
|
||||
// File Data
|
||||
.segment Data
|
||||
table: .text "cml!"
|
||||
.byte 0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
__constant char * const SCREEN = (char *) 1024
|
||||
void main()
|
||||
__constant char table[] = "cml!"z
|
||||
__constant char table[] = "cml!"
|
||||
|
||||
|
@ -24,3 +24,4 @@ main: {
|
||||
}
|
||||
.segment Data
|
||||
table: .text "cml!"
|
||||
.byte 0
|
||||
|
@ -30,7 +30,7 @@ SYMBOL TABLE SSA
|
||||
void __start()
|
||||
void main()
|
||||
__constant char * const main::SCREEN = (char *)$400
|
||||
__constant char table[] = "cml!"z
|
||||
__constant char table[] = "cml!"
|
||||
|
||||
Simplifying constant pointer cast (char *) 1024
|
||||
Successful SSA optimization PassNCastSimplification
|
||||
@ -111,6 +111,7 @@ main: {
|
||||
// File Data
|
||||
.segment Data
|
||||
table: .text "cml!"
|
||||
.byte 0
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp __breturn
|
||||
@ -121,7 +122,7 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
FINAL SYMBOL TABLE
|
||||
void main()
|
||||
__constant char * const main::SCREEN = (char *) 1024
|
||||
__constant char table[] = "cml!"z
|
||||
__constant char table[] = "cml!"
|
||||
|
||||
|
||||
|
||||
@ -162,4 +163,5 @@ main: {
|
||||
// File Data
|
||||
.segment Data
|
||||
table: .text "cml!"
|
||||
.byte 0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
void main()
|
||||
__constant char * const main::SCREEN = (char *) 1024
|
||||
__constant char table[] = "cml!"z
|
||||
__constant char table[] = "cml!"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user