1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-01-17 15:30:39 +00:00

Updated testdata.

This commit is contained in:
jespergravgaard 2019-04-15 11:53:07 +02:00
parent aecf1ea7b2
commit f5afa992c1
5 changed files with 1629 additions and 1546 deletions

View File

@ -103,7 +103,7 @@ public class TestPrograms {
}
@Test
public void testPlasma2() throws IOException, URISyntaxException {
public void testPlasmaUnroll() throws IOException, URISyntaxException {
compileAndCompare("examples/plasma/plasma-unroll");
}

View File

@ -1,5 +1,6 @@
// A KickC version of the plasma routine from the CC65 samples
// This version has an unrolled inner loop to reach ~50FPS
// This version has an unrolled inner loop to reach 50+FPS
// This version also optimizes the inner loop by calculating the Y buffer as a set of differences
// (w)2001 by groepaz/hitmen
// Cleanup and porting to CC65 by Ullrich von Bassewitz.
// Ported to KickC by Jesper Gravgaard.
@ -70,6 +71,7 @@ main: {
doplasma: {
.label c1a = 8
.label c1b = 9
.label yval = $d
.label i = $a
.label c2a = 8
.label c2b = 9
@ -78,35 +80,35 @@ doplasma: {
sta c1a
lda c1B
sta c1b
lda #0
sta i
tax
// Calculate ybuff as a bunch of differences
b1:
ldy c1a
lda SINTABLE,y
ldy c1b
clc
adc SINTABLE,y
sta ybuf
lda #1
sta i
// Calculate ybuff as a bunch of differences
b1:
sta yval
txa
eor #$ff
sec
adc yval
ldy i
sta ybuf,y
lax c1a
axs #-[4]
stx c1a
lax c1b
axs #-[9]
stx c1b
ldy c1a
lda SINTABLE,y
ldy c1b
clc
adc SINTABLE,y
ldy i
sec
sbc ybuf+-1,y
sta ybuf,y
inc i
lda i
cmp #$19
bcc b1
bcs !b8+
jmp b8
!b8:
lax c1A
axs #-[3]
stx c1A
@ -146,12 +148,13 @@ doplasma: {
stx c2B
ldx #0
b5:
// Find the first value on the row
lda xbuf,x
// Calculate the next values as sums of diffs
// Use experimental loop unrolling to increase the speed
clc
adc ybuf
sta SCREEN1,x
// Calculate the next values as sums of diffs
// Use experimental loop unrolling to increase the speed
clc
adc ybuf+1
sta SCREEN1+1*$28,x
@ -230,14 +233,17 @@ doplasma: {
jmp b5
!b5:
rts
b8:
ldx yval
jmp b1
xbuf: .fill $28, 0
ybuf: .fill $19, 0
}
// Make a plasma-friendly charset where the chars are randomly filled
makecharset: {
.label _4 = 6
.label _8 = $d
.label _9 = $d
.label _8 = $e
.label _9 = $e
.label s = 5
.label i = 4
.label c = 2

View File

@ -46,150 +46,155 @@ main::@4: scope:[main] from main::@3
doplasma: scope:[doplasma] from main::@4
[19] (byte) doplasma::c1a#0 ← (byte) c1A#1
[20] (byte) doplasma::c1b#0 ← (byte) c1B#1
[21] (byte~) doplasma::$0 ← *((const byte*) SINTABLE#0 + (byte) doplasma::c1a#0) + *((const byte*) SINTABLE#0 + (byte) doplasma::c1b#0)
[22] *((const byte[$19]) doplasma::ybuf#0) ← (byte~) doplasma::$0
to:doplasma::@1
doplasma::@1: scope:[doplasma] from doplasma doplasma::@1
[23] (byte) doplasma::i#2 ← phi( doplasma/(byte/signed byte/word/signed word/dword/signed dword) 1 doplasma::@1/(byte) doplasma::i#1 )
[23] (byte) doplasma::c1b#2 ← phi( doplasma/(byte) doplasma::c1b#0 doplasma::@1/(byte) doplasma::c1b#1 )
[23] (byte) doplasma::c1a#2 ← phi( doplasma/(byte) doplasma::c1a#0 doplasma::@1/(byte) doplasma::c1a#1 )
[24] (byte) doplasma::c1a#1 ← (byte) doplasma::c1a#2 + (byte/signed byte/word/signed word/dword/signed dword) 4
[25] (byte) doplasma::c1b#1 ← (byte) doplasma::c1b#2 + (byte/signed byte/word/signed word/dword/signed dword) 9
[26] (byte~) doplasma::$1 ← *((const byte*) SINTABLE#0 + (byte) doplasma::c1a#1) + *((const byte*) SINTABLE#0 + (byte) doplasma::c1b#1)
[27] (byte~) doplasma::$3 ← (byte~) doplasma::$1 - *((const byte[$19]) doplasma::ybuf#0+-(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) doplasma::i#2)
[28] *((const byte[$19]) doplasma::ybuf#0 + (byte) doplasma::i#2) ← (byte~) doplasma::$3
[29] (byte) doplasma::i#1 ← ++ (byte) doplasma::i#2
[30] if((byte) doplasma::i#1<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@1
doplasma::@1: scope:[doplasma] from doplasma doplasma::@8
[21] (byte) doplasma::i#2 ← phi( doplasma/(byte/signed byte/word/signed word/dword/signed dword) 0 doplasma::@8/(byte) doplasma::i#1 )
[21] (byte) doplasma::yprev#2 ← phi( doplasma/(byte/signed byte/word/signed word/dword/signed dword) 0 doplasma::@8/(byte~) doplasma::yprev#3 )
[21] (byte) doplasma::c1b#2 ← phi( doplasma/(byte) doplasma::c1b#0 doplasma::@8/(byte) doplasma::c1b#1 )
[21] (byte) doplasma::c1a#2 ← phi( doplasma/(byte) doplasma::c1a#0 doplasma::@8/(byte) doplasma::c1a#1 )
[22] (byte) doplasma::yval#0 ← *((const byte*) SINTABLE#0 + (byte) doplasma::c1a#2) + *((const byte*) SINTABLE#0 + (byte) doplasma::c1b#2)
[23] (byte~) doplasma::$1 ← (byte) doplasma::yval#0 - (byte) doplasma::yprev#2
[24] *((const byte[$19]) doplasma::ybuf#0 + (byte) doplasma::i#2) ← (byte~) doplasma::$1
[25] (byte) doplasma::c1a#1 ← (byte) doplasma::c1a#2 + (byte/signed byte/word/signed word/dword/signed dword) 4
[26] (byte) doplasma::c1b#1 ← (byte) doplasma::c1b#2 + (byte/signed byte/word/signed word/dword/signed dword) 9
[27] (byte) doplasma::i#1 ← ++ (byte) doplasma::i#2
[28] if((byte) doplasma::i#1<(byte/signed byte/word/signed word/dword/signed dword) $19) goto doplasma::@8
to:doplasma::@2
doplasma::@2: scope:[doplasma] from doplasma::@1
[31] (byte) c1A#3 ← (byte) c1A#1 + (byte/signed byte/word/signed word/dword/signed dword) 3
[32] (byte) c1B#3 ← (byte) c1B#1 - (byte/signed byte/word/signed word/dword/signed dword) 5
[33] (byte) doplasma::c2a#0 ← (byte) c2A#1
[34] (byte) doplasma::c2b#0 ← (byte) c2B#1
[29] (byte) c1A#3 ← (byte) c1A#1 + (byte/signed byte/word/signed word/dword/signed dword) 3
[30] (byte) c1B#3 ← (byte) c1B#1 - (byte/signed byte/word/signed word/dword/signed dword) 5
[31] (byte) doplasma::c2a#0 ← (byte) c2A#1
[32] (byte) doplasma::c2b#0 ← (byte) c2B#1
to:doplasma::@3
doplasma::@3: scope:[doplasma] from doplasma::@2 doplasma::@3
[35] (byte) doplasma::i1#2 ← phi( doplasma::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 doplasma::@3/(byte) doplasma::i1#1 )
[35] (byte) doplasma::c2b#2 ← phi( doplasma::@2/(byte) doplasma::c2b#0 doplasma::@3/(byte) doplasma::c2b#1 )
[35] (byte) doplasma::c2a#2 ← phi( doplasma::@2/(byte) doplasma::c2a#0 doplasma::@3/(byte) doplasma::c2a#1 )
[36] (byte~) doplasma::$5 ← *((const byte*) SINTABLE#0 + (byte) doplasma::c2a#2) + *((const byte*) SINTABLE#0 + (byte) doplasma::c2b#2)
[37] *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i1#2) ← (byte~) doplasma::$5
[38] (byte) doplasma::c2a#1 ← (byte) doplasma::c2a#2 + (byte/signed byte/word/signed word/dword/signed dword) 3
[39] (byte) doplasma::c2b#1 ← (byte) doplasma::c2b#2 + (byte/signed byte/word/signed word/dword/signed dword) 7
[40] (byte) doplasma::i1#1 ← ++ (byte) doplasma::i1#2
[41] if((byte) doplasma::i1#1<(byte/signed byte/word/signed word/dword/signed dword) $28) goto doplasma::@3
[33] (byte) doplasma::i1#2 ← phi( doplasma::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 doplasma::@3/(byte) doplasma::i1#1 )
[33] (byte) doplasma::c2b#2 ← phi( doplasma::@2/(byte) doplasma::c2b#0 doplasma::@3/(byte) doplasma::c2b#1 )
[33] (byte) doplasma::c2a#2 ← phi( doplasma::@2/(byte) doplasma::c2a#0 doplasma::@3/(byte) doplasma::c2a#1 )
[34] (byte~) doplasma::$3 ← *((const byte*) SINTABLE#0 + (byte) doplasma::c2a#2) + *((const byte*) SINTABLE#0 + (byte) doplasma::c2b#2)
[35] *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i1#2) ← (byte~) doplasma::$3
[36] (byte) doplasma::c2a#1 ← (byte) doplasma::c2a#2 + (byte/signed byte/word/signed word/dword/signed dword) 3
[37] (byte) doplasma::c2b#1 ← (byte) doplasma::c2b#2 + (byte/signed byte/word/signed word/dword/signed dword) 7
[38] (byte) doplasma::i1#1 ← ++ (byte) doplasma::i1#2
[39] if((byte) doplasma::i1#1<(byte/signed byte/word/signed word/dword/signed dword) $28) goto doplasma::@3
to:doplasma::@4
doplasma::@4: scope:[doplasma] from doplasma::@3
[42] (byte) c2A#3 ← (byte) c2A#1 + (byte/signed byte/word/signed word/dword/signed dword) 2
[43] (byte) c2B#3 ← (byte) c2B#1 - (byte/signed byte/word/signed word/dword/signed dword) 3
[40] (byte) c2A#3 ← (byte) c2A#1 + (byte/signed byte/word/signed word/dword/signed dword) 2
[41] (byte) c2B#3 ← (byte) c2B#1 - (byte/signed byte/word/signed word/dword/signed dword) 3
to:doplasma::@5
doplasma::@5: scope:[doplasma] from doplasma::@4 doplasma::@7
[44] (byte) doplasma::i2#2 ← phi( doplasma::@4/(byte/signed byte/word/signed word/dword/signed dword) 0 doplasma::@7/(byte) doplasma::i2#1 )
[45] (byte) doplasma::val#0 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#2) + *((const byte[$19]) doplasma::ybuf#0)
[46] *((const byte*) SCREEN1#0 + (byte) doplasma::i2#2) ← (byte) doplasma::val#0
[42] (byte) doplasma::i2#2 ← phi( doplasma::@4/(byte/signed byte/word/signed word/dword/signed dword) 0 doplasma::@7/(byte) doplasma::i2#1 )
[43] (byte) doplasma::val#0 ← *((const byte[$28]) doplasma::xbuf#0 + (byte) doplasma::i2#2)
to:doplasma::@6
doplasma::@6: scope:[doplasma] from doplasma::@5
[47] (byte) doplasma::val#1 ← (byte) doplasma::val#0 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 1)
[48] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#1
[44] (byte) doplasma::val#1 ← (byte) doplasma::val#0 + *((const byte[$19]) doplasma::ybuf#0)
[45] *((const byte*) SCREEN1#0 + (byte) doplasma::i2#2) ← (byte) doplasma::val#1
to:doplasma::@6_1
doplasma::@6_1: scope:[doplasma] from doplasma::@6
[49] (byte) doplasma::val#4 ← (byte) doplasma::val#1 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 2)
[50] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 2*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#4
[46] (byte) doplasma::val#4 ← (byte) doplasma::val#1 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 1)
[47] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 1*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#4
to:doplasma::@6_2
doplasma::@6_2: scope:[doplasma] from doplasma::@6_1
[51] (byte) doplasma::val#6 ← (byte) doplasma::val#4 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 3)
[52] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 3*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#6
[48] (byte) doplasma::val#6 ← (byte) doplasma::val#4 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 2)
[49] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 2*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#6
to:doplasma::@6_3
doplasma::@6_3: scope:[doplasma] from doplasma::@6_2
[53] (byte) doplasma::val#8 ← (byte) doplasma::val#6 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 4)
[54] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 4*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#8
[50] (byte) doplasma::val#8 ← (byte) doplasma::val#6 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 3)
[51] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 3*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#8
to:doplasma::@6_4
doplasma::@6_4: scope:[doplasma] from doplasma::@6_3
[55] (byte) doplasma::val#10 ← (byte) doplasma::val#8 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 5)
[56] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 5*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#10
[52] (byte) doplasma::val#10 ← (byte) doplasma::val#8 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 4)
[53] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 4*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#10
to:doplasma::@6_5
doplasma::@6_5: scope:[doplasma] from doplasma::@6_4
[57] (byte) doplasma::val#12 ← (byte) doplasma::val#10 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 6)
[58] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 6*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#12
[54] (byte) doplasma::val#12 ← (byte) doplasma::val#10 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 5)
[55] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 5*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#12
to:doplasma::@6_6
doplasma::@6_6: scope:[doplasma] from doplasma::@6_5
[59] (byte) doplasma::val#14 ← (byte) doplasma::val#12 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 7)
[60] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 7*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#14
[56] (byte) doplasma::val#14 ← (byte) doplasma::val#12 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 6)
[57] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 6*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#14
to:doplasma::@6_7
doplasma::@6_7: scope:[doplasma] from doplasma::@6_6
[61] (byte) doplasma::val#16 ← (byte) doplasma::val#14 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 8)
[62] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 8*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#16
[58] (byte) doplasma::val#16 ← (byte) doplasma::val#14 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 7)
[59] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 7*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#16
to:doplasma::@6_8
doplasma::@6_8: scope:[doplasma] from doplasma::@6_7
[63] (byte) doplasma::val#18 ← (byte) doplasma::val#16 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 9)
[64] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 9*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#18
[60] (byte) doplasma::val#18 ← (byte) doplasma::val#16 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 8)
[61] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 8*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#18
to:doplasma::@6_9
doplasma::@6_9: scope:[doplasma] from doplasma::@6_8
[65] (byte) doplasma::val#20 ← (byte) doplasma::val#18 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $a)
[66] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $a*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#20
[62] (byte) doplasma::val#20 ← (byte) doplasma::val#18 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) 9)
[63] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) 9*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#20
to:doplasma::@6_10
doplasma::@6_10: scope:[doplasma] from doplasma::@6_9
[67] (byte) doplasma::val#22 ← (byte) doplasma::val#20 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $b)
[68] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $b*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#22
[64] (byte) doplasma::val#22 ← (byte) doplasma::val#20 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $a)
[65] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $a*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#22
to:doplasma::@6_11
doplasma::@6_11: scope:[doplasma] from doplasma::@6_10
[69] (byte) doplasma::val#24 ← (byte) doplasma::val#22 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $c)
[70] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $c*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#24
[66] (byte) doplasma::val#24 ← (byte) doplasma::val#22 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $b)
[67] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $b*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#24
to:doplasma::@6_12
doplasma::@6_12: scope:[doplasma] from doplasma::@6_11
[71] (byte) doplasma::val#26 ← (byte) doplasma::val#24 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $d)
[72] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $d*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#26
[68] (byte) doplasma::val#26 ← (byte) doplasma::val#24 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $c)
[69] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $c*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#26
to:doplasma::@6_13
doplasma::@6_13: scope:[doplasma] from doplasma::@6_12
[73] (byte) doplasma::val#28 ← (byte) doplasma::val#26 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $e)
[74] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $e*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#28
[70] (byte) doplasma::val#28 ← (byte) doplasma::val#26 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $d)
[71] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $d*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#28
to:doplasma::@6_14
doplasma::@6_14: scope:[doplasma] from doplasma::@6_13
[75] (byte) doplasma::val#30 ← (byte) doplasma::val#28 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $f)
[76] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $f*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#30
[72] (byte) doplasma::val#30 ← (byte) doplasma::val#28 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $e)
[73] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $e*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#30
to:doplasma::@6_15
doplasma::@6_15: scope:[doplasma] from doplasma::@6_14
[77] (byte) doplasma::val#32 ← (byte) doplasma::val#30 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $10)
[78] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $10*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#32
[74] (byte) doplasma::val#32 ← (byte) doplasma::val#30 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $f)
[75] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $f*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#32
to:doplasma::@6_16
doplasma::@6_16: scope:[doplasma] from doplasma::@6_15
[79] (byte) doplasma::val#34 ← (byte) doplasma::val#32 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $11)
[80] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $11*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#34
[76] (byte) doplasma::val#34 ← (byte) doplasma::val#32 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $10)
[77] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $10*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#34
to:doplasma::@6_17
doplasma::@6_17: scope:[doplasma] from doplasma::@6_16
[81] (byte) doplasma::val#36 ← (byte) doplasma::val#34 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $12)
[82] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $12*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#36
[78] (byte) doplasma::val#36 ← (byte) doplasma::val#34 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $11)
[79] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $11*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#36
to:doplasma::@6_18
doplasma::@6_18: scope:[doplasma] from doplasma::@6_17
[83] (byte) doplasma::val#38 ← (byte) doplasma::val#36 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $13)
[84] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $13*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#38
[80] (byte) doplasma::val#38 ← (byte) doplasma::val#36 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $12)
[81] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $12*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#38
to:doplasma::@6_19
doplasma::@6_19: scope:[doplasma] from doplasma::@6_18
[85] (byte) doplasma::val#40 ← (byte) doplasma::val#38 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $14)
[86] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $14*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#40
[82] (byte) doplasma::val#40 ← (byte) doplasma::val#38 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $13)
[83] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $13*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#40
to:doplasma::@6_20
doplasma::@6_20: scope:[doplasma] from doplasma::@6_19
[87] (byte) doplasma::val#42 ← (byte) doplasma::val#40 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $15)
[88] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $15*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#42
[84] (byte) doplasma::val#42 ← (byte) doplasma::val#40 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $14)
[85] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $14*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#42
to:doplasma::@6_21
doplasma::@6_21: scope:[doplasma] from doplasma::@6_20
[89] (byte) doplasma::val#44 ← (byte) doplasma::val#42 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $16)
[90] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $16*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#44
[86] (byte) doplasma::val#44 ← (byte) doplasma::val#42 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $15)
[87] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $15*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#44
to:doplasma::@6_22
doplasma::@6_22: scope:[doplasma] from doplasma::@6_21
[91] (byte) doplasma::val#46 ← (byte) doplasma::val#44 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $17)
[92] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $17*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#46
[88] (byte) doplasma::val#46 ← (byte) doplasma::val#44 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $16)
[89] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $16*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#46
to:doplasma::@6_23
doplasma::@6_23: scope:[doplasma] from doplasma::@6_22
[93] (byte) doplasma::val#48 ← (byte) doplasma::val#46 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $18)
[94] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#48
[90] (byte) doplasma::val#48 ← (byte) doplasma::val#46 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $17)
[91] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $17*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#48
to:doplasma::@6_24
doplasma::@6_24: scope:[doplasma] from doplasma::@6_23
[92] (byte) doplasma::val#50 ← (byte) doplasma::val#48 + *((const byte[$19]) doplasma::ybuf#0+(byte/signed byte/word/signed word/dword/signed dword) $18)
[93] *((const byte*) SCREEN1#0+(byte/signed byte/word/signed word/dword/signed dword) $18*(byte/signed byte/word/signed word/dword/signed dword) $28 + (byte) doplasma::i2#2) ← (byte) doplasma::val#50
to:doplasma::@7
doplasma::@7: scope:[doplasma] from doplasma::@6_23
[95] (byte) doplasma::i2#1 ← ++ (byte) doplasma::i2#2
[96] if((byte) doplasma::i2#1<(byte/signed byte/word/signed word/dword/signed dword) $28) goto doplasma::@5
doplasma::@7: scope:[doplasma] from doplasma::@6_24
[94] (byte) doplasma::i2#1 ← ++ (byte) doplasma::i2#2
[95] if((byte) doplasma::i2#1<(byte/signed byte/word/signed word/dword/signed dword) $28) goto doplasma::@5
to:doplasma::@return
doplasma::@return: scope:[doplasma] from doplasma::@7
[97] return
[96] return
to:@return
doplasma::@8: scope:[doplasma] from doplasma::@1
[97] (byte~) doplasma::yprev#3 ← (byte) doplasma::yval#0
to:doplasma::@1
makecharset: scope:[makecharset] from main::@2
[98] phi()
[99] call sid_rnd_init

File diff suppressed because it is too large Load Diff

View File

@ -111,22 +111,20 @@
(byte) WHITE
(byte) YELLOW
(byte) c1A
(byte) c1A#1 c1A zp ZP_BYTE:4 1.0714285714285714
(byte) c1A#3 c1A zp ZP_BYTE:4 0.1911764705882353
(byte) c1A#1 c1A zp ZP_BYTE:4 1.1538461538461537
(byte) c1A#3 c1A zp ZP_BYTE:4 0.18840579710144925
(byte) c1B
(byte) c1B#1 c1B zp ZP_BYTE:5 0.9999999999999999
(byte) c1B#3 c1B zp ZP_BYTE:5 0.19402985074626866
(byte) c1B#1 c1B zp ZP_BYTE:5 1.0714285714285714
(byte) c1B#3 c1B zp ZP_BYTE:5 0.1911764705882353
(byte) c2A
(byte) c2A#1 c2A zp ZP_BYTE:6 0.6
(byte) c2A#3 c2A zp ZP_BYTE:6 0.22807017543859648
(byte) c2A#1 c2A zp ZP_BYTE:6 0.625
(byte) c2A#3 c2A zp ZP_BYTE:6 0.22413793103448276
(byte) c2B
(byte) c2B#1 c2B zp ZP_BYTE:7 0.5769230769230769
(byte) c2B#3 c2B zp ZP_BYTE:7 0.23214285714285715
(byte) c2B#1 c2B zp ZP_BYTE:7 0.6
(byte) c2B#3 c2B zp ZP_BYTE:7 0.22807017543859648
(void()) doplasma((byte*) doplasma::screen)
(byte~) doplasma::$0 reg byte a 4.0
(byte~) doplasma::$1 reg byte a 202.0
(byte~) doplasma::$3 reg byte a 202.0
(byte~) doplasma::$5 reg byte a 202.0
(label) doplasma::@1
(label) doplasma::@2
(label) doplasma::@3
@ -149,6 +147,7 @@
(label) doplasma::@6_21
(label) doplasma::@6_22
(label) doplasma::@6_23
(label) doplasma::@6_24
(label) doplasma::@6_3
(label) doplasma::@6_4
(label) doplasma::@6_5
@ -157,15 +156,16 @@
(label) doplasma::@6_8
(label) doplasma::@6_9
(label) doplasma::@7
(label) doplasma::@8
(label) doplasma::@return
(byte) doplasma::c1a
(byte) doplasma::c1a#0 c1a zp ZP_BYTE:8 1.5
(byte) doplasma::c1a#1 c1a zp ZP_BYTE:8 43.285714285714285
(byte) doplasma::c1a#2 c1a zp ZP_BYTE:8 204.0
(byte) doplasma::c1a#0 c1a zp ZP_BYTE:8 2.0
(byte) doplasma::c1a#1 c1a zp ZP_BYTE:8 40.4
(byte) doplasma::c1a#2 c1a zp ZP_BYTE:8 76.25
(byte) doplasma::c1b
(byte) doplasma::c1b#0 c1b zp ZP_BYTE:9 2.0
(byte) doplasma::c1b#0 c1b zp ZP_BYTE:9 4.0
(byte) doplasma::c1b#1 c1b zp ZP_BYTE:9 50.5
(byte) doplasma::c1b#2 c1b zp ZP_BYTE:9 102.0
(byte) doplasma::c1b#2 c1b zp ZP_BYTE:9 61.0
(byte) doplasma::c2a
(byte) doplasma::c2a#0 c2a zp ZP_BYTE:8 2.0
(byte) doplasma::c2a#1 c2a zp ZP_BYTE:8 50.5
@ -175,18 +175,18 @@
(byte) doplasma::c2b#1 c2b zp ZP_BYTE:9 67.33333333333333
(byte) doplasma::c2b#2 c2b zp ZP_BYTE:9 76.25
(byte) doplasma::i
(byte) doplasma::i#1 i zp ZP_BYTE:10 151.5
(byte) doplasma::i#2 i zp ZP_BYTE:10 67.33333333333333
(byte) doplasma::i#1 i zp ZP_BYTE:10 101.0
(byte) doplasma::i#2 i zp ZP_BYTE:10 50.5
(byte) doplasma::i1
(byte) doplasma::i1#1 i1 zp ZP_BYTE:10 151.5
(byte) doplasma::i1#2 i1 zp ZP_BYTE:10 60.599999999999994
(byte) doplasma::i2
(byte) doplasma::i2#1 reg byte x 151.5
(byte) doplasma::i2#2 reg byte x 55.45098039215691
(byte) doplasma::i2#2 reg byte x 54.3846153846154
(byte) doplasma::ii
(byte*) doplasma::screen
(byte) doplasma::val
(byte) doplasma::val#0 reg byte a 151.5
(byte) doplasma::val#0 reg byte a 202.0
(byte) doplasma::val#1 reg byte a 151.5
(byte) doplasma::val#10 reg byte a 151.5
(byte) doplasma::val#12 reg byte a 151.5
@ -208,13 +208,19 @@
(byte) doplasma::val#42 reg byte a 151.5
(byte) doplasma::val#44 reg byte a 151.5
(byte) doplasma::val#46 reg byte a 151.5
(byte) doplasma::val#48 reg byte a 202.0
(byte) doplasma::val#48 reg byte a 151.5
(byte) doplasma::val#50 reg byte a 202.0
(byte) doplasma::val#6 reg byte a 151.5
(byte) doplasma::val#8 reg byte a 151.5
(byte[$28]) doplasma::xbuf
(const byte[$28]) doplasma::xbuf#0 xbuf = { fill( $28, 0) }
(byte[$19]) doplasma::ybuf
(const byte[$19]) doplasma::ybuf#0 ybuf = { fill( $19, 0) }
(byte) doplasma::yprev
(byte) doplasma::yprev#2 reg byte x 101.0
(byte~) doplasma::yprev#3 reg byte x 202.0
(byte) doplasma::yval
(byte) doplasma::yval#0 yval zp ZP_BYTE:13 43.285714285714285
(void()) main()
(label) main::@1
(label) main::@2
@ -243,8 +249,8 @@
(byte~) makecharset::$2 reg byte a 22.0
(byte~) makecharset::$3 reg byte a 2002.0
(byte~) makecharset::$4 $4 zp ZP_BYTE:6 2002.0
(word~) makecharset::$8 $8 zp ZP_WORD:13 202.0
(word~) makecharset::$9 $9 zp ZP_WORD:13 202.0
(word~) makecharset::$8 $8 zp ZP_WORD:14 202.0
(word~) makecharset::$9 $9 zp ZP_WORD:14 202.0
(label) makecharset::@1
(label) makecharset::@10
(label) makecharset::@11
@ -308,15 +314,15 @@ zp ZP_BYTE:6 [ c2A#1 c2A#3 makecharset::$4 ]
zp ZP_BYTE:7 [ c2B#1 c2B#3 ]
zp ZP_BYTE:8 [ doplasma::c1a#2 doplasma::c1a#0 doplasma::c1a#1 doplasma::c2a#2 doplasma::c2a#0 doplasma::c2a#1 ]
zp ZP_BYTE:9 [ doplasma::c1b#2 doplasma::c1b#0 doplasma::c1b#1 doplasma::c2b#2 doplasma::c2b#0 doplasma::c2b#1 ]
reg byte x [ doplasma::yprev#2 doplasma::yprev#3 ]
zp ZP_BYTE:10 [ doplasma::i#2 doplasma::i#1 doplasma::i1#2 doplasma::i1#1 ]
reg byte x [ doplasma::i2#2 doplasma::i2#1 ]
zp ZP_WORD:11 [ print_char_cursor#45 print_char_cursor#18 print_char_cursor#1 ]
reg byte x [ makecharset::ii#2 makecharset::ii#1 ]
reg byte y [ makecharset::b#2 makecharset::b#3 makecharset::b#1 ]
reg byte a [ doplasma::$0 ]
zp ZP_BYTE:13 [ doplasma::yval#0 ]
reg byte a [ doplasma::$1 ]
reg byte a [ doplasma::$3 ]
reg byte a [ doplasma::$5 ]
reg byte a [ doplasma::val#0 ]
reg byte a [ doplasma::val#1 ]
reg byte a [ doplasma::val#4 ]
@ -342,9 +348,10 @@ reg byte a [ doplasma::val#42 ]
reg byte a [ doplasma::val#44 ]
reg byte a [ doplasma::val#46 ]
reg byte a [ doplasma::val#48 ]
reg byte a [ doplasma::val#50 ]
reg byte a [ makecharset::$2 ]
reg byte a [ sid_rnd::return#2 ]
reg byte a [ makecharset::$3 ]
zp ZP_WORD:13 [ makecharset::$8 makecharset::$9 ]
zp ZP_WORD:14 [ makecharset::$8 makecharset::$9 ]
reg byte a [ makecharset::$11 ]
reg byte a [ sid_rnd::return#0 ]