mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-01-12 11:31:11 +00:00
More void-pointer synthesis. Fragment test is showing some performance issues. #449
This commit is contained in:
parent
08d90f90d9
commit
0359c85846
3
pom.xml
3
pom.xml
@ -95,6 +95,9 @@
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.12.4</version>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>**/TestFragments.java</exclude>
|
||||
</excludes>
|
||||
<useSystemClassLoader>false</useSystemClassLoader>
|
||||
<parallel>all</parallel>
|
||||
<threadCount>5</threadCount>
|
||||
|
@ -0,0 +1,7 @@
|
||||
sec
|
||||
lda {c1}
|
||||
sbc #<{c2}
|
||||
sta {c1}
|
||||
lda {c1}+1
|
||||
sbc #>{c2}
|
||||
sta {c1}+1
|
@ -0,0 +1,7 @@
|
||||
sec
|
||||
lda {c1}
|
||||
sbc {m1}
|
||||
sta {c1}
|
||||
lda {c1}+1
|
||||
sbc {m1}+1
|
||||
sta {c1}+1
|
@ -1,7 +1,7 @@
|
||||
lda {c1}
|
||||
clc
|
||||
adc #{c2}
|
||||
lda {c1}
|
||||
adc {c2}
|
||||
sta {c1}
|
||||
lda {c1}+1
|
||||
adc #0
|
||||
adc {c2}+1
|
||||
sta {c1}+1
|
@ -0,0 +1,7 @@
|
||||
clc
|
||||
lda {c1}
|
||||
adc #<{c2}
|
||||
sta {c1}
|
||||
lda {c1}+1
|
||||
adc #>{c2}
|
||||
sta {c1}+1
|
@ -0,0 +1,7 @@
|
||||
clc
|
||||
lda {c1}
|
||||
adc {m1}
|
||||
sta {c1}
|
||||
lda {c1}+1
|
||||
adc {m1}+1
|
||||
sta {c1}+1
|
@ -0,0 +1,6 @@
|
||||
ldy #0
|
||||
lda ({z1}),y
|
||||
sta {c1}
|
||||
iny
|
||||
lda ({z1}),y
|
||||
sta {c1}+1
|
@ -0,0 +1,7 @@
|
||||
lda {c1}
|
||||
cmp {c2}
|
||||
bne !+
|
||||
lda {c1}+1
|
||||
cmp {c2}+1
|
||||
beq {la1}
|
||||
!:
|
@ -0,0 +1,9 @@
|
||||
lda ({z2}),y
|
||||
pha
|
||||
iny
|
||||
lda ({z2}),y
|
||||
ldy #1
|
||||
sta ({z1}),y
|
||||
dey
|
||||
pla
|
||||
sta ({z1}),y
|
@ -0,0 +1,6 @@
|
||||
ldy #0
|
||||
lda ({z1}),y
|
||||
bne {la1}
|
||||
iny
|
||||
lda ({z1}),y
|
||||
bne {la1}
|
@ -0,0 +1,8 @@
|
||||
ldy #0
|
||||
lda ({z1}),y
|
||||
cmp {m2}
|
||||
bne {la1}
|
||||
iny
|
||||
lda ({z1}),y
|
||||
cmp {m2}+1
|
||||
bne {la1}
|
@ -0,0 +1,10 @@
|
||||
ldy #1
|
||||
lda ({z2}),y
|
||||
pha
|
||||
dey
|
||||
lda ({z2}),y
|
||||
ldy #{c1}
|
||||
sta ({z1}),y
|
||||
iny
|
||||
pla
|
||||
sta ({z1}),y
|
@ -0,0 +1,5 @@
|
||||
lda {c2}
|
||||
sta ({z1}),y
|
||||
iny
|
||||
lda {c2}+1
|
||||
sta ({z1}),y
|
@ -0,0 +1,7 @@
|
||||
sec
|
||||
lda {c1}
|
||||
sbc #{c2}
|
||||
sta {m1}
|
||||
lda {c1}+1
|
||||
sbc #0
|
||||
sta {m1}+1
|
@ -0,0 +1,8 @@
|
||||
lda {m1}+1
|
||||
cmp {c1}+1
|
||||
bcc !+
|
||||
bne {la1}
|
||||
lda {m1}
|
||||
cmp {c1}
|
||||
bcs {la1}
|
||||
!:
|
@ -711,8 +711,8 @@ class AsmFragmentTemplateSynthesisRule {
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)z1_derefidx_vbuaa=(.*)", twoZM1, "sta $ff" , "vb$1aa=$2", "ldy $ff\nsta ({z1}),y", mapZM1));
|
||||
|
||||
// Synthesize typed pointer math using void pointers
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)p..([czm][1-9])(.*)", null, null, "$1pvo$2$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)p..([czm][1-9])(.*p.*)", null, null, "$1pvo$2$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)p[^v][^o]([czm][1-9])(.*)", null, null, "$1pvo$2$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)p[^v][^o]([czm][1-9])(.*p.*)", null, null, "$1pvo$2$3", null, null));
|
||||
|
||||
// Synthesize some constant pointers as constant words (remove when the above section can be included)
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_(lt|gt|le|ge|eq|neq)_p..([czm].)_then_(.*)", null, null, "$1_$2_vwu$3_then_$4", null, null));
|
||||
|
Loading…
x
Reference in New Issue
Block a user