From 9264967b3fc927526b1eb344fd71c13f031b7004 Mon Sep 17 00:00:00 2001 From: jespergravgaard <jesper@balmangravgaard.dk> Date: Thu, 11 Jul 2019 06:31:29 +0200 Subject: [PATCH] fixed tests --- src/main/kc/stdlib/string.kc | 5 +- src/test/ref/bitmap-plot-0.asm | 37 +- src/test/ref/bitmap-plot-0.cfg | 85 +- src/test/ref/bitmap-plot-0.log | 910 ++++--- src/test/ref/bitmap-plot-0.sym | 19 +- src/test/ref/bitmap-plot-1.asm | 37 +- src/test/ref/bitmap-plot-1.cfg | 297 +- src/test/ref/bitmap-plot-1.log | 2386 ++++++++-------- src/test/ref/bitmap-plot-1.sym | 19 +- src/test/ref/bitmap-plot-2.asm | 37 +- src/test/ref/bitmap-plot-2.cfg | 297 +- src/test/ref/bitmap-plot-2.log | 2418 +++++++++-------- src/test/ref/bitmap-plot-2.sym | 19 +- src/test/ref/bitmap-plot-3.asm | 37 +- src/test/ref/bitmap-plot-3.cfg | 71 +- src/test/ref/bitmap-plot-3.log | 829 +++--- src/test/ref/bitmap-plot-3.sym | 19 +- .../ref/complex/clearscreen/clearscreen.log | 342 +-- src/test/ref/default-font.log | 125 +- .../ref/examples/scrolllogo/scrolllogo.asm | 6 +- .../ref/examples/scrolllogo/scrolllogo.cfg | 16 +- .../ref/examples/scrolllogo/scrolllogo.log | 401 +-- .../ref/examples/scrolllogo/scrolllogo.sym | 5 +- src/test/ref/examples/showlogo/showlogo.asm | 33 +- src/test/ref/examples/showlogo/showlogo.cfg | 23 +- src/test/ref/examples/showlogo/showlogo.log | 459 ++-- src/test/ref/examples/showlogo/showlogo.sym | 19 +- .../ref/examples/sinplotter/sine-plotter.asm | 37 +- .../ref/examples/sinplotter/sine-plotter.cfg | 71 +- .../ref/examples/sinplotter/sine-plotter.log | 822 +++--- .../ref/examples/sinplotter/sine-plotter.sym | 19 +- src/test/ref/malloc-0.log | 72 +- src/test/ref/malloc-1.log | 74 +- src/test/ref/memory-heap.log | 48 +- src/test/ref/plasma-center.log | 685 ++--- src/test/ref/scan-desire-problem.asm | 6 +- src/test/ref/scan-desire-problem.cfg | 16 +- src/test/ref/scan-desire-problem.log | 323 ++- src/test/ref/scan-desire-problem.sym | 5 +- src/test/ref/screen-center-angle.log | 90 +- src/test/ref/screen-center-distance.log | 248 +- src/test/ref/screen-show-spiral-buckets.log | 202 +- src/test/ref/screen-show-spiral.cfg | 4 +- src/test/ref/screen-show-spiral.log | 318 +-- 44 files changed, 6308 insertions(+), 5683 deletions(-) diff --git a/src/main/kc/stdlib/string.kc b/src/main/kc/stdlib/string.kc index 02e50c607..e8a6131e3 100644 --- a/src/main/kc/stdlib/string.kc +++ b/src/main/kc/stdlib/string.kc @@ -28,10 +28,11 @@ void* memmove( void* destination, void* source, size_t num ) { // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. void *memset(void *str, char c, size_t num) { - char* end = (char*)str + num; - if(num>0) + if(num>0) { + char* end = (char*)str + num; for(char* dst = str; dst!=end; dst++) *dst = c; + } return str; } diff --git a/src/test/ref/bitmap-plot-0.asm b/src/test/ref/bitmap-plot-0.asm index 5a403d91f..71e5c98f1 100644 --- a/src/test/ref/bitmap-plot-0.asm +++ b/src/test/ref/bitmap-plot-0.asm @@ -180,34 +180,38 @@ init_irq: { bitmap_clear: { .const col = WHITE*$10 ldx #col - lda #<$3e8 - sta memset.num - lda #>$3e8 - sta memset.num+1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 jsr memset ldx #0 - lda #<$1f40 - sta memset.num - lda #>$1f40 - sta memset.num+1 lda #<BITMAP sta memset.str lda #>BITMAP sta memset.str+1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 jsr memset rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage(8) str, byte register(X) c, word zeropage($a) num) +// memset(void* zeropage($a) str, byte register(X) c, word zeropage(8) num) memset: { - .label end = $a - .label dst = 8 - .label str = 8 - .label num = $a + .label end = 8 + .label dst = $a + .label num = 8 + .label str = $a + lda num + beq breturn + lda num+1 + beq breturn lda end clc adc str @@ -215,7 +219,7 @@ memset: { lda end+1 adc str+1 sta end+1 - b1: + b2: txa ldy #0 sta (dst),y @@ -225,10 +229,11 @@ memset: { !: lda dst+1 cmp end+1 - bne b1 + bne b2 lda dst cmp end - bne b1 + bne b2 + breturn: rts } // Initialize bitmap plotting tables diff --git a/src/test/ref/bitmap-plot-0.cfg b/src/test/ref/bitmap-plot-0.cfg index 69c68f943..5bfcf5126 100644 --- a/src/test/ref/bitmap-plot-0.cfg +++ b/src/test/ref/bitmap-plot-0.cfg @@ -101,72 +101,75 @@ bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 to:@return memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [49] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) + [49] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) [49] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 ) - [49] (void*) memset::str#2 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) - [50] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 - [51] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + [50] if((word) memset::num#2<=(byte) 0) goto memset::@return to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - [52] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) - [53] *((byte*) memset::dst#2) ← (byte) memset::c#3 - [54] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - [55] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 +memset::@1: scope:[memset] from memset + [51] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 + [52] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + to:memset::@2 +memset::@2: scope:[memset] from memset::@1 memset::@2 + [53] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 ) + [54] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [55] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [56] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 to:memset::@return -memset::@return: scope:[memset] from memset::@1 - [56] return +memset::@return: scope:[memset] from memset memset::@2 + [57] return to:@return bitmap_init: scope:[bitmap_init] from main - [57] phi() + [58] phi() to:bitmap_init::@1 bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2 - [58] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) - [58] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) - [59] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 - [60] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 - [61] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 + [59] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) + [59] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) + [60] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 + [61] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 + [62] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 to:bitmap_init::@2 bitmap_init::@6: scope:[bitmap_init] from bitmap_init::@1 - [62] phi() + [63] phi() to:bitmap_init::@2 bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6 - [63] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) - [64] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 - [65] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 + [64] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) + [65] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 + [66] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 to:bitmap_init::@3 bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4 - [66] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) - [66] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) - [67] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 - [68] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 - [69] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 - [70] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 - [71] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 - [72] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 - [73] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 + [67] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) + [67] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) + [68] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 + [69] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 + [70] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 + [71] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 + [72] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 + [73] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 + [74] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 to:bitmap_init::@5 bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@3 - [74] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 + [75] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 to:bitmap_init::@4 bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 - [75] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) - [76] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 - [77] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 + [76] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) + [77] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 + [78] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 to:bitmap_init::@return bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 - [78] return + [79] return to:@return irq: scope:[irq] from - [79] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 - [80] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 + [80] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 + [81] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 to:irq::@2 irq::@2: scope:[irq] from irq - [81] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 + [82] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 to:irq::@1 irq::@1: scope:[irq] from irq irq::@2 - [82] (byte) frame_cnt#10 ← phi( irq/(byte) frame_cnt#0 irq::@2/(byte) frame_cnt#1 ) - [83] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 - [84] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + [83] (byte) frame_cnt#10 ← phi( irq/(byte) frame_cnt#0 irq::@2/(byte) frame_cnt#1 ) + [84] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 + [85] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 to:irq::@return irq::@return: scope:[irq] from irq::@1 - [85] return + [86] return to:@return diff --git a/src/test/ref/bitmap-plot-0.log b/src/test/ref/bitmap-plot-0.log index cbd7e1e3f..dcdff6a85 100644 --- a/src/test/ref/bitmap-plot-0.log +++ b/src/test/ref/bitmap-plot-0.log @@ -15,6 +15,7 @@ Culled Empty Block (label) @3 Culled Empty Block (label) @4 Culled Empty Block (label) @5 Culled Empty Block (label) @6 +Culled Empty Block (label) memset::@5 Culled Empty Block (label) memset::@3 Culled Empty Block (label) @7 Culled Empty Block (label) bitmap_init::@8 @@ -54,30 +55,38 @@ CONTROL FLOW GRAPH SSA (byte) WHITE#0 ← (number) 1 to:@8 memset: scope:[memset] from bitmap_clear bitmap_clear::@1 - (byte) memset::c#3 ← phi( bitmap_clear/(byte) memset::c#0 bitmap_clear::@1/(byte) memset::c#1 ) + (byte) memset::c#4 ← phi( bitmap_clear/(byte) memset::c#0 bitmap_clear::@1/(byte) memset::c#1 ) + (void*) memset::str#4 ← phi( bitmap_clear/(void*) memset::str#0 bitmap_clear::@1/(void*) memset::str#1 ) (word) memset::num#2 ← phi( bitmap_clear/(word) memset::num#0 bitmap_clear::@1/(word) memset::num#1 ) - (void*) memset::str#2 ← phi( bitmap_clear/(void*) memset::str#0 bitmap_clear::@1/(void*) memset::str#1 ) - (byte*~) memset::$0 ← ((byte*)) (void*) memset::str#2 - (byte*~) memset::$1 ← (byte*~) memset::$0 + (word) memset::num#2 - (byte*) memset::end#0 ← (byte*~) memset::$1 - (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#2 - to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - (void*) memset::str#4 ← phi( memset/(void*) memset::str#2 memset::@1/(void*) memset::str#4 ) - (byte*) memset::end#1 ← phi( memset/(byte*) memset::end#0 memset::@1/(byte*) memset::end#1 ) - (byte*) memset::dst#2 ← phi( memset/(byte*) memset::dst#0 memset::@1/(byte*) memset::dst#1 ) - (byte) memset::c#2 ← phi( memset/(byte) memset::c#3 memset::@1/(byte) memset::c#2 ) + (bool~) memset::$0 ← (word) memset::num#2 > (number) 0 + (bool~) memset::$1 ← ! (bool~) memset::$0 + if((bool~) memset::$1) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + (void*) memset::str#2 ← phi( memset/(void*) memset::str#4 memset::@4/(void*) memset::str#5 ) + (void*) memset::return#0 ← (void*) memset::str#2 + to:memset::@return +memset::@2: scope:[memset] from memset + (byte) memset::c#3 ← phi( memset/(byte) memset::c#4 ) + (word) memset::num#3 ← phi( memset/(word) memset::num#2 ) + (void*) memset::str#3 ← phi( memset/(void*) memset::str#4 ) + (byte*~) memset::$2 ← ((byte*)) (void*) memset::str#3 + (byte*~) memset::$3 ← (byte*~) memset::$2 + (word) memset::num#3 + (byte*) memset::end#0 ← (byte*~) memset::$3 + (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#3 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + (void*) memset::str#5 ← phi( memset::@2/(void*) memset::str#3 memset::@4/(void*) memset::str#5 ) + (byte*) memset::end#1 ← phi( memset::@2/(byte*) memset::end#0 memset::@4/(byte*) memset::end#1 ) + (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + (byte) memset::c#2 ← phi( memset::@2/(byte) memset::c#3 memset::@4/(byte) memset::c#2 ) *((byte*) memset::dst#2) ← (byte) memset::c#2 (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - (bool~) memset::$2 ← (byte*) memset::dst#1 != (byte*) memset::end#1 - if((bool~) memset::$2) goto memset::@1 - to:memset::@2 -memset::@2: scope:[memset] from memset::@1 - (void*) memset::str#3 ← phi( memset::@1/(void*) memset::str#4 ) - (void*) memset::return#0 ← (void*) memset::str#3 - to:memset::@return -memset::@return: scope:[memset] from memset::@2 - (void*) memset::return#4 ← phi( memset::@2/(void*) memset::return#0 ) + (bool~) memset::$4 ← (byte*) memset::dst#1 != (byte*) memset::end#1 + if((bool~) memset::$4) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + (void*) memset::return#4 ← phi( memset::@1/(void*) memset::return#0 ) (void*) memset::return#1 ← (void*) memset::return#4 return to:@return @@ -779,17 +788,21 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (byte) main::y#7 (byte) main::y#8 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) -(byte*~) memset::$0 -(byte*~) memset::$1 -(bool~) memset::$2 +(bool~) memset::$0 +(bool~) memset::$1 +(byte*~) memset::$2 +(byte*~) memset::$3 +(bool~) memset::$4 (label) memset::@1 (label) memset::@2 +(label) memset::@4 (label) memset::@return (byte) memset::c (byte) memset::c#0 (byte) memset::c#1 (byte) memset::c#2 (byte) memset::c#3 +(byte) memset::c#4 (byte*) memset::dst (byte*) memset::dst#0 (byte*) memset::dst#1 @@ -801,6 +814,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (word) memset::num#0 (word) memset::num#1 (word) memset::num#2 +(word) memset::num#3 (void*) memset::return (void*) memset::return#0 (void*) memset::return#1 @@ -813,6 +827,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (void*) memset::str#2 (void*) memset::str#3 (void*) memset::str#4 +(void*) memset::str#5 (byte[$100]) plots_per_frame (byte[$100]) plots_per_frame#0 @@ -827,6 +842,7 @@ Adding number conversion cast (unumber) 1 in (byte) IRQ_RASTER#0 ← (number) 1 Adding number conversion cast (unumber) $7f in (byte) CIA_INTERRUPT_CLEAR#0 ← (number) $7f Adding number conversion cast (unumber) 0 in (byte) BLACK#0 ← (number) 0 Adding number conversion cast (unumber) 1 in (byte) WHITE#0 ← (number) 1 +Adding number conversion cast (unumber) 0 in (bool~) memset::$0 ← (word) memset::num#2 > (number) 0 Adding number conversion cast (unumber) $80 in (byte) bitmap_init::bits#0 ← (number) $80 Adding number conversion cast (unumber) 1 in (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (number) 1 Adding number conversion cast (unumber) 0 in (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (number) 0 @@ -889,8 +905,8 @@ Inlining cast (byte) CIA_INTERRUPT_CLEAR#0 ← (unumber)(number) $7f Inlining cast (void()**) HARDWARE_IRQ#0 ← (void()**)(number) $fffe Inlining cast (byte) BLACK#0 ← (unumber)(number) 0 Inlining cast (byte) WHITE#0 ← (unumber)(number) 1 -Inlining cast (byte*~) memset::$0 ← (byte*)(void*) memset::str#2 -Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 +Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 +Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 Inlining cast (byte) bitmap_init::bits#0 ← (unumber)(number) $80 Inlining cast (byte) bitmap_init::bits#2 ← (unumber)(number) $80 Inlining cast (byte) memset::c#1 ← (unumber)(number) 0 @@ -925,6 +941,7 @@ Simplifying constant integer cast $7f Simplifying constant pointer cast (void()**) 65534 Simplifying constant integer cast 0 Simplifying constant integer cast 1 +Simplifying constant integer cast 0 Simplifying constant integer cast $80 Simplifying constant integer cast 1 Simplifying constant integer cast 0 @@ -966,6 +983,7 @@ Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) $7f Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) $80 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 0 @@ -1009,12 +1027,16 @@ Inferred type updated to byte in (unumber~) main::toD0181_$7#0 ← (byte~) main: Inferred type updated to byte in (unumber~) main::toD0181_$8#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 Adding pointer type conversion cast (byte*) bitmap_plot::$0 in (byte*~) bitmap_plot::$0 ← (word~) bitmap_plot::$3 Successful SSA optimization PassNAddTypeConversionAssignment -Inversing boolean not [49] (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits#1 != (byte) 0 from [48] (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (byte) 0 -Inversing boolean not [69] (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte) 7 from [68] (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte) 7 -Inversing boolean not [198] (bool~) irq::$0 ← (byte) 0 == (byte) frame_cnt#4 from [197] (bool~) irq::$1 ← (byte) 0 != (byte) frame_cnt#4 +Inversing boolean not [22] (bool~) memset::$1 ← (word) memset::num#2 <= (byte) 0 from [21] (bool~) memset::$0 ← (word) memset::num#2 > (byte) 0 +Inversing boolean not [53] (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits#1 != (byte) 0 from [52] (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (byte) 0 +Inversing boolean not [73] (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte) 7 from [72] (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte) 7 +Inversing boolean not [202] (bool~) irq::$0 ← (byte) 0 == (byte) frame_cnt#4 from [201] (bool~) irq::$1 ← (byte) 0 != (byte) frame_cnt#4 Successful SSA optimization Pass2UnaryNotSimplification -Alias (byte*) memset::end#0 = (byte*~) memset::$1 -Alias (void*) memset::return#0 = (void*) memset::str#3 (void*) memset::str#4 (void*) memset::return#4 (void*) memset::return#1 +Alias (void*) memset::return#0 = (void*) memset::str#2 (void*) memset::return#4 (void*) memset::return#1 +Alias (void*) memset::str#3 = (void*) memset::str#4 +Alias (word) memset::num#2 = (word) memset::num#3 +Alias (byte) memset::c#3 = (byte) memset::c#4 +Alias (byte*) memset::end#0 = (byte*~) memset::$3 Alias (byte) bitmap_init::x#2 = (byte) bitmap_init::x#4 Alias (byte*) bitmap_init::gfx#4 = (byte*) bitmap_init::gfx#5 Alias (byte*) bitmap_gfx#30 = (byte*) bitmap_gfx#31 @@ -1081,7 +1103,7 @@ Alias (word) main::vx#6 = (word) main::vx#7 Successful SSA optimization Pass2AliasElimination Self Phi Eliminated (byte) memset::c#2 Self Phi Eliminated (byte*) memset::end#1 -Self Phi Eliminated (void*) memset::return#0 +Self Phi Eliminated (void*) memset::str#5 Self Phi Eliminated (byte*) bitmap_init::gfx#2 Self Phi Eliminated (byte*) bitmap_gfx#21 Self Phi Eliminated (byte*) bitmap_screen#20 @@ -1093,7 +1115,7 @@ Self Phi Eliminated (byte) frame_cnt#11 Successful SSA optimization Pass2SelfPhiElimination Identical Phi Values (byte) memset::c#2 (byte) memset::c#3 Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0 -Identical Phi Values (void*) memset::return#0 (void*) memset::str#2 +Identical Phi Values (void*) memset::str#5 (void*) memset::str#3 Identical Phi Values (byte*) bitmap_init::gfx#1 (byte*) bitmap_init::gfx#0 Identical Phi Values (byte*) bitmap_init::screen#1 (byte*) bitmap_init::screen#0 Identical Phi Values (byte*) bitmap_init::gfx#2 (byte*) bitmap_init::gfx#1 @@ -1119,28 +1141,31 @@ Identical Phi Values (byte) frame_cnt#4 (byte) frame_cnt#0 Identical Phi Values (byte*) bitmap_gfx#10 (byte*) bitmap_gfx#14 Identical Phi Values (byte*) bitmap_screen#10 (byte*) bitmap_screen#13 Successful SSA optimization Pass2IdenticalPhiElimination -Identified duplicate assignment right side [67] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 +Identical Phi Values (void*) memset::return#0 (void*) memset::str#3 +Successful SSA optimization Pass2IdenticalPhiElimination +Identified duplicate assignment right side [71] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) memset::$2 [29] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -Simple Condition (bool~) bitmap_init::$1 [50] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 -Simple Condition (bool~) bitmap_init::$2 [54] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 -Simple Condition (bool~) bitmap_init::$9 [70] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 -Simple Condition (bool~) bitmap_init::$11 [74] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 -Simple Condition (bool~) irq::$0 [199] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 +Simple Condition (bool~) memset::$1 [23] if((word) memset::num#2<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [35] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 +Simple Condition (bool~) bitmap_init::$1 [54] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$2 [58] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$9 [74] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 +Simple Condition (bool~) bitmap_init::$11 [78] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 +Simple Condition (bool~) irq::$0 [203] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting ! if()-condition to reversed if() [162] (bool~) main::$11 ← ! (bool~) main::$10 +Rewriting ! if()-condition to reversed if() [166] (bool~) main::$11 ← ! (bool~) main::$10 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting || if()-condition to two if()s [161] (bool~) main::$10 ← (bool~) main::$8 || (bool~) main::$9 +Rewriting || if()-condition to two if()s [165] (bool~) main::$10 ← (bool~) main::$8 || (bool~) main::$9 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting ! if()-condition to reversed if() [168] (bool~) main::$16 ← ! (bool~) main::$15 +Rewriting ! if()-condition to reversed if() [172] (bool~) main::$16 ← ! (bool~) main::$15 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting || if()-condition to two if()s [167] (bool~) main::$15 ← (bool~) main::$13 || (bool~) main::$14 +Rewriting || if()-condition to two if()s [171] (bool~) main::$15 ← (bool~) main::$13 || (bool~) main::$14 Successful SSA optimization Pass2ConditionalAndOrRewriting -Constant right-side identified [37] (byte[$100]) bitmap_plot_ylo#0 ← { fill( $100, 0) } -Constant right-side identified [38] (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } -Constant right-side identified [39] (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } -Constant right-side identified [110] (byte[$100]) plots_per_frame#0 ← { fill( $100, 0) } -Constant right-side identified [191] (void()*~) init_irq::$0 ← & interrupt(HARDWARE_CLOBBER)(void()) irq() +Constant right-side identified [41] (byte[$100]) bitmap_plot_ylo#0 ← { fill( $100, 0) } +Constant right-side identified [42] (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } +Constant right-side identified [43] (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } +Constant right-side identified [114] (byte[$100]) plots_per_frame#0 ← { fill( $100, 0) } +Constant right-side identified [195] (void()*~) init_irq::$0 ← & interrupt(HARDWARE_CLOBBER)(void()) irq() Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) PROCPORT_DDR#0 = (byte*) 0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -1193,21 +1218,21 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) bitmap_gfx#1 = bitmap_init::gfx#0 Constant (const byte*) bitmap_screen#1 = bitmap_init::screen#0 Successful SSA optimization Pass2ConstantIdentification -Constant value identified (void*)bitmap_screen#1 in [86] (void*) memset::str#0 ← (void*)(const byte*) bitmap_screen#1 -Constant value identified (void*)bitmap_gfx#1 in [92] (void*) memset::str#1 ← (void*)(const byte*) bitmap_gfx#1 -Constant value identified (word)main::toD0181_screen#0 in [129] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 -Constant value identified (word)main::toD0181_gfx#0 in [133] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 +Constant value identified (void*)bitmap_screen#1 in [90] (void*) memset::str#0 ← (void*)(const byte*) bitmap_screen#1 +Constant value identified (void*)bitmap_gfx#1 in [96] (void*) memset::str#1 ← (void*)(const byte*) bitmap_gfx#1 +Constant value identified (word)main::toD0181_screen#0 in [133] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 +Constant value identified (word)main::toD0181_gfx#0 in [137] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 Successful SSA optimization Pass2ConstantValues -if() condition always true - replacing block destination [151] if(true) goto main::@2 +if() condition always true - replacing block destination [155] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [52] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ -Resolved ranged comparison value [54] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 -Resolved ranged next value [72] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ -Resolved ranged comparison value [74] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 -Simplifying expression containing zero bitmap_clear::$0 in [84] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0 +Resolved ranged next value [56] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ +Resolved ranged comparison value [58] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 +Resolved ranged next value [76] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ +Resolved ranged comparison value [78] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 +Simplifying expression containing zero bitmap_clear::$0 in [88] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0 Successful SSA optimization PassNSimplifyExpressionWithZero -Eliminating unused variable (void*) memset::return#2 and assignment [35] (void*) memset::return#2 ← (void*) memset::str#2 -Eliminating unused variable (void*) memset::return#3 and assignment [38] (void*) memset::return#3 ← (void*) memset::str#2 +Eliminating unused variable (void*) memset::return#2 and assignment [36] (void*) memset::return#2 ← (void*) memset::str#3 +Eliminating unused variable (void*) memset::return#3 and assignment [39] (void*) memset::return#3 ← (void*) memset::str#3 Eliminating unused constant (const byte) bitmap_clear::bgcol#0 Eliminating unused constant (const byte*) bitmap_screen#0 Eliminating unused constant (const byte*) bitmap_gfx#0 @@ -1228,16 +1253,16 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte~) bitmap_init::$7 = (byte~) bitmap_init::$3 Alias (byte) bitmap_clear::col#0 = (byte~) bitmap_clear::$0 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$8 [70] if((word) main::x#1==(word) $13f) goto main::@8 -Simple Condition (bool~) main::$13 [74] if((byte) main::y#1==(byte) $c7) goto main::@9 -Simple Condition (bool~) main::$9 [98] if((word) main::x#1==(byte) 0) goto main::@8 -Simple Condition (bool~) main::$14 [99] if((byte) main::y#1==(byte) 0) goto main::@9 +Simple Condition (bool~) main::$8 [71] if((word) main::x#1==(word) $13f) goto main::@8 +Simple Condition (bool~) main::$13 [75] if((byte) main::y#1==(byte) $c7) goto main::@9 +Simple Condition (bool~) main::$9 [99] if((word) main::x#1==(byte) 0) goto main::@8 +Simple Condition (bool~) main::$14 [100] if((byte) main::y#1==(byte) 0) goto main::@9 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [98] if((word) main::x#1!=(byte) 0) goto main::@4 -Negating conditional jump and destination [99] if((byte) main::y#1!=(byte) 0) goto main::@5 +Negating conditional jump and destination [99] if((word) main::x#1!=(byte) 0) goto main::@4 +Negating conditional jump and destination [100] if((byte) main::y#1!=(byte) 0) goto main::@5 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement -Constant right-side identified [30] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 -Constant right-side identified [47] (byte~) main::$2 ← (const byte) VIC_BMM#0 | (const byte) VIC_DEN#0 +Constant right-side identified [31] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 +Constant right-side identified [48] (byte~) main::$2 ← (const byte) VIC_BMM#0 | (const byte) VIC_DEN#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) bitmap_clear::col#0 = bitmap_clear::fgcol#0*$10 Constant (const void*) memset::str#0 = (void*)bitmap_screen#1 @@ -1248,36 +1273,36 @@ Constant (const word) main::toD0181_$4#0 = (word)main::toD0181_gfx#0 Successful SSA optimization Pass2ConstantIdentification Constant (const byte) memset::c#0 = bitmap_clear::col#0 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [41] (byte~) main::$3 ← (const byte) main::$2 | (const byte) VIC_RSEL#0 -Constant right-side identified [44] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff -Constant right-side identified [47] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 +Constant right-side identified [42] (byte~) main::$3 ← (const byte) main::$2 | (const byte) VIC_RSEL#0 +Constant right-side identified [45] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff +Constant right-side identified [48] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$3 = main::$2|VIC_RSEL#0 Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&$3fff Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [41] (byte~) main::$4 ← (const byte) main::$3 | (byte) 3 -Constant right-side identified [43] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 -Constant right-side identified [45] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 +Constant right-side identified [42] (byte~) main::$4 ← (const byte) main::$3 | (byte) 3 +Constant right-side identified [44] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 +Constant right-side identified [46] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$4 = main::$3|3 Constant (const word) main::toD0181_$2#0 = main::toD0181_$1#0*4 Constant (const byte) main::toD0181_$6#0 = main::toD0181_$5#0/4 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [42] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 -Constant right-side identified [43] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f +Constant right-side identified [43] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 +Constant right-side identified [44] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::toD0181_$3#0 = >main::toD0181_$2#0 Constant (const byte) main::toD0181_$7#0 = main::toD0181_$6#0&$f Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [42] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 +Constant right-side identified [43] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0 Successful SSA optimization Pass2ConstantIdentification -Inlining Noop Cast [1] (byte*~) memset::$0 ← (byte*)(void*) memset::str#2 keeping memset::str#2 -Inlining Noop Cast [3] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 keeping memset::str#2 +Inlining Noop Cast [2] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 keeping memset::str#3 +Inlining Noop Cast [4] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 keeping memset::str#3 Successful SSA optimization Pass2NopCastInlining -Inlining Noop Cast [33] (byte*) bitmap_plot::plotter#0 ← (byte*)(word~) bitmap_plot::$3 keeping bitmap_plot::plotter#0 +Inlining Noop Cast [34] (byte*) bitmap_plot::plotter#0 ← (byte*)(word~) bitmap_plot::$3 keeping bitmap_plot::plotter#0 Successful SSA optimization Pass2NopCastInlining Inlining constant with var siblings (const word) memset::num#0 Inlining constant with var siblings (const byte) memset::c#1 @@ -1327,7 +1352,7 @@ Constant inlined main::$4 = (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const Constant inlined bitmap_init::x#0 = (byte) 0 Constant inlined memset::c#1 = (byte) 0 Successful SSA optimization Pass2ConstantInlining -Added new block during phi lifting memset::@4(between memset::@1 and memset::@1) +Added new block during phi lifting memset::@6(between memset::@4 and memset::@4) Added new block during phi lifting bitmap_init::@9(between bitmap_init::@2 and bitmap_init::@1) Added new block during phi lifting bitmap_init::@10(between bitmap_init::@1 and bitmap_init::@2) Added new block during phi lifting bitmap_init::@11(between bitmap_init::@6 and bitmap_init::@5) @@ -1349,7 +1374,7 @@ Adding NOP phi() at start of main::@14 Adding NOP phi() at start of bitmap_clear Adding NOP phi() at start of bitmap_clear::@1 Adding NOP phi() at start of bitmap_clear::@2 -Adding NOP phi() at start of memset::@2 +Adding NOP phi() at start of memset::@1 Adding NOP phi() at start of bitmap_init Adding NOP phi() at start of bitmap_init::@3 Adding NOP phi() at start of bitmap_init::@4 @@ -1367,16 +1392,16 @@ Coalesced [37] main::vx#9 ← main::vx#6 Coalesced [38] main::vy#9 ← main::vy#8 Coalesced (already) [39] main::vy#10 ← main::vy#2 Coalesced (already) [40] main::vx#10 ← main::vx#2 -Coalesced [72] memset::dst#4 ← memset::dst#1 -Coalesced [92] bitmap_init::yoffs#7 ← bitmap_init::yoffs#1 -Coalesced [97] bitmap_init::y#5 ← bitmap_init::y#1 -Coalesced [98] bitmap_init::yoffs#5 ← bitmap_init::yoffs#4 -Coalesced (already) [99] bitmap_init::yoffs#6 ← bitmap_init::yoffs#2 -Coalesced [100] bitmap_init::bits#5 ← bitmap_init::bits#4 -Coalesced [101] bitmap_init::x#5 ← bitmap_init::x#1 -Coalesced [102] bitmap_init::bits#6 ← bitmap_init::bits#1 -Coalesced [106] frame_cnt#23 ← frame_cnt#1 -Coalesced [111] frame_cnt#22 ← frame_cnt#0 +Coalesced [73] memset::dst#4 ← memset::dst#1 +Coalesced [93] bitmap_init::yoffs#7 ← bitmap_init::yoffs#1 +Coalesced [98] bitmap_init::y#5 ← bitmap_init::y#1 +Coalesced [99] bitmap_init::yoffs#5 ← bitmap_init::yoffs#4 +Coalesced (already) [100] bitmap_init::yoffs#6 ← bitmap_init::yoffs#2 +Coalesced [101] bitmap_init::bits#5 ← bitmap_init::bits#4 +Coalesced [102] bitmap_init::x#5 ← bitmap_init::x#1 +Coalesced [103] bitmap_init::bits#6 ← bitmap_init::bits#1 +Coalesced [107] frame_cnt#23 ← frame_cnt#1 +Coalesced [112] frame_cnt#22 ← frame_cnt#0 Coalesced down to 13 phi equivalence classes Culled Empty Block (label) @8 Culled Empty Block (label) @14 @@ -1386,8 +1411,8 @@ Culled Empty Block (label) main::@14 Culled Empty Block (label) main::@19 Culled Empty Block (label) main::@18 Culled Empty Block (label) bitmap_clear::@2 -Culled Empty Block (label) memset::@2 -Culled Empty Block (label) memset::@4 +Culled Empty Block (label) memset::@1 +Culled Empty Block (label) memset::@6 Culled Empty Block (label) bitmap_init::@3 Culled Empty Block (label) bitmap_init::@4 Culled Empty Block (label) bitmap_init::@11 @@ -1396,6 +1421,8 @@ Culled Empty Block (label) bitmap_init::@9 Culled Empty Block (label) irq::@3 Renumbering block @15 to @1 Renumbering block @17 to @2 +Renumbering block memset::@2 to memset::@1 +Renumbering block memset::@4 to memset::@2 Renumbering block bitmap_init::@5 to bitmap_init::@3 Renumbering block bitmap_init::@6 to bitmap_init::@4 Renumbering block bitmap_init::@7 to bitmap_init::@5 @@ -1525,74 +1552,77 @@ bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 to:@return memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [49] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) + [49] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) [49] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 ) - [49] (void*) memset::str#2 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) - [50] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 - [51] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + [50] if((word) memset::num#2<=(byte) 0) goto memset::@return to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - [52] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) - [53] *((byte*) memset::dst#2) ← (byte) memset::c#3 - [54] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - [55] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 +memset::@1: scope:[memset] from memset + [51] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 + [52] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + to:memset::@2 +memset::@2: scope:[memset] from memset::@1 memset::@2 + [53] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 ) + [54] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [55] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [56] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 to:memset::@return -memset::@return: scope:[memset] from memset::@1 - [56] return +memset::@return: scope:[memset] from memset memset::@2 + [57] return to:@return bitmap_init: scope:[bitmap_init] from main - [57] phi() + [58] phi() to:bitmap_init::@1 bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2 - [58] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) - [58] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) - [59] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 - [60] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 - [61] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 + [59] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) + [59] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) + [60] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 + [61] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 + [62] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 to:bitmap_init::@2 bitmap_init::@6: scope:[bitmap_init] from bitmap_init::@1 - [62] phi() + [63] phi() to:bitmap_init::@2 bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6 - [63] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) - [64] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 - [65] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 + [64] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) + [65] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 + [66] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 to:bitmap_init::@3 bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4 - [66] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) - [66] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) - [67] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 - [68] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 - [69] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 - [70] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 - [71] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 - [72] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 - [73] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 + [67] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) + [67] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) + [68] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 + [69] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 + [70] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 + [71] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 + [72] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 + [73] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 + [74] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 to:bitmap_init::@5 bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@3 - [74] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 + [75] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 to:bitmap_init::@4 bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 - [75] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) - [76] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 - [77] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 + [76] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) + [77] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 + [78] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 to:bitmap_init::@return bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 - [78] return + [79] return to:@return irq: scope:[irq] from - [79] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 - [80] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 + [80] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 + [81] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 to:irq::@2 irq::@2: scope:[irq] from irq - [81] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 + [82] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 to:irq::@1 irq::@1: scope:[irq] from irq irq::@2 - [82] (byte) frame_cnt#10 ← phi( irq/(byte) frame_cnt#0 irq::@2/(byte) frame_cnt#1 ) - [83] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 - [84] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + [83] (byte) frame_cnt#10 ← phi( irq/(byte) frame_cnt#0 irq::@2/(byte) frame_cnt#1 ) + [84] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 + [85] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 to:irq::@return irq::@return: scope:[irq] from irq::@1 - [85] return + [86] return to:@return @@ -1694,7 +1724,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (byte) main::y#2 6.6000000000000005 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (byte) memset::c -(byte) memset::c#3 1.5714285714285714 +(byte) memset::c#3 1.375 (byte*) memset::dst (byte*) memset::dst#1 16.5 (byte*) memset::dst#2 17.5 @@ -1705,7 +1735,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (word) memset::num#2 2.0 (void*) memset::return (void*) memset::str -(void*) memset::str#2 +(void*) memset::str#3 (byte[$100]) plots_per_frame Initial phi equivalence classes @@ -1713,8 +1743,8 @@ Initial phi equivalence classes [ main::y#2 main::y#1 ] [ main::vx#2 main::vx#6 main::vx#1 ] [ main::vy#2 main::vy#8 main::vy#1 ] -[ memset::str#2 ] [ memset::num#2 ] +[ memset::str#3 ] [ memset::c#3 ] [ memset::dst#2 memset::dst#3 memset::dst#1 ] [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] @@ -1738,8 +1768,8 @@ Complete equivalence classes [ main::y#2 main::y#1 ] [ main::vx#2 main::vx#6 main::vx#1 ] [ main::vy#2 main::vy#8 main::vy#1 ] -[ memset::str#2 ] [ memset::num#2 ] +[ memset::str#3 ] [ memset::c#3 ] [ memset::dst#2 memset::dst#3 memset::dst#1 ] [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] @@ -1762,8 +1792,8 @@ Allocated zp ZP_WORD:2 [ main::x#2 main::x#1 ] Allocated zp ZP_BYTE:4 [ main::y#2 main::y#1 ] Allocated zp ZP_WORD:5 [ main::vx#2 main::vx#6 main::vx#1 ] Allocated zp ZP_BYTE:7 [ main::vy#2 main::vy#8 main::vy#1 ] -Allocated zp ZP_WORD:8 [ memset::str#2 ] -Allocated zp ZP_WORD:10 [ memset::num#2 ] +Allocated zp ZP_WORD:8 [ memset::num#2 ] +Allocated zp ZP_WORD:10 [ memset::str#3 ] Allocated zp ZP_BYTE:12 [ memset::c#3 ] Allocated zp ZP_WORD:13 [ memset::dst#2 memset::dst#3 memset::dst#1 ] Allocated zp ZP_BYTE:15 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] @@ -1857,7 +1887,7 @@ main: { .label vx = 5 .label vy = 7 // [6] call bitmap_init - // [57] phi from main to bitmap_init [phi:main->bitmap_init] + // [58] phi from main to bitmap_init [phi:main->bitmap_init] bitmap_init_from_main: jsr bitmap_init // [7] phi from main to main::@8 [phi:main->main::@8] @@ -2111,16 +2141,16 @@ bitmap_clear: { // [49] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuz1=vbuc1 lda #col sta memset.c - // [49] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 - lda #<$3e8 - sta memset.num - lda #>$3e8 - sta memset.num+1 - // [49] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + // [49] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 + // [49] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#2] -- vwuz1=vwuc1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 jsr memset // [46] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] b1_from_bitmap_clear: @@ -2133,16 +2163,16 @@ bitmap_clear: { // [49] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuz1=vbuc1 lda #0 sta memset.c - // [49] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 - lda #<$1f40 - sta memset.num - lda #>$1f40 - sta memset.num+1 - // [49] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + // [49] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1 lda #<BITMAP sta memset.str lda #>BITMAP sta memset.str+1 + // [49] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#2] -- vwuz1=vwuc1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 jsr memset jmp breturn // bitmap_clear::@return @@ -2152,14 +2182,22 @@ bitmap_clear: { } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage(8) str, byte zeropage($c) c, word zeropage($a) num) +// memset(void* zeropage($a) str, byte zeropage($c) c, word zeropage(8) num) memset: { .label end = $1f .label dst = $d - .label str = 8 - .label num = $a + .label num = 8 + .label str = $a .label c = $c - // [50] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz3 + // [50] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 + lda num + beq breturn + lda num+1 + beq breturn + jmp b1 + // memset::@1 + b1: + // [51] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz3 lda str clc adc num @@ -2167,38 +2205,38 @@ memset: { lda str+1 adc num+1 sta end+1 - // [51] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 -- pbuz1=pbuz2 + // [52] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 -- pbuz1=pbuz2 lda str sta dst lda str+1 sta dst+1 - // [52] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - b1_from_memset: - b1_from_b1: - // [52] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - jmp b1 - // memset::@1 - b1: - // [53] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuz2 + // [53] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + b2_from_b1: + b2_from_b2: + // [53] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + jmp b2 + // memset::@2 + b2: + // [54] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuz2 lda c ldy #0 sta (dst),y - // [54] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [55] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [55] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [56] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1_from_b1 + bne b2_from_b2 lda dst cmp end - bne b1_from_b1 + bne b2_from_b2 jmp breturn // memset::@return breturn: - // [56] return + // [57] return rts } // bitmap_init @@ -2212,103 +2250,103 @@ bitmap_init: { .label x = $10 .label y = $11 .label yoffs = $12 - // [58] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + // [59] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] b1_from_bitmap_init: - // [58] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuz1=vbuc1 + // [59] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuz1=vbuc1 lda #0 sta x - // [58] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuz1=vbuc1 + // [59] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuz1=vbuc1 lda #$80 sta bits jmp b1 - // [58] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + // [59] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] b1_from_b2: - // [58] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - // [58] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + // [59] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + // [59] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy jmp b1 // bitmap_init::@1 b1: - // [59] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuz1=vbuz2 + // [60] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuz1=vbuz2 lda bits ldy x sta bitmap_plot_bit,y - // [60] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuz1=vbuz1_ror_1 + // [61] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuz1=vbuz1_ror_1 lsr bits - // [61] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuz1_neq_0_then_la1 + // [62] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuz1_neq_0_then_la1 lda bits cmp #0 bne b6_from_b1 - // [63] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + // [64] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] b2_from_b1: - // [63] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuz1=vbuc1 + // [64] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuz1=vbuc1 lda #$80 sta bits jmp b2 - // [62] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + // [63] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] b6_from_b1: jmp b6 // bitmap_init::@6 b6: - // [63] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + // [64] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] b2_from_b6: - // [63] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + // [64] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy jmp b2 // bitmap_init::@2 b2: - // [64] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuz1=_inc_vbuz1 + // [65] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuz1=_inc_vbuz1 inc x - // [65] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuz1_neq_0_then_la1 + // [66] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuz1_neq_0_then_la1 lda x cmp #0 bne b1_from_b2 - // [66] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + // [67] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] b3_from_b2: - // [66] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + // [67] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #<BITMAP sta yoffs lda #>BITMAP sta yoffs+1 - // [66] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuz1=vbuc1 + // [67] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuz1=vbuc1 lda #0 sta y jmp b3 - // [66] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + // [67] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] b3_from_b4: - // [66] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - // [66] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + // [67] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + // [67] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy jmp b3 // bitmap_init::@3 b3: - // [67] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 + // [68] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 lda #7 and y sta _7 - // [68] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuz1=_lo_pbuz2 + // [69] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuz1=_lo_pbuz2 lda yoffs sta _4 - // [69] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuz1=vbuz2_bor_vbuz3 + // [70] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuz1=vbuz2_bor_vbuz3 lda _7 ora _4 sta _5 - // [70] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuz1=vbuz2 + // [71] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuz1=vbuz2 lda _5 ldy y sta bitmap_plot_ylo,y - // [71] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuz1=_hi_pbuz2 + // [72] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuz1=_hi_pbuz2 lda yoffs+1 sta _6 - // [72] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuz1=vbuz2 + // [73] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuz1=vbuz2 lda _6 ldy y sta bitmap_plot_yhi,y - // [73] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + // [74] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp _7 bne b4_from_b3 jmp b5 // bitmap_init::@5 b5: - // [74] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + // [75] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda yoffs adc #<$28*8 @@ -2316,23 +2354,23 @@ bitmap_init: { lda yoffs+1 adc #>$28*8 sta yoffs+1 - // [75] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + // [76] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] b4_from_b3: b4_from_b5: - // [75] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + // [76] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy jmp b4 // bitmap_init::@4 b4: - // [76] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuz1=_inc_vbuz1 + // [77] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuz1=_inc_vbuz1 inc y - // [77] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuz1_neq_0_then_la1 + // [78] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuz1_neq_0_then_la1 lda y cmp #0 bne b3_from_b4 jmp breturn // bitmap_init::@return breturn: - // [78] return + // [79] return rts } // irq @@ -2342,36 +2380,36 @@ irq: { sta rega+1 stx regx+1 sty regy+1 - // [79] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + // [80] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 lda #WHITE sta BGCOL - // [80] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 + // [81] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp frame_cnt beq b1_from_irq jmp b2 // irq::@2 b2: - // [81] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 + // [82] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 inc frame_cnt - // [82] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] + // [83] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] b1_from_irq: b1_from_b2: - // [82] phi (byte) frame_cnt#10 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy + // [83] phi (byte) frame_cnt#10 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy jmp b1 // irq::@1 b1: - // [83] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 + // [84] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 lda #BLACK sta BGCOL - // [84] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // [85] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS jmp breturn // irq::@return breturn: - // [85] return - exit interrupt(HARDWARE_CLOBBER) + // [86] return - exit interrupt(HARDWARE_CLOBBER) rega: lda #00 regx: @@ -2418,19 +2456,20 @@ Statement [38] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) Statement [39] *((const byte*) RASTER#0) ← (byte) 0 [ ] ( main:3::init_irq:12 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [40] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:3::init_irq:12 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [41] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() [ ] ( main:3::init_irq:12 [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [50] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [50] if((word) memset::num#2<=(byte) 0) goto memset::@return [ memset::num#2 memset::str#3 memset::c#3 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::num#2 memset::str#3 memset::c#3 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::num#2 memset::str#3 memset::c#3 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:12 [ memset::c#3 ] -Statement [51] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a -Statement [53] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [51] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 [ memset::str#3 memset::c#3 memset::end#0 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::str#3 memset::c#3 memset::end#0 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::str#3 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [52] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [54] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:12 [ memset::c#3 ] -Statement [55] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a -Statement [74] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:6 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a +Statement [56] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [75] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:6 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:17 [ bitmap_init::y#2 bitmap_init::y#1 ] -Statement [79] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [80] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [83] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [84] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [85] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +Statement [80] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [81] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [84] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [85] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [86] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y Statement [1] (byte) frame_cnt#0 ← (byte) 1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a Statement [9] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [11] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a @@ -2456,23 +2495,24 @@ Statement [38] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) Statement [39] *((const byte*) RASTER#0) ← (byte) 0 [ ] ( main:3::init_irq:12 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [40] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:3::init_irq:12 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [41] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() [ ] ( main:3::init_irq:12 [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [50] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a -Statement [51] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a -Statement [53] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y -Statement [55] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a -Statement [67] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ( main:3::bitmap_init:6 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ) always clobbers reg byte a -Statement [74] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:6 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a -Statement [79] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [80] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [83] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [84] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [85] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +Statement [50] if((word) memset::num#2<=(byte) 0) goto memset::@return [ memset::num#2 memset::str#3 memset::c#3 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::num#2 memset::str#3 memset::c#3 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::num#2 memset::str#3 memset::c#3 ] ) always clobbers reg byte a +Statement [51] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 [ memset::str#3 memset::c#3 memset::end#0 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::str#3 memset::c#3 memset::end#0 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::str#3 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [52] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [54] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [56] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [68] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ( main:3::bitmap_init:6 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ) always clobbers reg byte a +Statement [75] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:6 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a +Statement [80] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [81] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [84] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [85] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [86] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y Potential registers zp ZP_WORD:2 [ main::x#2 main::x#1 ] : zp ZP_WORD:2 , Potential registers zp ZP_BYTE:4 [ main::y#2 main::y#1 ] : zp ZP_BYTE:4 , Potential registers zp ZP_WORD:5 [ main::vx#2 main::vx#6 main::vx#1 ] : zp ZP_WORD:5 , Potential registers zp ZP_BYTE:7 [ main::vy#2 main::vy#8 main::vy#1 ] : zp ZP_BYTE:7 , -Potential registers zp ZP_WORD:8 [ memset::str#2 ] : zp ZP_WORD:8 , -Potential registers zp ZP_WORD:10 [ memset::num#2 ] : zp ZP_WORD:10 , +Potential registers zp ZP_WORD:8 [ memset::num#2 ] : zp ZP_WORD:8 , +Potential registers zp ZP_WORD:10 [ memset::str#3 ] : zp ZP_WORD:10 , Potential registers zp ZP_BYTE:12 [ memset::c#3 ] : zp ZP_BYTE:12 , reg byte x , Potential registers zp ZP_WORD:13 [ memset::dst#2 memset::dst#3 memset::dst#1 ] : zp ZP_WORD:13 , Potential registers zp ZP_BYTE:15 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] : zp ZP_BYTE:15 , reg byte a , reg byte x , reg byte y , @@ -2496,36 +2536,36 @@ REGISTER UPLIFT SCOPES Uplift Scope [bitmap_init] 39.88: zp ZP_WORD:18 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] 34.83: zp ZP_BYTE:15 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] 22: zp ZP_BYTE:16 [ bitmap_init::x#2 bitmap_init::x#1 ] 22: zp ZP_BYTE:17 [ bitmap_init::y#2 bitmap_init::y#1 ] 22: zp ZP_BYTE:34 [ bitmap_init::$4 ] 22: zp ZP_BYTE:35 [ bitmap_init::$5 ] 22: zp ZP_BYTE:36 [ bitmap_init::$6 ] 5.5: zp ZP_BYTE:33 [ bitmap_init::$7 ] Uplift Scope [main] 42.17: zp ZP_BYTE:7 [ main::vy#2 main::vy#8 main::vy#1 ] 33: zp ZP_WORD:5 [ main::vx#2 main::vx#6 main::vx#1 ] 12.25: zp ZP_WORD:2 [ main::x#2 main::x#1 ] 11: zp ZP_BYTE:4 [ main::y#2 main::y#1 ] Uplift Scope [] 45.11: zp ZP_BYTE:20 [ frame_cnt#10 frame_cnt#0 frame_cnt#1 ] -Uplift Scope [memset] 38: zp ZP_WORD:13 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:31 [ memset::end#0 ] 2: zp ZP_WORD:10 [ memset::num#2 ] 1.57: zp ZP_BYTE:12 [ memset::c#3 ] 0: zp ZP_WORD:8 [ memset::str#2 ] +Uplift Scope [memset] 38: zp ZP_WORD:13 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:31 [ memset::end#0 ] 2: zp ZP_WORD:8 [ memset::num#2 ] 1.38: zp ZP_BYTE:12 [ memset::c#3 ] 0: zp ZP_WORD:10 [ memset::str#3 ] Uplift Scope [bitmap_plot] 15: zp ZP_BYTE:23 [ bitmap_plot::y#0 ] 4: zp ZP_WORD:26 [ bitmap_plot::$1 ] 4: zp ZP_BYTE:30 [ bitmap_plot::$2 ] 3: zp ZP_WORD:21 [ bitmap_plot::x#0 ] 3: zp ZP_WORD:28 [ bitmap_plot::plotter#1 ] 1: zp ZP_WORD:24 [ bitmap_plot::plotter#0 ] Uplift Scope [bitmap_clear] Uplift Scope [init_irq] Uplift Scope [irq] -Uplifting [bitmap_init] best 4327 combination zp ZP_WORD:18 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp ZP_BYTE:35 [ bitmap_init::$5 ] zp ZP_BYTE:36 [ bitmap_init::$6 ] zp ZP_BYTE:33 [ bitmap_init::$7 ] +Uplifting [bitmap_init] best 4341 combination zp ZP_WORD:18 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp ZP_BYTE:35 [ bitmap_init::$5 ] zp ZP_BYTE:36 [ bitmap_init::$6 ] zp ZP_BYTE:33 [ bitmap_init::$7 ] Limited combination testing to 100 combinations of 15360 possible. -Uplifting [main] best 4327 combination zp ZP_BYTE:7 [ main::vy#2 main::vy#8 main::vy#1 ] zp ZP_WORD:5 [ main::vx#2 main::vx#6 main::vx#1 ] zp ZP_WORD:2 [ main::x#2 main::x#1 ] zp ZP_BYTE:4 [ main::y#2 main::y#1 ] -Uplifting [] best 4327 combination zp ZP_BYTE:20 [ frame_cnt#10 frame_cnt#0 frame_cnt#1 ] -Uplifting [memset] best 4311 combination zp ZP_WORD:13 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:31 [ memset::end#0 ] zp ZP_WORD:10 [ memset::num#2 ] reg byte x [ memset::c#3 ] zp ZP_WORD:8 [ memset::str#2 ] -Uplifting [bitmap_plot] best 4274 combination reg byte x [ bitmap_plot::y#0 ] zp ZP_WORD:26 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp ZP_WORD:21 [ bitmap_plot::x#0 ] zp ZP_WORD:28 [ bitmap_plot::plotter#1 ] zp ZP_WORD:24 [ bitmap_plot::plotter#0 ] -Uplifting [bitmap_clear] best 4274 combination -Uplifting [init_irq] best 4274 combination -Uplifting [irq] best 4274 combination +Uplifting [main] best 4341 combination zp ZP_BYTE:7 [ main::vy#2 main::vy#8 main::vy#1 ] zp ZP_WORD:5 [ main::vx#2 main::vx#6 main::vx#1 ] zp ZP_WORD:2 [ main::x#2 main::x#1 ] zp ZP_BYTE:4 [ main::y#2 main::y#1 ] +Uplifting [] best 4341 combination zp ZP_BYTE:20 [ frame_cnt#10 frame_cnt#0 frame_cnt#1 ] +Uplifting [memset] best 4325 combination zp ZP_WORD:13 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:31 [ memset::end#0 ] zp ZP_WORD:8 [ memset::num#2 ] reg byte x [ memset::c#3 ] zp ZP_WORD:10 [ memset::str#3 ] +Uplifting [bitmap_plot] best 4288 combination reg byte x [ bitmap_plot::y#0 ] zp ZP_WORD:26 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp ZP_WORD:21 [ bitmap_plot::x#0 ] zp ZP_WORD:28 [ bitmap_plot::plotter#1 ] zp ZP_WORD:24 [ bitmap_plot::plotter#0 ] +Uplifting [bitmap_clear] best 4288 combination +Uplifting [init_irq] best 4288 combination +Uplifting [irq] best 4288 combination Attempting to uplift remaining variables inzp ZP_BYTE:20 [ frame_cnt#10 frame_cnt#0 frame_cnt#1 ] -Uplifting [] best 4274 combination zp ZP_BYTE:20 [ frame_cnt#10 frame_cnt#0 frame_cnt#1 ] +Uplifting [] best 4288 combination zp ZP_BYTE:20 [ frame_cnt#10 frame_cnt#0 frame_cnt#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:7 [ main::vy#2 main::vy#8 main::vy#1 ] -Uplifting [main] best 4274 combination zp ZP_BYTE:7 [ main::vy#2 main::vy#8 main::vy#1 ] +Uplifting [main] best 4288 combination zp ZP_BYTE:7 [ main::vy#2 main::vy#8 main::vy#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:35 [ bitmap_init::$5 ] -Uplifting [bitmap_init] best 4214 combination reg byte a [ bitmap_init::$5 ] +Uplifting [bitmap_init] best 4228 combination reg byte a [ bitmap_init::$5 ] Attempting to uplift remaining variables inzp ZP_BYTE:36 [ bitmap_init::$6 ] -Uplifting [bitmap_init] best 4154 combination reg byte a [ bitmap_init::$6 ] +Uplifting [bitmap_init] best 4168 combination reg byte a [ bitmap_init::$6 ] Attempting to uplift remaining variables inzp ZP_BYTE:4 [ main::y#2 main::y#1 ] -Uplifting [main] best 4154 combination zp ZP_BYTE:4 [ main::y#2 main::y#1 ] +Uplifting [main] best 4168 combination zp ZP_BYTE:4 [ main::y#2 main::y#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:33 [ bitmap_init::$7 ] -Uplifting [bitmap_init] best 4154 combination zp ZP_BYTE:33 [ bitmap_init::$7 ] +Uplifting [bitmap_init] best 4168 combination zp ZP_BYTE:33 [ bitmap_init::$7 ] Coalescing zero page register with common assignment [ zp ZP_WORD:2 [ main::x#2 main::x#1 ] ] with [ zp ZP_WORD:21 [ bitmap_plot::x#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:8 [ memset::str#2 ] ] with [ zp ZP_WORD:13 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:10 [ memset::num#2 ] ] with [ zp ZP_WORD:31 [ memset::end#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:8 [ memset::num#2 ] ] with [ zp ZP_WORD:31 [ memset::end#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:10 [ memset::str#3 ] ] with [ zp ZP_WORD:13 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:24 [ bitmap_plot::plotter#0 ] ] with [ zp ZP_WORD:28 [ bitmap_plot::plotter#1 ] ] - score: 1 Allocated (was zp ZP_WORD:18) zp ZP_WORD:12 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] Allocated (was zp ZP_BYTE:20) zp ZP_BYTE:14 [ frame_cnt#10 frame_cnt#0 frame_cnt#1 ] @@ -2533,12 +2573,12 @@ Allocated (was zp ZP_WORD:24) zp ZP_WORD:15 [ bitmap_plot::plotter#0 bitmap_plot Allocated (was zp ZP_WORD:26) zp ZP_WORD:17 [ bitmap_plot::$1 ] Allocated (was zp ZP_BYTE:33) zp ZP_BYTE:19 [ bitmap_init::$7 ] Interrupt procedure irq clobbers ACNZ -Removing interrupt register storage stx regx+1 in SEG151 entry interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage sty regy+1 in SEG151 entry interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage regx: in SEG162 [85] return - exit interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage ldx #00 in SEG162 [85] return - exit interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage regy: in SEG162 [85] return - exit interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage ldy #00 in SEG162 [85] return - exit interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage stx regx+1 in SEG153 entry interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage sty regy+1 in SEG153 entry interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage regx: in SEG164 [86] return - exit interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage ldx #00 in SEG164 [86] return - exit interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage regy: in SEG164 [86] return - exit interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage ldy #00 in SEG164 [86] return - exit interrupt(HARDWARE_CLOBBER) ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -2614,7 +2654,7 @@ main: { .label vx = 5 .label vy = 7 // [6] call bitmap_init - // [57] phi from main to bitmap_init [phi:main->bitmap_init] + // [58] phi from main to bitmap_init [phi:main->bitmap_init] bitmap_init_from_main: jsr bitmap_init // [7] phi from main to main::@8 [phi:main->main::@8] @@ -2857,16 +2897,16 @@ bitmap_clear: { memset_from_bitmap_clear: // [49] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1 ldx #col - // [49] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 - lda #<$3e8 - sta memset.num - lda #>$3e8 - sta memset.num+1 - // [49] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + // [49] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 + // [49] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#2] -- vwuz1=vwuc1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 jsr memset // [46] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] b1_from_bitmap_clear: @@ -2878,16 +2918,16 @@ bitmap_clear: { memset_from_b1: // [49] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1 ldx #0 - // [49] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 - lda #<$1f40 - sta memset.num - lda #>$1f40 - sta memset.num+1 - // [49] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + // [49] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1 lda #<BITMAP sta memset.str lda #>BITMAP sta memset.str+1 + // [49] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#2] -- vwuz1=vwuc1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 jsr memset jmp breturn // bitmap_clear::@return @@ -2897,13 +2937,21 @@ bitmap_clear: { } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage(8) str, byte register(X) c, word zeropage($a) num) +// memset(void* zeropage($a) str, byte register(X) c, word zeropage(8) num) memset: { - .label end = $a - .label dst = 8 - .label str = 8 - .label num = $a - // [50] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 + .label end = 8 + .label dst = $a + .label num = 8 + .label str = $a + // [50] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 + lda num + beq breturn + lda num+1 + beq breturn + jmp b1 + // memset::@1 + b1: + // [51] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 lda end clc adc str @@ -2911,34 +2959,34 @@ memset: { lda end+1 adc str+1 sta end+1 - // [51] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 - // [52] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - b1_from_memset: - b1_from_b1: - // [52] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - jmp b1 - // memset::@1 - b1: - // [53] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx + // [52] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + // [53] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + b2_from_b1: + b2_from_b2: + // [53] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + jmp b2 + // memset::@2 + b2: + // [54] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx txa ldy #0 sta (dst),y - // [54] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [55] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [55] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [56] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1_from_b1 + bne b2_from_b2 lda dst cmp end - bne b1_from_b1 + bne b2_from_b2 jmp breturn // memset::@return breturn: - // [56] return + // [57] return rts } // bitmap_init @@ -2946,86 +2994,86 @@ memset: { bitmap_init: { .label _7 = $13 .label yoffs = $c - // [58] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + // [59] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] b1_from_bitmap_init: - // [58] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 + // [59] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 ldx #0 - // [58] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 + // [59] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 lda #$80 jmp b1 - // [58] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + // [59] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] b1_from_b2: - // [58] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - // [58] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + // [59] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + // [59] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy jmp b1 // bitmap_init::@1 b1: - // [59] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa + // [60] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_bit,x - // [60] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 + // [61] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 lsr - // [61] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 + // [62] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 cmp #0 bne b6_from_b1 - // [63] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + // [64] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] b2_from_b1: - // [63] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 + // [64] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 lda #$80 jmp b2 - // [62] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + // [63] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] b6_from_b1: jmp b6 // bitmap_init::@6 b6: - // [63] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + // [64] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] b2_from_b6: - // [63] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + // [64] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy jmp b2 // bitmap_init::@2 b2: - // [64] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx + // [65] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx inx - // [65] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 + // [66] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 cpx #0 bne b1_from_b2 - // [66] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + // [67] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] b3_from_b2: - // [66] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + // [67] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #<BITMAP sta yoffs lda #>BITMAP sta yoffs+1 - // [66] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 + // [67] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 ldx #0 jmp b3 - // [66] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + // [67] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] b3_from_b4: - // [66] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - // [66] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + // [67] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + // [67] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy jmp b3 // bitmap_init::@3 b3: - // [67] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 + // [68] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 lda #7 sax _7 - // [68] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 + // [69] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 lda yoffs - // [69] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa + // [70] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa ora _7 - // [70] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa + // [71] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_ylo,x - // [71] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 + // [72] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 lda yoffs+1 - // [72] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa + // [73] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_yhi,x - // [73] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + // [74] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp _7 bne b4_from_b3 jmp b5 // bitmap_init::@5 b5: - // [74] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + // [75] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda yoffs adc #<$28*8 @@ -3033,22 +3081,22 @@ bitmap_init: { lda yoffs+1 adc #>$28*8 sta yoffs+1 - // [75] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + // [76] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] b4_from_b3: b4_from_b5: - // [75] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + // [76] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy jmp b4 // bitmap_init::@4 b4: - // [76] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx + // [77] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx inx - // [77] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 + // [78] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 cpx #0 bne b3_from_b4 jmp breturn // bitmap_init::@return breturn: - // [78] return + // [79] return rts } // irq @@ -3056,36 +3104,36 @@ bitmap_init: { irq: { // entry interrupt(HARDWARE_CLOBBER) sta rega+1 - // [79] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + // [80] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 lda #WHITE sta BGCOL - // [80] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 + // [81] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp frame_cnt beq b1_from_irq jmp b2 // irq::@2 b2: - // [81] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 + // [82] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 inc frame_cnt - // [82] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] + // [83] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] b1_from_irq: b1_from_b2: - // [82] phi (byte) frame_cnt#10 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy + // [83] phi (byte) frame_cnt#10 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy jmp b1 // irq::@1 b1: - // [83] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 + // [84] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 lda #BLACK sta BGCOL - // [84] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // [85] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS jmp breturn // irq::@return breturn: - // [85] return - exit interrupt(HARDWARE_CLOBBER) + // [86] return - exit interrupt(HARDWARE_CLOBBER) rega: lda #00 rti @@ -3119,6 +3167,7 @@ Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp breturn Removing instruction jmp b1 +Removing instruction jmp b2 Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp b6 @@ -3141,8 +3190,8 @@ Replacing label b3_from_b11 with b3 Replacing label b3_from_b11 with b3 Replacing label b4_from_b12 with b4 Replacing label b1 with b2 -Replacing label b1_from_b1 with b1 -Replacing label b1_from_b1 with b1 +Replacing label b2_from_b2 with b2 +Replacing label b2_from_b2 with b2 Replacing label b6_from_b1 with b2 Replacing label b1_from_b2 with b1 Replacing label b4_from_b3 with b4 @@ -3163,8 +3212,8 @@ Removing instruction b4_from_b12: Removing instruction b4_from_b6: Removing instruction b1_from_bitmap_clear: Removing instruction memset_from_b1: -Removing instruction b1_from_memset: -Removing instruction b1_from_b1: +Removing instruction b2_from_b1: +Removing instruction b2_from_b2: Removing instruction b1_from_b2: Removing instruction b6_from_b1: Removing instruction b6: @@ -3192,7 +3241,7 @@ Removing instruction breturn: Removing instruction memset_from_bitmap_clear: Removing instruction b1: Removing instruction breturn: -Removing instruction breturn: +Removing instruction b1: Removing instruction b1_from_bitmap_init: Removing instruction b2_from_b1: Removing instruction b3_from_b2: @@ -3363,20 +3412,21 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (byte) main::y#2 y zp ZP_BYTE:4 6.6000000000000005 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (label) memset::@1 +(label) memset::@2 (label) memset::@return (byte) memset::c -(byte) memset::c#3 reg byte x 1.5714285714285714 +(byte) memset::c#3 reg byte x 1.375 (byte*) memset::dst -(byte*) memset::dst#1 dst zp ZP_WORD:8 16.5 -(byte*) memset::dst#2 dst zp ZP_WORD:8 17.5 -(byte*~) memset::dst#3 dst zp ZP_WORD:8 4.0 +(byte*) memset::dst#1 dst zp ZP_WORD:10 16.5 +(byte*) memset::dst#2 dst zp ZP_WORD:10 17.5 +(byte*~) memset::dst#3 dst zp ZP_WORD:10 4.0 (byte*) memset::end -(byte*) memset::end#0 end zp ZP_WORD:10 2.1666666666666665 +(byte*) memset::end#0 end zp ZP_WORD:8 2.1666666666666665 (word) memset::num -(word) memset::num#2 num zp ZP_WORD:10 2.0 +(word) memset::num#2 num zp ZP_WORD:8 2.0 (void*) memset::return (void*) memset::str -(void*) memset::str#2 str zp ZP_WORD:8 +(void*) memset::str#3 str zp ZP_WORD:10 (byte[$100]) plots_per_frame (const byte[$100]) plots_per_frame#0 plots_per_frame = { fill( $100, 0) } @@ -3384,8 +3434,8 @@ zp ZP_WORD:2 [ main::x#2 main::x#1 bitmap_plot::x#0 ] zp ZP_BYTE:4 [ main::y#2 main::y#1 ] zp ZP_WORD:5 [ main::vx#2 main::vx#6 main::vx#1 ] zp ZP_BYTE:7 [ main::vy#2 main::vy#8 main::vy#1 ] -zp ZP_WORD:8 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] -zp ZP_WORD:10 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:8 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:10 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] reg byte x [ memset::c#3 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] @@ -3403,7 +3453,7 @@ reg byte a [ bitmap_init::$6 ] FINAL ASSEMBLER -Score: 3136 +Score: 3147 // File Comments // Tests the simple bitmap plotter - and counts plots per frame in an IRQ @@ -3472,7 +3522,7 @@ main: { .label vy = 7 // bitmap_init(BITMAP, SCREEN) // [6] call bitmap_init - // [57] phi from main to bitmap_init [phi:main->bitmap_init] + // [58] phi from main to bitmap_init [phi:main->bitmap_init] jsr bitmap_init // [7] phi from main to main::@8 [phi:main->main::@8] // main::@8 @@ -3703,16 +3753,16 @@ bitmap_clear: { // [49] phi from bitmap_clear to memset [phi:bitmap_clear->memset] // [49] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1 ldx #col - // [49] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 - lda #<$3e8 - sta memset.num - lda #>$3e8 - sta memset.num+1 - // [49] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + // [49] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 + // [49] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#2] -- vwuz1=vwuc1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 jsr memset // [46] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] // bitmap_clear::@1 @@ -3721,16 +3771,16 @@ bitmap_clear: { // [49] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset] // [49] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1 ldx #0 - // [49] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 - lda #<$1f40 - sta memset.num - lda #>$1f40 - sta memset.num+1 - // [49] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + // [49] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1 lda #<BITMAP sta memset.str lda #>BITMAP sta memset.str+1 + // [49] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#2] -- vwuz1=vwuc1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 jsr memset // bitmap_clear::@return // } @@ -3739,14 +3789,21 @@ bitmap_clear: { } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage(8) str, byte register(X) c, word zeropage($a) num) +// memset(void* zeropage($a) str, byte register(X) c, word zeropage(8) num) memset: { - .label end = $a - .label dst = 8 - .label str = 8 - .label num = $a + .label end = 8 + .label dst = $a + .label num = 8 + .label str = $a + // if(num>0) + // [50] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 + lda num + beq breturn + lda num+1 + beq breturn + // memset::@1 // end = (char*)str + num - // [50] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 + // [51] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 lda end clc adc str @@ -3754,32 +3811,33 @@ memset: { lda end+1 adc str+1 sta end+1 - // [51] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 - // [52] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - // [52] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - // memset::@1 - b1: + // [52] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + // [53] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + // [53] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + // memset::@2 + b2: // *dst = c - // [53] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx + // [54] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx txa ldy #0 sta (dst),y // for(char* dst = str; dst!=end; dst++) - // [54] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [55] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [55] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [56] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1 + bne b2 lda dst cmp end - bne b1 + bne b2 // memset::@return + breturn: // } - // [56] return + // [57] return rts } // bitmap_init @@ -3787,81 +3845,81 @@ memset: { bitmap_init: { .label _7 = $13 .label yoffs = $c - // [58] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] - // [58] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 + // [59] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + // [59] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 ldx #0 - // [58] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 + // [59] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 lda #$80 - // [58] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] - // [58] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - // [58] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + // [59] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + // [59] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + // [59] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy // bitmap_init::@1 b1: // bitmap_plot_bit[x] = bits - // [59] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa + // [60] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_bit,x // bits >>= 1 - // [60] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 + // [61] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 lsr // if(bits==0) - // [61] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 + // [62] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 cmp #0 bne b2 - // [63] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] - // [63] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 + // [64] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + // [64] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 lda #$80 - // [62] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + // [63] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] // bitmap_init::@6 - // [63] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] - // [63] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + // [64] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + // [64] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy // bitmap_init::@2 b2: // for(byte x : 0..255) - // [64] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx + // [65] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx inx - // [65] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 + // [66] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 cpx #0 bne b1 - // [66] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] - // [66] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + // [67] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + // [67] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #<BITMAP sta yoffs lda #>BITMAP sta yoffs+1 - // [66] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 + // [67] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 ldx #0 - // [66] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] - // [66] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - // [66] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + // [67] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + // [67] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + // [67] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy // bitmap_init::@3 b3: // y&$7 - // [67] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 + // [68] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 lda #7 sax _7 // <yoffs - // [68] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 + // [69] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 lda yoffs // y&$7 | <yoffs - // [69] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa + // [70] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa ora _7 // bitmap_plot_ylo[y] = y&$7 | <yoffs - // [70] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa + // [71] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_ylo,x // >yoffs - // [71] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 + // [72] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 lda yoffs+1 // bitmap_plot_yhi[y] = >yoffs - // [72] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa + // [73] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_yhi,x // if((y&$7)==7) - // [73] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + // [74] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp _7 bne b4 // bitmap_init::@5 // yoffs = yoffs + 40*8 - // [74] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + // [75] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda yoffs adc #<$28*8 @@ -3869,19 +3927,19 @@ bitmap_init: { lda yoffs+1 adc #>$28*8 sta yoffs+1 - // [75] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] - // [75] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + // [76] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + // [76] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy // bitmap_init::@4 b4: // for(byte y : 0..255) - // [76] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx + // [77] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx inx - // [77] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 + // [78] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 cpx #0 bne b3 // bitmap_init::@return // } - // [78] return + // [79] return rts } // irq @@ -3890,34 +3948,34 @@ irq: { // entry interrupt(HARDWARE_CLOBBER) sta rega+1 // *BGCOL = WHITE - // [79] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + // [80] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 lda #WHITE sta BGCOL // if(frame_cnt) - // [80] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 + // [81] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp frame_cnt beq b1 // irq::@2 // frame_cnt++; - // [81] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 + // [82] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 inc frame_cnt - // [82] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] - // [82] phi (byte) frame_cnt#10 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy + // [83] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] + // [83] phi (byte) frame_cnt#10 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy // irq::@1 b1: // *BGCOL = BLACK - // [83] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 + // [84] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 lda #BLACK sta BGCOL // *IRQ_STATUS = IRQ_RASTER - // [84] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // [85] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS // irq::@return // } - // [85] return - exit interrupt(HARDWARE_CLOBBER) + // [86] return - exit interrupt(HARDWARE_CLOBBER) rega: lda #00 rti diff --git a/src/test/ref/bitmap-plot-0.sym b/src/test/ref/bitmap-plot-0.sym index 077a51d5c..cac1ec0c9 100644 --- a/src/test/ref/bitmap-plot-0.sym +++ b/src/test/ref/bitmap-plot-0.sym @@ -153,20 +153,21 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (byte) main::y#2 y zp ZP_BYTE:4 6.6000000000000005 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (label) memset::@1 +(label) memset::@2 (label) memset::@return (byte) memset::c -(byte) memset::c#3 reg byte x 1.5714285714285714 +(byte) memset::c#3 reg byte x 1.375 (byte*) memset::dst -(byte*) memset::dst#1 dst zp ZP_WORD:8 16.5 -(byte*) memset::dst#2 dst zp ZP_WORD:8 17.5 -(byte*~) memset::dst#3 dst zp ZP_WORD:8 4.0 +(byte*) memset::dst#1 dst zp ZP_WORD:10 16.5 +(byte*) memset::dst#2 dst zp ZP_WORD:10 17.5 +(byte*~) memset::dst#3 dst zp ZP_WORD:10 4.0 (byte*) memset::end -(byte*) memset::end#0 end zp ZP_WORD:10 2.1666666666666665 +(byte*) memset::end#0 end zp ZP_WORD:8 2.1666666666666665 (word) memset::num -(word) memset::num#2 num zp ZP_WORD:10 2.0 +(word) memset::num#2 num zp ZP_WORD:8 2.0 (void*) memset::return (void*) memset::str -(void*) memset::str#2 str zp ZP_WORD:8 +(void*) memset::str#3 str zp ZP_WORD:10 (byte[$100]) plots_per_frame (const byte[$100]) plots_per_frame#0 plots_per_frame = { fill( $100, 0) } @@ -174,8 +175,8 @@ zp ZP_WORD:2 [ main::x#2 main::x#1 bitmap_plot::x#0 ] zp ZP_BYTE:4 [ main::y#2 main::y#1 ] zp ZP_WORD:5 [ main::vx#2 main::vx#6 main::vx#1 ] zp ZP_BYTE:7 [ main::vy#2 main::vy#8 main::vy#1 ] -zp ZP_WORD:8 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] -zp ZP_WORD:10 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:8 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:10 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] reg byte x [ memset::c#3 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] diff --git a/src/test/ref/bitmap-plot-1.asm b/src/test/ref/bitmap-plot-1.asm index 14f562fa2..9347c98a5 100644 --- a/src/test/ref/bitmap-plot-1.asm +++ b/src/test/ref/bitmap-plot-1.asm @@ -392,34 +392,38 @@ init_irq: { bitmap_clear: { .const col = WHITE*$10 ldx #col - lda #<$3e8 - sta memset.num - lda #>$3e8 - sta memset.num+1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 jsr memset ldx #0 - lda #<$1f40 - sta memset.num - lda #>$1f40 - sta memset.num+1 lda #<BITMAP sta memset.str lda #>BITMAP sta memset.str+1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 jsr memset rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage($18) str, byte register(X) c, word zeropage($1a) num) +// memset(void* zeropage($1a) str, byte register(X) c, word zeropage($18) num) memset: { - .label end = $1a - .label dst = $18 - .label str = $18 - .label num = $1a + .label end = $18 + .label dst = $1a + .label num = $18 + .label str = $1a + lda num + beq breturn + lda num+1 + beq breturn lda end clc adc str @@ -427,7 +431,7 @@ memset: { lda end+1 adc str+1 sta end+1 - b1: + b2: txa ldy #0 sta (dst),y @@ -437,10 +441,11 @@ memset: { !: lda dst+1 cmp end+1 - bne b1 + bne b2 lda dst cmp end - bne b1 + bne b2 + breturn: rts } // Initialize bitmap plotting tables diff --git a/src/test/ref/bitmap-plot-1.cfg b/src/test/ref/bitmap-plot-1.cfg index dc295bd18..6625e3c24 100644 --- a/src/test/ref/bitmap-plot-1.cfg +++ b/src/test/ref/bitmap-plot-1.cfg @@ -179,248 +179,251 @@ bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 to:@return memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [97] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) + [97] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) [97] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 ) - [97] (void*) memset::str#2 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) - [98] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 - [99] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + [98] if((word) memset::num#2<=(byte) 0) goto memset::@return to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - [100] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) - [101] *((byte*) memset::dst#2) ← (byte) memset::c#3 - [102] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - [103] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 +memset::@1: scope:[memset] from memset + [99] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 + [100] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + to:memset::@2 +memset::@2: scope:[memset] from memset::@1 memset::@2 + [101] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 ) + [102] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [103] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [104] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 to:memset::@return -memset::@return: scope:[memset] from memset::@1 - [104] return +memset::@return: scope:[memset] from memset memset::@2 + [105] return to:@return bitmap_init: scope:[bitmap_init] from main::@6 - [105] phi() + [106] phi() to:bitmap_init::@1 bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2 - [106] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) - [106] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) - [107] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 - [108] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 - [109] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 + [107] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) + [107] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) + [108] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 + [109] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 + [110] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 to:bitmap_init::@2 bitmap_init::@6: scope:[bitmap_init] from bitmap_init::@1 - [110] phi() + [111] phi() to:bitmap_init::@2 bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6 - [111] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) - [112] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 - [113] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 + [112] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) + [113] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 + [114] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 to:bitmap_init::@3 bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4 - [114] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) - [114] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) - [115] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 - [116] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 - [117] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 - [118] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 - [119] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 - [120] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 - [121] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 + [115] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) + [115] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) + [116] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 + [117] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 + [118] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 + [119] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 + [120] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 + [121] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 + [122] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 to:bitmap_init::@5 bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@3 - [122] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 + [123] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 to:bitmap_init::@4 bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 - [123] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) - [124] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 - [125] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 + [124] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) + [125] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 + [126] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 to:bitmap_init::@return bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 - [126] return + [127] return to:@return sin16s_gen2: scope:[sin16s_gen2] from main - [127] phi() - [128] call div32u16u - [129] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + [128] phi() + [129] call div32u16u + [130] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 to:sin16s_gen2::@2 sin16s_gen2::@2: scope:[sin16s_gen2] from sin16s_gen2 - [130] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 + [131] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 to:sin16s_gen2::@1 sin16s_gen2::@1: scope:[sin16s_gen2] from sin16s_gen2::@2 sin16s_gen2::@4 - [131] (word) sin16s_gen2::i#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(word) sin16s_gen2::i#1 ) - [131] (signed word*) sin16s_gen2::sintab#2 ← phi( sin16s_gen2::@2/(const signed word[$200]) SINUS#0 sin16s_gen2::@4/(signed word*) sin16s_gen2::sintab#0 ) - [131] (dword) sin16s_gen2::x#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(dword) sin16s_gen2::x#1 ) - [132] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 - [133] call sin16s - [134] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 + [132] (word) sin16s_gen2::i#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(word) sin16s_gen2::i#1 ) + [132] (signed word*) sin16s_gen2::sintab#2 ← phi( sin16s_gen2::@2/(const signed word[$200]) SINUS#0 sin16s_gen2::@4/(signed word*) sin16s_gen2::sintab#0 ) + [132] (dword) sin16s_gen2::x#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(dword) sin16s_gen2::x#1 ) + [133] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 + [134] call sin16s + [135] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 to:sin16s_gen2::@3 sin16s_gen2::@3: scope:[sin16s_gen2] from sin16s_gen2::@1 - [135] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 - [136] call mul16s - [137] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 + [136] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 + [137] call mul16s + [138] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 to:sin16s_gen2::@4 sin16s_gen2::@4: scope:[sin16s_gen2] from sin16s_gen2::@3 - [138] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 - [139] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 - [140] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 - [141] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD - [142] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 - [143] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 - [144] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 + [139] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 + [140] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 + [141] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 + [142] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD + [143] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 + [144] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 + [145] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 to:sin16s_gen2::@return sin16s_gen2::@return: scope:[sin16s_gen2] from sin16s_gen2::@4 - [145] return + [146] return to:@return sin16s: scope:[sin16s] from sin16s_gen2::@1 - [146] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 + [147] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 to:sin16s::@4 sin16s::@4: scope:[sin16s] from sin16s - [147] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 + [148] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 to:sin16s::@1 sin16s::@1: scope:[sin16s] from sin16s sin16s::@4 - [148] (byte) sin16s::isUpper#2 ← phi( sin16s/(byte) 0 sin16s::@4/(byte) 1 ) - [148] (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#0 sin16s::@4/(dword) sin16s::x#1 ) - [149] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 + [149] (byte) sin16s::isUpper#2 ← phi( sin16s/(byte) 0 sin16s::@4/(byte) 1 ) + [149] (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#0 sin16s::@4/(dword) sin16s::x#1 ) + [150] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 to:sin16s::@5 sin16s::@5: scope:[sin16s] from sin16s::@1 - [150] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 + [151] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 to:sin16s::@2 sin16s::@2: scope:[sin16s] from sin16s::@1 sin16s::@5 - [151] (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 ) - [152] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 - [153] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 - [154] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 - [155] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 - [156] call mulu16_sel - [157] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 + [152] (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 ) + [153] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 + [154] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 + [155] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 + [156] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 + [157] call mulu16_sel + [158] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 to:sin16s::@7 sin16s::@7: scope:[sin16s] from sin16s::@2 - [158] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 - [159] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 - [160] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 - [161] call mulu16_sel - [162] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 + [159] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 + [160] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 + [161] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 + [162] call mulu16_sel + [163] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 to:sin16s::@8 sin16s::@8: scope:[sin16s] from sin16s::@7 - [163] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 - [164] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 - [165] call mulu16_sel - [166] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 + [164] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 + [165] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 + [166] call mulu16_sel + [167] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 to:sin16s::@9 sin16s::@9: scope:[sin16s] from sin16s::@8 - [167] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 - [168] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 - [169] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 - [170] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 - [171] call mulu16_sel - [172] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 + [168] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 + [169] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 + [170] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 + [171] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 + [172] call mulu16_sel + [173] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 to:sin16s::@10 sin16s::@10: scope:[sin16s] from sin16s::@9 - [173] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 - [174] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 - [175] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 - [176] call mulu16_sel - [177] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 + [174] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 + [175] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 + [176] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 + [177] call mulu16_sel + [178] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 to:sin16s::@11 sin16s::@11: scope:[sin16s] from sin16s::@10 - [178] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 - [179] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 - [180] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 - [181] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 + [179] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 + [180] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 + [181] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 + [182] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 to:sin16s::@6 sin16s::@6: scope:[sin16s] from sin16s::@11 - [182] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 + [183] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 to:sin16s::@3 sin16s::@3: scope:[sin16s] from sin16s::@12 sin16s::@6 - [183] (signed word) sin16s::return#1 ← phi( sin16s::@12/(signed word~) sin16s::return#5 sin16s::@6/(signed word) sin16s::sinx#1 ) + [184] (signed word) sin16s::return#1 ← phi( sin16s::@12/(signed word~) sin16s::return#5 sin16s::@6/(signed word) sin16s::sinx#1 ) to:sin16s::@return sin16s::@return: scope:[sin16s] from sin16s::@3 - [184] return + [185] return to:@return sin16s::@12: scope:[sin16s] from sin16s::@11 - [185] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 + [186] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 to:sin16s::@3 mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 - [186] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) - [186] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) - [186] (word) mulu16_sel::v1#5 ← phi( sin16s::@9/(word) mulu16_sel::v1#3 sin16s::@10/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@7/(word) mulu16_sel::v1#1 sin16s::@8/(word) mulu16_sel::v1#2 ) - [187] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 - [188] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 - [189] call mul16u - [190] (dword) mul16u::return#3 ← (dword) mul16u::res#2 + [187] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) + [187] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) + [187] (word) mulu16_sel::v1#5 ← phi( sin16s::@9/(word) mulu16_sel::v1#3 sin16s::@10/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@7/(word) mulu16_sel::v1#1 sin16s::@8/(word) mulu16_sel::v1#2 ) + [188] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 + [189] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 + [190] call mul16u + [191] (dword) mul16u::return#3 ← (dword) mul16u::res#2 to:mulu16_sel::@1 mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel - [191] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 - [192] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 - [193] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 + [192] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 + [193] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 + [194] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 to:mulu16_sel::@return mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 - [194] return + [195] return to:@return div32u16u: scope:[div32u16u] from sin16s_gen2 - [195] phi() - [196] call divr16u - [197] (word) divr16u::return#2 ← (word) divr16u::return#0 + [196] phi() + [197] call divr16u + [198] (word) divr16u::return#2 ← (word) divr16u::return#0 to:div32u16u::@1 div32u16u::@1: scope:[div32u16u] from div32u16u - [198] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 - [199] (word) divr16u::rem#4 ← (word) rem16u#1 - [200] call divr16u - [201] (word) divr16u::return#3 ← (word) divr16u::return#0 + [199] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [200] (word) divr16u::rem#4 ← (word) rem16u#1 + [201] call divr16u + [202] (word) divr16u::return#3 ← (word) divr16u::return#0 to:div32u16u::@2 div32u16u::@2: scope:[div32u16u] from div32u16u::@1 - [202] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 - [203] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + [203] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [204] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 to:div32u16u::@return div32u16u::@return: scope:[div32u16u] from div32u16u::@2 - [204] return + [205] return to:@return divr16u: scope:[divr16u] from div32u16u div32u16u::@1 - [205] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) - [205] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) + [206] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) + [206] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) to:divr16u::@1 divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 - [206] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) - [206] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) - [206] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) - [206] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) - [207] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 - [208] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 - [209] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 - [210] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + [207] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) + [207] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) + [207] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [207] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [208] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [209] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [210] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [211] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 to:divr16u::@4 divr16u::@4: scope:[divr16u] from divr16u::@1 - [211] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + [212] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 to:divr16u::@2 divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 - [212] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) - [213] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 - [214] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 - [215] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 + [213] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [214] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [215] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [216] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 to:divr16u::@5 divr16u::@5: scope:[divr16u] from divr16u::@2 - [216] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 - [217] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 + [217] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [218] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 to:divr16u::@3 divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 - [218] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) - [218] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) - [219] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 - [220] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + [219] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [219] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [220] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [221] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 to:divr16u::@6 divr16u::@6: scope:[divr16u] from divr16u::@3 - [221] (word) rem16u#1 ← (word) divr16u::rem#11 + [222] (word) rem16u#1 ← (word) divr16u::rem#11 to:divr16u::@return divr16u::@return: scope:[divr16u] from divr16u::@6 - [222] return + [223] return to:@return irq: scope:[irq] from - [223] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 - [224] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 + [224] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 + [225] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 to:irq::@2 irq::@2: scope:[irq] from irq - [225] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 + [226] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 to:irq::@1 irq::@1: scope:[irq] from irq irq::@2 - [226] (byte) frame_cnt#10 ← phi( irq/(byte) frame_cnt#0 irq::@2/(byte) frame_cnt#1 ) - [227] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 - [228] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + [227] (byte) frame_cnt#10 ← phi( irq/(byte) frame_cnt#0 irq::@2/(byte) frame_cnt#1 ) + [228] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 + [229] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 to:irq::@return irq::@return: scope:[irq] from irq::@1 - [229] return + [230] return to:@return diff --git a/src/test/ref/bitmap-plot-1.log b/src/test/ref/bitmap-plot-1.log index 13d08f2fe..8726c8d7d 100644 --- a/src/test/ref/bitmap-plot-1.log +++ b/src/test/ref/bitmap-plot-1.log @@ -47,6 +47,7 @@ Culled Empty Block (label) @23 Culled Empty Block (label) @24 Culled Empty Block (label) @25 Culled Empty Block (label) @26 +Culled Empty Block (label) memset::@5 Culled Empty Block (label) memset::@3 Culled Empty Block (label) @27 Culled Empty Block (label) bitmap_init::@8 @@ -547,30 +548,38 @@ mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@2 return to:@return memset: scope:[memset] from bitmap_clear bitmap_clear::@1 - (byte) memset::c#3 ← phi( bitmap_clear/(byte) memset::c#0 bitmap_clear::@1/(byte) memset::c#1 ) + (byte) memset::c#4 ← phi( bitmap_clear/(byte) memset::c#0 bitmap_clear::@1/(byte) memset::c#1 ) + (void*) memset::str#4 ← phi( bitmap_clear/(void*) memset::str#0 bitmap_clear::@1/(void*) memset::str#1 ) (word) memset::num#2 ← phi( bitmap_clear/(word) memset::num#0 bitmap_clear::@1/(word) memset::num#1 ) - (void*) memset::str#2 ← phi( bitmap_clear/(void*) memset::str#0 bitmap_clear::@1/(void*) memset::str#1 ) - (byte*~) memset::$0 ← ((byte*)) (void*) memset::str#2 - (byte*~) memset::$1 ← (byte*~) memset::$0 + (word) memset::num#2 - (byte*) memset::end#0 ← (byte*~) memset::$1 - (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#2 - to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - (void*) memset::str#4 ← phi( memset/(void*) memset::str#2 memset::@1/(void*) memset::str#4 ) - (byte*) memset::end#1 ← phi( memset/(byte*) memset::end#0 memset::@1/(byte*) memset::end#1 ) - (byte*) memset::dst#2 ← phi( memset/(byte*) memset::dst#0 memset::@1/(byte*) memset::dst#1 ) - (byte) memset::c#2 ← phi( memset/(byte) memset::c#3 memset::@1/(byte) memset::c#2 ) + (bool~) memset::$0 ← (word) memset::num#2 > (number) 0 + (bool~) memset::$1 ← ! (bool~) memset::$0 + if((bool~) memset::$1) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + (void*) memset::str#2 ← phi( memset/(void*) memset::str#4 memset::@4/(void*) memset::str#5 ) + (void*) memset::return#0 ← (void*) memset::str#2 + to:memset::@return +memset::@2: scope:[memset] from memset + (byte) memset::c#3 ← phi( memset/(byte) memset::c#4 ) + (word) memset::num#3 ← phi( memset/(word) memset::num#2 ) + (void*) memset::str#3 ← phi( memset/(void*) memset::str#4 ) + (byte*~) memset::$2 ← ((byte*)) (void*) memset::str#3 + (byte*~) memset::$3 ← (byte*~) memset::$2 + (word) memset::num#3 + (byte*) memset::end#0 ← (byte*~) memset::$3 + (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#3 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + (void*) memset::str#5 ← phi( memset::@2/(void*) memset::str#3 memset::@4/(void*) memset::str#5 ) + (byte*) memset::end#1 ← phi( memset::@2/(byte*) memset::end#0 memset::@4/(byte*) memset::end#1 ) + (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + (byte) memset::c#2 ← phi( memset::@2/(byte) memset::c#3 memset::@4/(byte) memset::c#2 ) *((byte*) memset::dst#2) ← (byte) memset::c#2 (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - (bool~) memset::$2 ← (byte*) memset::dst#1 != (byte*) memset::end#1 - if((bool~) memset::$2) goto memset::@1 - to:memset::@2 -memset::@2: scope:[memset] from memset::@1 - (void*) memset::str#3 ← phi( memset::@1/(void*) memset::str#4 ) - (void*) memset::return#0 ← (void*) memset::str#3 - to:memset::@return -memset::@return: scope:[memset] from memset::@2 - (void*) memset::return#4 ← phi( memset::@2/(void*) memset::return#0 ) + (bool~) memset::$4 ← (byte*) memset::dst#1 != (byte*) memset::end#1 + if((bool~) memset::$4) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + (void*) memset::return#4 ← phi( memset::@1/(void*) memset::return#0 ) (void*) memset::return#1 ← (void*) memset::return#4 return to:@return @@ -1463,17 +1472,21 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (signed dword) main::ypos (signed dword) main::ypos#0 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) -(byte*~) memset::$0 -(byte*~) memset::$1 -(bool~) memset::$2 +(bool~) memset::$0 +(bool~) memset::$1 +(byte*~) memset::$2 +(byte*~) memset::$3 +(bool~) memset::$4 (label) memset::@1 (label) memset::@2 +(label) memset::@4 (label) memset::@return (byte) memset::c (byte) memset::c#0 (byte) memset::c#1 (byte) memset::c#2 (byte) memset::c#3 +(byte) memset::c#4 (byte*) memset::dst (byte*) memset::dst#0 (byte*) memset::dst#1 @@ -1485,6 +1498,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (word) memset::num#0 (word) memset::num#1 (word) memset::num#2 +(word) memset::num#3 (void*) memset::return (void*) memset::return#0 (void*) memset::return#1 @@ -1497,6 +1511,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (void*) memset::str#2 (void*) memset::str#3 (void*) memset::str#4 +(void*) memset::str#5 (signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) (word~) mul16s::$0 (word~) mul16s::$1 @@ -1902,6 +1917,7 @@ Adding number conversion cast (unumber) 0 in (byte) mulu16_sel::select#3 ← (nu Adding number conversion cast (unumber) 0 in (byte) mulu16_sel::select#4 ← (number) 0 Adding number conversion cast (unumber) 4 in (word~) sin16s::$12 ← (word) sin16s::x5#0 >> (number) 4 Adding number conversion cast (unumber) 0 in (bool~) sin16s::$15 ← (byte) sin16s::isUpper#2 != (number) 0 +Adding number conversion cast (unumber) 0 in (bool~) memset::$0 ← (word) memset::num#2 > (number) 0 Adding number conversion cast (unumber) $80 in (byte) bitmap_init::bits#0 ← (number) $80 Adding number conversion cast (unumber) 1 in (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (number) 1 Adding number conversion cast (unumber) 0 in (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (number) 0 @@ -1998,8 +2014,8 @@ Inlining cast (byte) mulu16_sel::select#3 ← (unumber)(number) 0 Inlining cast (byte) mulu16_sel::select#4 ← (unumber)(number) 0 Inlining cast (signed word~) sin16s::$14 ← (signed word)(word) sin16s::usinx#1 Inlining cast (signed word~) sin16s::$19 ← (signed word)(word) sin16s::usinx#3 -Inlining cast (byte*~) memset::$0 ← (byte*)(void*) memset::str#2 -Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 +Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 +Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 Inlining cast (byte) bitmap_init::bits#0 ← (unumber)(number) $80 Inlining cast (byte) bitmap_init::bits#2 ← (unumber)(number) $80 Inlining cast (byte) memset::c#1 ← (unumber)(number) 0 @@ -2077,6 +2093,7 @@ Simplifying constant integer cast 0 Simplifying constant integer cast 0 Simplifying constant integer cast 4 Simplifying constant integer cast 0 +Simplifying constant integer cast 0 Simplifying constant integer cast $80 Simplifying constant integer cast 1 Simplifying constant integer cast 0 @@ -2158,6 +2175,7 @@ Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 4 Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) $80 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 0 @@ -2221,11 +2239,12 @@ Inversing boolean not [125] (bool~) mul16s::$6 ← (signed word) mul16s::b#4 >= Inversing boolean not [193] (bool~) sin16s::$1 ← (dword) sin16s::x#3 < (dword) PI_u4f28#0 from [192] (bool~) sin16s::$0 ← (dword) sin16s::x#3 >= (dword) PI_u4f28#0 Inversing boolean not [197] (bool~) sin16s::$3 ← (dword) sin16s::x#4 < (dword) PI_HALF_u4f28#0 from [196] (bool~) sin16s::$2 ← (dword) sin16s::x#4 >= (dword) PI_HALF_u4f28#0 Inversing boolean not [256] (bool~) sin16s::$16 ← (byte) sin16s::isUpper#2 == (byte) 0 from [255] (bool~) sin16s::$15 ← (byte) sin16s::isUpper#2 != (byte) 0 -Inversing boolean not [313] (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits#1 != (byte) 0 from [312] (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (byte) 0 -Inversing boolean not [333] (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte) 7 from [332] (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte) 7 -Inversing boolean not [458] (bool~) main::$21 ← (word) main::idx_x#1 != (word) $200 from [457] (bool~) main::$20 ← (word) main::idx_x#1 == (word) $200 -Inversing boolean not [463] (bool~) main::$23 ← (word) main::idx_y#1 != (word) $200 from [462] (bool~) main::$22 ← (word) main::idx_y#1 == (word) $200 -Inversing boolean not [492] (bool~) irq::$0 ← (byte) 0 == (byte) frame_cnt#4 from [491] (bool~) irq::$1 ← (byte) 0 != (byte) frame_cnt#4 +Inversing boolean not [285] (bool~) memset::$1 ← (word) memset::num#2 <= (byte) 0 from [284] (bool~) memset::$0 ← (word) memset::num#2 > (byte) 0 +Inversing boolean not [317] (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits#1 != (byte) 0 from [316] (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (byte) 0 +Inversing boolean not [337] (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte) 7 from [336] (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte) 7 +Inversing boolean not [462] (bool~) main::$21 ← (word) main::idx_x#1 != (word) $200 from [461] (bool~) main::$20 ← (word) main::idx_x#1 == (word) $200 +Inversing boolean not [467] (bool~) main::$23 ← (word) main::idx_y#1 != (word) $200 from [466] (bool~) main::$22 ← (word) main::idx_y#1 == (word) $200 +Inversing boolean not [496] (bool~) irq::$0 ← (byte) 0 == (byte) frame_cnt#4 from [495] (bool~) irq::$1 ← (byte) 0 != (byte) frame_cnt#4 Successful SSA optimization Pass2UnaryNotSimplification Alias (word) divr16u::rem#0 = (word~) divr16u::$0 (word) divr16u::rem#7 Alias (word) divr16u::dividend#0 = (word~) divr16u::$6 (word) divr16u::dividend#8 @@ -2317,8 +2336,11 @@ Alias (signed word) sin16s::sinx#1 = (signed word~) sin16s::$20 Alias (dword) mul16u::return#3 = (dword) mul16u::return#6 Alias (byte) mulu16_sel::select#5 = (byte) mulu16_sel::select#6 Alias (word) mulu16_sel::return#12 = (word) mulu16_sel::return#5 (word~) mulu16_sel::$2 (word) mulu16_sel::return#6 -Alias (byte*) memset::end#0 = (byte*~) memset::$1 -Alias (void*) memset::return#0 = (void*) memset::str#3 (void*) memset::str#4 (void*) memset::return#4 (void*) memset::return#1 +Alias (void*) memset::return#0 = (void*) memset::str#2 (void*) memset::return#4 (void*) memset::return#1 +Alias (void*) memset::str#3 = (void*) memset::str#4 +Alias (word) memset::num#2 = (word) memset::num#3 +Alias (byte) memset::c#3 = (byte) memset::c#4 +Alias (byte*) memset::end#0 = (byte*~) memset::$3 Alias (byte) bitmap_init::x#2 = (byte) bitmap_init::x#4 Alias (byte*) bitmap_init::gfx#4 = (byte*) bitmap_init::gfx#5 Alias (byte*) bitmap_gfx#31 = (byte*) bitmap_gfx#32 @@ -2404,7 +2426,7 @@ Self Phi Eliminated (word) sin16s_gen2::wavelength#2 Self Phi Eliminated (word) rem16u#16 Self Phi Eliminated (byte) memset::c#2 Self Phi Eliminated (byte*) memset::end#1 -Self Phi Eliminated (void*) memset::return#0 +Self Phi Eliminated (void*) memset::str#5 Self Phi Eliminated (byte*) bitmap_init::gfx#2 Self Phi Eliminated (byte*) bitmap_gfx#22 Self Phi Eliminated (byte*) bitmap_screen#21 @@ -2435,7 +2457,7 @@ Identical Phi Values (word) rem16u#16 (word) rem16u#15 Identical Phi Values (dword) sin16s::x#3 (dword) sin16s::x#0 Identical Phi Values (byte) memset::c#2 (byte) memset::c#3 Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0 -Identical Phi Values (void*) memset::return#0 (void*) memset::str#2 +Identical Phi Values (void*) memset::str#5 (void*) memset::str#3 Identical Phi Values (byte*) bitmap_init::gfx#1 (byte*) bitmap_init::gfx#0 Identical Phi Values (byte*) bitmap_init::screen#1 (byte*) bitmap_init::screen#0 Identical Phi Values (byte*) bitmap_init::gfx#2 (byte*) bitmap_init::gfx#1 @@ -2465,7 +2487,9 @@ Identical Phi Values (word) rem16u#10 (word) rem16u#18 Identical Phi Values (byte*) bitmap_gfx#10 (byte*) bitmap_gfx#14 Identical Phi Values (byte*) bitmap_screen#10 (byte*) bitmap_screen#13 Successful SSA optimization Pass2IdenticalPhiElimination -Identified duplicate assignment right side [331] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 +Identical Phi Values (void*) memset::return#0 (void*) memset::str#3 +Successful SSA optimization Pass2IdenticalPhiElimination +Identified duplicate assignment right side [335] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 Successful SSA optimization Pass2DuplicateRValueIdentification Simple Condition (bool~) divr16u::$4 [31] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 Simple Condition (bool~) divr16u::$9 [39] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 @@ -2478,22 +2502,23 @@ Simple Condition (bool~) sin16s_gen2::$10 [186] if((word) sin16s_gen2::i#1<(word Simple Condition (bool~) sin16s::$1 [194] if((dword) sin16s::x#0<(dword) PI_u4f28#0) goto sin16s::@1 Simple Condition (bool~) sin16s::$3 [198] if((dword) sin16s::x#4<(dword) PI_HALF_u4f28#0) goto sin16s::@2 Simple Condition (bool~) sin16s::$16 [257] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@3 -Simple Condition (bool~) memset::$2 [292] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -Simple Condition (bool~) bitmap_init::$1 [314] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 -Simple Condition (bool~) bitmap_init::$2 [318] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 -Simple Condition (bool~) bitmap_init::$9 [334] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 -Simple Condition (bool~) bitmap_init::$11 [338] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 -Simple Condition (bool~) main::$21 [459] if((word) main::idx_x#1!=(word) $200) goto main::@4 -Simple Condition (bool~) main::$23 [464] if((word) main::idx_y#1!=(word) $200) goto main::@5 -Simple Condition (bool~) irq::$0 [493] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 +Simple Condition (bool~) memset::$1 [286] if((word) memset::num#2<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [298] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 +Simple Condition (bool~) bitmap_init::$1 [318] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$2 [322] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$9 [338] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 +Simple Condition (bool~) bitmap_init::$11 [342] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 +Simple Condition (bool~) main::$21 [463] if((word) main::idx_x#1!=(word) $200) goto main::@4 +Simple Condition (bool~) main::$23 [468] if((word) main::idx_y#1!=(word) $200) goto main::@5 +Simple Condition (bool~) irq::$0 [497] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant right-side identified [224] (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6 -Constant right-side identified [301] (byte[$100]) bitmap_plot_ylo#0 ← { fill( $100, 0) } -Constant right-side identified [302] (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } -Constant right-side identified [303] (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } -Constant right-side identified [374] (byte[$100]) plots_per_frame#0 ← { fill( $100, 0) } -Constant right-side identified [375] (signed word[$200]) SINUS#0 ← { fill( $200, 0) } -Constant right-side identified [485] (void()*~) init_irq::$0 ← & interrupt(HARDWARE_CLOBBER)(void()) irq() +Constant right-side identified [305] (byte[$100]) bitmap_plot_ylo#0 ← { fill( $100, 0) } +Constant right-side identified [306] (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } +Constant right-side identified [307] (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } +Constant right-side identified [378] (byte[$100]) plots_per_frame#0 ← { fill( $100, 0) } +Constant right-side identified [379] (signed word[$200]) SINUS#0 ← { fill( $200, 0) } +Constant right-side identified [489] (void()*~) init_irq::$0 ← & interrupt(HARDWARE_CLOBBER)(void()) irq() Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) PROCPORT_DDR#0 = (byte*) 0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -2575,26 +2600,26 @@ Constant (const word) divr16u::divisor#1 = div32u16u::divisor#0 Constant (const byte*) bitmap_gfx#1 = bitmap_init::gfx#0 Constant (const byte*) bitmap_screen#1 = bitmap_init::screen#0 Successful SSA optimization Pass2ConstantIdentification -Constant value identified (void*)bitmap_screen#1 in [350] (void*) memset::str#0 ← (void*)(const byte*) bitmap_screen#1 -Constant value identified (void*)bitmap_gfx#1 in [356] (void*) memset::str#1 ← (void*)(const byte*) bitmap_gfx#1 -Constant value identified (word)main::toD0181_screen#0 in [401] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 -Constant value identified (word)main::toD0181_gfx#0 in [405] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 +Constant value identified (void*)bitmap_screen#1 in [354] (void*) memset::str#0 ← (void*)(const byte*) bitmap_screen#1 +Constant value identified (void*)bitmap_gfx#1 in [360] (void*) memset::str#1 ← (void*)(const byte*) bitmap_gfx#1 +Constant value identified (word)main::toD0181_screen#0 in [405] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 +Constant value identified (word)main::toD0181_gfx#0 in [409] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 Successful SSA optimization Pass2ConstantValues -if() condition always true - replacing block destination [421] if(true) goto main::@2 +if() condition always true - replacing block destination [425] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs Resolved ranged next value [44] divr16u::i#1 ← ++ divr16u::i#2 to ++ Resolved ranged comparison value [46] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 -Resolved ranged next value [316] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ -Resolved ranged comparison value [318] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 -Resolved ranged next value [336] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ -Resolved ranged comparison value [338] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 -De-inlining pointer[w] to *(pointer+w) [424] (signed word) main::cos_x#0 ← *((const signed word[$200]) SINUS#0 + (word~) main::$24) -De-inlining pointer[w] to *(pointer+w) [438] (signed word) main::sin_y#0 ← *((const signed word[$200]) SINUS#0 + (word~) main::$25) +Resolved ranged next value [320] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ +Resolved ranged comparison value [322] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 +Resolved ranged next value [340] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ +Resolved ranged comparison value [342] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 +De-inlining pointer[w] to *(pointer+w) [428] (signed word) main::cos_x#0 ← *((const signed word[$200]) SINUS#0 + (word~) main::$24) +De-inlining pointer[w] to *(pointer+w) [442] (signed word) main::sin_y#0 ← *((const signed word[$200]) SINUS#0 + (word~) main::$25) Successful SSA optimization Pass2DeInlineWordDerefIdx -Simplifying expression containing zero bitmap_clear::$0 in [348] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0 +Simplifying expression containing zero bitmap_clear::$0 in [352] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0 Successful SSA optimization PassNSimplifyExpressionWithZero -Eliminating unused variable (void*) memset::return#2 and assignment [168] (void*) memset::return#2 ← (void*) memset::str#2 -Eliminating unused variable (void*) memset::return#3 and assignment [171] (void*) memset::return#3 ← (void*) memset::str#2 +Eliminating unused variable (void*) memset::return#2 and assignment [169] (void*) memset::return#2 ← (void*) memset::str#3 +Eliminating unused variable (void*) memset::return#3 and assignment [172] (void*) memset::return#3 ← (void*) memset::str#3 Eliminating unused constant (const byte) bitmap_clear::bgcol#0 Eliminating unused constant (const word) rem16u#0 Eliminating unused constant (const byte*) bitmap_screen#0 @@ -2626,8 +2651,8 @@ Successful SSA optimization Pass2AliasElimination Constant right-side identified [18] (word) divr16u::dividend#1 ← > (const dword) div32u16u::dividend#0 Constant right-side identified [22] (word) divr16u::dividend#2 ← < (const dword) div32u16u::dividend#0 Constant right-side identified [59] (signed word) sin16s_gen2::ampl#0 ← (const signed word) sin16s_gen2::max#0 - (const signed word) sin16s_gen2::min#0 -Constant right-side identified [163] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 -Constant right-side identified [181] (byte~) main::$3 ← (const byte) VIC_BMM#0 | (const byte) VIC_DEN#0 +Constant right-side identified [164] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 +Constant right-side identified [182] (byte~) main::$3 ← (const byte) VIC_BMM#0 | (const byte) VIC_DEN#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) divr16u::dividend#1 = >div32u16u::dividend#0 Constant (const word) divr16u::dividend#2 = <div32u16u::dividend#0 @@ -2643,9 +2668,9 @@ Constant (const signed word) mul16s::b#0 = sin16s_gen2::ampl#0 Constant (const byte) memset::c#0 = bitmap_clear::col#0 Successful SSA optimization Pass2ConstantIdentification Constant right-side identified [57] (signed word~) sin16s_gen2::$1 ← (const signed word) sin16s_gen2::ampl#0 >> (signed byte) 1 -Constant right-side identified [171] (byte~) main::$4 ← (const byte) main::$3 | (const byte) VIC_RSEL#0 -Constant right-side identified [174] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff -Constant right-side identified [177] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 +Constant right-side identified [172] (byte~) main::$4 ← (const byte) main::$3 | (const byte) VIC_RSEL#0 +Constant right-side identified [175] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff +Constant right-side identified [178] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const signed word) sin16s_gen2::$1 = sin16s_gen2::ampl#0>>1 Constant (const byte) main::$4 = main::$3|VIC_RSEL#0 @@ -2653,9 +2678,9 @@ Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&$3fff Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0 Successful SSA optimization Pass2ConstantIdentification Constant right-side identified [57] (signed word) sin16s_gen2::offs#0 ← (const signed word) sin16s_gen2::min#0 + (const signed word) sin16s_gen2::$1 -Constant right-side identified [170] (byte~) main::$5 ← (const byte) main::$4 | (byte) 3 -Constant right-side identified [172] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 -Constant right-side identified [174] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 +Constant right-side identified [171] (byte~) main::$5 ← (const byte) main::$4 | (byte) 3 +Constant right-side identified [173] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 +Constant right-side identified [175] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const signed word) sin16s_gen2::offs#0 = sin16s_gen2::min#0+sin16s_gen2::$1 Constant (const byte) main::$5 = main::$4|3 @@ -2671,13 +2696,13 @@ Eliminating unused constant (const signed word) sin16s_gen2::offs#0 Successful SSA optimization PassNEliminateUnusedVars Alias (signed word~) sin16s_gen2::$8 = (signed word~) sin16s_gen2::$7 Successful SSA optimization Pass2AliasElimination -Constant right-side identified [170] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 -Constant right-side identified [171] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f +Constant right-side identified [171] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 +Constant right-side identified [172] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::toD0181_$3#0 = >main::toD0181_$2#0 Constant (const byte) main::toD0181_$7#0 = main::toD0181_$6#0&$f Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [169] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 +Constant right-side identified [170] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0 Successful SSA optimization Pass2ConstantIdentification @@ -2685,14 +2710,14 @@ Inlining Noop Cast [47] (word~) mul16s::$10 ← (word)(signed word) mul16s::b#3 Inlining Noop Cast [53] (word~) mul16s::$14 ← (word)(signed word) mul16s::a#3 keeping mul16s::a#3 Inlining Noop Cast [110] (signed word) sin16s::sinx#0 ← (signed word)(word) sin16s::usinx#1 keeping sin16s::usinx#1 Inlining Noop Cast [114] (signed word~) sin16s::$19 ← (signed word)(word) sin16s::usinx#1 keeping sin16s::usinx#1 -Inlining Noop Cast [127] (byte*~) memset::$0 ← (byte*)(void*) memset::str#2 keeping memset::str#2 -Inlining Noop Cast [129] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 keeping memset::str#2 +Inlining Noop Cast [128] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 keeping memset::str#3 +Inlining Noop Cast [130] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 keeping memset::str#3 Successful SSA optimization Pass2NopCastInlining Inlining Noop Cast [69] (signed word~) sin16s_gen2::$8 ← (signed word)(word~) sin16s_gen2::$6 keeping sin16s_gen2::$8 -Inlining Noop Cast [159] (byte*) bitmap_plot::plotter#0 ← (byte*)(word~) bitmap_plot::$3 keeping bitmap_plot::plotter#0 +Inlining Noop Cast [160] (byte*) bitmap_plot::plotter#0 ← (byte*)(word~) bitmap_plot::$3 keeping bitmap_plot::plotter#0 Successful SSA optimization Pass2NopCastInlining -Rewriting multiplication to use shift [172] (word~) main::$24 ← (word) main::idx_x#3 * (const byte) SIZEOF_SIGNED_WORD -Rewriting multiplication to use shift [182] (word~) main::$25 ← (word) main::idx_y#3 * (const byte) SIZEOF_SIGNED_WORD +Rewriting multiplication to use shift [173] (word~) main::$24 ← (word) main::idx_x#3 * (const byte) SIZEOF_SIGNED_WORD +Rewriting multiplication to use shift [183] (word~) main::$25 ← (word) main::idx_y#3 * (const byte) SIZEOF_SIGNED_WORD Successful SSA optimization Pass2MultiplyToShiftRewriting Inlining constant with var siblings (const word) divr16u::quotient#0 Inlining constant with var siblings (const byte) divr16u::i#0 @@ -2801,7 +2826,7 @@ Added new block during phi lifting sin16s::@13(between sin16s and sin16s::@1) Fixing phi predecessor for sin16s::isUpper#2 to new block ( sin16s -> sin16s::@13 ) during phi lifting. Added new block during phi lifting sin16s::@14(between sin16s::@1 and sin16s::@2) Added new block during phi lifting sin16s::@15(between sin16s::@12 and sin16s::@3) -Added new block during phi lifting memset::@4(between memset::@1 and memset::@1) +Added new block during phi lifting memset::@6(between memset::@4 and memset::@4) Added new block during phi lifting bitmap_init::@9(between bitmap_init::@2 and bitmap_init::@1) Added new block during phi lifting bitmap_init::@10(between bitmap_init::@1 and bitmap_init::@2) Added new block during phi lifting bitmap_init::@11(between bitmap_init::@6 and bitmap_init::@5) @@ -2829,7 +2854,7 @@ Adding NOP phi() at start of mul16u::@3 Adding NOP phi() at start of bitmap_clear Adding NOP phi() at start of bitmap_clear::@1 Adding NOP phi() at start of bitmap_clear::@2 -Adding NOP phi() at start of memset::@2 +Adding NOP phi() at start of memset::@1 Adding NOP phi() at start of bitmap_init Adding NOP phi() at start of bitmap_init::@3 Adding NOP phi() at start of bitmap_init::@4 @@ -2840,10 +2865,10 @@ Calls in [] to main:7 Calls in [main] to sin16s_gen2:11 bitmap_init:13 bitmap_clear:15 init_irq:20 mul16s:28 mul16s:39 bitmap_plot:47 Calls in [mul16s] to mul16u:72 Calls in [bitmap_clear] to memset:120 memset:122 -Calls in [sin16s_gen2] to div32u16u:166 sin16s:171 mul16s:175 -Calls in [sin16s] to mulu16_sel:202 mulu16_sel:209 mulu16_sel:214 mulu16_sel:222 mulu16_sel:229 -Calls in [mulu16_sel] to mul16u:247 -Calls in [div32u16u] to divr16u:254 divr16u:259 +Calls in [sin16s_gen2] to div32u16u:167 sin16s:172 mul16s:176 +Calls in [sin16s] to mulu16_sel:203 mulu16_sel:210 mulu16_sel:215 mulu16_sel:223 mulu16_sel:230 +Calls in [mulu16_sel] to mul16u:248 +Calls in [div32u16u] to divr16u:255 divr16u:260 Created 44 initial phi equivalence classes Coalesced [27] mul16s::b#8 ← mul16s::b#1 @@ -2865,49 +2890,49 @@ Coalesced [105] mul16u::a#11 ← mul16u::a#0 Coalesced [106] mul16u::res#7 ← mul16u::res#6 Coalesced [107] mul16u::mb#9 ← mul16u::mb#1 Coalesced (already) [108] mul16u::res#8 ← mul16u::res#2 -Coalesced [134] memset::dst#4 ← memset::dst#1 -Coalesced [154] bitmap_init::yoffs#7 ← bitmap_init::yoffs#1 -Coalesced [159] bitmap_init::y#5 ← bitmap_init::y#1 -Coalesced [160] bitmap_init::yoffs#5 ← bitmap_init::yoffs#4 -Coalesced (already) [161] bitmap_init::yoffs#6 ← bitmap_init::yoffs#2 -Coalesced [162] bitmap_init::bits#5 ← bitmap_init::bits#4 -Coalesced [163] bitmap_init::x#5 ← bitmap_init::x#1 -Coalesced [164] bitmap_init::bits#6 ← bitmap_init::bits#1 -Coalesced [174] mul16s::a#8 ← mul16s::a#0 -Coalesced [185] sin16s_gen2::x#5 ← sin16s_gen2::x#1 -Coalesced [186] sin16s_gen2::sintab#7 ← sin16s_gen2::sintab#0 -Coalesced [187] sin16s_gen2::i#5 ← sin16s_gen2::i#1 -Coalesced [190] sin16s::x#9 ← sin16s::x#1 -Coalesced [194] sin16s::x#11 ← sin16s::x#2 -Coalesced [200] mulu16_sel::v1#8 ← mulu16_sel::v1#0 -Coalesced [201] mulu16_sel::v2#8 ← mulu16_sel::v2#0 -Coalesced [207] mulu16_sel::v1#9 ← mulu16_sel::v1#1 -Coalesced [208] mulu16_sel::v2#9 ← mulu16_sel::v2#1 -Coalesced [213] mulu16_sel::v1#10 ← mulu16_sel::v1#2 -Coalesced [220] mulu16_sel::v1#6 ← mulu16_sel::v1#3 -Coalesced [221] mulu16_sel::v2#6 ← mulu16_sel::v2#3 -Coalesced [227] mulu16_sel::v1#7 ← mulu16_sel::v1#4 -Coalesced [228] mulu16_sel::v2#7 ← mulu16_sel::v2#4 -Coalesced [236] sin16s::return#6 ← sin16s::sinx#1 -Coalesced [240] sin16s::x#10 ← sin16s::x#4 -Coalesced [241] sin16s::x#8 ← sin16s::x#0 -Coalesced [245] mul16u::mb#7 ← mul16u::b#1 -Coalesced [246] mul16u::a#9 ← mul16u::a#2 -Coalesced [258] divr16u::rem#12 ← divr16u::rem#4 -Coalesced [265] divr16u::rem#13 ← divr16u::rem#10 -Coalesced [266] divr16u::dividend#9 ← divr16u::dividend#5 -Coalesced [273] divr16u::rem#16 ← divr16u::rem#1 -Coalesced [280] divr16u::rem#18 ← divr16u::rem#2 -Coalesced [281] divr16u::return#8 ← divr16u::quotient#2 -Coalesced [287] divr16u::rem#14 ← divr16u::rem#11 -Coalesced [288] divr16u::dividend#10 ← divr16u::dividend#0 -Coalesced [289] divr16u::quotient#9 ← divr16u::return#0 -Coalesced [290] divr16u::i#7 ← divr16u::i#1 -Coalesced [291] divr16u::rem#17 ← divr16u::rem#6 -Coalesced [292] divr16u::return#7 ← divr16u::quotient#1 -Coalesced [293] divr16u::rem#15 ← divr16u::rem#0 -Coalesced [297] frame_cnt#26 ← frame_cnt#1 -Coalesced [302] frame_cnt#25 ← frame_cnt#0 +Coalesced [135] memset::dst#4 ← memset::dst#1 +Coalesced [155] bitmap_init::yoffs#7 ← bitmap_init::yoffs#1 +Coalesced [160] bitmap_init::y#5 ← bitmap_init::y#1 +Coalesced [161] bitmap_init::yoffs#5 ← bitmap_init::yoffs#4 +Coalesced (already) [162] bitmap_init::yoffs#6 ← bitmap_init::yoffs#2 +Coalesced [163] bitmap_init::bits#5 ← bitmap_init::bits#4 +Coalesced [164] bitmap_init::x#5 ← bitmap_init::x#1 +Coalesced [165] bitmap_init::bits#6 ← bitmap_init::bits#1 +Coalesced [175] mul16s::a#8 ← mul16s::a#0 +Coalesced [186] sin16s_gen2::x#5 ← sin16s_gen2::x#1 +Coalesced [187] sin16s_gen2::sintab#7 ← sin16s_gen2::sintab#0 +Coalesced [188] sin16s_gen2::i#5 ← sin16s_gen2::i#1 +Coalesced [191] sin16s::x#9 ← sin16s::x#1 +Coalesced [195] sin16s::x#11 ← sin16s::x#2 +Coalesced [201] mulu16_sel::v1#8 ← mulu16_sel::v1#0 +Coalesced [202] mulu16_sel::v2#8 ← mulu16_sel::v2#0 +Coalesced [208] mulu16_sel::v1#9 ← mulu16_sel::v1#1 +Coalesced [209] mulu16_sel::v2#9 ← mulu16_sel::v2#1 +Coalesced [214] mulu16_sel::v1#10 ← mulu16_sel::v1#2 +Coalesced [221] mulu16_sel::v1#6 ← mulu16_sel::v1#3 +Coalesced [222] mulu16_sel::v2#6 ← mulu16_sel::v2#3 +Coalesced [228] mulu16_sel::v1#7 ← mulu16_sel::v1#4 +Coalesced [229] mulu16_sel::v2#7 ← mulu16_sel::v2#4 +Coalesced [237] sin16s::return#6 ← sin16s::sinx#1 +Coalesced [241] sin16s::x#10 ← sin16s::x#4 +Coalesced [242] sin16s::x#8 ← sin16s::x#0 +Coalesced [246] mul16u::mb#7 ← mul16u::b#1 +Coalesced [247] mul16u::a#9 ← mul16u::a#2 +Coalesced [259] divr16u::rem#12 ← divr16u::rem#4 +Coalesced [266] divr16u::rem#13 ← divr16u::rem#10 +Coalesced [267] divr16u::dividend#9 ← divr16u::dividend#5 +Coalesced [274] divr16u::rem#16 ← divr16u::rem#1 +Coalesced [281] divr16u::rem#18 ← divr16u::rem#2 +Coalesced [282] divr16u::return#8 ← divr16u::quotient#2 +Coalesced [288] divr16u::rem#14 ← divr16u::rem#11 +Coalesced [289] divr16u::dividend#10 ← divr16u::dividend#0 +Coalesced [290] divr16u::quotient#9 ← divr16u::return#0 +Coalesced [291] divr16u::i#7 ← divr16u::i#1 +Coalesced [292] divr16u::rem#17 ← divr16u::rem#6 +Coalesced [293] divr16u::return#7 ← divr16u::quotient#1 +Coalesced [294] divr16u::rem#15 ← divr16u::rem#0 +Coalesced [298] frame_cnt#26 ← frame_cnt#1 +Coalesced [303] frame_cnt#25 ← frame_cnt#0 Coalesced down to 30 phi equivalence classes Culled Empty Block (label) @6 Culled Empty Block (label) @17 @@ -2923,8 +2948,8 @@ Culled Empty Block (label) mul16s::@7 Culled Empty Block (label) mul16u::@3 Culled Empty Block (label) mul16u::@10 Culled Empty Block (label) bitmap_clear::@2 -Culled Empty Block (label) memset::@2 -Culled Empty Block (label) memset::@4 +Culled Empty Block (label) memset::@1 +Culled Empty Block (label) memset::@6 Culled Empty Block (label) bitmap_init::@3 Culled Empty Block (label) bitmap_init::@4 Culled Empty Block (label) bitmap_init::@11 @@ -2954,6 +2979,8 @@ Renumbering block sin16s::@11 to sin16s::@10 Renumbering block sin16s::@12 to sin16s::@11 Renumbering block sin16s::@15 to sin16s::@12 Renumbering block mulu16_sel::@2 to mulu16_sel::@1 +Renumbering block memset::@2 to memset::@1 +Renumbering block memset::@4 to memset::@2 Renumbering block bitmap_init::@5 to bitmap_init::@3 Renumbering block bitmap_init::@6 to bitmap_init::@4 Renumbering block bitmap_init::@7 to bitmap_init::@5 @@ -3167,250 +3194,253 @@ bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 to:@return memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [97] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) + [97] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) [97] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 ) - [97] (void*) memset::str#2 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) - [98] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 - [99] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + [98] if((word) memset::num#2<=(byte) 0) goto memset::@return to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - [100] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) - [101] *((byte*) memset::dst#2) ← (byte) memset::c#3 - [102] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - [103] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 +memset::@1: scope:[memset] from memset + [99] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 + [100] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + to:memset::@2 +memset::@2: scope:[memset] from memset::@1 memset::@2 + [101] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 ) + [102] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [103] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [104] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 to:memset::@return -memset::@return: scope:[memset] from memset::@1 - [104] return +memset::@return: scope:[memset] from memset memset::@2 + [105] return to:@return bitmap_init: scope:[bitmap_init] from main::@6 - [105] phi() + [106] phi() to:bitmap_init::@1 bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2 - [106] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) - [106] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) - [107] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 - [108] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 - [109] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 + [107] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) + [107] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) + [108] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 + [109] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 + [110] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 to:bitmap_init::@2 bitmap_init::@6: scope:[bitmap_init] from bitmap_init::@1 - [110] phi() + [111] phi() to:bitmap_init::@2 bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6 - [111] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) - [112] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 - [113] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 + [112] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) + [113] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 + [114] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 to:bitmap_init::@3 bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4 - [114] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) - [114] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) - [115] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 - [116] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 - [117] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 - [118] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 - [119] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 - [120] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 - [121] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 + [115] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) + [115] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) + [116] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 + [117] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 + [118] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 + [119] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 + [120] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 + [121] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 + [122] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 to:bitmap_init::@5 bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@3 - [122] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 + [123] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 to:bitmap_init::@4 bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 - [123] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) - [124] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 - [125] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 + [124] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) + [125] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 + [126] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 to:bitmap_init::@return bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 - [126] return + [127] return to:@return sin16s_gen2: scope:[sin16s_gen2] from main - [127] phi() - [128] call div32u16u - [129] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + [128] phi() + [129] call div32u16u + [130] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 to:sin16s_gen2::@2 sin16s_gen2::@2: scope:[sin16s_gen2] from sin16s_gen2 - [130] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 + [131] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 to:sin16s_gen2::@1 sin16s_gen2::@1: scope:[sin16s_gen2] from sin16s_gen2::@2 sin16s_gen2::@4 - [131] (word) sin16s_gen2::i#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(word) sin16s_gen2::i#1 ) - [131] (signed word*) sin16s_gen2::sintab#2 ← phi( sin16s_gen2::@2/(const signed word[$200]) SINUS#0 sin16s_gen2::@4/(signed word*) sin16s_gen2::sintab#0 ) - [131] (dword) sin16s_gen2::x#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(dword) sin16s_gen2::x#1 ) - [132] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 - [133] call sin16s - [134] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 + [132] (word) sin16s_gen2::i#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(word) sin16s_gen2::i#1 ) + [132] (signed word*) sin16s_gen2::sintab#2 ← phi( sin16s_gen2::@2/(const signed word[$200]) SINUS#0 sin16s_gen2::@4/(signed word*) sin16s_gen2::sintab#0 ) + [132] (dword) sin16s_gen2::x#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(dword) sin16s_gen2::x#1 ) + [133] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 + [134] call sin16s + [135] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 to:sin16s_gen2::@3 sin16s_gen2::@3: scope:[sin16s_gen2] from sin16s_gen2::@1 - [135] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 - [136] call mul16s - [137] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 + [136] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 + [137] call mul16s + [138] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 to:sin16s_gen2::@4 sin16s_gen2::@4: scope:[sin16s_gen2] from sin16s_gen2::@3 - [138] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 - [139] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 - [140] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 - [141] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD - [142] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 - [143] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 - [144] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 + [139] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 + [140] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 + [141] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 + [142] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD + [143] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 + [144] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 + [145] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 to:sin16s_gen2::@return sin16s_gen2::@return: scope:[sin16s_gen2] from sin16s_gen2::@4 - [145] return + [146] return to:@return sin16s: scope:[sin16s] from sin16s_gen2::@1 - [146] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 + [147] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 to:sin16s::@4 sin16s::@4: scope:[sin16s] from sin16s - [147] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 + [148] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 to:sin16s::@1 sin16s::@1: scope:[sin16s] from sin16s sin16s::@4 - [148] (byte) sin16s::isUpper#2 ← phi( sin16s/(byte) 0 sin16s::@4/(byte) 1 ) - [148] (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#0 sin16s::@4/(dword) sin16s::x#1 ) - [149] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 + [149] (byte) sin16s::isUpper#2 ← phi( sin16s/(byte) 0 sin16s::@4/(byte) 1 ) + [149] (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#0 sin16s::@4/(dword) sin16s::x#1 ) + [150] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 to:sin16s::@5 sin16s::@5: scope:[sin16s] from sin16s::@1 - [150] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 + [151] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 to:sin16s::@2 sin16s::@2: scope:[sin16s] from sin16s::@1 sin16s::@5 - [151] (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 ) - [152] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 - [153] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 - [154] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 - [155] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 - [156] call mulu16_sel - [157] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 + [152] (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 ) + [153] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 + [154] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 + [155] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 + [156] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 + [157] call mulu16_sel + [158] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 to:sin16s::@7 sin16s::@7: scope:[sin16s] from sin16s::@2 - [158] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 - [159] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 - [160] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 - [161] call mulu16_sel - [162] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 + [159] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 + [160] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 + [161] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 + [162] call mulu16_sel + [163] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 to:sin16s::@8 sin16s::@8: scope:[sin16s] from sin16s::@7 - [163] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 - [164] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 - [165] call mulu16_sel - [166] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 + [164] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 + [165] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 + [166] call mulu16_sel + [167] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 to:sin16s::@9 sin16s::@9: scope:[sin16s] from sin16s::@8 - [167] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 - [168] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 - [169] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 - [170] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 - [171] call mulu16_sel - [172] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 + [168] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 + [169] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 + [170] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 + [171] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 + [172] call mulu16_sel + [173] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 to:sin16s::@10 sin16s::@10: scope:[sin16s] from sin16s::@9 - [173] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 - [174] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 - [175] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 - [176] call mulu16_sel - [177] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 + [174] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 + [175] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 + [176] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 + [177] call mulu16_sel + [178] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 to:sin16s::@11 sin16s::@11: scope:[sin16s] from sin16s::@10 - [178] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 - [179] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 - [180] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 - [181] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 + [179] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 + [180] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 + [181] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 + [182] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 to:sin16s::@6 sin16s::@6: scope:[sin16s] from sin16s::@11 - [182] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 + [183] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 to:sin16s::@3 sin16s::@3: scope:[sin16s] from sin16s::@12 sin16s::@6 - [183] (signed word) sin16s::return#1 ← phi( sin16s::@12/(signed word~) sin16s::return#5 sin16s::@6/(signed word) sin16s::sinx#1 ) + [184] (signed word) sin16s::return#1 ← phi( sin16s::@12/(signed word~) sin16s::return#5 sin16s::@6/(signed word) sin16s::sinx#1 ) to:sin16s::@return sin16s::@return: scope:[sin16s] from sin16s::@3 - [184] return + [185] return to:@return sin16s::@12: scope:[sin16s] from sin16s::@11 - [185] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 + [186] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 to:sin16s::@3 mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 - [186] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) - [186] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) - [186] (word) mulu16_sel::v1#5 ← phi( sin16s::@9/(word) mulu16_sel::v1#3 sin16s::@10/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@7/(word) mulu16_sel::v1#1 sin16s::@8/(word) mulu16_sel::v1#2 ) - [187] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 - [188] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 - [189] call mul16u - [190] (dword) mul16u::return#3 ← (dword) mul16u::res#2 + [187] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) + [187] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) + [187] (word) mulu16_sel::v1#5 ← phi( sin16s::@9/(word) mulu16_sel::v1#3 sin16s::@10/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@7/(word) mulu16_sel::v1#1 sin16s::@8/(word) mulu16_sel::v1#2 ) + [188] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 + [189] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 + [190] call mul16u + [191] (dword) mul16u::return#3 ← (dword) mul16u::res#2 to:mulu16_sel::@1 mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel - [191] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 - [192] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 - [193] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 + [192] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 + [193] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 + [194] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 to:mulu16_sel::@return mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 - [194] return + [195] return to:@return div32u16u: scope:[div32u16u] from sin16s_gen2 - [195] phi() - [196] call divr16u - [197] (word) divr16u::return#2 ← (word) divr16u::return#0 + [196] phi() + [197] call divr16u + [198] (word) divr16u::return#2 ← (word) divr16u::return#0 to:div32u16u::@1 div32u16u::@1: scope:[div32u16u] from div32u16u - [198] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 - [199] (word) divr16u::rem#4 ← (word) rem16u#1 - [200] call divr16u - [201] (word) divr16u::return#3 ← (word) divr16u::return#0 + [199] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [200] (word) divr16u::rem#4 ← (word) rem16u#1 + [201] call divr16u + [202] (word) divr16u::return#3 ← (word) divr16u::return#0 to:div32u16u::@2 div32u16u::@2: scope:[div32u16u] from div32u16u::@1 - [202] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 - [203] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + [203] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [204] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 to:div32u16u::@return div32u16u::@return: scope:[div32u16u] from div32u16u::@2 - [204] return + [205] return to:@return divr16u: scope:[divr16u] from div32u16u div32u16u::@1 - [205] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) - [205] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) + [206] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) + [206] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) to:divr16u::@1 divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 - [206] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) - [206] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) - [206] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) - [206] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) - [207] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 - [208] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 - [209] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 - [210] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + [207] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) + [207] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) + [207] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [207] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [208] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [209] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [210] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [211] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 to:divr16u::@4 divr16u::@4: scope:[divr16u] from divr16u::@1 - [211] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + [212] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 to:divr16u::@2 divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 - [212] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) - [213] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 - [214] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 - [215] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 + [213] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [214] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [215] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [216] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 to:divr16u::@5 divr16u::@5: scope:[divr16u] from divr16u::@2 - [216] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 - [217] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 + [217] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [218] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 to:divr16u::@3 divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 - [218] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) - [218] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) - [219] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 - [220] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + [219] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [219] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [220] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [221] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 to:divr16u::@6 divr16u::@6: scope:[divr16u] from divr16u::@3 - [221] (word) rem16u#1 ← (word) divr16u::rem#11 + [222] (word) rem16u#1 ← (word) divr16u::rem#11 to:divr16u::@return divr16u::@return: scope:[divr16u] from divr16u::@6 - [222] return + [223] return to:@return irq: scope:[irq] from - [223] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 - [224] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 + [224] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 + [225] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 to:irq::@2 irq::@2: scope:[irq] from irq - [225] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 + [226] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 to:irq::@1 irq::@1: scope:[irq] from irq irq::@2 - [226] (byte) frame_cnt#10 ← phi( irq/(byte) frame_cnt#0 irq::@2/(byte) frame_cnt#1 ) - [227] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 - [228] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + [227] (byte) frame_cnt#10 ← phi( irq/(byte) frame_cnt#0 irq::@2/(byte) frame_cnt#1 ) + [228] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 + [229] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 to:irq::@return irq::@return: scope:[irq] from irq::@1 - [229] return + [230] return to:@return @@ -3569,7 +3599,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (signed dword) main::ypos#0 22.0 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (byte) memset::c -(byte) memset::c#3 1.5714285714285714 +(byte) memset::c#3 1.375 (byte*) memset::dst (byte*) memset::dst#1 16.5 (byte*) memset::dst#2 17.5 @@ -3580,7 +3610,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (word) memset::num#2 2.0 (void*) memset::return (void*) memset::str -(void*) memset::str#2 +(void*) memset::str#3 (signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) (word~) mul16s::$13 4.0 (word~) mul16s::$16 4.0 @@ -3720,8 +3750,8 @@ Initial phi equivalence classes [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] -[ memset::str#2 ] [ memset::num#2 ] +[ memset::str#3 ] [ memset::c#3 ] [ memset::dst#2 memset::dst#3 memset::dst#1 ] [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] @@ -3820,8 +3850,8 @@ Complete equivalence classes [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] -[ memset::str#2 ] [ memset::num#2 ] +[ memset::str#3 ] [ memset::c#3 ] [ memset::dst#2 memset::dst#3 memset::dst#1 ] [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] @@ -3919,8 +3949,8 @@ Allocated zp ZP_WORD:16 [ mul16u::b#1 ] Allocated zp ZP_WORD:18 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] Allocated zp ZP_DWORD:20 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] Allocated zp ZP_DWORD:24 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] -Allocated zp ZP_WORD:28 [ memset::str#2 ] -Allocated zp ZP_WORD:30 [ memset::num#2 ] +Allocated zp ZP_WORD:28 [ memset::num#2 ] +Allocated zp ZP_WORD:30 [ memset::str#3 ] Allocated zp ZP_BYTE:32 [ memset::c#3 ] Allocated zp ZP_WORD:33 [ memset::dst#2 memset::dst#3 memset::dst#1 ] Allocated zp ZP_BYTE:35 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] @@ -4103,7 +4133,7 @@ main: { .label _26 = $46 .label _27 = $5c // [6] call sin16s_gen2 - // [127] phi from main to sin16s_gen2 [phi:main->sin16s_gen2] + // [128] phi from main to sin16s_gen2 [phi:main->sin16s_gen2] sin16s_gen2_from_main: jsr sin16s_gen2 // [7] phi from main to main::@6 [phi:main->main::@6] @@ -4112,7 +4142,7 @@ main: { // main::@6 b6: // [8] call bitmap_init - // [105] phi from main::@6 to bitmap_init [phi:main::@6->bitmap_init] + // [106] phi from main::@6 to bitmap_init [phi:main::@6->bitmap_init] bitmap_init_from_b6: jsr bitmap_init // [9] phi from main::@6 to main::@7 [phi:main::@6->main::@7] @@ -4760,16 +4790,16 @@ bitmap_clear: { // [97] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuz1=vbuc1 lda #col sta memset.c - // [97] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 - lda #<$3e8 - sta memset.num - lda #>$3e8 - sta memset.num+1 - // [97] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + // [97] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 + // [97] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#2] -- vwuz1=vwuc1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 jsr memset // [94] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] b1_from_bitmap_clear: @@ -4782,16 +4812,16 @@ bitmap_clear: { // [97] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuz1=vbuc1 lda #0 sta memset.c - // [97] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 - lda #<$1f40 - sta memset.num - lda #>$1f40 - sta memset.num+1 - // [97] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + // [97] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1 lda #<BITMAP sta memset.str lda #>BITMAP sta memset.str+1 + // [97] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#2] -- vwuz1=vwuc1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 jsr memset jmp breturn // bitmap_clear::@return @@ -4801,14 +4831,22 @@ bitmap_clear: { } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage($1c) str, byte zeropage($20) c, word zeropage($1e) num) +// memset(void* zeropage($1e) str, byte zeropage($20) c, word zeropage($1c) num) memset: { .label end = $8b .label dst = $21 - .label str = $1c - .label num = $1e + .label num = $1c + .label str = $1e .label c = $20 - // [98] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz3 + // [98] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 + lda num + beq breturn + lda num+1 + beq breturn + jmp b1 + // memset::@1 + b1: + // [99] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz3 lda str clc adc num @@ -4816,38 +4854,38 @@ memset: { lda str+1 adc num+1 sta end+1 - // [99] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 -- pbuz1=pbuz2 + // [100] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 -- pbuz1=pbuz2 lda str sta dst lda str+1 sta dst+1 - // [100] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - b1_from_memset: - b1_from_b1: - // [100] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - jmp b1 - // memset::@1 - b1: - // [101] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuz2 + // [101] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + b2_from_b1: + b2_from_b2: + // [101] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + jmp b2 + // memset::@2 + b2: + // [102] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuz2 lda c ldy #0 sta (dst),y - // [102] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [103] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [103] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [104] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1_from_b1 + bne b2_from_b2 lda dst cmp end - bne b1_from_b1 + bne b2_from_b2 jmp breturn // memset::@return breturn: - // [104] return + // [105] return rts } // bitmap_init @@ -4861,103 +4899,103 @@ bitmap_init: { .label x = $24 .label y = $25 .label yoffs = $26 - // [106] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + // [107] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] b1_from_bitmap_init: - // [106] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuz1=vbuc1 + // [107] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuz1=vbuc1 lda #0 sta x - // [106] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuz1=vbuc1 + // [107] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuz1=vbuc1 lda #$80 sta bits jmp b1 - // [106] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + // [107] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] b1_from_b2: - // [106] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - // [106] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + // [107] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + // [107] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy jmp b1 // bitmap_init::@1 b1: - // [107] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuz1=vbuz2 + // [108] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuz1=vbuz2 lda bits ldy x sta bitmap_plot_bit,y - // [108] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuz1=vbuz1_ror_1 + // [109] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuz1=vbuz1_ror_1 lsr bits - // [109] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuz1_neq_0_then_la1 + // [110] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuz1_neq_0_then_la1 lda bits cmp #0 bne b6_from_b1 - // [111] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + // [112] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] b2_from_b1: - // [111] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuz1=vbuc1 + // [112] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuz1=vbuc1 lda #$80 sta bits jmp b2 - // [110] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + // [111] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] b6_from_b1: jmp b6 // bitmap_init::@6 b6: - // [111] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + // [112] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] b2_from_b6: - // [111] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + // [112] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy jmp b2 // bitmap_init::@2 b2: - // [112] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuz1=_inc_vbuz1 + // [113] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuz1=_inc_vbuz1 inc x - // [113] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuz1_neq_0_then_la1 + // [114] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuz1_neq_0_then_la1 lda x cmp #0 bne b1_from_b2 - // [114] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + // [115] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] b3_from_b2: - // [114] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + // [115] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #<BITMAP sta yoffs lda #>BITMAP sta yoffs+1 - // [114] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuz1=vbuc1 + // [115] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuz1=vbuc1 lda #0 sta y jmp b3 - // [114] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + // [115] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] b3_from_b4: - // [114] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - // [114] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + // [115] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + // [115] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy jmp b3 // bitmap_init::@3 b3: - // [115] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 + // [116] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 lda #7 and y sta _7 - // [116] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuz1=_lo_pbuz2 + // [117] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuz1=_lo_pbuz2 lda yoffs sta _4 - // [117] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuz1=vbuz2_bor_vbuz3 + // [118] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuz1=vbuz2_bor_vbuz3 lda _7 ora _4 sta _5 - // [118] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuz1=vbuz2 + // [119] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuz1=vbuz2 lda _5 ldy y sta bitmap_plot_ylo,y - // [119] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuz1=_hi_pbuz2 + // [120] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuz1=_hi_pbuz2 lda yoffs+1 sta _6 - // [120] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuz1=vbuz2 + // [121] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuz1=vbuz2 lda _6 ldy y sta bitmap_plot_yhi,y - // [121] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + // [122] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp _7 bne b4_from_b3 jmp b5 // bitmap_init::@5 b5: - // [122] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + // [123] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda yoffs adc #<$28*8 @@ -4965,23 +5003,23 @@ bitmap_init: { lda yoffs+1 adc #>$28*8 sta yoffs+1 - // [123] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + // [124] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] b4_from_b3: b4_from_b5: - // [123] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + // [124] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy jmp b4 // bitmap_init::@4 b4: - // [124] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuz1=_inc_vbuz1 + // [125] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuz1=_inc_vbuz1 inc y - // [125] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuz1_neq_0_then_la1 + // [126] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuz1_neq_0_then_la1 lda y cmp #0 bne b3_from_b4 jmp breturn // bitmap_init::@return breturn: - // [126] return + // [127] return rts } // sin16s_gen2 @@ -5000,11 +5038,11 @@ sin16s_gen2: { .label sintab = $2c .label x = $28 .label i = $2e - // [128] call div32u16u - // [195] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] + // [129] call div32u16u + // [196] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] div32u16u_from_sin16s_gen2: jsr div32u16u - // [129] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 -- vduz1=vduz2 + // [130] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 -- vduz1=vduz2 lda div32u16u.return sta div32u16u.return_2 lda div32u16u.return+1 @@ -5016,7 +5054,7 @@ sin16s_gen2: { jmp b2 // sin16s_gen2::@2 b2: - // [130] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 -- vduz1=vduz2 + // [131] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 -- vduz1=vduz2 lda div32u16u.return_2 sta step lda div32u16u.return_2+1 @@ -5025,19 +5063,19 @@ sin16s_gen2: { sta step+2 lda div32u16u.return_2+3 sta step+3 - // [131] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] + // [132] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] b1_from_b2: - // [131] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 + // [132] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 lda #<0 sta i lda #>0 sta i+1 - // [131] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) SINUS#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 + // [132] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) SINUS#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 lda #<SINUS sta sintab lda #>SINUS sta sintab+1 - // [131] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 + // [132] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 lda #0 sta x lda #0 @@ -5046,15 +5084,15 @@ sin16s_gen2: { sta x+3 jmp b1 // u[4.28] - // [131] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] + // [132] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] b1_from_b4: - // [131] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy - // [131] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy - // [131] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy + // [132] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy + // [132] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy + // [132] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy jmp b1 // sin16s_gen2::@1 b1: - // [132] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 + // [133] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 lda x sta sin16s.x lda x+1 @@ -5063,9 +5101,9 @@ sin16s_gen2: { sta sin16s.x+2 lda x+3 sta sin16s.x+3 - // [133] call sin16s + // [134] call sin16s jsr sin16s - // [134] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 -- vwsz1=vwsz2 + // [135] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 -- vwsz1=vwsz2 lda sin16s.return_1 sta sin16s.return lda sin16s.return_1+1 @@ -5073,12 +5111,12 @@ sin16s_gen2: { jmp b3 // sin16s_gen2::@3 b3: - // [135] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 -- vwsz1=vwsz2 + // [136] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 -- vwsz1=vwsz2 lda sin16s.return sta mul16s.a lda sin16s.return+1 sta mul16s.a+1 - // [136] call mul16s + // [137] call mul16s // [54] phi from sin16s_gen2::@3 to mul16s [phi:sin16s_gen2::@3->mul16s] mul16s_from_b3: // [54] phi (signed word) mul16s::b#3 = (const signed word) sin16s_gen2::ampl#0 [phi:sin16s_gen2::@3->mul16s#0] -- vwsz1=vwsc1 @@ -5088,7 +5126,7 @@ sin16s_gen2: { sta mul16s.b+1 // [54] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#0 [phi:sin16s_gen2::@3->mul16s#1] -- register_copy jsr mul16s - // [137] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 -- vdsz1=vdsz2 + // [138] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 -- vdsz1=vdsz2 lda mul16s.return sta mul16s.return_2 lda mul16s.return+1 @@ -5100,7 +5138,7 @@ sin16s_gen2: { jmp b4 // sin16s_gen2::@4 b4: - // [138] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 -- vdsz1=vdsz2 + // [139] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 -- vdsz1=vdsz2 lda mul16s.return_2 sta _5 lda mul16s.return_2+1 @@ -5109,19 +5147,19 @@ sin16s_gen2: { sta _5+2 lda mul16s.return_2+3 sta _5+3 - // [139] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 + // [140] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 lda _5+2 sta _8 lda _5+3 sta _8+1 - // [140] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 -- _deref_pwsz1=vwsz2 + // [141] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 -- _deref_pwsz1=vwsz2 ldy #0 lda _8 sta (sintab),y iny lda _8+1 sta (sintab),y - // [141] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 + // [142] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 lda #SIZEOF_SIGNED_WORD clc adc sintab @@ -5129,7 +5167,7 @@ sin16s_gen2: { bcc !+ inc sintab+1 !: - // [142] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 + // [143] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 lda x clc adc step @@ -5143,12 +5181,12 @@ sin16s_gen2: { lda x+3 adc step+3 sta x+3 - // [143] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 + // [144] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 inc i bne !+ inc i+1 !: - // [144] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 + // [145] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 lda i+1 cmp #>wavelength bcc b1_from_b4 @@ -5160,7 +5198,7 @@ sin16s_gen2: { jmp breturn // sin16s_gen2::@return breturn: - // [145] return + // [146] return rts } // sin16s @@ -5185,7 +5223,7 @@ sin16s: { .label sinx = $35 .label isUpper = $30 .label return_5 = $35 - // [146] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 + // [147] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_u4f28>>$10 bcc b1_from_sin16s @@ -5205,7 +5243,7 @@ sin16s: { jmp b4 // sin16s::@4 b4: - // [147] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 -- vduz1=vduz1_minus_vduc1 + // [148] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 -- vduz1=vduz1_minus_vduc1 lda x sec sbc #<PI_u4f28 @@ -5219,23 +5257,23 @@ sin16s: { lda x+3 sbc #>PI_u4f28>>$10 sta x+3 - // [148] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] + // [149] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] b1_from_b4: - // [148] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 + // [149] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 lda #1 sta isUpper - // [148] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy + // [149] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy jmp b1 - // [148] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] + // [149] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] b1_from_sin16s: - // [148] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 + // [149] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 lda #0 sta isUpper - // [148] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy + // [149] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy jmp b1 // sin16s::@1 b1: - // [149] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 + // [150] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_HALF_u4f28>>$10 bcc b2_from_b1 @@ -5255,7 +5293,7 @@ sin16s: { jmp b5 // sin16s::@5 b5: - // [150] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 -- vduz1=vduc1_minus_vduz1 + // [151] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 -- vduz1=vduc1_minus_vduz1 lda #<PI_u4f28 sec sbc x @@ -5269,14 +5307,14 @@ sin16s: { lda #>PI_u4f28>>$10 sbc x+3 sta x+3 - // [151] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] + // [152] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] b2_from_b1: b2_from_b5: - // [151] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy + // [152] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy jmp b2 // sin16s::@2 b2: - // [152] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz2_rol_3 + // [153] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz2_rol_3 lda x sta _4 lda x+1 @@ -5293,31 +5331,31 @@ sin16s: { rol _4+3 dey bne !- - // [153] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 + // [154] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 lda _4+2 sta x1 lda _4+3 sta x1+1 - // [154] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [155] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v1 lda x1+1 sta mulu16_sel.v1+1 - // [155] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [156] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [156] call mulu16_sel - // [186] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] + // [157] call mulu16_sel + // [187] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] mulu16_sel_from_b2: - // [186] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuz1=vbuc1 + // [187] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuz1=vbuc1 lda #0 sta mulu16_sel.select - // [186] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy - // [186] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy + // [187] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy + // [187] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy jsr mulu16_sel - // [157] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + // [158] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return_12 sta mulu16_sel.return lda mulu16_sel.return_12+1 @@ -5325,31 +5363,31 @@ sin16s: { jmp b7 // sin16s::@7 b7: - // [158] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 + // [159] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 lda mulu16_sel.return sta x2 lda mulu16_sel.return+1 sta x2+1 - // [159] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 -- vwuz1=vwuz2 + // [160] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 -- vwuz1=vwuz2 lda x2 sta mulu16_sel.v1 lda x2+1 sta mulu16_sel.v1+1 - // [160] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [161] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [161] call mulu16_sel - // [186] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] + // [162] call mulu16_sel + // [187] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] mulu16_sel_from_b7: - // [186] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuz1=vbuc1 + // [187] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuz1=vbuc1 lda #1 sta mulu16_sel.select - // [186] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy - // [186] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy + // [187] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy + // [187] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy jsr mulu16_sel - // [162] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + // [163] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return_12 sta mulu16_sel.return_1 lda mulu16_sel.return_12+1 @@ -5357,30 +5395,30 @@ sin16s: { jmp b8 // sin16s::@8 b8: - // [163] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 -- vwuz1=vwuz2 + // [164] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 -- vwuz1=vwuz2 lda mulu16_sel.return_1 sta x3 lda mulu16_sel.return_1+1 sta x3+1 - // [164] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 -- vwuz1=vwuz2 + // [165] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 -- vwuz1=vwuz2 lda x3 sta mulu16_sel.v1 lda x3+1 sta mulu16_sel.v1+1 - // [165] call mulu16_sel - // [186] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] + // [166] call mulu16_sel + // [187] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] mulu16_sel_from_b8: - // [186] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuz1=vbuc1 + // [187] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuz1=vbuc1 lda #1 sta mulu16_sel.select - // [186] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 + // [187] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 lda #<$10000/6 sta mulu16_sel.v2 lda #>$10000/6 sta mulu16_sel.v2+1 - // [186] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy + // [187] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy jsr mulu16_sel - // [166] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + // [167] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return_12 sta mulu16_sel.return_2 lda mulu16_sel.return_12+1 @@ -5388,12 +5426,12 @@ sin16s: { jmp b9 // sin16s::@9 b9: - // [167] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 -- vwuz1=vwuz2 + // [168] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 -- vwuz1=vwuz2 lda mulu16_sel.return_2 sta x3_6 lda mulu16_sel.return_2+1 sta x3_6+1 - // [168] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 + // [169] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 lda x1 sec sbc x3_6 @@ -5401,26 +5439,26 @@ sin16s: { lda x1+1 sbc x3_6+1 sta usinx+1 - // [169] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 -- vwuz1=vwuz2 + // [170] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 -- vwuz1=vwuz2 lda x3 sta mulu16_sel.v1 lda x3+1 sta mulu16_sel.v1+1 - // [170] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [171] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [171] call mulu16_sel - // [186] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] + // [172] call mulu16_sel + // [187] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] mulu16_sel_from_b9: - // [186] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuz1=vbuc1 + // [187] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuz1=vbuc1 lda #0 sta mulu16_sel.select - // [186] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy - // [186] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy + // [187] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy + // [187] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy jsr mulu16_sel - // [172] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + // [173] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return_12 sta mulu16_sel.return_10 lda mulu16_sel.return_12+1 @@ -5428,31 +5466,31 @@ sin16s: { jmp b10 // sin16s::@10 b10: - // [173] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 -- vwuz1=vwuz2 + // [174] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 -- vwuz1=vwuz2 lda mulu16_sel.return_10 sta x4 lda mulu16_sel.return_10+1 sta x4+1 - // [174] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 -- vwuz1=vwuz2 + // [175] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 -- vwuz1=vwuz2 lda x4 sta mulu16_sel.v1 lda x4+1 sta mulu16_sel.v1+1 - // [175] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [176] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [176] call mulu16_sel - // [186] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] + // [177] call mulu16_sel + // [187] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] mulu16_sel_from_b10: - // [186] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuz1=vbuc1 + // [187] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuz1=vbuc1 lda #0 sta mulu16_sel.select - // [186] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy - // [186] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy + // [187] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy + // [187] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy jsr mulu16_sel - // [177] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + // [178] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return_12 sta mulu16_sel.return_11 lda mulu16_sel.return_12+1 @@ -5460,12 +5498,12 @@ sin16s: { jmp b11 // sin16s::@11 b11: - // [178] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 -- vwuz1=vwuz2 + // [179] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 -- vwuz1=vwuz2 lda mulu16_sel.return_11 sta x5 lda mulu16_sel.return_11+1 sta x5+1 - // [179] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz2_ror_4 + // [180] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz2_ror_4 lda x5+1 lsr sta x5_128+1 @@ -5478,7 +5516,7 @@ sin16s: { ror x5_128 lsr x5_128+1 ror x5_128 - // [180] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz2_plus_vwuz3 + // [181] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz2_plus_vwuz3 lda usinx clc adc x5_128 @@ -5486,14 +5524,14 @@ sin16s: { lda usinx+1 adc x5_128+1 sta usinx_1+1 - // [181] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 + // [182] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 lda isUpper cmp #0 beq b12 jmp b6 // sin16s::@6 b6: - // [182] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz2 + // [183] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz2 sec lda #0 sbc usinx_1 @@ -5501,21 +5539,21 @@ sin16s: { lda #0 sbc usinx_1+1 sta sinx+1 - // [183] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] + // [184] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] b3_from_b12: b3_from_b6: - // [183] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy + // [184] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy jmp b3 // sin16s::@3 b3: jmp breturn // sin16s::@return breturn: - // [184] return + // [185] return rts // sin16s::@12 b12: - // [185] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 -- vwsz1=vwsz2 + // [186] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 -- vwsz1=vwsz2 lda usinx_1 sta return_5 lda usinx_1+1 @@ -5538,17 +5576,17 @@ mulu16_sel: { .label return_11 = $bd .label select = $3b .label return_12 = $d1 - // [187] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 + // [188] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 lda v1 sta mul16u.a lda v1+1 sta mul16u.a+1 - // [188] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 -- vwuz1=vwuz2 + // [189] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 -- vwuz1=vwuz2 lda v2 sta mul16u.b_1 lda v2+1 sta mul16u.b_1+1 - // [189] call mul16u + // [190] call mul16u // [72] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u] mul16u_from_mulu16_sel: // [72] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy @@ -5561,7 +5599,7 @@ mulu16_sel: { sta mul16u.mb+2 sta mul16u.mb+3 jsr mul16u - // [190] (dword) mul16u::return#3 ← (dword) mul16u::res#2 -- vduz1=vduz2 + // [191] (dword) mul16u::return#3 ← (dword) mul16u::res#2 -- vduz1=vduz2 lda mul16u.res sta mul16u.return_3 lda mul16u.res+1 @@ -5573,7 +5611,7 @@ mulu16_sel: { jmp b1 // mulu16_sel::@1 b1: - // [191] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 -- vduz1=vduz2 + // [192] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 -- vduz1=vduz2 lda mul16u.return_3 sta _0 lda mul16u.return_3+1 @@ -5582,7 +5620,7 @@ mulu16_sel: { sta _0+2 lda mul16u.return_3+3 sta _0+3 - // [192] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz2_rol_vbuz3 + // [193] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz2_rol_vbuz3 lda _0 sta _1 lda _0+1 @@ -5601,7 +5639,7 @@ mulu16_sel: { dex bne !- !e: - // [193] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 + // [194] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 lda _1+2 sta return_12 lda _1+3 @@ -5609,7 +5647,7 @@ mulu16_sel: { jmp breturn // mulu16_sel::@return breturn: - // [194] return + // [195] return rts } // div32u16u @@ -5620,21 +5658,21 @@ div32u16u: { .label quotient_lo = $d9 .label return = $db .label return_2 = $91 - // [196] call divr16u - // [205] phi from div32u16u to divr16u [phi:div32u16u->divr16u] + // [197] call divr16u + // [206] phi from div32u16u to divr16u [phi:div32u16u->divr16u] divr16u_from_div32u16u: - // [205] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 + // [206] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 lda #<PI2_u4f28>>$10 sta divr16u.dividend lda #>PI2_u4f28>>$10 sta divr16u.dividend+1 - // [205] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 + // [206] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 lda #<0 sta divr16u.rem lda #>0 sta divr16u.rem+1 jsr divr16u - // [197] (word) divr16u::return#2 ← (word) divr16u::return#0 -- vwuz1=vwuz2 + // [198] (word) divr16u::return#2 ← (word) divr16u::return#0 -- vwuz1=vwuz2 lda divr16u.return sta divr16u.return_2 lda divr16u.return+1 @@ -5642,27 +5680,27 @@ div32u16u: { jmp b1 // div32u16u::@1 b1: - // [198] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 + // [199] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 lda divr16u.return_2 sta quotient_hi lda divr16u.return_2+1 sta quotient_hi+1 - // [199] (word) divr16u::rem#4 ← (word) rem16u#1 -- vwuz1=vwuz2 + // [200] (word) divr16u::rem#4 ← (word) rem16u#1 -- vwuz1=vwuz2 lda rem16u sta divr16u.rem lda rem16u+1 sta divr16u.rem+1 - // [200] call divr16u - // [205] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] + // [201] call divr16u + // [206] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] divr16u_from_b1: - // [205] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 + // [206] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 lda #<PI2_u4f28&$ffff sta divr16u.dividend lda #>PI2_u4f28&$ffff sta divr16u.dividend+1 - // [205] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy + // [206] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy jsr divr16u - // [201] (word) divr16u::return#3 ← (word) divr16u::return#0 -- vwuz1=vwuz2 + // [202] (word) divr16u::return#3 ← (word) divr16u::return#0 -- vwuz1=vwuz2 lda divr16u.return sta divr16u.return_3 lda divr16u.return+1 @@ -5670,12 +5708,12 @@ div32u16u: { jmp b2 // div32u16u::@2 b2: - // [202] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 -- vwuz1=vwuz2 + // [203] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 -- vwuz1=vwuz2 lda divr16u.return_3 sta quotient_lo lda divr16u.return_3+1 sta quotient_lo+1 - // [203] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 + // [204] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 lda quotient_hi sta return+2 lda quotient_hi+1 @@ -5687,7 +5725,7 @@ div32u16u: { jmp breturn // div32u16u::@return breturn: - // [204] return + // [205] return rts } // divr16u @@ -5706,63 +5744,63 @@ divr16u: { .label return = $40 .label return_2 = $d3 .label return_3 = $d7 - // [206] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + // [207] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] b1_from_divr16u: - // [206] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuz1=vbuc1 + // [207] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuz1=vbuc1 lda #0 sta i - // [206] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + // [207] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 lda #<0 sta quotient lda #>0 sta quotient+1 - // [206] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy - // [206] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy + // [207] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy + // [207] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy jmp b1 - // [206] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + // [207] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] b1_from_b3: - // [206] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy - // [206] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy - // [206] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy - // [206] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + // [207] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + // [207] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + // [207] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + // [207] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy jmp b1 // divr16u::@1 b1: - // [207] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [208] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl rem rol rem+1 - // [208] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuz1=_hi_vwuz2 + // [209] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuz1=_hi_vwuz2 lda dividend+1 sta _1 - // [209] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuz1=vbuz2_band_vbuc1 + // [210] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuz1=vbuz2_band_vbuc1 lda #$80 and _1 sta _2 - // [210] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuz1_eq_0_then_la1 + // [211] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuz1_eq_0_then_la1 lda _2 cmp #0 beq b2_from_b1 jmp b4 // divr16u::@4 b4: - // [211] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 + // [212] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 lda #1 ora rem sta rem - // [212] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + // [213] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] b2_from_b1: b2_from_b4: - // [212] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + // [213] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy jmp b2 // divr16u::@2 b2: - // [213] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [214] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl dividend rol dividend+1 - // [214] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [215] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl quotient rol quotient+1 - // [215] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + // [216] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 lda rem+1 cmp #>sin16s_gen2.wavelength bcc b3_from_b2 @@ -5774,12 +5812,12 @@ divr16u: { jmp b5 // divr16u::@5 b5: - // [216] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 + // [217] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 inc quotient bne !+ inc quotient+1 !: - // [217] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 -- vwuz1=vwuz1_minus_vwuc1 + // [218] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 -- vwuz1=vwuz1_minus_vwuc1 lda rem sec sbc #<sin16s_gen2.wavelength @@ -5787,24 +5825,24 @@ divr16u: { lda rem+1 sbc #>sin16s_gen2.wavelength sta rem+1 - // [218] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + // [219] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] b3_from_b2: b3_from_b5: - // [218] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy - // [218] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + // [219] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + // [219] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy jmp b3 // divr16u::@3 b3: - // [219] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuz1=_inc_vbuz1 + // [220] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuz1=_inc_vbuz1 inc i - // [220] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuz1_neq_vbuc1_then_la1 + // [221] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp i bne b1_from_b3 jmp b6 // divr16u::@6 b6: - // [221] (word) rem16u#1 ← (word) divr16u::rem#11 -- vwuz1=vwuz2 + // [222] (word) rem16u#1 ← (word) divr16u::rem#11 -- vwuz1=vwuz2 lda rem sta rem16u lda rem+1 @@ -5812,7 +5850,7 @@ divr16u: { jmp breturn // divr16u::@return breturn: - // [222] return + // [223] return rts } // irq @@ -5822,36 +5860,36 @@ irq: { sta rega+1 stx regx+1 sty regy+1 - // [223] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + // [224] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 lda #WHITE sta BGCOL - // [224] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 + // [225] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp frame_cnt beq b1_from_irq jmp b2 // irq::@2 b2: - // [225] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 + // [226] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 inc frame_cnt - // [226] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] + // [227] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] b1_from_irq: b1_from_b2: - // [226] phi (byte) frame_cnt#10 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy + // [227] phi (byte) frame_cnt#10 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy jmp b1 // irq::@1 b1: - // [227] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 + // [228] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 lda #BLACK sta BGCOL - // [228] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // [229] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS jmp breturn // irq::@return breturn: - // [229] return - exit interrupt(HARDWARE_CLOBBER) + // [230] return - exit interrupt(HARDWARE_CLOBBER) rega: lda #00 regx: @@ -5903,24 +5941,24 @@ Statement [49] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#0 & (word) $fff Statement [50] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$1 [ bitmap_plot::x#0 bitmap_plot::plotter#1 ] ( main:3::bitmap_plot:38 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 bitmap_plot::x#0 bitmap_plot::plotter#1 ] ) always clobbers reg byte a Statement [51] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#0 [ bitmap_plot::plotter#1 bitmap_plot::$2 ] ( main:3::bitmap_plot:38 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 bitmap_plot::plotter#1 bitmap_plot::$2 ] ) always clobbers reg byte a Statement [52] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) [ ] ( main:3::bitmap_plot:38 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 ] ) always clobbers reg byte a reg byte y -Statement [55] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#3 [ mul16s::a#3 mul16s::b#3 mul16u::a#1 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] ) always clobbers reg byte a -Statement [56] (word) mul16u::b#0 ← (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] ) always clobbers reg byte a -Statement [58] (dword) mul16u::return#2 ← (dword) mul16u::res#2 [ mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ) always clobbers reg byte a -Statement [59] (dword) mul16s::m#0 ← (dword) mul16u::return#2 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a -Statement [60] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a -Statement [61] (word~) mul16s::$9 ← > (dword) mul16s::m#0 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ) always clobbers reg byte a -Statement [62] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ) always clobbers reg byte a -Statement [63] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 [ mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ) always clobbers reg byte a -Statement [65] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 [ mul16s::a#3 mul16s::m#5 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::m#5 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::m#5 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 ] ) always clobbers reg byte a -Statement [66] (word~) mul16s::$13 ← > (dword) mul16s::m#5 [ mul16s::a#3 mul16s::m#5 mul16s::$13 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 mul16s::$13 ] ) always clobbers reg byte a -Statement [67] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 [ mul16s::m#5 mul16s::$17 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::m#5 mul16s::$17 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::m#5 mul16s::$17 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#5 mul16s::$17 ] ) always clobbers reg byte a -Statement [68] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 [ mul16s::m#2 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::m#2 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::m#2 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#2 ] ) always clobbers reg byte a -Statement [70] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 [ mul16s::return#0 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::return#0 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::return#0 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#0 ] ) always clobbers reg byte a -Statement [74] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ( main:3::mul16s:20::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::mul16s:30::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::mul16s:136::mul16u:57 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:156::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:161::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:165::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:171::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:176::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ) always clobbers reg byte a +Statement [55] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#3 [ mul16s::a#3 mul16s::b#3 mul16u::a#1 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] ) always clobbers reg byte a +Statement [56] (word) mul16u::b#0 ← (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] ) always clobbers reg byte a +Statement [58] (dword) mul16u::return#2 ← (dword) mul16u::res#2 [ mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ) always clobbers reg byte a +Statement [59] (dword) mul16s::m#0 ← (dword) mul16u::return#2 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a +Statement [60] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a +Statement [61] (word~) mul16s::$9 ← > (dword) mul16s::m#0 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ) always clobbers reg byte a +Statement [62] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ) always clobbers reg byte a +Statement [63] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 [ mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ) always clobbers reg byte a +Statement [65] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 [ mul16s::a#3 mul16s::m#5 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::m#5 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::m#5 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 ] ) always clobbers reg byte a +Statement [66] (word~) mul16s::$13 ← > (dword) mul16s::m#5 [ mul16s::a#3 mul16s::m#5 mul16s::$13 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 mul16s::$13 ] ) always clobbers reg byte a +Statement [67] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 [ mul16s::m#5 mul16s::$17 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::m#5 mul16s::$17 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::m#5 mul16s::$17 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#5 mul16s::$17 ] ) always clobbers reg byte a +Statement [68] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 [ mul16s::m#2 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::m#2 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::m#2 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#2 ] ) always clobbers reg byte a +Statement [70] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 [ mul16s::return#0 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::return#0 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::return#0 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#0 ] ) always clobbers reg byte a +Statement [74] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ( main:3::mul16s:20::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::mul16s:30::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::mul16s:137::mul16u:57 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:157::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:162::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:166::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:172::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:177::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:48 [ sin16s::isUpper#2 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:59 [ mulu16_sel::select#5 ] -Statement [76] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ( main:3::mul16s:20::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::mul16s:30::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::mul16s:136::mul16u:57 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:156::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:161::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:165::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:171::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:176::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a -Statement [78] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ( main:3::mul16s:20::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::mul16s:30::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::mul16s:136::mul16u:57 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:156::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:161::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:165::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:171::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:176::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ) always clobbers reg byte a +Statement [76] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ( main:3::mul16s:20::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::mul16s:30::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::mul16s:137::mul16u:57 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:157::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:162::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:166::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:172::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:177::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a +Statement [78] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ( main:3::mul16s:20::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::mul16s:30::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::mul16s:137::mul16u:57 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:157::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:162::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:166::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:172::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:177::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ) always clobbers reg byte a Statement [83] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [84] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [85] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a @@ -5928,80 +5966,81 @@ Statement [86] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) Statement [87] *((const byte*) RASTER#0) ← (byte) 0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [88] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [89] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [98] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:3::bitmap_clear:10::memset:93 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] main:3::bitmap_clear:10::memset:95 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [98] if((word) memset::num#2<=(byte) 0) goto memset::@return [ memset::num#2 memset::str#3 memset::c#3 ] ( main:3::bitmap_clear:10::memset:93 [ frame_cnt#0 memset::num#2 memset::str#3 memset::c#3 ] main:3::bitmap_clear:10::memset:95 [ frame_cnt#0 memset::num#2 memset::str#3 memset::c#3 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:32 [ memset::c#3 ] -Statement [99] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::bitmap_clear:10::memset:93 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] main:3::bitmap_clear:10::memset:95 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a -Statement [101] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::bitmap_clear:10::memset:93 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] main:3::bitmap_clear:10::memset:95 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [99] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 [ memset::str#3 memset::c#3 memset::end#0 ] ( main:3::bitmap_clear:10::memset:93 [ frame_cnt#0 memset::str#3 memset::c#3 memset::end#0 ] main:3::bitmap_clear:10::memset:95 [ frame_cnt#0 memset::str#3 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [100] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::bitmap_clear:10::memset:93 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] main:3::bitmap_clear:10::memset:95 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [102] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::bitmap_clear:10::memset:93 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] main:3::bitmap_clear:10::memset:95 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:32 [ memset::c#3 ] -Statement [103] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::bitmap_clear:10::memset:93 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] main:3::bitmap_clear:10::memset:95 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a -Statement [122] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:8 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a +Statement [104] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::bitmap_clear:10::memset:93 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] main:3::bitmap_clear:10::memset:95 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [123] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:8 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:37 [ bitmap_init::y#2 bitmap_init::y#1 ] -Statement [129] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ div32u16u::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 div32u16u::return#2 ] ) always clobbers reg byte a -Statement [130] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 [ sin16s_gen2::step#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 ] ) always clobbers reg byte a -Statement [132] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a -Statement [134] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ) always clobbers reg byte a -Statement [135] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 [ mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a -Statement [137] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ) always clobbers reg byte a -Statement [138] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ) always clobbers reg byte a -Statement [139] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$8 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$8 ] ) always clobbers reg byte a -Statement [140] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a reg byte y -Statement [141] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a -Statement [142] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a -Statement [144] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 [ sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ) always clobbers reg byte a -Statement [146] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 [ sin16s::x#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a -Statement [147] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 [ sin16s::x#1 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#1 ] ) always clobbers reg byte a -Statement [149] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 [ sin16s::x#4 sin16s::isUpper#2 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#4 sin16s::isUpper#2 ] ) always clobbers reg byte a -Statement [150] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 [ sin16s::isUpper#2 sin16s::x#2 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x#2 ] ) always clobbers reg byte a -Statement [152] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 [ sin16s::isUpper#2 sin16s::$4 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::$4 ] ) always clobbers reg byte a reg byte y +Statement [130] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ div32u16u::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 div32u16u::return#2 ] ) always clobbers reg byte a +Statement [131] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 [ sin16s_gen2::step#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 ] ) always clobbers reg byte a +Statement [133] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a +Statement [135] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ) always clobbers reg byte a +Statement [136] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 [ mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a +Statement [138] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ) always clobbers reg byte a +Statement [139] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ) always clobbers reg byte a +Statement [140] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$8 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$8 ] ) always clobbers reg byte a +Statement [141] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a reg byte y +Statement [142] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a +Statement [143] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a +Statement [145] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 [ sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ) always clobbers reg byte a +Statement [147] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 [ sin16s::x#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a +Statement [148] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 [ sin16s::x#1 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#1 ] ) always clobbers reg byte a +Statement [150] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 [ sin16s::x#4 sin16s::isUpper#2 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#4 sin16s::isUpper#2 ] ) always clobbers reg byte a +Statement [151] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 [ sin16s::isUpper#2 sin16s::x#2 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x#2 ] ) always clobbers reg byte a +Statement [153] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 [ sin16s::isUpper#2 sin16s::$4 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::$4 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:48 [ sin16s::isUpper#2 ] -Statement [153] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 [ sin16s::isUpper#2 sin16s::x1#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 ] ) always clobbers reg byte a -Statement [154] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ) always clobbers reg byte a -Statement [155] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ) always clobbers reg byte a -Statement [157] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ) always clobbers reg byte a -Statement [158] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ) always clobbers reg byte a -Statement [159] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ) always clobbers reg byte a -Statement [160] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ) always clobbers reg byte a -Statement [162] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ) always clobbers reg byte a -Statement [163] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ) always clobbers reg byte a -Statement [164] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ) always clobbers reg byte a -Statement [166] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ) always clobbers reg byte a -Statement [167] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ) always clobbers reg byte a -Statement [168] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ) always clobbers reg byte a -Statement [169] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ) always clobbers reg byte a -Statement [170] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ) always clobbers reg byte a -Statement [172] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ) always clobbers reg byte a -Statement [173] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ) always clobbers reg byte a -Statement [174] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ) always clobbers reg byte a -Statement [175] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a -Statement [177] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a -Statement [178] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a -Statement [179] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a -Statement [180] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a -Statement [182] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a -Statement [185] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#5 ] ) always clobbers reg byte a -Statement [187] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 [ mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:156 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:161 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:176 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ) always clobbers reg byte a -Statement [188] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 [ mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:156 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:161 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:176 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ) always clobbers reg byte a -Statement [190] (dword) mul16u::return#3 ← (dword) mul16u::res#2 [ mulu16_sel::select#5 mul16u::return#3 ] ( main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:156 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:161 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:176 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] ) always clobbers reg byte a -Statement [191] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 [ mulu16_sel::select#5 mulu16_sel::$0 ] ( main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:156 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:161 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:176 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] ) always clobbers reg byte a -Statement [192] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 [ mulu16_sel::$1 ] ( main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:156 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:161 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:176 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::$1 ] ) always clobbers reg byte a -Statement [193] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 [ mulu16_sel::return#12 ] ( main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:156 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:161 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:176 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#12 ] ) always clobbers reg byte a -Statement [197] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:128 [ frame_cnt#0 divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a -Statement [198] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::quotient_hi#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:128 [ frame_cnt#0 div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a -Statement [199] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ( main:3::sin16s_gen2:6::div32u16u:128 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::rem#4 ] ) always clobbers reg byte a -Statement [201] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:3::sin16s_gen2:6::div32u16u:128 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a -Statement [202] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:3::sin16s_gen2:6::div32u16u:128 [ frame_cnt#0 div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a -Statement [203] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:3::sin16s_gen2:6::div32u16u:128 [ frame_cnt#0 div32u16u::return#0 ] ) always clobbers reg byte a -Statement [208] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:3::sin16s_gen2:6::div32u16u:128::divr16u:196 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:3::sin16s_gen2:6::div32u16u:128::divr16u:200 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a +Statement [154] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 [ sin16s::isUpper#2 sin16s::x1#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 ] ) always clobbers reg byte a +Statement [155] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ) always clobbers reg byte a +Statement [156] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ) always clobbers reg byte a +Statement [158] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ) always clobbers reg byte a +Statement [159] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ) always clobbers reg byte a +Statement [160] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ) always clobbers reg byte a +Statement [161] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ) always clobbers reg byte a +Statement [163] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ) always clobbers reg byte a +Statement [164] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ) always clobbers reg byte a +Statement [165] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ) always clobbers reg byte a +Statement [167] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ) always clobbers reg byte a +Statement [168] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ) always clobbers reg byte a +Statement [169] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ) always clobbers reg byte a +Statement [170] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ) always clobbers reg byte a +Statement [171] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ) always clobbers reg byte a +Statement [173] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ) always clobbers reg byte a +Statement [174] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ) always clobbers reg byte a +Statement [175] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ) always clobbers reg byte a +Statement [176] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a +Statement [178] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a +Statement [179] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a +Statement [180] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a +Statement [181] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a +Statement [183] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a +Statement [186] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#5 ] ) always clobbers reg byte a +Statement [188] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 [ mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:157 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:162 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:172 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:177 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ) always clobbers reg byte a +Statement [189] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 [ mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:157 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:162 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:172 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:177 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ) always clobbers reg byte a +Statement [191] (dword) mul16u::return#3 ← (dword) mul16u::res#2 [ mulu16_sel::select#5 mul16u::return#3 ] ( main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:157 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:162 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:172 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:177 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] ) always clobbers reg byte a +Statement [192] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 [ mulu16_sel::select#5 mulu16_sel::$0 ] ( main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:157 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:162 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:172 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:177 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] ) always clobbers reg byte a +Statement [193] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 [ mulu16_sel::$1 ] ( main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:157 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:162 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:172 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:177 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::$1 ] ) always clobbers reg byte a +Statement [194] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 [ mulu16_sel::return#12 ] ( main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:157 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:162 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:172 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:177 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#12 ] ) always clobbers reg byte a +Statement [198] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:129 [ frame_cnt#0 divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a +Statement [199] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::quotient_hi#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:129 [ frame_cnt#0 div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a +Statement [200] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ( main:3::sin16s_gen2:6::div32u16u:129 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::rem#4 ] ) always clobbers reg byte a +Statement [202] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:3::sin16s_gen2:6::div32u16u:129 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a +Statement [203] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:3::sin16s_gen2:6::div32u16u:129 [ frame_cnt#0 div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a +Statement [204] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:3::sin16s_gen2:6::div32u16u:129 [ frame_cnt#0 div32u16u::return#0 ] ) always clobbers reg byte a +Statement [209] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:3::sin16s_gen2:6::div32u16u:129::divr16u:197 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:3::sin16s_gen2:6::div32u16u:129::divr16u:201 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:66 [ divr16u::i#2 divr16u::i#1 ] -Statement [211] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:3::sin16s_gen2:6::div32u16u:128::divr16u:196 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:3::sin16s_gen2:6::div32u16u:128::divr16u:200 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a -Statement [215] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:6::div32u16u:128::divr16u:196 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:3::sin16s_gen2:6::div32u16u:128::divr16u:200 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a -Statement [217] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:6::div32u16u:128::divr16u:196 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:3::sin16s_gen2:6::div32u16u:128::divr16u:200 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a -Statement [221] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:128::divr16u:196 [ frame_cnt#0 divr16u::return#0 rem16u#1 ] main:3::sin16s_gen2:6::div32u16u:128::divr16u:200 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a -Statement [223] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [224] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [227] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [228] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [229] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +Statement [212] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:3::sin16s_gen2:6::div32u16u:129::divr16u:197 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:3::sin16s_gen2:6::div32u16u:129::divr16u:201 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a +Statement [216] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:6::div32u16u:129::divr16u:197 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:3::sin16s_gen2:6::div32u16u:129::divr16u:201 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a +Statement [218] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:6::div32u16u:129::divr16u:197 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:3::sin16s_gen2:6::div32u16u:129::divr16u:201 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a +Statement [222] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:129::divr16u:197 [ frame_cnt#0 divr16u::return#0 rem16u#1 ] main:3::sin16s_gen2:6::div32u16u:129::divr16u:201 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a +Statement [224] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [225] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [228] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [229] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [230] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y Statement [1] (byte) frame_cnt#0 ← (byte) 1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a Statement [11] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [13] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a @@ -6031,22 +6070,22 @@ Statement [49] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#0 & (word) $fff Statement [50] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$1 [ bitmap_plot::x#0 bitmap_plot::plotter#1 ] ( main:3::bitmap_plot:38 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 bitmap_plot::x#0 bitmap_plot::plotter#1 ] ) always clobbers reg byte a Statement [51] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#0 [ bitmap_plot::plotter#1 bitmap_plot::$2 ] ( main:3::bitmap_plot:38 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 bitmap_plot::plotter#1 bitmap_plot::$2 ] ) always clobbers reg byte a Statement [52] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) [ ] ( main:3::bitmap_plot:38 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 ] ) always clobbers reg byte a reg byte y -Statement [55] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#3 [ mul16s::a#3 mul16s::b#3 mul16u::a#1 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] ) always clobbers reg byte a -Statement [56] (word) mul16u::b#0 ← (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] ) always clobbers reg byte a -Statement [58] (dword) mul16u::return#2 ← (dword) mul16u::res#2 [ mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ) always clobbers reg byte a -Statement [59] (dword) mul16s::m#0 ← (dword) mul16u::return#2 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a -Statement [60] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a -Statement [61] (word~) mul16s::$9 ← > (dword) mul16s::m#0 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ) always clobbers reg byte a -Statement [62] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ) always clobbers reg byte a -Statement [63] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 [ mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ) always clobbers reg byte a -Statement [65] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 [ mul16s::a#3 mul16s::m#5 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::m#5 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::m#5 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 ] ) always clobbers reg byte a -Statement [66] (word~) mul16s::$13 ← > (dword) mul16s::m#5 [ mul16s::a#3 mul16s::m#5 mul16s::$13 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 mul16s::$13 ] ) always clobbers reg byte a -Statement [67] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 [ mul16s::m#5 mul16s::$17 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::m#5 mul16s::$17 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::m#5 mul16s::$17 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#5 mul16s::$17 ] ) always clobbers reg byte a -Statement [68] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 [ mul16s::m#2 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::m#2 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::m#2 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#2 ] ) always clobbers reg byte a -Statement [70] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 [ mul16s::return#0 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::return#0 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::return#0 ] main:3::sin16s_gen2:6::mul16s:136 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#0 ] ) always clobbers reg byte a -Statement [74] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ( main:3::mul16s:20::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::mul16s:30::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::mul16s:136::mul16u:57 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:156::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:161::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:165::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:171::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:176::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ) always clobbers reg byte a -Statement [76] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ( main:3::mul16s:20::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::mul16s:30::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::mul16s:136::mul16u:57 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:156::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:161::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:165::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:171::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:176::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a -Statement [78] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ( main:3::mul16s:20::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::mul16s:30::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::mul16s:136::mul16u:57 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:156::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:161::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:165::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:171::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:176::mul16u:189 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ) always clobbers reg byte a +Statement [55] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#3 [ mul16s::a#3 mul16s::b#3 mul16u::a#1 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] ) always clobbers reg byte a +Statement [56] (word) mul16u::b#0 ← (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] ) always clobbers reg byte a +Statement [58] (dword) mul16u::return#2 ← (dword) mul16u::res#2 [ mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ) always clobbers reg byte a +Statement [59] (dword) mul16s::m#0 ← (dword) mul16u::return#2 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a +Statement [60] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a +Statement [61] (word~) mul16s::$9 ← > (dword) mul16s::m#0 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ) always clobbers reg byte a +Statement [62] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ) always clobbers reg byte a +Statement [63] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 [ mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ) always clobbers reg byte a +Statement [65] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 [ mul16s::a#3 mul16s::m#5 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::m#5 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::m#5 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 ] ) always clobbers reg byte a +Statement [66] (word~) mul16s::$13 ← > (dword) mul16s::m#5 [ mul16s::a#3 mul16s::m#5 mul16s::$13 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 mul16s::$13 ] ) always clobbers reg byte a +Statement [67] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 [ mul16s::m#5 mul16s::$17 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::m#5 mul16s::$17 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::m#5 mul16s::$17 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#5 mul16s::$17 ] ) always clobbers reg byte a +Statement [68] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 [ mul16s::m#2 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::m#2 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::m#2 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#2 ] ) always clobbers reg byte a +Statement [70] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 [ mul16s::return#0 ] ( main:3::mul16s:20 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::return#0 ] main:3::mul16s:30 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::return#0 ] main:3::sin16s_gen2:6::mul16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#0 ] ) always clobbers reg byte a +Statement [74] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ( main:3::mul16s:20::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::mul16s:30::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::mul16s:137::mul16u:57 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:157::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:162::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:166::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:172::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:177::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ) always clobbers reg byte a +Statement [76] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ( main:3::mul16s:20::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::mul16s:30::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::mul16s:137::mul16u:57 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:157::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:162::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:166::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:172::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:177::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a +Statement [78] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ( main:3::mul16s:20::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::mul16s:30::mul16u:57 [ frame_cnt#0 main::idx_x#3 main::idx_y#3 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::mul16s:137::mul16u:57 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:157::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:162::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:166::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:172::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:177::mul16u:190 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ) always clobbers reg byte a Statement [83] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [84] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [85] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a @@ -6054,76 +6093,77 @@ Statement [86] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) Statement [87] *((const byte*) RASTER#0) ← (byte) 0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [88] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [89] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [98] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:3::bitmap_clear:10::memset:93 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] main:3::bitmap_clear:10::memset:95 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a -Statement [99] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::bitmap_clear:10::memset:93 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] main:3::bitmap_clear:10::memset:95 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a -Statement [101] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::bitmap_clear:10::memset:93 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] main:3::bitmap_clear:10::memset:95 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y -Statement [103] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::bitmap_clear:10::memset:93 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] main:3::bitmap_clear:10::memset:95 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a -Statement [115] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ( main:3::bitmap_init:8 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ) always clobbers reg byte a -Statement [122] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:8 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a -Statement [129] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ div32u16u::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 div32u16u::return#2 ] ) always clobbers reg byte a -Statement [130] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 [ sin16s_gen2::step#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 ] ) always clobbers reg byte a -Statement [132] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a -Statement [134] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ) always clobbers reg byte a -Statement [135] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 [ mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a -Statement [137] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ) always clobbers reg byte a -Statement [138] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ) always clobbers reg byte a -Statement [139] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$8 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$8 ] ) always clobbers reg byte a -Statement [140] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a reg byte y -Statement [141] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a -Statement [142] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a -Statement [144] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 [ sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ) always clobbers reg byte a -Statement [146] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 [ sin16s::x#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a -Statement [147] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 [ sin16s::x#1 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#1 ] ) always clobbers reg byte a -Statement [149] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 [ sin16s::x#4 sin16s::isUpper#2 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#4 sin16s::isUpper#2 ] ) always clobbers reg byte a -Statement [150] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 [ sin16s::isUpper#2 sin16s::x#2 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x#2 ] ) always clobbers reg byte a -Statement [152] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 [ sin16s::isUpper#2 sin16s::$4 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::$4 ] ) always clobbers reg byte a reg byte y -Statement [153] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 [ sin16s::isUpper#2 sin16s::x1#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 ] ) always clobbers reg byte a -Statement [154] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ) always clobbers reg byte a -Statement [155] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ) always clobbers reg byte a -Statement [157] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ) always clobbers reg byte a -Statement [158] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ) always clobbers reg byte a -Statement [159] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ) always clobbers reg byte a -Statement [160] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ) always clobbers reg byte a -Statement [162] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ) always clobbers reg byte a -Statement [163] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ) always clobbers reg byte a -Statement [164] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ) always clobbers reg byte a -Statement [166] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ) always clobbers reg byte a -Statement [167] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ) always clobbers reg byte a -Statement [168] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ) always clobbers reg byte a -Statement [169] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ) always clobbers reg byte a -Statement [170] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ) always clobbers reg byte a -Statement [172] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ) always clobbers reg byte a -Statement [173] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ) always clobbers reg byte a -Statement [174] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ) always clobbers reg byte a -Statement [175] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a -Statement [177] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a -Statement [178] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a -Statement [179] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a -Statement [180] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a -Statement [182] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a -Statement [185] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:3::sin16s_gen2:6::sin16s:133 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#5 ] ) always clobbers reg byte a -Statement [187] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 [ mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:156 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:161 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:176 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ) always clobbers reg byte a -Statement [188] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 [ mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:156 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:161 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:176 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ) always clobbers reg byte a -Statement [190] (dword) mul16u::return#3 ← (dword) mul16u::res#2 [ mulu16_sel::select#5 mul16u::return#3 ] ( main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:156 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:161 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:176 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] ) always clobbers reg byte a -Statement [191] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 [ mulu16_sel::select#5 mulu16_sel::$0 ] ( main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:156 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:161 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:176 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] ) always clobbers reg byte a -Statement [192] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 [ mulu16_sel::$1 ] ( main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:156 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:161 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:176 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::$1 ] ) always clobbers reg byte a -Statement [193] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 [ mulu16_sel::return#12 ] ( main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:156 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:161 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:133::mulu16_sel:176 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#12 ] ) always clobbers reg byte a -Statement [197] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:128 [ frame_cnt#0 divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a -Statement [198] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::quotient_hi#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:128 [ frame_cnt#0 div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a -Statement [199] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ( main:3::sin16s_gen2:6::div32u16u:128 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::rem#4 ] ) always clobbers reg byte a -Statement [201] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:3::sin16s_gen2:6::div32u16u:128 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a -Statement [202] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:3::sin16s_gen2:6::div32u16u:128 [ frame_cnt#0 div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a -Statement [203] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:3::sin16s_gen2:6::div32u16u:128 [ frame_cnt#0 div32u16u::return#0 ] ) always clobbers reg byte a -Statement [208] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:3::sin16s_gen2:6::div32u16u:128::divr16u:196 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:3::sin16s_gen2:6::div32u16u:128::divr16u:200 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a -Statement [211] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:3::sin16s_gen2:6::div32u16u:128::divr16u:196 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:3::sin16s_gen2:6::div32u16u:128::divr16u:200 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a -Statement [215] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:6::div32u16u:128::divr16u:196 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:3::sin16s_gen2:6::div32u16u:128::divr16u:200 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a -Statement [217] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:6::div32u16u:128::divr16u:196 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:3::sin16s_gen2:6::div32u16u:128::divr16u:200 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a -Statement [221] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:128::divr16u:196 [ frame_cnt#0 divr16u::return#0 rem16u#1 ] main:3::sin16s_gen2:6::div32u16u:128::divr16u:200 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a -Statement [223] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [224] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [227] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [228] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [229] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +Statement [98] if((word) memset::num#2<=(byte) 0) goto memset::@return [ memset::num#2 memset::str#3 memset::c#3 ] ( main:3::bitmap_clear:10::memset:93 [ frame_cnt#0 memset::num#2 memset::str#3 memset::c#3 ] main:3::bitmap_clear:10::memset:95 [ frame_cnt#0 memset::num#2 memset::str#3 memset::c#3 ] ) always clobbers reg byte a +Statement [99] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 [ memset::str#3 memset::c#3 memset::end#0 ] ( main:3::bitmap_clear:10::memset:93 [ frame_cnt#0 memset::str#3 memset::c#3 memset::end#0 ] main:3::bitmap_clear:10::memset:95 [ frame_cnt#0 memset::str#3 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [100] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::bitmap_clear:10::memset:93 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] main:3::bitmap_clear:10::memset:95 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [102] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::bitmap_clear:10::memset:93 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] main:3::bitmap_clear:10::memset:95 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [104] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::bitmap_clear:10::memset:93 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] main:3::bitmap_clear:10::memset:95 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [116] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ( main:3::bitmap_init:8 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ) always clobbers reg byte a +Statement [123] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:8 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a +Statement [130] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ div32u16u::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 div32u16u::return#2 ] ) always clobbers reg byte a +Statement [131] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 [ sin16s_gen2::step#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 ] ) always clobbers reg byte a +Statement [133] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a +Statement [135] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ) always clobbers reg byte a +Statement [136] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 [ mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a +Statement [138] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ) always clobbers reg byte a +Statement [139] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ) always clobbers reg byte a +Statement [140] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$8 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$8 ] ) always clobbers reg byte a +Statement [141] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a reg byte y +Statement [142] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a +Statement [143] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a +Statement [145] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 [ sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ) always clobbers reg byte a +Statement [147] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 [ sin16s::x#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a +Statement [148] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 [ sin16s::x#1 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#1 ] ) always clobbers reg byte a +Statement [150] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 [ sin16s::x#4 sin16s::isUpper#2 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#4 sin16s::isUpper#2 ] ) always clobbers reg byte a +Statement [151] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 [ sin16s::isUpper#2 sin16s::x#2 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x#2 ] ) always clobbers reg byte a +Statement [153] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 [ sin16s::isUpper#2 sin16s::$4 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::$4 ] ) always clobbers reg byte a reg byte y +Statement [154] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 [ sin16s::isUpper#2 sin16s::x1#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 ] ) always clobbers reg byte a +Statement [155] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ) always clobbers reg byte a +Statement [156] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ) always clobbers reg byte a +Statement [158] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ) always clobbers reg byte a +Statement [159] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ) always clobbers reg byte a +Statement [160] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ) always clobbers reg byte a +Statement [161] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ) always clobbers reg byte a +Statement [163] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ) always clobbers reg byte a +Statement [164] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ) always clobbers reg byte a +Statement [165] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ) always clobbers reg byte a +Statement [167] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ) always clobbers reg byte a +Statement [168] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ) always clobbers reg byte a +Statement [169] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ) always clobbers reg byte a +Statement [170] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ) always clobbers reg byte a +Statement [171] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ) always clobbers reg byte a +Statement [173] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ) always clobbers reg byte a +Statement [174] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ) always clobbers reg byte a +Statement [175] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ) always clobbers reg byte a +Statement [176] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a +Statement [178] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a +Statement [179] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a +Statement [180] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a +Statement [181] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a +Statement [183] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a +Statement [186] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:3::sin16s_gen2:6::sin16s:134 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#5 ] ) always clobbers reg byte a +Statement [188] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 [ mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:157 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:162 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:172 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:177 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ) always clobbers reg byte a +Statement [189] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 [ mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:157 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:162 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:172 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:177 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ) always clobbers reg byte a +Statement [191] (dword) mul16u::return#3 ← (dword) mul16u::res#2 [ mulu16_sel::select#5 mul16u::return#3 ] ( main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:157 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:162 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:172 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:177 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] ) always clobbers reg byte a +Statement [192] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 [ mulu16_sel::select#5 mulu16_sel::$0 ] ( main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:157 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:162 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:172 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:177 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] ) always clobbers reg byte a +Statement [193] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 [ mulu16_sel::$1 ] ( main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:157 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:162 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:172 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:177 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::$1 ] ) always clobbers reg byte a +Statement [194] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 [ mulu16_sel::return#12 ] ( main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:157 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:162 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:172 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:134::mulu16_sel:177 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#12 ] ) always clobbers reg byte a +Statement [198] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:129 [ frame_cnt#0 divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a +Statement [199] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::quotient_hi#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:129 [ frame_cnt#0 div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a +Statement [200] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ( main:3::sin16s_gen2:6::div32u16u:129 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::rem#4 ] ) always clobbers reg byte a +Statement [202] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:3::sin16s_gen2:6::div32u16u:129 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a +Statement [203] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:3::sin16s_gen2:6::div32u16u:129 [ frame_cnt#0 div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a +Statement [204] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:3::sin16s_gen2:6::div32u16u:129 [ frame_cnt#0 div32u16u::return#0 ] ) always clobbers reg byte a +Statement [209] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:3::sin16s_gen2:6::div32u16u:129::divr16u:197 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:3::sin16s_gen2:6::div32u16u:129::divr16u:201 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a +Statement [212] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:3::sin16s_gen2:6::div32u16u:129::divr16u:197 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:3::sin16s_gen2:6::div32u16u:129::divr16u:201 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a +Statement [216] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:6::div32u16u:129::divr16u:197 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:3::sin16s_gen2:6::div32u16u:129::divr16u:201 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a +Statement [218] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:6::div32u16u:129::divr16u:197 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:3::sin16s_gen2:6::div32u16u:129::divr16u:201 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a +Statement [222] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:129::divr16u:197 [ frame_cnt#0 divr16u::return#0 rem16u#1 ] main:3::sin16s_gen2:6::div32u16u:129::divr16u:201 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a +Statement [224] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [225] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [228] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [229] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [230] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y Potential registers zp ZP_WORD:2 [ main::idx_x#3 main::idx_x#10 main::idx_x#1 ] : zp ZP_WORD:2 , Potential registers zp ZP_WORD:4 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] : zp ZP_WORD:4 , Potential registers zp ZP_WORD:6 [ mul16s::a#3 mul16s::a#0 ] : zp ZP_WORD:6 , @@ -6134,8 +6174,8 @@ Potential registers zp ZP_WORD:16 [ mul16u::b#1 ] : zp ZP_WORD:16 , Potential registers zp ZP_WORD:18 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] : zp ZP_WORD:18 , Potential registers zp ZP_DWORD:20 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] : zp ZP_DWORD:20 , Potential registers zp ZP_DWORD:24 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] : zp ZP_DWORD:24 , -Potential registers zp ZP_WORD:28 [ memset::str#2 ] : zp ZP_WORD:28 , -Potential registers zp ZP_WORD:30 [ memset::num#2 ] : zp ZP_WORD:30 , +Potential registers zp ZP_WORD:28 [ memset::num#2 ] : zp ZP_WORD:28 , +Potential registers zp ZP_WORD:30 [ memset::str#3 ] : zp ZP_WORD:30 , Potential registers zp ZP_BYTE:32 [ memset::c#3 ] : zp ZP_BYTE:32 , reg byte x , Potential registers zp ZP_WORD:33 [ memset::dst#2 memset::dst#3 memset::dst#1 ] : zp ZP_WORD:33 , Potential registers zp ZP_BYTE:35 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] : zp ZP_BYTE:35 , reg byte a , reg byte x , reg byte y , @@ -6234,39 +6274,39 @@ Uplift Scope [sin16s] 27.5: zp ZP_DWORD:49 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 Uplift Scope [mulu16_sel] 24: zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] 21: zp ZP_WORD:57 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] 4: zp ZP_WORD:171 [ mulu16_sel::return#0 ] 4: zp ZP_WORD:175 [ mulu16_sel::return#1 ] 4: zp ZP_WORD:179 [ mulu16_sel::return#2 ] 4: zp ZP_WORD:185 [ mulu16_sel::return#10 ] 4: zp ZP_WORD:189 [ mulu16_sel::return#11 ] 4: zp ZP_DWORD:201 [ mulu16_sel::$0 ] 4: zp ZP_DWORD:205 [ mulu16_sel::$1 ] 1.71: zp ZP_WORD:209 [ mulu16_sel::return#12 ] 0.33: zp ZP_BYTE:59 [ mulu16_sel::select#5 ] Uplift Scope [sin16s_gen2] 22: zp ZP_DWORD:159 [ sin16s_gen2::$5 ] 18.33: zp ZP_WORD:46 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] 11: zp ZP_WORD:163 [ sin16s_gen2::$8 ] 10.33: zp ZP_DWORD:40 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] 8.8: zp ZP_WORD:44 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] 0.87: zp ZP_DWORD:149 [ sin16s_gen2::step#0 ] Uplift Scope [] 44.64: zp ZP_BYTE:67 [ frame_cnt#10 frame_cnt#0 frame_cnt#1 ] 0.8: zp ZP_WORD:225 [ rem16u#1 ] -Uplift Scope [memset] 38: zp ZP_WORD:33 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:139 [ memset::end#0 ] 2: zp ZP_WORD:30 [ memset::num#2 ] 1.57: zp ZP_BYTE:32 [ memset::c#3 ] 0: zp ZP_WORD:28 [ memset::str#2 ] +Uplift Scope [memset] 38: zp ZP_WORD:33 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:139 [ memset::end#0 ] 2: zp ZP_WORD:28 [ memset::num#2 ] 1.38: zp ZP_BYTE:32 [ memset::c#3 ] 0: zp ZP_WORD:30 [ memset::str#3 ] Uplift Scope [bitmap_plot] 7.5: zp ZP_BYTE:112 [ bitmap_plot::y#0 ] 4: zp ZP_WORD:117 [ bitmap_plot::$1 ] 4: zp ZP_BYTE:121 [ bitmap_plot::$2 ] 3.75: zp ZP_WORD:113 [ bitmap_plot::x#0 ] 3: zp ZP_WORD:119 [ bitmap_plot::plotter#1 ] 1: zp ZP_WORD:115 [ bitmap_plot::plotter#0 ] Uplift Scope [div32u16u] 4: zp ZP_DWORD:145 [ div32u16u::return#2 ] 4: zp ZP_WORD:217 [ div32u16u::quotient_lo#0 ] 1.33: zp ZP_DWORD:219 [ div32u16u::return#0 ] 0.8: zp ZP_WORD:213 [ div32u16u::quotient_hi#0 ] Uplift Scope [bitmap_clear] Uplift Scope [init_irq] Uplift Scope [irq] -Uplifting [mul16u] best 27155 combination zp ZP_DWORD:20 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:24 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:18 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] zp ZP_WORD:14 [ mul16u::b#0 ] zp ZP_WORD:16 [ mul16u::b#1 ] zp ZP_DWORD:122 [ mul16u::return#2 ] zp ZP_DWORD:197 [ mul16u::return#3 ] -Uplifting [main] best 26915 combination zp ZP_WORD:4 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] zp ZP_WORD:68 [ main::$24 ] zp ZP_WORD:70 [ main::$26 ] zp ZP_WORD:72 [ main::cos_x#0 ] zp ZP_DWORD:78 [ main::xpos#0 ] zp ZP_DWORD:82 [ main::$9 ] reg byte alu [ main::$10 ] zp ZP_WORD:90 [ main::$25 ] zp ZP_WORD:92 [ main::$27 ] zp ZP_WORD:94 [ main::sin_y#0 ] zp ZP_DWORD:100 [ main::ypos#0 ] zp ZP_DWORD:104 [ main::$14 ] reg byte alu [ main::$15 ] zp ZP_WORD:2 [ main::idx_x#3 main::idx_x#10 main::idx_x#1 ] zp ZP_WORD:110 [ main::y#0 ] zp ZP_WORD:88 [ main::x#0 ] -Uplifting [divr16u] best 26705 combination zp ZP_WORD:60 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:64 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:62 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:211 [ divr16u::return#2 ] zp ZP_WORD:215 [ divr16u::return#3 ] -Uplifting [bitmap_init] best 26195 combination zp ZP_WORD:38 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp ZP_BYTE:143 [ bitmap_init::$5 ] zp ZP_BYTE:144 [ bitmap_init::$6 ] zp ZP_BYTE:141 [ bitmap_init::$7 ] +Uplifting [mul16u] best 27169 combination zp ZP_DWORD:20 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:24 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:18 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] zp ZP_WORD:14 [ mul16u::b#0 ] zp ZP_WORD:16 [ mul16u::b#1 ] zp ZP_DWORD:122 [ mul16u::return#2 ] zp ZP_DWORD:197 [ mul16u::return#3 ] +Uplifting [main] best 26929 combination zp ZP_WORD:4 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] zp ZP_WORD:68 [ main::$24 ] zp ZP_WORD:70 [ main::$26 ] zp ZP_WORD:72 [ main::cos_x#0 ] zp ZP_DWORD:78 [ main::xpos#0 ] zp ZP_DWORD:82 [ main::$9 ] reg byte alu [ main::$10 ] zp ZP_WORD:90 [ main::$25 ] zp ZP_WORD:92 [ main::$27 ] zp ZP_WORD:94 [ main::sin_y#0 ] zp ZP_DWORD:100 [ main::ypos#0 ] zp ZP_DWORD:104 [ main::$14 ] reg byte alu [ main::$15 ] zp ZP_WORD:2 [ main::idx_x#3 main::idx_x#10 main::idx_x#1 ] zp ZP_WORD:110 [ main::y#0 ] zp ZP_WORD:88 [ main::x#0 ] +Uplifting [divr16u] best 26719 combination zp ZP_WORD:60 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:64 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:62 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:211 [ divr16u::return#2 ] zp ZP_WORD:215 [ divr16u::return#3 ] +Uplifting [bitmap_init] best 26209 combination zp ZP_WORD:38 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp ZP_BYTE:143 [ bitmap_init::$5 ] zp ZP_BYTE:144 [ bitmap_init::$6 ] zp ZP_BYTE:141 [ bitmap_init::$7 ] Limited combination testing to 100 combinations of 15360 possible. -Uplifting [mul16s] best 26195 combination zp ZP_WORD:8 [ mul16s::b#3 mul16s::b#2 mul16s::b#1 ] zp ZP_WORD:6 [ mul16s::a#3 mul16s::a#0 ] zp ZP_DWORD:74 [ mul16s::return#3 ] zp ZP_DWORD:96 [ mul16s::return#4 ] zp ZP_DWORD:155 [ mul16s::return#2 ] zp ZP_DWORD:10 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] zp ZP_DWORD:134 [ mul16s::return#0 ] zp ZP_WORD:126 [ mul16s::$9 ] zp ZP_WORD:128 [ mul16s::$16 ] zp ZP_WORD:130 [ mul16s::$13 ] zp ZP_WORD:132 [ mul16s::$17 ] -Uplifting [sin16s] best 26195 combination zp ZP_DWORD:49 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:153 [ sin16s::return#0 ] zp ZP_WORD:53 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:165 [ sin16s::$4 ] zp ZP_WORD:173 [ sin16s::x2#0 ] zp ZP_WORD:181 [ sin16s::x3_6#0 ] zp ZP_WORD:187 [ sin16s::x4#0 ] zp ZP_WORD:191 [ sin16s::x5#0 ] zp ZP_WORD:193 [ sin16s::x5_128#0 ] zp ZP_WORD:177 [ sin16s::x3#0 ] zp ZP_WORD:195 [ sin16s::usinx#1 ] zp ZP_WORD:169 [ sin16s::x1#0 ] zp ZP_WORD:183 [ sin16s::usinx#0 ] zp ZP_BYTE:48 [ sin16s::isUpper#2 ] -Uplifting [mulu16_sel] best 26179 combination zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:57 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:171 [ mulu16_sel::return#0 ] zp ZP_WORD:175 [ mulu16_sel::return#1 ] zp ZP_WORD:179 [ mulu16_sel::return#2 ] zp ZP_WORD:185 [ mulu16_sel::return#10 ] zp ZP_WORD:189 [ mulu16_sel::return#11 ] zp ZP_DWORD:201 [ mulu16_sel::$0 ] zp ZP_DWORD:205 [ mulu16_sel::$1 ] zp ZP_WORD:209 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ] -Uplifting [sin16s_gen2] best 26179 combination zp ZP_DWORD:159 [ sin16s_gen2::$5 ] zp ZP_WORD:46 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] zp ZP_WORD:163 [ sin16s_gen2::$8 ] zp ZP_DWORD:40 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] zp ZP_WORD:44 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] zp ZP_DWORD:149 [ sin16s_gen2::step#0 ] -Uplifting [] best 26179 combination zp ZP_BYTE:67 [ frame_cnt#10 frame_cnt#0 frame_cnt#1 ] zp ZP_WORD:225 [ rem16u#1 ] -Uplifting [memset] best 26163 combination zp ZP_WORD:33 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:139 [ memset::end#0 ] zp ZP_WORD:30 [ memset::num#2 ] reg byte x [ memset::c#3 ] zp ZP_WORD:28 [ memset::str#2 ] -Uplifting [bitmap_plot] best 26146 combination reg byte x [ bitmap_plot::y#0 ] zp ZP_WORD:117 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp ZP_WORD:113 [ bitmap_plot::x#0 ] zp ZP_WORD:119 [ bitmap_plot::plotter#1 ] zp ZP_WORD:115 [ bitmap_plot::plotter#0 ] -Uplifting [div32u16u] best 26146 combination zp ZP_DWORD:145 [ div32u16u::return#2 ] zp ZP_WORD:217 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:219 [ div32u16u::return#0 ] zp ZP_WORD:213 [ div32u16u::quotient_hi#0 ] -Uplifting [bitmap_clear] best 26146 combination -Uplifting [init_irq] best 26146 combination -Uplifting [irq] best 26146 combination +Uplifting [mul16s] best 26209 combination zp ZP_WORD:8 [ mul16s::b#3 mul16s::b#2 mul16s::b#1 ] zp ZP_WORD:6 [ mul16s::a#3 mul16s::a#0 ] zp ZP_DWORD:74 [ mul16s::return#3 ] zp ZP_DWORD:96 [ mul16s::return#4 ] zp ZP_DWORD:155 [ mul16s::return#2 ] zp ZP_DWORD:10 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] zp ZP_DWORD:134 [ mul16s::return#0 ] zp ZP_WORD:126 [ mul16s::$9 ] zp ZP_WORD:128 [ mul16s::$16 ] zp ZP_WORD:130 [ mul16s::$13 ] zp ZP_WORD:132 [ mul16s::$17 ] +Uplifting [sin16s] best 26209 combination zp ZP_DWORD:49 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:153 [ sin16s::return#0 ] zp ZP_WORD:53 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:165 [ sin16s::$4 ] zp ZP_WORD:173 [ sin16s::x2#0 ] zp ZP_WORD:181 [ sin16s::x3_6#0 ] zp ZP_WORD:187 [ sin16s::x4#0 ] zp ZP_WORD:191 [ sin16s::x5#0 ] zp ZP_WORD:193 [ sin16s::x5_128#0 ] zp ZP_WORD:177 [ sin16s::x3#0 ] zp ZP_WORD:195 [ sin16s::usinx#1 ] zp ZP_WORD:169 [ sin16s::x1#0 ] zp ZP_WORD:183 [ sin16s::usinx#0 ] zp ZP_BYTE:48 [ sin16s::isUpper#2 ] +Uplifting [mulu16_sel] best 26193 combination zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:57 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:171 [ mulu16_sel::return#0 ] zp ZP_WORD:175 [ mulu16_sel::return#1 ] zp ZP_WORD:179 [ mulu16_sel::return#2 ] zp ZP_WORD:185 [ mulu16_sel::return#10 ] zp ZP_WORD:189 [ mulu16_sel::return#11 ] zp ZP_DWORD:201 [ mulu16_sel::$0 ] zp ZP_DWORD:205 [ mulu16_sel::$1 ] zp ZP_WORD:209 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ] +Uplifting [sin16s_gen2] best 26193 combination zp ZP_DWORD:159 [ sin16s_gen2::$5 ] zp ZP_WORD:46 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] zp ZP_WORD:163 [ sin16s_gen2::$8 ] zp ZP_DWORD:40 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] zp ZP_WORD:44 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] zp ZP_DWORD:149 [ sin16s_gen2::step#0 ] +Uplifting [] best 26193 combination zp ZP_BYTE:67 [ frame_cnt#10 frame_cnt#0 frame_cnt#1 ] zp ZP_WORD:225 [ rem16u#1 ] +Uplifting [memset] best 26177 combination zp ZP_WORD:33 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:139 [ memset::end#0 ] zp ZP_WORD:28 [ memset::num#2 ] reg byte x [ memset::c#3 ] zp ZP_WORD:30 [ memset::str#3 ] +Uplifting [bitmap_plot] best 26160 combination reg byte x [ bitmap_plot::y#0 ] zp ZP_WORD:117 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp ZP_WORD:113 [ bitmap_plot::x#0 ] zp ZP_WORD:119 [ bitmap_plot::plotter#1 ] zp ZP_WORD:115 [ bitmap_plot::plotter#0 ] +Uplifting [div32u16u] best 26160 combination zp ZP_DWORD:145 [ div32u16u::return#2 ] zp ZP_WORD:217 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:219 [ div32u16u::return#0 ] zp ZP_WORD:213 [ div32u16u::quotient_hi#0 ] +Uplifting [bitmap_clear] best 26160 combination +Uplifting [init_irq] best 26160 combination +Uplifting [irq] best 26160 combination Attempting to uplift remaining variables inzp ZP_BYTE:67 [ frame_cnt#10 frame_cnt#0 frame_cnt#1 ] -Uplifting [] best 26146 combination zp ZP_BYTE:67 [ frame_cnt#10 frame_cnt#0 frame_cnt#1 ] +Uplifting [] best 26160 combination zp ZP_BYTE:67 [ frame_cnt#10 frame_cnt#0 frame_cnt#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:143 [ bitmap_init::$5 ] -Uplifting [bitmap_init] best 26086 combination reg byte a [ bitmap_init::$5 ] +Uplifting [bitmap_init] best 26100 combination reg byte a [ bitmap_init::$5 ] Attempting to uplift remaining variables inzp ZP_BYTE:144 [ bitmap_init::$6 ] -Uplifting [bitmap_init] best 26026 combination reg byte a [ bitmap_init::$6 ] +Uplifting [bitmap_init] best 26040 combination reg byte a [ bitmap_init::$6 ] Attempting to uplift remaining variables inzp ZP_BYTE:141 [ bitmap_init::$7 ] -Uplifting [bitmap_init] best 26026 combination zp ZP_BYTE:141 [ bitmap_init::$7 ] +Uplifting [bitmap_init] best 26040 combination zp ZP_BYTE:141 [ bitmap_init::$7 ] Attempting to uplift remaining variables inzp ZP_BYTE:48 [ sin16s::isUpper#2 ] -Uplifting [sin16s] best 26026 combination zp ZP_BYTE:48 [ sin16s::isUpper#2 ] +Uplifting [sin16s] best 26040 combination zp ZP_BYTE:48 [ sin16s::isUpper#2 ] Coalescing zero page register with common assignment [ zp ZP_WORD:53 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] ] with [ zp ZP_WORD:195 [ sin16s::usinx#1 ] ] - score: 2 Coalescing zero page register with common assignment [ zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] ] with [ zp ZP_WORD:177 [ sin16s::x3#0 ] ] - score: 2 Coalescing zero page register with common assignment [ zp ZP_WORD:60 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] ] with [ zp ZP_WORD:225 [ rem16u#1 ] ] - score: 2 @@ -6278,8 +6318,8 @@ Coalescing zero page register with common assignment [ zp ZP_DWORD:10 [ mul16s:: Coalescing zero page register with common assignment [ zp ZP_DWORD:10 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 ] ] with [ zp ZP_DWORD:134 [ mul16s::return#0 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:16 [ mul16u::b#1 ] ] with [ zp ZP_WORD:57 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_DWORD:20 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] ] with [ zp ZP_DWORD:197 [ mul16u::return#3 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:28 [ memset::str#2 ] ] with [ zp ZP_WORD:33 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:30 [ memset::num#2 ] ] with [ zp ZP_WORD:139 [ memset::end#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:28 [ memset::num#2 ] ] with [ zp ZP_WORD:139 [ memset::end#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:30 [ memset::str#3 ] ] with [ zp ZP_WORD:33 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_DWORD:49 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] ] with [ zp ZP_DWORD:165 [ sin16s::$4 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 ] ] with [ zp ZP_WORD:173 [ sin16s::x2#0 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 ] ] with [ zp ZP_WORD:187 [ sin16s::x4#0 ] ] - score: 1 @@ -6317,8 +6357,8 @@ Coalescing zero page register with common assignment [ zp ZP_DWORD:10 [ mul16s:: Coalescing zero page register with common assignment [ zp ZP_DWORD:10 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#3 main::xpos#0 mul16s::return#4 main::ypos#0 mul16s::return#2 sin16s_gen2::$5 main::$9 main::$14 ] ] with [ zp ZP_DWORD:201 [ mulu16_sel::$0 mulu16_sel::$1 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:171 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 ] ] with [ zp ZP_WORD:193 [ sin16s::x5_128#0 ] ] - score: 1 Allocated (was zp ZP_DWORD:24) zp ZP_DWORD:20 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] -Allocated (was zp ZP_WORD:28) zp ZP_WORD:24 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] -Allocated (was zp ZP_WORD:30) zp ZP_WORD:26 [ memset::num#2 memset::end#0 ] +Allocated (was zp ZP_WORD:28) zp ZP_WORD:24 [ memset::num#2 memset::end#0 ] +Allocated (was zp ZP_WORD:30) zp ZP_WORD:26 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] Allocated (was zp ZP_WORD:38) zp ZP_WORD:28 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] Allocated (was zp ZP_DWORD:40) zp ZP_DWORD:30 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] Allocated (was zp ZP_WORD:44) zp ZP_WORD:34 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] @@ -6343,12 +6383,12 @@ Allocated (was zp ZP_WORD:169) zp ZP_WORD:71 [ sin16s::x1#0 ] Allocated (was zp ZP_WORD:171) zp ZP_WORD:73 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 sin16s::x5_128#0 ] Allocated (was zp ZP_WORD:213) zp ZP_WORD:75 [ div32u16u::quotient_hi#0 ] Interrupt procedure irq clobbers ACNZ -Removing interrupt register storage stx regx+1 in SEG417 entry interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage sty regy+1 in SEG417 entry interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage regx: in SEG428 [229] return - exit interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage ldx #00 in SEG428 [229] return - exit interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage regy: in SEG428 [229] return - exit interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage ldy #00 in SEG428 [229] return - exit interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage stx regx+1 in SEG419 entry interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage sty regy+1 in SEG419 entry interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage regx: in SEG430 [230] return - exit interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage ldx #00 in SEG430 [230] return - exit interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage regy: in SEG430 [230] return - exit interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage ldy #00 in SEG430 [230] return - exit interrupt(HARDWARE_CLOBBER) ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -6442,7 +6482,7 @@ main: { .label _26 = 8 .label _27 = 8 // [6] call sin16s_gen2 - // [127] phi from main to sin16s_gen2 [phi:main->sin16s_gen2] + // [128] phi from main to sin16s_gen2 [phi:main->sin16s_gen2] sin16s_gen2_from_main: jsr sin16s_gen2 // [7] phi from main to main::@6 [phi:main->main::@6] @@ -6451,7 +6491,7 @@ main: { // main::@6 b6: // [8] call bitmap_init - // [105] phi from main::@6 to bitmap_init [phi:main::@6->bitmap_init] + // [106] phi from main::@6 to bitmap_init [phi:main::@6->bitmap_init] bitmap_init_from_b6: jsr bitmap_init // [9] phi from main::@6 to main::@7 [phi:main::@6->main::@7] @@ -6996,16 +7036,16 @@ bitmap_clear: { memset_from_bitmap_clear: // [97] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1 ldx #col - // [97] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 - lda #<$3e8 - sta memset.num - lda #>$3e8 - sta memset.num+1 - // [97] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + // [97] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 + // [97] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#2] -- vwuz1=vwuc1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 jsr memset // [94] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] b1_from_bitmap_clear: @@ -7017,16 +7057,16 @@ bitmap_clear: { memset_from_b1: // [97] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1 ldx #0 - // [97] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 - lda #<$1f40 - sta memset.num - lda #>$1f40 - sta memset.num+1 - // [97] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + // [97] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1 lda #<BITMAP sta memset.str lda #>BITMAP sta memset.str+1 + // [97] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#2] -- vwuz1=vwuc1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 jsr memset jmp breturn // bitmap_clear::@return @@ -7036,13 +7076,21 @@ bitmap_clear: { } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage($18) str, byte register(X) c, word zeropage($1a) num) +// memset(void* zeropage($1a) str, byte register(X) c, word zeropage($18) num) memset: { - .label end = $1a - .label dst = $18 - .label str = $18 - .label num = $1a - // [98] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 + .label end = $18 + .label dst = $1a + .label num = $18 + .label str = $1a + // [98] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 + lda num + beq breturn + lda num+1 + beq breturn + jmp b1 + // memset::@1 + b1: + // [99] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 lda end clc adc str @@ -7050,34 +7098,34 @@ memset: { lda end+1 adc str+1 sta end+1 - // [99] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 - // [100] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - b1_from_memset: - b1_from_b1: - // [100] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - jmp b1 - // memset::@1 - b1: - // [101] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx + // [100] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + // [101] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + b2_from_b1: + b2_from_b2: + // [101] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + jmp b2 + // memset::@2 + b2: + // [102] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx txa ldy #0 sta (dst),y - // [102] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [103] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [103] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [104] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1_from_b1 + bne b2_from_b2 lda dst cmp end - bne b1_from_b1 + bne b2_from_b2 jmp breturn // memset::@return breturn: - // [104] return + // [105] return rts } // bitmap_init @@ -7085,86 +7133,86 @@ memset: { bitmap_init: { .label _7 = $40 .label yoffs = $1c - // [106] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + // [107] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] b1_from_bitmap_init: - // [106] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 + // [107] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 ldx #0 - // [106] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 + // [107] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 lda #$80 jmp b1 - // [106] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + // [107] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] b1_from_b2: - // [106] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - // [106] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + // [107] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + // [107] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy jmp b1 // bitmap_init::@1 b1: - // [107] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa + // [108] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_bit,x - // [108] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 + // [109] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 lsr - // [109] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 + // [110] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 cmp #0 bne b6_from_b1 - // [111] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + // [112] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] b2_from_b1: - // [111] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 + // [112] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 lda #$80 jmp b2 - // [110] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + // [111] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] b6_from_b1: jmp b6 // bitmap_init::@6 b6: - // [111] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + // [112] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] b2_from_b6: - // [111] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + // [112] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy jmp b2 // bitmap_init::@2 b2: - // [112] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx + // [113] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx inx - // [113] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 + // [114] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 cpx #0 bne b1_from_b2 - // [114] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + // [115] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] b3_from_b2: - // [114] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + // [115] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #<BITMAP sta yoffs lda #>BITMAP sta yoffs+1 - // [114] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 + // [115] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 ldx #0 jmp b3 - // [114] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + // [115] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] b3_from_b4: - // [114] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - // [114] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + // [115] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + // [115] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy jmp b3 // bitmap_init::@3 b3: - // [115] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 + // [116] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 lda #7 sax _7 - // [116] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 + // [117] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 lda yoffs - // [117] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa + // [118] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa ora _7 - // [118] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa + // [119] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_ylo,x - // [119] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 + // [120] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 lda yoffs+1 - // [120] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa + // [121] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_yhi,x - // [121] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + // [122] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp _7 bne b4_from_b3 jmp b5 // bitmap_init::@5 b5: - // [122] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + // [123] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda yoffs adc #<$28*8 @@ -7172,22 +7220,22 @@ bitmap_init: { lda yoffs+1 adc #>$28*8 sta yoffs+1 - // [123] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + // [124] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] b4_from_b3: b4_from_b5: - // [123] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + // [124] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy jmp b4 // bitmap_init::@4 b4: - // [124] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx + // [125] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx inx - // [125] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 + // [126] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 cpx #0 bne b3_from_b4 jmp breturn // bitmap_init::@return breturn: - // [126] return + // [127] return rts } // sin16s_gen2 @@ -7206,28 +7254,28 @@ sin16s_gen2: { .label sintab = $22 .label x = $1e .label i = $24 - // [128] call div32u16u - // [195] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] + // [129] call div32u16u + // [196] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] div32u16u_from_sin16s_gen2: jsr div32u16u - // [129] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + // [130] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 jmp b2 // sin16s_gen2::@2 b2: - // [130] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 - // [131] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] + // [131] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 + // [132] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] b1_from_b2: - // [131] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 + // [132] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 lda #<0 sta i lda #>0 sta i+1 - // [131] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) SINUS#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 + // [132] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) SINUS#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 lda #<SINUS sta sintab lda #>SINUS sta sintab+1 - // [131] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 + // [132] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 lda #0 sta x lda #0 @@ -7236,15 +7284,15 @@ sin16s_gen2: { sta x+3 jmp b1 // u[4.28] - // [131] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] + // [132] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] b1_from_b4: - // [131] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy - // [131] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy - // [131] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy + // [132] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy + // [132] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy + // [132] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy jmp b1 // sin16s_gen2::@1 b1: - // [132] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 + // [133] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 lda x sta sin16s.x lda x+1 @@ -7253,14 +7301,14 @@ sin16s_gen2: { sta sin16s.x+2 lda x+3 sta sin16s.x+3 - // [133] call sin16s + // [134] call sin16s jsr sin16s - // [134] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 + // [135] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 jmp b3 // sin16s_gen2::@3 b3: - // [135] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 - // [136] call mul16s + // [136] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 + // [137] call mul16s // [54] phi from sin16s_gen2::@3 to mul16s [phi:sin16s_gen2::@3->mul16s] mul16s_from_b3: // [54] phi (signed word) mul16s::b#3 = (const signed word) sin16s_gen2::ampl#0 [phi:sin16s_gen2::@3->mul16s#0] -- vwsz1=vwsc1 @@ -7270,24 +7318,24 @@ sin16s_gen2: { sta mul16s.b+1 // [54] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#0 [phi:sin16s_gen2::@3->mul16s#1] -- register_copy jsr mul16s - // [137] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 + // [138] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 jmp b4 // sin16s_gen2::@4 b4: - // [138] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 - // [139] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 + // [139] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 + // [140] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 lda _5+2 sta _8 lda _5+3 sta _8+1 - // [140] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 -- _deref_pwsz1=vwsz2 + // [141] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 -- _deref_pwsz1=vwsz2 ldy #0 lda _8 sta (sintab),y iny lda _8+1 sta (sintab),y - // [141] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 + // [142] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 lda #SIZEOF_SIGNED_WORD clc adc sintab @@ -7295,7 +7343,7 @@ sin16s_gen2: { bcc !+ inc sintab+1 !: - // [142] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 + // [143] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 lda x clc adc step @@ -7309,12 +7357,12 @@ sin16s_gen2: { lda x+3 adc step+3 sta x+3 - // [143] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 + // [144] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 inc i bne !+ inc i+1 !: - // [144] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 + // [145] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 lda i+1 cmp #>wavelength bcc b1_from_b4 @@ -7326,7 +7374,7 @@ sin16s_gen2: { jmp breturn // sin16s_gen2::@return breturn: - // [145] return + // [146] return rts } // sin16s @@ -7348,7 +7396,7 @@ sin16s: { .label x5_128 = $49 .label sinx = 6 .label isUpper = $26 - // [146] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 + // [147] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_u4f28>>$10 bcc b1_from_sin16s @@ -7368,7 +7416,7 @@ sin16s: { jmp b4 // sin16s::@4 b4: - // [147] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 -- vduz1=vduz1_minus_vduc1 + // [148] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 -- vduz1=vduz1_minus_vduc1 lda x sec sbc #<PI_u4f28 @@ -7382,23 +7430,23 @@ sin16s: { lda x+3 sbc #>PI_u4f28>>$10 sta x+3 - // [148] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] + // [149] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] b1_from_b4: - // [148] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 + // [149] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 lda #1 sta isUpper - // [148] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy + // [149] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy jmp b1 - // [148] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] + // [149] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] b1_from_sin16s: - // [148] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 + // [149] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 lda #0 sta isUpper - // [148] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy + // [149] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy jmp b1 // sin16s::@1 b1: - // [149] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 + // [150] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_HALF_u4f28>>$10 bcc b2_from_b1 @@ -7418,7 +7466,7 @@ sin16s: { jmp b5 // sin16s::@5 b5: - // [150] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 -- vduz1=vduc1_minus_vduz1 + // [151] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 -- vduz1=vduc1_minus_vduz1 lda #<PI_u4f28 sec sbc x @@ -7432,14 +7480,14 @@ sin16s: { lda #>PI_u4f28>>$10 sbc x+3 sta x+3 - // [151] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] + // [152] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] b2_from_b1: b2_from_b5: - // [151] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy + // [152] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy jmp b2 // sin16s::@2 b2: - // [152] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz1_rol_3 + // [153] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz1_rol_3 ldy #3 !: asl _4 @@ -7448,53 +7496,53 @@ sin16s: { rol _4+3 dey bne !- - // [153] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 + // [154] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 lda _4+2 sta x1 lda _4+3 sta x1+1 - // [154] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [155] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v1 lda x1+1 sta mulu16_sel.v1+1 - // [155] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [156] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [156] call mulu16_sel - // [186] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] + // [157] call mulu16_sel + // [187] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] mulu16_sel_from_b2: - // [186] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuxx=vbuc1 + // [187] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - // [186] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy - // [186] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy + // [187] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy + // [187] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy jsr mulu16_sel - // [157] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 + // [158] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 jmp b7 // sin16s::@7 b7: - // [158] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 + // [159] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 lda mulu16_sel.return sta x2 lda mulu16_sel.return+1 sta x2+1 - // [159] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 - // [160] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [160] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 + // [161] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [161] call mulu16_sel - // [186] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] + // [162] call mulu16_sel + // [187] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] mulu16_sel_from_b7: - // [186] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuxx=vbuc1 + // [187] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuxx=vbuc1 ldx #1 - // [186] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy - // [186] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy + // [187] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy + // [187] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy jsr mulu16_sel - // [162] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + // [163] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return sta mulu16_sel.return_1 lda mulu16_sel.return+1 @@ -7502,26 +7550,26 @@ sin16s: { jmp b8 // sin16s::@8 b8: - // [163] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 - // [164] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 - // [165] call mulu16_sel - // [186] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] + // [164] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 + // [165] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 + // [166] call mulu16_sel + // [187] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] mulu16_sel_from_b8: - // [186] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuxx=vbuc1 + // [187] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuxx=vbuc1 ldx #1 - // [186] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 + // [187] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 lda #<$10000/6 sta mulu16_sel.v2 lda #>$10000/6 sta mulu16_sel.v2+1 - // [186] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy + // [187] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy jsr mulu16_sel - // [166] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 + // [167] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 jmp b9 // sin16s::@9 b9: - // [167] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 - // [168] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 + // [168] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 + // [169] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 lda x1 sec sbc x3_6 @@ -7529,21 +7577,21 @@ sin16s: { lda x1+1 sbc x3_6+1 sta usinx+1 - // [169] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 - // [170] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [170] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 + // [171] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [171] call mulu16_sel - // [186] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] + // [172] call mulu16_sel + // [187] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] mulu16_sel_from_b9: - // [186] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuxx=vbuc1 + // [187] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - // [186] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy - // [186] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy + // [187] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy + // [187] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy jsr mulu16_sel - // [172] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + // [173] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return sta mulu16_sel.return_10 lda mulu16_sel.return+1 @@ -7551,27 +7599,27 @@ sin16s: { jmp b10 // sin16s::@10 b10: - // [173] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 - // [174] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 - // [175] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [174] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 + // [175] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 + // [176] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [176] call mulu16_sel - // [186] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] + // [177] call mulu16_sel + // [187] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] mulu16_sel_from_b10: - // [186] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuxx=vbuc1 + // [187] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - // [186] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy - // [186] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy + // [187] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy + // [187] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy jsr mulu16_sel - // [177] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 + // [178] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 jmp b11 // sin16s::@11 b11: - // [178] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 - // [179] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz1_ror_4 + // [179] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 + // [180] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz1_ror_4 lsr x5_128+1 ror x5_128 lsr x5_128+1 @@ -7580,7 +7628,7 @@ sin16s: { ror x5_128 lsr x5_128+1 ror x5_128 - // [180] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz1_plus_vwuz2 + // [181] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz1_plus_vwuz2 lda usinx clc adc x5_128 @@ -7588,14 +7636,14 @@ sin16s: { lda usinx+1 adc x5_128+1 sta usinx+1 - // [181] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 + // [182] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 lda isUpper cmp #0 beq b12 jmp b6 // sin16s::@6 b6: - // [182] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz1 + // [183] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz1 sec lda #0 sbc sinx @@ -7603,21 +7651,21 @@ sin16s: { lda #0 sbc sinx+1 sta sinx+1 - // [183] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] + // [184] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] b3_from_b12: b3_from_b6: - // [183] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy + // [184] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy jmp b3 // sin16s::@3 b3: jmp breturn // sin16s::@return breturn: - // [184] return + // [185] return rts // sin16s::@12 b12: - // [185] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 + // [186] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 jmp b3_from_b12 } // mulu16_sel @@ -7632,13 +7680,13 @@ mulu16_sel: { .label return = $49 .label return_1 = $2b .label return_10 = $2b - // [187] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 + // [188] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 lda v1 sta mul16u.a lda v1+1 sta mul16u.a+1 - // [188] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 - // [189] call mul16u + // [189] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 + // [190] call mul16u // [72] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u] mul16u_from_mulu16_sel: // [72] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy @@ -7651,12 +7699,12 @@ mulu16_sel: { sta mul16u.mb+2 sta mul16u.mb+3 jsr mul16u - // [190] (dword) mul16u::return#3 ← (dword) mul16u::res#2 + // [191] (dword) mul16u::return#3 ← (dword) mul16u::res#2 jmp b1 // mulu16_sel::@1 b1: - // [191] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 - // [192] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz1_rol_vbuxx + // [192] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 + // [193] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz1_rol_vbuxx cpx #0 beq !e+ !: @@ -7667,7 +7715,7 @@ mulu16_sel: { dex bne !- !e: - // [193] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 + // [194] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 lda _1+2 sta return lda _1+3 @@ -7675,7 +7723,7 @@ mulu16_sel: { jmp breturn // mulu16_sel::@return breturn: - // [194] return + // [195] return rts } // div32u16u @@ -7685,46 +7733,46 @@ div32u16u: { .label quotient_hi = $4b .label quotient_lo = $31 .label return = $41 - // [196] call divr16u - // [205] phi from div32u16u to divr16u [phi:div32u16u->divr16u] + // [197] call divr16u + // [206] phi from div32u16u to divr16u [phi:div32u16u->divr16u] divr16u_from_div32u16u: - // [205] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 + // [206] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 lda #<PI2_u4f28>>$10 sta divr16u.dividend lda #>PI2_u4f28>>$10 sta divr16u.dividend+1 - // [205] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 + // [206] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 lda #<0 sta divr16u.rem lda #>0 sta divr16u.rem+1 jsr divr16u - // [197] (word) divr16u::return#2 ← (word) divr16u::return#0 + // [198] (word) divr16u::return#2 ← (word) divr16u::return#0 jmp b1 // div32u16u::@1 b1: - // [198] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 + // [199] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 lda divr16u.return sta quotient_hi lda divr16u.return+1 sta quotient_hi+1 - // [199] (word) divr16u::rem#4 ← (word) rem16u#1 - // [200] call divr16u - // [205] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] + // [200] (word) divr16u::rem#4 ← (word) rem16u#1 + // [201] call divr16u + // [206] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] divr16u_from_b1: - // [205] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 + // [206] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 lda #<PI2_u4f28&$ffff sta divr16u.dividend lda #>PI2_u4f28&$ffff sta divr16u.dividend+1 - // [205] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy + // [206] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy jsr divr16u - // [201] (word) divr16u::return#3 ← (word) divr16u::return#0 + // [202] (word) divr16u::return#3 ← (word) divr16u::return#0 jmp b2 // div32u16u::@2 b2: - // [202] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 - // [203] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 + // [203] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + // [204] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 lda quotient_hi sta return+2 lda quotient_hi+1 @@ -7736,7 +7784,7 @@ div32u16u: { jmp breturn // div32u16u::@return breturn: - // [204] return + // [205] return rts } // divr16u @@ -7750,58 +7798,58 @@ divr16u: { .label dividend = $2f .label quotient = $31 .label return = $31 - // [206] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + // [207] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] b1_from_divr16u: - // [206] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 + // [207] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 ldx #0 - // [206] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + // [207] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 lda #<0 sta quotient lda #>0 sta quotient+1 - // [206] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy - // [206] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy + // [207] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy + // [207] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy jmp b1 - // [206] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + // [207] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] b1_from_b3: - // [206] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy - // [206] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy - // [206] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy - // [206] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + // [207] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + // [207] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + // [207] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + // [207] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy jmp b1 // divr16u::@1 b1: - // [207] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [208] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl rem rol rem+1 - // [208] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 + // [209] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 lda dividend+1 - // [209] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 + // [210] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 and #$80 - // [210] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 + // [211] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 cmp #0 beq b2_from_b1 jmp b4 // divr16u::@4 b4: - // [211] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 + // [212] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 lda #1 ora rem sta rem - // [212] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + // [213] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] b2_from_b1: b2_from_b4: - // [212] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + // [213] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy jmp b2 // divr16u::@2 b2: - // [213] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [214] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl dividend rol dividend+1 - // [214] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [215] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl quotient rol quotient+1 - // [215] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + // [216] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 lda rem+1 cmp #>sin16s_gen2.wavelength bcc b3_from_b2 @@ -7813,12 +7861,12 @@ divr16u: { jmp b5 // divr16u::@5 b5: - // [216] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 + // [217] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 inc quotient bne !+ inc quotient+1 !: - // [217] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 -- vwuz1=vwuz1_minus_vwuc1 + // [218] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 -- vwuz1=vwuz1_minus_vwuc1 lda rem sec sbc #<sin16s_gen2.wavelength @@ -7826,27 +7874,27 @@ divr16u: { lda rem+1 sbc #>sin16s_gen2.wavelength sta rem+1 - // [218] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + // [219] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] b3_from_b2: b3_from_b5: - // [218] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy - // [218] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + // [219] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + // [219] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy jmp b3 // divr16u::@3 b3: - // [219] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx + // [220] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx inx - // [220] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 + // [221] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$10 bne b1_from_b3 jmp b6 // divr16u::@6 b6: - // [221] (word) rem16u#1 ← (word) divr16u::rem#11 + // [222] (word) rem16u#1 ← (word) divr16u::rem#11 jmp breturn // divr16u::@return breturn: - // [222] return + // [223] return rts } // irq @@ -7854,36 +7902,36 @@ divr16u: { irq: { // entry interrupt(HARDWARE_CLOBBER) sta rega+1 - // [223] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + // [224] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 lda #WHITE sta BGCOL - // [224] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 + // [225] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp frame_cnt beq b1_from_irq jmp b2 // irq::@2 b2: - // [225] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 + // [226] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 inc frame_cnt - // [226] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] + // [227] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] b1_from_irq: b1_from_b2: - // [226] phi (byte) frame_cnt#10 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy + // [227] phi (byte) frame_cnt#10 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy jmp b1 // irq::@1 b1: - // [227] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 + // [228] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 lda #BLACK sta BGCOL - // [228] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // [229] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS jmp breturn // irq::@return breturn: - // [229] return - exit interrupt(HARDWARE_CLOBBER) + // [230] return - exit interrupt(HARDWARE_CLOBBER) rega: lda #00 rti @@ -7930,6 +7978,7 @@ Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp breturn Removing instruction jmp b1 +Removing instruction jmp b2 Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp b6 @@ -7990,8 +8039,8 @@ Replacing label b1 with b2 Replacing label b1_from_b5 with b1 Replacing label b2_from_b1 with b2 Replacing label b3_from_b2 with b3 -Replacing label b1_from_b1 with b1 -Replacing label b1_from_b1 with b1 +Replacing label b2_from_b2 with b2 +Replacing label b2_from_b2 with b2 Replacing label b6_from_b1 with b2 Replacing label b1_from_b2 with b1 Replacing label b4_from_b3 with b4 @@ -8034,8 +8083,8 @@ Removing instruction b3_from_b2: Removing instruction b3_from_b4: Removing instruction b1_from_bitmap_clear: Removing instruction memset_from_b1: -Removing instruction b1_from_memset: -Removing instruction b1_from_b1: +Removing instruction b2_from_b1: +Removing instruction b2_from_b2: Removing instruction b1_from_b2: Removing instruction b6_from_b1: Removing instruction b6: @@ -8091,7 +8140,7 @@ Removing instruction breturn: Removing instruction memset_from_bitmap_clear: Removing instruction b1: Removing instruction breturn: -Removing instruction breturn: +Removing instruction b1: Removing instruction b1_from_bitmap_init: Removing instruction b2_from_b1: Removing instruction b3_from_b2: @@ -8378,20 +8427,21 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (signed dword) main::ypos#0 ypos zp ZP_DWORD:10 22.0 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (label) memset::@1 +(label) memset::@2 (label) memset::@return (byte) memset::c -(byte) memset::c#3 reg byte x 1.5714285714285714 +(byte) memset::c#3 reg byte x 1.375 (byte*) memset::dst -(byte*) memset::dst#1 dst zp ZP_WORD:24 16.5 -(byte*) memset::dst#2 dst zp ZP_WORD:24 17.5 -(byte*~) memset::dst#3 dst zp ZP_WORD:24 4.0 +(byte*) memset::dst#1 dst zp ZP_WORD:26 16.5 +(byte*) memset::dst#2 dst zp ZP_WORD:26 17.5 +(byte*~) memset::dst#3 dst zp ZP_WORD:26 4.0 (byte*) memset::end -(byte*) memset::end#0 end zp ZP_WORD:26 2.1666666666666665 +(byte*) memset::end#0 end zp ZP_WORD:24 2.1666666666666665 (word) memset::num -(word) memset::num#2 num zp ZP_WORD:26 2.0 +(word) memset::num#2 num zp ZP_WORD:24 2.0 (void*) memset::return (void*) memset::str -(void*) memset::str#2 str zp ZP_WORD:24 +(void*) memset::str#3 str zp ZP_WORD:26 (signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) (word~) mul16s::$13 $13 zp ZP_WORD:62 4.0 (word~) mul16s::$16 $16 zp ZP_WORD:60 4.0 @@ -8563,8 +8613,8 @@ zp ZP_WORD:14 [ mul16u::b#0 ] zp ZP_WORD:16 [ mul16u::b#1 mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:18 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] zp ZP_DWORD:20 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] -zp ZP_WORD:24 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] -zp ZP_WORD:26 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:24 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:26 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] reg byte x [ memset::c#3 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] @@ -8607,7 +8657,7 @@ reg byte a [ divr16u::$2 ] FINAL ASSEMBLER -Score: 20240 +Score: 20251 // File Comments // Tests the simple bitmap plotter - and counts plots per frame in an IRQ @@ -8694,13 +8744,13 @@ main: { .label _27 = 8 // sin16s_gen2(SINUS, 512, -0x1001, 0x1001) // [6] call sin16s_gen2 - // [127] phi from main to sin16s_gen2 [phi:main->sin16s_gen2] + // [128] phi from main to sin16s_gen2 [phi:main->sin16s_gen2] jsr sin16s_gen2 // [7] phi from main to main::@6 [phi:main->main::@6] // main::@6 // bitmap_init(BITMAP, SCREEN) // [8] call bitmap_init - // [105] phi from main::@6 to bitmap_init [phi:main::@6->bitmap_init] + // [106] phi from main::@6 to bitmap_init [phi:main::@6->bitmap_init] jsr bitmap_init // [9] phi from main::@6 to main::@7 [phi:main::@6->main::@7] // main::@7 @@ -9228,16 +9278,16 @@ bitmap_clear: { // [97] phi from bitmap_clear to memset [phi:bitmap_clear->memset] // [97] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1 ldx #col - // [97] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 - lda #<$3e8 - sta memset.num - lda #>$3e8 - sta memset.num+1 - // [97] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + // [97] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 + // [97] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#2] -- vwuz1=vwuc1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 jsr memset // [94] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] // bitmap_clear::@1 @@ -9246,16 +9296,16 @@ bitmap_clear: { // [97] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset] // [97] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1 ldx #0 - // [97] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 - lda #<$1f40 - sta memset.num - lda #>$1f40 - sta memset.num+1 - // [97] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + // [97] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1 lda #<BITMAP sta memset.str lda #>BITMAP sta memset.str+1 + // [97] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#2] -- vwuz1=vwuc1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 jsr memset // bitmap_clear::@return // } @@ -9264,14 +9314,21 @@ bitmap_clear: { } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage($18) str, byte register(X) c, word zeropage($1a) num) +// memset(void* zeropage($1a) str, byte register(X) c, word zeropage($18) num) memset: { - .label end = $1a - .label dst = $18 - .label str = $18 - .label num = $1a + .label end = $18 + .label dst = $1a + .label num = $18 + .label str = $1a + // if(num>0) + // [98] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 + lda num + beq breturn + lda num+1 + beq breturn + // memset::@1 // end = (char*)str + num - // [98] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 + // [99] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 lda end clc adc str @@ -9279,32 +9336,33 @@ memset: { lda end+1 adc str+1 sta end+1 - // [99] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 - // [100] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - // [100] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - // memset::@1 - b1: + // [100] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + // [101] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + // [101] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + // memset::@2 + b2: // *dst = c - // [101] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx + // [102] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx txa ldy #0 sta (dst),y // for(char* dst = str; dst!=end; dst++) - // [102] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [103] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [103] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [104] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1 + bne b2 lda dst cmp end - bne b1 + bne b2 // memset::@return + breturn: // } - // [104] return + // [105] return rts } // bitmap_init @@ -9312,81 +9370,81 @@ memset: { bitmap_init: { .label _7 = $40 .label yoffs = $1c - // [106] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] - // [106] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 + // [107] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + // [107] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 ldx #0 - // [106] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 + // [107] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 lda #$80 - // [106] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] - // [106] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - // [106] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + // [107] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + // [107] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + // [107] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy // bitmap_init::@1 b1: // bitmap_plot_bit[x] = bits - // [107] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa + // [108] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_bit,x // bits >>= 1 - // [108] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 + // [109] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 lsr // if(bits==0) - // [109] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 + // [110] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 cmp #0 bne b2 - // [111] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] - // [111] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 + // [112] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + // [112] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 lda #$80 - // [110] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + // [111] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] // bitmap_init::@6 - // [111] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] - // [111] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + // [112] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + // [112] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy // bitmap_init::@2 b2: // for(byte x : 0..255) - // [112] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx + // [113] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx inx - // [113] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 + // [114] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 cpx #0 bne b1 - // [114] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] - // [114] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + // [115] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + // [115] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #<BITMAP sta yoffs lda #>BITMAP sta yoffs+1 - // [114] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 + // [115] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 ldx #0 - // [114] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] - // [114] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - // [114] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + // [115] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + // [115] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + // [115] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy // bitmap_init::@3 b3: // y&$7 - // [115] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 + // [116] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 lda #7 sax _7 // <yoffs - // [116] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 + // [117] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 lda yoffs // y&$7 | <yoffs - // [117] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa + // [118] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa ora _7 // bitmap_plot_ylo[y] = y&$7 | <yoffs - // [118] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa + // [119] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_ylo,x // >yoffs - // [119] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 + // [120] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 lda yoffs+1 // bitmap_plot_yhi[y] = >yoffs - // [120] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa + // [121] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_yhi,x // if((y&$7)==7) - // [121] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + // [122] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp _7 bne b4 // bitmap_init::@5 // yoffs = yoffs + 40*8 - // [122] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + // [123] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda yoffs adc #<$28*8 @@ -9394,19 +9452,19 @@ bitmap_init: { lda yoffs+1 adc #>$28*8 sta yoffs+1 - // [123] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] - // [123] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + // [124] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + // [124] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy // bitmap_init::@4 b4: // for(byte y : 0..255) - // [124] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx + // [125] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx inx - // [125] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 + // [126] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 cpx #0 bne b3 // bitmap_init::@return // } - // [126] return + // [127] return rts } // sin16s_gen2 @@ -9426,39 +9484,39 @@ sin16s_gen2: { .label x = $1e .label i = $24 // div32u16u(PI2_u4f28, wavelength) - // [128] call div32u16u - // [195] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] + // [129] call div32u16u + // [196] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] jsr div32u16u // div32u16u(PI2_u4f28, wavelength) - // [129] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + // [130] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 // sin16s_gen2::@2 // step = div32u16u(PI2_u4f28, wavelength) - // [130] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 - // [131] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] - // [131] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 + // [131] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 + // [132] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] + // [132] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 lda #<0 sta i sta i+1 - // [131] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) SINUS#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 + // [132] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) SINUS#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 lda #<SINUS sta sintab lda #>SINUS sta sintab+1 - // [131] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 + // [132] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 lda #0 sta x sta x+1 sta x+2 sta x+3 // u[4.28] - // [131] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] - // [131] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy - // [131] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy - // [131] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy + // [132] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] + // [132] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy + // [132] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy + // [132] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy // sin16s_gen2::@1 b1: // sin16s(x) - // [132] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 + // [133] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 lda x sta sin16s.x lda x+1 @@ -9467,13 +9525,13 @@ sin16s_gen2: { sta sin16s.x+2 lda x+3 sta sin16s.x+3 - // [133] call sin16s + // [134] call sin16s jsr sin16s - // [134] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 + // [135] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 // sin16s_gen2::@3 // mul16s(sin16s(x), ampl) - // [135] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 - // [136] call mul16s + // [136] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 + // [137] call mul16s // [54] phi from sin16s_gen2::@3 to mul16s [phi:sin16s_gen2::@3->mul16s] // [54] phi (signed word) mul16s::b#3 = (const signed word) sin16s_gen2::ampl#0 [phi:sin16s_gen2::@3->mul16s#0] -- vwsz1=vwsc1 lda #<ampl @@ -9483,17 +9541,17 @@ sin16s_gen2: { // [54] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#0 [phi:sin16s_gen2::@3->mul16s#1] -- register_copy jsr mul16s // mul16s(sin16s(x), ampl) - // [137] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 + // [138] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 // sin16s_gen2::@4 - // [138] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 + // [139] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 // >mul16s(sin16s(x), ampl) - // [139] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 + // [140] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 lda _5+2 sta _8 lda _5+3 sta _8+1 // *sintab++ = offs + (signed word)>mul16s(sin16s(x), ampl) - // [140] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 -- _deref_pwsz1=vwsz2 + // [141] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 -- _deref_pwsz1=vwsz2 ldy #0 lda _8 sta (sintab),y @@ -9501,7 +9559,7 @@ sin16s_gen2: { lda _8+1 sta (sintab),y // *sintab++ = offs + (signed word)>mul16s(sin16s(x), ampl); - // [141] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 + // [142] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 lda #SIZEOF_SIGNED_WORD clc adc sintab @@ -9510,7 +9568,7 @@ sin16s_gen2: { inc sintab+1 !: // x = x + step - // [142] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 + // [143] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 lda x clc adc step @@ -9525,12 +9583,12 @@ sin16s_gen2: { adc step+3 sta x+3 // for( word i=0; i<wavelength; i++) - // [143] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 + // [144] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 inc i bne !+ inc i+1 !: - // [144] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 + // [145] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 lda i+1 cmp #>wavelength bcc b1 @@ -9541,7 +9599,7 @@ sin16s_gen2: { !: // sin16s_gen2::@return // } - // [145] return + // [146] return rts } // sin16s @@ -9564,7 +9622,7 @@ sin16s: { .label sinx = 6 .label isUpper = $26 // if(x >= PI_u4f28 ) - // [146] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 + // [147] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_u4f28>>$10 bcc b4 @@ -9583,7 +9641,7 @@ sin16s: { !: // sin16s::@4 // x = x - PI_u4f28 - // [147] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 -- vduz1=vduz1_minus_vduc1 + // [148] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 -- vduz1=vduz1_minus_vduc1 lda x sec sbc #<PI_u4f28 @@ -9597,22 +9655,22 @@ sin16s: { lda x+3 sbc #>PI_u4f28>>$10 sta x+3 - // [148] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] - // [148] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 + // [149] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] + // [149] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 lda #1 sta isUpper - // [148] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy + // [149] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy jmp b1 - // [148] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] + // [149] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] b4: - // [148] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 + // [149] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 lda #0 sta isUpper - // [148] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy + // [149] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy // sin16s::@1 b1: // if(x >= PI_HALF_u4f28 ) - // [149] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 + // [150] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_HALF_u4f28>>$10 bcc b2 @@ -9631,7 +9689,7 @@ sin16s: { !: // sin16s::@5 // x = PI_u4f28 - x - // [150] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 -- vduz1=vduc1_minus_vduz1 + // [151] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 -- vduz1=vduc1_minus_vduz1 lda #<PI_u4f28 sec sbc x @@ -9645,12 +9703,12 @@ sin16s: { lda #>PI_u4f28>>$10 sbc x+3 sta x+3 - // [151] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] - // [151] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy + // [152] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] + // [152] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy // sin16s::@2 b2: // x<<3 - // [152] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz1_rol_3 + // [153] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz1_rol_3 ldy #3 !: asl _4 @@ -9660,81 +9718,81 @@ sin16s: { dey bne !- // x1 = >x<<3 - // [153] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 + // [154] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 lda _4+2 sta x1 lda _4+3 sta x1+1 // mulu16_sel(x1, x1, 0) - // [154] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [155] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v1 lda x1+1 sta mulu16_sel.v1+1 - // [155] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [156] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [156] call mulu16_sel - // [186] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] - // [186] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuxx=vbuc1 + // [157] call mulu16_sel + // [187] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] + // [187] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - // [186] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy - // [186] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy + // [187] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy + // [187] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy jsr mulu16_sel // mulu16_sel(x1, x1, 0) - // [157] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 + // [158] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 // sin16s::@7 // x2 = mulu16_sel(x1, x1, 0) - // [158] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 + // [159] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 lda mulu16_sel.return sta x2 lda mulu16_sel.return+1 sta x2+1 // mulu16_sel(x2, x1, 1) - // [159] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 - // [160] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [160] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 + // [161] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [161] call mulu16_sel - // [186] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] - // [186] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuxx=vbuc1 + // [162] call mulu16_sel + // [187] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] + // [187] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuxx=vbuc1 ldx #1 - // [186] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy - // [186] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy + // [187] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy + // [187] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy jsr mulu16_sel // mulu16_sel(x2, x1, 1) - // [162] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + // [163] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return sta mulu16_sel.return_1 lda mulu16_sel.return+1 sta mulu16_sel.return_1+1 // sin16s::@8 // x3 = mulu16_sel(x2, x1, 1) - // [163] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 + // [164] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 // mulu16_sel(x3, $10000/6, 1) - // [164] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 - // [165] call mulu16_sel - // [186] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] - // [186] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuxx=vbuc1 + // [165] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 + // [166] call mulu16_sel + // [187] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] + // [187] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuxx=vbuc1 ldx #1 - // [186] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 + // [187] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 lda #<$10000/6 sta mulu16_sel.v2 lda #>$10000/6 sta mulu16_sel.v2+1 - // [186] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy + // [187] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy jsr mulu16_sel // mulu16_sel(x3, $10000/6, 1) - // [166] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 + // [167] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 // sin16s::@9 // x3_6 = mulu16_sel(x3, $10000/6, 1) - // [167] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 + // [168] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 // usinx = x1 - x3_6 - // [168] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 + // [169] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 lda x1 sec sbc x3_6 @@ -9743,49 +9801,49 @@ sin16s: { sbc x3_6+1 sta usinx+1 // mulu16_sel(x3, x1, 0) - // [169] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 - // [170] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [170] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 + // [171] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [171] call mulu16_sel - // [186] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] - // [186] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuxx=vbuc1 + // [172] call mulu16_sel + // [187] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] + // [187] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - // [186] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy - // [186] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy + // [187] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy + // [187] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy jsr mulu16_sel // mulu16_sel(x3, x1, 0) - // [172] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + // [173] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return sta mulu16_sel.return_10 lda mulu16_sel.return+1 sta mulu16_sel.return_10+1 // sin16s::@10 // x4 = mulu16_sel(x3, x1, 0) - // [173] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 + // [174] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 // mulu16_sel(x4, x1, 0) - // [174] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 - // [175] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [175] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 + // [176] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [176] call mulu16_sel - // [186] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] - // [186] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuxx=vbuc1 + // [177] call mulu16_sel + // [187] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] + // [187] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - // [186] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy - // [186] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy + // [187] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy + // [187] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy jsr mulu16_sel // mulu16_sel(x4, x1, 0) - // [177] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 + // [178] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 // sin16s::@11 // x5 = mulu16_sel(x4, x1, 0) - // [178] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 + // [179] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 // x5_128 = x5>>4 - // [179] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz1_ror_4 + // [180] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz1_ror_4 lsr x5_128+1 ror x5_128 lsr x5_128+1 @@ -9795,7 +9853,7 @@ sin16s: { lsr x5_128+1 ror x5_128 // usinx = usinx + x5_128 - // [180] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz1_plus_vwuz2 + // [181] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz1_plus_vwuz2 lda usinx clc adc x5_128 @@ -9804,13 +9862,13 @@ sin16s: { adc x5_128+1 sta usinx+1 // if(isUpper!=0) - // [181] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 + // [182] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 lda isUpper cmp #0 beq b3 // sin16s::@6 // sinx = -(signed word)usinx - // [182] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz1 + // [183] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz1 sec lda #0 sbc sinx @@ -9818,16 +9876,16 @@ sin16s: { lda #0 sbc sinx+1 sta sinx+1 - // [183] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] - // [183] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy + // [184] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] + // [184] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy // sin16s::@3 b3: // sin16s::@return // } - // [184] return + // [185] return rts // sin16s::@12 - // [185] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 + // [186] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 } // mulu16_sel // Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result. @@ -9842,13 +9900,13 @@ mulu16_sel: { .label return_1 = $2b .label return_10 = $2b // mul16u(v1, v2) - // [187] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 + // [188] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 lda v1 sta mul16u.a lda v1+1 sta mul16u.a+1 - // [188] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 - // [189] call mul16u + // [189] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 + // [190] call mul16u // [72] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u] // [72] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy // [72] phi (dword) mul16u::mb#0 = (word) mul16u::b#1 [phi:mulu16_sel->mul16u#1] -- vduz1=vwuz2 @@ -9861,11 +9919,11 @@ mulu16_sel: { sta mul16u.mb+3 jsr mul16u // mul16u(v1, v2) - // [190] (dword) mul16u::return#3 ← (dword) mul16u::res#2 + // [191] (dword) mul16u::return#3 ← (dword) mul16u::res#2 // mulu16_sel::@1 - // [191] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 + // [192] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 // mul16u(v1, v2)<<select - // [192] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz1_rol_vbuxx + // [193] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz1_rol_vbuxx cpx #0 beq !e+ !: @@ -9877,14 +9935,14 @@ mulu16_sel: { bne !- !e: // >mul16u(v1, v2)<<select - // [193] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 + // [194] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 lda _1+2 sta return lda _1+3 sta return+1 // mulu16_sel::@return // } - // [194] return + // [195] return rts } // div32u16u @@ -9895,45 +9953,45 @@ div32u16u: { .label quotient_lo = $31 .label return = $41 // divr16u(>dividend, divisor, 0) - // [196] call divr16u - // [205] phi from div32u16u to divr16u [phi:div32u16u->divr16u] - // [205] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 + // [197] call divr16u + // [206] phi from div32u16u to divr16u [phi:div32u16u->divr16u] + // [206] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 lda #<PI2_u4f28>>$10 sta divr16u.dividend lda #>PI2_u4f28>>$10 sta divr16u.dividend+1 - // [205] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 + // [206] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 lda #<0 sta divr16u.rem sta divr16u.rem+1 jsr divr16u // divr16u(>dividend, divisor, 0) - // [197] (word) divr16u::return#2 ← (word) divr16u::return#0 + // [198] (word) divr16u::return#2 ← (word) divr16u::return#0 // div32u16u::@1 // quotient_hi = divr16u(>dividend, divisor, 0) - // [198] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 + // [199] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 lda divr16u.return sta quotient_hi lda divr16u.return+1 sta quotient_hi+1 // divr16u(<dividend, divisor, rem16u) - // [199] (word) divr16u::rem#4 ← (word) rem16u#1 - // [200] call divr16u - // [205] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] - // [205] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 + // [200] (word) divr16u::rem#4 ← (word) rem16u#1 + // [201] call divr16u + // [206] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] + // [206] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 lda #<PI2_u4f28&$ffff sta divr16u.dividend lda #>PI2_u4f28&$ffff sta divr16u.dividend+1 - // [205] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy + // [206] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy jsr divr16u // divr16u(<dividend, divisor, rem16u) - // [201] (word) divr16u::return#3 ← (word) divr16u::return#0 + // [202] (word) divr16u::return#3 ← (word) divr16u::return#0 // div32u16u::@2 // quotient_lo = divr16u(<dividend, divisor, rem16u) - // [202] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + // [203] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 // quotient = { quotient_hi, quotient_lo} - // [203] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 + // [204] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 lda quotient_hi sta return+2 lda quotient_hi+1 @@ -9944,7 +10002,7 @@ div32u16u: { sta return+1 // div32u16u::@return // } - // [204] return + // [205] return rts } // divr16u @@ -9958,56 +10016,56 @@ divr16u: { .label dividend = $2f .label quotient = $31 .label return = $31 - // [206] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] - // [206] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 + // [207] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + // [207] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 ldx #0 - // [206] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + // [207] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 txa sta quotient sta quotient+1 - // [206] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy - // [206] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy - // [206] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] - // [206] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy - // [206] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy - // [206] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy - // [206] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + // [207] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy + // [207] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy + // [207] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + // [207] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + // [207] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + // [207] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + // [207] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy // divr16u::@1 b1: // rem = rem << 1 - // [207] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [208] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl rem rol rem+1 // >dividend - // [208] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 + // [209] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 lda dividend+1 // >dividend & $80 - // [209] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 + // [210] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 and #$80 // if( (>dividend & $80) != 0 ) - // [210] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 + // [211] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 cmp #0 beq b2 // divr16u::@4 // rem = rem | 1 - // [211] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 + // [212] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 lda #1 ora rem sta rem - // [212] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] - // [212] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + // [213] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + // [213] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy // divr16u::@2 b2: // dividend = dividend << 1 - // [213] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [214] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl dividend rol dividend+1 // quotient = quotient << 1 - // [214] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [215] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl quotient rol quotient+1 // if(rem>=divisor) - // [215] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + // [216] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 lda rem+1 cmp #>sin16s_gen2.wavelength bcc b3 @@ -10018,13 +10076,13 @@ divr16u: { !: // divr16u::@5 // quotient++; - // [216] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 + // [217] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 inc quotient bne !+ inc quotient+1 !: // rem = rem - divisor - // [217] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 -- vwuz1=vwuz1_minus_vwuc1 + // [218] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 -- vwuz1=vwuz1_minus_vwuc1 lda rem sec sbc #<sin16s_gen2.wavelength @@ -10032,23 +10090,23 @@ divr16u: { lda rem+1 sbc #>sin16s_gen2.wavelength sta rem+1 - // [218] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] - // [218] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy - // [218] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + // [219] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + // [219] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + // [219] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy // divr16u::@3 b3: // for( byte i : 0..15) - // [219] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx + // [220] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx inx - // [220] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 + // [221] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$10 bne b1 // divr16u::@6 // rem16u = rem - // [221] (word) rem16u#1 ← (word) divr16u::rem#11 + // [222] (word) rem16u#1 ← (word) divr16u::rem#11 // divr16u::@return // } - // [222] return + // [223] return rts } // irq @@ -10057,34 +10115,34 @@ irq: { // entry interrupt(HARDWARE_CLOBBER) sta rega+1 // *BGCOL = WHITE - // [223] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + // [224] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 lda #WHITE sta BGCOL // if(frame_cnt) - // [224] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 + // [225] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp frame_cnt beq b1 // irq::@2 // frame_cnt++; - // [225] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 + // [226] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 inc frame_cnt - // [226] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] - // [226] phi (byte) frame_cnt#10 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy + // [227] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] + // [227] phi (byte) frame_cnt#10 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy // irq::@1 b1: // *BGCOL = BLACK - // [227] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 + // [228] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 lda #BLACK sta BGCOL // *IRQ_STATUS = IRQ_RASTER - // [228] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // [229] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS // irq::@return // } - // [229] return - exit interrupt(HARDWARE_CLOBBER) + // [230] return - exit interrupt(HARDWARE_CLOBBER) rega: lda #00 rti diff --git a/src/test/ref/bitmap-plot-1.sym b/src/test/ref/bitmap-plot-1.sym index e8bfd84bc..4088bab92 100644 --- a/src/test/ref/bitmap-plot-1.sym +++ b/src/test/ref/bitmap-plot-1.sym @@ -226,20 +226,21 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (signed dword) main::ypos#0 ypos zp ZP_DWORD:10 22.0 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (label) memset::@1 +(label) memset::@2 (label) memset::@return (byte) memset::c -(byte) memset::c#3 reg byte x 1.5714285714285714 +(byte) memset::c#3 reg byte x 1.375 (byte*) memset::dst -(byte*) memset::dst#1 dst zp ZP_WORD:24 16.5 -(byte*) memset::dst#2 dst zp ZP_WORD:24 17.5 -(byte*~) memset::dst#3 dst zp ZP_WORD:24 4.0 +(byte*) memset::dst#1 dst zp ZP_WORD:26 16.5 +(byte*) memset::dst#2 dst zp ZP_WORD:26 17.5 +(byte*~) memset::dst#3 dst zp ZP_WORD:26 4.0 (byte*) memset::end -(byte*) memset::end#0 end zp ZP_WORD:26 2.1666666666666665 +(byte*) memset::end#0 end zp ZP_WORD:24 2.1666666666666665 (word) memset::num -(word) memset::num#2 num zp ZP_WORD:26 2.0 +(word) memset::num#2 num zp ZP_WORD:24 2.0 (void*) memset::return (void*) memset::str -(void*) memset::str#2 str zp ZP_WORD:24 +(void*) memset::str#3 str zp ZP_WORD:26 (signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) (word~) mul16s::$13 $13 zp ZP_WORD:62 4.0 (word~) mul16s::$16 $16 zp ZP_WORD:60 4.0 @@ -411,8 +412,8 @@ zp ZP_WORD:14 [ mul16u::b#0 ] zp ZP_WORD:16 [ mul16u::b#1 mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:18 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] zp ZP_DWORD:20 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] -zp ZP_WORD:24 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] -zp ZP_WORD:26 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:24 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:26 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] reg byte x [ memset::c#3 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] diff --git a/src/test/ref/bitmap-plot-2.asm b/src/test/ref/bitmap-plot-2.asm index c5311ba73..6c1f18775 100644 --- a/src/test/ref/bitmap-plot-2.asm +++ b/src/test/ref/bitmap-plot-2.asm @@ -429,34 +429,38 @@ init_irq: { bitmap_clear: { .const col = WHITE*$10 ldx #col - lda #<$3e8 - sta memset.num - lda #>$3e8 - sta memset.num+1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 jsr memset ldx #0 - lda #<$1f40 - sta memset.num - lda #>$1f40 - sta memset.num+1 lda #<BITMAP sta memset.str lda #>BITMAP sta memset.str+1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 jsr memset rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage($19) str, byte register(X) c, word zeropage($1b) num) +// memset(void* zeropage($1b) str, byte register(X) c, word zeropage($19) num) memset: { - .label end = $1b - .label dst = $19 - .label str = $19 - .label num = $1b + .label end = $19 + .label dst = $1b + .label num = $19 + .label str = $1b + lda num + beq breturn + lda num+1 + beq breturn lda end clc adc str @@ -464,7 +468,7 @@ memset: { lda end+1 adc str+1 sta end+1 - b1: + b2: txa ldy #0 sta (dst),y @@ -474,10 +478,11 @@ memset: { !: lda dst+1 cmp end+1 - bne b1 + bne b2 lda dst cmp end - bne b1 + bne b2 + breturn: rts } // Initialize bitmap plotting tables diff --git a/src/test/ref/bitmap-plot-2.cfg b/src/test/ref/bitmap-plot-2.cfg index bf625d057..86da32b80 100644 --- a/src/test/ref/bitmap-plot-2.cfg +++ b/src/test/ref/bitmap-plot-2.cfg @@ -198,248 +198,251 @@ bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 to:@return memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [106] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) + [106] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) [106] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 ) - [106] (void*) memset::str#2 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) - [107] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 - [108] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + [107] if((word) memset::num#2<=(byte) 0) goto memset::@return to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - [109] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) - [110] *((byte*) memset::dst#2) ← (byte) memset::c#3 - [111] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - [112] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 +memset::@1: scope:[memset] from memset + [108] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 + [109] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + to:memset::@2 +memset::@2: scope:[memset] from memset::@1 memset::@2 + [110] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 ) + [111] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [112] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [113] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 to:memset::@return -memset::@return: scope:[memset] from memset::@1 - [113] return +memset::@return: scope:[memset] from memset memset::@2 + [114] return to:@return bitmap_init: scope:[bitmap_init] from main::@9 - [114] phi() + [115] phi() to:bitmap_init::@1 bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2 - [115] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) - [115] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) - [116] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 - [117] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 - [118] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 + [116] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) + [116] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) + [117] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 + [118] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 + [119] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 to:bitmap_init::@2 bitmap_init::@6: scope:[bitmap_init] from bitmap_init::@1 - [119] phi() + [120] phi() to:bitmap_init::@2 bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6 - [120] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) - [121] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 - [122] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 + [121] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) + [122] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 + [123] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 to:bitmap_init::@3 bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4 - [123] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) - [123] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) - [124] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 - [125] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 - [126] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 - [127] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 - [128] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 - [129] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 - [130] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 + [124] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) + [124] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) + [125] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 + [126] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 + [127] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 + [128] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 + [129] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 + [130] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 + [131] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 to:bitmap_init::@5 bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@3 - [131] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 + [132] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 to:bitmap_init::@4 bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 - [132] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) - [133] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 - [134] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 + [133] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) + [134] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 + [135] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 to:bitmap_init::@return bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 - [135] return + [136] return to:@return sin16s_gen2: scope:[sin16s_gen2] from main - [136] phi() - [137] call div32u16u - [138] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + [137] phi() + [138] call div32u16u + [139] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 to:sin16s_gen2::@2 sin16s_gen2::@2: scope:[sin16s_gen2] from sin16s_gen2 - [139] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 + [140] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 to:sin16s_gen2::@1 sin16s_gen2::@1: scope:[sin16s_gen2] from sin16s_gen2::@2 sin16s_gen2::@4 - [140] (word) sin16s_gen2::i#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(word) sin16s_gen2::i#1 ) - [140] (signed word*) sin16s_gen2::sintab#2 ← phi( sin16s_gen2::@2/(const signed word[$200]) SINUS#0 sin16s_gen2::@4/(signed word*) sin16s_gen2::sintab#0 ) - [140] (dword) sin16s_gen2::x#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(dword) sin16s_gen2::x#1 ) - [141] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 - [142] call sin16s - [143] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 + [141] (word) sin16s_gen2::i#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(word) sin16s_gen2::i#1 ) + [141] (signed word*) sin16s_gen2::sintab#2 ← phi( sin16s_gen2::@2/(const signed word[$200]) SINUS#0 sin16s_gen2::@4/(signed word*) sin16s_gen2::sintab#0 ) + [141] (dword) sin16s_gen2::x#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(dword) sin16s_gen2::x#1 ) + [142] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 + [143] call sin16s + [144] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 to:sin16s_gen2::@3 sin16s_gen2::@3: scope:[sin16s_gen2] from sin16s_gen2::@1 - [144] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 - [145] call mul16s - [146] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 + [145] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 + [146] call mul16s + [147] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 to:sin16s_gen2::@4 sin16s_gen2::@4: scope:[sin16s_gen2] from sin16s_gen2::@3 - [147] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 - [148] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 - [149] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 - [150] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD - [151] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 - [152] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 - [153] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 + [148] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 + [149] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 + [150] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 + [151] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD + [152] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 + [153] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 + [154] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 to:sin16s_gen2::@return sin16s_gen2::@return: scope:[sin16s_gen2] from sin16s_gen2::@4 - [154] return + [155] return to:@return sin16s: scope:[sin16s] from sin16s_gen2::@1 - [155] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 + [156] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 to:sin16s::@4 sin16s::@4: scope:[sin16s] from sin16s - [156] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 + [157] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 to:sin16s::@1 sin16s::@1: scope:[sin16s] from sin16s sin16s::@4 - [157] (byte) sin16s::isUpper#2 ← phi( sin16s/(byte) 0 sin16s::@4/(byte) 1 ) - [157] (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#0 sin16s::@4/(dword) sin16s::x#1 ) - [158] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 + [158] (byte) sin16s::isUpper#2 ← phi( sin16s/(byte) 0 sin16s::@4/(byte) 1 ) + [158] (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#0 sin16s::@4/(dword) sin16s::x#1 ) + [159] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 to:sin16s::@5 sin16s::@5: scope:[sin16s] from sin16s::@1 - [159] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 + [160] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 to:sin16s::@2 sin16s::@2: scope:[sin16s] from sin16s::@1 sin16s::@5 - [160] (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 ) - [161] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 - [162] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 - [163] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 - [164] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 - [165] call mulu16_sel - [166] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 + [161] (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 ) + [162] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 + [163] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 + [164] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 + [165] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 + [166] call mulu16_sel + [167] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 to:sin16s::@7 sin16s::@7: scope:[sin16s] from sin16s::@2 - [167] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 - [168] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 - [169] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 - [170] call mulu16_sel - [171] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 + [168] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 + [169] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 + [170] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 + [171] call mulu16_sel + [172] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 to:sin16s::@8 sin16s::@8: scope:[sin16s] from sin16s::@7 - [172] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 - [173] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 - [174] call mulu16_sel - [175] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 + [173] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 + [174] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 + [175] call mulu16_sel + [176] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 to:sin16s::@9 sin16s::@9: scope:[sin16s] from sin16s::@8 - [176] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 - [177] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 - [178] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 - [179] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 - [180] call mulu16_sel - [181] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 + [177] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 + [178] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 + [179] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 + [180] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 + [181] call mulu16_sel + [182] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 to:sin16s::@10 sin16s::@10: scope:[sin16s] from sin16s::@9 - [182] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 - [183] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 - [184] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 - [185] call mulu16_sel - [186] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 + [183] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 + [184] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 + [185] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 + [186] call mulu16_sel + [187] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 to:sin16s::@11 sin16s::@11: scope:[sin16s] from sin16s::@10 - [187] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 - [188] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 - [189] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 - [190] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 + [188] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 + [189] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 + [190] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 + [191] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 to:sin16s::@6 sin16s::@6: scope:[sin16s] from sin16s::@11 - [191] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 + [192] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 to:sin16s::@3 sin16s::@3: scope:[sin16s] from sin16s::@12 sin16s::@6 - [192] (signed word) sin16s::return#1 ← phi( sin16s::@12/(signed word~) sin16s::return#5 sin16s::@6/(signed word) sin16s::sinx#1 ) + [193] (signed word) sin16s::return#1 ← phi( sin16s::@12/(signed word~) sin16s::return#5 sin16s::@6/(signed word) sin16s::sinx#1 ) to:sin16s::@return sin16s::@return: scope:[sin16s] from sin16s::@3 - [193] return + [194] return to:@return sin16s::@12: scope:[sin16s] from sin16s::@11 - [194] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 + [195] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 to:sin16s::@3 mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 - [195] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) - [195] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) - [195] (word) mulu16_sel::v1#5 ← phi( sin16s::@9/(word) mulu16_sel::v1#3 sin16s::@10/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@7/(word) mulu16_sel::v1#1 sin16s::@8/(word) mulu16_sel::v1#2 ) - [196] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 - [197] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 - [198] call mul16u - [199] (dword) mul16u::return#3 ← (dword) mul16u::res#2 + [196] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) + [196] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) + [196] (word) mulu16_sel::v1#5 ← phi( sin16s::@9/(word) mulu16_sel::v1#3 sin16s::@10/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@7/(word) mulu16_sel::v1#1 sin16s::@8/(word) mulu16_sel::v1#2 ) + [197] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 + [198] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 + [199] call mul16u + [200] (dword) mul16u::return#3 ← (dword) mul16u::res#2 to:mulu16_sel::@1 mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel - [200] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 - [201] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 - [202] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 + [201] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 + [202] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 + [203] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 to:mulu16_sel::@return mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 - [203] return + [204] return to:@return div32u16u: scope:[div32u16u] from sin16s_gen2 - [204] phi() - [205] call divr16u - [206] (word) divr16u::return#2 ← (word) divr16u::return#0 + [205] phi() + [206] call divr16u + [207] (word) divr16u::return#2 ← (word) divr16u::return#0 to:div32u16u::@1 div32u16u::@1: scope:[div32u16u] from div32u16u - [207] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 - [208] (word) divr16u::rem#4 ← (word) rem16u#1 - [209] call divr16u - [210] (word) divr16u::return#3 ← (word) divr16u::return#0 + [208] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [209] (word) divr16u::rem#4 ← (word) rem16u#1 + [210] call divr16u + [211] (word) divr16u::return#3 ← (word) divr16u::return#0 to:div32u16u::@2 div32u16u::@2: scope:[div32u16u] from div32u16u::@1 - [211] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 - [212] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + [212] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [213] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 to:div32u16u::@return div32u16u::@return: scope:[div32u16u] from div32u16u::@2 - [213] return + [214] return to:@return divr16u: scope:[divr16u] from div32u16u div32u16u::@1 - [214] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) - [214] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) + [215] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) + [215] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) to:divr16u::@1 divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 - [215] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) - [215] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) - [215] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) - [215] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) - [216] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 - [217] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 - [218] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 - [219] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + [216] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) + [216] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) + [216] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [216] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [217] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [218] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [219] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [220] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 to:divr16u::@4 divr16u::@4: scope:[divr16u] from divr16u::@1 - [220] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + [221] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 to:divr16u::@2 divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 - [221] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) - [222] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 - [223] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 - [224] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 + [222] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [223] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [224] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [225] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 to:divr16u::@5 divr16u::@5: scope:[divr16u] from divr16u::@2 - [225] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 - [226] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 + [226] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [227] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 to:divr16u::@3 divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 - [227] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) - [227] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) - [228] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 - [229] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + [228] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [228] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [229] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [230] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 to:divr16u::@6 divr16u::@6: scope:[divr16u] from divr16u::@3 - [230] (word) rem16u#1 ← (word) divr16u::rem#11 + [231] (word) rem16u#1 ← (word) divr16u::rem#11 to:divr16u::@return divr16u::@return: scope:[divr16u] from divr16u::@6 - [231] return + [232] return to:@return irq: scope:[irq] from - [232] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 - [233] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 + [233] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 + [234] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 to:irq::@2 irq::@2: scope:[irq] from irq - [234] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 + [235] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 to:irq::@1 irq::@1: scope:[irq] from irq irq::@2 - [235] (byte) frame_cnt#2 ← phi( irq/(byte) frame_cnt#0 irq::@2/(byte) frame_cnt#1 ) - [236] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 - [237] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + [236] (byte) frame_cnt#2 ← phi( irq/(byte) frame_cnt#0 irq::@2/(byte) frame_cnt#1 ) + [237] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 + [238] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 to:irq::@return irq::@return: scope:[irq] from irq::@1 - [238] return + [239] return to:@return diff --git a/src/test/ref/bitmap-plot-2.log b/src/test/ref/bitmap-plot-2.log index 5203c29f6..b5f1369f9 100644 --- a/src/test/ref/bitmap-plot-2.log +++ b/src/test/ref/bitmap-plot-2.log @@ -47,6 +47,7 @@ Culled Empty Block (label) @23 Culled Empty Block (label) @24 Culled Empty Block (label) @25 Culled Empty Block (label) @26 +Culled Empty Block (label) memset::@5 Culled Empty Block (label) memset::@3 Culled Empty Block (label) @27 Culled Empty Block (label) bitmap_init::@8 @@ -556,30 +557,38 @@ mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@2 return to:@return memset: scope:[memset] from bitmap_clear bitmap_clear::@1 - (byte) memset::c#3 ← phi( bitmap_clear/(byte) memset::c#0 bitmap_clear::@1/(byte) memset::c#1 ) + (byte) memset::c#4 ← phi( bitmap_clear/(byte) memset::c#0 bitmap_clear::@1/(byte) memset::c#1 ) + (void*) memset::str#4 ← phi( bitmap_clear/(void*) memset::str#0 bitmap_clear::@1/(void*) memset::str#1 ) (word) memset::num#2 ← phi( bitmap_clear/(word) memset::num#0 bitmap_clear::@1/(word) memset::num#1 ) - (void*) memset::str#2 ← phi( bitmap_clear/(void*) memset::str#0 bitmap_clear::@1/(void*) memset::str#1 ) - (byte*~) memset::$0 ← ((byte*)) (void*) memset::str#2 - (byte*~) memset::$1 ← (byte*~) memset::$0 + (word) memset::num#2 - (byte*) memset::end#0 ← (byte*~) memset::$1 - (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#2 - to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - (void*) memset::str#4 ← phi( memset/(void*) memset::str#2 memset::@1/(void*) memset::str#4 ) - (byte*) memset::end#1 ← phi( memset/(byte*) memset::end#0 memset::@1/(byte*) memset::end#1 ) - (byte*) memset::dst#2 ← phi( memset/(byte*) memset::dst#0 memset::@1/(byte*) memset::dst#1 ) - (byte) memset::c#2 ← phi( memset/(byte) memset::c#3 memset::@1/(byte) memset::c#2 ) + (bool~) memset::$0 ← (word) memset::num#2 > (number) 0 + (bool~) memset::$1 ← ! (bool~) memset::$0 + if((bool~) memset::$1) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + (void*) memset::str#2 ← phi( memset/(void*) memset::str#4 memset::@4/(void*) memset::str#5 ) + (void*) memset::return#0 ← (void*) memset::str#2 + to:memset::@return +memset::@2: scope:[memset] from memset + (byte) memset::c#3 ← phi( memset/(byte) memset::c#4 ) + (word) memset::num#3 ← phi( memset/(word) memset::num#2 ) + (void*) memset::str#3 ← phi( memset/(void*) memset::str#4 ) + (byte*~) memset::$2 ← ((byte*)) (void*) memset::str#3 + (byte*~) memset::$3 ← (byte*~) memset::$2 + (word) memset::num#3 + (byte*) memset::end#0 ← (byte*~) memset::$3 + (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#3 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + (void*) memset::str#5 ← phi( memset::@2/(void*) memset::str#3 memset::@4/(void*) memset::str#5 ) + (byte*) memset::end#1 ← phi( memset::@2/(byte*) memset::end#0 memset::@4/(byte*) memset::end#1 ) + (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + (byte) memset::c#2 ← phi( memset::@2/(byte) memset::c#3 memset::@4/(byte) memset::c#2 ) *((byte*) memset::dst#2) ← (byte) memset::c#2 (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - (bool~) memset::$2 ← (byte*) memset::dst#1 != (byte*) memset::end#1 - if((bool~) memset::$2) goto memset::@1 - to:memset::@2 -memset::@2: scope:[memset] from memset::@1 - (void*) memset::str#3 ← phi( memset::@1/(void*) memset::str#4 ) - (void*) memset::return#0 ← (void*) memset::str#3 - to:memset::@return -memset::@return: scope:[memset] from memset::@2 - (void*) memset::return#4 ← phi( memset::@2/(void*) memset::return#0 ) + (bool~) memset::$4 ← (byte*) memset::dst#1 != (byte*) memset::end#1 + if((bool~) memset::$4) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + (void*) memset::return#4 ← phi( memset::@1/(void*) memset::return#0 ) (void*) memset::return#1 ← (void*) memset::return#4 return to:@return @@ -1592,17 +1601,21 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (signed dword) main::ypos (signed dword) main::ypos#0 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) -(byte*~) memset::$0 -(byte*~) memset::$1 -(bool~) memset::$2 +(bool~) memset::$0 +(bool~) memset::$1 +(byte*~) memset::$2 +(byte*~) memset::$3 +(bool~) memset::$4 (label) memset::@1 (label) memset::@2 +(label) memset::@4 (label) memset::@return (byte) memset::c (byte) memset::c#0 (byte) memset::c#1 (byte) memset::c#2 (byte) memset::c#3 +(byte) memset::c#4 (byte*) memset::dst (byte*) memset::dst#0 (byte*) memset::dst#1 @@ -1614,6 +1627,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (word) memset::num#0 (word) memset::num#1 (word) memset::num#2 +(word) memset::num#3 (void*) memset::return (void*) memset::return#0 (void*) memset::return#1 @@ -1626,6 +1640,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (void*) memset::str#2 (void*) memset::str#3 (void*) memset::str#4 +(void*) memset::str#5 (signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) (word~) mul16s::$0 (word~) mul16s::$1 @@ -2035,6 +2050,7 @@ Adding number conversion cast (unumber) 0 in (byte) mulu16_sel::select#3 ← (nu Adding number conversion cast (unumber) 0 in (byte) mulu16_sel::select#4 ← (number) 0 Adding number conversion cast (unumber) 4 in (word~) sin16s::$12 ← (word) sin16s::x5#0 >> (number) 4 Adding number conversion cast (unumber) 0 in (bool~) sin16s::$15 ← (byte) sin16s::isUpper#2 != (number) 0 +Adding number conversion cast (unumber) 0 in (bool~) memset::$0 ← (word) memset::num#2 > (number) 0 Adding number conversion cast (unumber) $80 in (byte) bitmap_init::bits#0 ← (number) $80 Adding number conversion cast (unumber) 1 in (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (number) 1 Adding number conversion cast (unumber) 0 in (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (number) 0 @@ -2136,8 +2152,8 @@ Inlining cast (byte) mulu16_sel::select#3 ← (unumber)(number) 0 Inlining cast (byte) mulu16_sel::select#4 ← (unumber)(number) 0 Inlining cast (signed word~) sin16s::$14 ← (signed word)(word) sin16s::usinx#1 Inlining cast (signed word~) sin16s::$19 ← (signed word)(word) sin16s::usinx#3 -Inlining cast (byte*~) memset::$0 ← (byte*)(void*) memset::str#2 -Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 +Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 +Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 Inlining cast (byte) bitmap_init::bits#0 ← (unumber)(number) $80 Inlining cast (byte) bitmap_init::bits#2 ← (unumber)(number) $80 Inlining cast (byte) memset::c#1 ← (unumber)(number) 0 @@ -2218,6 +2234,7 @@ Simplifying constant integer cast 0 Simplifying constant integer cast 0 Simplifying constant integer cast 4 Simplifying constant integer cast 0 +Simplifying constant integer cast 0 Simplifying constant integer cast $80 Simplifying constant integer cast 1 Simplifying constant integer cast 0 @@ -2302,6 +2319,7 @@ Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 4 Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) $80 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 0 @@ -2368,12 +2386,13 @@ Inversing boolean not [126] (bool~) mul16s::$6 ← (signed word) mul16s::b#4 >= Inversing boolean not [194] (bool~) sin16s::$1 ← (dword) sin16s::x#3 < (dword) PI_u4f28#0 from [193] (bool~) sin16s::$0 ← (dword) sin16s::x#3 >= (dword) PI_u4f28#0 Inversing boolean not [198] (bool~) sin16s::$3 ← (dword) sin16s::x#4 < (dword) PI_HALF_u4f28#0 from [197] (bool~) sin16s::$2 ← (dword) sin16s::x#4 >= (dword) PI_HALF_u4f28#0 Inversing boolean not [257] (bool~) sin16s::$16 ← (byte) sin16s::isUpper#2 == (byte) 0 from [256] (bool~) sin16s::$15 ← (byte) sin16s::isUpper#2 != (byte) 0 -Inversing boolean not [314] (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits#1 != (byte) 0 from [313] (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (byte) 0 -Inversing boolean not [334] (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte) 7 from [333] (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte) 7 -Inversing boolean not [464] (bool~) main::$23 ← (word) main::idx_x#1 < (word) $200 from [463] (bool~) main::$22 ← (word) main::idx_x#1 >= (word) $200 -Inversing boolean not [469] (bool~) main::$25 ← (word) main::idx_y#1 < (word) $200 from [468] (bool~) main::$24 ← (word) main::idx_y#1 >= (word) $200 -Inversing boolean not [484] (bool~) main::$31 ← (signed word) main::r#5 < (signed word)(number) $200*(number) $c+(number) $100 from [483] (bool~) main::$30 ← (signed word) main::r#5 >= (signed word)(number) $200*(number) $c+(number) $100 -Inversing boolean not [513] (bool~) irq::$0 ← (byte) 0 == (byte) frame_cnt#4 from [512] (bool~) irq::$1 ← (byte) 0 != (byte) frame_cnt#4 +Inversing boolean not [286] (bool~) memset::$1 ← (word) memset::num#2 <= (byte) 0 from [285] (bool~) memset::$0 ← (word) memset::num#2 > (byte) 0 +Inversing boolean not [318] (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits#1 != (byte) 0 from [317] (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (byte) 0 +Inversing boolean not [338] (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte) 7 from [337] (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte) 7 +Inversing boolean not [468] (bool~) main::$23 ← (word) main::idx_x#1 < (word) $200 from [467] (bool~) main::$22 ← (word) main::idx_x#1 >= (word) $200 +Inversing boolean not [473] (bool~) main::$25 ← (word) main::idx_y#1 < (word) $200 from [472] (bool~) main::$24 ← (word) main::idx_y#1 >= (word) $200 +Inversing boolean not [488] (bool~) main::$31 ← (signed word) main::r#5 < (signed word)(number) $200*(number) $c+(number) $100 from [487] (bool~) main::$30 ← (signed word) main::r#5 >= (signed word)(number) $200*(number) $c+(number) $100 +Inversing boolean not [517] (bool~) irq::$0 ← (byte) 0 == (byte) frame_cnt#4 from [516] (bool~) irq::$1 ← (byte) 0 != (byte) frame_cnt#4 Successful SSA optimization Pass2UnaryNotSimplification Alias (word) divr16u::rem#0 = (word~) divr16u::$0 (word) divr16u::rem#7 Alias (word) divr16u::dividend#0 = (word~) divr16u::$6 (word) divr16u::dividend#8 @@ -2465,8 +2484,11 @@ Alias (signed word) sin16s::sinx#1 = (signed word~) sin16s::$20 Alias (dword) mul16u::return#3 = (dword) mul16u::return#6 Alias (byte) mulu16_sel::select#5 = (byte) mulu16_sel::select#6 Alias (word) mulu16_sel::return#12 = (word) mulu16_sel::return#5 (word~) mulu16_sel::$2 (word) mulu16_sel::return#6 -Alias (byte*) memset::end#0 = (byte*~) memset::$1 -Alias (void*) memset::return#0 = (void*) memset::str#3 (void*) memset::str#4 (void*) memset::return#4 (void*) memset::return#1 +Alias (void*) memset::return#0 = (void*) memset::str#2 (void*) memset::return#4 (void*) memset::return#1 +Alias (void*) memset::str#3 = (void*) memset::str#4 +Alias (word) memset::num#2 = (word) memset::num#3 +Alias (byte) memset::c#3 = (byte) memset::c#4 +Alias (byte*) memset::end#0 = (byte*~) memset::$3 Alias (byte) bitmap_init::x#2 = (byte) bitmap_init::x#4 Alias (byte*) bitmap_init::gfx#4 = (byte*) bitmap_init::gfx#5 Alias (byte*) bitmap_gfx#32 = (byte*) bitmap_gfx#33 @@ -2571,7 +2593,7 @@ Self Phi Eliminated (word) sin16s_gen2::wavelength#2 Self Phi Eliminated (word) rem16u#16 Self Phi Eliminated (byte) memset::c#2 Self Phi Eliminated (byte*) memset::end#1 -Self Phi Eliminated (void*) memset::return#0 +Self Phi Eliminated (void*) memset::str#5 Self Phi Eliminated (byte*) bitmap_init::gfx#2 Self Phi Eliminated (byte*) bitmap_gfx#23 Self Phi Eliminated (byte*) bitmap_screen#22 @@ -2605,7 +2627,7 @@ Identical Phi Values (word) rem16u#16 (word) rem16u#15 Identical Phi Values (dword) sin16s::x#3 (dword) sin16s::x#0 Identical Phi Values (byte) memset::c#2 (byte) memset::c#3 Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0 -Identical Phi Values (void*) memset::return#0 (void*) memset::str#2 +Identical Phi Values (void*) memset::str#5 (void*) memset::str#3 Identical Phi Values (byte*) bitmap_init::gfx#1 (byte*) bitmap_init::gfx#0 Identical Phi Values (byte*) bitmap_init::screen#1 (byte*) bitmap_init::screen#0 Identical Phi Values (byte*) bitmap_init::gfx#2 (byte*) bitmap_init::gfx#1 @@ -2638,7 +2660,9 @@ Identical Phi Values (word) rem16u#10 (word) rem16u#18 Identical Phi Values (byte*) bitmap_gfx#10 (byte*) bitmap_gfx#14 Identical Phi Values (byte*) bitmap_screen#10 (byte*) bitmap_screen#13 Successful SSA optimization Pass2IdenticalPhiElimination -Identified duplicate assignment right side [332] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 +Identical Phi Values (void*) memset::return#0 (void*) memset::str#3 +Successful SSA optimization Pass2IdenticalPhiElimination +Identified duplicate assignment right side [336] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 Successful SSA optimization Pass2DuplicateRValueIdentification Simple Condition (bool~) divr16u::$4 [32] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 Simple Condition (bool~) divr16u::$9 [40] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 @@ -2651,28 +2675,29 @@ Simple Condition (bool~) sin16s_gen2::$10 [187] if((word) sin16s_gen2::i#1<(word Simple Condition (bool~) sin16s::$1 [195] if((dword) sin16s::x#0<(dword) PI_u4f28#0) goto sin16s::@1 Simple Condition (bool~) sin16s::$3 [199] if((dword) sin16s::x#4<(dword) PI_HALF_u4f28#0) goto sin16s::@2 Simple Condition (bool~) sin16s::$16 [258] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@3 -Simple Condition (bool~) memset::$2 [293] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -Simple Condition (bool~) bitmap_init::$1 [315] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 -Simple Condition (bool~) bitmap_init::$2 [319] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 -Simple Condition (bool~) bitmap_init::$9 [335] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 -Simple Condition (bool~) bitmap_init::$11 [339] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 -Simple Condition (bool~) main::$23 [465] if((word) main::idx_x#1<(word) $200) goto main::@4 -Simple Condition (bool~) main::$25 [470] if((word) main::idx_y#1<(word) $200) goto main::@5 -Simple Condition (bool~) main::$31 [485] if((signed word) main::r#1<(signed word)(number) $200*(number) $c+(number) $100) goto main::@1 -Simple Condition (bool~) irq::$0 [514] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 +Simple Condition (bool~) memset::$1 [287] if((word) memset::num#2<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [299] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 +Simple Condition (bool~) bitmap_init::$1 [319] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$2 [323] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$9 [339] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 +Simple Condition (bool~) bitmap_init::$11 [343] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 +Simple Condition (bool~) main::$23 [469] if((word) main::idx_x#1<(word) $200) goto main::@4 +Simple Condition (bool~) main::$25 [474] if((word) main::idx_y#1<(word) $200) goto main::@5 +Simple Condition (bool~) main::$31 [489] if((signed word) main::r#1<(signed word)(number) $200*(number) $c+(number) $100) goto main::@1 +Simple Condition (bool~) irq::$0 [518] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting ! if()-condition to reversed if() [478] (bool~) main::$29 ← ! (bool~) main::$28 +Rewriting ! if()-condition to reversed if() [482] (bool~) main::$29 ← ! (bool~) main::$28 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting && if()-condition to two if()s [477] (bool~) main::$28 ← (bool~) main::$26 && (bool~) main::$27 +Rewriting && if()-condition to two if()s [481] (bool~) main::$28 ← (bool~) main::$26 && (bool~) main::$27 Successful SSA optimization Pass2ConditionalAndOrRewriting -Negating conditional jump and destination [485] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@17 +Negating conditional jump and destination [489] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@17 Constant right-side identified [225] (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6 -Constant right-side identified [302] (byte[$100]) bitmap_plot_ylo#0 ← { fill( $100, 0) } -Constant right-side identified [303] (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } -Constant right-side identified [304] (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } -Constant right-side identified [375] (byte[$100]) plots_per_frame#0 ← { fill( $100, 0) } -Constant right-side identified [376] (signed word[$200]) SINUS#0 ← { fill( $200, 0) } -Constant right-side identified [506] (void()*~) init_irq::$0 ← & interrupt(HARDWARE_CLOBBER)(void()) irq() +Constant right-side identified [306] (byte[$100]) bitmap_plot_ylo#0 ← { fill( $100, 0) } +Constant right-side identified [307] (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } +Constant right-side identified [308] (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } +Constant right-side identified [379] (byte[$100]) plots_per_frame#0 ← { fill( $100, 0) } +Constant right-side identified [380] (signed word[$200]) SINUS#0 ← { fill( $200, 0) } +Constant right-side identified [510] (void()*~) init_irq::$0 ← & interrupt(HARDWARE_CLOBBER)(void()) irq() Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) PROCPORT_DDR#0 = (byte*) 0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -2755,27 +2780,27 @@ Constant (const word) divr16u::divisor#1 = div32u16u::divisor#0 Constant (const byte*) bitmap_gfx#1 = bitmap_init::gfx#0 Constant (const byte*) bitmap_screen#1 = bitmap_init::screen#0 Successful SSA optimization Pass2ConstantIdentification -Constant value identified (void*)bitmap_screen#1 in [351] (void*) memset::str#0 ← (void*)(const byte*) bitmap_screen#1 -Constant value identified (void*)bitmap_gfx#1 in [357] (void*) memset::str#1 ← (void*)(const byte*) bitmap_gfx#1 -Constant value identified (word)main::toD0181_screen#0 in [402] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 -Constant value identified (word)main::toD0181_gfx#0 in [406] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 +Constant value identified (void*)bitmap_screen#1 in [355] (void*) memset::str#0 ← (void*)(const byte*) bitmap_screen#1 +Constant value identified (void*)bitmap_gfx#1 in [361] (void*) memset::str#1 ← (void*)(const byte*) bitmap_gfx#1 +Constant value identified (word)main::toD0181_screen#0 in [406] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 +Constant value identified (word)main::toD0181_gfx#0 in [410] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 Successful SSA optimization Pass2ConstantValues -if() condition always true - replacing block destination [424] if(true) goto main::@2 -if() condition always true - replacing block destination [489] if(true) goto main::@18 +if() condition always true - replacing block destination [428] if(true) goto main::@2 +if() condition always true - replacing block destination [493] if(true) goto main::@18 Successful SSA optimization Pass2ConstantIfs Resolved ranged next value [45] divr16u::i#1 ← ++ divr16u::i#2 to ++ Resolved ranged comparison value [47] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 -Resolved ranged next value [317] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ -Resolved ranged comparison value [319] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 -Resolved ranged next value [337] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ -Resolved ranged comparison value [339] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 -De-inlining pointer[w] to *(pointer+w) [427] (signed word) main::cos_x#0 ← *((const signed word[$200]) SINUS#0 + (word~) main::$32) -De-inlining pointer[w] to *(pointer+w) [442] (signed word) main::sin_y#0 ← *((const signed word[$200]) SINUS#0 + (word~) main::$33) +Resolved ranged next value [321] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ +Resolved ranged comparison value [323] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 +Resolved ranged next value [341] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ +Resolved ranged comparison value [343] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 +De-inlining pointer[w] to *(pointer+w) [431] (signed word) main::cos_x#0 ← *((const signed word[$200]) SINUS#0 + (word~) main::$32) +De-inlining pointer[w] to *(pointer+w) [446] (signed word) main::sin_y#0 ← *((const signed word[$200]) SINUS#0 + (word~) main::$33) Successful SSA optimization Pass2DeInlineWordDerefIdx -Simplifying expression containing zero bitmap_clear::$0 in [349] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0 +Simplifying expression containing zero bitmap_clear::$0 in [353] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0 Successful SSA optimization PassNSimplifyExpressionWithZero -Eliminating unused variable (void*) memset::return#2 and assignment [168] (void*) memset::return#2 ← (void*) memset::str#2 -Eliminating unused variable (void*) memset::return#3 and assignment [171] (void*) memset::return#3 ← (void*) memset::str#2 +Eliminating unused variable (void*) memset::return#2 and assignment [169] (void*) memset::return#2 ← (void*) memset::str#3 +Eliminating unused variable (void*) memset::return#3 and assignment [172] (void*) memset::return#3 ← (void*) memset::str#3 Eliminating unused constant (const byte) bitmap_clear::bgcol#0 Eliminating unused constant (const word) rem16u#0 Eliminating unused constant (const byte*) bitmap_screen#0 @@ -2800,17 +2825,17 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte~) bitmap_init::$7 = (byte~) bitmap_init::$3 Alias (byte) bitmap_clear::col#0 = (byte~) bitmap_clear::$0 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$26 [236] if((word) main::idx_x#10==(byte) 0) goto main::@31 -Simple Condition (bool~) main::$27 [260] if((byte) main::r_add#10!=(byte) 1) goto main::@13 +Simple Condition (bool~) main::$26 [237] if((word) main::idx_x#10==(byte) 0) goto main::@31 +Simple Condition (bool~) main::$27 [261] if((byte) main::r_add#10!=(byte) 1) goto main::@13 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [236] if((word) main::idx_x#10!=(byte) 0) goto main::@6 -Negating conditional jump and destination [260] if((byte) main::r_add#10==(byte) 1) goto main::@6 +Negating conditional jump and destination [237] if((word) main::idx_x#10!=(byte) 0) goto main::@6 +Negating conditional jump and destination [261] if((byte) main::r_add#10==(byte) 1) goto main::@6 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant right-side identified [18] (word) divr16u::dividend#1 ← > (const dword) div32u16u::dividend#0 Constant right-side identified [22] (word) divr16u::dividend#2 ← < (const dword) div32u16u::dividend#0 Constant right-side identified [59] (signed word) sin16s_gen2::ampl#0 ← (const signed word) sin16s_gen2::max#0 - (const signed word) sin16s_gen2::min#0 -Constant right-side identified [163] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 -Constant right-side identified [181] (byte~) main::$3 ← (const byte) VIC_BMM#0 | (const byte) VIC_DEN#0 +Constant right-side identified [164] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 +Constant right-side identified [182] (byte~) main::$3 ← (const byte) VIC_BMM#0 | (const byte) VIC_DEN#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) divr16u::dividend#1 = >div32u16u::dividend#0 Constant (const word) divr16u::dividend#2 = <div32u16u::dividend#0 @@ -2826,9 +2851,9 @@ Constant (const signed word) mul16s::b#0 = sin16s_gen2::ampl#0 Constant (const byte) memset::c#0 = bitmap_clear::col#0 Successful SSA optimization Pass2ConstantIdentification Constant right-side identified [57] (signed word~) sin16s_gen2::$1 ← (const signed word) sin16s_gen2::ampl#0 >> (signed byte) 1 -Constant right-side identified [171] (byte~) main::$4 ← (const byte) main::$3 | (const byte) VIC_RSEL#0 -Constant right-side identified [174] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff -Constant right-side identified [177] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 +Constant right-side identified [172] (byte~) main::$4 ← (const byte) main::$3 | (const byte) VIC_RSEL#0 +Constant right-side identified [175] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff +Constant right-side identified [178] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const signed word) sin16s_gen2::$1 = sin16s_gen2::ampl#0>>1 Constant (const byte) main::$4 = main::$3|VIC_RSEL#0 @@ -2836,9 +2861,9 @@ Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&$3fff Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0 Successful SSA optimization Pass2ConstantIdentification Constant right-side identified [57] (signed word) sin16s_gen2::offs#0 ← (const signed word) sin16s_gen2::min#0 + (const signed word) sin16s_gen2::$1 -Constant right-side identified [170] (byte~) main::$5 ← (const byte) main::$4 | (byte) 3 -Constant right-side identified [172] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 -Constant right-side identified [174] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 +Constant right-side identified [171] (byte~) main::$5 ← (const byte) main::$4 | (byte) 3 +Constant right-side identified [173] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 +Constant right-side identified [175] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const signed word) sin16s_gen2::offs#0 = sin16s_gen2::min#0+sin16s_gen2::$1 Constant (const byte) main::$5 = main::$4|3 @@ -2854,13 +2879,13 @@ Eliminating unused constant (const signed word) sin16s_gen2::offs#0 Successful SSA optimization PassNEliminateUnusedVars Alias (signed word~) sin16s_gen2::$8 = (signed word~) sin16s_gen2::$7 Successful SSA optimization Pass2AliasElimination -Constant right-side identified [170] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 -Constant right-side identified [171] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f +Constant right-side identified [171] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 +Constant right-side identified [172] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::toD0181_$3#0 = >main::toD0181_$2#0 Constant (const byte) main::toD0181_$7#0 = main::toD0181_$6#0&$f Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [169] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 +Constant right-side identified [170] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0 Successful SSA optimization Pass2ConstantIdentification @@ -2868,19 +2893,19 @@ Inlining Noop Cast [47] (word~) mul16s::$10 ← (word)(signed word) mul16s::b#3 Inlining Noop Cast [53] (word~) mul16s::$14 ← (word)(signed word) mul16s::a#3 keeping mul16s::a#3 Inlining Noop Cast [110] (signed word) sin16s::sinx#0 ← (signed word)(word) sin16s::usinx#1 keeping sin16s::usinx#1 Inlining Noop Cast [114] (signed word~) sin16s::$19 ← (signed word)(word) sin16s::usinx#1 keeping sin16s::usinx#1 -Inlining Noop Cast [127] (byte*~) memset::$0 ← (byte*)(void*) memset::str#2 keeping memset::str#2 -Inlining Noop Cast [129] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 keeping memset::str#2 +Inlining Noop Cast [128] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 keeping memset::str#3 +Inlining Noop Cast [130] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 keeping memset::str#3 Successful SSA optimization Pass2NopCastInlining Inlining Noop Cast [69] (signed word~) sin16s_gen2::$8 ← (signed word)(word~) sin16s_gen2::$6 keeping sin16s_gen2::$8 -Inlining Noop Cast [159] (byte*) bitmap_plot::plotter#0 ← (byte*)(word~) bitmap_plot::$3 keeping bitmap_plot::plotter#0 -Inlining Noop Cast [181] (signed word~) main::$10 ← (signed word)(word~) main::$9 keeping main::$10 -Inlining Noop Cast [184] (word) main::x#0 ← (word)(signed word~) main::$12 keeping main::x#0 -Inlining Noop Cast [194] (signed word~) main::$16 ← (signed word)(word~) main::$15 keeping main::$16 -Inlining Noop Cast [197] (word) main::y#0 ← (word)(signed word~) main::$18 keeping main::y#0 +Inlining Noop Cast [160] (byte*) bitmap_plot::plotter#0 ← (byte*)(word~) bitmap_plot::$3 keeping bitmap_plot::plotter#0 +Inlining Noop Cast [182] (signed word~) main::$10 ← (signed word)(word~) main::$9 keeping main::$10 +Inlining Noop Cast [185] (word) main::x#0 ← (word)(signed word~) main::$12 keeping main::x#0 +Inlining Noop Cast [195] (signed word~) main::$16 ← (signed word)(word~) main::$15 keeping main::$16 +Inlining Noop Cast [198] (word) main::y#0 ← (word)(signed word~) main::$18 keeping main::y#0 Successful SSA optimization Pass2NopCastInlining -Rewriting multiplication to use shift [172] (word~) main::$32 ← (word) main::idx_x#11 * (const byte) SIZEOF_SIGNED_WORD -Rewriting multiplication to use shift [185] (word~) main::$33 ← (word) main::idx_y#3 * (const byte) SIZEOF_SIGNED_WORD -Rewriting division to use shift [212] (byte) main::r_add#1 ← (byte) main::r_add#10 / (byte) 2 +Rewriting multiplication to use shift [173] (word~) main::$32 ← (word) main::idx_x#11 * (const byte) SIZEOF_SIGNED_WORD +Rewriting multiplication to use shift [186] (word~) main::$33 ← (word) main::idx_y#3 * (const byte) SIZEOF_SIGNED_WORD +Rewriting division to use shift [213] (byte) main::r_add#1 ← (byte) main::r_add#10 / (byte) 2 Successful SSA optimization Pass2MultiplyToShiftRewriting Inlining constant with var siblings (const word) divr16u::quotient#0 Inlining constant with var siblings (const byte) divr16u::i#0 @@ -2989,7 +3014,7 @@ Added new block during phi lifting sin16s::@13(between sin16s and sin16s::@1) Fixing phi predecessor for sin16s::isUpper#2 to new block ( sin16s -> sin16s::@13 ) during phi lifting. Added new block during phi lifting sin16s::@14(between sin16s::@1 and sin16s::@2) Added new block during phi lifting sin16s::@15(between sin16s::@12 and sin16s::@3) -Added new block during phi lifting memset::@4(between memset::@1 and memset::@1) +Added new block during phi lifting memset::@6(between memset::@4 and memset::@4) Added new block during phi lifting bitmap_init::@9(between bitmap_init::@2 and bitmap_init::@1) Added new block during phi lifting bitmap_init::@10(between bitmap_init::@1 and bitmap_init::@2) Added new block during phi lifting bitmap_init::@11(between bitmap_init::@6 and bitmap_init::@5) @@ -3020,7 +3045,7 @@ Adding NOP phi() at start of mul16u::@3 Adding NOP phi() at start of bitmap_clear Adding NOP phi() at start of bitmap_clear::@1 Adding NOP phi() at start of bitmap_clear::@2 -Adding NOP phi() at start of memset::@2 +Adding NOP phi() at start of memset::@1 Adding NOP phi() at start of bitmap_init Adding NOP phi() at start of bitmap_init::@3 Adding NOP phi() at start of bitmap_init::@4 @@ -3031,10 +3056,10 @@ Calls in [] to main:7 Calls in [main] to sin16s_gen2:11 bitmap_init:13 bitmap_clear:15 init_irq:20 mul16s:30 mul16s:43 bitmap_plot:51 Calls in [mul16s] to mul16u:88 Calls in [bitmap_clear] to memset:136 memset:138 -Calls in [sin16s_gen2] to div32u16u:182 sin16s:187 mul16s:191 -Calls in [sin16s] to mulu16_sel:218 mulu16_sel:225 mulu16_sel:230 mulu16_sel:238 mulu16_sel:245 -Calls in [mulu16_sel] to mul16u:263 -Calls in [div32u16u] to divr16u:270 divr16u:275 +Calls in [sin16s_gen2] to div32u16u:183 sin16s:188 mul16s:192 +Calls in [sin16s] to mulu16_sel:219 mulu16_sel:226 mulu16_sel:231 mulu16_sel:239 mulu16_sel:246 +Calls in [mulu16_sel] to mul16u:264 +Calls in [div32u16u] to divr16u:271 divr16u:276 Created 47 initial phi equivalence classes Coalesced [28] mul16s::a#8 ← mul16s::a#1 @@ -3062,49 +3087,49 @@ Coalesced [121] mul16u::a#11 ← mul16u::a#0 Coalesced [122] mul16u::res#7 ← mul16u::res#6 Coalesced [123] mul16u::mb#9 ← mul16u::mb#1 Coalesced (already) [124] mul16u::res#8 ← mul16u::res#2 -Coalesced [150] memset::dst#4 ← memset::dst#1 -Coalesced [170] bitmap_init::yoffs#7 ← bitmap_init::yoffs#1 -Coalesced [175] bitmap_init::y#5 ← bitmap_init::y#1 -Coalesced [176] bitmap_init::yoffs#5 ← bitmap_init::yoffs#4 -Coalesced (already) [177] bitmap_init::yoffs#6 ← bitmap_init::yoffs#2 -Coalesced [178] bitmap_init::bits#5 ← bitmap_init::bits#4 -Coalesced [179] bitmap_init::x#5 ← bitmap_init::x#1 -Coalesced [180] bitmap_init::bits#6 ← bitmap_init::bits#1 -Coalesced [190] mul16s::a#10 ← mul16s::a#0 -Coalesced [201] sin16s_gen2::x#5 ← sin16s_gen2::x#1 -Coalesced [202] sin16s_gen2::sintab#7 ← sin16s_gen2::sintab#0 -Coalesced [203] sin16s_gen2::i#5 ← sin16s_gen2::i#1 -Coalesced [206] sin16s::x#9 ← sin16s::x#1 -Coalesced [210] sin16s::x#11 ← sin16s::x#2 -Coalesced [216] mulu16_sel::v1#8 ← mulu16_sel::v1#0 -Coalesced [217] mulu16_sel::v2#8 ← mulu16_sel::v2#0 -Coalesced [223] mulu16_sel::v1#9 ← mulu16_sel::v1#1 -Coalesced [224] mulu16_sel::v2#9 ← mulu16_sel::v2#1 -Coalesced [229] mulu16_sel::v1#10 ← mulu16_sel::v1#2 -Coalesced [236] mulu16_sel::v1#6 ← mulu16_sel::v1#3 -Coalesced [237] mulu16_sel::v2#6 ← mulu16_sel::v2#3 -Coalesced [243] mulu16_sel::v1#7 ← mulu16_sel::v1#4 -Coalesced [244] mulu16_sel::v2#7 ← mulu16_sel::v2#4 -Coalesced [252] sin16s::return#6 ← sin16s::sinx#1 -Coalesced [256] sin16s::x#10 ← sin16s::x#4 -Coalesced [257] sin16s::x#8 ← sin16s::x#0 -Coalesced [261] mul16u::mb#7 ← mul16u::b#1 -Coalesced [262] mul16u::a#9 ← mul16u::a#2 -Coalesced [274] divr16u::rem#12 ← divr16u::rem#4 -Coalesced [281] divr16u::rem#13 ← divr16u::rem#10 -Coalesced [282] divr16u::dividend#9 ← divr16u::dividend#5 -Coalesced [289] divr16u::rem#16 ← divr16u::rem#1 -Coalesced [296] divr16u::rem#18 ← divr16u::rem#2 -Coalesced [297] divr16u::return#8 ← divr16u::quotient#2 -Coalesced [303] divr16u::rem#14 ← divr16u::rem#11 -Coalesced [304] divr16u::dividend#10 ← divr16u::dividend#0 -Coalesced [305] divr16u::quotient#9 ← divr16u::return#0 -Coalesced [306] divr16u::i#7 ← divr16u::i#1 -Coalesced [307] divr16u::rem#17 ← divr16u::rem#6 -Coalesced [308] divr16u::return#7 ← divr16u::quotient#1 -Coalesced [309] divr16u::rem#15 ← divr16u::rem#0 -Coalesced [313] frame_cnt#28 ← frame_cnt#1 -Coalesced [318] frame_cnt#27 ← frame_cnt#0 +Coalesced [151] memset::dst#4 ← memset::dst#1 +Coalesced [171] bitmap_init::yoffs#7 ← bitmap_init::yoffs#1 +Coalesced [176] bitmap_init::y#5 ← bitmap_init::y#1 +Coalesced [177] bitmap_init::yoffs#5 ← bitmap_init::yoffs#4 +Coalesced (already) [178] bitmap_init::yoffs#6 ← bitmap_init::yoffs#2 +Coalesced [179] bitmap_init::bits#5 ← bitmap_init::bits#4 +Coalesced [180] bitmap_init::x#5 ← bitmap_init::x#1 +Coalesced [181] bitmap_init::bits#6 ← bitmap_init::bits#1 +Coalesced [191] mul16s::a#10 ← mul16s::a#0 +Coalesced [202] sin16s_gen2::x#5 ← sin16s_gen2::x#1 +Coalesced [203] sin16s_gen2::sintab#7 ← sin16s_gen2::sintab#0 +Coalesced [204] sin16s_gen2::i#5 ← sin16s_gen2::i#1 +Coalesced [207] sin16s::x#9 ← sin16s::x#1 +Coalesced [211] sin16s::x#11 ← sin16s::x#2 +Coalesced [217] mulu16_sel::v1#8 ← mulu16_sel::v1#0 +Coalesced [218] mulu16_sel::v2#8 ← mulu16_sel::v2#0 +Coalesced [224] mulu16_sel::v1#9 ← mulu16_sel::v1#1 +Coalesced [225] mulu16_sel::v2#9 ← mulu16_sel::v2#1 +Coalesced [230] mulu16_sel::v1#10 ← mulu16_sel::v1#2 +Coalesced [237] mulu16_sel::v1#6 ← mulu16_sel::v1#3 +Coalesced [238] mulu16_sel::v2#6 ← mulu16_sel::v2#3 +Coalesced [244] mulu16_sel::v1#7 ← mulu16_sel::v1#4 +Coalesced [245] mulu16_sel::v2#7 ← mulu16_sel::v2#4 +Coalesced [253] sin16s::return#6 ← sin16s::sinx#1 +Coalesced [257] sin16s::x#10 ← sin16s::x#4 +Coalesced [258] sin16s::x#8 ← sin16s::x#0 +Coalesced [262] mul16u::mb#7 ← mul16u::b#1 +Coalesced [263] mul16u::a#9 ← mul16u::a#2 +Coalesced [275] divr16u::rem#12 ← divr16u::rem#4 +Coalesced [282] divr16u::rem#13 ← divr16u::rem#10 +Coalesced [283] divr16u::dividend#9 ← divr16u::dividend#5 +Coalesced [290] divr16u::rem#16 ← divr16u::rem#1 +Coalesced [297] divr16u::rem#18 ← divr16u::rem#2 +Coalesced [298] divr16u::return#8 ← divr16u::quotient#2 +Coalesced [304] divr16u::rem#14 ← divr16u::rem#11 +Coalesced [305] divr16u::dividend#10 ← divr16u::dividend#0 +Coalesced [306] divr16u::quotient#9 ← divr16u::return#0 +Coalesced [307] divr16u::i#7 ← divr16u::i#1 +Coalesced [308] divr16u::rem#17 ← divr16u::rem#6 +Coalesced [309] divr16u::return#7 ← divr16u::quotient#1 +Coalesced [310] divr16u::rem#15 ← divr16u::rem#0 +Coalesced [314] frame_cnt#28 ← frame_cnt#1 +Coalesced [319] frame_cnt#27 ← frame_cnt#0 Coalesced down to 32 phi equivalence classes Culled Empty Block (label) @6 Culled Empty Block (label) @17 @@ -3123,8 +3148,8 @@ Culled Empty Block (label) mul16s::@7 Culled Empty Block (label) mul16u::@3 Culled Empty Block (label) mul16u::@10 Culled Empty Block (label) bitmap_clear::@2 -Culled Empty Block (label) memset::@2 -Culled Empty Block (label) memset::@4 +Culled Empty Block (label) memset::@1 +Culled Empty Block (label) memset::@6 Culled Empty Block (label) bitmap_init::@3 Culled Empty Block (label) bitmap_init::@4 Culled Empty Block (label) bitmap_init::@11 @@ -3154,6 +3179,8 @@ Renumbering block sin16s::@11 to sin16s::@10 Renumbering block sin16s::@12 to sin16s::@11 Renumbering block sin16s::@15 to sin16s::@12 Renumbering block mulu16_sel::@2 to mulu16_sel::@1 +Renumbering block memset::@2 to memset::@1 +Renumbering block memset::@4 to memset::@2 Renumbering block bitmap_init::@5 to bitmap_init::@3 Renumbering block bitmap_init::@6 to bitmap_init::@4 Renumbering block bitmap_init::@7 to bitmap_init::@5 @@ -3390,250 +3417,253 @@ bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 to:@return memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [106] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) + [106] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) [106] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 ) - [106] (void*) memset::str#2 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) - [107] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 - [108] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + [107] if((word) memset::num#2<=(byte) 0) goto memset::@return to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - [109] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) - [110] *((byte*) memset::dst#2) ← (byte) memset::c#3 - [111] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - [112] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 +memset::@1: scope:[memset] from memset + [108] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 + [109] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + to:memset::@2 +memset::@2: scope:[memset] from memset::@1 memset::@2 + [110] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 ) + [111] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [112] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [113] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 to:memset::@return -memset::@return: scope:[memset] from memset::@1 - [113] return +memset::@return: scope:[memset] from memset memset::@2 + [114] return to:@return bitmap_init: scope:[bitmap_init] from main::@9 - [114] phi() + [115] phi() to:bitmap_init::@1 bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2 - [115] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) - [115] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) - [116] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 - [117] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 - [118] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 + [116] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) + [116] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) + [117] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 + [118] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 + [119] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 to:bitmap_init::@2 bitmap_init::@6: scope:[bitmap_init] from bitmap_init::@1 - [119] phi() + [120] phi() to:bitmap_init::@2 bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6 - [120] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) - [121] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 - [122] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 + [121] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) + [122] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 + [123] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 to:bitmap_init::@3 bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4 - [123] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) - [123] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) - [124] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 - [125] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 - [126] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 - [127] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 - [128] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 - [129] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 - [130] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 + [124] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) + [124] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) + [125] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 + [126] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 + [127] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 + [128] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 + [129] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 + [130] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 + [131] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 to:bitmap_init::@5 bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@3 - [131] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 + [132] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 to:bitmap_init::@4 bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 - [132] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) - [133] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 - [134] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 + [133] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) + [134] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 + [135] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 to:bitmap_init::@return bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 - [135] return + [136] return to:@return sin16s_gen2: scope:[sin16s_gen2] from main - [136] phi() - [137] call div32u16u - [138] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + [137] phi() + [138] call div32u16u + [139] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 to:sin16s_gen2::@2 sin16s_gen2::@2: scope:[sin16s_gen2] from sin16s_gen2 - [139] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 + [140] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 to:sin16s_gen2::@1 sin16s_gen2::@1: scope:[sin16s_gen2] from sin16s_gen2::@2 sin16s_gen2::@4 - [140] (word) sin16s_gen2::i#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(word) sin16s_gen2::i#1 ) - [140] (signed word*) sin16s_gen2::sintab#2 ← phi( sin16s_gen2::@2/(const signed word[$200]) SINUS#0 sin16s_gen2::@4/(signed word*) sin16s_gen2::sintab#0 ) - [140] (dword) sin16s_gen2::x#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(dword) sin16s_gen2::x#1 ) - [141] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 - [142] call sin16s - [143] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 + [141] (word) sin16s_gen2::i#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(word) sin16s_gen2::i#1 ) + [141] (signed word*) sin16s_gen2::sintab#2 ← phi( sin16s_gen2::@2/(const signed word[$200]) SINUS#0 sin16s_gen2::@4/(signed word*) sin16s_gen2::sintab#0 ) + [141] (dword) sin16s_gen2::x#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(dword) sin16s_gen2::x#1 ) + [142] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 + [143] call sin16s + [144] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 to:sin16s_gen2::@3 sin16s_gen2::@3: scope:[sin16s_gen2] from sin16s_gen2::@1 - [144] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 - [145] call mul16s - [146] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 + [145] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 + [146] call mul16s + [147] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 to:sin16s_gen2::@4 sin16s_gen2::@4: scope:[sin16s_gen2] from sin16s_gen2::@3 - [147] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 - [148] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 - [149] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 - [150] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD - [151] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 - [152] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 - [153] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 + [148] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 + [149] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 + [150] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 + [151] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD + [152] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 + [153] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 + [154] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 to:sin16s_gen2::@return sin16s_gen2::@return: scope:[sin16s_gen2] from sin16s_gen2::@4 - [154] return + [155] return to:@return sin16s: scope:[sin16s] from sin16s_gen2::@1 - [155] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 + [156] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 to:sin16s::@4 sin16s::@4: scope:[sin16s] from sin16s - [156] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 + [157] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 to:sin16s::@1 sin16s::@1: scope:[sin16s] from sin16s sin16s::@4 - [157] (byte) sin16s::isUpper#2 ← phi( sin16s/(byte) 0 sin16s::@4/(byte) 1 ) - [157] (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#0 sin16s::@4/(dword) sin16s::x#1 ) - [158] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 + [158] (byte) sin16s::isUpper#2 ← phi( sin16s/(byte) 0 sin16s::@4/(byte) 1 ) + [158] (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#0 sin16s::@4/(dword) sin16s::x#1 ) + [159] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 to:sin16s::@5 sin16s::@5: scope:[sin16s] from sin16s::@1 - [159] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 + [160] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 to:sin16s::@2 sin16s::@2: scope:[sin16s] from sin16s::@1 sin16s::@5 - [160] (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 ) - [161] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 - [162] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 - [163] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 - [164] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 - [165] call mulu16_sel - [166] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 + [161] (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 ) + [162] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 + [163] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 + [164] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 + [165] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 + [166] call mulu16_sel + [167] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 to:sin16s::@7 sin16s::@7: scope:[sin16s] from sin16s::@2 - [167] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 - [168] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 - [169] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 - [170] call mulu16_sel - [171] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 + [168] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 + [169] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 + [170] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 + [171] call mulu16_sel + [172] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 to:sin16s::@8 sin16s::@8: scope:[sin16s] from sin16s::@7 - [172] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 - [173] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 - [174] call mulu16_sel - [175] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 + [173] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 + [174] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 + [175] call mulu16_sel + [176] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 to:sin16s::@9 sin16s::@9: scope:[sin16s] from sin16s::@8 - [176] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 - [177] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 - [178] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 - [179] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 - [180] call mulu16_sel - [181] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 + [177] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 + [178] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 + [179] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 + [180] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 + [181] call mulu16_sel + [182] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 to:sin16s::@10 sin16s::@10: scope:[sin16s] from sin16s::@9 - [182] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 - [183] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 - [184] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 - [185] call mulu16_sel - [186] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 + [183] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 + [184] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 + [185] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 + [186] call mulu16_sel + [187] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 to:sin16s::@11 sin16s::@11: scope:[sin16s] from sin16s::@10 - [187] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 - [188] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 - [189] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 - [190] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 + [188] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 + [189] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 + [190] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 + [191] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 to:sin16s::@6 sin16s::@6: scope:[sin16s] from sin16s::@11 - [191] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 + [192] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 to:sin16s::@3 sin16s::@3: scope:[sin16s] from sin16s::@12 sin16s::@6 - [192] (signed word) sin16s::return#1 ← phi( sin16s::@12/(signed word~) sin16s::return#5 sin16s::@6/(signed word) sin16s::sinx#1 ) + [193] (signed word) sin16s::return#1 ← phi( sin16s::@12/(signed word~) sin16s::return#5 sin16s::@6/(signed word) sin16s::sinx#1 ) to:sin16s::@return sin16s::@return: scope:[sin16s] from sin16s::@3 - [193] return + [194] return to:@return sin16s::@12: scope:[sin16s] from sin16s::@11 - [194] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 + [195] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 to:sin16s::@3 mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 - [195] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) - [195] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) - [195] (word) mulu16_sel::v1#5 ← phi( sin16s::@9/(word) mulu16_sel::v1#3 sin16s::@10/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@7/(word) mulu16_sel::v1#1 sin16s::@8/(word) mulu16_sel::v1#2 ) - [196] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 - [197] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 - [198] call mul16u - [199] (dword) mul16u::return#3 ← (dword) mul16u::res#2 + [196] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) + [196] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) + [196] (word) mulu16_sel::v1#5 ← phi( sin16s::@9/(word) mulu16_sel::v1#3 sin16s::@10/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@7/(word) mulu16_sel::v1#1 sin16s::@8/(word) mulu16_sel::v1#2 ) + [197] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 + [198] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 + [199] call mul16u + [200] (dword) mul16u::return#3 ← (dword) mul16u::res#2 to:mulu16_sel::@1 mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel - [200] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 - [201] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 - [202] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 + [201] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 + [202] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 + [203] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 to:mulu16_sel::@return mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 - [203] return + [204] return to:@return div32u16u: scope:[div32u16u] from sin16s_gen2 - [204] phi() - [205] call divr16u - [206] (word) divr16u::return#2 ← (word) divr16u::return#0 + [205] phi() + [206] call divr16u + [207] (word) divr16u::return#2 ← (word) divr16u::return#0 to:div32u16u::@1 div32u16u::@1: scope:[div32u16u] from div32u16u - [207] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 - [208] (word) divr16u::rem#4 ← (word) rem16u#1 - [209] call divr16u - [210] (word) divr16u::return#3 ← (word) divr16u::return#0 + [208] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [209] (word) divr16u::rem#4 ← (word) rem16u#1 + [210] call divr16u + [211] (word) divr16u::return#3 ← (word) divr16u::return#0 to:div32u16u::@2 div32u16u::@2: scope:[div32u16u] from div32u16u::@1 - [211] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 - [212] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + [212] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [213] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 to:div32u16u::@return div32u16u::@return: scope:[div32u16u] from div32u16u::@2 - [213] return + [214] return to:@return divr16u: scope:[divr16u] from div32u16u div32u16u::@1 - [214] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) - [214] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) + [215] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) + [215] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) to:divr16u::@1 divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 - [215] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) - [215] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) - [215] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) - [215] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) - [216] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 - [217] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 - [218] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 - [219] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + [216] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) + [216] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) + [216] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [216] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [217] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [218] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [219] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [220] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 to:divr16u::@4 divr16u::@4: scope:[divr16u] from divr16u::@1 - [220] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + [221] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 to:divr16u::@2 divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 - [221] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) - [222] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 - [223] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 - [224] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 + [222] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [223] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [224] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [225] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 to:divr16u::@5 divr16u::@5: scope:[divr16u] from divr16u::@2 - [225] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 - [226] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 + [226] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [227] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 to:divr16u::@3 divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 - [227] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) - [227] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) - [228] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 - [229] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + [228] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [228] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [229] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [230] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 to:divr16u::@6 divr16u::@6: scope:[divr16u] from divr16u::@3 - [230] (word) rem16u#1 ← (word) divr16u::rem#11 + [231] (word) rem16u#1 ← (word) divr16u::rem#11 to:divr16u::@return divr16u::@return: scope:[divr16u] from divr16u::@6 - [231] return + [232] return to:@return irq: scope:[irq] from - [232] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 - [233] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 + [233] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 + [234] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 to:irq::@2 irq::@2: scope:[irq] from irq - [234] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 + [235] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 to:irq::@1 irq::@1: scope:[irq] from irq irq::@2 - [235] (byte) frame_cnt#2 ← phi( irq/(byte) frame_cnt#0 irq::@2/(byte) frame_cnt#1 ) - [236] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 - [237] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + [236] (byte) frame_cnt#2 ← phi( irq/(byte) frame_cnt#0 irq::@2/(byte) frame_cnt#1 ) + [237] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 + [238] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 to:irq::@return irq::@return: scope:[irq] from irq::@1 - [238] return + [239] return to:@return @@ -3800,7 +3830,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (signed dword) main::ypos#0 22.0 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (byte) memset::c -(byte) memset::c#3 1.5714285714285714 +(byte) memset::c#3 1.375 (byte*) memset::dst (byte*) memset::dst#1 16.5 (byte*) memset::dst#2 17.5 @@ -3811,7 +3841,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (word) memset::num#2 2.0 (void*) memset::return (void*) memset::str -(void*) memset::str#2 +(void*) memset::str#3 (signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) (word~) mul16s::$13 4.0 (word~) mul16s::$16 4.0 @@ -3955,8 +3985,8 @@ Initial phi equivalence classes [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] -[ memset::str#2 ] [ memset::num#2 ] +[ memset::str#3 ] [ memset::c#3 ] [ memset::dst#2 memset::dst#3 memset::dst#1 ] [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] @@ -4057,8 +4087,8 @@ Complete equivalence classes [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] -[ memset::str#2 ] [ memset::num#2 ] +[ memset::str#3 ] [ memset::c#3 ] [ memset::dst#2 memset::dst#3 memset::dst#1 ] [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] @@ -4158,8 +4188,8 @@ Allocated zp ZP_WORD:19 [ mul16u::b#1 ] Allocated zp ZP_WORD:21 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] Allocated zp ZP_DWORD:23 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] Allocated zp ZP_DWORD:27 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] -Allocated zp ZP_WORD:31 [ memset::str#2 ] -Allocated zp ZP_WORD:33 [ memset::num#2 ] +Allocated zp ZP_WORD:31 [ memset::num#2 ] +Allocated zp ZP_WORD:33 [ memset::str#3 ] Allocated zp ZP_BYTE:35 [ memset::c#3 ] Allocated zp ZP_WORD:36 [ memset::dst#2 memset::dst#3 memset::dst#1 ] Allocated zp ZP_BYTE:38 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] @@ -4345,7 +4375,7 @@ main: { .label _34 = $49 .label _35 = $5d // [6] call sin16s_gen2 - // [136] phi from main to sin16s_gen2 [phi:main->sin16s_gen2] + // [137] phi from main to sin16s_gen2 [phi:main->sin16s_gen2] sin16s_gen2_from_main: jsr sin16s_gen2 // [7] phi from main to main::@9 [phi:main->main::@9] @@ -4354,7 +4384,7 @@ main: { // main::@9 b9: // [8] call bitmap_init - // [114] phi from main::@9 to bitmap_init [phi:main::@9->bitmap_init] + // [115] phi from main::@9 to bitmap_init [phi:main::@9->bitmap_init] bitmap_init_from_b9: jsr bitmap_init // [9] phi from main::@9 to main::@10 [phi:main::@9->main::@10] @@ -5054,16 +5084,16 @@ bitmap_clear: { // [106] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuz1=vbuc1 lda #col sta memset.c - // [106] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 - lda #<$3e8 - sta memset.num - lda #>$3e8 - sta memset.num+1 - // [106] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + // [106] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 + // [106] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#2] -- vwuz1=vwuc1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 jsr memset // [103] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] b1_from_bitmap_clear: @@ -5076,16 +5106,16 @@ bitmap_clear: { // [106] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuz1=vbuc1 lda #0 sta memset.c - // [106] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 - lda #<$1f40 - sta memset.num - lda #>$1f40 - sta memset.num+1 - // [106] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + // [106] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1 lda #<BITMAP sta memset.str lda #>BITMAP sta memset.str+1 + // [106] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#2] -- vwuz1=vwuc1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 jsr memset jmp breturn // bitmap_clear::@return @@ -5095,14 +5125,22 @@ bitmap_clear: { } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage($1f) str, byte zeropage($23) c, word zeropage($21) num) +// memset(void* zeropage($21) str, byte zeropage($23) c, word zeropage($1f) num) memset: { .label end = $8a .label dst = $24 - .label str = $1f - .label num = $21 + .label num = $1f + .label str = $21 .label c = $23 - // [107] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz3 + // [107] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 + lda num + beq breturn + lda num+1 + beq breturn + jmp b1 + // memset::@1 + b1: + // [108] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz3 lda str clc adc num @@ -5110,38 +5148,38 @@ memset: { lda str+1 adc num+1 sta end+1 - // [108] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 -- pbuz1=pbuz2 + // [109] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 -- pbuz1=pbuz2 lda str sta dst lda str+1 sta dst+1 - // [109] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - b1_from_memset: - b1_from_b1: - // [109] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - jmp b1 - // memset::@1 - b1: - // [110] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuz2 + // [110] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + b2_from_b1: + b2_from_b2: + // [110] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + jmp b2 + // memset::@2 + b2: + // [111] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuz2 lda c ldy #0 sta (dst),y - // [111] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [112] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [112] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [113] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1_from_b1 + bne b2_from_b2 lda dst cmp end - bne b1_from_b1 + bne b2_from_b2 jmp breturn // memset::@return breturn: - // [113] return + // [114] return rts } // bitmap_init @@ -5155,103 +5193,103 @@ bitmap_init: { .label x = $27 .label y = $28 .label yoffs = $29 - // [115] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + // [116] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] b1_from_bitmap_init: - // [115] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuz1=vbuc1 + // [116] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuz1=vbuc1 lda #0 sta x - // [115] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuz1=vbuc1 + // [116] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuz1=vbuc1 lda #$80 sta bits jmp b1 - // [115] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + // [116] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] b1_from_b2: - // [115] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - // [115] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + // [116] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + // [116] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy jmp b1 // bitmap_init::@1 b1: - // [116] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuz1=vbuz2 + // [117] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuz1=vbuz2 lda bits ldy x sta bitmap_plot_bit,y - // [117] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuz1=vbuz1_ror_1 + // [118] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuz1=vbuz1_ror_1 lsr bits - // [118] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuz1_neq_0_then_la1 + // [119] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuz1_neq_0_then_la1 lda bits cmp #0 bne b6_from_b1 - // [120] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + // [121] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] b2_from_b1: - // [120] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuz1=vbuc1 + // [121] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuz1=vbuc1 lda #$80 sta bits jmp b2 - // [119] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + // [120] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] b6_from_b1: jmp b6 // bitmap_init::@6 b6: - // [120] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + // [121] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] b2_from_b6: - // [120] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + // [121] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy jmp b2 // bitmap_init::@2 b2: - // [121] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuz1=_inc_vbuz1 + // [122] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuz1=_inc_vbuz1 inc x - // [122] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuz1_neq_0_then_la1 + // [123] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuz1_neq_0_then_la1 lda x cmp #0 bne b1_from_b2 - // [123] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + // [124] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] b3_from_b2: - // [123] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + // [124] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #<BITMAP sta yoffs lda #>BITMAP sta yoffs+1 - // [123] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuz1=vbuc1 + // [124] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuz1=vbuc1 lda #0 sta y jmp b3 - // [123] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + // [124] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] b3_from_b4: - // [123] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - // [123] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + // [124] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + // [124] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy jmp b3 // bitmap_init::@3 b3: - // [124] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 + // [125] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 lda #7 and y sta _7 - // [125] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuz1=_lo_pbuz2 + // [126] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuz1=_lo_pbuz2 lda yoffs sta _4 - // [126] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuz1=vbuz2_bor_vbuz3 + // [127] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuz1=vbuz2_bor_vbuz3 lda _7 ora _4 sta _5 - // [127] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuz1=vbuz2 + // [128] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuz1=vbuz2 lda _5 ldy y sta bitmap_plot_ylo,y - // [128] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuz1=_hi_pbuz2 + // [129] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuz1=_hi_pbuz2 lda yoffs+1 sta _6 - // [129] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuz1=vbuz2 + // [130] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuz1=vbuz2 lda _6 ldy y sta bitmap_plot_yhi,y - // [130] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + // [131] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp _7 bne b4_from_b3 jmp b5 // bitmap_init::@5 b5: - // [131] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + // [132] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda yoffs adc #<$28*8 @@ -5259,23 +5297,23 @@ bitmap_init: { lda yoffs+1 adc #>$28*8 sta yoffs+1 - // [132] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + // [133] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] b4_from_b3: b4_from_b5: - // [132] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + // [133] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy jmp b4 // bitmap_init::@4 b4: - // [133] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuz1=_inc_vbuz1 + // [134] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuz1=_inc_vbuz1 inc y - // [134] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuz1_neq_0_then_la1 + // [135] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuz1_neq_0_then_la1 lda y cmp #0 bne b3_from_b4 jmp breturn // bitmap_init::@return breturn: - // [135] return + // [136] return rts } // sin16s_gen2 @@ -5294,11 +5332,11 @@ sin16s_gen2: { .label sintab = $2f .label x = $2b .label i = $31 - // [137] call div32u16u - // [204] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] + // [138] call div32u16u + // [205] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] div32u16u_from_sin16s_gen2: jsr div32u16u - // [138] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 -- vduz1=vduz2 + // [139] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 -- vduz1=vduz2 lda div32u16u.return sta div32u16u.return_2 lda div32u16u.return+1 @@ -5310,7 +5348,7 @@ sin16s_gen2: { jmp b2 // sin16s_gen2::@2 b2: - // [139] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 -- vduz1=vduz2 + // [140] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 -- vduz1=vduz2 lda div32u16u.return_2 sta step lda div32u16u.return_2+1 @@ -5319,19 +5357,19 @@ sin16s_gen2: { sta step+2 lda div32u16u.return_2+3 sta step+3 - // [140] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] + // [141] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] b1_from_b2: - // [140] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 + // [141] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 lda #<0 sta i lda #>0 sta i+1 - // [140] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) SINUS#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 + // [141] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) SINUS#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 lda #<SINUS sta sintab lda #>SINUS sta sintab+1 - // [140] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 + // [141] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 lda #0 sta x lda #0 @@ -5340,15 +5378,15 @@ sin16s_gen2: { sta x+3 jmp b1 // u[4.28] - // [140] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] + // [141] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] b1_from_b4: - // [140] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy - // [140] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy - // [140] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy + // [141] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy + // [141] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy + // [141] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy jmp b1 // sin16s_gen2::@1 b1: - // [141] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 + // [142] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 lda x sta sin16s.x lda x+1 @@ -5357,9 +5395,9 @@ sin16s_gen2: { sta sin16s.x+2 lda x+3 sta sin16s.x+3 - // [142] call sin16s + // [143] call sin16s jsr sin16s - // [143] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 -- vwsz1=vwsz2 + // [144] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 -- vwsz1=vwsz2 lda sin16s.return_1 sta sin16s.return lda sin16s.return_1+1 @@ -5367,12 +5405,12 @@ sin16s_gen2: { jmp b3 // sin16s_gen2::@3 b3: - // [144] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 -- vwsz1=vwsz2 + // [145] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 -- vwsz1=vwsz2 lda sin16s.return sta mul16s.a lda sin16s.return+1 sta mul16s.a+1 - // [145] call mul16s + // [146] call mul16s // [63] phi from sin16s_gen2::@3 to mul16s [phi:sin16s_gen2::@3->mul16s] mul16s_from_b3: // [63] phi (signed word) mul16s::b#3 = (const signed word) sin16s_gen2::ampl#0 [phi:sin16s_gen2::@3->mul16s#0] -- vwsz1=vwsc1 @@ -5382,7 +5420,7 @@ sin16s_gen2: { sta mul16s.b+1 // [63] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#0 [phi:sin16s_gen2::@3->mul16s#1] -- register_copy jsr mul16s - // [146] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 -- vdsz1=vdsz2 + // [147] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 -- vdsz1=vdsz2 lda mul16s.return sta mul16s.return_2 lda mul16s.return+1 @@ -5394,7 +5432,7 @@ sin16s_gen2: { jmp b4 // sin16s_gen2::@4 b4: - // [147] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 -- vdsz1=vdsz2 + // [148] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 -- vdsz1=vdsz2 lda mul16s.return_2 sta _5 lda mul16s.return_2+1 @@ -5403,19 +5441,19 @@ sin16s_gen2: { sta _5+2 lda mul16s.return_2+3 sta _5+3 - // [148] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 + // [149] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 lda _5+2 sta _8 lda _5+3 sta _8+1 - // [149] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 -- _deref_pwsz1=vwsz2 + // [150] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 -- _deref_pwsz1=vwsz2 ldy #0 lda _8 sta (sintab),y iny lda _8+1 sta (sintab),y - // [150] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 + // [151] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 lda #SIZEOF_SIGNED_WORD clc adc sintab @@ -5423,7 +5461,7 @@ sin16s_gen2: { bcc !+ inc sintab+1 !: - // [151] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 + // [152] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 lda x clc adc step @@ -5437,12 +5475,12 @@ sin16s_gen2: { lda x+3 adc step+3 sta x+3 - // [152] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 + // [153] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 inc i bne !+ inc i+1 !: - // [153] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 + // [154] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 lda i+1 cmp #>wavelength bcc b1_from_b4 @@ -5454,7 +5492,7 @@ sin16s_gen2: { jmp breturn // sin16s_gen2::@return breturn: - // [154] return + // [155] return rts } // sin16s @@ -5479,7 +5517,7 @@ sin16s: { .label sinx = $38 .label isUpper = $33 .label return_5 = $38 - // [155] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 + // [156] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_u4f28>>$10 bcc b1_from_sin16s @@ -5499,7 +5537,7 @@ sin16s: { jmp b4 // sin16s::@4 b4: - // [156] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 -- vduz1=vduz1_minus_vduc1 + // [157] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 -- vduz1=vduz1_minus_vduc1 lda x sec sbc #<PI_u4f28 @@ -5513,23 +5551,23 @@ sin16s: { lda x+3 sbc #>PI_u4f28>>$10 sta x+3 - // [157] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] + // [158] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] b1_from_b4: - // [157] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 + // [158] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 lda #1 sta isUpper - // [157] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy + // [158] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy jmp b1 - // [157] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] + // [158] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] b1_from_sin16s: - // [157] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 + // [158] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 lda #0 sta isUpper - // [157] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy + // [158] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy jmp b1 // sin16s::@1 b1: - // [158] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 + // [159] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_HALF_u4f28>>$10 bcc b2_from_b1 @@ -5549,7 +5587,7 @@ sin16s: { jmp b5 // sin16s::@5 b5: - // [159] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 -- vduz1=vduc1_minus_vduz1 + // [160] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 -- vduz1=vduc1_minus_vduz1 lda #<PI_u4f28 sec sbc x @@ -5563,14 +5601,14 @@ sin16s: { lda #>PI_u4f28>>$10 sbc x+3 sta x+3 - // [160] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] + // [161] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] b2_from_b1: b2_from_b5: - // [160] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy + // [161] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy jmp b2 // sin16s::@2 b2: - // [161] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz2_rol_3 + // [162] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz2_rol_3 lda x sta _4 lda x+1 @@ -5587,31 +5625,31 @@ sin16s: { rol _4+3 dey bne !- - // [162] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 + // [163] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 lda _4+2 sta x1 lda _4+3 sta x1+1 - // [163] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [164] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v1 lda x1+1 sta mulu16_sel.v1+1 - // [164] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [165] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [165] call mulu16_sel - // [195] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] + // [166] call mulu16_sel + // [196] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] mulu16_sel_from_b2: - // [195] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuz1=vbuc1 + // [196] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuz1=vbuc1 lda #0 sta mulu16_sel.select - // [195] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy - // [195] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy + // [196] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy + // [196] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy jsr mulu16_sel - // [166] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + // [167] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return_12 sta mulu16_sel.return lda mulu16_sel.return_12+1 @@ -5619,31 +5657,31 @@ sin16s: { jmp b7 // sin16s::@7 b7: - // [167] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 + // [168] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 lda mulu16_sel.return sta x2 lda mulu16_sel.return+1 sta x2+1 - // [168] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 -- vwuz1=vwuz2 + // [169] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 -- vwuz1=vwuz2 lda x2 sta mulu16_sel.v1 lda x2+1 sta mulu16_sel.v1+1 - // [169] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [170] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [170] call mulu16_sel - // [195] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] + // [171] call mulu16_sel + // [196] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] mulu16_sel_from_b7: - // [195] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuz1=vbuc1 + // [196] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuz1=vbuc1 lda #1 sta mulu16_sel.select - // [195] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy - // [195] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy + // [196] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy + // [196] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy jsr mulu16_sel - // [171] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + // [172] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return_12 sta mulu16_sel.return_1 lda mulu16_sel.return_12+1 @@ -5651,30 +5689,30 @@ sin16s: { jmp b8 // sin16s::@8 b8: - // [172] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 -- vwuz1=vwuz2 + // [173] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 -- vwuz1=vwuz2 lda mulu16_sel.return_1 sta x3 lda mulu16_sel.return_1+1 sta x3+1 - // [173] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 -- vwuz1=vwuz2 + // [174] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 -- vwuz1=vwuz2 lda x3 sta mulu16_sel.v1 lda x3+1 sta mulu16_sel.v1+1 - // [174] call mulu16_sel - // [195] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] + // [175] call mulu16_sel + // [196] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] mulu16_sel_from_b8: - // [195] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuz1=vbuc1 + // [196] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuz1=vbuc1 lda #1 sta mulu16_sel.select - // [195] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 + // [196] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 lda #<$10000/6 sta mulu16_sel.v2 lda #>$10000/6 sta mulu16_sel.v2+1 - // [195] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy + // [196] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy jsr mulu16_sel - // [175] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + // [176] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return_12 sta mulu16_sel.return_2 lda mulu16_sel.return_12+1 @@ -5682,12 +5720,12 @@ sin16s: { jmp b9 // sin16s::@9 b9: - // [176] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 -- vwuz1=vwuz2 + // [177] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 -- vwuz1=vwuz2 lda mulu16_sel.return_2 sta x3_6 lda mulu16_sel.return_2+1 sta x3_6+1 - // [177] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 + // [178] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 lda x1 sec sbc x3_6 @@ -5695,26 +5733,26 @@ sin16s: { lda x1+1 sbc x3_6+1 sta usinx+1 - // [178] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 -- vwuz1=vwuz2 + // [179] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 -- vwuz1=vwuz2 lda x3 sta mulu16_sel.v1 lda x3+1 sta mulu16_sel.v1+1 - // [179] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [180] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [180] call mulu16_sel - // [195] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] + // [181] call mulu16_sel + // [196] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] mulu16_sel_from_b9: - // [195] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuz1=vbuc1 + // [196] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuz1=vbuc1 lda #0 sta mulu16_sel.select - // [195] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy - // [195] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy + // [196] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy + // [196] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy jsr mulu16_sel - // [181] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + // [182] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return_12 sta mulu16_sel.return_10 lda mulu16_sel.return_12+1 @@ -5722,31 +5760,31 @@ sin16s: { jmp b10 // sin16s::@10 b10: - // [182] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 -- vwuz1=vwuz2 + // [183] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 -- vwuz1=vwuz2 lda mulu16_sel.return_10 sta x4 lda mulu16_sel.return_10+1 sta x4+1 - // [183] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 -- vwuz1=vwuz2 + // [184] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 -- vwuz1=vwuz2 lda x4 sta mulu16_sel.v1 lda x4+1 sta mulu16_sel.v1+1 - // [184] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [185] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [185] call mulu16_sel - // [195] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] + // [186] call mulu16_sel + // [196] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] mulu16_sel_from_b10: - // [195] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuz1=vbuc1 + // [196] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuz1=vbuc1 lda #0 sta mulu16_sel.select - // [195] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy - // [195] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy + // [196] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy + // [196] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy jsr mulu16_sel - // [186] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + // [187] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return_12 sta mulu16_sel.return_11 lda mulu16_sel.return_12+1 @@ -5754,12 +5792,12 @@ sin16s: { jmp b11 // sin16s::@11 b11: - // [187] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 -- vwuz1=vwuz2 + // [188] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 -- vwuz1=vwuz2 lda mulu16_sel.return_11 sta x5 lda mulu16_sel.return_11+1 sta x5+1 - // [188] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz2_ror_4 + // [189] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz2_ror_4 lda x5+1 lsr sta x5_128+1 @@ -5772,7 +5810,7 @@ sin16s: { ror x5_128 lsr x5_128+1 ror x5_128 - // [189] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz2_plus_vwuz3 + // [190] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz2_plus_vwuz3 lda usinx clc adc x5_128 @@ -5780,14 +5818,14 @@ sin16s: { lda usinx+1 adc x5_128+1 sta usinx_1+1 - // [190] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 + // [191] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 lda isUpper cmp #0 beq b12 jmp b6 // sin16s::@6 b6: - // [191] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz2 + // [192] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz2 sec lda #0 sbc usinx_1 @@ -5795,21 +5833,21 @@ sin16s: { lda #0 sbc usinx_1+1 sta sinx+1 - // [192] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] + // [193] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] b3_from_b12: b3_from_b6: - // [192] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy + // [193] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy jmp b3 // sin16s::@3 b3: jmp breturn // sin16s::@return breturn: - // [193] return + // [194] return rts // sin16s::@12 b12: - // [194] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 -- vwsz1=vwsz2 + // [195] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 -- vwsz1=vwsz2 lda usinx_1 sta return_5 lda usinx_1+1 @@ -5832,17 +5870,17 @@ mulu16_sel: { .label return_11 = $bc .label select = $3e .label return_12 = $d0 - // [196] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 + // [197] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 lda v1 sta mul16u.a lda v1+1 sta mul16u.a+1 - // [197] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 -- vwuz1=vwuz2 + // [198] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 -- vwuz1=vwuz2 lda v2 sta mul16u.b_1 lda v2+1 sta mul16u.b_1+1 - // [198] call mul16u + // [199] call mul16u // [81] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u] mul16u_from_mulu16_sel: // [81] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy @@ -5855,7 +5893,7 @@ mulu16_sel: { sta mul16u.mb+2 sta mul16u.mb+3 jsr mul16u - // [199] (dword) mul16u::return#3 ← (dword) mul16u::res#2 -- vduz1=vduz2 + // [200] (dword) mul16u::return#3 ← (dword) mul16u::res#2 -- vduz1=vduz2 lda mul16u.res sta mul16u.return_3 lda mul16u.res+1 @@ -5867,7 +5905,7 @@ mulu16_sel: { jmp b1 // mulu16_sel::@1 b1: - // [200] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 -- vduz1=vduz2 + // [201] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 -- vduz1=vduz2 lda mul16u.return_3 sta _0 lda mul16u.return_3+1 @@ -5876,7 +5914,7 @@ mulu16_sel: { sta _0+2 lda mul16u.return_3+3 sta _0+3 - // [201] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz2_rol_vbuz3 + // [202] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz2_rol_vbuz3 lda _0 sta _1 lda _0+1 @@ -5895,7 +5933,7 @@ mulu16_sel: { dex bne !- !e: - // [202] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 + // [203] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 lda _1+2 sta return_12 lda _1+3 @@ -5903,7 +5941,7 @@ mulu16_sel: { jmp breturn // mulu16_sel::@return breturn: - // [203] return + // [204] return rts } // div32u16u @@ -5914,21 +5952,21 @@ div32u16u: { .label quotient_lo = $d8 .label return = $da .label return_2 = $90 - // [205] call divr16u - // [214] phi from div32u16u to divr16u [phi:div32u16u->divr16u] + // [206] call divr16u + // [215] phi from div32u16u to divr16u [phi:div32u16u->divr16u] divr16u_from_div32u16u: - // [214] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 + // [215] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 lda #<PI2_u4f28>>$10 sta divr16u.dividend lda #>PI2_u4f28>>$10 sta divr16u.dividend+1 - // [214] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 + // [215] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 lda #<0 sta divr16u.rem lda #>0 sta divr16u.rem+1 jsr divr16u - // [206] (word) divr16u::return#2 ← (word) divr16u::return#0 -- vwuz1=vwuz2 + // [207] (word) divr16u::return#2 ← (word) divr16u::return#0 -- vwuz1=vwuz2 lda divr16u.return sta divr16u.return_2 lda divr16u.return+1 @@ -5936,27 +5974,27 @@ div32u16u: { jmp b1 // div32u16u::@1 b1: - // [207] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 + // [208] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 lda divr16u.return_2 sta quotient_hi lda divr16u.return_2+1 sta quotient_hi+1 - // [208] (word) divr16u::rem#4 ← (word) rem16u#1 -- vwuz1=vwuz2 + // [209] (word) divr16u::rem#4 ← (word) rem16u#1 -- vwuz1=vwuz2 lda rem16u sta divr16u.rem lda rem16u+1 sta divr16u.rem+1 - // [209] call divr16u - // [214] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] + // [210] call divr16u + // [215] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] divr16u_from_b1: - // [214] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 + // [215] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 lda #<PI2_u4f28&$ffff sta divr16u.dividend lda #>PI2_u4f28&$ffff sta divr16u.dividend+1 - // [214] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy + // [215] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy jsr divr16u - // [210] (word) divr16u::return#3 ← (word) divr16u::return#0 -- vwuz1=vwuz2 + // [211] (word) divr16u::return#3 ← (word) divr16u::return#0 -- vwuz1=vwuz2 lda divr16u.return sta divr16u.return_3 lda divr16u.return+1 @@ -5964,12 +6002,12 @@ div32u16u: { jmp b2 // div32u16u::@2 b2: - // [211] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 -- vwuz1=vwuz2 + // [212] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 -- vwuz1=vwuz2 lda divr16u.return_3 sta quotient_lo lda divr16u.return_3+1 sta quotient_lo+1 - // [212] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 + // [213] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 lda quotient_hi sta return+2 lda quotient_hi+1 @@ -5981,7 +6019,7 @@ div32u16u: { jmp breturn // div32u16u::@return breturn: - // [213] return + // [214] return rts } // divr16u @@ -6000,63 +6038,63 @@ divr16u: { .label return = $43 .label return_2 = $d2 .label return_3 = $d6 - // [215] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + // [216] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] b1_from_divr16u: - // [215] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuz1=vbuc1 + // [216] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuz1=vbuc1 lda #0 sta i - // [215] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + // [216] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 lda #<0 sta quotient lda #>0 sta quotient+1 - // [215] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy - // [215] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy + // [216] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy + // [216] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy jmp b1 - // [215] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + // [216] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] b1_from_b3: - // [215] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy - // [215] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy - // [215] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy - // [215] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + // [216] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + // [216] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + // [216] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + // [216] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy jmp b1 // divr16u::@1 b1: - // [216] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [217] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl rem rol rem+1 - // [217] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuz1=_hi_vwuz2 + // [218] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuz1=_hi_vwuz2 lda dividend+1 sta _1 - // [218] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuz1=vbuz2_band_vbuc1 + // [219] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuz1=vbuz2_band_vbuc1 lda #$80 and _1 sta _2 - // [219] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuz1_eq_0_then_la1 + // [220] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuz1_eq_0_then_la1 lda _2 cmp #0 beq b2_from_b1 jmp b4 // divr16u::@4 b4: - // [220] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 + // [221] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 lda #1 ora rem sta rem - // [221] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + // [222] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] b2_from_b1: b2_from_b4: - // [221] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + // [222] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy jmp b2 // divr16u::@2 b2: - // [222] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [223] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl dividend rol dividend+1 - // [223] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [224] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl quotient rol quotient+1 - // [224] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + // [225] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 lda rem+1 cmp #>sin16s_gen2.wavelength bcc b3_from_b2 @@ -6068,12 +6106,12 @@ divr16u: { jmp b5 // divr16u::@5 b5: - // [225] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 + // [226] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 inc quotient bne !+ inc quotient+1 !: - // [226] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 -- vwuz1=vwuz1_minus_vwuc1 + // [227] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 -- vwuz1=vwuz1_minus_vwuc1 lda rem sec sbc #<sin16s_gen2.wavelength @@ -6081,24 +6119,24 @@ divr16u: { lda rem+1 sbc #>sin16s_gen2.wavelength sta rem+1 - // [227] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + // [228] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] b3_from_b2: b3_from_b5: - // [227] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy - // [227] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + // [228] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + // [228] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy jmp b3 // divr16u::@3 b3: - // [228] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuz1=_inc_vbuz1 + // [229] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuz1=_inc_vbuz1 inc i - // [229] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuz1_neq_vbuc1_then_la1 + // [230] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp i bne b1_from_b3 jmp b6 // divr16u::@6 b6: - // [230] (word) rem16u#1 ← (word) divr16u::rem#11 -- vwuz1=vwuz2 + // [231] (word) rem16u#1 ← (word) divr16u::rem#11 -- vwuz1=vwuz2 lda rem sta rem16u lda rem+1 @@ -6106,7 +6144,7 @@ divr16u: { jmp breturn // divr16u::@return breturn: - // [231] return + // [232] return rts } // irq @@ -6116,36 +6154,36 @@ irq: { sta rega+1 stx regx+1 sty regy+1 - // [232] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + // [233] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 lda #WHITE sta BGCOL - // [233] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 + // [234] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp frame_cnt beq b1_from_irq jmp b2 // irq::@2 b2: - // [234] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 + // [235] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 inc frame_cnt - // [235] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] + // [236] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] b1_from_irq: b1_from_b2: - // [235] phi (byte) frame_cnt#2 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy + // [236] phi (byte) frame_cnt#2 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy jmp b1 // irq::@1 b1: - // [236] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 + // [237] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 lda #BLACK sta BGCOL - // [237] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // [238] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS jmp breturn // irq::@return breturn: - // [238] return - exit interrupt(HARDWARE_CLOBBER) + // [239] return - exit interrupt(HARDWARE_CLOBBER) rega: lda #00 regx: @@ -6208,24 +6246,24 @@ Statement [58] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#0 & (word) $fff Statement [59] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$1 [ bitmap_plot::x#0 bitmap_plot::plotter#1 ] ( main:3::bitmap_plot:40 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 bitmap_plot::plotter#1 ] ) always clobbers reg byte a Statement [60] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#0 [ bitmap_plot::plotter#1 bitmap_plot::$2 ] ( main:3::bitmap_plot:40 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::plotter#1 bitmap_plot::$2 ] ) always clobbers reg byte a Statement [61] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) [ ] ( main:3::bitmap_plot:40 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 ] ) always clobbers reg byte a reg byte y -Statement [64] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#3 [ mul16s::a#3 mul16s::b#3 mul16u::a#1 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] ) always clobbers reg byte a -Statement [65] (word) mul16u::b#0 ← (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] ) always clobbers reg byte a -Statement [67] (dword) mul16u::return#2 ← (dword) mul16u::res#2 [ mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ) always clobbers reg byte a -Statement [68] (dword) mul16s::m#0 ← (dword) mul16u::return#2 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a -Statement [69] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a -Statement [70] (word~) mul16s::$9 ← > (dword) mul16s::m#0 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ) always clobbers reg byte a -Statement [71] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ) always clobbers reg byte a -Statement [72] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 [ mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ) always clobbers reg byte a -Statement [74] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 [ mul16s::a#3 mul16s::m#5 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::m#5 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::m#5 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 ] ) always clobbers reg byte a -Statement [75] (word~) mul16s::$13 ← > (dword) mul16s::m#5 [ mul16s::a#3 mul16s::m#5 mul16s::$13 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 mul16s::$13 ] ) always clobbers reg byte a -Statement [76] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 [ mul16s::m#5 mul16s::$17 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::m#5 mul16s::$17 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::m#5 mul16s::$17 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#5 mul16s::$17 ] ) always clobbers reg byte a -Statement [77] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 [ mul16s::m#2 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::m#2 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::m#2 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#2 ] ) always clobbers reg byte a -Statement [79] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 [ mul16s::return#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::return#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::return#0 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#0 ] ) always clobbers reg byte a -Statement [83] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ( main:3::mul16s:21::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::mul16s:32::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::mul16s:145::mul16u:66 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:165::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:170::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:174::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:180::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:185::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ) always clobbers reg byte a +Statement [64] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#3 [ mul16s::a#3 mul16s::b#3 mul16u::a#1 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] ) always clobbers reg byte a +Statement [65] (word) mul16u::b#0 ← (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] ) always clobbers reg byte a +Statement [67] (dword) mul16u::return#2 ← (dword) mul16u::res#2 [ mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ) always clobbers reg byte a +Statement [68] (dword) mul16s::m#0 ← (dword) mul16u::return#2 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a +Statement [69] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a +Statement [70] (word~) mul16s::$9 ← > (dword) mul16s::m#0 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ) always clobbers reg byte a +Statement [71] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ) always clobbers reg byte a +Statement [72] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 [ mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ) always clobbers reg byte a +Statement [74] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 [ mul16s::a#3 mul16s::m#5 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::m#5 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::m#5 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 ] ) always clobbers reg byte a +Statement [75] (word~) mul16s::$13 ← > (dword) mul16s::m#5 [ mul16s::a#3 mul16s::m#5 mul16s::$13 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 mul16s::$13 ] ) always clobbers reg byte a +Statement [76] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 [ mul16s::m#5 mul16s::$17 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::m#5 mul16s::$17 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::m#5 mul16s::$17 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#5 mul16s::$17 ] ) always clobbers reg byte a +Statement [77] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 [ mul16s::m#2 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::m#2 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::m#2 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#2 ] ) always clobbers reg byte a +Statement [79] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 [ mul16s::return#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::return#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::return#0 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#0 ] ) always clobbers reg byte a +Statement [83] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ( main:3::mul16s:21::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::mul16s:32::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::mul16s:146::mul16u:66 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:166::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:171::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:175::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:181::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:186::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:51 [ sin16s::isUpper#2 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:62 [ mulu16_sel::select#5 ] -Statement [85] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ( main:3::mul16s:21::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::mul16s:32::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::mul16s:145::mul16u:66 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:165::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:170::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:174::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:180::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:185::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a -Statement [87] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ( main:3::mul16s:21::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::mul16s:32::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::mul16s:145::mul16u:66 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:165::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:170::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:174::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:180::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:185::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ) always clobbers reg byte a +Statement [85] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ( main:3::mul16s:21::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::mul16s:32::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::mul16s:146::mul16u:66 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:166::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:171::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:175::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:181::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:186::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a +Statement [87] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ( main:3::mul16s:21::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::mul16s:32::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::mul16s:146::mul16u:66 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:166::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:171::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:175::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:181::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:186::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ) always clobbers reg byte a Statement [92] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [93] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [94] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a @@ -6233,80 +6271,81 @@ Statement [95] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) Statement [96] *((const byte*) RASTER#0) ← (byte) 0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [97] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [98] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [107] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:3::bitmap_clear:10::memset:102 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] main:3::bitmap_clear:10::memset:104 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [107] if((word) memset::num#2<=(byte) 0) goto memset::@return [ memset::num#2 memset::str#3 memset::c#3 ] ( main:3::bitmap_clear:10::memset:102 [ frame_cnt#0 memset::num#2 memset::str#3 memset::c#3 ] main:3::bitmap_clear:10::memset:104 [ frame_cnt#0 memset::num#2 memset::str#3 memset::c#3 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:35 [ memset::c#3 ] -Statement [108] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::bitmap_clear:10::memset:102 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] main:3::bitmap_clear:10::memset:104 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a -Statement [110] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::bitmap_clear:10::memset:102 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] main:3::bitmap_clear:10::memset:104 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [108] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 [ memset::str#3 memset::c#3 memset::end#0 ] ( main:3::bitmap_clear:10::memset:102 [ frame_cnt#0 memset::str#3 memset::c#3 memset::end#0 ] main:3::bitmap_clear:10::memset:104 [ frame_cnt#0 memset::str#3 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [109] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::bitmap_clear:10::memset:102 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] main:3::bitmap_clear:10::memset:104 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [111] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::bitmap_clear:10::memset:102 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] main:3::bitmap_clear:10::memset:104 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:35 [ memset::c#3 ] -Statement [112] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::bitmap_clear:10::memset:102 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] main:3::bitmap_clear:10::memset:104 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a -Statement [131] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:8 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a +Statement [113] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::bitmap_clear:10::memset:102 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] main:3::bitmap_clear:10::memset:104 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [132] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:8 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:40 [ bitmap_init::y#2 bitmap_init::y#1 ] -Statement [138] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ div32u16u::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 div32u16u::return#2 ] ) always clobbers reg byte a -Statement [139] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 [ sin16s_gen2::step#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 ] ) always clobbers reg byte a -Statement [141] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a -Statement [143] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ) always clobbers reg byte a -Statement [144] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 [ mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a -Statement [146] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ) always clobbers reg byte a -Statement [147] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ) always clobbers reg byte a -Statement [148] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$8 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$8 ] ) always clobbers reg byte a -Statement [149] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a reg byte y -Statement [150] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a -Statement [151] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a -Statement [153] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 [ sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ) always clobbers reg byte a -Statement [155] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 [ sin16s::x#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a -Statement [156] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 [ sin16s::x#1 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#1 ] ) always clobbers reg byte a -Statement [158] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 [ sin16s::x#4 sin16s::isUpper#2 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#4 sin16s::isUpper#2 ] ) always clobbers reg byte a -Statement [159] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 [ sin16s::isUpper#2 sin16s::x#2 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x#2 ] ) always clobbers reg byte a -Statement [161] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 [ sin16s::isUpper#2 sin16s::$4 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::$4 ] ) always clobbers reg byte a reg byte y +Statement [139] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ div32u16u::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 div32u16u::return#2 ] ) always clobbers reg byte a +Statement [140] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 [ sin16s_gen2::step#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 ] ) always clobbers reg byte a +Statement [142] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a +Statement [144] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ) always clobbers reg byte a +Statement [145] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 [ mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a +Statement [147] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ) always clobbers reg byte a +Statement [148] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ) always clobbers reg byte a +Statement [149] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$8 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$8 ] ) always clobbers reg byte a +Statement [150] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a reg byte y +Statement [151] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a +Statement [152] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a +Statement [154] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 [ sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ) always clobbers reg byte a +Statement [156] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 [ sin16s::x#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a +Statement [157] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 [ sin16s::x#1 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#1 ] ) always clobbers reg byte a +Statement [159] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 [ sin16s::x#4 sin16s::isUpper#2 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#4 sin16s::isUpper#2 ] ) always clobbers reg byte a +Statement [160] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 [ sin16s::isUpper#2 sin16s::x#2 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x#2 ] ) always clobbers reg byte a +Statement [162] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 [ sin16s::isUpper#2 sin16s::$4 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::$4 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:51 [ sin16s::isUpper#2 ] -Statement [162] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 [ sin16s::isUpper#2 sin16s::x1#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 ] ) always clobbers reg byte a -Statement [163] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ) always clobbers reg byte a -Statement [164] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ) always clobbers reg byte a -Statement [166] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ) always clobbers reg byte a -Statement [167] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ) always clobbers reg byte a -Statement [168] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ) always clobbers reg byte a -Statement [169] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ) always clobbers reg byte a -Statement [171] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ) always clobbers reg byte a -Statement [172] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ) always clobbers reg byte a -Statement [173] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ) always clobbers reg byte a -Statement [175] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ) always clobbers reg byte a -Statement [176] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ) always clobbers reg byte a -Statement [177] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ) always clobbers reg byte a -Statement [178] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ) always clobbers reg byte a -Statement [179] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ) always clobbers reg byte a -Statement [181] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ) always clobbers reg byte a -Statement [182] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ) always clobbers reg byte a -Statement [183] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ) always clobbers reg byte a -Statement [184] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a -Statement [186] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a -Statement [187] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a -Statement [188] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a -Statement [189] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a -Statement [191] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a -Statement [194] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#5 ] ) always clobbers reg byte a -Statement [196] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 [ mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:170 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:174 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:185 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ) always clobbers reg byte a -Statement [197] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 [ mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:170 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:174 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:185 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ) always clobbers reg byte a -Statement [199] (dword) mul16u::return#3 ← (dword) mul16u::res#2 [ mulu16_sel::select#5 mul16u::return#3 ] ( main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:170 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:174 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:185 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] ) always clobbers reg byte a -Statement [200] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 [ mulu16_sel::select#5 mulu16_sel::$0 ] ( main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:170 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:174 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:185 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] ) always clobbers reg byte a -Statement [201] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 [ mulu16_sel::$1 ] ( main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:170 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:174 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:185 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::$1 ] ) always clobbers reg byte a -Statement [202] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 [ mulu16_sel::return#12 ] ( main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:170 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:174 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:185 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#12 ] ) always clobbers reg byte a -Statement [206] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:137 [ frame_cnt#0 divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a -Statement [207] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::quotient_hi#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:137 [ frame_cnt#0 div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a -Statement [208] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ( main:3::sin16s_gen2:6::div32u16u:137 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::rem#4 ] ) always clobbers reg byte a -Statement [210] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:3::sin16s_gen2:6::div32u16u:137 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a -Statement [211] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:3::sin16s_gen2:6::div32u16u:137 [ frame_cnt#0 div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a -Statement [212] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:3::sin16s_gen2:6::div32u16u:137 [ frame_cnt#0 div32u16u::return#0 ] ) always clobbers reg byte a -Statement [217] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:3::sin16s_gen2:6::div32u16u:137::divr16u:205 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:3::sin16s_gen2:6::div32u16u:137::divr16u:209 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a +Statement [163] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 [ sin16s::isUpper#2 sin16s::x1#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 ] ) always clobbers reg byte a +Statement [164] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ) always clobbers reg byte a +Statement [165] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ) always clobbers reg byte a +Statement [167] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ) always clobbers reg byte a +Statement [168] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ) always clobbers reg byte a +Statement [169] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ) always clobbers reg byte a +Statement [170] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ) always clobbers reg byte a +Statement [172] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ) always clobbers reg byte a +Statement [173] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ) always clobbers reg byte a +Statement [174] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ) always clobbers reg byte a +Statement [176] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ) always clobbers reg byte a +Statement [177] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ) always clobbers reg byte a +Statement [178] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ) always clobbers reg byte a +Statement [179] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ) always clobbers reg byte a +Statement [180] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ) always clobbers reg byte a +Statement [182] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ) always clobbers reg byte a +Statement [183] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ) always clobbers reg byte a +Statement [184] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ) always clobbers reg byte a +Statement [185] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a +Statement [187] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a +Statement [188] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a +Statement [189] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a +Statement [190] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a +Statement [192] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a +Statement [195] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#5 ] ) always clobbers reg byte a +Statement [197] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 [ mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:181 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:186 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ) always clobbers reg byte a +Statement [198] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 [ mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:181 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:186 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ) always clobbers reg byte a +Statement [200] (dword) mul16u::return#3 ← (dword) mul16u::res#2 [ mulu16_sel::select#5 mul16u::return#3 ] ( main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:181 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:186 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] ) always clobbers reg byte a +Statement [201] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 [ mulu16_sel::select#5 mulu16_sel::$0 ] ( main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:181 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:186 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] ) always clobbers reg byte a +Statement [202] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 [ mulu16_sel::$1 ] ( main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:181 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:186 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::$1 ] ) always clobbers reg byte a +Statement [203] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 [ mulu16_sel::return#12 ] ( main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:181 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:186 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#12 ] ) always clobbers reg byte a +Statement [207] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:138 [ frame_cnt#0 divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a +Statement [208] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::quotient_hi#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:138 [ frame_cnt#0 div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a +Statement [209] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ( main:3::sin16s_gen2:6::div32u16u:138 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::rem#4 ] ) always clobbers reg byte a +Statement [211] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:3::sin16s_gen2:6::div32u16u:138 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a +Statement [212] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:3::sin16s_gen2:6::div32u16u:138 [ frame_cnt#0 div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a +Statement [213] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:3::sin16s_gen2:6::div32u16u:138 [ frame_cnt#0 div32u16u::return#0 ] ) always clobbers reg byte a +Statement [218] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:3::sin16s_gen2:6::div32u16u:138::divr16u:206 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:3::sin16s_gen2:6::div32u16u:138::divr16u:210 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:69 [ divr16u::i#2 divr16u::i#1 ] -Statement [220] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:3::sin16s_gen2:6::div32u16u:137::divr16u:205 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:3::sin16s_gen2:6::div32u16u:137::divr16u:209 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a -Statement [224] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:6::div32u16u:137::divr16u:205 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:3::sin16s_gen2:6::div32u16u:137::divr16u:209 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a -Statement [226] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:6::div32u16u:137::divr16u:205 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:3::sin16s_gen2:6::div32u16u:137::divr16u:209 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a -Statement [230] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:137::divr16u:205 [ frame_cnt#0 divr16u::return#0 rem16u#1 ] main:3::sin16s_gen2:6::div32u16u:137::divr16u:209 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a -Statement [232] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [233] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [236] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [237] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [238] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +Statement [221] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:3::sin16s_gen2:6::div32u16u:138::divr16u:206 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:3::sin16s_gen2:6::div32u16u:138::divr16u:210 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a +Statement [225] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:6::div32u16u:138::divr16u:206 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:3::sin16s_gen2:6::div32u16u:138::divr16u:210 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a +Statement [227] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:6::div32u16u:138::divr16u:206 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:3::sin16s_gen2:6::div32u16u:138::divr16u:210 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a +Statement [231] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:138::divr16u:206 [ frame_cnt#0 divr16u::return#0 rem16u#1 ] main:3::sin16s_gen2:6::div32u16u:138::divr16u:210 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a +Statement [233] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [234] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [237] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [238] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [239] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y Statement [1] (byte) frame_cnt#0 ← (byte) 1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a Statement [11] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [13] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a @@ -6346,22 +6385,22 @@ Statement [58] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#0 & (word) $fff Statement [59] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$1 [ bitmap_plot::x#0 bitmap_plot::plotter#1 ] ( main:3::bitmap_plot:40 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::x#0 bitmap_plot::plotter#1 ] ) always clobbers reg byte a Statement [60] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#0 [ bitmap_plot::plotter#1 bitmap_plot::$2 ] ( main:3::bitmap_plot:40 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 bitmap_plot::plotter#1 bitmap_plot::$2 ] ) always clobbers reg byte a Statement [61] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) [ ] ( main:3::bitmap_plot:40 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 ] ) always clobbers reg byte a reg byte y -Statement [64] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#3 [ mul16s::a#3 mul16s::b#3 mul16u::a#1 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] ) always clobbers reg byte a -Statement [65] (word) mul16u::b#0 ← (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] ) always clobbers reg byte a -Statement [67] (dword) mul16u::return#2 ← (dword) mul16u::res#2 [ mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ) always clobbers reg byte a -Statement [68] (dword) mul16s::m#0 ← (dword) mul16u::return#2 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a -Statement [69] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a -Statement [70] (word~) mul16s::$9 ← > (dword) mul16s::m#0 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ) always clobbers reg byte a -Statement [71] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ) always clobbers reg byte a -Statement [72] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 [ mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ) always clobbers reg byte a -Statement [74] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 [ mul16s::a#3 mul16s::m#5 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::m#5 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::m#5 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 ] ) always clobbers reg byte a -Statement [75] (word~) mul16s::$13 ← > (dword) mul16s::m#5 [ mul16s::a#3 mul16s::m#5 mul16s::$13 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 mul16s::$13 ] ) always clobbers reg byte a -Statement [76] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 [ mul16s::m#5 mul16s::$17 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::m#5 mul16s::$17 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::m#5 mul16s::$17 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#5 mul16s::$17 ] ) always clobbers reg byte a -Statement [77] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 [ mul16s::m#2 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::m#2 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::m#2 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#2 ] ) always clobbers reg byte a -Statement [79] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 [ mul16s::return#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::return#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::return#0 ] main:3::sin16s_gen2:6::mul16s:145 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#0 ] ) always clobbers reg byte a -Statement [83] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ( main:3::mul16s:21::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::mul16s:32::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::mul16s:145::mul16u:66 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:165::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:170::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:174::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:180::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:185::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ) always clobbers reg byte a -Statement [85] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ( main:3::mul16s:21::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::mul16s:32::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::mul16s:145::mul16u:66 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:165::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:170::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:174::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:180::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:185::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a -Statement [87] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ( main:3::mul16s:21::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::mul16s:32::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::mul16s:145::mul16u:66 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:165::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:170::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:174::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:180::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:185::mul16u:198 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ) always clobbers reg byte a +Statement [64] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#3 [ mul16s::a#3 mul16s::b#3 mul16u::a#1 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#1 ] ) always clobbers reg byte a +Statement [65] (word) mul16u::b#0 ← (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#1 mul16u::b#0 ] ) always clobbers reg byte a +Statement [67] (dword) mul16u::return#2 ← (dword) mul16u::res#2 [ mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ) always clobbers reg byte a +Statement [68] (dword) mul16s::m#0 ← (dword) mul16u::return#2 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a +Statement [69] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a +Statement [70] (word~) mul16s::$9 ← > (dword) mul16s::m#0 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ) always clobbers reg byte a +Statement [71] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ) always clobbers reg byte a +Statement [72] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 [ mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ) always clobbers reg byte a +Statement [74] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 [ mul16s::a#3 mul16s::m#5 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::m#5 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::m#5 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 ] ) always clobbers reg byte a +Statement [75] (word~) mul16s::$13 ← > (dword) mul16s::m#5 [ mul16s::a#3 mul16s::m#5 mul16s::$13 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 mul16s::$13 ] ) always clobbers reg byte a +Statement [76] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 [ mul16s::m#5 mul16s::$17 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::m#5 mul16s::$17 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::m#5 mul16s::$17 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#5 mul16s::$17 ] ) always clobbers reg byte a +Statement [77] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 [ mul16s::m#2 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::m#2 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::m#2 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#2 ] ) always clobbers reg byte a +Statement [79] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 [ mul16s::return#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::return#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::return#0 ] main:3::sin16s_gen2:6::mul16s:146 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#0 ] ) always clobbers reg byte a +Statement [83] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ( main:3::mul16s:21::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::mul16s:32::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::mul16s:146::mul16u:66 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:166::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:171::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:175::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:181::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:186::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ) always clobbers reg byte a +Statement [85] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ( main:3::mul16s:21::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::mul16s:32::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::mul16s:146::mul16u:66 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:166::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:171::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:175::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:181::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:186::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a +Statement [87] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ( main:3::mul16s:21::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::mul16s:32::mul16u:66 [ frame_cnt#0 main::idx_x#11 main::r#10 main::idx_y#3 main::r_add#10 main::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::mul16s:146::mul16u:66 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:166::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:171::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:175::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:181::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:186::mul16u:199 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ) always clobbers reg byte a Statement [92] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [93] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [94] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a @@ -6369,76 +6408,77 @@ Statement [95] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) Statement [96] *((const byte*) RASTER#0) ← (byte) 0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [97] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a Statement [98] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [107] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:3::bitmap_clear:10::memset:102 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] main:3::bitmap_clear:10::memset:104 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a -Statement [108] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::bitmap_clear:10::memset:102 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] main:3::bitmap_clear:10::memset:104 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a -Statement [110] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::bitmap_clear:10::memset:102 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] main:3::bitmap_clear:10::memset:104 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y -Statement [112] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::bitmap_clear:10::memset:102 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] main:3::bitmap_clear:10::memset:104 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a -Statement [124] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ( main:3::bitmap_init:8 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ) always clobbers reg byte a -Statement [131] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:8 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a -Statement [138] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ div32u16u::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 div32u16u::return#2 ] ) always clobbers reg byte a -Statement [139] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 [ sin16s_gen2::step#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 ] ) always clobbers reg byte a -Statement [141] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a -Statement [143] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ) always clobbers reg byte a -Statement [144] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 [ mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a -Statement [146] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ) always clobbers reg byte a -Statement [147] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ) always clobbers reg byte a -Statement [148] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$8 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$8 ] ) always clobbers reg byte a -Statement [149] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a reg byte y -Statement [150] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a -Statement [151] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a -Statement [153] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 [ sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ) always clobbers reg byte a -Statement [155] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 [ sin16s::x#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a -Statement [156] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 [ sin16s::x#1 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#1 ] ) always clobbers reg byte a -Statement [158] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 [ sin16s::x#4 sin16s::isUpper#2 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#4 sin16s::isUpper#2 ] ) always clobbers reg byte a -Statement [159] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 [ sin16s::isUpper#2 sin16s::x#2 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x#2 ] ) always clobbers reg byte a -Statement [161] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 [ sin16s::isUpper#2 sin16s::$4 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::$4 ] ) always clobbers reg byte a reg byte y -Statement [162] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 [ sin16s::isUpper#2 sin16s::x1#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 ] ) always clobbers reg byte a -Statement [163] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ) always clobbers reg byte a -Statement [164] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ) always clobbers reg byte a -Statement [166] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ) always clobbers reg byte a -Statement [167] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ) always clobbers reg byte a -Statement [168] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ) always clobbers reg byte a -Statement [169] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ) always clobbers reg byte a -Statement [171] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ) always clobbers reg byte a -Statement [172] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ) always clobbers reg byte a -Statement [173] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ) always clobbers reg byte a -Statement [175] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ) always clobbers reg byte a -Statement [176] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ) always clobbers reg byte a -Statement [177] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ) always clobbers reg byte a -Statement [178] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ) always clobbers reg byte a -Statement [179] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ) always clobbers reg byte a -Statement [181] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ) always clobbers reg byte a -Statement [182] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ) always clobbers reg byte a -Statement [183] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ) always clobbers reg byte a -Statement [184] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a -Statement [186] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a -Statement [187] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a -Statement [188] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a -Statement [189] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a -Statement [191] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a -Statement [194] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:3::sin16s_gen2:6::sin16s:142 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#5 ] ) always clobbers reg byte a -Statement [196] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 [ mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:170 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:174 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:185 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ) always clobbers reg byte a -Statement [197] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 [ mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:170 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:174 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:185 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ) always clobbers reg byte a -Statement [199] (dword) mul16u::return#3 ← (dword) mul16u::res#2 [ mulu16_sel::select#5 mul16u::return#3 ] ( main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:170 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:174 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:185 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] ) always clobbers reg byte a -Statement [200] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 [ mulu16_sel::select#5 mulu16_sel::$0 ] ( main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:170 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:174 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:185 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] ) always clobbers reg byte a -Statement [201] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 [ mulu16_sel::$1 ] ( main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:170 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:174 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:185 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::$1 ] ) always clobbers reg byte a -Statement [202] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 [ mulu16_sel::return#12 ] ( main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:170 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:174 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:142::mulu16_sel:185 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#12 ] ) always clobbers reg byte a -Statement [206] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:137 [ frame_cnt#0 divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a -Statement [207] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::quotient_hi#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:137 [ frame_cnt#0 div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a -Statement [208] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ( main:3::sin16s_gen2:6::div32u16u:137 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::rem#4 ] ) always clobbers reg byte a -Statement [210] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:3::sin16s_gen2:6::div32u16u:137 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a -Statement [211] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:3::sin16s_gen2:6::div32u16u:137 [ frame_cnt#0 div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a -Statement [212] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:3::sin16s_gen2:6::div32u16u:137 [ frame_cnt#0 div32u16u::return#0 ] ) always clobbers reg byte a -Statement [217] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:3::sin16s_gen2:6::div32u16u:137::divr16u:205 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:3::sin16s_gen2:6::div32u16u:137::divr16u:209 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a -Statement [220] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:3::sin16s_gen2:6::div32u16u:137::divr16u:205 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:3::sin16s_gen2:6::div32u16u:137::divr16u:209 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a -Statement [224] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:6::div32u16u:137::divr16u:205 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:3::sin16s_gen2:6::div32u16u:137::divr16u:209 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a -Statement [226] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:6::div32u16u:137::divr16u:205 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:3::sin16s_gen2:6::div32u16u:137::divr16u:209 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a -Statement [230] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:137::divr16u:205 [ frame_cnt#0 divr16u::return#0 rem16u#1 ] main:3::sin16s_gen2:6::div32u16u:137::divr16u:209 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a -Statement [232] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [233] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a -Statement [236] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [237] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [238] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +Statement [107] if((word) memset::num#2<=(byte) 0) goto memset::@return [ memset::num#2 memset::str#3 memset::c#3 ] ( main:3::bitmap_clear:10::memset:102 [ frame_cnt#0 memset::num#2 memset::str#3 memset::c#3 ] main:3::bitmap_clear:10::memset:104 [ frame_cnt#0 memset::num#2 memset::str#3 memset::c#3 ] ) always clobbers reg byte a +Statement [108] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 [ memset::str#3 memset::c#3 memset::end#0 ] ( main:3::bitmap_clear:10::memset:102 [ frame_cnt#0 memset::str#3 memset::c#3 memset::end#0 ] main:3::bitmap_clear:10::memset:104 [ frame_cnt#0 memset::str#3 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [109] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::bitmap_clear:10::memset:102 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] main:3::bitmap_clear:10::memset:104 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [111] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::bitmap_clear:10::memset:102 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] main:3::bitmap_clear:10::memset:104 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [113] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::bitmap_clear:10::memset:102 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] main:3::bitmap_clear:10::memset:104 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [125] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ( main:3::bitmap_init:8 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ) always clobbers reg byte a +Statement [132] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:8 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a +Statement [139] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ div32u16u::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 div32u16u::return#2 ] ) always clobbers reg byte a +Statement [140] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 [ sin16s_gen2::step#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 ] ) always clobbers reg byte a +Statement [142] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a +Statement [144] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ) always clobbers reg byte a +Statement [145] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 [ mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a +Statement [147] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ) always clobbers reg byte a +Statement [148] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ) always clobbers reg byte a +Statement [149] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$8 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$8 ] ) always clobbers reg byte a +Statement [150] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a reg byte y +Statement [151] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a +Statement [152] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a +Statement [154] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 [ sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ) always clobbers reg byte a +Statement [156] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 [ sin16s::x#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a +Statement [157] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 [ sin16s::x#1 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#1 ] ) always clobbers reg byte a +Statement [159] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 [ sin16s::x#4 sin16s::isUpper#2 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#4 sin16s::isUpper#2 ] ) always clobbers reg byte a +Statement [160] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 [ sin16s::isUpper#2 sin16s::x#2 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x#2 ] ) always clobbers reg byte a +Statement [162] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 [ sin16s::isUpper#2 sin16s::$4 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::$4 ] ) always clobbers reg byte a reg byte y +Statement [163] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 [ sin16s::isUpper#2 sin16s::x1#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 ] ) always clobbers reg byte a +Statement [164] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ) always clobbers reg byte a +Statement [165] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ) always clobbers reg byte a +Statement [167] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ) always clobbers reg byte a +Statement [168] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ) always clobbers reg byte a +Statement [169] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ) always clobbers reg byte a +Statement [170] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ) always clobbers reg byte a +Statement [172] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ) always clobbers reg byte a +Statement [173] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ) always clobbers reg byte a +Statement [174] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ) always clobbers reg byte a +Statement [176] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ) always clobbers reg byte a +Statement [177] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ) always clobbers reg byte a +Statement [178] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ) always clobbers reg byte a +Statement [179] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ) always clobbers reg byte a +Statement [180] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ) always clobbers reg byte a +Statement [182] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ) always clobbers reg byte a +Statement [183] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ) always clobbers reg byte a +Statement [184] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ) always clobbers reg byte a +Statement [185] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a +Statement [187] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a +Statement [188] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a +Statement [189] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a +Statement [190] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a +Statement [192] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a +Statement [195] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:3::sin16s_gen2:6::sin16s:143 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#5 ] ) always clobbers reg byte a +Statement [197] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 [ mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:181 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:186 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ) always clobbers reg byte a +Statement [198] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 [ mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:181 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:186 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ) always clobbers reg byte a +Statement [200] (dword) mul16u::return#3 ← (dword) mul16u::res#2 [ mulu16_sel::select#5 mul16u::return#3 ] ( main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:181 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:186 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] ) always clobbers reg byte a +Statement [201] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 [ mulu16_sel::select#5 mulu16_sel::$0 ] ( main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:181 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:186 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] ) always clobbers reg byte a +Statement [202] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 [ mulu16_sel::$1 ] ( main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:181 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:186 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::$1 ] ) always clobbers reg byte a +Statement [203] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 [ mulu16_sel::return#12 ] ( main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:166 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:171 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:181 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:143::mulu16_sel:186 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#12 ] ) always clobbers reg byte a +Statement [207] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:138 [ frame_cnt#0 divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a +Statement [208] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::quotient_hi#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:138 [ frame_cnt#0 div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a +Statement [209] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ( main:3::sin16s_gen2:6::div32u16u:138 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::rem#4 ] ) always clobbers reg byte a +Statement [211] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:3::sin16s_gen2:6::div32u16u:138 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a +Statement [212] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:3::sin16s_gen2:6::div32u16u:138 [ frame_cnt#0 div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a +Statement [213] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:3::sin16s_gen2:6::div32u16u:138 [ frame_cnt#0 div32u16u::return#0 ] ) always clobbers reg byte a +Statement [218] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:3::sin16s_gen2:6::div32u16u:138::divr16u:206 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:3::sin16s_gen2:6::div32u16u:138::divr16u:210 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a +Statement [221] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:3::sin16s_gen2:6::div32u16u:138::divr16u:206 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:3::sin16s_gen2:6::div32u16u:138::divr16u:210 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a +Statement [225] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:6::div32u16u:138::divr16u:206 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:3::sin16s_gen2:6::div32u16u:138::divr16u:210 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a +Statement [227] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:6::div32u16u:138::divr16u:206 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:3::sin16s_gen2:6::div32u16u:138::divr16u:210 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a +Statement [231] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:138::divr16u:206 [ frame_cnt#0 divr16u::return#0 rem16u#1 ] main:3::sin16s_gen2:6::div32u16u:138::divr16u:210 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a +Statement [233] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [234] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [237] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [238] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [239] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y Potential registers zp ZP_WORD:2 [ main::idx_x#11 main::idx_x#10 main::idx_x#1 ] : zp ZP_WORD:2 , Potential registers zp ZP_WORD:4 [ main::r#10 main::r#1 ] : zp ZP_WORD:4 , Potential registers zp ZP_WORD:6 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] : zp ZP_WORD:6 , @@ -6451,8 +6491,8 @@ Potential registers zp ZP_WORD:19 [ mul16u::b#1 ] : zp ZP_WORD:19 , Potential registers zp ZP_WORD:21 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] : zp ZP_WORD:21 , Potential registers zp ZP_DWORD:23 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] : zp ZP_DWORD:23 , Potential registers zp ZP_DWORD:27 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] : zp ZP_DWORD:27 , -Potential registers zp ZP_WORD:31 [ memset::str#2 ] : zp ZP_WORD:31 , -Potential registers zp ZP_WORD:33 [ memset::num#2 ] : zp ZP_WORD:33 , +Potential registers zp ZP_WORD:31 [ memset::num#2 ] : zp ZP_WORD:31 , +Potential registers zp ZP_WORD:33 [ memset::str#3 ] : zp ZP_WORD:33 , Potential registers zp ZP_BYTE:35 [ memset::c#3 ] : zp ZP_BYTE:35 , reg byte x , Potential registers zp ZP_WORD:36 [ memset::dst#2 memset::dst#3 memset::dst#1 ] : zp ZP_WORD:36 , Potential registers zp ZP_BYTE:38 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] : zp ZP_BYTE:38 , reg byte a , reg byte x , reg byte y , @@ -6551,41 +6591,41 @@ Uplift Scope [sin16s] 27.5: zp ZP_DWORD:52 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 Uplift Scope [mulu16_sel] 24: zp ZP_WORD:58 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] 21: zp ZP_WORD:60 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] 4: zp ZP_WORD:170 [ mulu16_sel::return#0 ] 4: zp ZP_WORD:174 [ mulu16_sel::return#1 ] 4: zp ZP_WORD:178 [ mulu16_sel::return#2 ] 4: zp ZP_WORD:184 [ mulu16_sel::return#10 ] 4: zp ZP_WORD:188 [ mulu16_sel::return#11 ] 4: zp ZP_DWORD:200 [ mulu16_sel::$0 ] 4: zp ZP_DWORD:204 [ mulu16_sel::$1 ] 1.71: zp ZP_WORD:208 [ mulu16_sel::return#12 ] 0.33: zp ZP_BYTE:62 [ mulu16_sel::select#5 ] Uplift Scope [sin16s_gen2] 22: zp ZP_DWORD:158 [ sin16s_gen2::$5 ] 18.33: zp ZP_WORD:49 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] 11: zp ZP_WORD:162 [ sin16s_gen2::$8 ] 10.33: zp ZP_DWORD:43 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] 8.8: zp ZP_WORD:47 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] 0.87: zp ZP_DWORD:148 [ sin16s_gen2::step#0 ] Uplift Scope [] 44.55: zp ZP_BYTE:70 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] 0.8: zp ZP_WORD:224 [ rem16u#1 ] -Uplift Scope [memset] 38: zp ZP_WORD:36 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:138 [ memset::end#0 ] 2: zp ZP_WORD:33 [ memset::num#2 ] 1.57: zp ZP_BYTE:35 [ memset::c#3 ] 0: zp ZP_WORD:31 [ memset::str#2 ] +Uplift Scope [memset] 38: zp ZP_WORD:36 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:138 [ memset::end#0 ] 2: zp ZP_WORD:31 [ memset::num#2 ] 1.38: zp ZP_BYTE:35 [ memset::c#3 ] 0: zp ZP_WORD:33 [ memset::str#3 ] Uplift Scope [bitmap_plot] 7.5: zp ZP_BYTE:111 [ bitmap_plot::y#0 ] 4: zp ZP_WORD:116 [ bitmap_plot::$1 ] 4: zp ZP_BYTE:120 [ bitmap_plot::$2 ] 3.75: zp ZP_WORD:112 [ bitmap_plot::x#0 ] 3: zp ZP_WORD:118 [ bitmap_plot::plotter#1 ] 1: zp ZP_WORD:114 [ bitmap_plot::plotter#0 ] Uplift Scope [div32u16u] 4: zp ZP_DWORD:144 [ div32u16u::return#2 ] 4: zp ZP_WORD:216 [ div32u16u::quotient_lo#0 ] 1.33: zp ZP_DWORD:218 [ div32u16u::return#0 ] 0.8: zp ZP_WORD:212 [ div32u16u::quotient_hi#0 ] Uplift Scope [bitmap_clear] Uplift Scope [init_irq] Uplift Scope [irq] -Uplifting [mul16u] best 27245 combination zp ZP_DWORD:23 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:27 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:21 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] zp ZP_WORD:17 [ mul16u::b#0 ] zp ZP_WORD:19 [ mul16u::b#1 ] zp ZP_DWORD:121 [ mul16u::return#2 ] zp ZP_DWORD:196 [ mul16u::return#3 ] -Uplifting [main] best 27245 combination zp ZP_BYTE:8 [ main::r_add#10 main::r_add#12 main::r_add#1 ] zp ZP_WORD:71 [ main::$32 ] zp ZP_WORD:73 [ main::$34 ] zp ZP_DWORD:81 [ main::xpos#0 ] zp ZP_WORD:87 [ main::$11 ] zp ZP_WORD:91 [ main::$33 ] zp ZP_WORD:93 [ main::$35 ] zp ZP_DWORD:101 [ main::ypos#0 ] zp ZP_WORD:107 [ main::$17 ] zp ZP_WORD:2 [ main::idx_x#11 main::idx_x#10 main::idx_x#1 ] zp ZP_WORD:6 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] zp ZP_WORD:75 [ main::cos_x#0 ] zp ZP_WORD:85 [ main::$10 ] zp ZP_WORD:95 [ main::sin_y#0 ] zp ZP_WORD:105 [ main::$16 ] zp ZP_WORD:109 [ main::y#0 ] zp ZP_WORD:4 [ main::r#10 main::r#1 ] zp ZP_WORD:89 [ main::x#0 ] -Uplifting [divr16u] best 27035 combination zp ZP_WORD:63 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:67 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:65 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:210 [ divr16u::return#2 ] zp ZP_WORD:214 [ divr16u::return#3 ] -Uplifting [mul16s] best 27035 combination zp ZP_WORD:9 [ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] zp ZP_WORD:11 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 ] zp ZP_DWORD:77 [ mul16s::return#3 ] zp ZP_DWORD:97 [ mul16s::return#4 ] zp ZP_DWORD:154 [ mul16s::return#2 ] zp ZP_DWORD:13 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] zp ZP_DWORD:133 [ mul16s::return#0 ] zp ZP_WORD:125 [ mul16s::$9 ] zp ZP_WORD:127 [ mul16s::$16 ] zp ZP_WORD:129 [ mul16s::$13 ] zp ZP_WORD:131 [ mul16s::$17 ] -Uplifting [bitmap_init] best 26525 combination zp ZP_WORD:41 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp ZP_BYTE:142 [ bitmap_init::$5 ] zp ZP_BYTE:143 [ bitmap_init::$6 ] zp ZP_BYTE:140 [ bitmap_init::$7 ] +Uplifting [mul16u] best 27259 combination zp ZP_DWORD:23 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:27 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:21 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] zp ZP_WORD:17 [ mul16u::b#0 ] zp ZP_WORD:19 [ mul16u::b#1 ] zp ZP_DWORD:121 [ mul16u::return#2 ] zp ZP_DWORD:196 [ mul16u::return#3 ] +Uplifting [main] best 27259 combination zp ZP_BYTE:8 [ main::r_add#10 main::r_add#12 main::r_add#1 ] zp ZP_WORD:71 [ main::$32 ] zp ZP_WORD:73 [ main::$34 ] zp ZP_DWORD:81 [ main::xpos#0 ] zp ZP_WORD:87 [ main::$11 ] zp ZP_WORD:91 [ main::$33 ] zp ZP_WORD:93 [ main::$35 ] zp ZP_DWORD:101 [ main::ypos#0 ] zp ZP_WORD:107 [ main::$17 ] zp ZP_WORD:2 [ main::idx_x#11 main::idx_x#10 main::idx_x#1 ] zp ZP_WORD:6 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] zp ZP_WORD:75 [ main::cos_x#0 ] zp ZP_WORD:85 [ main::$10 ] zp ZP_WORD:95 [ main::sin_y#0 ] zp ZP_WORD:105 [ main::$16 ] zp ZP_WORD:109 [ main::y#0 ] zp ZP_WORD:4 [ main::r#10 main::r#1 ] zp ZP_WORD:89 [ main::x#0 ] +Uplifting [divr16u] best 27049 combination zp ZP_WORD:63 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:67 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:65 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:210 [ divr16u::return#2 ] zp ZP_WORD:214 [ divr16u::return#3 ] +Uplifting [mul16s] best 27049 combination zp ZP_WORD:9 [ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] zp ZP_WORD:11 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 ] zp ZP_DWORD:77 [ mul16s::return#3 ] zp ZP_DWORD:97 [ mul16s::return#4 ] zp ZP_DWORD:154 [ mul16s::return#2 ] zp ZP_DWORD:13 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] zp ZP_DWORD:133 [ mul16s::return#0 ] zp ZP_WORD:125 [ mul16s::$9 ] zp ZP_WORD:127 [ mul16s::$16 ] zp ZP_WORD:129 [ mul16s::$13 ] zp ZP_WORD:131 [ mul16s::$17 ] +Uplifting [bitmap_init] best 26539 combination zp ZP_WORD:41 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp ZP_BYTE:142 [ bitmap_init::$5 ] zp ZP_BYTE:143 [ bitmap_init::$6 ] zp ZP_BYTE:140 [ bitmap_init::$7 ] Limited combination testing to 100 combinations of 15360 possible. -Uplifting [sin16s] best 26525 combination zp ZP_DWORD:52 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:152 [ sin16s::return#0 ] zp ZP_WORD:56 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:164 [ sin16s::$4 ] zp ZP_WORD:172 [ sin16s::x2#0 ] zp ZP_WORD:180 [ sin16s::x3_6#0 ] zp ZP_WORD:186 [ sin16s::x4#0 ] zp ZP_WORD:190 [ sin16s::x5#0 ] zp ZP_WORD:192 [ sin16s::x5_128#0 ] zp ZP_WORD:176 [ sin16s::x3#0 ] zp ZP_WORD:194 [ sin16s::usinx#1 ] zp ZP_WORD:168 [ sin16s::x1#0 ] zp ZP_WORD:182 [ sin16s::usinx#0 ] zp ZP_BYTE:51 [ sin16s::isUpper#2 ] -Uplifting [mulu16_sel] best 26509 combination zp ZP_WORD:58 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:60 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:170 [ mulu16_sel::return#0 ] zp ZP_WORD:174 [ mulu16_sel::return#1 ] zp ZP_WORD:178 [ mulu16_sel::return#2 ] zp ZP_WORD:184 [ mulu16_sel::return#10 ] zp ZP_WORD:188 [ mulu16_sel::return#11 ] zp ZP_DWORD:200 [ mulu16_sel::$0 ] zp ZP_DWORD:204 [ mulu16_sel::$1 ] zp ZP_WORD:208 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ] -Uplifting [sin16s_gen2] best 26509 combination zp ZP_DWORD:158 [ sin16s_gen2::$5 ] zp ZP_WORD:49 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] zp ZP_WORD:162 [ sin16s_gen2::$8 ] zp ZP_DWORD:43 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] zp ZP_WORD:47 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] zp ZP_DWORD:148 [ sin16s_gen2::step#0 ] -Uplifting [] best 26509 combination zp ZP_BYTE:70 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] zp ZP_WORD:224 [ rem16u#1 ] -Uplifting [memset] best 26493 combination zp ZP_WORD:36 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:138 [ memset::end#0 ] zp ZP_WORD:33 [ memset::num#2 ] reg byte x [ memset::c#3 ] zp ZP_WORD:31 [ memset::str#2 ] -Uplifting [bitmap_plot] best 26476 combination reg byte x [ bitmap_plot::y#0 ] zp ZP_WORD:116 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp ZP_WORD:112 [ bitmap_plot::x#0 ] zp ZP_WORD:118 [ bitmap_plot::plotter#1 ] zp ZP_WORD:114 [ bitmap_plot::plotter#0 ] -Uplifting [div32u16u] best 26476 combination zp ZP_DWORD:144 [ div32u16u::return#2 ] zp ZP_WORD:216 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:218 [ div32u16u::return#0 ] zp ZP_WORD:212 [ div32u16u::quotient_hi#0 ] -Uplifting [bitmap_clear] best 26476 combination -Uplifting [init_irq] best 26476 combination -Uplifting [irq] best 26476 combination +Uplifting [sin16s] best 26539 combination zp ZP_DWORD:52 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:152 [ sin16s::return#0 ] zp ZP_WORD:56 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:164 [ sin16s::$4 ] zp ZP_WORD:172 [ sin16s::x2#0 ] zp ZP_WORD:180 [ sin16s::x3_6#0 ] zp ZP_WORD:186 [ sin16s::x4#0 ] zp ZP_WORD:190 [ sin16s::x5#0 ] zp ZP_WORD:192 [ sin16s::x5_128#0 ] zp ZP_WORD:176 [ sin16s::x3#0 ] zp ZP_WORD:194 [ sin16s::usinx#1 ] zp ZP_WORD:168 [ sin16s::x1#0 ] zp ZP_WORD:182 [ sin16s::usinx#0 ] zp ZP_BYTE:51 [ sin16s::isUpper#2 ] +Uplifting [mulu16_sel] best 26523 combination zp ZP_WORD:58 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:60 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:170 [ mulu16_sel::return#0 ] zp ZP_WORD:174 [ mulu16_sel::return#1 ] zp ZP_WORD:178 [ mulu16_sel::return#2 ] zp ZP_WORD:184 [ mulu16_sel::return#10 ] zp ZP_WORD:188 [ mulu16_sel::return#11 ] zp ZP_DWORD:200 [ mulu16_sel::$0 ] zp ZP_DWORD:204 [ mulu16_sel::$1 ] zp ZP_WORD:208 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ] +Uplifting [sin16s_gen2] best 26523 combination zp ZP_DWORD:158 [ sin16s_gen2::$5 ] zp ZP_WORD:49 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] zp ZP_WORD:162 [ sin16s_gen2::$8 ] zp ZP_DWORD:43 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] zp ZP_WORD:47 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] zp ZP_DWORD:148 [ sin16s_gen2::step#0 ] +Uplifting [] best 26523 combination zp ZP_BYTE:70 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] zp ZP_WORD:224 [ rem16u#1 ] +Uplifting [memset] best 26507 combination zp ZP_WORD:36 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:138 [ memset::end#0 ] zp ZP_WORD:31 [ memset::num#2 ] reg byte x [ memset::c#3 ] zp ZP_WORD:33 [ memset::str#3 ] +Uplifting [bitmap_plot] best 26490 combination reg byte x [ bitmap_plot::y#0 ] zp ZP_WORD:116 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp ZP_WORD:112 [ bitmap_plot::x#0 ] zp ZP_WORD:118 [ bitmap_plot::plotter#1 ] zp ZP_WORD:114 [ bitmap_plot::plotter#0 ] +Uplifting [div32u16u] best 26490 combination zp ZP_DWORD:144 [ div32u16u::return#2 ] zp ZP_WORD:216 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:218 [ div32u16u::return#0 ] zp ZP_WORD:212 [ div32u16u::quotient_hi#0 ] +Uplifting [bitmap_clear] best 26490 combination +Uplifting [init_irq] best 26490 combination +Uplifting [irq] best 26490 combination Attempting to uplift remaining variables inzp ZP_BYTE:70 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] -Uplifting [] best 26476 combination zp ZP_BYTE:70 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] +Uplifting [] best 26490 combination zp ZP_BYTE:70 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:8 [ main::r_add#10 main::r_add#12 main::r_add#1 ] -Uplifting [main] best 26476 combination zp ZP_BYTE:8 [ main::r_add#10 main::r_add#12 main::r_add#1 ] +Uplifting [main] best 26490 combination zp ZP_BYTE:8 [ main::r_add#10 main::r_add#12 main::r_add#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:142 [ bitmap_init::$5 ] -Uplifting [bitmap_init] best 26416 combination reg byte a [ bitmap_init::$5 ] +Uplifting [bitmap_init] best 26430 combination reg byte a [ bitmap_init::$5 ] Attempting to uplift remaining variables inzp ZP_BYTE:143 [ bitmap_init::$6 ] -Uplifting [bitmap_init] best 26356 combination reg byte a [ bitmap_init::$6 ] +Uplifting [bitmap_init] best 26370 combination reg byte a [ bitmap_init::$6 ] Attempting to uplift remaining variables inzp ZP_BYTE:140 [ bitmap_init::$7 ] -Uplifting [bitmap_init] best 26356 combination zp ZP_BYTE:140 [ bitmap_init::$7 ] +Uplifting [bitmap_init] best 26370 combination zp ZP_BYTE:140 [ bitmap_init::$7 ] Attempting to uplift remaining variables inzp ZP_BYTE:51 [ sin16s::isUpper#2 ] -Uplifting [sin16s] best 26356 combination zp ZP_BYTE:51 [ sin16s::isUpper#2 ] +Uplifting [sin16s] best 26370 combination zp ZP_BYTE:51 [ sin16s::isUpper#2 ] Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ main::r#10 main::r#1 ] ] with [ zp ZP_WORD:9 [ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] ] - score: 2 Coalescing zero page register with common assignment [ zp ZP_WORD:56 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] ] with [ zp ZP_WORD:194 [ sin16s::usinx#1 ] ] - score: 2 Coalescing zero page register with common assignment [ zp ZP_WORD:58 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] ] with [ zp ZP_WORD:176 [ sin16s::x3#0 ] ] - score: 2 @@ -6596,8 +6636,8 @@ Coalescing zero page register with common assignment [ zp ZP_DWORD:13 [ mul16s:: Coalescing zero page register with common assignment [ zp ZP_DWORD:13 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 ] ] with [ zp ZP_DWORD:133 [ mul16s::return#0 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:19 [ mul16u::b#1 ] ] with [ zp ZP_WORD:60 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_DWORD:23 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] ] with [ zp ZP_DWORD:196 [ mul16u::return#3 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:31 [ memset::str#2 ] ] with [ zp ZP_WORD:36 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:33 [ memset::num#2 ] ] with [ zp ZP_WORD:138 [ memset::end#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:31 [ memset::num#2 ] ] with [ zp ZP_WORD:138 [ memset::end#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:33 [ memset::str#3 ] ] with [ zp ZP_WORD:36 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_DWORD:52 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] ] with [ zp ZP_DWORD:164 [ sin16s::$4 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:56 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 ] ] with [ zp ZP_WORD:152 [ sin16s::return#0 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:58 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 ] ] with [ zp ZP_WORD:172 [ sin16s::x2#0 ] ] - score: 1 @@ -6644,8 +6684,8 @@ Allocated (was zp ZP_WORD:17) zp ZP_WORD:15 [ mul16u::b#0 ] Allocated (was zp ZP_WORD:19) zp ZP_WORD:17 [ mul16u::b#1 mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] Allocated (was zp ZP_WORD:21) zp ZP_WORD:19 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] Allocated (was zp ZP_DWORD:27) zp ZP_DWORD:21 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] -Allocated (was zp ZP_WORD:31) zp ZP_WORD:25 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] -Allocated (was zp ZP_WORD:33) zp ZP_WORD:27 [ memset::num#2 memset::end#0 ] +Allocated (was zp ZP_WORD:31) zp ZP_WORD:25 [ memset::num#2 memset::end#0 ] +Allocated (was zp ZP_WORD:33) zp ZP_WORD:27 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] Allocated (was zp ZP_WORD:41) zp ZP_WORD:29 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] Allocated (was zp ZP_DWORD:43) zp ZP_DWORD:31 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] Allocated (was zp ZP_WORD:47) zp ZP_WORD:35 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] @@ -6670,12 +6710,12 @@ Allocated (was zp ZP_WORD:168) zp ZP_WORD:72 [ sin16s::x1#0 ] Allocated (was zp ZP_WORD:170) zp ZP_WORD:74 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 sin16s::x5_128#0 ] Allocated (was zp ZP_WORD:212) zp ZP_WORD:76 [ div32u16u::quotient_hi#0 ] Interrupt procedure irq clobbers ACNZ -Removing interrupt register storage stx regx+1 in SEG436 entry interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage sty regy+1 in SEG436 entry interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage regx: in SEG447 [238] return - exit interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage ldx #00 in SEG447 [238] return - exit interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage regy: in SEG447 [238] return - exit interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage ldy #00 in SEG447 [238] return - exit interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage stx regx+1 in SEG438 entry interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage sty regy+1 in SEG438 entry interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage regx: in SEG449 [239] return - exit interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage ldx #00 in SEG449 [239] return - exit interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage regy: in SEG449 [239] return - exit interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage ldy #00 in SEG449 [239] return - exit interrupt(HARDWARE_CLOBBER) ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -6774,7 +6814,7 @@ main: { .label _34 = 9 .label _35 = 9 // [6] call sin16s_gen2 - // [136] phi from main to sin16s_gen2 [phi:main->sin16s_gen2] + // [137] phi from main to sin16s_gen2 [phi:main->sin16s_gen2] sin16s_gen2_from_main: jsr sin16s_gen2 // [7] phi from main to main::@9 [phi:main->main::@9] @@ -6783,7 +6823,7 @@ main: { // main::@9 b9: // [8] call bitmap_init - // [114] phi from main::@9 to bitmap_init [phi:main::@9->bitmap_init] + // [115] phi from main::@9 to bitmap_init [phi:main::@9->bitmap_init] bitmap_init_from_b9: jsr bitmap_init // [9] phi from main::@9 to main::@10 [phi:main::@9->main::@10] @@ -7390,16 +7430,16 @@ bitmap_clear: { memset_from_bitmap_clear: // [106] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1 ldx #col - // [106] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 - lda #<$3e8 - sta memset.num - lda #>$3e8 - sta memset.num+1 - // [106] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + // [106] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 + // [106] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#2] -- vwuz1=vwuc1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 jsr memset // [103] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] b1_from_bitmap_clear: @@ -7411,16 +7451,16 @@ bitmap_clear: { memset_from_b1: // [106] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1 ldx #0 - // [106] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 - lda #<$1f40 - sta memset.num - lda #>$1f40 - sta memset.num+1 - // [106] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + // [106] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1 lda #<BITMAP sta memset.str lda #>BITMAP sta memset.str+1 + // [106] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#2] -- vwuz1=vwuc1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 jsr memset jmp breturn // bitmap_clear::@return @@ -7430,13 +7470,21 @@ bitmap_clear: { } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage($19) str, byte register(X) c, word zeropage($1b) num) +// memset(void* zeropage($1b) str, byte register(X) c, word zeropage($19) num) memset: { - .label end = $1b - .label dst = $19 - .label str = $19 - .label num = $1b - // [107] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 + .label end = $19 + .label dst = $1b + .label num = $19 + .label str = $1b + // [107] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 + lda num + beq breturn + lda num+1 + beq breturn + jmp b1 + // memset::@1 + b1: + // [108] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 lda end clc adc str @@ -7444,34 +7492,34 @@ memset: { lda end+1 adc str+1 sta end+1 - // [108] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 - // [109] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - b1_from_memset: - b1_from_b1: - // [109] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - jmp b1 - // memset::@1 - b1: - // [110] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx + // [109] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + // [110] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + b2_from_b1: + b2_from_b2: + // [110] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + jmp b2 + // memset::@2 + b2: + // [111] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx txa ldy #0 sta (dst),y - // [111] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [112] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [112] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [113] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1_from_b1 + bne b2_from_b2 lda dst cmp end - bne b1_from_b1 + bne b2_from_b2 jmp breturn // memset::@return breturn: - // [113] return + // [114] return rts } // bitmap_init @@ -7479,86 +7527,86 @@ memset: { bitmap_init: { .label _7 = $41 .label yoffs = $1d - // [115] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + // [116] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] b1_from_bitmap_init: - // [115] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 + // [116] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 ldx #0 - // [115] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 + // [116] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 lda #$80 jmp b1 - // [115] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + // [116] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] b1_from_b2: - // [115] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - // [115] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + // [116] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + // [116] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy jmp b1 // bitmap_init::@1 b1: - // [116] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa + // [117] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_bit,x - // [117] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 + // [118] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 lsr - // [118] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 + // [119] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 cmp #0 bne b6_from_b1 - // [120] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + // [121] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] b2_from_b1: - // [120] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 + // [121] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 lda #$80 jmp b2 - // [119] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + // [120] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] b6_from_b1: jmp b6 // bitmap_init::@6 b6: - // [120] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + // [121] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] b2_from_b6: - // [120] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + // [121] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy jmp b2 // bitmap_init::@2 b2: - // [121] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx + // [122] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx inx - // [122] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 + // [123] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 cpx #0 bne b1_from_b2 - // [123] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + // [124] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] b3_from_b2: - // [123] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + // [124] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #<BITMAP sta yoffs lda #>BITMAP sta yoffs+1 - // [123] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 + // [124] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 ldx #0 jmp b3 - // [123] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + // [124] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] b3_from_b4: - // [123] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - // [123] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + // [124] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + // [124] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy jmp b3 // bitmap_init::@3 b3: - // [124] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 + // [125] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 lda #7 sax _7 - // [125] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 + // [126] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 lda yoffs - // [126] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa + // [127] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa ora _7 - // [127] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa + // [128] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_ylo,x - // [128] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 + // [129] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 lda yoffs+1 - // [129] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa + // [130] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_yhi,x - // [130] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + // [131] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp _7 bne b4_from_b3 jmp b5 // bitmap_init::@5 b5: - // [131] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + // [132] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda yoffs adc #<$28*8 @@ -7566,22 +7614,22 @@ bitmap_init: { lda yoffs+1 adc #>$28*8 sta yoffs+1 - // [132] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + // [133] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] b4_from_b3: b4_from_b5: - // [132] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + // [133] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy jmp b4 // bitmap_init::@4 b4: - // [133] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx + // [134] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx inx - // [134] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 + // [135] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 cpx #0 bne b3_from_b4 jmp breturn // bitmap_init::@return breturn: - // [135] return + // [136] return rts } // sin16s_gen2 @@ -7600,28 +7648,28 @@ sin16s_gen2: { .label sintab = $23 .label x = $1f .label i = $25 - // [137] call div32u16u - // [204] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] + // [138] call div32u16u + // [205] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] div32u16u_from_sin16s_gen2: jsr div32u16u - // [138] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + // [139] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 jmp b2 // sin16s_gen2::@2 b2: - // [139] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 - // [140] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] + // [140] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 + // [141] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] b1_from_b2: - // [140] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 + // [141] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 lda #<0 sta i lda #>0 sta i+1 - // [140] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) SINUS#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 + // [141] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) SINUS#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 lda #<SINUS sta sintab lda #>SINUS sta sintab+1 - // [140] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 + // [141] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 lda #0 sta x lda #0 @@ -7630,15 +7678,15 @@ sin16s_gen2: { sta x+3 jmp b1 // u[4.28] - // [140] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] + // [141] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] b1_from_b4: - // [140] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy - // [140] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy - // [140] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy + // [141] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy + // [141] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy + // [141] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy jmp b1 // sin16s_gen2::@1 b1: - // [141] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 + // [142] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 lda x sta sin16s.x lda x+1 @@ -7647,14 +7695,14 @@ sin16s_gen2: { sta sin16s.x+2 lda x+3 sta sin16s.x+3 - // [142] call sin16s + // [143] call sin16s jsr sin16s - // [143] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 + // [144] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 jmp b3 // sin16s_gen2::@3 b3: - // [144] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 - // [145] call mul16s + // [145] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 + // [146] call mul16s // [63] phi from sin16s_gen2::@3 to mul16s [phi:sin16s_gen2::@3->mul16s] mul16s_from_b3: // [63] phi (signed word) mul16s::b#3 = (const signed word) sin16s_gen2::ampl#0 [phi:sin16s_gen2::@3->mul16s#0] -- vwsz1=vwsc1 @@ -7664,24 +7712,24 @@ sin16s_gen2: { sta mul16s.b+1 // [63] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#0 [phi:sin16s_gen2::@3->mul16s#1] -- register_copy jsr mul16s - // [146] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 + // [147] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 jmp b4 // sin16s_gen2::@4 b4: - // [147] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 - // [148] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 + // [148] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 + // [149] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 lda _5+2 sta _8 lda _5+3 sta _8+1 - // [149] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 -- _deref_pwsz1=vwsz2 + // [150] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 -- _deref_pwsz1=vwsz2 ldy #0 lda _8 sta (sintab),y iny lda _8+1 sta (sintab),y - // [150] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 + // [151] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 lda #SIZEOF_SIGNED_WORD clc adc sintab @@ -7689,7 +7737,7 @@ sin16s_gen2: { bcc !+ inc sintab+1 !: - // [151] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 + // [152] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 lda x clc adc step @@ -7703,12 +7751,12 @@ sin16s_gen2: { lda x+3 adc step+3 sta x+3 - // [152] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 + // [153] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 inc i bne !+ inc i+1 !: - // [153] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 + // [154] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 lda i+1 cmp #>wavelength bcc b1_from_b4 @@ -7720,7 +7768,7 @@ sin16s_gen2: { jmp breturn // sin16s_gen2::@return breturn: - // [154] return + // [155] return rts } // sin16s @@ -7742,7 +7790,7 @@ sin16s: { .label x5_128 = $4a .label sinx = 4 .label isUpper = $27 - // [155] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 + // [156] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_u4f28>>$10 bcc b1_from_sin16s @@ -7762,7 +7810,7 @@ sin16s: { jmp b4 // sin16s::@4 b4: - // [156] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 -- vduz1=vduz1_minus_vduc1 + // [157] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 -- vduz1=vduz1_minus_vduc1 lda x sec sbc #<PI_u4f28 @@ -7776,23 +7824,23 @@ sin16s: { lda x+3 sbc #>PI_u4f28>>$10 sta x+3 - // [157] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] + // [158] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] b1_from_b4: - // [157] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 + // [158] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 lda #1 sta isUpper - // [157] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy + // [158] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy jmp b1 - // [157] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] + // [158] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] b1_from_sin16s: - // [157] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 + // [158] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 lda #0 sta isUpper - // [157] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy + // [158] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy jmp b1 // sin16s::@1 b1: - // [158] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 + // [159] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_HALF_u4f28>>$10 bcc b2_from_b1 @@ -7812,7 +7860,7 @@ sin16s: { jmp b5 // sin16s::@5 b5: - // [159] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 -- vduz1=vduc1_minus_vduz1 + // [160] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 -- vduz1=vduc1_minus_vduz1 lda #<PI_u4f28 sec sbc x @@ -7826,14 +7874,14 @@ sin16s: { lda #>PI_u4f28>>$10 sbc x+3 sta x+3 - // [160] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] + // [161] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] b2_from_b1: b2_from_b5: - // [160] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy + // [161] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy jmp b2 // sin16s::@2 b2: - // [161] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz1_rol_3 + // [162] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz1_rol_3 ldy #3 !: asl _4 @@ -7842,53 +7890,53 @@ sin16s: { rol _4+3 dey bne !- - // [162] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 + // [163] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 lda _4+2 sta x1 lda _4+3 sta x1+1 - // [163] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [164] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v1 lda x1+1 sta mulu16_sel.v1+1 - // [164] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [165] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [165] call mulu16_sel - // [195] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] + // [166] call mulu16_sel + // [196] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] mulu16_sel_from_b2: - // [195] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuxx=vbuc1 + // [196] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - // [195] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy - // [195] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy + // [196] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy + // [196] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy jsr mulu16_sel - // [166] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 + // [167] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 jmp b7 // sin16s::@7 b7: - // [167] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 + // [168] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 lda mulu16_sel.return sta x2 lda mulu16_sel.return+1 sta x2+1 - // [168] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 - // [169] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [169] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 + // [170] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [170] call mulu16_sel - // [195] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] + // [171] call mulu16_sel + // [196] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] mulu16_sel_from_b7: - // [195] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuxx=vbuc1 + // [196] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuxx=vbuc1 ldx #1 - // [195] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy - // [195] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy + // [196] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy + // [196] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy jsr mulu16_sel - // [171] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + // [172] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return sta mulu16_sel.return_1 lda mulu16_sel.return+1 @@ -7896,26 +7944,26 @@ sin16s: { jmp b8 // sin16s::@8 b8: - // [172] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 - // [173] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 - // [174] call mulu16_sel - // [195] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] + // [173] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 + // [174] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 + // [175] call mulu16_sel + // [196] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] mulu16_sel_from_b8: - // [195] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuxx=vbuc1 + // [196] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuxx=vbuc1 ldx #1 - // [195] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 + // [196] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 lda #<$10000/6 sta mulu16_sel.v2 lda #>$10000/6 sta mulu16_sel.v2+1 - // [195] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy + // [196] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy jsr mulu16_sel - // [175] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 + // [176] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 jmp b9 // sin16s::@9 b9: - // [176] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 - // [177] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 + // [177] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 + // [178] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 lda x1 sec sbc x3_6 @@ -7923,21 +7971,21 @@ sin16s: { lda x1+1 sbc x3_6+1 sta usinx+1 - // [178] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 - // [179] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [179] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 + // [180] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [180] call mulu16_sel - // [195] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] + // [181] call mulu16_sel + // [196] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] mulu16_sel_from_b9: - // [195] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuxx=vbuc1 + // [196] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - // [195] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy - // [195] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy + // [196] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy + // [196] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy jsr mulu16_sel - // [181] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + // [182] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return sta mulu16_sel.return_10 lda mulu16_sel.return+1 @@ -7945,27 +7993,27 @@ sin16s: { jmp b10 // sin16s::@10 b10: - // [182] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 - // [183] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 - // [184] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [183] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 + // [184] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 + // [185] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [185] call mulu16_sel - // [195] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] + // [186] call mulu16_sel + // [196] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] mulu16_sel_from_b10: - // [195] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuxx=vbuc1 + // [196] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - // [195] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy - // [195] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy + // [196] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy + // [196] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy jsr mulu16_sel - // [186] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 + // [187] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 jmp b11 // sin16s::@11 b11: - // [187] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 - // [188] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz1_ror_4 + // [188] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 + // [189] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz1_ror_4 lsr x5_128+1 ror x5_128 lsr x5_128+1 @@ -7974,7 +8022,7 @@ sin16s: { ror x5_128 lsr x5_128+1 ror x5_128 - // [189] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz1_plus_vwuz2 + // [190] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz1_plus_vwuz2 lda usinx clc adc x5_128 @@ -7982,14 +8030,14 @@ sin16s: { lda usinx+1 adc x5_128+1 sta usinx+1 - // [190] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 + // [191] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 lda isUpper cmp #0 beq b12 jmp b6 // sin16s::@6 b6: - // [191] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz1 + // [192] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz1 sec lda #0 sbc sinx @@ -7997,21 +8045,21 @@ sin16s: { lda #0 sbc sinx+1 sta sinx+1 - // [192] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] + // [193] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] b3_from_b12: b3_from_b6: - // [192] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy + // [193] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy jmp b3 // sin16s::@3 b3: jmp breturn // sin16s::@return breturn: - // [193] return + // [194] return rts // sin16s::@12 b12: - // [194] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 + // [195] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 jmp b3_from_b12 } // mulu16_sel @@ -8026,13 +8074,13 @@ mulu16_sel: { .label return = $4a .label return_1 = $2c .label return_10 = $2c - // [196] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 + // [197] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 lda v1 sta mul16u.a lda v1+1 sta mul16u.a+1 - // [197] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 - // [198] call mul16u + // [198] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 + // [199] call mul16u // [81] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u] mul16u_from_mulu16_sel: // [81] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy @@ -8045,12 +8093,12 @@ mulu16_sel: { sta mul16u.mb+2 sta mul16u.mb+3 jsr mul16u - // [199] (dword) mul16u::return#3 ← (dword) mul16u::res#2 + // [200] (dword) mul16u::return#3 ← (dword) mul16u::res#2 jmp b1 // mulu16_sel::@1 b1: - // [200] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 - // [201] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz1_rol_vbuxx + // [201] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 + // [202] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz1_rol_vbuxx cpx #0 beq !e+ !: @@ -8061,7 +8109,7 @@ mulu16_sel: { dex bne !- !e: - // [202] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 + // [203] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 lda _1+2 sta return lda _1+3 @@ -8069,7 +8117,7 @@ mulu16_sel: { jmp breturn // mulu16_sel::@return breturn: - // [203] return + // [204] return rts } // div32u16u @@ -8079,46 +8127,46 @@ div32u16u: { .label quotient_hi = $4c .label quotient_lo = $32 .label return = $42 - // [205] call divr16u - // [214] phi from div32u16u to divr16u [phi:div32u16u->divr16u] + // [206] call divr16u + // [215] phi from div32u16u to divr16u [phi:div32u16u->divr16u] divr16u_from_div32u16u: - // [214] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 + // [215] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 lda #<PI2_u4f28>>$10 sta divr16u.dividend lda #>PI2_u4f28>>$10 sta divr16u.dividend+1 - // [214] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 + // [215] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 lda #<0 sta divr16u.rem lda #>0 sta divr16u.rem+1 jsr divr16u - // [206] (word) divr16u::return#2 ← (word) divr16u::return#0 + // [207] (word) divr16u::return#2 ← (word) divr16u::return#0 jmp b1 // div32u16u::@1 b1: - // [207] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 + // [208] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 lda divr16u.return sta quotient_hi lda divr16u.return+1 sta quotient_hi+1 - // [208] (word) divr16u::rem#4 ← (word) rem16u#1 - // [209] call divr16u - // [214] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] + // [209] (word) divr16u::rem#4 ← (word) rem16u#1 + // [210] call divr16u + // [215] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] divr16u_from_b1: - // [214] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 + // [215] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 lda #<PI2_u4f28&$ffff sta divr16u.dividend lda #>PI2_u4f28&$ffff sta divr16u.dividend+1 - // [214] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy + // [215] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy jsr divr16u - // [210] (word) divr16u::return#3 ← (word) divr16u::return#0 + // [211] (word) divr16u::return#3 ← (word) divr16u::return#0 jmp b2 // div32u16u::@2 b2: - // [211] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 - // [212] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 + // [212] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + // [213] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 lda quotient_hi sta return+2 lda quotient_hi+1 @@ -8130,7 +8178,7 @@ div32u16u: { jmp breturn // div32u16u::@return breturn: - // [213] return + // [214] return rts } // divr16u @@ -8144,58 +8192,58 @@ divr16u: { .label dividend = $30 .label quotient = $32 .label return = $32 - // [215] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + // [216] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] b1_from_divr16u: - // [215] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 + // [216] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 ldx #0 - // [215] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + // [216] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 lda #<0 sta quotient lda #>0 sta quotient+1 - // [215] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy - // [215] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy + // [216] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy + // [216] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy jmp b1 - // [215] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + // [216] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] b1_from_b3: - // [215] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy - // [215] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy - // [215] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy - // [215] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + // [216] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + // [216] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + // [216] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + // [216] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy jmp b1 // divr16u::@1 b1: - // [216] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [217] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl rem rol rem+1 - // [217] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 + // [218] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 lda dividend+1 - // [218] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 + // [219] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 and #$80 - // [219] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 + // [220] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 cmp #0 beq b2_from_b1 jmp b4 // divr16u::@4 b4: - // [220] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 + // [221] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 lda #1 ora rem sta rem - // [221] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + // [222] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] b2_from_b1: b2_from_b4: - // [221] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + // [222] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy jmp b2 // divr16u::@2 b2: - // [222] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [223] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl dividend rol dividend+1 - // [223] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [224] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl quotient rol quotient+1 - // [224] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + // [225] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 lda rem+1 cmp #>sin16s_gen2.wavelength bcc b3_from_b2 @@ -8207,12 +8255,12 @@ divr16u: { jmp b5 // divr16u::@5 b5: - // [225] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 + // [226] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 inc quotient bne !+ inc quotient+1 !: - // [226] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 -- vwuz1=vwuz1_minus_vwuc1 + // [227] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 -- vwuz1=vwuz1_minus_vwuc1 lda rem sec sbc #<sin16s_gen2.wavelength @@ -8220,27 +8268,27 @@ divr16u: { lda rem+1 sbc #>sin16s_gen2.wavelength sta rem+1 - // [227] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + // [228] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] b3_from_b2: b3_from_b5: - // [227] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy - // [227] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + // [228] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + // [228] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy jmp b3 // divr16u::@3 b3: - // [228] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx + // [229] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx inx - // [229] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 + // [230] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$10 bne b1_from_b3 jmp b6 // divr16u::@6 b6: - // [230] (word) rem16u#1 ← (word) divr16u::rem#11 + // [231] (word) rem16u#1 ← (word) divr16u::rem#11 jmp breturn // divr16u::@return breturn: - // [231] return + // [232] return rts } // irq @@ -8248,36 +8296,36 @@ divr16u: { irq: { // entry interrupt(HARDWARE_CLOBBER) sta rega+1 - // [232] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + // [233] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 lda #WHITE sta BGCOL - // [233] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 + // [234] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp frame_cnt beq b1_from_irq jmp b2 // irq::@2 b2: - // [234] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 + // [235] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 inc frame_cnt - // [235] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] + // [236] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] b1_from_irq: b1_from_b2: - // [235] phi (byte) frame_cnt#2 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy + // [236] phi (byte) frame_cnt#2 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy jmp b1 // irq::@1 b1: - // [236] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 + // [237] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 lda #BLACK sta BGCOL - // [237] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // [238] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS jmp breturn // irq::@return breturn: - // [238] return - exit interrupt(HARDWARE_CLOBBER) + // [239] return - exit interrupt(HARDWARE_CLOBBER) rega: lda #00 rti @@ -8327,6 +8375,7 @@ Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp breturn Removing instruction jmp b1 +Removing instruction jmp b2 Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp b6 @@ -8392,8 +8441,8 @@ Replacing label b1 with b2 Replacing label b1_from_b5 with b1 Replacing label b2_from_b1 with b2 Replacing label b3_from_b2 with b3 -Replacing label b1_from_b1 with b1 -Replacing label b1_from_b1 with b1 +Replacing label b2_from_b2 with b2 +Replacing label b2_from_b2 with b2 Replacing label b6_from_b1 with b2 Replacing label b1_from_b2 with b1 Replacing label b4_from_b3 with b4 @@ -8438,8 +8487,8 @@ Removing instruction b3_from_b2: Removing instruction b3_from_b4: Removing instruction b1_from_bitmap_clear: Removing instruction memset_from_b1: -Removing instruction b1_from_memset: -Removing instruction b1_from_b1: +Removing instruction b2_from_b1: +Removing instruction b2_from_b2: Removing instruction b1_from_b2: Removing instruction b6_from_b1: Removing instruction b6: @@ -8497,7 +8546,7 @@ Removing instruction breturn: Removing instruction memset_from_bitmap_clear: Removing instruction b1: Removing instruction breturn: -Removing instruction breturn: +Removing instruction b1: Removing instruction b1_from_bitmap_init: Removing instruction b2_from_b1: Removing instruction b3_from_b2: @@ -8803,20 +8852,21 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (signed dword) main::ypos#0 ypos zp ZP_DWORD:11 22.0 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (label) memset::@1 +(label) memset::@2 (label) memset::@return (byte) memset::c -(byte) memset::c#3 reg byte x 1.5714285714285714 +(byte) memset::c#3 reg byte x 1.375 (byte*) memset::dst -(byte*) memset::dst#1 dst zp ZP_WORD:25 16.5 -(byte*) memset::dst#2 dst zp ZP_WORD:25 17.5 -(byte*~) memset::dst#3 dst zp ZP_WORD:25 4.0 +(byte*) memset::dst#1 dst zp ZP_WORD:27 16.5 +(byte*) memset::dst#2 dst zp ZP_WORD:27 17.5 +(byte*~) memset::dst#3 dst zp ZP_WORD:27 4.0 (byte*) memset::end -(byte*) memset::end#0 end zp ZP_WORD:27 2.1666666666666665 +(byte*) memset::end#0 end zp ZP_WORD:25 2.1666666666666665 (word) memset::num -(word) memset::num#2 num zp ZP_WORD:27 2.0 +(word) memset::num#2 num zp ZP_WORD:25 2.0 (void*) memset::return (void*) memset::str -(void*) memset::str#2 str zp ZP_WORD:25 +(void*) memset::str#3 str zp ZP_WORD:27 (signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) (word~) mul16s::$13 $13 zp ZP_WORD:63 4.0 (word~) mul16s::$16 $16 zp ZP_WORD:61 4.0 @@ -8991,8 +9041,8 @@ zp ZP_WORD:15 [ mul16u::b#0 ] zp ZP_WORD:17 [ mul16u::b#1 mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:19 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] zp ZP_DWORD:21 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] -zp ZP_WORD:25 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] -zp ZP_WORD:27 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:25 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:27 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] reg byte x [ memset::c#3 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] @@ -9033,7 +9083,7 @@ reg byte a [ divr16u::$2 ] FINAL ASSEMBLER -Score: 20590 +Score: 20601 // File Comments // Tests the simple bitmap plotter - and counts plots per frame in an IRQ @@ -9125,13 +9175,13 @@ main: { .label _35 = 9 // sin16s_gen2(SINUS, 512, -0x1001, 0x1001) // [6] call sin16s_gen2 - // [136] phi from main to sin16s_gen2 [phi:main->sin16s_gen2] + // [137] phi from main to sin16s_gen2 [phi:main->sin16s_gen2] jsr sin16s_gen2 // [7] phi from main to main::@9 [phi:main->main::@9] // main::@9 // bitmap_init(BITMAP, SCREEN) // [8] call bitmap_init - // [114] phi from main::@9 to bitmap_init [phi:main::@9->bitmap_init] + // [115] phi from main::@9 to bitmap_init [phi:main::@9->bitmap_init] jsr bitmap_init // [9] phi from main::@9 to main::@10 [phi:main::@9->main::@10] // main::@10 @@ -9717,16 +9767,16 @@ bitmap_clear: { // [106] phi from bitmap_clear to memset [phi:bitmap_clear->memset] // [106] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1 ldx #col - // [106] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 - lda #<$3e8 - sta memset.num - lda #>$3e8 - sta memset.num+1 - // [106] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + // [106] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 + // [106] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#2] -- vwuz1=vwuc1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 jsr memset // [103] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] // bitmap_clear::@1 @@ -9735,16 +9785,16 @@ bitmap_clear: { // [106] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset] // [106] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1 ldx #0 - // [106] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 - lda #<$1f40 - sta memset.num - lda #>$1f40 - sta memset.num+1 - // [106] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + // [106] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1 lda #<BITMAP sta memset.str lda #>BITMAP sta memset.str+1 + // [106] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#2] -- vwuz1=vwuc1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 jsr memset // bitmap_clear::@return // } @@ -9753,14 +9803,21 @@ bitmap_clear: { } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage($19) str, byte register(X) c, word zeropage($1b) num) +// memset(void* zeropage($1b) str, byte register(X) c, word zeropage($19) num) memset: { - .label end = $1b - .label dst = $19 - .label str = $19 - .label num = $1b + .label end = $19 + .label dst = $1b + .label num = $19 + .label str = $1b + // if(num>0) + // [107] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 + lda num + beq breturn + lda num+1 + beq breturn + // memset::@1 // end = (char*)str + num - // [107] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 + // [108] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 lda end clc adc str @@ -9768,32 +9825,33 @@ memset: { lda end+1 adc str+1 sta end+1 - // [108] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 - // [109] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - // [109] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - // memset::@1 - b1: + // [109] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + // [110] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + // [110] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + // memset::@2 + b2: // *dst = c - // [110] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx + // [111] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx txa ldy #0 sta (dst),y // for(char* dst = str; dst!=end; dst++) - // [111] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [112] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [112] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [113] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1 + bne b2 lda dst cmp end - bne b1 + bne b2 // memset::@return + breturn: // } - // [113] return + // [114] return rts } // bitmap_init @@ -9801,81 +9859,81 @@ memset: { bitmap_init: { .label _7 = $41 .label yoffs = $1d - // [115] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] - // [115] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 + // [116] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + // [116] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 ldx #0 - // [115] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 + // [116] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 lda #$80 - // [115] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] - // [115] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - // [115] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + // [116] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + // [116] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + // [116] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy // bitmap_init::@1 b1: // bitmap_plot_bit[x] = bits - // [116] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa + // [117] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_bit,x // bits >>= 1 - // [117] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 + // [118] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 lsr // if(bits==0) - // [118] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 + // [119] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 cmp #0 bne b2 - // [120] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] - // [120] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 + // [121] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + // [121] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 lda #$80 - // [119] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + // [120] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] // bitmap_init::@6 - // [120] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] - // [120] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + // [121] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + // [121] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy // bitmap_init::@2 b2: // for(byte x : 0..255) - // [121] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx + // [122] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx inx - // [122] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 + // [123] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 cpx #0 bne b1 - // [123] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] - // [123] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + // [124] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + // [124] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #<BITMAP sta yoffs lda #>BITMAP sta yoffs+1 - // [123] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 + // [124] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 ldx #0 - // [123] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] - // [123] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - // [123] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + // [124] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + // [124] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + // [124] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy // bitmap_init::@3 b3: // y&$7 - // [124] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 + // [125] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 lda #7 sax _7 // <yoffs - // [125] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 + // [126] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 lda yoffs // y&$7 | <yoffs - // [126] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa + // [127] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa ora _7 // bitmap_plot_ylo[y] = y&$7 | <yoffs - // [127] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa + // [128] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_ylo,x // >yoffs - // [128] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 + // [129] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 lda yoffs+1 // bitmap_plot_yhi[y] = >yoffs - // [129] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa + // [130] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_yhi,x // if((y&$7)==7) - // [130] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + // [131] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp _7 bne b4 // bitmap_init::@5 // yoffs = yoffs + 40*8 - // [131] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + // [132] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda yoffs adc #<$28*8 @@ -9883,19 +9941,19 @@ bitmap_init: { lda yoffs+1 adc #>$28*8 sta yoffs+1 - // [132] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] - // [132] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + // [133] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + // [133] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy // bitmap_init::@4 b4: // for(byte y : 0..255) - // [133] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx + // [134] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx inx - // [134] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 + // [135] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 cpx #0 bne b3 // bitmap_init::@return // } - // [135] return + // [136] return rts } // sin16s_gen2 @@ -9915,39 +9973,39 @@ sin16s_gen2: { .label x = $1f .label i = $25 // div32u16u(PI2_u4f28, wavelength) - // [137] call div32u16u - // [204] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] + // [138] call div32u16u + // [205] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] jsr div32u16u // div32u16u(PI2_u4f28, wavelength) - // [138] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + // [139] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 // sin16s_gen2::@2 // step = div32u16u(PI2_u4f28, wavelength) - // [139] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 - // [140] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] - // [140] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 + // [140] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 + // [141] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] + // [141] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 lda #<0 sta i sta i+1 - // [140] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) SINUS#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 + // [141] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) SINUS#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 lda #<SINUS sta sintab lda #>SINUS sta sintab+1 - // [140] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 + // [141] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 lda #0 sta x sta x+1 sta x+2 sta x+3 // u[4.28] - // [140] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] - // [140] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy - // [140] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy - // [140] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy + // [141] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] + // [141] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy + // [141] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy + // [141] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy // sin16s_gen2::@1 b1: // sin16s(x) - // [141] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 + // [142] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 lda x sta sin16s.x lda x+1 @@ -9956,13 +10014,13 @@ sin16s_gen2: { sta sin16s.x+2 lda x+3 sta sin16s.x+3 - // [142] call sin16s + // [143] call sin16s jsr sin16s - // [143] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 + // [144] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 // sin16s_gen2::@3 // mul16s(sin16s(x), ampl) - // [144] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 - // [145] call mul16s + // [145] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 + // [146] call mul16s // [63] phi from sin16s_gen2::@3 to mul16s [phi:sin16s_gen2::@3->mul16s] // [63] phi (signed word) mul16s::b#3 = (const signed word) sin16s_gen2::ampl#0 [phi:sin16s_gen2::@3->mul16s#0] -- vwsz1=vwsc1 lda #<ampl @@ -9972,17 +10030,17 @@ sin16s_gen2: { // [63] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#0 [phi:sin16s_gen2::@3->mul16s#1] -- register_copy jsr mul16s // mul16s(sin16s(x), ampl) - // [146] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 + // [147] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 // sin16s_gen2::@4 - // [147] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 + // [148] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 // >mul16s(sin16s(x), ampl) - // [148] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 + // [149] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 lda _5+2 sta _8 lda _5+3 sta _8+1 // *sintab++ = offs + (signed word)>mul16s(sin16s(x), ampl) - // [149] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 -- _deref_pwsz1=vwsz2 + // [150] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8 -- _deref_pwsz1=vwsz2 ldy #0 lda _8 sta (sintab),y @@ -9990,7 +10048,7 @@ sin16s_gen2: { lda _8+1 sta (sintab),y // *sintab++ = offs + (signed word)>mul16s(sin16s(x), ampl); - // [150] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 + // [151] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 lda #SIZEOF_SIGNED_WORD clc adc sintab @@ -9999,7 +10057,7 @@ sin16s_gen2: { inc sintab+1 !: // x = x + step - // [151] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 + // [152] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 lda x clc adc step @@ -10014,12 +10072,12 @@ sin16s_gen2: { adc step+3 sta x+3 // for( word i=0; i<wavelength; i++) - // [152] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 + // [153] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 inc i bne !+ inc i+1 !: - // [153] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 + // [154] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 lda i+1 cmp #>wavelength bcc b1 @@ -10030,7 +10088,7 @@ sin16s_gen2: { !: // sin16s_gen2::@return // } - // [154] return + // [155] return rts } // sin16s @@ -10053,7 +10111,7 @@ sin16s: { .label sinx = 4 .label isUpper = $27 // if(x >= PI_u4f28 ) - // [155] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 + // [156] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_u4f28>>$10 bcc b4 @@ -10072,7 +10130,7 @@ sin16s: { !: // sin16s::@4 // x = x - PI_u4f28 - // [156] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 -- vduz1=vduz1_minus_vduc1 + // [157] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 -- vduz1=vduz1_minus_vduc1 lda x sec sbc #<PI_u4f28 @@ -10086,22 +10144,22 @@ sin16s: { lda x+3 sbc #>PI_u4f28>>$10 sta x+3 - // [157] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] - // [157] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 + // [158] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] + // [158] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 lda #1 sta isUpper - // [157] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy + // [158] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy jmp b1 - // [157] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] + // [158] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] b4: - // [157] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 + // [158] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 lda #0 sta isUpper - // [157] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy + // [158] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy // sin16s::@1 b1: // if(x >= PI_HALF_u4f28 ) - // [158] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 + // [159] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_HALF_u4f28>>$10 bcc b2 @@ -10120,7 +10178,7 @@ sin16s: { !: // sin16s::@5 // x = PI_u4f28 - x - // [159] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 -- vduz1=vduc1_minus_vduz1 + // [160] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 -- vduz1=vduc1_minus_vduz1 lda #<PI_u4f28 sec sbc x @@ -10134,12 +10192,12 @@ sin16s: { lda #>PI_u4f28>>$10 sbc x+3 sta x+3 - // [160] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] - // [160] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy + // [161] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] + // [161] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy // sin16s::@2 b2: // x<<3 - // [161] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz1_rol_3 + // [162] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz1_rol_3 ldy #3 !: asl _4 @@ -10149,81 +10207,81 @@ sin16s: { dey bne !- // x1 = >x<<3 - // [162] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 + // [163] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 lda _4+2 sta x1 lda _4+3 sta x1+1 // mulu16_sel(x1, x1, 0) - // [163] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [164] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v1 lda x1+1 sta mulu16_sel.v1+1 - // [164] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [165] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [165] call mulu16_sel - // [195] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] - // [195] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuxx=vbuc1 + // [166] call mulu16_sel + // [196] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] + // [196] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - // [195] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy - // [195] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy + // [196] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy + // [196] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy jsr mulu16_sel // mulu16_sel(x1, x1, 0) - // [166] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 + // [167] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 // sin16s::@7 // x2 = mulu16_sel(x1, x1, 0) - // [167] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 + // [168] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 lda mulu16_sel.return sta x2 lda mulu16_sel.return+1 sta x2+1 // mulu16_sel(x2, x1, 1) - // [168] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 - // [169] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [169] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 + // [170] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [170] call mulu16_sel - // [195] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] - // [195] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuxx=vbuc1 + // [171] call mulu16_sel + // [196] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] + // [196] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuxx=vbuc1 ldx #1 - // [195] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy - // [195] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy + // [196] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy + // [196] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy jsr mulu16_sel // mulu16_sel(x2, x1, 1) - // [171] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + // [172] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return sta mulu16_sel.return_1 lda mulu16_sel.return+1 sta mulu16_sel.return_1+1 // sin16s::@8 // x3 = mulu16_sel(x2, x1, 1) - // [172] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 + // [173] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 // mulu16_sel(x3, $10000/6, 1) - // [173] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 - // [174] call mulu16_sel - // [195] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] - // [195] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuxx=vbuc1 + // [174] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 + // [175] call mulu16_sel + // [196] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] + // [196] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuxx=vbuc1 ldx #1 - // [195] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 + // [196] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 lda #<$10000/6 sta mulu16_sel.v2 lda #>$10000/6 sta mulu16_sel.v2+1 - // [195] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy + // [196] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy jsr mulu16_sel // mulu16_sel(x3, $10000/6, 1) - // [175] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 + // [176] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 // sin16s::@9 // x3_6 = mulu16_sel(x3, $10000/6, 1) - // [176] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 + // [177] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 // usinx = x1 - x3_6 - // [177] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 + // [178] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 lda x1 sec sbc x3_6 @@ -10232,49 +10290,49 @@ sin16s: { sbc x3_6+1 sta usinx+1 // mulu16_sel(x3, x1, 0) - // [178] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 - // [179] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [179] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 + // [180] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [180] call mulu16_sel - // [195] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] - // [195] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuxx=vbuc1 + // [181] call mulu16_sel + // [196] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] + // [196] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - // [195] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy - // [195] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy + // [196] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy + // [196] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy jsr mulu16_sel // mulu16_sel(x3, x1, 0) - // [181] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + // [182] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return sta mulu16_sel.return_10 lda mulu16_sel.return+1 sta mulu16_sel.return_10+1 // sin16s::@10 // x4 = mulu16_sel(x3, x1, 0) - // [182] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 + // [183] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 // mulu16_sel(x4, x1, 0) - // [183] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 - // [184] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + // [184] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 + // [185] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - // [185] call mulu16_sel - // [195] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] - // [195] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuxx=vbuc1 + // [186] call mulu16_sel + // [196] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] + // [196] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - // [195] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy - // [195] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy + // [196] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy + // [196] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy jsr mulu16_sel // mulu16_sel(x4, x1, 0) - // [186] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 + // [187] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 // sin16s::@11 // x5 = mulu16_sel(x4, x1, 0) - // [187] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 + // [188] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 // x5_128 = x5>>4 - // [188] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz1_ror_4 + // [189] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz1_ror_4 lsr x5_128+1 ror x5_128 lsr x5_128+1 @@ -10284,7 +10342,7 @@ sin16s: { lsr x5_128+1 ror x5_128 // usinx = usinx + x5_128 - // [189] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz1_plus_vwuz2 + // [190] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz1_plus_vwuz2 lda usinx clc adc x5_128 @@ -10293,13 +10351,13 @@ sin16s: { adc x5_128+1 sta usinx+1 // if(isUpper!=0) - // [190] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 + // [191] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 lda isUpper cmp #0 beq b3 // sin16s::@6 // sinx = -(signed word)usinx - // [191] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz1 + // [192] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz1 sec lda #0 sbc sinx @@ -10307,16 +10365,16 @@ sin16s: { lda #0 sbc sinx+1 sta sinx+1 - // [192] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] - // [192] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy + // [193] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] + // [193] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy // sin16s::@3 b3: // sin16s::@return // } - // [193] return + // [194] return rts // sin16s::@12 - // [194] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 + // [195] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 } // mulu16_sel // Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result. @@ -10331,13 +10389,13 @@ mulu16_sel: { .label return_1 = $2c .label return_10 = $2c // mul16u(v1, v2) - // [196] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 + // [197] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 lda v1 sta mul16u.a lda v1+1 sta mul16u.a+1 - // [197] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 - // [198] call mul16u + // [198] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 + // [199] call mul16u // [81] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u] // [81] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy // [81] phi (dword) mul16u::mb#0 = (word) mul16u::b#1 [phi:mulu16_sel->mul16u#1] -- vduz1=vwuz2 @@ -10350,11 +10408,11 @@ mulu16_sel: { sta mul16u.mb+3 jsr mul16u // mul16u(v1, v2) - // [199] (dword) mul16u::return#3 ← (dword) mul16u::res#2 + // [200] (dword) mul16u::return#3 ← (dword) mul16u::res#2 // mulu16_sel::@1 - // [200] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 + // [201] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 // mul16u(v1, v2)<<select - // [201] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz1_rol_vbuxx + // [202] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz1_rol_vbuxx cpx #0 beq !e+ !: @@ -10366,14 +10424,14 @@ mulu16_sel: { bne !- !e: // >mul16u(v1, v2)<<select - // [202] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 + // [203] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 lda _1+2 sta return lda _1+3 sta return+1 // mulu16_sel::@return // } - // [203] return + // [204] return rts } // div32u16u @@ -10384,45 +10442,45 @@ div32u16u: { .label quotient_lo = $32 .label return = $42 // divr16u(>dividend, divisor, 0) - // [205] call divr16u - // [214] phi from div32u16u to divr16u [phi:div32u16u->divr16u] - // [214] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 + // [206] call divr16u + // [215] phi from div32u16u to divr16u [phi:div32u16u->divr16u] + // [215] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 lda #<PI2_u4f28>>$10 sta divr16u.dividend lda #>PI2_u4f28>>$10 sta divr16u.dividend+1 - // [214] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 + // [215] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 lda #<0 sta divr16u.rem sta divr16u.rem+1 jsr divr16u // divr16u(>dividend, divisor, 0) - // [206] (word) divr16u::return#2 ← (word) divr16u::return#0 + // [207] (word) divr16u::return#2 ← (word) divr16u::return#0 // div32u16u::@1 // quotient_hi = divr16u(>dividend, divisor, 0) - // [207] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 + // [208] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 lda divr16u.return sta quotient_hi lda divr16u.return+1 sta quotient_hi+1 // divr16u(<dividend, divisor, rem16u) - // [208] (word) divr16u::rem#4 ← (word) rem16u#1 - // [209] call divr16u - // [214] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] - // [214] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 + // [209] (word) divr16u::rem#4 ← (word) rem16u#1 + // [210] call divr16u + // [215] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] + // [215] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 lda #<PI2_u4f28&$ffff sta divr16u.dividend lda #>PI2_u4f28&$ffff sta divr16u.dividend+1 - // [214] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy + // [215] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy jsr divr16u // divr16u(<dividend, divisor, rem16u) - // [210] (word) divr16u::return#3 ← (word) divr16u::return#0 + // [211] (word) divr16u::return#3 ← (word) divr16u::return#0 // div32u16u::@2 // quotient_lo = divr16u(<dividend, divisor, rem16u) - // [211] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + // [212] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 // quotient = { quotient_hi, quotient_lo} - // [212] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 + // [213] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 lda quotient_hi sta return+2 lda quotient_hi+1 @@ -10433,7 +10491,7 @@ div32u16u: { sta return+1 // div32u16u::@return // } - // [213] return + // [214] return rts } // divr16u @@ -10447,56 +10505,56 @@ divr16u: { .label dividend = $30 .label quotient = $32 .label return = $32 - // [215] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] - // [215] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 + // [216] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + // [216] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 ldx #0 - // [215] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + // [216] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 txa sta quotient sta quotient+1 - // [215] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy - // [215] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy - // [215] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] - // [215] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy - // [215] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy - // [215] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy - // [215] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + // [216] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy + // [216] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy + // [216] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + // [216] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + // [216] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + // [216] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + // [216] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy // divr16u::@1 b1: // rem = rem << 1 - // [216] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [217] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl rem rol rem+1 // >dividend - // [217] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 + // [218] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 lda dividend+1 // >dividend & $80 - // [218] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 + // [219] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 and #$80 // if( (>dividend & $80) != 0 ) - // [219] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 + // [220] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 cmp #0 beq b2 // divr16u::@4 // rem = rem | 1 - // [220] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 + // [221] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 lda #1 ora rem sta rem - // [221] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] - // [221] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + // [222] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + // [222] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy // divr16u::@2 b2: // dividend = dividend << 1 - // [222] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [223] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl dividend rol dividend+1 // quotient = quotient << 1 - // [223] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + // [224] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl quotient rol quotient+1 // if(rem>=divisor) - // [224] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + // [225] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 lda rem+1 cmp #>sin16s_gen2.wavelength bcc b3 @@ -10507,13 +10565,13 @@ divr16u: { !: // divr16u::@5 // quotient++; - // [225] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 + // [226] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 inc quotient bne !+ inc quotient+1 !: // rem = rem - divisor - // [226] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 -- vwuz1=vwuz1_minus_vwuc1 + // [227] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 -- vwuz1=vwuz1_minus_vwuc1 lda rem sec sbc #<sin16s_gen2.wavelength @@ -10521,23 +10579,23 @@ divr16u: { lda rem+1 sbc #>sin16s_gen2.wavelength sta rem+1 - // [227] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] - // [227] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy - // [227] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + // [228] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + // [228] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + // [228] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy // divr16u::@3 b3: // for( byte i : 0..15) - // [228] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx + // [229] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx inx - // [229] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 + // [230] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$10 bne b1 // divr16u::@6 // rem16u = rem - // [230] (word) rem16u#1 ← (word) divr16u::rem#11 + // [231] (word) rem16u#1 ← (word) divr16u::rem#11 // divr16u::@return // } - // [231] return + // [232] return rts } // irq @@ -10546,34 +10604,34 @@ irq: { // entry interrupt(HARDWARE_CLOBBER) sta rega+1 // *BGCOL = WHITE - // [232] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + // [233] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 lda #WHITE sta BGCOL // if(frame_cnt) - // [233] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 + // [234] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp frame_cnt beq b1 // irq::@2 // frame_cnt++; - // [234] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 + // [235] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 inc frame_cnt - // [235] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] - // [235] phi (byte) frame_cnt#2 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy + // [236] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] + // [236] phi (byte) frame_cnt#2 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy // irq::@1 b1: // *BGCOL = BLACK - // [236] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 + // [237] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 lda #BLACK sta BGCOL // *IRQ_STATUS = IRQ_RASTER - // [237] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // [238] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS // irq::@return // } - // [238] return - exit interrupt(HARDWARE_CLOBBER) + // [239] return - exit interrupt(HARDWARE_CLOBBER) rega: lda #00 rti diff --git a/src/test/ref/bitmap-plot-2.sym b/src/test/ref/bitmap-plot-2.sym index e681c2b1a..b76f51e3d 100644 --- a/src/test/ref/bitmap-plot-2.sym +++ b/src/test/ref/bitmap-plot-2.sym @@ -239,20 +239,21 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() (signed dword) main::ypos#0 ypos zp ZP_DWORD:11 22.0 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (label) memset::@1 +(label) memset::@2 (label) memset::@return (byte) memset::c -(byte) memset::c#3 reg byte x 1.5714285714285714 +(byte) memset::c#3 reg byte x 1.375 (byte*) memset::dst -(byte*) memset::dst#1 dst zp ZP_WORD:25 16.5 -(byte*) memset::dst#2 dst zp ZP_WORD:25 17.5 -(byte*~) memset::dst#3 dst zp ZP_WORD:25 4.0 +(byte*) memset::dst#1 dst zp ZP_WORD:27 16.5 +(byte*) memset::dst#2 dst zp ZP_WORD:27 17.5 +(byte*~) memset::dst#3 dst zp ZP_WORD:27 4.0 (byte*) memset::end -(byte*) memset::end#0 end zp ZP_WORD:27 2.1666666666666665 +(byte*) memset::end#0 end zp ZP_WORD:25 2.1666666666666665 (word) memset::num -(word) memset::num#2 num zp ZP_WORD:27 2.0 +(word) memset::num#2 num zp ZP_WORD:25 2.0 (void*) memset::return (void*) memset::str -(void*) memset::str#2 str zp ZP_WORD:25 +(void*) memset::str#3 str zp ZP_WORD:27 (signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) (word~) mul16s::$13 $13 zp ZP_WORD:63 4.0 (word~) mul16s::$16 $16 zp ZP_WORD:61 4.0 @@ -427,8 +428,8 @@ zp ZP_WORD:15 [ mul16u::b#0 ] zp ZP_WORD:17 [ mul16u::b#1 mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:19 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] zp ZP_DWORD:21 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] -zp ZP_WORD:25 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] -zp ZP_WORD:27 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:25 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:27 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] reg byte x [ memset::c#3 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] diff --git a/src/test/ref/bitmap-plot-3.asm b/src/test/ref/bitmap-plot-3.asm index 6ac325acb..eb016fced 100644 --- a/src/test/ref/bitmap-plot-3.asm +++ b/src/test/ref/bitmap-plot-3.asm @@ -327,34 +327,38 @@ abs_u16: { bitmap_clear: { .const col = WHITE*$10 ldx #col - lda #<$3e8 - sta memset.num - lda #>$3e8 - sta memset.num+1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 jsr memset ldx #0 - lda #<$1f40 - sta memset.num - lda #>$1f40 - sta memset.num+1 lda #<BITMAP sta memset.str lda #>BITMAP sta memset.str+1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 jsr memset rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage($12) str, byte register(X) c, word zeropage($14) num) +// memset(void* zeropage($14) str, byte register(X) c, word zeropage($12) num) memset: { - .label end = $14 - .label dst = $12 - .label str = $12 - .label num = $14 + .label end = $12 + .label dst = $14 + .label num = $12 + .label str = $14 + lda num + beq breturn + lda num+1 + beq breturn lda end clc adc str @@ -362,7 +366,7 @@ memset: { lda end+1 adc str+1 sta end+1 - b1: + b2: txa ldy #0 sta (dst),y @@ -372,10 +376,11 @@ memset: { !: lda dst+1 cmp end+1 - bne b1 + bne b2 lda dst cmp end - bne b1 + bne b2 + breturn: rts } // Initialize bitmap plotting tables diff --git a/src/test/ref/bitmap-plot-3.cfg b/src/test/ref/bitmap-plot-3.cfg index 079672ed1..c57718b15 100644 --- a/src/test/ref/bitmap-plot-3.cfg +++ b/src/test/ref/bitmap-plot-3.cfg @@ -181,57 +181,60 @@ bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 to:@return memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [95] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) + [95] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) [95] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 ) - [95] (void*) memset::str#2 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) - [96] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 - [97] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + [96] if((word) memset::num#2<=(byte) 0) goto memset::@return to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - [98] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) - [99] *((byte*) memset::dst#2) ← (byte) memset::c#3 - [100] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - [101] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 +memset::@1: scope:[memset] from memset + [97] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 + [98] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + to:memset::@2 +memset::@2: scope:[memset] from memset::@1 memset::@2 + [99] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 ) + [100] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [101] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [102] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 to:memset::@return -memset::@return: scope:[memset] from memset::@1 - [102] return +memset::@return: scope:[memset] from memset memset::@2 + [103] return to:@return bitmap_init: scope:[bitmap_init] from main - [103] phi() + [104] phi() to:bitmap_init::@1 bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2 - [104] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) - [104] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) - [105] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 - [106] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 - [107] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 + [105] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) + [105] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) + [106] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 + [107] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 + [108] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 to:bitmap_init::@2 bitmap_init::@6: scope:[bitmap_init] from bitmap_init::@1 - [108] phi() + [109] phi() to:bitmap_init::@2 bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6 - [109] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) - [110] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 - [111] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 + [110] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) + [111] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 + [112] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 to:bitmap_init::@3 bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4 - [112] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) - [112] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) - [113] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 - [114] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 - [115] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 - [116] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 - [117] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 - [118] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 - [119] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 + [113] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) + [113] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) + [114] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 + [115] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 + [116] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 + [117] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 + [118] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 + [119] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 + [120] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 to:bitmap_init::@5 bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@3 - [120] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 + [121] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 to:bitmap_init::@4 bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 - [121] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) - [122] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 - [123] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 + [122] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) + [123] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 + [124] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 to:bitmap_init::@return bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 - [124] return + [125] return to:@return diff --git a/src/test/ref/bitmap-plot-3.log b/src/test/ref/bitmap-plot-3.log index b6a7a0eb7..236d56754 100644 --- a/src/test/ref/bitmap-plot-3.log +++ b/src/test/ref/bitmap-plot-3.log @@ -11,6 +11,7 @@ Culled Empty Block (label) @3 Culled Empty Block (label) @4 Culled Empty Block (label) @5 Culled Empty Block (label) @6 +Culled Empty Block (label) memset::@5 Culled Empty Block (label) memset::@3 Culled Empty Block (label) @7 Culled Empty Block (label) bitmap_init::@8 @@ -69,30 +70,38 @@ CONTROL FLOW GRAPH SSA (byte) WHITE#0 ← (number) 1 to:@8 memset: scope:[memset] from bitmap_clear bitmap_clear::@1 - (byte) memset::c#3 ← phi( bitmap_clear/(byte) memset::c#0 bitmap_clear::@1/(byte) memset::c#1 ) + (byte) memset::c#4 ← phi( bitmap_clear/(byte) memset::c#0 bitmap_clear::@1/(byte) memset::c#1 ) + (void*) memset::str#4 ← phi( bitmap_clear/(void*) memset::str#0 bitmap_clear::@1/(void*) memset::str#1 ) (word) memset::num#2 ← phi( bitmap_clear/(word) memset::num#0 bitmap_clear::@1/(word) memset::num#1 ) - (void*) memset::str#2 ← phi( bitmap_clear/(void*) memset::str#0 bitmap_clear::@1/(void*) memset::str#1 ) - (byte*~) memset::$0 ← ((byte*)) (void*) memset::str#2 - (byte*~) memset::$1 ← (byte*~) memset::$0 + (word) memset::num#2 - (byte*) memset::end#0 ← (byte*~) memset::$1 - (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#2 - to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - (void*) memset::str#4 ← phi( memset/(void*) memset::str#2 memset::@1/(void*) memset::str#4 ) - (byte*) memset::end#1 ← phi( memset/(byte*) memset::end#0 memset::@1/(byte*) memset::end#1 ) - (byte*) memset::dst#2 ← phi( memset/(byte*) memset::dst#0 memset::@1/(byte*) memset::dst#1 ) - (byte) memset::c#2 ← phi( memset/(byte) memset::c#3 memset::@1/(byte) memset::c#2 ) + (bool~) memset::$0 ← (word) memset::num#2 > (number) 0 + (bool~) memset::$1 ← ! (bool~) memset::$0 + if((bool~) memset::$1) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + (void*) memset::str#2 ← phi( memset/(void*) memset::str#4 memset::@4/(void*) memset::str#5 ) + (void*) memset::return#0 ← (void*) memset::str#2 + to:memset::@return +memset::@2: scope:[memset] from memset + (byte) memset::c#3 ← phi( memset/(byte) memset::c#4 ) + (word) memset::num#3 ← phi( memset/(word) memset::num#2 ) + (void*) memset::str#3 ← phi( memset/(void*) memset::str#4 ) + (byte*~) memset::$2 ← ((byte*)) (void*) memset::str#3 + (byte*~) memset::$3 ← (byte*~) memset::$2 + (word) memset::num#3 + (byte*) memset::end#0 ← (byte*~) memset::$3 + (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#3 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + (void*) memset::str#5 ← phi( memset::@2/(void*) memset::str#3 memset::@4/(void*) memset::str#5 ) + (byte*) memset::end#1 ← phi( memset::@2/(byte*) memset::end#0 memset::@4/(byte*) memset::end#1 ) + (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + (byte) memset::c#2 ← phi( memset::@2/(byte) memset::c#3 memset::@4/(byte) memset::c#2 ) *((byte*) memset::dst#2) ← (byte) memset::c#2 (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - (bool~) memset::$2 ← (byte*) memset::dst#1 != (byte*) memset::end#1 - if((bool~) memset::$2) goto memset::@1 - to:memset::@2 -memset::@2: scope:[memset] from memset::@1 - (void*) memset::str#3 ← phi( memset::@1/(void*) memset::str#4 ) - (void*) memset::return#0 ← (void*) memset::str#3 - to:memset::@return -memset::@return: scope:[memset] from memset::@2 - (void*) memset::return#4 ← phi( memset::@2/(void*) memset::return#0 ) + (bool~) memset::$4 ← (byte*) memset::dst#1 != (byte*) memset::end#1 + if((bool~) memset::$4) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + (void*) memset::return#4 ← phi( memset::@1/(void*) memset::return#0 ) (void*) memset::return#1 ← (void*) memset::return#4 return to:@return @@ -1077,17 +1086,21 @@ SYMBOL TABLE SSA (byte*) main::toD0181_screen#0 (byte*) main::toD0181_screen#1 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) -(byte*~) memset::$0 -(byte*~) memset::$1 -(bool~) memset::$2 +(bool~) memset::$0 +(bool~) memset::$1 +(byte*~) memset::$2 +(byte*~) memset::$3 +(bool~) memset::$4 (label) memset::@1 (label) memset::@2 +(label) memset::@4 (label) memset::@return (byte) memset::c (byte) memset::c#0 (byte) memset::c#1 (byte) memset::c#2 (byte) memset::c#3 +(byte) memset::c#4 (byte*) memset::dst (byte*) memset::dst#0 (byte*) memset::dst#1 @@ -1099,6 +1112,7 @@ SYMBOL TABLE SSA (word) memset::num#0 (word) memset::num#1 (word) memset::num#2 +(word) memset::num#3 (void*) memset::return (void*) memset::return#0 (void*) memset::return#1 @@ -1111,6 +1125,7 @@ SYMBOL TABLE SSA (void*) memset::str#2 (void*) memset::str#3 (void*) memset::str#4 +(void*) memset::str#5 (word()) sgn_u16((word) sgn_u16::w) (byte~) sgn_u16::$0 (number~) sgn_u16::$1 @@ -1139,6 +1154,7 @@ Adding number conversion cast (unumber) $10 in (byte) VIC_DEN#0 ← (number) $10 Adding number conversion cast (unumber) 8 in (byte) VIC_RSEL#0 ← (number) 8 Adding number conversion cast (unumber) 0 in (byte) BLACK#0 ← (number) 0 Adding number conversion cast (unumber) 1 in (byte) WHITE#0 ← (number) 1 +Adding number conversion cast (unumber) 0 in (bool~) memset::$0 ← (word) memset::num#2 > (number) 0 Adding number conversion cast (unumber) $80 in (byte) bitmap_init::bits#0 ← (number) $80 Adding number conversion cast (unumber) 1 in (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (number) 1 Adding number conversion cast (unumber) 0 in (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (number) 0 @@ -1202,8 +1218,8 @@ Inlining cast (byte) VIC_RSEL#0 ← (unumber)(number) 8 Inlining cast (byte*) D018#0 ← (byte*)(number) $d018 Inlining cast (byte) BLACK#0 ← (unumber)(number) 0 Inlining cast (byte) WHITE#0 ← (unumber)(number) 1 -Inlining cast (byte*~) memset::$0 ← (byte*)(void*) memset::str#2 -Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 +Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 +Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 Inlining cast (byte) bitmap_init::bits#0 ← (unumber)(number) $80 Inlining cast (byte) bitmap_init::bits#2 ← (unumber)(number) $80 Inlining cast (byte) memset::c#1 ← (unumber)(number) 0 @@ -1230,6 +1246,7 @@ Simplifying constant integer cast 8 Simplifying constant pointer cast (byte*) 53272 Simplifying constant integer cast 0 Simplifying constant integer cast 1 +Simplifying constant integer cast 0 Simplifying constant integer cast $80 Simplifying constant integer cast 1 Simplifying constant integer cast 0 @@ -1273,6 +1290,7 @@ Finalized unsigned number type (byte) $10 Finalized unsigned number type (byte) 8 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) $80 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 0 @@ -1330,13 +1348,17 @@ Inferred type updated to word in (unumber~) main::$11 ← (word~) main::$10 + (b Inferred type updated to byte in (unumber~) main::$12 ← (byte) main::a#2 + (byte) $20 Adding pointer type conversion cast (byte*) bitmap_plot::$0 in (byte*~) bitmap_plot::$0 ← (word~) bitmap_plot::$3 Successful SSA optimization PassNAddTypeConversionAssignment -Inversing boolean not [36] (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits#1 != (byte) 0 from [35] (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (byte) 0 -Inversing boolean not [56] (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte) 7 from [55] (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte) 7 -Inversing boolean not [142] (bool~) bitmap_line::$15 ← (word) bitmap_line::dy#3 >= (word) bitmap_line::e#1 from [141] (bool~) bitmap_line::$14 ← (word) bitmap_line::dy#3 < (word) bitmap_line::e#1 -Inversing boolean not [164] (bool~) bitmap_line::$21 ← (word) bitmap_line::dx#4 >= (word) bitmap_line::e1#1 from [163] (bool~) bitmap_line::$20 ← (word) bitmap_line::dx#4 < (word) bitmap_line::e1#1 +Inversing boolean not [9] (bool~) memset::$1 ← (word) memset::num#2 <= (byte) 0 from [8] (bool~) memset::$0 ← (word) memset::num#2 > (byte) 0 +Inversing boolean not [40] (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits#1 != (byte) 0 from [39] (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (byte) 0 +Inversing boolean not [60] (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte) 7 from [59] (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte) 7 +Inversing boolean not [146] (bool~) bitmap_line::$15 ← (word) bitmap_line::dy#3 >= (word) bitmap_line::e#1 from [145] (bool~) bitmap_line::$14 ← (word) bitmap_line::dy#3 < (word) bitmap_line::e#1 +Inversing boolean not [168] (bool~) bitmap_line::$21 ← (word) bitmap_line::dx#4 >= (word) bitmap_line::e1#1 from [167] (bool~) bitmap_line::$20 ← (word) bitmap_line::dx#4 < (word) bitmap_line::e1#1 Successful SSA optimization Pass2UnaryNotSimplification -Alias (byte*) memset::end#0 = (byte*~) memset::$1 -Alias (void*) memset::return#0 = (void*) memset::str#3 (void*) memset::str#4 (void*) memset::return#4 (void*) memset::return#1 +Alias (void*) memset::return#0 = (void*) memset::str#2 (void*) memset::return#4 (void*) memset::return#1 +Alias (void*) memset::str#3 = (void*) memset::str#4 +Alias (word) memset::num#2 = (word) memset::num#3 +Alias (byte) memset::c#3 = (byte) memset::c#4 +Alias (byte*) memset::end#0 = (byte*~) memset::$3 Alias (byte) bitmap_init::x#2 = (byte) bitmap_init::x#4 Alias (byte*) bitmap_init::gfx#4 = (byte*) bitmap_init::gfx#5 Alias (byte*) bitmap_gfx#25 = (byte*) bitmap_gfx#26 @@ -1444,7 +1466,7 @@ Alias (word) bitmap_line::sy#10 = (word) bitmap_line::sy#2 Successful SSA optimization Pass2AliasElimination Self Phi Eliminated (byte) memset::c#2 Self Phi Eliminated (byte*) memset::end#1 -Self Phi Eliminated (void*) memset::return#0 +Self Phi Eliminated (void*) memset::str#5 Self Phi Eliminated (byte*) bitmap_init::gfx#2 Self Phi Eliminated (byte*) bitmap_gfx#21 Self Phi Eliminated (byte*) bitmap_screen#20 @@ -1468,7 +1490,7 @@ Self Phi Eliminated (byte*) bitmap_screen#13 Successful SSA optimization Pass2SelfPhiElimination Identical Phi Values (byte) memset::c#2 (byte) memset::c#3 Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0 -Identical Phi Values (void*) memset::return#0 (void*) memset::str#2 +Identical Phi Values (void*) memset::str#5 (void*) memset::str#3 Identical Phi Values (byte*) bitmap_init::gfx#1 (byte*) bitmap_init::gfx#0 Identical Phi Values (byte*) bitmap_init::screen#1 (byte*) bitmap_init::screen#0 Identical Phi Values (byte*) bitmap_init::gfx#2 (byte*) bitmap_init::gfx#1 @@ -1507,25 +1529,28 @@ Identical Phi Values (byte*) bitmap_screen#13 (byte*) bitmap_screen#17 Identical Phi Values (byte*) bitmap_gfx#10 (byte*) bitmap_gfx#14 Identical Phi Values (byte*) bitmap_screen#10 (byte*) bitmap_screen#13 Successful SSA optimization Pass2IdenticalPhiElimination -Identified duplicate assignment right side [54] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 +Identical Phi Values (void*) memset::return#0 (void*) memset::str#3 +Successful SSA optimization Pass2IdenticalPhiElimination +Identified duplicate assignment right side [58] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) memset::$2 [16] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -Simple Condition (bool~) bitmap_init::$1 [37] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 -Simple Condition (bool~) bitmap_init::$2 [41] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 -Simple Condition (bool~) bitmap_init::$9 [57] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 -Simple Condition (bool~) bitmap_init::$11 [61] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 -Simple Condition (bool~) bitmap_line::$8 [126] if((word) bitmap_line::dx#0>(word) bitmap_line::dy#0) goto bitmap_line::@1 -Simple Condition (bool~) bitmap_line::$15 [143] if((word) bitmap_line::dy#0>=(word) bitmap_line::e#1) goto bitmap_line::@5 -Simple Condition (bool~) bitmap_line::$16 [146] if((word) bitmap_line::y#1!=(word) bitmap_line::y2#0) goto bitmap_line::@4 -Simple Condition (bool~) bitmap_line::$21 [165] if((word) bitmap_line::dx#0>=(word) bitmap_line::e1#1) goto bitmap_line::@10 -Simple Condition (bool~) bitmap_line::$22 [168] if((word) bitmap_line::x#13!=(word) bitmap_line::x2#0) goto bitmap_line::@9 -Simple Condition (bool~) abs_u16::$3 [177] if((byte) 0!=(byte~) abs_u16::$1) goto abs_u16::@1 -Simple Condition (bool~) sgn_u16::$2 [190] if((byte) 0!=(byte~) sgn_u16::$1) goto sgn_u16::@1 -Simple Condition (bool~) main::$15 [255] if((byte) main::i#1!=(byte) 8) goto main::@1 +Simple Condition (bool~) memset::$1 [10] if((word) memset::num#2<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [22] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 +Simple Condition (bool~) bitmap_init::$1 [41] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$2 [45] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$9 [61] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 +Simple Condition (bool~) bitmap_init::$11 [65] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 +Simple Condition (bool~) bitmap_line::$8 [130] if((word) bitmap_line::dx#0>(word) bitmap_line::dy#0) goto bitmap_line::@1 +Simple Condition (bool~) bitmap_line::$15 [147] if((word) bitmap_line::dy#0>=(word) bitmap_line::e#1) goto bitmap_line::@5 +Simple Condition (bool~) bitmap_line::$16 [150] if((word) bitmap_line::y#1!=(word) bitmap_line::y2#0) goto bitmap_line::@4 +Simple Condition (bool~) bitmap_line::$21 [169] if((word) bitmap_line::dx#0>=(word) bitmap_line::e1#1) goto bitmap_line::@10 +Simple Condition (bool~) bitmap_line::$22 [172] if((word) bitmap_line::x#13!=(word) bitmap_line::x2#0) goto bitmap_line::@9 +Simple Condition (bool~) abs_u16::$3 [181] if((byte) 0!=(byte~) abs_u16::$1) goto abs_u16::@1 +Simple Condition (bool~) sgn_u16::$2 [194] if((byte) 0!=(byte~) sgn_u16::$1) goto sgn_u16::@1 +Simple Condition (bool~) main::$15 [259] if((byte) main::i#1!=(byte) 8) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [24] (byte[$100]) bitmap_plot_ylo#0 ← { fill( $100, 0) } -Constant right-side identified [25] (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } -Constant right-side identified [26] (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } +Constant right-side identified [28] (byte[$100]) bitmap_plot_ylo#0 ← { fill( $100, 0) } +Constant right-side identified [29] (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } +Constant right-side identified [30] (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) D011#0 = (byte*) 53265 Constant (const byte) VIC_BMM#0 = $20 @@ -1564,21 +1589,21 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) bitmap_gfx#1 = bitmap_init::gfx#0 Constant (const byte*) bitmap_screen#1 = bitmap_init::screen#0 Successful SSA optimization Pass2ConstantIdentification -Constant value identified (void*)bitmap_screen#1 in [73] (void*) memset::str#0 ← (void*)(const byte*) bitmap_screen#1 -Constant value identified (void*)bitmap_gfx#1 in [79] (void*) memset::str#1 ← (void*)(const byte*) bitmap_gfx#1 -Constant value identified (word)main::toD0181_screen#0 in [220] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 -Constant value identified (word)main::toD0181_gfx#0 in [224] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 +Constant value identified (void*)bitmap_screen#1 in [77] (void*) memset::str#0 ← (void*)(const byte*) bitmap_screen#1 +Constant value identified (void*)bitmap_gfx#1 in [83] (void*) memset::str#1 ← (void*)(const byte*) bitmap_gfx#1 +Constant value identified (word)main::toD0181_screen#0 in [224] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 +Constant value identified (word)main::toD0181_gfx#0 in [228] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 Successful SSA optimization Pass2ConstantValues -if() condition always true - replacing block destination [257] if(true) goto main::@4 +if() condition always true - replacing block destination [261] if(true) goto main::@4 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [39] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ -Resolved ranged comparison value [41] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 -Resolved ranged next value [59] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ -Resolved ranged comparison value [61] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 -Simplifying expression containing zero bitmap_clear::$0 in [71] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0 +Resolved ranged next value [43] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ +Resolved ranged comparison value [45] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 +Resolved ranged next value [63] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ +Resolved ranged comparison value [65] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 +Simplifying expression containing zero bitmap_clear::$0 in [75] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0 Successful SSA optimization PassNSimplifyExpressionWithZero -Eliminating unused variable (void*) memset::return#2 and assignment [35] (void*) memset::return#2 ← (void*) memset::str#2 -Eliminating unused variable (void*) memset::return#3 and assignment [38] (void*) memset::return#3 ← (void*) memset::str#2 +Eliminating unused variable (void*) memset::return#2 and assignment [36] (void*) memset::return#2 ← (void*) memset::str#3 +Eliminating unused variable (void*) memset::return#3 and assignment [39] (void*) memset::return#3 ← (void*) memset::str#3 Eliminating unused constant (const byte) bitmap_clear::bgcol#0 Eliminating unused constant (const byte*) bitmap_screen#0 Eliminating unused constant (const byte*) bitmap_gfx#0 @@ -1601,10 +1626,10 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte~) bitmap_init::$7 = (byte~) bitmap_init::$3 Alias (byte) bitmap_clear::col#0 = (byte~) bitmap_clear::$0 Successful SSA optimization Pass2AliasElimination -Constant right-side identified [30] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 -Constant right-side identified [105] (byte*) COSTAB#0 ← (const byte[$180]) SINTAB#0 + (byte) $40 -Constant right-side identified [108] (byte~) main::$2 ← (const byte) VIC_BMM#0 | (const byte) VIC_DEN#0 -Constant right-side identified [135] (byte*~) main::$18 ← (const byte*) SCREEN#0 + (word) $3e7 +Constant right-side identified [31] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 +Constant right-side identified [106] (byte*) COSTAB#0 ← (const byte[$180]) SINTAB#0 + (byte) $40 +Constant right-side identified [109] (byte~) main::$2 ← (const byte) VIC_BMM#0 | (const byte) VIC_DEN#0 +Constant right-side identified [136] (byte*~) main::$18 ← (const byte*) SCREEN#0 + (word) $3e7 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) bitmap_clear::col#0 = bitmap_clear::fgcol#0*$10 Constant (const void*) memset::str#0 = (void*)bitmap_screen#1 @@ -1617,39 +1642,39 @@ Constant (const byte*) main::$18 = SCREEN#0+$3e7 Successful SSA optimization Pass2ConstantIdentification Constant (const byte) memset::c#0 = bitmap_clear::col#0 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [101] (byte~) main::$3 ← (const byte) main::$2 | (const byte) VIC_RSEL#0 -Constant right-side identified [104] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff -Constant right-side identified [107] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 +Constant right-side identified [102] (byte~) main::$3 ← (const byte) main::$2 | (const byte) VIC_RSEL#0 +Constant right-side identified [105] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff +Constant right-side identified [108] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$3 = main::$2|VIC_RSEL#0 Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&$3fff Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [101] (byte~) main::$4 ← (const byte) main::$3 | (byte) 3 -Constant right-side identified [103] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 -Constant right-side identified [105] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 +Constant right-side identified [102] (byte~) main::$4 ← (const byte) main::$3 | (byte) 3 +Constant right-side identified [104] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 +Constant right-side identified [106] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$4 = main::$3|3 Constant (const word) main::toD0181_$2#0 = main::toD0181_$1#0*4 Constant (const byte) main::toD0181_$6#0 = main::toD0181_$5#0/4 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [102] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 -Constant right-side identified [103] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f +Constant right-side identified [103] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 +Constant right-side identified [104] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::toD0181_$3#0 = >main::toD0181_$2#0 Constant (const byte) main::toD0181_$7#0 = main::toD0181_$6#0&$f Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [102] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 +Constant right-side identified [103] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0 Successful SSA optimization Pass2ConstantIdentification -Inlining Noop Cast [1] (byte*~) memset::$0 ← (byte*)(void*) memset::str#2 keeping memset::str#2 -Inlining Noop Cast [3] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 keeping memset::str#2 +Inlining Noop Cast [2] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 keeping memset::str#3 +Inlining Noop Cast [4] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 keeping memset::str#3 Successful SSA optimization Pass2NopCastInlining -Inlining Noop Cast [34] (byte*) bitmap_plot::plotter#0 ← (byte*)(word~) bitmap_plot::$3 keeping bitmap_plot::plotter#0 +Inlining Noop Cast [35] (byte*) bitmap_plot::plotter#0 ← (byte*)(word~) bitmap_plot::$3 keeping bitmap_plot::plotter#0 Successful SSA optimization Pass2NopCastInlining -Rewriting division to use shift [57] (word) bitmap_line::e1#0 ← (word) bitmap_line::dy#0 / (byte) 2 -Rewriting division to use shift [58] (word) bitmap_line::e#0 ← (word) bitmap_line::dx#0 / (byte) 2 +Rewriting division to use shift [58] (word) bitmap_line::e1#0 ← (word) bitmap_line::dy#0 / (byte) 2 +Rewriting division to use shift [59] (word) bitmap_line::e#0 ← (word) bitmap_line::dx#0 / (byte) 2 Successful SSA optimization Pass2MultiplyToShiftRewriting Inlining constant with var siblings (const word) memset::num#0 Inlining constant with var siblings (const byte) memset::c#1 @@ -1704,7 +1729,7 @@ Consolidated array index constant in assignment *(SINTAB#0+$20 + main::$12) Successful SSA optimization Pass2ConstantAdditionElimination Alias (byte) main::a#2 = (byte~) main::$9 (byte~) main::$12 Successful SSA optimization Pass2AliasElimination -Added new block during phi lifting memset::@4(between memset::@1 and memset::@1) +Added new block during phi lifting memset::@6(between memset::@4 and memset::@4) Added new block during phi lifting bitmap_init::@9(between bitmap_init::@2 and bitmap_init::@1) Added new block during phi lifting bitmap_init::@10(between bitmap_init::@1 and bitmap_init::@2) Added new block during phi lifting bitmap_init::@11(between bitmap_init::@6 and bitmap_init::@5) @@ -1733,7 +1758,7 @@ Adding NOP phi() at start of sgn_u16::@1 Adding NOP phi() at start of bitmap_clear Adding NOP phi() at start of bitmap_clear::@1 Adding NOP phi() at start of bitmap_clear::@2 -Adding NOP phi() at start of memset::@2 +Adding NOP phi() at start of memset::@1 Adding NOP phi() at start of bitmap_init Adding NOP phi() at start of bitmap_init::@3 Adding NOP phi() at start of bitmap_init::@4 @@ -1782,14 +1807,14 @@ Coalesced (already) [109] bitmap_line::y#25 ← bitmap_line::y#13 Coalesced [110] bitmap_line::e1#10 ← bitmap_line::e1#1 Coalesced [130] abs_u16::return#9 ← abs_u16::w#2 Coalesced [134] abs_u16::return#8 ← abs_u16::return#2 -Coalesced [150] memset::dst#4 ← memset::dst#1 -Coalesced [170] bitmap_init::yoffs#7 ← bitmap_init::yoffs#1 -Coalesced [175] bitmap_init::y#5 ← bitmap_init::y#1 -Coalesced [176] bitmap_init::yoffs#5 ← bitmap_init::yoffs#4 -Coalesced (already) [177] bitmap_init::yoffs#6 ← bitmap_init::yoffs#2 -Coalesced [178] bitmap_init::bits#5 ← bitmap_init::bits#4 -Coalesced [179] bitmap_init::x#5 ← bitmap_init::x#1 -Coalesced [180] bitmap_init::bits#6 ← bitmap_init::bits#1 +Coalesced [151] memset::dst#4 ← memset::dst#1 +Coalesced [171] bitmap_init::yoffs#7 ← bitmap_init::yoffs#1 +Coalesced [176] bitmap_init::y#5 ← bitmap_init::y#1 +Coalesced [177] bitmap_init::yoffs#5 ← bitmap_init::yoffs#4 +Coalesced (already) [178] bitmap_init::yoffs#6 ← bitmap_init::yoffs#2 +Coalesced [179] bitmap_init::bits#5 ← bitmap_init::bits#4 +Coalesced [180] bitmap_init::x#5 ← bitmap_init::x#1 +Coalesced [181] bitmap_init::bits#6 ← bitmap_init::bits#1 Coalesced down to 19 phi equivalence classes Culled Empty Block (label) @8 Culled Empty Block (label) @35 @@ -1807,14 +1832,16 @@ Culled Empty Block (label) bitmap_line::@25 Culled Empty Block (label) sgn_u16::@3 Culled Empty Block (label) abs_u16::@3 Culled Empty Block (label) bitmap_clear::@2 -Culled Empty Block (label) memset::@2 -Culled Empty Block (label) memset::@4 +Culled Empty Block (label) memset::@1 +Culled Empty Block (label) memset::@6 Culled Empty Block (label) bitmap_init::@3 Culled Empty Block (label) bitmap_init::@4 Culled Empty Block (label) bitmap_init::@11 Culled Empty Block (label) bitmap_init::@12 Culled Empty Block (label) bitmap_init::@9 Renumbering block @36 to @1 +Renumbering block memset::@2 to memset::@1 +Renumbering block memset::@4 to memset::@2 Renumbering block bitmap_init::@5 to bitmap_init::@3 Renumbering block bitmap_init::@6 to bitmap_init::@4 Renumbering block bitmap_init::@7 to bitmap_init::@5 @@ -2029,59 +2056,62 @@ bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 to:@return memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [95] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) + [95] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) [95] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 ) - [95] (void*) memset::str#2 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) - [96] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 - [97] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + [96] if((word) memset::num#2<=(byte) 0) goto memset::@return to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - [98] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) - [99] *((byte*) memset::dst#2) ← (byte) memset::c#3 - [100] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - [101] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 +memset::@1: scope:[memset] from memset + [97] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 + [98] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + to:memset::@2 +memset::@2: scope:[memset] from memset::@1 memset::@2 + [99] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 ) + [100] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [101] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [102] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 to:memset::@return -memset::@return: scope:[memset] from memset::@1 - [102] return +memset::@return: scope:[memset] from memset memset::@2 + [103] return to:@return bitmap_init: scope:[bitmap_init] from main - [103] phi() + [104] phi() to:bitmap_init::@1 bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2 - [104] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) - [104] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) - [105] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 - [106] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 - [107] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 + [105] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) + [105] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) + [106] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 + [107] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 + [108] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 to:bitmap_init::@2 bitmap_init::@6: scope:[bitmap_init] from bitmap_init::@1 - [108] phi() + [109] phi() to:bitmap_init::@2 bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6 - [109] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) - [110] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 - [111] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 + [110] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) + [111] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 + [112] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 to:bitmap_init::@3 bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4 - [112] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) - [112] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) - [113] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 - [114] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 - [115] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 - [116] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 - [117] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 - [118] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 - [119] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 + [113] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) + [113] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) + [114] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 + [115] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 + [116] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 + [117] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 + [118] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 + [119] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 + [120] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 to:bitmap_init::@5 bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@3 - [120] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 + [121] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 to:bitmap_init::@4 bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 - [121] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) - [122] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 - [123] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 + [122] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) + [123] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 + [124] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 to:bitmap_init::@return bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 - [124] return + [125] return to:@return @@ -2221,7 +2251,7 @@ VARIABLE REGISTER WEIGHTS (byte*) main::toD0181_screen (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (byte) memset::c -(byte) memset::c#3 1.5714285714285714 +(byte) memset::c#3 1.375 (byte*) memset::dst (byte*) memset::dst#1 16.5 (byte*) memset::dst#2 17.5 @@ -2232,7 +2262,7 @@ VARIABLE REGISTER WEIGHTS (word) memset::num#2 2.0 (void*) memset::return (void*) memset::str -(void*) memset::str#2 +(void*) memset::str#3 (word()) sgn_u16((word) sgn_u16::w) (byte~) sgn_u16::$0 4.0 (byte~) sgn_u16::$1 4.0 @@ -2257,8 +2287,8 @@ Initial phi equivalence classes [ sgn_u16::w#2 sgn_u16::w#0 sgn_u16::w#1 ] [ sgn_u16::return#4 ] [ abs_u16::return#4 abs_u16::return#2 abs_u16::w#2 abs_u16::w#0 abs_u16::w#1 ] -[ memset::str#2 ] [ memset::num#2 ] +[ memset::str#3 ] [ memset::c#3 ] [ memset::dst#2 memset::dst#3 memset::dst#1 ] [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] @@ -2302,8 +2332,8 @@ Complete equivalence classes [ sgn_u16::w#2 sgn_u16::w#0 sgn_u16::w#1 ] [ sgn_u16::return#4 ] [ abs_u16::return#4 abs_u16::return#2 abs_u16::w#2 abs_u16::w#0 abs_u16::w#1 ] -[ memset::str#2 ] [ memset::num#2 ] +[ memset::str#3 ] [ memset::c#3 ] [ memset::dst#2 memset::dst#3 memset::dst#1 ] [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] @@ -2346,8 +2376,8 @@ Allocated zp ZP_WORD:13 [ bitmap_plot::x#3 bitmap_plot::x#1 bitmap_plot::x#0 bit Allocated zp ZP_WORD:15 [ sgn_u16::w#2 sgn_u16::w#0 sgn_u16::w#1 ] Allocated zp ZP_WORD:17 [ sgn_u16::return#4 ] Allocated zp ZP_WORD:19 [ abs_u16::return#4 abs_u16::return#2 abs_u16::w#2 abs_u16::w#0 abs_u16::w#1 ] -Allocated zp ZP_WORD:21 [ memset::str#2 ] -Allocated zp ZP_WORD:23 [ memset::num#2 ] +Allocated zp ZP_WORD:21 [ memset::num#2 ] +Allocated zp ZP_WORD:23 [ memset::str#3 ] Allocated zp ZP_BYTE:25 [ memset::c#3 ] Allocated zp ZP_WORD:26 [ memset::dst#2 memset::dst#3 memset::dst#1 ] Allocated zp ZP_BYTE:28 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] @@ -2422,7 +2452,7 @@ main: { .label a = 2 .label i = 3 // [5] call bitmap_init - // [103] phi from main to bitmap_init [phi:main->bitmap_init] + // [104] phi from main to bitmap_init [phi:main->bitmap_init] bitmap_init_from_main: jsr bitmap_init // [6] phi from main to main::@4 [phi:main->main::@4] @@ -3026,16 +3056,16 @@ bitmap_clear: { // [95] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuz1=vbuc1 lda #col sta memset.c - // [95] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 - lda #<$3e8 - sta memset.num - lda #>$3e8 - sta memset.num+1 - // [95] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + // [95] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 + // [95] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#2] -- vwuz1=vwuc1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 jsr memset // [92] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] b1_from_bitmap_clear: @@ -3048,16 +3078,16 @@ bitmap_clear: { // [95] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuz1=vbuc1 lda #0 sta memset.c - // [95] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 - lda #<$1f40 - sta memset.num - lda #>$1f40 - sta memset.num+1 - // [95] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + // [95] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1 lda #<BITMAP sta memset.str lda #>BITMAP sta memset.str+1 + // [95] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#2] -- vwuz1=vwuc1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 jsr memset jmp breturn // bitmap_clear::@return @@ -3067,14 +3097,22 @@ bitmap_clear: { } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage($15) str, byte zeropage($19) c, word zeropage($17) num) +// memset(void* zeropage($17) str, byte zeropage($19) c, word zeropage($15) num) memset: { .label end = $44 .label dst = $1a - .label str = $15 - .label num = $17 + .label num = $15 + .label str = $17 .label c = $19 - // [96] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz3 + // [96] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 + lda num + beq breturn + lda num+1 + beq breturn + jmp b1 + // memset::@1 + b1: + // [97] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz3 lda str clc adc num @@ -3082,38 +3120,38 @@ memset: { lda str+1 adc num+1 sta end+1 - // [97] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 -- pbuz1=pbuz2 + // [98] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 -- pbuz1=pbuz2 lda str sta dst lda str+1 sta dst+1 - // [98] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - b1_from_memset: - b1_from_b1: - // [98] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - jmp b1 - // memset::@1 - b1: - // [99] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuz2 + // [99] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + b2_from_b1: + b2_from_b2: + // [99] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + jmp b2 + // memset::@2 + b2: + // [100] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuz2 lda c ldy #0 sta (dst),y - // [100] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [101] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [101] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [102] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1_from_b1 + bne b2_from_b2 lda dst cmp end - bne b1_from_b1 + bne b2_from_b2 jmp breturn // memset::@return breturn: - // [102] return + // [103] return rts } // bitmap_init @@ -3127,103 +3165,103 @@ bitmap_init: { .label x = $1d .label y = $1e .label yoffs = $1f - // [104] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + // [105] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] b1_from_bitmap_init: - // [104] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuz1=vbuc1 + // [105] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuz1=vbuc1 lda #0 sta x - // [104] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuz1=vbuc1 + // [105] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuz1=vbuc1 lda #$80 sta bits jmp b1 - // [104] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + // [105] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] b1_from_b2: - // [104] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - // [104] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + // [105] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + // [105] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy jmp b1 // bitmap_init::@1 b1: - // [105] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuz1=vbuz2 + // [106] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuz1=vbuz2 lda bits ldy x sta bitmap_plot_bit,y - // [106] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuz1=vbuz1_ror_1 + // [107] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuz1=vbuz1_ror_1 lsr bits - // [107] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuz1_neq_0_then_la1 + // [108] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuz1_neq_0_then_la1 lda bits cmp #0 bne b6_from_b1 - // [109] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + // [110] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] b2_from_b1: - // [109] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuz1=vbuc1 + // [110] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuz1=vbuc1 lda #$80 sta bits jmp b2 - // [108] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + // [109] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] b6_from_b1: jmp b6 // bitmap_init::@6 b6: - // [109] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + // [110] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] b2_from_b6: - // [109] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + // [110] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy jmp b2 // bitmap_init::@2 b2: - // [110] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuz1=_inc_vbuz1 + // [111] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuz1=_inc_vbuz1 inc x - // [111] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuz1_neq_0_then_la1 + // [112] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuz1_neq_0_then_la1 lda x cmp #0 bne b1_from_b2 - // [112] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + // [113] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] b3_from_b2: - // [112] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + // [113] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #<BITMAP sta yoffs lda #>BITMAP sta yoffs+1 - // [112] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuz1=vbuc1 + // [113] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuz1=vbuc1 lda #0 sta y jmp b3 - // [112] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + // [113] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] b3_from_b4: - // [112] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - // [112] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + // [113] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + // [113] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy jmp b3 // bitmap_init::@3 b3: - // [113] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 + // [114] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 lda #7 and y sta _7 - // [114] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuz1=_lo_pbuz2 + // [115] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuz1=_lo_pbuz2 lda yoffs sta _4 - // [115] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuz1=vbuz2_bor_vbuz3 + // [116] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuz1=vbuz2_bor_vbuz3 lda _7 ora _4 sta _5 - // [116] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuz1=vbuz2 + // [117] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuz1=vbuz2 lda _5 ldy y sta bitmap_plot_ylo,y - // [117] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuz1=_hi_pbuz2 + // [118] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuz1=_hi_pbuz2 lda yoffs+1 sta _6 - // [118] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuz1=vbuz2 + // [119] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuz1=vbuz2 lda _6 ldy y sta bitmap_plot_yhi,y - // [119] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + // [120] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp _7 bne b4_from_b3 jmp b5 // bitmap_init::@5 b5: - // [120] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + // [121] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda yoffs adc #<$28*8 @@ -3231,23 +3269,23 @@ bitmap_init: { lda yoffs+1 adc #>$28*8 sta yoffs+1 - // [121] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + // [122] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] b4_from_b3: b4_from_b5: - // [121] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + // [122] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy jmp b4 // bitmap_init::@4 b4: - // [122] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuz1=_inc_vbuz1 + // [123] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuz1=_inc_vbuz1 inc y - // [123] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuz1_neq_0_then_la1 + // [124] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuz1_neq_0_then_la1 lda y cmp #0 bne b3_from_b4 jmp breturn // bitmap_init::@return breturn: - // [124] return + // [125] return rts } // File Data @@ -3316,13 +3354,14 @@ Removing always clobbered register reg byte y as potential for zp ZP_BYTE:3 [ ma Statement [77] (byte~) sgn_u16::$0 ← > (word) sgn_u16::w#2 [ sgn_u16::$0 ] ( main:2::bitmap_line:18::sgn_u16:32 [ main::a#2 main::i#2 bitmap_line::x1#0 bitmap_line::y1#0 bitmap_line::x2#0 bitmap_line::y2#0 bitmap_line::dx#0 bitmap_line::dy#0 sgn_u16::$0 ] main:2::bitmap_line:18::sgn_u16:36 [ main::a#2 main::i#2 bitmap_line::x1#0 bitmap_line::y1#0 bitmap_line::x2#0 bitmap_line::y2#0 bitmap_line::dx#0 bitmap_line::dy#0 bitmap_line::sx#0 sgn_u16::$0 ] ) always clobbers reg byte a Statement [84] (byte~) abs_u16::$0 ← > (word) abs_u16::w#2 [ abs_u16::w#2 abs_u16::$0 ] ( main:2::bitmap_line:18::abs_u16:24 [ main::a#2 main::i#2 bitmap_line::x1#0 bitmap_line::y1#0 bitmap_line::x2#0 bitmap_line::y2#0 abs_u16::w#2 abs_u16::$0 ] main:2::bitmap_line:18::abs_u16:28 [ main::a#2 main::i#2 bitmap_line::x1#0 bitmap_line::y1#0 bitmap_line::x2#0 bitmap_line::y2#0 bitmap_line::dx#0 abs_u16::w#2 abs_u16::$0 ] ) always clobbers reg byte a Statement [87] (word) abs_u16::return#2 ← - (word) abs_u16::w#2 [ abs_u16::return#2 ] ( main:2::bitmap_line:18::abs_u16:24 [ main::a#2 main::i#2 bitmap_line::x1#0 bitmap_line::y1#0 bitmap_line::x2#0 bitmap_line::y2#0 abs_u16::return#2 ] main:2::bitmap_line:18::abs_u16:28 [ main::a#2 main::i#2 bitmap_line::x1#0 bitmap_line::y1#0 bitmap_line::x2#0 bitmap_line::y2#0 bitmap_line::dx#0 abs_u16::return#2 ] ) always clobbers reg byte a -Statement [96] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:2::bitmap_clear:7::memset:91 [ memset::str#2 memset::c#3 memset::end#0 ] main:2::bitmap_clear:7::memset:93 [ memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [96] if((word) memset::num#2<=(byte) 0) goto memset::@return [ memset::num#2 memset::str#3 memset::c#3 ] ( main:2::bitmap_clear:7::memset:91 [ memset::num#2 memset::str#3 memset::c#3 ] main:2::bitmap_clear:7::memset:93 [ memset::num#2 memset::str#3 memset::c#3 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:25 [ memset::c#3 ] -Statement [97] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:2::bitmap_clear:7::memset:91 [ memset::c#3 memset::end#0 memset::dst#3 ] main:2::bitmap_clear:7::memset:93 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a -Statement [99] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:2::bitmap_clear:7::memset:91 [ memset::c#3 memset::end#0 memset::dst#2 ] main:2::bitmap_clear:7::memset:93 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [97] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 [ memset::str#3 memset::c#3 memset::end#0 ] ( main:2::bitmap_clear:7::memset:91 [ memset::str#3 memset::c#3 memset::end#0 ] main:2::bitmap_clear:7::memset:93 [ memset::str#3 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [98] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:2::bitmap_clear:7::memset:91 [ memset::c#3 memset::end#0 memset::dst#3 ] main:2::bitmap_clear:7::memset:93 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [100] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:2::bitmap_clear:7::memset:91 [ memset::c#3 memset::end#0 memset::dst#2 ] main:2::bitmap_clear:7::memset:93 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:25 [ memset::c#3 ] -Statement [101] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:2::bitmap_clear:7::memset:91 [ memset::c#3 memset::end#0 memset::dst#1 ] main:2::bitmap_clear:7::memset:93 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a -Statement [120] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:2::bitmap_init:5 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a +Statement [102] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:2::bitmap_clear:7::memset:91 [ memset::c#3 memset::end#0 memset::dst#1 ] main:2::bitmap_clear:7::memset:93 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [121] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:2::bitmap_init:5 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:30 [ bitmap_init::y#2 bitmap_init::y#1 ] Statement [8] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [10] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a @@ -3376,12 +3415,13 @@ Statement [74] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plot Statement [77] (byte~) sgn_u16::$0 ← > (word) sgn_u16::w#2 [ sgn_u16::$0 ] ( main:2::bitmap_line:18::sgn_u16:32 [ main::a#2 main::i#2 bitmap_line::x1#0 bitmap_line::y1#0 bitmap_line::x2#0 bitmap_line::y2#0 bitmap_line::dx#0 bitmap_line::dy#0 sgn_u16::$0 ] main:2::bitmap_line:18::sgn_u16:36 [ main::a#2 main::i#2 bitmap_line::x1#0 bitmap_line::y1#0 bitmap_line::x2#0 bitmap_line::y2#0 bitmap_line::dx#0 bitmap_line::dy#0 bitmap_line::sx#0 sgn_u16::$0 ] ) always clobbers reg byte a Statement [84] (byte~) abs_u16::$0 ← > (word) abs_u16::w#2 [ abs_u16::w#2 abs_u16::$0 ] ( main:2::bitmap_line:18::abs_u16:24 [ main::a#2 main::i#2 bitmap_line::x1#0 bitmap_line::y1#0 bitmap_line::x2#0 bitmap_line::y2#0 abs_u16::w#2 abs_u16::$0 ] main:2::bitmap_line:18::abs_u16:28 [ main::a#2 main::i#2 bitmap_line::x1#0 bitmap_line::y1#0 bitmap_line::x2#0 bitmap_line::y2#0 bitmap_line::dx#0 abs_u16::w#2 abs_u16::$0 ] ) always clobbers reg byte a Statement [87] (word) abs_u16::return#2 ← - (word) abs_u16::w#2 [ abs_u16::return#2 ] ( main:2::bitmap_line:18::abs_u16:24 [ main::a#2 main::i#2 bitmap_line::x1#0 bitmap_line::y1#0 bitmap_line::x2#0 bitmap_line::y2#0 abs_u16::return#2 ] main:2::bitmap_line:18::abs_u16:28 [ main::a#2 main::i#2 bitmap_line::x1#0 bitmap_line::y1#0 bitmap_line::x2#0 bitmap_line::y2#0 bitmap_line::dx#0 abs_u16::return#2 ] ) always clobbers reg byte a -Statement [96] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:2::bitmap_clear:7::memset:91 [ memset::str#2 memset::c#3 memset::end#0 ] main:2::bitmap_clear:7::memset:93 [ memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a -Statement [97] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:2::bitmap_clear:7::memset:91 [ memset::c#3 memset::end#0 memset::dst#3 ] main:2::bitmap_clear:7::memset:93 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a -Statement [99] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:2::bitmap_clear:7::memset:91 [ memset::c#3 memset::end#0 memset::dst#2 ] main:2::bitmap_clear:7::memset:93 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y -Statement [101] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:2::bitmap_clear:7::memset:91 [ memset::c#3 memset::end#0 memset::dst#1 ] main:2::bitmap_clear:7::memset:93 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a -Statement [113] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ( main:2::bitmap_init:5 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ) always clobbers reg byte a -Statement [120] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:2::bitmap_init:5 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a +Statement [96] if((word) memset::num#2<=(byte) 0) goto memset::@return [ memset::num#2 memset::str#3 memset::c#3 ] ( main:2::bitmap_clear:7::memset:91 [ memset::num#2 memset::str#3 memset::c#3 ] main:2::bitmap_clear:7::memset:93 [ memset::num#2 memset::str#3 memset::c#3 ] ) always clobbers reg byte a +Statement [97] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 [ memset::str#3 memset::c#3 memset::end#0 ] ( main:2::bitmap_clear:7::memset:91 [ memset::str#3 memset::c#3 memset::end#0 ] main:2::bitmap_clear:7::memset:93 [ memset::str#3 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [98] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:2::bitmap_clear:7::memset:91 [ memset::c#3 memset::end#0 memset::dst#3 ] main:2::bitmap_clear:7::memset:93 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [100] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:2::bitmap_clear:7::memset:91 [ memset::c#3 memset::end#0 memset::dst#2 ] main:2::bitmap_clear:7::memset:93 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [102] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:2::bitmap_clear:7::memset:91 [ memset::c#3 memset::end#0 memset::dst#1 ] main:2::bitmap_clear:7::memset:93 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [114] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ( main:2::bitmap_init:5 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ) always clobbers reg byte a +Statement [121] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:2::bitmap_init:5 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a Statement [8] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [10] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [12] (word~) main::$6 ← (word)*((const byte*) COSTAB#0 + (byte) main::a#2) [ main::a#2 main::i#2 main::$6 ] ( main:2 [ main::a#2 main::i#2 main::$6 ] ) always clobbers reg byte a @@ -3433,12 +3473,13 @@ Statement [74] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plot Statement [77] (byte~) sgn_u16::$0 ← > (word) sgn_u16::w#2 [ sgn_u16::$0 ] ( main:2::bitmap_line:18::sgn_u16:32 [ main::a#2 main::i#2 bitmap_line::x1#0 bitmap_line::y1#0 bitmap_line::x2#0 bitmap_line::y2#0 bitmap_line::dx#0 bitmap_line::dy#0 sgn_u16::$0 ] main:2::bitmap_line:18::sgn_u16:36 [ main::a#2 main::i#2 bitmap_line::x1#0 bitmap_line::y1#0 bitmap_line::x2#0 bitmap_line::y2#0 bitmap_line::dx#0 bitmap_line::dy#0 bitmap_line::sx#0 sgn_u16::$0 ] ) always clobbers reg byte a Statement [84] (byte~) abs_u16::$0 ← > (word) abs_u16::w#2 [ abs_u16::w#2 abs_u16::$0 ] ( main:2::bitmap_line:18::abs_u16:24 [ main::a#2 main::i#2 bitmap_line::x1#0 bitmap_line::y1#0 bitmap_line::x2#0 bitmap_line::y2#0 abs_u16::w#2 abs_u16::$0 ] main:2::bitmap_line:18::abs_u16:28 [ main::a#2 main::i#2 bitmap_line::x1#0 bitmap_line::y1#0 bitmap_line::x2#0 bitmap_line::y2#0 bitmap_line::dx#0 abs_u16::w#2 abs_u16::$0 ] ) always clobbers reg byte a Statement [87] (word) abs_u16::return#2 ← - (word) abs_u16::w#2 [ abs_u16::return#2 ] ( main:2::bitmap_line:18::abs_u16:24 [ main::a#2 main::i#2 bitmap_line::x1#0 bitmap_line::y1#0 bitmap_line::x2#0 bitmap_line::y2#0 abs_u16::return#2 ] main:2::bitmap_line:18::abs_u16:28 [ main::a#2 main::i#2 bitmap_line::x1#0 bitmap_line::y1#0 bitmap_line::x2#0 bitmap_line::y2#0 bitmap_line::dx#0 abs_u16::return#2 ] ) always clobbers reg byte a -Statement [96] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:2::bitmap_clear:7::memset:91 [ memset::str#2 memset::c#3 memset::end#0 ] main:2::bitmap_clear:7::memset:93 [ memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a -Statement [97] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:2::bitmap_clear:7::memset:91 [ memset::c#3 memset::end#0 memset::dst#3 ] main:2::bitmap_clear:7::memset:93 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a -Statement [99] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:2::bitmap_clear:7::memset:91 [ memset::c#3 memset::end#0 memset::dst#2 ] main:2::bitmap_clear:7::memset:93 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y -Statement [101] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:2::bitmap_clear:7::memset:91 [ memset::c#3 memset::end#0 memset::dst#1 ] main:2::bitmap_clear:7::memset:93 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a -Statement [113] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ( main:2::bitmap_init:5 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ) always clobbers reg byte a -Statement [120] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:2::bitmap_init:5 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a +Statement [96] if((word) memset::num#2<=(byte) 0) goto memset::@return [ memset::num#2 memset::str#3 memset::c#3 ] ( main:2::bitmap_clear:7::memset:91 [ memset::num#2 memset::str#3 memset::c#3 ] main:2::bitmap_clear:7::memset:93 [ memset::num#2 memset::str#3 memset::c#3 ] ) always clobbers reg byte a +Statement [97] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 [ memset::str#3 memset::c#3 memset::end#0 ] ( main:2::bitmap_clear:7::memset:91 [ memset::str#3 memset::c#3 memset::end#0 ] main:2::bitmap_clear:7::memset:93 [ memset::str#3 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [98] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:2::bitmap_clear:7::memset:91 [ memset::c#3 memset::end#0 memset::dst#3 ] main:2::bitmap_clear:7::memset:93 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [100] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:2::bitmap_clear:7::memset:91 [ memset::c#3 memset::end#0 memset::dst#2 ] main:2::bitmap_clear:7::memset:93 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [102] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:2::bitmap_clear:7::memset:91 [ memset::c#3 memset::end#0 memset::dst#1 ] main:2::bitmap_clear:7::memset:93 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [114] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ( main:2::bitmap_init:5 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ) always clobbers reg byte a +Statement [121] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:2::bitmap_init:5 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a Potential registers zp ZP_BYTE:2 [ main::a#2 main::a#1 ] : zp ZP_BYTE:2 , reg byte x , Potential registers zp ZP_BYTE:3 [ main::i#2 main::i#1 ] : zp ZP_BYTE:3 , Potential registers zp ZP_WORD:4 [ bitmap_line::e#3 bitmap_line::e#0 bitmap_line::e#6 bitmap_line::e#1 bitmap_line::e#2 ] : zp ZP_WORD:4 , @@ -3450,8 +3491,8 @@ Potential registers zp ZP_WORD:13 [ bitmap_plot::x#3 bitmap_plot::x#1 bitmap_plo Potential registers zp ZP_WORD:15 [ sgn_u16::w#2 sgn_u16::w#0 sgn_u16::w#1 ] : zp ZP_WORD:15 , Potential registers zp ZP_WORD:17 [ sgn_u16::return#4 ] : zp ZP_WORD:17 , Potential registers zp ZP_WORD:19 [ abs_u16::return#4 abs_u16::return#2 abs_u16::w#2 abs_u16::w#0 abs_u16::w#1 ] : zp ZP_WORD:19 , -Potential registers zp ZP_WORD:21 [ memset::str#2 ] : zp ZP_WORD:21 , -Potential registers zp ZP_WORD:23 [ memset::num#2 ] : zp ZP_WORD:23 , +Potential registers zp ZP_WORD:21 [ memset::num#2 ] : zp ZP_WORD:21 , +Potential registers zp ZP_WORD:23 [ memset::str#3 ] : zp ZP_WORD:23 , Potential registers zp ZP_BYTE:25 [ memset::c#3 ] : zp ZP_BYTE:25 , reg byte x , Potential registers zp ZP_WORD:26 [ memset::dst#2 memset::dst#3 memset::dst#1 ] : zp ZP_WORD:26 , Potential registers zp ZP_BYTE:28 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] : zp ZP_BYTE:28 , reg byte a , reg byte x , reg byte y , @@ -3489,40 +3530,40 @@ Uplift Scope [bitmap_line] 658.11: zp ZP_WORD:6 [ bitmap_line::y#13 bitmap_line: Uplift Scope [bitmap_plot] 460: zp ZP_WORD:13 [ bitmap_plot::x#3 bitmap_plot::x#1 bitmap_plot::x#0 bitmap_plot::x#2 ] 412: zp ZP_BYTE:12 [ bitmap_plot::y#3 bitmap_plot::y#1 bitmap_plot::y#0 bitmap_plot::y#2 ] 4: zp ZP_WORD:59 [ bitmap_plot::$1 ] 4: zp ZP_BYTE:63 [ bitmap_plot::$2 ] 3: zp ZP_WORD:61 [ bitmap_plot::plotter#1 ] 1: zp ZP_WORD:57 [ bitmap_plot::plotter#0 ] Uplift Scope [bitmap_init] 39.88: zp ZP_WORD:31 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] 34.83: zp ZP_BYTE:28 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] 22: zp ZP_BYTE:29 [ bitmap_init::x#2 bitmap_init::x#1 ] 22: zp ZP_BYTE:30 [ bitmap_init::y#2 bitmap_init::y#1 ] 22: zp ZP_BYTE:71 [ bitmap_init::$4 ] 22: zp ZP_BYTE:72 [ bitmap_init::$5 ] 22: zp ZP_BYTE:73 [ bitmap_init::$6 ] 5.5: zp ZP_BYTE:70 [ bitmap_init::$7 ] Uplift Scope [main] 22: zp ZP_WORD:33 [ main::$6 ] 22: zp ZP_WORD:35 [ main::$10 ] 18.94: zp ZP_BYTE:3 [ main::i#2 main::i#1 ] 10.08: zp ZP_BYTE:2 [ main::a#2 main::a#1 ] -Uplift Scope [memset] 38: zp ZP_WORD:26 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:68 [ memset::end#0 ] 2: zp ZP_WORD:23 [ memset::num#2 ] 1.57: zp ZP_BYTE:25 [ memset::c#3 ] 0: zp ZP_WORD:21 [ memset::str#2 ] +Uplift Scope [memset] 38: zp ZP_WORD:26 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:68 [ memset::end#0 ] 2: zp ZP_WORD:21 [ memset::num#2 ] 1.38: zp ZP_BYTE:25 [ memset::c#3 ] 0: zp ZP_WORD:23 [ memset::str#3 ] Uplift Scope [abs_u16] 16.5: zp ZP_WORD:19 [ abs_u16::return#4 abs_u16::return#2 abs_u16::w#2 abs_u16::w#0 abs_u16::w#1 ] 4: zp ZP_WORD:41 [ abs_u16::return#0 ] 4: zp ZP_WORD:45 [ abs_u16::return#1 ] 4: zp ZP_BYTE:66 [ abs_u16::$0 ] 4: zp ZP_BYTE:67 [ abs_u16::$1 ] Uplift Scope [sgn_u16] 14: zp ZP_WORD:15 [ sgn_u16::w#2 sgn_u16::w#0 sgn_u16::w#1 ] 4: zp ZP_WORD:49 [ sgn_u16::return#0 ] 4: zp ZP_WORD:53 [ sgn_u16::return#1 ] 4: zp ZP_BYTE:64 [ sgn_u16::$0 ] 4: zp ZP_BYTE:65 [ sgn_u16::$1 ] 1: zp ZP_WORD:17 [ sgn_u16::return#4 ] Uplift Scope [bitmap_clear] Uplift Scope [] -Uplifting [bitmap_line] best 33582 combination zp ZP_WORD:6 [ bitmap_line::y#13 bitmap_line::y#6 bitmap_line::y#11 bitmap_line::y#3 bitmap_line::y1#0 bitmap_line::y#1 bitmap_line::y#2 ] zp ZP_WORD:8 [ bitmap_line::x#6 bitmap_line::x#5 bitmap_line::x#13 bitmap_line::x#11 bitmap_line::x1#0 bitmap_line::x#10 bitmap_line::x#1 ] zp ZP_WORD:4 [ bitmap_line::e#3 bitmap_line::e#0 bitmap_line::e#6 bitmap_line::e#1 bitmap_line::e#2 ] zp ZP_WORD:10 [ bitmap_line::e1#3 bitmap_line::e1#0 bitmap_line::e1#6 bitmap_line::e1#2 bitmap_line::e1#1 ] zp ZP_WORD:47 [ bitmap_line::dy#0 ] zp ZP_WORD:43 [ bitmap_line::dx#0 ] zp ZP_WORD:55 [ bitmap_line::sy#0 ] zp ZP_WORD:51 [ bitmap_line::sx#0 ] zp ZP_WORD:39 [ bitmap_line::y2#0 ] zp ZP_WORD:37 [ bitmap_line::x2#0 ] -Uplifting [bitmap_plot] best 33374 combination zp ZP_WORD:13 [ bitmap_plot::x#3 bitmap_plot::x#1 bitmap_plot::x#0 bitmap_plot::x#2 ] reg byte x [ bitmap_plot::y#3 bitmap_plot::y#1 bitmap_plot::y#0 bitmap_plot::y#2 ] zp ZP_WORD:59 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp ZP_WORD:61 [ bitmap_plot::plotter#1 ] zp ZP_WORD:57 [ bitmap_plot::plotter#0 ] -Uplifting [bitmap_init] best 32864 combination zp ZP_WORD:31 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp ZP_BYTE:72 [ bitmap_init::$5 ] zp ZP_BYTE:73 [ bitmap_init::$6 ] zp ZP_BYTE:70 [ bitmap_init::$7 ] +Uplifting [bitmap_line] best 33596 combination zp ZP_WORD:6 [ bitmap_line::y#13 bitmap_line::y#6 bitmap_line::y#11 bitmap_line::y#3 bitmap_line::y1#0 bitmap_line::y#1 bitmap_line::y#2 ] zp ZP_WORD:8 [ bitmap_line::x#6 bitmap_line::x#5 bitmap_line::x#13 bitmap_line::x#11 bitmap_line::x1#0 bitmap_line::x#10 bitmap_line::x#1 ] zp ZP_WORD:4 [ bitmap_line::e#3 bitmap_line::e#0 bitmap_line::e#6 bitmap_line::e#1 bitmap_line::e#2 ] zp ZP_WORD:10 [ bitmap_line::e1#3 bitmap_line::e1#0 bitmap_line::e1#6 bitmap_line::e1#2 bitmap_line::e1#1 ] zp ZP_WORD:47 [ bitmap_line::dy#0 ] zp ZP_WORD:43 [ bitmap_line::dx#0 ] zp ZP_WORD:55 [ bitmap_line::sy#0 ] zp ZP_WORD:51 [ bitmap_line::sx#0 ] zp ZP_WORD:39 [ bitmap_line::y2#0 ] zp ZP_WORD:37 [ bitmap_line::x2#0 ] +Uplifting [bitmap_plot] best 33388 combination zp ZP_WORD:13 [ bitmap_plot::x#3 bitmap_plot::x#1 bitmap_plot::x#0 bitmap_plot::x#2 ] reg byte x [ bitmap_plot::y#3 bitmap_plot::y#1 bitmap_plot::y#0 bitmap_plot::y#2 ] zp ZP_WORD:59 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp ZP_WORD:61 [ bitmap_plot::plotter#1 ] zp ZP_WORD:57 [ bitmap_plot::plotter#0 ] +Uplifting [bitmap_init] best 32878 combination zp ZP_WORD:31 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp ZP_BYTE:72 [ bitmap_init::$5 ] zp ZP_BYTE:73 [ bitmap_init::$6 ] zp ZP_BYTE:70 [ bitmap_init::$7 ] Limited combination testing to 100 combinations of 15360 possible. -Uplifting [main] best 32864 combination zp ZP_WORD:33 [ main::$6 ] zp ZP_WORD:35 [ main::$10 ] zp ZP_BYTE:3 [ main::i#2 main::i#1 ] zp ZP_BYTE:2 [ main::a#2 main::a#1 ] -Uplifting [memset] best 32848 combination zp ZP_WORD:26 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:68 [ memset::end#0 ] zp ZP_WORD:23 [ memset::num#2 ] reg byte x [ memset::c#3 ] zp ZP_WORD:21 [ memset::str#2 ] -Uplifting [abs_u16] best 32836 combination zp ZP_WORD:19 [ abs_u16::return#4 abs_u16::return#2 abs_u16::w#2 abs_u16::w#0 abs_u16::w#1 ] zp ZP_WORD:41 [ abs_u16::return#0 ] zp ZP_WORD:45 [ abs_u16::return#1 ] reg byte a [ abs_u16::$0 ] reg byte a [ abs_u16::$1 ] -Uplifting [sgn_u16] best 32824 combination zp ZP_WORD:15 [ sgn_u16::w#2 sgn_u16::w#0 sgn_u16::w#1 ] zp ZP_WORD:49 [ sgn_u16::return#0 ] zp ZP_WORD:53 [ sgn_u16::return#1 ] reg byte a [ sgn_u16::$0 ] reg byte a [ sgn_u16::$1 ] zp ZP_WORD:17 [ sgn_u16::return#4 ] -Uplifting [bitmap_clear] best 32824 combination -Uplifting [] best 32824 combination +Uplifting [main] best 32878 combination zp ZP_WORD:33 [ main::$6 ] zp ZP_WORD:35 [ main::$10 ] zp ZP_BYTE:3 [ main::i#2 main::i#1 ] zp ZP_BYTE:2 [ main::a#2 main::a#1 ] +Uplifting [memset] best 32862 combination zp ZP_WORD:26 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:68 [ memset::end#0 ] zp ZP_WORD:21 [ memset::num#2 ] reg byte x [ memset::c#3 ] zp ZP_WORD:23 [ memset::str#3 ] +Uplifting [abs_u16] best 32850 combination zp ZP_WORD:19 [ abs_u16::return#4 abs_u16::return#2 abs_u16::w#2 abs_u16::w#0 abs_u16::w#1 ] zp ZP_WORD:41 [ abs_u16::return#0 ] zp ZP_WORD:45 [ abs_u16::return#1 ] reg byte a [ abs_u16::$0 ] reg byte a [ abs_u16::$1 ] +Uplifting [sgn_u16] best 32838 combination zp ZP_WORD:15 [ sgn_u16::w#2 sgn_u16::w#0 sgn_u16::w#1 ] zp ZP_WORD:49 [ sgn_u16::return#0 ] zp ZP_WORD:53 [ sgn_u16::return#1 ] reg byte a [ sgn_u16::$0 ] reg byte a [ sgn_u16::$1 ] zp ZP_WORD:17 [ sgn_u16::return#4 ] +Uplifting [bitmap_clear] best 32838 combination +Uplifting [] best 32838 combination Attempting to uplift remaining variables inzp ZP_BYTE:72 [ bitmap_init::$5 ] -Uplifting [bitmap_init] best 32764 combination reg byte a [ bitmap_init::$5 ] +Uplifting [bitmap_init] best 32778 combination reg byte a [ bitmap_init::$5 ] Attempting to uplift remaining variables inzp ZP_BYTE:73 [ bitmap_init::$6 ] -Uplifting [bitmap_init] best 32704 combination reg byte a [ bitmap_init::$6 ] +Uplifting [bitmap_init] best 32718 combination reg byte a [ bitmap_init::$6 ] Attempting to uplift remaining variables inzp ZP_BYTE:3 [ main::i#2 main::i#1 ] -Uplifting [main] best 32704 combination zp ZP_BYTE:3 [ main::i#2 main::i#1 ] +Uplifting [main] best 32718 combination zp ZP_BYTE:3 [ main::i#2 main::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::a#2 main::a#1 ] -Uplifting [main] best 32704 combination zp ZP_BYTE:2 [ main::a#2 main::a#1 ] +Uplifting [main] best 32718 combination zp ZP_BYTE:2 [ main::a#2 main::a#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:70 [ bitmap_init::$7 ] -Uplifting [bitmap_init] best 32704 combination zp ZP_BYTE:70 [ bitmap_init::$7 ] +Uplifting [bitmap_init] best 32718 combination zp ZP_BYTE:70 [ bitmap_init::$7 ] Coalescing zero page register with common assignment [ zp ZP_WORD:8 [ bitmap_line::x#6 bitmap_line::x#5 bitmap_line::x#13 bitmap_line::x#11 bitmap_line::x1#0 bitmap_line::x#10 bitmap_line::x#1 ] ] with [ zp ZP_WORD:13 [ bitmap_plot::x#3 bitmap_plot::x#1 bitmap_plot::x#0 bitmap_plot::x#2 ] ] - score: 3 Coalescing zero page register with common assignment [ zp ZP_WORD:8 [ bitmap_line::x#6 bitmap_line::x#5 bitmap_line::x#13 bitmap_line::x#11 bitmap_line::x1#0 bitmap_line::x#10 bitmap_line::x#1 bitmap_plot::x#3 bitmap_plot::x#1 bitmap_plot::x#0 bitmap_plot::x#2 ] ] with [ zp ZP_WORD:33 [ main::$6 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:17 [ sgn_u16::return#4 ] ] with [ zp ZP_WORD:49 [ sgn_u16::return#0 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:17 [ sgn_u16::return#4 sgn_u16::return#0 ] ] with [ zp ZP_WORD:53 [ sgn_u16::return#1 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:19 [ abs_u16::return#4 abs_u16::return#2 abs_u16::w#2 abs_u16::w#0 abs_u16::w#1 ] ] with [ zp ZP_WORD:41 [ abs_u16::return#0 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:19 [ abs_u16::return#4 abs_u16::return#2 abs_u16::w#2 abs_u16::w#0 abs_u16::w#1 abs_u16::return#0 ] ] with [ zp ZP_WORD:45 [ abs_u16::return#1 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:21 [ memset::str#2 ] ] with [ zp ZP_WORD:26 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:23 [ memset::num#2 ] ] with [ zp ZP_WORD:68 [ memset::end#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:21 [ memset::num#2 ] ] with [ zp ZP_WORD:68 [ memset::end#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:23 [ memset::str#3 ] ] with [ zp ZP_WORD:26 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:35 [ main::$10 ] ] with [ zp ZP_WORD:37 [ bitmap_line::x2#0 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:57 [ bitmap_plot::plotter#0 ] ] with [ zp ZP_WORD:61 [ bitmap_plot::plotter#1 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:17 [ sgn_u16::return#4 sgn_u16::return#0 sgn_u16::return#1 ] ] with [ zp ZP_WORD:55 [ bitmap_line::sy#0 ] ] - score: 1 @@ -3530,8 +3571,8 @@ Coalescing zero page register with common assignment [ zp ZP_WORD:19 [ abs_u16:: Allocated (was zp ZP_WORD:15) zp ZP_WORD:12 [ sgn_u16::w#2 sgn_u16::w#0 sgn_u16::w#1 ] Allocated (was zp ZP_WORD:17) zp ZP_WORD:14 [ sgn_u16::return#4 sgn_u16::return#0 sgn_u16::return#1 bitmap_line::sy#0 ] Allocated (was zp ZP_WORD:19) zp ZP_WORD:16 [ abs_u16::return#4 abs_u16::return#2 abs_u16::w#2 abs_u16::w#0 abs_u16::w#1 abs_u16::return#0 abs_u16::return#1 bitmap_line::dy#0 ] -Allocated (was zp ZP_WORD:21) zp ZP_WORD:18 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] -Allocated (was zp ZP_WORD:23) zp ZP_WORD:20 [ memset::num#2 memset::end#0 ] +Allocated (was zp ZP_WORD:21) zp ZP_WORD:18 [ memset::num#2 memset::end#0 ] +Allocated (was zp ZP_WORD:23) zp ZP_WORD:20 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] Allocated (was zp ZP_WORD:31) zp ZP_WORD:22 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] Allocated (was zp ZP_WORD:35) zp ZP_WORD:24 [ main::$10 bitmap_line::x2#0 ] Allocated (was zp ZP_WORD:39) zp ZP_WORD:26 [ bitmap_line::y2#0 ] @@ -3583,7 +3624,7 @@ main: { .label a = 2 .label i = 3 // [5] call bitmap_init - // [103] phi from main to bitmap_init [phi:main->bitmap_init] + // [104] phi from main to bitmap_init [phi:main->bitmap_init] bitmap_init_from_main: jsr bitmap_init // [6] phi from main to main::@4 [phi:main->main::@4] @@ -4128,16 +4169,16 @@ bitmap_clear: { memset_from_bitmap_clear: // [95] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1 ldx #col - // [95] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 - lda #<$3e8 - sta memset.num - lda #>$3e8 - sta memset.num+1 - // [95] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + // [95] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 + // [95] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#2] -- vwuz1=vwuc1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 jsr memset // [92] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] b1_from_bitmap_clear: @@ -4149,16 +4190,16 @@ bitmap_clear: { memset_from_b1: // [95] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1 ldx #0 - // [95] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 - lda #<$1f40 - sta memset.num - lda #>$1f40 - sta memset.num+1 - // [95] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + // [95] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1 lda #<BITMAP sta memset.str lda #>BITMAP sta memset.str+1 + // [95] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#2] -- vwuz1=vwuc1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 jsr memset jmp breturn // bitmap_clear::@return @@ -4168,13 +4209,21 @@ bitmap_clear: { } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage($12) str, byte register(X) c, word zeropage($14) num) +// memset(void* zeropage($14) str, byte register(X) c, word zeropage($12) num) memset: { - .label end = $14 - .label dst = $12 - .label str = $12 - .label num = $14 - // [96] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 + .label end = $12 + .label dst = $14 + .label num = $12 + .label str = $14 + // [96] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 + lda num + beq breturn + lda num+1 + beq breturn + jmp b1 + // memset::@1 + b1: + // [97] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 lda end clc adc str @@ -4182,34 +4231,34 @@ memset: { lda end+1 adc str+1 sta end+1 - // [97] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 - // [98] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - b1_from_memset: - b1_from_b1: - // [98] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - jmp b1 - // memset::@1 - b1: - // [99] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx + // [98] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + // [99] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + b2_from_b1: + b2_from_b2: + // [99] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + jmp b2 + // memset::@2 + b2: + // [100] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx txa ldy #0 sta (dst),y - // [100] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [101] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [101] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [102] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1_from_b1 + bne b2_from_b2 lda dst cmp end - bne b1_from_b1 + bne b2_from_b2 jmp breturn // memset::@return breturn: - // [102] return + // [103] return rts } // bitmap_init @@ -4217,86 +4266,86 @@ memset: { bitmap_init: { .label _7 = $24 .label yoffs = $16 - // [104] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + // [105] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] b1_from_bitmap_init: - // [104] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 + // [105] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 ldx #0 - // [104] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 + // [105] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 lda #$80 jmp b1 - // [104] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + // [105] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] b1_from_b2: - // [104] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - // [104] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + // [105] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + // [105] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy jmp b1 // bitmap_init::@1 b1: - // [105] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa + // [106] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_bit,x - // [106] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 + // [107] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 lsr - // [107] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 + // [108] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 cmp #0 bne b6_from_b1 - // [109] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + // [110] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] b2_from_b1: - // [109] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 + // [110] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 lda #$80 jmp b2 - // [108] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + // [109] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] b6_from_b1: jmp b6 // bitmap_init::@6 b6: - // [109] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + // [110] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] b2_from_b6: - // [109] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + // [110] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy jmp b2 // bitmap_init::@2 b2: - // [110] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx + // [111] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx inx - // [111] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 + // [112] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 cpx #0 bne b1_from_b2 - // [112] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + // [113] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] b3_from_b2: - // [112] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + // [113] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #<BITMAP sta yoffs lda #>BITMAP sta yoffs+1 - // [112] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 + // [113] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 ldx #0 jmp b3 - // [112] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + // [113] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] b3_from_b4: - // [112] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - // [112] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + // [113] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + // [113] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy jmp b3 // bitmap_init::@3 b3: - // [113] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 + // [114] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 lda #7 sax _7 - // [114] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 + // [115] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 lda yoffs - // [115] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa + // [116] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa ora _7 - // [116] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa + // [117] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_ylo,x - // [117] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 + // [118] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 lda yoffs+1 - // [118] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa + // [119] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_yhi,x - // [119] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + // [120] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp _7 bne b4_from_b3 jmp b5 // bitmap_init::@5 b5: - // [120] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + // [121] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda yoffs adc #<$28*8 @@ -4304,22 +4353,22 @@ bitmap_init: { lda yoffs+1 adc #>$28*8 sta yoffs+1 - // [121] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + // [122] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] b4_from_b3: b4_from_b5: - // [121] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + // [122] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy jmp b4 // bitmap_init::@4 b4: - // [122] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx + // [123] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx inx - // [123] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 + // [124] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 cpx #0 bne b3_from_b4 jmp breturn // bitmap_init::@return breturn: - // [124] return + // [125] return rts } // File Data @@ -4362,6 +4411,7 @@ Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp breturn Removing instruction jmp b1 +Removing instruction jmp b2 Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp b6 @@ -4388,8 +4438,8 @@ Replacing label b7_from_b8 with b7 Replacing label b7_from_b8 with b7 Replacing label b2_from_b8 with b2 Replacing label b1_from_sgn_u16 with b1 -Replacing label b1_from_b1 with b1 -Replacing label b1_from_b1 with b1 +Replacing label b2_from_b2 with b2 +Replacing label b2_from_b2 with b2 Replacing label b6_from_b1 with b2 Replacing label b1_from_b2 with b1 Replacing label b4_from_b3 with b4 @@ -4418,8 +4468,8 @@ Removing instruction breturn_from_b1: Removing instruction breturn_from_abs_u16: Removing instruction b1_from_bitmap_clear: Removing instruction memset_from_b1: -Removing instruction b1_from_memset: -Removing instruction b1_from_b1: +Removing instruction b2_from_b1: +Removing instruction b2_from_b2: Removing instruction b1_from_b2: Removing instruction b6_from_b1: Removing instruction b6: @@ -4457,7 +4507,7 @@ Removing instruction breturn_from_sgn_u16: Removing instruction memset_from_bitmap_clear: Removing instruction b1: Removing instruction breturn: -Removing instruction breturn: +Removing instruction b1: Removing instruction b1_from_bitmap_init: Removing instruction b2_from_b1: Removing instruction b3_from_b2: @@ -4674,20 +4724,21 @@ FINAL SYMBOL TABLE (byte*) main::toD0181_screen (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (label) memset::@1 +(label) memset::@2 (label) memset::@return (byte) memset::c -(byte) memset::c#3 reg byte x 1.5714285714285714 +(byte) memset::c#3 reg byte x 1.375 (byte*) memset::dst -(byte*) memset::dst#1 dst zp ZP_WORD:18 16.5 -(byte*) memset::dst#2 dst zp ZP_WORD:18 17.5 -(byte*~) memset::dst#3 dst zp ZP_WORD:18 4.0 +(byte*) memset::dst#1 dst zp ZP_WORD:20 16.5 +(byte*) memset::dst#2 dst zp ZP_WORD:20 17.5 +(byte*~) memset::dst#3 dst zp ZP_WORD:20 4.0 (byte*) memset::end -(byte*) memset::end#0 end zp ZP_WORD:20 2.1666666666666665 +(byte*) memset::end#0 end zp ZP_WORD:18 2.1666666666666665 (word) memset::num -(word) memset::num#2 num zp ZP_WORD:20 2.0 +(word) memset::num#2 num zp ZP_WORD:18 2.0 (void*) memset::return (void*) memset::str -(void*) memset::str#2 str zp ZP_WORD:18 +(void*) memset::str#3 str zp ZP_WORD:20 (word()) sgn_u16((word) sgn_u16::w) (byte~) sgn_u16::$0 reg byte a 4.0 (byte~) sgn_u16::$1 reg byte a 4.0 @@ -4712,8 +4763,8 @@ reg byte x [ bitmap_plot::y#3 bitmap_plot::y#1 bitmap_plot::y#0 bitmap_plot::y#2 zp ZP_WORD:12 [ sgn_u16::w#2 sgn_u16::w#0 sgn_u16::w#1 ] zp ZP_WORD:14 [ sgn_u16::return#4 sgn_u16::return#0 sgn_u16::return#1 bitmap_line::sy#0 ] zp ZP_WORD:16 [ abs_u16::return#4 abs_u16::return#2 abs_u16::w#2 abs_u16::w#0 abs_u16::w#1 abs_u16::return#0 abs_u16::return#1 bitmap_line::dy#0 ] -zp ZP_WORD:18 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] -zp ZP_WORD:20 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:18 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:20 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] reg byte x [ memset::c#3 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] @@ -4737,7 +4788,7 @@ reg byte a [ bitmap_init::$6 ] FINAL ASSEMBLER -Score: 27176 +Score: 27187 // File Comments // Tests the simple bitmap plotter @@ -4772,7 +4823,7 @@ main: { .label i = 3 // bitmap_init(BITMAP, SCREEN) // [5] call bitmap_init - // [103] phi from main to bitmap_init [phi:main->bitmap_init] + // [104] phi from main to bitmap_init [phi:main->bitmap_init] jsr bitmap_init // [6] phi from main to main::@4 [phi:main->main::@4] // main::@4 @@ -5295,16 +5346,16 @@ bitmap_clear: { // [95] phi from bitmap_clear to memset [phi:bitmap_clear->memset] // [95] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1 ldx #col - // [95] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 - lda #<$3e8 - sta memset.num - lda #>$3e8 - sta memset.num+1 - // [95] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + // [95] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 + // [95] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#2] -- vwuz1=vwuc1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 jsr memset // [92] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] // bitmap_clear::@1 @@ -5313,16 +5364,16 @@ bitmap_clear: { // [95] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset] // [95] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1 ldx #0 - // [95] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 - lda #<$1f40 - sta memset.num - lda #>$1f40 - sta memset.num+1 - // [95] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + // [95] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1 lda #<BITMAP sta memset.str lda #>BITMAP sta memset.str+1 + // [95] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#2] -- vwuz1=vwuc1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 jsr memset // bitmap_clear::@return // } @@ -5331,14 +5382,21 @@ bitmap_clear: { } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage($12) str, byte register(X) c, word zeropage($14) num) +// memset(void* zeropage($14) str, byte register(X) c, word zeropage($12) num) memset: { - .label end = $14 - .label dst = $12 - .label str = $12 - .label num = $14 + .label end = $12 + .label dst = $14 + .label num = $12 + .label str = $14 + // if(num>0) + // [96] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 + lda num + beq breturn + lda num+1 + beq breturn + // memset::@1 // end = (char*)str + num - // [96] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 + // [97] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 lda end clc adc str @@ -5346,32 +5404,33 @@ memset: { lda end+1 adc str+1 sta end+1 - // [97] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 - // [98] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - // [98] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - // memset::@1 - b1: + // [98] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + // [99] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + // [99] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + // memset::@2 + b2: // *dst = c - // [99] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx + // [100] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx txa ldy #0 sta (dst),y // for(char* dst = str; dst!=end; dst++) - // [100] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [101] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [101] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [102] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1 + bne b2 lda dst cmp end - bne b1 + bne b2 // memset::@return + breturn: // } - // [102] return + // [103] return rts } // bitmap_init @@ -5379,81 +5438,81 @@ memset: { bitmap_init: { .label _7 = $24 .label yoffs = $16 - // [104] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] - // [104] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 + // [105] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + // [105] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 ldx #0 - // [104] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 + // [105] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 lda #$80 - // [104] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] - // [104] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - // [104] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + // [105] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + // [105] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + // [105] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy // bitmap_init::@1 b1: // bitmap_plot_bit[x] = bits - // [105] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa + // [106] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_bit,x // bits >>= 1 - // [106] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 + // [107] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 lsr // if(bits==0) - // [107] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 + // [108] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 cmp #0 bne b2 - // [109] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] - // [109] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 + // [110] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + // [110] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 lda #$80 - // [108] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + // [109] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] // bitmap_init::@6 - // [109] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] - // [109] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + // [110] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + // [110] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy // bitmap_init::@2 b2: // for(byte x : 0..255) - // [110] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx + // [111] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx inx - // [111] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 + // [112] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 cpx #0 bne b1 - // [112] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] - // [112] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + // [113] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + // [113] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #<BITMAP sta yoffs lda #>BITMAP sta yoffs+1 - // [112] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 + // [113] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 ldx #0 - // [112] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] - // [112] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - // [112] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + // [113] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + // [113] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + // [113] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy // bitmap_init::@3 b3: // y&$7 - // [113] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 + // [114] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 lda #7 sax _7 // <yoffs - // [114] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 + // [115] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 lda yoffs // y&$7 | <yoffs - // [115] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa + // [116] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa ora _7 // bitmap_plot_ylo[y] = y&$7 | <yoffs - // [116] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa + // [117] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_ylo,x // >yoffs - // [117] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 + // [118] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 lda yoffs+1 // bitmap_plot_yhi[y] = >yoffs - // [118] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa + // [119] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_yhi,x // if((y&$7)==7) - // [119] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + // [120] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp _7 bne b4 // bitmap_init::@5 // yoffs = yoffs + 40*8 - // [120] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + // [121] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda yoffs adc #<$28*8 @@ -5461,19 +5520,19 @@ bitmap_init: { lda yoffs+1 adc #>$28*8 sta yoffs+1 - // [121] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] - // [121] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + // [122] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + // [122] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy // bitmap_init::@4 b4: // for(byte y : 0..255) - // [122] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx + // [123] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx inx - // [123] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 + // [124] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 cpx #0 bne b3 // bitmap_init::@return // } - // [124] return + // [125] return rts } // File Data diff --git a/src/test/ref/bitmap-plot-3.sym b/src/test/ref/bitmap-plot-3.sym index 4da8e8734..46ecfa0b5 100644 --- a/src/test/ref/bitmap-plot-3.sym +++ b/src/test/ref/bitmap-plot-3.sym @@ -186,20 +186,21 @@ (byte*) main::toD0181_screen (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (label) memset::@1 +(label) memset::@2 (label) memset::@return (byte) memset::c -(byte) memset::c#3 reg byte x 1.5714285714285714 +(byte) memset::c#3 reg byte x 1.375 (byte*) memset::dst -(byte*) memset::dst#1 dst zp ZP_WORD:18 16.5 -(byte*) memset::dst#2 dst zp ZP_WORD:18 17.5 -(byte*~) memset::dst#3 dst zp ZP_WORD:18 4.0 +(byte*) memset::dst#1 dst zp ZP_WORD:20 16.5 +(byte*) memset::dst#2 dst zp ZP_WORD:20 17.5 +(byte*~) memset::dst#3 dst zp ZP_WORD:20 4.0 (byte*) memset::end -(byte*) memset::end#0 end zp ZP_WORD:20 2.1666666666666665 +(byte*) memset::end#0 end zp ZP_WORD:18 2.1666666666666665 (word) memset::num -(word) memset::num#2 num zp ZP_WORD:20 2.0 +(word) memset::num#2 num zp ZP_WORD:18 2.0 (void*) memset::return (void*) memset::str -(void*) memset::str#2 str zp ZP_WORD:18 +(void*) memset::str#3 str zp ZP_WORD:20 (word()) sgn_u16((word) sgn_u16::w) (byte~) sgn_u16::$0 reg byte a 4.0 (byte~) sgn_u16::$1 reg byte a 4.0 @@ -224,8 +225,8 @@ reg byte x [ bitmap_plot::y#3 bitmap_plot::y#1 bitmap_plot::y#0 bitmap_plot::y#2 zp ZP_WORD:12 [ sgn_u16::w#2 sgn_u16::w#0 sgn_u16::w#1 ] zp ZP_WORD:14 [ sgn_u16::return#4 sgn_u16::return#0 sgn_u16::return#1 bitmap_line::sy#0 ] zp ZP_WORD:16 [ abs_u16::return#4 abs_u16::return#2 abs_u16::w#2 abs_u16::w#0 abs_u16::w#1 abs_u16::return#0 abs_u16::return#1 bitmap_line::dy#0 ] -zp ZP_WORD:18 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] -zp ZP_WORD:20 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:18 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:20 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] reg byte x [ memset::c#3 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] diff --git a/src/test/ref/complex/clearscreen/clearscreen.log b/src/test/ref/complex/clearscreen/clearscreen.log index 9841f3172..3197926fc 100644 --- a/src/test/ref/complex/clearscreen/clearscreen.log +++ b/src/test/ref/complex/clearscreen/clearscreen.log @@ -109,16 +109,21 @@ Rewriting struct pointer member access *((struct ProcessingSprite*) processChars Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).y Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).vy Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).y +Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src) Warning! Adding boolean cast to non-boolean condition (byte~) processChars::$11 Warning! Adding boolean cast to non-boolean sub-expression (byte) atan2_16::shift Identified constant variable (byte*) HEAP_TOP Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx -Culled Empty Block (label) malloc::@1 Culled Empty Block (label) @1 Culled Empty Block (label) @2 Culled Empty Block (label) @3 -Culled Empty Block (label) @4 +Culled Empty Block (label) malloc::@1 Culled Empty Block (label) @5 +Culled Empty Block (label) @6 +Culled Empty Block (label) @7 +Culled Empty Block (label) @8 +Culled Empty Block (label) @9 +Culled Empty Block (label) @10 Culled Empty Block (label) atan2_16::@9 Culled Empty Block (label) atan2_16::@10 Culled Empty Block (label) atan2_16::@11 @@ -131,33 +136,33 @@ Culled Empty Block (label) atan2_16::@23 Culled Empty Block (label) atan2_16::@31 Culled Empty Block (label) atan2_16::@32 Culled Empty Block (label) atan2_16::@14 -Culled Empty Block (label) @7 -Culled Empty Block (label) @8 -Culled Empty Block (label) @9 -Culled Empty Block (label) @10 -Culled Empty Block (label) @11 Culled Empty Block (label) @12 +Culled Empty Block (label) @13 Culled Empty Block (label) @14 Culled Empty Block (label) @15 Culled Empty Block (label) @16 +Culled Empty Block (label) @17 +Culled Empty Block (label) @19 +Culled Empty Block (label) @20 +Culled Empty Block (label) @21 Culled Empty Block (label) main::@8 Culled Empty Block (label) main::@9 Culled Empty Block (label) main::@10 Culled Empty Block (label) main::@12 -Culled Empty Block (label) @18 +Culled Empty Block (label) @23 Culled Empty Block (label) getCharToProcess::@6 Culled Empty Block (label) getCharToProcess::@2 -Culled Empty Block (label) @19 +Culled Empty Block (label) @24 Culled Empty Block (label) startProcessing::@6 Culled Empty Block (label) startProcessing::@7 Culled Empty Block (label) processChars::@10 Culled Empty Block (label) processChars::@12 Culled Empty Block (label) processChars::@1 -Culled Empty Block (label) @21 -Culled Empty Block (label) @22 +Culled Empty Block (label) @26 +Culled Empty Block (label) @27 Culled Empty Block (label) init_angle_screen::@4 -Culled Empty Block (label) @23 -Culled Empty Block (label) @24 +Culled Empty Block (label) @28 +Culled Empty Block (label) @29 Culled Empty Block (label) setupRasterIrq::@4 Unwinding list assignment { (byte) main::$9_x, (byte) main::$9_y, (byte) main::$9_dist } ← { (byte) getCharToProcess::return_x, (byte) getCharToProcess::return_y, (byte) getCharToProcess::return_dist } Unwinding list assignment { (byte) getCharToProcess::return_x#0, (byte) getCharToProcess::return_y#0, (byte) getCharToProcess::return_dist#0 } ← { (byte) getCharToProcess::return_x#2, (byte) getCharToProcess::return_y#2, (byte) getCharToProcess::return_dist#2 } @@ -166,12 +171,14 @@ Adding versioned struct unwinding for (struct ProcessingChar) getCharToProcess:: CONTROL FLOW GRAPH SSA @begin: scope:[] from + to:@4 +@4: scope:[] from @begin (byte*) HEAP_TOP#0 ← ((byte*)) (number) $a000 (byte*) heap_head#0 ← (byte*) HEAP_TOP#0 - to:@6 -malloc: scope:[malloc] from @17 @28 - (word) malloc::size#2 ← phi( @17/(word) malloc::size#0 @28/(word) malloc::size#1 ) - (byte*) heap_head#5 ← phi( @17/(byte*) heap_head#9 @28/(byte*) heap_head#3 ) + to:@11 +malloc: scope:[malloc] from @22 @33 + (word) malloc::size#2 ← phi( @22/(word) malloc::size#0 @33/(word) malloc::size#1 ) + (byte*) heap_head#5 ← phi( @22/(byte*) heap_head#9 @33/(byte*) heap_head#3 ) (byte*~) malloc::$0 ← (byte*) heap_head#5 - (word) malloc::size#2 (byte*) malloc::mem#0 ← (byte*~) malloc::$0 (byte*) heap_head#1 ← (byte*) malloc::mem#0 @@ -184,13 +191,13 @@ malloc::@return: scope:[malloc] from malloc (byte*) heap_head#2 ← (byte*) heap_head#6 return to:@return -@6: scope:[] from @begin - (byte*) heap_head#11 ← phi( @begin/(byte*) heap_head#0 ) +@11: scope:[] from @4 + (byte*) heap_head#11 ← phi( @4/(byte*) heap_head#0 ) (byte) CORDIC_ITERATIONS_16#0 ← (number) $f (word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 ← kickasm {{ .for (var i=0; i<CORDIC_ITERATIONS_16; i++) .word 256*2*256*atan(1/pow(2,i))/PI/2 }} - to:@13 + to:@18 atan2_16: scope:[atan2_16] from init_angle_screen::@2 (signed word) atan2_16::x#9 ← phi( init_angle_screen::@2/(signed word) atan2_16::x#0 ) (signed word) atan2_16::y#1 ← phi( init_angle_screen::@2/(signed word) atan2_16::y#0 ) @@ -401,8 +408,8 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 (word) atan2_16::return#1 ← (word) atan2_16::return#3 return to:@return -@13: scope:[] from @6 - (byte*) heap_head#10 ← phi( @6/(byte*) heap_head#11 ) +@18: scope:[] from @11 + (byte*) heap_head#10 ← phi( @11/(byte*) heap_head#11 ) (byte*) PROCPORT_DDR#0 ← ((byte*)) (number) 0 (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (number) 7 (byte*) PROCPORT#0 ← ((byte*)) (number) 1 @@ -436,9 +443,9 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 (byte) WHITE#0 ← (number) 1 (byte) BLUE#0 ← (number) 6 (byte) LIGHT_BLUE#0 ← (number) $e - to:@17 -@17: scope:[] from @13 - (byte*) heap_head#9 ← phi( @13/(byte*) heap_head#10 ) + to:@22 +@22: scope:[] from @18 + (byte*) heap_head#9 ← phi( @18/(byte*) heap_head#10 ) (bool) DEBUG#0 ← false (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte*) SPRITE_DATA#0 ← ((byte*)) (number) $2000 @@ -453,31 +460,31 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 (word) malloc::size#0 ← (number) $3e8 call malloc (void*) malloc::return#2 ← (void*) malloc::return#1 - to:@28 -@28: scope:[] from @17 - (byte*) heap_head#7 ← phi( @17/(byte*) heap_head#2 ) - (void*) malloc::return#5 ← phi( @17/(void*) malloc::return#2 ) + to:@33 +@33: scope:[] from @22 + (byte*) heap_head#7 ← phi( @22/(byte*) heap_head#2 ) + (void*) malloc::return#5 ← phi( @22/(void*) malloc::return#2 ) (void*~) $0 ← (void*) malloc::return#5 (byte*) heap_head#3 ← (byte*) heap_head#7 (byte*) SCREEN_COPY#0 ← ((byte*)) (void*~) $0 (word) malloc::size#1 ← (number) $3e8 call malloc (void*) malloc::return#3 ← (void*) malloc::return#1 - to:@29 -@29: scope:[] from @28 - (byte*) SCREEN_COPY#25 ← phi( @28/(byte*) SCREEN_COPY#0 ) - (byte*) heap_head#8 ← phi( @28/(byte*) heap_head#2 ) - (void*) malloc::return#6 ← phi( @28/(void*) malloc::return#3 ) + to:@34 +@34: scope:[] from @33 + (byte*) SCREEN_COPY#25 ← phi( @33/(byte*) SCREEN_COPY#0 ) + (byte*) heap_head#8 ← phi( @33/(byte*) heap_head#2 ) + (void*) malloc::return#6 ← phi( @33/(void*) malloc::return#3 ) (void*~) $1 ← (void*) malloc::return#6 (byte*) heap_head#4 ← (byte*) heap_head#8 (byte*) SCREEN_DIST#0 ← ((byte*)) (void*~) $1 (byte) NUM_PROCESSING#0 ← (number) 8 (byte) NOT_FOUND#0 ← (number) $ff (struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 ← { fill( NUM_PROCESSING#0, 0) } - to:@20 -main: scope:[main] from @27 - (byte*) SCREEN_COPY#4 ← phi( @27/(byte*) SCREEN_COPY#7 ) - (byte*) SCREEN_DIST#1 ← phi( @27/(byte*) SCREEN_DIST#3 ) + to:@25 +main: scope:[main] from @32 + (byte*) SCREEN_COPY#4 ← phi( @32/(byte*) SCREEN_COPY#7 ) + (byte*) SCREEN_DIST#1 ← phi( @32/(byte*) SCREEN_DIST#3 ) (byte*) init_angle_screen::screen#0 ← (byte*) SCREEN_DIST#1 call init_angle_screen to:main::@13 @@ -860,9 +867,9 @@ startProcessing::@10: scope:[startProcessing] from startProcessing::@9 startProcessing::@return: scope:[startProcessing] from startProcessing::@10 return to:@return -@20: scope:[] from @29 - (byte*) SCREEN_COPY#23 ← phi( @29/(byte*) SCREEN_COPY#25 ) - (byte*) SCREEN_DIST#13 ← phi( @29/(byte*) SCREEN_DIST#0 ) +@25: scope:[] from @34 + (byte*) SCREEN_COPY#23 ← phi( @34/(byte*) SCREEN_COPY#25 ) + (byte*) SCREEN_DIST#13 ← phi( @34/(byte*) SCREEN_DIST#0 ) (number~) $2 ← (byte) BORDER_XPOS_LEFT#0 - (number) 8 (word~) $3 ← ((word)) (number~) $2 (word~) $4 ← (word~) $3 << (number) 4 @@ -877,7 +884,7 @@ startProcessing::@return: scope:[startProcessing] from startProcessing::@10 (word~) $10 ← ((word)) (byte) BORDER_YPOS_BOTTOM#0 (word~) $11 ← (word~) $10 << (number) 4 (word) YPOS_BOTTOMMOST#0 ← (word~) $11 - to:@25 + to:@30 processChars: scope:[processChars] from irqBottom::@1 (byte) processChars::numActive#0 ← (number) 0 (number~) processChars::$1 ← (byte) NUM_PROCESSING#0 - (number) 1 @@ -1186,11 +1193,11 @@ setupRasterIrq::@2: scope:[setupRasterIrq] from setupRasterIrq::@1 setupRasterI setupRasterIrq::@return: scope:[setupRasterIrq] from setupRasterIrq::@2 return to:@return -@25: scope:[] from @20 - (byte*) SCREEN_COPY#20 ← phi( @20/(byte*) SCREEN_COPY#23 ) - (byte*) SCREEN_DIST#10 ← phi( @20/(byte*) SCREEN_DIST#13 ) +@30: scope:[] from @25 + (byte*) SCREEN_COPY#20 ← phi( @25/(byte*) SCREEN_COPY#23 ) + (byte*) SCREEN_DIST#10 ← phi( @25/(byte*) SCREEN_DIST#13 ) (byte) RASTER_IRQ_TOP#0 ← (number) $30 - to:@26 + to:@31 irqTop: scope:[irqTop] from (bool~) irqTop::$0 ← ! (bool) DEBUG#0 if((bool~) irqTop::$0) goto irqTop::@1 @@ -1228,11 +1235,11 @@ irqTop::@6: scope:[irqTop] from irqTop::@5 irqTop::@return: scope:[irqTop] from irqTop::@1 return to:@return -@26: scope:[] from @25 - (byte*) SCREEN_COPY#14 ← phi( @25/(byte*) SCREEN_COPY#20 ) - (byte*) SCREEN_DIST#7 ← phi( @25/(byte*) SCREEN_DIST#10 ) +@31: scope:[] from @30 + (byte*) SCREEN_COPY#14 ← phi( @30/(byte*) SCREEN_COPY#20 ) + (byte*) SCREEN_DIST#7 ← phi( @30/(byte*) SCREEN_DIST#10 ) (byte) RASTER_IRQ_MIDDLE#0 ← (number) $ff - to:@27 + to:@32 irqBottom: scope:[irqBottom] from (bool~) irqBottom::$0 ← ! (bool) DEBUG#0 if((bool~) irqBottom::$0) goto irqBottom::@1 @@ -1270,14 +1277,14 @@ irqBottom::@4: scope:[irqBottom] from irqBottom::@7 irqBottom::@return: scope:[irqBottom] from irqBottom::@2 return to:@return -@27: scope:[] from @26 - (byte*) SCREEN_COPY#7 ← phi( @26/(byte*) SCREEN_COPY#14 ) - (byte*) SCREEN_DIST#3 ← phi( @26/(byte*) SCREEN_DIST#7 ) +@32: scope:[] from @31 + (byte*) SCREEN_COPY#7 ← phi( @31/(byte*) SCREEN_COPY#14 ) + (byte*) SCREEN_DIST#3 ← phi( @31/(byte*) SCREEN_DIST#7 ) call main - to:@30 -@30: scope:[] from @27 + to:@35 +@35: scope:[] from @32 to:@end -@end: scope:[] from @30 +@end: scope:[] from @35 SYMBOL TABLE SSA (void*~) $0 @@ -1292,16 +1299,17 @@ SYMBOL TABLE SSA (number~) $7 (word~) $8 (word~) $9 -(label) @13 -(label) @17 -(label) @20 +(label) @11 +(label) @18 +(label) @22 (label) @25 -(label) @26 -(label) @27 -(label) @28 -(label) @29 (label) @30 -(label) @6 +(label) @31 +(label) @32 +(label) @33 +(label) @34 +(label) @35 +(label) @4 (label) @begin (label) @end (byte*) BGCOL @@ -3685,14 +3693,15 @@ Added new block during phi lifting init_angle_screen::@7(between init_angle_scre Added new block during phi lifting initSprites::@5(between initSprites::@1 and initSprites::@1) Added new block during phi lifting initSprites::@6(between initSprites::@3 and initSprites::@3) Adding NOP phi() at start of @begin -Adding NOP phi() at start of @6 -Adding NOP phi() at start of @13 -Adding NOP phi() at start of @17 -Adding NOP phi() at start of @20 +Adding NOP phi() at start of @4 +Adding NOP phi() at start of @11 +Adding NOP phi() at start of @18 +Adding NOP phi() at start of @22 Adding NOP phi() at start of @25 -Adding NOP phi() at start of @26 -Adding NOP phi() at start of @27 Adding NOP phi() at start of @30 +Adding NOP phi() at start of @31 +Adding NOP phi() at start of @32 +Adding NOP phi() at start of @35 Adding NOP phi() at start of @end Adding NOP phi() at start of main::@2 Adding NOP phi() at start of main::@4 @@ -3711,103 +3720,104 @@ Adding NOP phi() at start of processChars Adding NOP phi() at start of processChars::@15 Adding NOP phi() at start of irqTop CALL GRAPH -Calls in [] to malloc:4 malloc:7 main:13 -Calls in [main] to init_angle_screen:17 initSprites:44 setupRasterIrq:46 getCharToProcess:49 startProcessing:61 -Calls in [init_angle_screen] to atan2_16:225 -Calls in [irqBottom] to processChars:326 +Calls in [] to malloc:5 malloc:8 main:14 +Calls in [main] to init_angle_screen:18 initSprites:45 setupRasterIrq:47 getCharToProcess:50 startProcessing:62 +Calls in [init_angle_screen] to atan2_16:226 +Calls in [irqBottom] to processChars:327 Created 50 initial phi equivalence classes -Coalesced [6] heap_head#12 ← heap_head#1 -Coalesced [19] main::dst#4 ← main::dst#0 -Coalesced [63] main::i#3 ← main::i#1 -Coalesced [64] main::src#3 ← main::src#1 -Coalesced [65] main::dst#3 ← main::dst#1 -Coalesced [75] startProcessing::freeIdx#9 ← startProcessing::i#2 -Coalesced [95] startProcessing::chargenData#3 ← startProcessing::chargenData#0 -Coalesced [96] startProcessing::spriteData#3 ← startProcessing::spriteData#0 -Coalesced [131] startProcessing::chargenData#4 ← startProcessing::chargenData#1 -Coalesced [132] startProcessing::spriteData#4 ← startProcessing::spriteData#1 -Coalesced [133] startProcessing::i1#3 ← startProcessing::i1#1 -Not coalescing [134] startProcessing::freeIdx#7 ← startProcessing::freeIdx#2 -Not coalescing [137] startProcessing::freeIdx#8 ← startProcessing::freeIdx#6 -Coalesced [138] startProcessing::i#5 ← startProcessing::i#1 -Coalesced [141] getCharToProcess::screen_line#8 ← getCharToProcess::screen_line#0 -Coalesced [142] getCharToProcess::dist_line#8 ← getCharToProcess::dist_line#0 -Coalesced [144] getCharToProcess::closest_dist#11 ← getCharToProcess::closest_dist#8 -Coalesced [145] getCharToProcess::closest_x#11 ← getCharToProcess::closest_x#9 -Coalesced [146] getCharToProcess::closest_y#11 ← getCharToProcess::closest_y#9 -Coalesced [151] getCharToProcess::return_dist#7 ← getCharToProcess::dist#0 -Not coalescing [152] getCharToProcess::return_x#7 ← getCharToProcess::x#2 -Not coalescing [153] getCharToProcess::return_y#7 ← getCharToProcess::y#7 -Coalesced [170] getCharToProcess::screen_line#9 ← getCharToProcess::screen_line#1 -Coalesced [171] getCharToProcess::dist_line#9 ← getCharToProcess::dist_line#1 -Not coalescing [172] getCharToProcess::closest_dist#10 ← getCharToProcess::return_dist#1 -Coalesced [173] getCharToProcess::y#8 ← getCharToProcess::y#1 -Coalesced [174] getCharToProcess::closest_x#10 ← getCharToProcess::return_x#1 -Coalesced [175] getCharToProcess::closest_y#10 ← getCharToProcess::return_y#1 -Coalesced [176] getCharToProcess::x#6 ← getCharToProcess::x#1 -Not coalescing [177] getCharToProcess::closest_dist#12 ← getCharToProcess::return_dist#1 -Coalesced (already) [178] getCharToProcess::closest_x#12 ← getCharToProcess::return_x#1 -Coalesced (already) [179] getCharToProcess::closest_y#12 ← getCharToProcess::return_y#1 -Not coalescing [180] getCharToProcess::return_dist#6 ← getCharToProcess::closest_dist#2 -Coalesced (already) [181] getCharToProcess::return_x#6 ← getCharToProcess::closest_x#7 -Coalesced (already) [182] getCharToProcess::return_y#6 ← getCharToProcess::closest_y#7 -Not coalescing [183] getCharToProcess::return_dist#5 ← getCharToProcess::closest_dist#2 -Coalesced (already) [184] getCharToProcess::return_x#5 ← getCharToProcess::closest_x#7 -Coalesced (already) [185] getCharToProcess::return_y#5 ← getCharToProcess::closest_y#7 -Coalesced [210] initSprites::i#3 ← initSprites::i#1 -Coalesced [211] initSprites::sp#3 ← initSprites::sp#1 -Coalesced [214] init_angle_screen::screen_bottomline#6 ← init_angle_screen::screen_bottomline#0 -Coalesced [215] init_angle_screen::screen_topline#6 ← init_angle_screen::screen_topline#0 -Coalesced [245] init_angle_screen::y#6 ← init_angle_screen::y#1 -Coalesced [246] init_angle_screen::screen_bottomline#7 ← init_angle_screen::screen_bottomline#1 -Coalesced [247] init_angle_screen::screen_topline#7 ← init_angle_screen::screen_topline#1 -Coalesced [248] init_angle_screen::x#4 ← init_angle_screen::x#1 -Coalesced [249] init_angle_screen::xb#4 ← init_angle_screen::xb#1 -Coalesced [252] atan2_16::yi#17 ← atan2_16::$2 -Coalesced [256] atan2_16::xi#14 ← atan2_16::$7 -Coalesced [258] atan2_16::yi#19 ← atan2_16::yi#0 -Coalesced [259] atan2_16::xi#16 ← atan2_16::xi#0 -Coalesced [262] atan2_16::angle#22 ← atan2_16::angle#12 -Coalesced [267] atan2_16::angle#27 ← atan2_16::angle#4 -Coalesced [271] atan2_16::return#5 ← atan2_16::angle#5 -Coalesced [274] atan2_16::return#6 ← atan2_16::angle#11 -Coalesced [275] atan2_16::angle#26 ← atan2_16::angle#1 -Not coalescing [276] atan2_16::shift#5 ← atan2_16::i#2 -Not coalescing [277] atan2_16::xd#10 ← atan2_16::xi#3 -Not coalescing [278] atan2_16::yd#10 ← atan2_16::yi#3 -Coalesced [284] atan2_16::yd#13 ← atan2_16::yd#2 -Coalesced [285] atan2_16::xd#13 ← atan2_16::xd#2 -Coalesced [292] atan2_16::yi#21 ← atan2_16::yi#2 -Coalesced [293] atan2_16::angle#25 ← atan2_16::angle#3 -Coalesced [294] atan2_16::xi#18 ← atan2_16::xi#2 -Coalesced [298] atan2_16::yi#18 ← atan2_16::yi#8 -Coalesced [299] atan2_16::xi#15 ← atan2_16::xi#8 -Coalesced [300] atan2_16::i#12 ← atan2_16::i#1 -Coalesced [301] atan2_16::angle#21 ← atan2_16::angle#13 -Coalesced (already) [302] atan2_16::angle#23 ← atan2_16::angle#13 -Coalesced [307] atan2_16::yi#20 ← atan2_16::yi#1 -Coalesced [308] atan2_16::angle#24 ← atan2_16::angle#2 -Coalesced [309] atan2_16::xi#17 ← atan2_16::xi#1 -Coalesced [310] atan2_16::yd#12 ← atan2_16::yd#3 -Coalesced [311] atan2_16::xd#12 ← atan2_16::xd#3 -Coalesced [315] atan2_16::shift#6 ← atan2_16::shift#1 -Coalesced [316] atan2_16::xd#11 ← atan2_16::xd#1 -Coalesced [317] atan2_16::yd#11 ← atan2_16::yd#1 -Not coalescing [318] atan2_16::xi#13 ← atan2_16::x#0 -Not coalescing [319] atan2_16::yi#16 ← atan2_16::y#0 -Not coalescing [322] heap_head#1 ← malloc::mem#0 -Coalesced [375] processChars::numActive#17 ← processChars::numActive#1 -Coalesced [381] processChars::i#13 ← processChars::i#1 -Coalesced [382] processChars::numActive#15 ← processChars::numActive#3 -Coalesced (already) [387] processChars::numActive#16 ← processChars::numActive#10 +Coalesced [7] heap_head#12 ← heap_head#1 +Coalesced [20] main::dst#4 ← main::dst#0 +Coalesced [64] main::i#3 ← main::i#1 +Coalesced [65] main::src#3 ← main::src#1 +Coalesced [66] main::dst#3 ← main::dst#1 +Coalesced [76] startProcessing::freeIdx#9 ← startProcessing::i#2 +Coalesced [96] startProcessing::chargenData#3 ← startProcessing::chargenData#0 +Coalesced [97] startProcessing::spriteData#3 ← startProcessing::spriteData#0 +Coalesced [132] startProcessing::chargenData#4 ← startProcessing::chargenData#1 +Coalesced [133] startProcessing::spriteData#4 ← startProcessing::spriteData#1 +Coalesced [134] startProcessing::i1#3 ← startProcessing::i1#1 +Not coalescing [135] startProcessing::freeIdx#7 ← startProcessing::freeIdx#2 +Not coalescing [138] startProcessing::freeIdx#8 ← startProcessing::freeIdx#6 +Coalesced [139] startProcessing::i#5 ← startProcessing::i#1 +Coalesced [142] getCharToProcess::screen_line#8 ← getCharToProcess::screen_line#0 +Coalesced [143] getCharToProcess::dist_line#8 ← getCharToProcess::dist_line#0 +Coalesced [145] getCharToProcess::closest_dist#11 ← getCharToProcess::closest_dist#8 +Coalesced [146] getCharToProcess::closest_x#11 ← getCharToProcess::closest_x#9 +Coalesced [147] getCharToProcess::closest_y#11 ← getCharToProcess::closest_y#9 +Coalesced [152] getCharToProcess::return_dist#7 ← getCharToProcess::dist#0 +Not coalescing [153] getCharToProcess::return_x#7 ← getCharToProcess::x#2 +Not coalescing [154] getCharToProcess::return_y#7 ← getCharToProcess::y#7 +Coalesced [171] getCharToProcess::screen_line#9 ← getCharToProcess::screen_line#1 +Coalesced [172] getCharToProcess::dist_line#9 ← getCharToProcess::dist_line#1 +Not coalescing [173] getCharToProcess::closest_dist#10 ← getCharToProcess::return_dist#1 +Coalesced [174] getCharToProcess::y#8 ← getCharToProcess::y#1 +Coalesced [175] getCharToProcess::closest_x#10 ← getCharToProcess::return_x#1 +Coalesced [176] getCharToProcess::closest_y#10 ← getCharToProcess::return_y#1 +Coalesced [177] getCharToProcess::x#6 ← getCharToProcess::x#1 +Not coalescing [178] getCharToProcess::closest_dist#12 ← getCharToProcess::return_dist#1 +Coalesced (already) [179] getCharToProcess::closest_x#12 ← getCharToProcess::return_x#1 +Coalesced (already) [180] getCharToProcess::closest_y#12 ← getCharToProcess::return_y#1 +Not coalescing [181] getCharToProcess::return_dist#6 ← getCharToProcess::closest_dist#2 +Coalesced (already) [182] getCharToProcess::return_x#6 ← getCharToProcess::closest_x#7 +Coalesced (already) [183] getCharToProcess::return_y#6 ← getCharToProcess::closest_y#7 +Not coalescing [184] getCharToProcess::return_dist#5 ← getCharToProcess::closest_dist#2 +Coalesced (already) [185] getCharToProcess::return_x#5 ← getCharToProcess::closest_x#7 +Coalesced (already) [186] getCharToProcess::return_y#5 ← getCharToProcess::closest_y#7 +Coalesced [211] initSprites::i#3 ← initSprites::i#1 +Coalesced [212] initSprites::sp#3 ← initSprites::sp#1 +Coalesced [215] init_angle_screen::screen_bottomline#6 ← init_angle_screen::screen_bottomline#0 +Coalesced [216] init_angle_screen::screen_topline#6 ← init_angle_screen::screen_topline#0 +Coalesced [246] init_angle_screen::y#6 ← init_angle_screen::y#1 +Coalesced [247] init_angle_screen::screen_bottomline#7 ← init_angle_screen::screen_bottomline#1 +Coalesced [248] init_angle_screen::screen_topline#7 ← init_angle_screen::screen_topline#1 +Coalesced [249] init_angle_screen::x#4 ← init_angle_screen::x#1 +Coalesced [250] init_angle_screen::xb#4 ← init_angle_screen::xb#1 +Coalesced [253] atan2_16::yi#17 ← atan2_16::$2 +Coalesced [257] atan2_16::xi#14 ← atan2_16::$7 +Coalesced [259] atan2_16::yi#19 ← atan2_16::yi#0 +Coalesced [260] atan2_16::xi#16 ← atan2_16::xi#0 +Coalesced [263] atan2_16::angle#22 ← atan2_16::angle#12 +Coalesced [268] atan2_16::angle#27 ← atan2_16::angle#4 +Coalesced [272] atan2_16::return#5 ← atan2_16::angle#5 +Coalesced [275] atan2_16::return#6 ← atan2_16::angle#11 +Coalesced [276] atan2_16::angle#26 ← atan2_16::angle#1 +Not coalescing [277] atan2_16::shift#5 ← atan2_16::i#2 +Not coalescing [278] atan2_16::xd#10 ← atan2_16::xi#3 +Not coalescing [279] atan2_16::yd#10 ← atan2_16::yi#3 +Coalesced [285] atan2_16::yd#13 ← atan2_16::yd#2 +Coalesced [286] atan2_16::xd#13 ← atan2_16::xd#2 +Coalesced [293] atan2_16::yi#21 ← atan2_16::yi#2 +Coalesced [294] atan2_16::angle#25 ← atan2_16::angle#3 +Coalesced [295] atan2_16::xi#18 ← atan2_16::xi#2 +Coalesced [299] atan2_16::yi#18 ← atan2_16::yi#8 +Coalesced [300] atan2_16::xi#15 ← atan2_16::xi#8 +Coalesced [301] atan2_16::i#12 ← atan2_16::i#1 +Coalesced [302] atan2_16::angle#21 ← atan2_16::angle#13 +Coalesced (already) [303] atan2_16::angle#23 ← atan2_16::angle#13 +Coalesced [308] atan2_16::yi#20 ← atan2_16::yi#1 +Coalesced [309] atan2_16::angle#24 ← atan2_16::angle#2 +Coalesced [310] atan2_16::xi#17 ← atan2_16::xi#1 +Coalesced [311] atan2_16::yd#12 ← atan2_16::yd#3 +Coalesced [312] atan2_16::xd#12 ← atan2_16::xd#3 +Coalesced [316] atan2_16::shift#6 ← atan2_16::shift#1 +Coalesced [317] atan2_16::xd#11 ← atan2_16::xd#1 +Coalesced [318] atan2_16::yd#11 ← atan2_16::yd#1 +Not coalescing [319] atan2_16::xi#13 ← atan2_16::x#0 +Not coalescing [320] atan2_16::yi#16 ← atan2_16::y#0 +Not coalescing [323] heap_head#1 ← malloc::mem#0 +Coalesced [376] processChars::numActive#17 ← processChars::numActive#1 +Coalesced [382] processChars::i#13 ← processChars::i#1 +Coalesced [383] processChars::numActive#15 ← processChars::numActive#3 +Coalesced (already) [388] processChars::numActive#16 ← processChars::numActive#10 Coalesced down to 37 phi equivalence classes -Culled Empty Block (label) @6 -Culled Empty Block (label) @13 -Culled Empty Block (label) @20 +Culled Empty Block (label) @4 +Culled Empty Block (label) @11 +Culled Empty Block (label) @18 Culled Empty Block (label) @25 -Culled Empty Block (label) @26 Culled Empty Block (label) @30 +Culled Empty Block (label) @31 +Culled Empty Block (label) @35 Culled Empty Block (label) main::@2 Culled Empty Block (label) main::@15 Culled Empty Block (label) main::@17 @@ -3832,10 +3842,10 @@ Culled Empty Block (label) irqBottom::@7 Culled Empty Block (label) processChars::@15 Culled Empty Block (label) processChars::@20 Culled Empty Block (label) processChars::@21 -Renumbering block @17 to @1 -Renumbering block @27 to @2 -Renumbering block @28 to @3 -Renumbering block @29 to @4 +Renumbering block @22 to @1 +Renumbering block @32 to @2 +Renumbering block @33 to @3 +Renumbering block @34 to @4 Renumbering block atan2_16::@13 to atan2_16::@9 Renumbering block atan2_16::@15 to atan2_16::@10 Renumbering block atan2_16::@16 to atan2_16::@11 diff --git a/src/test/ref/default-font.log b/src/test/ref/default-font.log index a43a56f36..352d65d5e 100644 --- a/src/test/ref/default-font.log +++ b/src/test/ref/default-font.log @@ -2,6 +2,7 @@ Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src) Identified constant variable (byte*) SCREEN Culled Empty Block (label) @1 Culled Empty Block (label) @2 +Culled Empty Block (label) memset::@5 Culled Empty Block (label) memset::@3 Culled Empty Block (label) @3 Culled Empty Block (label) main::@4 @@ -10,30 +11,38 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@4 memset: scope:[memset] from main - (byte) memset::c#2 ← phi( main/(byte) memset::c#0 ) + (byte) memset::c#3 ← phi( main/(byte) memset::c#0 ) + (void*) memset::str#3 ← phi( main/(void*) memset::str#0 ) (word) memset::num#1 ← phi( main/(word) memset::num#0 ) - (void*) memset::str#1 ← phi( main/(void*) memset::str#0 ) - (byte*~) memset::$0 ← ((byte*)) (void*) memset::str#1 - (byte*~) memset::$1 ← (byte*~) memset::$0 + (word) memset::num#1 - (byte*) memset::end#0 ← (byte*~) memset::$1 - (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#1 - to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - (void*) memset::str#3 ← phi( memset/(void*) memset::str#1 memset::@1/(void*) memset::str#3 ) - (byte*) memset::end#1 ← phi( memset/(byte*) memset::end#0 memset::@1/(byte*) memset::end#1 ) - (byte*) memset::dst#2 ← phi( memset/(byte*) memset::dst#0 memset::@1/(byte*) memset::dst#1 ) - (byte) memset::c#1 ← phi( memset/(byte) memset::c#2 memset::@1/(byte) memset::c#1 ) + (bool~) memset::$0 ← (word) memset::num#1 > (number) 0 + (bool~) memset::$1 ← ! (bool~) memset::$0 + if((bool~) memset::$1) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + (void*) memset::str#1 ← phi( memset/(void*) memset::str#3 memset::@4/(void*) memset::str#4 ) + (void*) memset::return#0 ← (void*) memset::str#1 + to:memset::@return +memset::@2: scope:[memset] from memset + (byte) memset::c#2 ← phi( memset/(byte) memset::c#3 ) + (word) memset::num#2 ← phi( memset/(word) memset::num#1 ) + (void*) memset::str#2 ← phi( memset/(void*) memset::str#3 ) + (byte*~) memset::$2 ← ((byte*)) (void*) memset::str#2 + (byte*~) memset::$3 ← (byte*~) memset::$2 + (word) memset::num#2 + (byte*) memset::end#0 ← (byte*~) memset::$3 + (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#2 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + (void*) memset::str#4 ← phi( memset::@2/(void*) memset::str#2 memset::@4/(void*) memset::str#4 ) + (byte*) memset::end#1 ← phi( memset::@2/(byte*) memset::end#0 memset::@4/(byte*) memset::end#1 ) + (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + (byte) memset::c#1 ← phi( memset::@2/(byte) memset::c#2 memset::@4/(byte) memset::c#1 ) *((byte*) memset::dst#2) ← (byte) memset::c#1 (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - (bool~) memset::$2 ← (byte*) memset::dst#1 != (byte*) memset::end#1 - if((bool~) memset::$2) goto memset::@1 - to:memset::@2 -memset::@2: scope:[memset] from memset::@1 - (void*) memset::str#2 ← phi( memset::@1/(void*) memset::str#3 ) - (void*) memset::return#0 ← (void*) memset::str#2 - to:memset::@return -memset::@return: scope:[memset] from memset::@2 - (void*) memset::return#3 ← phi( memset::@2/(void*) memset::return#0 ) + (bool~) memset::$4 ← (byte*) memset::dst#1 != (byte*) memset::end#1 + if((bool~) memset::$4) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + (void*) memset::return#3 ← phi( memset::@1/(void*) memset::return#0 ) (void*) memset::return#1 ← (void*) memset::return#3 return to:@return @@ -133,16 +142,20 @@ SYMBOL TABLE SSA (byte) main::y#1 (byte) main::y#2 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) -(byte*~) memset::$0 -(byte*~) memset::$1 -(bool~) memset::$2 +(bool~) memset::$0 +(bool~) memset::$1 +(byte*~) memset::$2 +(byte*~) memset::$3 +(bool~) memset::$4 (label) memset::@1 (label) memset::@2 +(label) memset::@4 (label) memset::@return (byte) memset::c (byte) memset::c#0 (byte) memset::c#1 (byte) memset::c#2 +(byte) memset::c#3 (byte*) memset::dst (byte*) memset::dst#0 (byte*) memset::dst#1 @@ -153,6 +166,7 @@ SYMBOL TABLE SSA (word) memset::num (word) memset::num#0 (word) memset::num#1 +(word) memset::num#2 (void*) memset::return (void*) memset::return#0 (void*) memset::return#1 @@ -163,32 +177,41 @@ SYMBOL TABLE SSA (void*) memset::str#1 (void*) memset::str#2 (void*) memset::str#3 +(void*) memset::str#4 +Adding number conversion cast (unumber) 0 in (bool~) memset::$0 ← (word) memset::num#1 > (number) 0 Adding number conversion cast (unumber) $3e8 in (word) memset::num#0 ← (number) $3e8 Adding number conversion cast (unumber) $28 in (byte*~) main::$1 ← (byte*) SCREEN#0 + (number) $28 Adding number conversion cast (unumber) 1 in (byte*~) main::$2 ← (byte*~) main::$1 + (number) 1 Adding number conversion cast (unumber) 0 in (byte) main::ch#0 ← (number) 0 Adding number conversion cast (unumber) $28-$10 in (byte*) main::screen#2 ← (byte*) main::screen#4 + (number) $28-(number) $10 Successful SSA optimization PassNAddNumberTypeConversions -Inlining cast (byte*~) memset::$0 ← (byte*)(void*) memset::str#1 -Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#1 +Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#2 +Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400 Inlining cast (word) memset::num#0 ← (unumber)(number) $3e8 Inlining cast (byte) main::ch#0 ← (unumber)(number) 0 Successful SSA optimization Pass2InlineCast +Simplifying constant integer cast 0 Simplifying constant pointer cast (byte*) 1024 Simplifying constant integer cast $3e8 Simplifying constant integer cast $28 Simplifying constant integer cast 1 Simplifying constant integer cast 0 Successful SSA optimization PassNCastSimplification +Finalized unsigned number type (byte) 0 Finalized unsigned number type (word) $3e8 Finalized unsigned number type (byte) $28 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 0 Successful SSA optimization PassNFinalizeNumberTypeConversions -Alias (byte*) memset::end#0 = (byte*~) memset::$1 -Alias (void*) memset::return#0 = (void*) memset::str#2 (void*) memset::str#3 (void*) memset::return#3 (void*) memset::return#1 +Inversing boolean not [2] (bool~) memset::$1 ← (word) memset::num#1 <= (byte) 0 from [1] (bool~) memset::$0 ← (word) memset::num#1 > (byte) 0 +Successful SSA optimization Pass2UnaryNotSimplification +Alias (void*) memset::return#0 = (void*) memset::str#1 (void*) memset::return#3 (void*) memset::return#1 +Alias (void*) memset::str#2 = (void*) memset::str#3 +Alias (word) memset::num#1 = (word) memset::num#2 +Alias (byte) memset::c#2 = (byte) memset::c#3 +Alias (byte*) memset::end#0 = (byte*~) memset::$3 Alias (byte*) main::screen#0 = (byte*~) main::$2 Alias (byte*) main::screen#1 = (byte*) main::screen#4 Alias (byte) main::x#2 = (byte) main::x#3 @@ -196,20 +219,23 @@ Alias (byte) main::ch#1 = (byte) main::ch#4 Successful SSA optimization Pass2AliasElimination Self Phi Eliminated (byte) memset::c#1 Self Phi Eliminated (byte*) memset::end#1 -Self Phi Eliminated (void*) memset::return#0 +Self Phi Eliminated (void*) memset::str#4 Self Phi Eliminated (byte) main::x#2 Successful SSA optimization Pass2SelfPhiElimination -Identical Phi Values (void*) memset::str#1 (void*) memset::str#0 Identical Phi Values (word) memset::num#1 (word) memset::num#0 +Identical Phi Values (void*) memset::str#2 (void*) memset::str#0 Identical Phi Values (byte) memset::c#2 (byte) memset::c#0 Identical Phi Values (byte) memset::c#1 (byte) memset::c#2 Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0 -Identical Phi Values (void*) memset::return#0 (void*) memset::str#1 +Identical Phi Values (void*) memset::str#4 (void*) memset::str#2 Identical Phi Values (byte) main::x#2 (byte) main::x#4 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) memset::$2 [9] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -Simple Condition (bool~) main::$3 [34] if((byte) main::y#1!=rangelast(0,$f)) goto main::@2 -Simple Condition (bool~) main::$4 [39] if((byte) main::x#1!=rangelast(0,$f)) goto main::@1 +Identical Phi Values (void*) memset::return#0 (void*) memset::str#0 +Successful SSA optimization Pass2IdenticalPhiElimination +Simple Condition (bool~) memset::$1 [3] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [15] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 +Simple Condition (bool~) main::$3 [38] if((byte) main::y#1!=rangelast(0,$f)) goto main::@2 +Simple Condition (bool~) main::$4 [43] if((byte) main::x#1!=rangelast(0,$f)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = (byte*) 1024 Constant (const byte) memset::c#0 = ' ' @@ -218,12 +244,14 @@ Constant (const byte) main::ch#0 = 0 Constant (const byte) main::x#0 = 0 Constant (const byte) main::y#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Constant value identified (void*)SCREEN#0 in [16] (void*) memset::str#0 ← (void*)(const byte*) SCREEN#0 +Constant value identified (void*)SCREEN#0 in [20] (void*) memset::str#0 ← (void*)(const byte*) SCREEN#0 Successful SSA optimization Pass2ConstantValues -Resolved ranged next value [32] main::y#1 ← ++ main::y#2 to ++ -Resolved ranged comparison value [34] if(main::y#1!=rangelast(0,$f)) goto main::@2 to (number) $10 -Resolved ranged next value [37] main::x#1 ← ++ main::x#4 to ++ -Resolved ranged comparison value [39] if(main::x#1!=rangelast(0,$f)) goto main::@1 to (number) $10 +if() condition always false - eliminating [3] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +Successful SSA optimization Pass2ConstantIfs +Resolved ranged next value [36] main::y#1 ← ++ main::y#2 to ++ +Resolved ranged comparison value [38] if(main::y#1!=rangelast(0,$f)) goto main::@2 to (number) $10 +Resolved ranged next value [41] main::x#1 ← ++ main::x#4 to ++ +Resolved ranged comparison value [43] if(main::x#1!=rangelast(0,$f)) goto main::@1 to (number) $10 Eliminating unused variable (void*) memset::return#2 and assignment [10] (void*) memset::return#2 ← (void*) memset::str#0 Successful SSA optimization PassNEliminateUnusedVars Adding number conversion cast (unumber) $10 in if((byte) main::y#1!=(number) $10) goto main::@2 @@ -240,33 +268,33 @@ Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const void*) memset::str#0 = (void*)SCREEN#0 Constant (const byte*) main::$1 = SCREEN#0+$28 Successful SSA optimization Pass2ConstantIdentification -Constant value identified (byte*)memset::str#0 in [0] (byte*~) memset::$0 ← (byte*)(const void*) memset::str#0 +Constant value identified (byte*)memset::str#0 in [0] (byte*~) memset::$2 ← (byte*)(const void*) memset::str#0 Constant value identified (byte*)memset::str#0 in [2] (byte*) memset::dst#0 ← (byte*)(const void*) memset::str#0 Successful SSA optimization Pass2ConstantValues Constant right-side identified [9] (byte*) main::screen#0 ← (const byte*) main::$1 + (byte) 1 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) memset::$0 = (byte*)memset::str#0 +Constant (const byte*) memset::$2 = (byte*)memset::str#0 Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const byte*) main::screen#0 = main::$1+1 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [0] (byte*) memset::end#0 ← (const byte*) memset::$0 + (const word) memset::num#0 +Constant right-side identified [0] (byte*) memset::end#0 ← (const byte*) memset::$2 + (const word) memset::num#0 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) memset::end#0 = memset::$0+memset::num#0 +Constant (const byte*) memset::end#0 = memset::$2+memset::num#0 Successful SSA optimization Pass2ConstantIdentification Inlining constant with var siblings (const byte*) memset::dst#0 Inlining constant with var siblings (const byte) main::ch#0 Inlining constant with var siblings (const byte) main::x#0 Inlining constant with var siblings (const byte) main::y#0 Inlining constant with var siblings (const byte*) main::screen#0 -Constant inlined memset::$0 = (byte*)(const void*) memset::str#0 Constant inlined main::screen#0 = (const byte*) SCREEN#0+(byte) $28+(byte) 1 +Constant inlined memset::$2 = (byte*)(const void*) memset::str#0 Constant inlined main::$1 = (const byte*) SCREEN#0+(byte) $28 Constant inlined memset::dst#0 = (byte*)(const void*) memset::str#0 Constant inlined main::x#0 = (byte) 0 Constant inlined main::y#0 = (byte) 0 Constant inlined main::ch#0 = (byte) 0 Successful SSA optimization Pass2ConstantInlining -Added new block during phi lifting memset::@4(between memset::@1 and memset::@1) +Added new block during phi lifting memset::@6(between memset::@4 and memset::@4) Added new block during phi lifting main::@6(between main::@3 and main::@1) Added new block during phi lifting main::@7(between main::@2 and main::@2) Adding NOP phi() at start of @begin @@ -278,6 +306,7 @@ Adding NOP phi() at start of main Adding NOP phi() at start of main::@5 Adding NOP phi() at start of memset Adding NOP phi() at start of memset::@2 +Adding NOP phi() at start of memset::@1 CALL GRAPH Calls in [] to main:3 Calls in [main] to memset:7 @@ -291,7 +320,7 @@ Coalesced [24] main::x#5 ← main::x#1 Coalesced (already) [25] main::ch#7 ← main::ch#1 Coalesced [26] main::screen#8 ← main::screen#1 Coalesced [27] main::y#3 ← main::y#1 -Coalesced [35] memset::dst#3 ← memset::dst#1 +Coalesced [36] memset::dst#3 ← memset::dst#1 Coalesced down to 5 phi equivalence classes Culled Empty Block (label) @4 Culled Empty Block (label) @6 @@ -299,8 +328,10 @@ Culled Empty Block (label) main::@5 Culled Empty Block (label) main::@6 Culled Empty Block (label) main::@7 Culled Empty Block (label) memset::@2 -Culled Empty Block (label) memset::@4 +Culled Empty Block (label) memset::@1 +Culled Empty Block (label) memset::@6 Renumbering block @5 to @1 +Renumbering block memset::@4 to memset::@1 Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 Adding NOP phi() at start of @end diff --git a/src/test/ref/examples/scrolllogo/scrolllogo.asm b/src/test/ref/examples/scrolllogo/scrolllogo.asm index f5d58373d..ec0c4d095 100644 --- a/src/test/ref/examples/scrolllogo/scrolllogo.asm +++ b/src/test/ref/examples/scrolllogo/scrolllogo.asm @@ -733,7 +733,7 @@ memset: { lda str+1 adc #>$3e8 sta end+1 - b1: + b2: txa ldy #0 sta (dst),y @@ -743,10 +743,10 @@ memset: { !: lda dst+1 cmp end+1 - bne b1 + bne b2 lda dst cmp end - bne b1 + bne b2 rts } .align $100 diff --git a/src/test/ref/examples/scrolllogo/scrolllogo.cfg b/src/test/ref/examples/scrolllogo/scrolllogo.cfg index 9cce2a6f0..ecb090ad0 100644 --- a/src/test/ref/examples/scrolllogo/scrolllogo.cfg +++ b/src/test/ref/examples/scrolllogo/scrolllogo.cfg @@ -435,16 +435,18 @@ divr16u::@return: scope:[divr16u] from divr16u::@6 to:@return memset: scope:[memset] from main::@3 main::@4 [214] (byte) memset::c#3 ← phi( main::@3/(const byte) BLACK#0 main::@4/(const byte) WHITE#0|(byte) 8 ) - [214] (void*) memset::str#2 ← phi( main::@3/(void*)(const byte*) SCREEN#0 main::@4/(void*)(const byte*) COLS#0 ) - [215] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) $3e8 - [216] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + [214] (void*) memset::str#3 ← phi( main::@3/(void*)(const byte*) SCREEN#0 main::@4/(void*)(const byte*) COLS#0 ) to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - [217] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) +memset::@1: scope:[memset] from memset + [215] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) $3e8 + [216] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + to:memset::@2 +memset::@2: scope:[memset] from memset::@1 memset::@2 + [217] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 ) [218] *((byte*) memset::dst#2) ← (byte) memset::c#3 [219] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - [220] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 + [220] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 to:memset::@return -memset::@return: scope:[memset] from memset::@1 +memset::@return: scope:[memset] from memset::@2 [221] return to:@return diff --git a/src/test/ref/examples/scrolllogo/scrolllogo.log b/src/test/ref/examples/scrolllogo/scrolllogo.log index 7791974a2..d19227f7e 100644 --- a/src/test/ref/examples/scrolllogo/scrolllogo.log +++ b/src/test/ref/examples/scrolllogo/scrolllogo.log @@ -40,6 +40,7 @@ Culled Empty Block (label) @23 Culled Empty Block (label) @24 Culled Empty Block (label) @25 Culled Empty Block (label) @26 +Culled Empty Block (label) memset::@5 Culled Empty Block (label) memset::@3 Culled Empty Block (label) @27 Culled Empty Block (label) main::toD0181_@1 @@ -548,30 +549,38 @@ mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@2 return to:@return memset: scope:[memset] from main::@3 main::@4 - (byte) memset::c#3 ← phi( main::@3/(byte) memset::c#0 main::@4/(byte) memset::c#1 ) + (byte) memset::c#4 ← phi( main::@3/(byte) memset::c#0 main::@4/(byte) memset::c#1 ) + (void*) memset::str#4 ← phi( main::@3/(void*) memset::str#0 main::@4/(void*) memset::str#1 ) (word) memset::num#2 ← phi( main::@3/(word) memset::num#0 main::@4/(word) memset::num#1 ) - (void*) memset::str#2 ← phi( main::@3/(void*) memset::str#0 main::@4/(void*) memset::str#1 ) - (byte*~) memset::$0 ← ((byte*)) (void*) memset::str#2 - (byte*~) memset::$1 ← (byte*~) memset::$0 + (word) memset::num#2 - (byte*) memset::end#0 ← (byte*~) memset::$1 - (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#2 - to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - (void*) memset::str#4 ← phi( memset/(void*) memset::str#2 memset::@1/(void*) memset::str#4 ) - (byte*) memset::end#1 ← phi( memset/(byte*) memset::end#0 memset::@1/(byte*) memset::end#1 ) - (byte*) memset::dst#2 ← phi( memset/(byte*) memset::dst#0 memset::@1/(byte*) memset::dst#1 ) - (byte) memset::c#2 ← phi( memset/(byte) memset::c#3 memset::@1/(byte) memset::c#2 ) + (bool~) memset::$0 ← (word) memset::num#2 > (number) 0 + (bool~) memset::$1 ← ! (bool~) memset::$0 + if((bool~) memset::$1) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + (void*) memset::str#2 ← phi( memset/(void*) memset::str#4 memset::@4/(void*) memset::str#5 ) + (void*) memset::return#0 ← (void*) memset::str#2 + to:memset::@return +memset::@2: scope:[memset] from memset + (byte) memset::c#3 ← phi( memset/(byte) memset::c#4 ) + (word) memset::num#3 ← phi( memset/(word) memset::num#2 ) + (void*) memset::str#3 ← phi( memset/(void*) memset::str#4 ) + (byte*~) memset::$2 ← ((byte*)) (void*) memset::str#3 + (byte*~) memset::$3 ← (byte*~) memset::$2 + (word) memset::num#3 + (byte*) memset::end#0 ← (byte*~) memset::$3 + (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#3 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + (void*) memset::str#5 ← phi( memset::@2/(void*) memset::str#3 memset::@4/(void*) memset::str#5 ) + (byte*) memset::end#1 ← phi( memset::@2/(byte*) memset::end#0 memset::@4/(byte*) memset::end#1 ) + (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + (byte) memset::c#2 ← phi( memset::@2/(byte) memset::c#3 memset::@4/(byte) memset::c#2 ) *((byte*) memset::dst#2) ← (byte) memset::c#2 (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - (bool~) memset::$2 ← (byte*) memset::dst#1 != (byte*) memset::end#1 - if((bool~) memset::$2) goto memset::@1 - to:memset::@2 -memset::@2: scope:[memset] from memset::@1 - (void*) memset::str#3 ← phi( memset::@1/(void*) memset::str#4 ) - (void*) memset::return#0 ← (void*) memset::str#3 - to:memset::@return -memset::@return: scope:[memset] from memset::@2 - (void*) memset::return#4 ← phi( memset::@2/(void*) memset::return#0 ) + (bool~) memset::$4 ← (byte*) memset::dst#1 != (byte*) memset::end#1 + if((bool~) memset::$4) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + (void*) memset::return#4 ← phi( memset::@1/(void*) memset::return#0 ) (void*) memset::return#1 ← (void*) memset::return#4 return to:@return @@ -1103,17 +1112,21 @@ SYMBOL TABLE SSA (byte*) main::toD0181_screen#0 (byte*) main::toD0181_screen#1 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) -(byte*~) memset::$0 -(byte*~) memset::$1 -(bool~) memset::$2 +(bool~) memset::$0 +(bool~) memset::$1 +(byte*~) memset::$2 +(byte*~) memset::$3 +(bool~) memset::$4 (label) memset::@1 (label) memset::@2 +(label) memset::@4 (label) memset::@return (byte) memset::c (byte) memset::c#0 (byte) memset::c#1 (byte) memset::c#2 (byte) memset::c#3 +(byte) memset::c#4 (byte*) memset::dst (byte*) memset::dst#0 (byte*) memset::dst#1 @@ -1125,6 +1138,7 @@ SYMBOL TABLE SSA (word) memset::num#0 (word) memset::num#1 (word) memset::num#2 +(word) memset::num#3 (void*) memset::return (void*) memset::return#0 (void*) memset::return#1 @@ -1137,6 +1151,7 @@ SYMBOL TABLE SSA (void*) memset::str#2 (void*) memset::str#3 (void*) memset::str#4 +(void*) memset::str#5 (signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) (word~) mul16s::$0 (word~) mul16s::$1 @@ -1664,6 +1679,7 @@ Adding number conversion cast (unumber) 0 in (byte) mulu16_sel::select#3 ← (nu Adding number conversion cast (unumber) 0 in (byte) mulu16_sel::select#4 ← (number) 0 Adding number conversion cast (unumber) 4 in (word~) sin16s::$12 ← (word) sin16s::x5#0 >> (number) 4 Adding number conversion cast (unumber) 0 in (bool~) sin16s::$15 ← (byte) sin16s::isUpper#2 != (number) 0 +Adding number conversion cast (unumber) 0 in (bool~) memset::$0 ← (word) memset::num#2 > (number) 0 Adding number conversion cast (unumber) $200 in (word) XSIN_SIZE#0 ← (number) $200 Adding number conversion cast (unumber) $3fff in (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (number) $3fff Adding number conversion cast (unumber) main::toD0181_$1#0 in (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (unumber)(number) $3fff @@ -1755,8 +1771,8 @@ Inlining cast (byte) mulu16_sel::select#3 ← (unumber)(number) 0 Inlining cast (byte) mulu16_sel::select#4 ← (unumber)(number) 0 Inlining cast (signed word~) sin16s::$14 ← (signed word)(word) sin16s::usinx#1 Inlining cast (signed word~) sin16s::$19 ← (signed word)(word) sin16s::usinx#3 -Inlining cast (byte*~) memset::$0 ← (byte*)(void*) memset::str#2 -Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 +Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 +Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400 Inlining cast (byte*) LOGO#0 ← (byte*)(number) $2000 Inlining cast (word) XSIN_SIZE#0 ← (unumber)(number) $200 @@ -1830,6 +1846,7 @@ Simplifying constant integer cast 0 Simplifying constant integer cast 0 Simplifying constant integer cast 4 Simplifying constant integer cast 0 +Simplifying constant integer cast 0 Simplifying constant pointer cast (byte*) 1024 Simplifying constant pointer cast (byte*) 8192 Simplifying constant integer cast $200 @@ -1905,6 +1922,7 @@ Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 4 Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 Finalized unsigned number type (word) $200 Finalized unsigned number type (word) $3fff Finalized unsigned number type (byte) 4 @@ -1970,7 +1988,8 @@ Inversing boolean not [117] (bool~) mul16s::$6 ← (signed word) mul16s::b#2 >= Inversing boolean not [185] (bool~) sin16s::$1 ← (dword) sin16s::x#3 < (dword) PI_u4f28#0 from [184] (bool~) sin16s::$0 ← (dword) sin16s::x#3 >= (dword) PI_u4f28#0 Inversing boolean not [189] (bool~) sin16s::$3 ← (dword) sin16s::x#4 < (dword) PI_HALF_u4f28#0 from [188] (bool~) sin16s::$2 ← (dword) sin16s::x#4 >= (dword) PI_HALF_u4f28#0 Inversing boolean not [248] (bool~) sin16s::$16 ← (byte) sin16s::isUpper#2 == (byte) 0 from [247] (bool~) sin16s::$15 ← (byte) sin16s::isUpper#2 != (byte) 0 -Inversing boolean not [373] (bool~) loop::$4 ← (word) xsin_idx#3 != (word) XSIN_SIZE#0 from [372] (bool~) loop::$3 ← (word) xsin_idx#3 == (word) XSIN_SIZE#0 +Inversing boolean not [277] (bool~) memset::$1 ← (word) memset::num#2 <= (byte) 0 from [276] (bool~) memset::$0 ← (word) memset::num#2 > (byte) 0 +Inversing boolean not [377] (bool~) loop::$4 ← (word) xsin_idx#3 != (word) XSIN_SIZE#0 from [376] (bool~) loop::$3 ← (word) xsin_idx#3 == (word) XSIN_SIZE#0 Successful SSA optimization Pass2UnaryNotSimplification Alias (word) divr16u::rem#0 = (word~) divr16u::$0 (word) divr16u::rem#7 Alias (word) divr16u::dividend#0 = (word~) divr16u::$6 (word) divr16u::dividend#8 @@ -2062,8 +2081,11 @@ Alias (signed word) sin16s::sinx#1 = (signed word~) sin16s::$20 Alias (dword) mul16u::return#3 = (dword) mul16u::return#6 Alias (byte) mulu16_sel::select#5 = (byte) mulu16_sel::select#6 Alias (word) mulu16_sel::return#12 = (word) mulu16_sel::return#5 (word~) mulu16_sel::$2 (word) mulu16_sel::return#6 -Alias (byte*) memset::end#0 = (byte*~) memset::$1 -Alias (void*) memset::return#0 = (void*) memset::str#3 (void*) memset::str#4 (void*) memset::return#4 (void*) memset::return#1 +Alias (void*) memset::return#0 = (void*) memset::str#2 (void*) memset::return#4 (void*) memset::return#1 +Alias (void*) memset::str#3 = (void*) memset::str#4 +Alias (word) memset::num#2 = (word) memset::num#3 +Alias (byte) memset::c#3 = (byte) memset::c#4 +Alias (byte*) memset::end#0 = (byte*~) memset::$3 Alias (byte*) main::toD0181_screen#0 = (byte*) main::toD0181_screen#1 Alias (byte*) main::toD0181_gfx#0 = (byte*) main::toD0181_gfx#1 Alias (word) rem16u#30 = (word) rem16u#36 (word) rem16u#37 (word) rem16u#35 (word) rem16u#34 (word) rem16u#33 @@ -2116,7 +2138,7 @@ Self Phi Eliminated (word) sin16s_gen2::wavelength#2 Self Phi Eliminated (word) rem16u#16 Self Phi Eliminated (byte) memset::c#2 Self Phi Eliminated (byte*) memset::end#1 -Self Phi Eliminated (void*) memset::return#0 +Self Phi Eliminated (void*) memset::str#5 Self Phi Eliminated (word) rem16u#23 Self Phi Eliminated (word) xsin_idx#13 Self Phi Eliminated (word) xsin_idx#10 @@ -2150,7 +2172,7 @@ Identical Phi Values (word) rem16u#16 (word) rem16u#15 Identical Phi Values (dword) sin16s::x#3 (dword) sin16s::x#0 Identical Phi Values (byte) memset::c#2 (byte) memset::c#3 Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0 -Identical Phi Values (void*) memset::return#0 (void*) memset::str#2 +Identical Phi Values (void*) memset::str#5 (void*) memset::str#3 Identical Phi Values (word) rem16u#30 (word) rem16u#0 Identical Phi Values (word) xsin_idx#21 (word) xsin_idx#16 Identical Phi Values (word) rem16u#23 (word) rem16u#30 @@ -2170,8 +2192,10 @@ Identical Phi Values (byte) render_logo::screen_idx#16 (byte) render_logo::scree Identical Phi Values (word) rem16u#10 (word) rem16u#17 Identical Phi Values (word) xsin_idx#12 (word) xsin_idx#0 Successful SSA optimization Pass2IdenticalPhiElimination -Identified duplicate assignment right side [427] (byte~) render_logo::$14 ← (byte) $28 * (byte) render_logo::line#10 -Identified duplicate assignment right side [444] (byte~) render_logo::$22 ← (byte) $28 * (byte) render_logo::line#11 +Identical Phi Values (void*) memset::return#0 (void*) memset::str#3 +Successful SSA optimization Pass2IdenticalPhiElimination +Identified duplicate assignment right side [431] (byte~) render_logo::$14 ← (byte) $28 * (byte) render_logo::line#10 +Identified duplicate assignment right side [448] (byte~) render_logo::$22 ← (byte) $28 * (byte) render_logo::line#11 Successful SSA optimization Pass2DuplicateRValueIdentification Simple Condition (bool~) divr16u::$4 [23] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 Simple Condition (bool~) divr16u::$9 [31] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 @@ -2184,19 +2208,20 @@ Simple Condition (bool~) sin16s_gen2::$10 [178] if((word) sin16s_gen2::i#1<(word Simple Condition (bool~) sin16s::$1 [186] if((dword) sin16s::x#0<(dword) PI_u4f28#0) goto sin16s::@1 Simple Condition (bool~) sin16s::$3 [190] if((dword) sin16s::x#4<(dword) PI_HALF_u4f28#0) goto sin16s::@2 Simple Condition (bool~) sin16s::$16 [249] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@3 -Simple Condition (bool~) memset::$2 [284] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -Simple Condition (bool~) main::$6 [339] if((byte) main::ch#1!=rangelast(0,$ef)) goto main::@1 -Simple Condition (bool~) loop::$0 [362] if(*((byte*) RASTER#0)!=(byte) $ff) goto loop::@4 -Simple Condition (bool~) loop::$4 [374] if((word) xsin_idx#3!=(word) XSIN_SIZE#0) goto loop::@11 -Simple Condition (bool~) render_logo::$5 [393] if((signed word) render_logo::xpos#0<(signed byte) 0) goto render_logo::@1 -Simple Condition (bool~) render_logo::$7 [405] if((byte) render_logo::screen_idx#18!=(byte) render_logo::logo_start#1) goto render_logo::@5 -Simple Condition (bool~) render_logo::$10 [416] unroll if((byte) render_logo::line#2!=rangelast(0,5)) goto render_logo::@7 -Simple Condition (bool~) render_logo::$11 [421] if((byte) render_logo::screen_idx#10!=(byte) $28) goto render_logo::@13 -Simple Condition (bool~) render_logo::$16 [432] unroll if((byte) render_logo::line#4!=rangelast(0,5)) goto render_logo::@15 -Simple Condition (bool~) render_logo::$19 [438] if((byte) render_logo::logo_idx#11!=(byte) $28) goto render_logo::@22 -Simple Condition (bool~) render_logo::$24 [449] unroll if((byte) render_logo::line#6!=rangelast(0,5)) goto render_logo::@24 -Simple Condition (bool~) render_logo::$25 [455] if((byte) render_logo::screen_idx#15!=(byte) $28) goto render_logo::@30 -Simple Condition (bool~) render_logo::$28 [464] unroll if((byte) render_logo::line#8!=rangelast(0,5)) goto render_logo::@32 +Simple Condition (bool~) memset::$1 [278] if((word) memset::num#2<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [290] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 +Simple Condition (bool~) main::$6 [343] if((byte) main::ch#1!=rangelast(0,$ef)) goto main::@1 +Simple Condition (bool~) loop::$0 [366] if(*((byte*) RASTER#0)!=(byte) $ff) goto loop::@4 +Simple Condition (bool~) loop::$4 [378] if((word) xsin_idx#3!=(word) XSIN_SIZE#0) goto loop::@11 +Simple Condition (bool~) render_logo::$5 [397] if((signed word) render_logo::xpos#0<(signed byte) 0) goto render_logo::@1 +Simple Condition (bool~) render_logo::$7 [409] if((byte) render_logo::screen_idx#18!=(byte) render_logo::logo_start#1) goto render_logo::@5 +Simple Condition (bool~) render_logo::$10 [420] unroll if((byte) render_logo::line#2!=rangelast(0,5)) goto render_logo::@7 +Simple Condition (bool~) render_logo::$11 [425] if((byte) render_logo::screen_idx#10!=(byte) $28) goto render_logo::@13 +Simple Condition (bool~) render_logo::$16 [436] unroll if((byte) render_logo::line#4!=rangelast(0,5)) goto render_logo::@15 +Simple Condition (bool~) render_logo::$19 [442] if((byte) render_logo::logo_idx#11!=(byte) $28) goto render_logo::@22 +Simple Condition (bool~) render_logo::$24 [453] unroll if((byte) render_logo::line#6!=rangelast(0,5)) goto render_logo::@24 +Simple Condition (bool~) render_logo::$25 [459] if((byte) render_logo::screen_idx#15!=(byte) $28) goto render_logo::@30 +Simple Condition (bool~) render_logo::$28 [468] unroll if((byte) render_logo::line#8!=rangelast(0,5)) goto render_logo::@32 Successful SSA optimization Pass2ConditionalJumpSimplification Constant right-side identified [216] (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6 Successful SSA optimization Pass2ConstantRValueConsolidation @@ -2262,28 +2287,28 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const word) divr16u::divisor#0 = div32u16u::divisor#0 Constant (const word) divr16u::divisor#1 = div32u16u::divisor#0 Successful SSA optimization Pass2ConstantIdentification -Constant value identified { fill( XSIN_SIZE#0, 0) } in [295] (signed word[XSIN_SIZE#0]) xsin#0 ← { fill( XSIN_SIZE#0, 0) } -Constant value identified (word)main::toD0181_screen#0 in [305] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 -Constant value identified (word)main::toD0181_gfx#0 in [309] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 -Constant value identified (void*)SCREEN#0 in [321] (void*) memset::str#0 ← (void*)(const byte*) SCREEN#0 -Constant value identified (void*)COLS#0 in [328] (void*) memset::str#1 ← (void*)(const byte*) COLS#0 +Constant value identified { fill( XSIN_SIZE#0, 0) } in [299] (signed word[XSIN_SIZE#0]) xsin#0 ← { fill( XSIN_SIZE#0, 0) } +Constant value identified (word)main::toD0181_screen#0 in [309] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 +Constant value identified (word)main::toD0181_gfx#0 in [313] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 +Constant value identified (void*)SCREEN#0 in [325] (void*) memset::str#0 ← (void*)(const byte*) SCREEN#0 +Constant value identified (void*)COLS#0 in [332] (void*) memset::str#1 ← (void*)(const byte*) COLS#0 Successful SSA optimization Pass2ConstantValues -if() condition always true - replacing block destination [359] if(true) goto loop::@4 +if() condition always true - replacing block destination [363] if(true) goto loop::@4 Successful SSA optimization Pass2ConstantIfs Resolved ranged next value [36] divr16u::i#1 ← ++ divr16u::i#2 to ++ Resolved ranged comparison value [38] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 -Resolved ranged next value [337] main::ch#1 ← ++ main::ch#2 to ++ -Resolved ranged comparison value [339] if(main::ch#1!=rangelast(0,$ef)) goto main::@1 to (number) $f0 -Resolved ranged next value [414] render_logo::line#2 ← ++ render_logo::line#9 to ++ -Resolved ranged comparison value [416] unroll if(render_logo::line#2!=rangelast(0,5)) goto render_logo::@7 to (number) 6 -Resolved ranged next value [430] render_logo::line#4 ← ++ render_logo::line#10 to ++ -Resolved ranged comparison value [432] unroll if(render_logo::line#4!=rangelast(0,5)) goto render_logo::@15 to (number) 6 -Resolved ranged next value [447] render_logo::line#6 ← ++ render_logo::line#11 to ++ -Resolved ranged comparison value [449] unroll if(render_logo::line#6!=rangelast(0,5)) goto render_logo::@24 to (number) 6 -Resolved ranged next value [462] render_logo::line#8 ← ++ render_logo::line#12 to ++ -Resolved ranged comparison value [464] unroll if(render_logo::line#8!=rangelast(0,5)) goto render_logo::@32 to (number) 6 -Eliminating unused variable (void*) memset::return#2 and assignment [161] (void*) memset::return#2 ← (void*) memset::str#2 -Eliminating unused variable (void*) memset::return#3 and assignment [165] (void*) memset::return#3 ← (void*) memset::str#2 +Resolved ranged next value [341] main::ch#1 ← ++ main::ch#2 to ++ +Resolved ranged comparison value [343] if(main::ch#1!=rangelast(0,$ef)) goto main::@1 to (number) $f0 +Resolved ranged next value [418] render_logo::line#2 ← ++ render_logo::line#9 to ++ +Resolved ranged comparison value [420] unroll if(render_logo::line#2!=rangelast(0,5)) goto render_logo::@7 to (number) 6 +Resolved ranged next value [434] render_logo::line#4 ← ++ render_logo::line#10 to ++ +Resolved ranged comparison value [436] unroll if(render_logo::line#4!=rangelast(0,5)) goto render_logo::@15 to (number) 6 +Resolved ranged next value [451] render_logo::line#6 ← ++ render_logo::line#11 to ++ +Resolved ranged comparison value [453] unroll if(render_logo::line#6!=rangelast(0,5)) goto render_logo::@24 to (number) 6 +Resolved ranged next value [466] render_logo::line#8 ← ++ render_logo::line#12 to ++ +Resolved ranged comparison value [468] unroll if(render_logo::line#8!=rangelast(0,5)) goto render_logo::@32 to (number) 6 +Eliminating unused variable (void*) memset::return#2 and assignment [162] (void*) memset::return#2 ← (void*) memset::str#3 +Eliminating unused variable (void*) memset::return#3 and assignment [166] (void*) memset::return#3 ← (void*) memset::str#3 Eliminating unused constant (const byte) render_logo::logo_idx#0 Eliminating unused constant (const byte) render_logo::screen_idx#0 Eliminating unused constant (const byte) render_logo::line#0 @@ -2322,7 +2347,7 @@ Successful SSA optimization Pass2IdenticalPhiElimination Constant right-side identified [18] (word) divr16u::dividend#1 ← > (const dword) div32u16u::dividend#0 Constant right-side identified [22] (word) divr16u::dividend#2 ← < (const dword) div32u16u::dividend#0 Constant right-side identified [58] (signed word) sin16s_gen2::ampl#0 ← (const signed word) sin16s_gen2::max#0 - (const signed word) sin16s_gen2::min#0 -Constant right-side identified [161] (byte) memset::c#1 ← (const byte) WHITE#0 | (byte) 8 +Constant right-side identified [162] (byte) memset::c#1 ← (const byte) WHITE#0 | (byte) 8 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) divr16u::dividend#1 = >div32u16u::dividend#0 Constant (const word) divr16u::dividend#2 = <div32u16u::dividend#0 @@ -2352,8 +2377,8 @@ Successful SSA optimization Pass2EliminateUnusedBlocks Alias (dword) mul16s::m#4 = (dword) mul16s::m#5 Successful SSA optimization Pass2AliasElimination Constant right-side identified [51] (signed word~) sin16s_gen2::$1 ← (const signed word) sin16s_gen2::ampl#0 >> (signed byte) 1 -Constant right-side identified [138] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff -Constant right-side identified [141] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 +Constant right-side identified [139] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff +Constant right-side identified [142] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) mul16u::b#0 = (word)mul16s::b#0 Constant (const word) mul16s::$10 = (word)mul16s::b#0 @@ -2362,8 +2387,8 @@ Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&$3fff Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0 Successful SSA optimization Pass2ConstantIdentification Constant right-side identified [48] (signed word) sin16s_gen2::offs#0 ← (const signed word) sin16s_gen2::min#0 + (const signed word) sin16s_gen2::$1 -Constant right-side identified [134] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 -Constant right-side identified [136] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 +Constant right-side identified [135] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 +Constant right-side identified [137] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const signed word) sin16s_gen2::offs#0 = sin16s_gen2::min#0+sin16s_gen2::$1 Constant (const word) main::toD0181_$2#0 = main::toD0181_$1#0*4 @@ -2378,13 +2403,13 @@ Eliminating unused constant (const signed word) sin16s_gen2::offs#0 Successful SSA optimization PassNEliminateUnusedVars Alias (signed word~) sin16s_gen2::$8 = (signed word~) sin16s_gen2::$7 Successful SSA optimization Pass2AliasElimination -Constant right-side identified [133] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 -Constant right-side identified [134] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f +Constant right-side identified [134] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 +Constant right-side identified [135] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::toD0181_$3#0 = >main::toD0181_$2#0 Constant (const byte) main::toD0181_$7#0 = main::toD0181_$6#0&$f Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [132] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 +Constant right-side identified [133] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0 Successful SSA optimization Pass2ConstantIdentification @@ -2392,19 +2417,19 @@ Unrolling loop Loop head: render_logo::@7 tails: render_logo::@7 blocks: render_ Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) render_logo::line#9 (const byte) render_logo::line#1 Successful SSA optimization Pass2IdenticalPhiElimination -Negating conditional jump and destination [172] if((byte) render_logo::line#2==(byte) 6) goto render_logo::@8 +Negating conditional jump and destination [173] if((byte) render_logo::line#2==(byte) 6) goto render_logo::@8 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement -Constant right-side identified [168] (byte~) render_logo::$8 ← (byte) $28 * (const byte) render_logo::line#1 -Constant right-side identified [171] (byte) render_logo::line#2 ← ++ (const byte) render_logo::line#1 +Constant right-side identified [169] (byte~) render_logo::$8 ← (byte) $28 * (const byte) render_logo::line#1 +Constant right-side identified [172] (byte) render_logo::line#2 ← ++ (const byte) render_logo::line#1 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) render_logo::$8 = $28*render_logo::line#1 Constant (const byte) render_logo::line#2 = ++render_logo::line#1 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [172] if((const byte) render_logo::line#2==(byte) 6) goto render_logo::@8 +if() condition always false - eliminating [173] if((const byte) render_logo::line#2==(byte) 6) goto render_logo::@8 Successful SSA optimization Pass2ConstantIfs Simplifying constant evaluating to zero (byte) $28*(const byte) render_logo::line#1 in Successful SSA optimization PassNSimplifyConstantZero -Simplifying expression containing zero SCREEN#0 in [169] (byte*~) render_logo::$9 ← (const byte*) SCREEN#0 + (const byte) render_logo::$8 +Simplifying expression containing zero SCREEN#0 in [170] (byte*~) render_logo::$9 ← (const byte*) SCREEN#0 + (const byte) render_logo::$8 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const byte) render_logo::$8 Successful SSA optimization PassNEliminateUnusedVars @@ -2883,8 +2908,8 @@ Successful SSA optimization Pass2ConstantIdentification Inlining Noop Cast [37] (byte) render_logo::logo_start#0 ← (byte)(signed byte) render_logo::x_char#0 keeping render_logo::x_char#0 Inlining Noop Cast [164] (signed word) sin16s::sinx#0 ← (signed word)(word) sin16s::usinx#1 keeping sin16s::usinx#1 Inlining Noop Cast [166] (signed word~) sin16s::$19 ← (signed word)(word) sin16s::usinx#1 keeping sin16s::usinx#1 -Inlining Noop Cast [207] (byte*~) memset::$0 ← (byte*)(void*) memset::str#2 keeping memset::str#2 -Inlining Noop Cast [209] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 keeping memset::str#2 +Inlining Noop Cast [208] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 keeping memset::str#3 +Inlining Noop Cast [210] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 keeping memset::str#3 Successful SSA optimization Pass2NopCastInlining Inlining Noop Cast [64] (byte) render_logo::logo_idx#1 ← (byte)(signed byte~) render_logo::$17 keeping render_logo::logo_idx#1 Inlining Noop Cast [101] (signed word~) sin16s_gen2::$8 ← (signed word)(word~) sin16s_gen2::$6 keeping sin16s_gen2::$8 @@ -3105,6 +3130,8 @@ Successful SSA optimization Pass2ConstantSimplification Identical Phi Values (word) divr16u::divisor#6 (const word) XSIN_SIZE#0 Identical Phi Values (word) memset::num#2 (word) $3e8 Successful SSA optimization Pass2IdenticalPhiElimination +if() condition always false - eliminating [202] if((word) $3e8<=(byte) 0) goto memset::@1 +Successful SSA optimization Pass2ConstantIfs Added new block during phi lifting main::@8(between main::@1 and main::@1) Added new block during phi lifting loop::@16(between loop::@15 and loop::@11) Added new block during phi lifting render_logo::@37(between render_logo::@21 and render_logo::@29) @@ -3118,7 +3145,7 @@ Added new block during phi lifting sin16s::@15(between sin16s::@12 and sin16s::@ Added new block during phi lifting divr16u::@8(between divr16u::@3 and divr16u::@1) Added new block during phi lifting divr16u::@9(between divr16u::@1 and divr16u::@2) Added new block during phi lifting divr16u::@10(between divr16u::@2 and divr16u::@3) -Added new block during phi lifting memset::@4(between memset::@1 and memset::@1) +Added new block during phi lifting memset::@6(between memset::@4 and memset::@4) Adding NOP phi() at start of @begin Adding NOP phi() at start of @6 Adding NOP phi() at start of @17 @@ -3143,7 +3170,7 @@ Adding NOP phi() at start of render_logo::@22 Adding NOP phi() at start of sin16s_gen2 Adding NOP phi() at start of mul16u::@3 Adding NOP phi() at start of div32u16u -Adding NOP phi() at start of memset::@2 +Adding NOP phi() at start of memset::@1 CALL GRAPH Calls in [] to main:6 Calls in [main] to memset:18 memset:20 sin16s_gen2:27 loop:29 @@ -3235,8 +3262,8 @@ Culled Empty Block (label) sin16s::@13 Culled Empty Block (label) divr16u::@8 Culled Empty Block (label) divr16u::@10 Culled Empty Block (label) divr16u::@9 -Culled Empty Block (label) memset::@2 -Culled Empty Block (label) memset::@4 +Culled Empty Block (label) memset::@1 +Culled Empty Block (label) memset::@6 Renumbering block @28 to @1 Renumbering block @31 to @2 Renumbering block div32u16u::@2 to div32u16u::@1 @@ -3254,6 +3281,8 @@ Renumbering block sin16s::@11 to sin16s::@10 Renumbering block sin16s::@12 to sin16s::@11 Renumbering block sin16s::@15 to sin16s::@12 Renumbering block mulu16_sel::@2 to mulu16_sel::@1 +Renumbering block memset::@2 to memset::@1 +Renumbering block memset::@4 to memset::@2 Renumbering block main::@6 to main::@5 Renumbering block loop::@4 to loop::@2 Renumbering block loop::@6 to loop::@3 @@ -3722,17 +3751,19 @@ divr16u::@return: scope:[divr16u] from divr16u::@6 to:@return memset: scope:[memset] from main::@3 main::@4 [214] (byte) memset::c#3 ← phi( main::@3/(const byte) BLACK#0 main::@4/(const byte) WHITE#0|(byte) 8 ) - [214] (void*) memset::str#2 ← phi( main::@3/(void*)(const byte*) SCREEN#0 main::@4/(void*)(const byte*) COLS#0 ) - [215] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) $3e8 - [216] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + [214] (void*) memset::str#3 ← phi( main::@3/(void*)(const byte*) SCREEN#0 main::@4/(void*)(const byte*) COLS#0 ) to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - [217] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) +memset::@1: scope:[memset] from memset + [215] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) $3e8 + [216] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + to:memset::@2 +memset::@2: scope:[memset] from memset::@1 memset::@2 + [217] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 ) [218] *((byte*) memset::dst#2) ← (byte) memset::c#3 [219] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - [220] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 + [220] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 to:memset::@return -memset::@return: scope:[memset] from memset::@1 +memset::@return: scope:[memset] from memset::@2 [221] return to:@return @@ -3828,7 +3859,7 @@ VARIABLE REGISTER WEIGHTS (word) memset::num (void*) memset::return (void*) memset::str -(void*) memset::str#2 +(void*) memset::str#3 (signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) (word~) mul16s::$16 4.0 (word~) mul16s::$9 4.0 @@ -4011,7 +4042,7 @@ Initial phi equivalence classes [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] [ divr16u::i#2 divr16u::i#1 ] -[ memset::str#2 ] +[ memset::str#3 ] [ memset::c#3 ] [ memset::dst#2 memset::dst#3 memset::dst#1 ] Added variable loop::$5 to zero page equivalence class [ loop::$5 ] @@ -4099,7 +4130,7 @@ Complete equivalence classes [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] [ divr16u::i#2 divr16u::i#1 ] -[ memset::str#2 ] +[ memset::str#3 ] [ memset::c#3 ] [ memset::dst#2 memset::dst#3 memset::dst#1 ] [ loop::$5 ] @@ -4186,7 +4217,7 @@ Allocated zp ZP_WORD:45 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u: Allocated zp ZP_WORD:47 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] Allocated zp ZP_WORD:49 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] Allocated zp ZP_BYTE:51 [ divr16u::i#2 divr16u::i#1 ] -Allocated zp ZP_WORD:52 [ memset::str#2 ] +Allocated zp ZP_WORD:52 [ memset::str#3 ] Allocated zp ZP_BYTE:54 [ memset::c#3 ] Allocated zp ZP_WORD:55 [ memset::dst#2 memset::dst#3 memset::dst#1 ] Allocated zp ZP_WORD:57 [ loop::$5 ] @@ -4339,7 +4370,7 @@ main: { // [214] phi (byte) memset::c#3 = (const byte) BLACK#0 [phi:main::@3->memset#0] -- vbuz1=vbuc1 lda #BLACK sta memset.c - // [214] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:main::@3->memset#1] -- pvoz1=pvoc1 + // [214] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:main::@3->memset#1] -- pvoz1=pvoc1 lda #<SCREEN sta memset.str lda #>SCREEN @@ -4356,7 +4387,7 @@ main: { // [214] phi (byte) memset::c#3 = (const byte) WHITE#0|(byte) 8 [phi:main::@4->memset#0] -- vbuz1=vbuc1 lda #WHITE|8 sta memset.c - // [214] phi (void*) memset::str#2 = (void*)(const byte*) COLS#0 [phi:main::@4->memset#1] -- pvoz1=pvoc1 + // [214] phi (void*) memset::str#3 = (void*)(const byte*) COLS#0 [phi:main::@4->memset#1] -- pvoz1=pvoc1 lda #<COLS sta memset.str lda #>COLS @@ -5896,7 +5927,10 @@ memset: { .label dst = $37 .label str = $34 .label c = $36 - // [215] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) $3e8 -- pbuz1=pbuz2_plus_vwuc1 + jmp b1 + // memset::@1 + b1: + // [215] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) $3e8 -- pbuz1=pbuz2_plus_vwuc1 lda str clc adc #<$3e8 @@ -5904,18 +5938,18 @@ memset: { lda str+1 adc #>$3e8 sta end+1 - // [216] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 -- pbuz1=pbuz2 + // [216] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 -- pbuz1=pbuz2 lda str sta dst lda str+1 sta dst+1 - // [217] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - b1_from_memset: - b1_from_b1: - // [217] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - jmp b1 - // memset::@1 - b1: + // [217] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + b2_from_b1: + b2_from_b2: + // [217] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + jmp b2 + // memset::@2 + b2: // [218] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuz2 lda c ldy #0 @@ -5925,13 +5959,13 @@ memset: { bne !+ inc dst+1 !: - // [220] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [220] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1_from_b1 + bne b2_from_b2 lda dst cmp end - bne b1_from_b1 + bne b2_from_b2 jmp breturn // memset::@return breturn: @@ -6057,12 +6091,12 @@ Statement [202] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ div Statement [206] if((word) divr16u::rem#6<(const word) XSIN_SIZE#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:21::div32u16u:98::divr16u:187 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:3::sin16s_gen2:21::div32u16u:98::divr16u:191 [ div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a Statement [208] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) XSIN_SIZE#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:21::div32u16u:98::divr16u:187 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:3::sin16s_gen2:21::div32u16u:98::divr16u:191 [ div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a Statement [212] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:21::div32u16u:98::divr16u:187 [ divr16u::return#0 rem16u#1 ] main:3::sin16s_gen2:21::div32u16u:98::divr16u:191 [ div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a -Statement [215] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) $3e8 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:3::memset:13 [ memset::str#2 memset::c#3 memset::end#0 ] main:3::memset:15 [ memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [215] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) $3e8 [ memset::str#3 memset::c#3 memset::end#0 ] ( main:3::memset:13 [ memset::str#3 memset::c#3 memset::end#0 ] main:3::memset:15 [ memset::str#3 memset::c#3 memset::end#0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:54 [ memset::c#3 ] -Statement [216] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::memset:13 [ memset::c#3 memset::end#0 memset::dst#3 ] main:3::memset:15 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [216] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::memset:13 [ memset::c#3 memset::end#0 memset::dst#3 ] main:3::memset:15 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a Statement [218] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::memset:13 [ memset::c#3 memset::end#0 memset::dst#2 ] main:3::memset:15 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:54 [ memset::c#3 ] -Statement [220] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::memset:13 [ memset::c#3 memset::end#0 memset::dst#1 ] main:3::memset:15 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [220] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::memset:13 [ memset::c#3 memset::end#0 memset::dst#1 ] main:3::memset:15 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a Statement [6] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 [ ] ( main:3 [ ] ) always clobbers reg byte a Statement [7] *((const byte*) BGCOL2#0) ← (const byte) DARK_GREY#0 [ ] ( main:3 [ ] ) always clobbers reg byte a Statement [8] *((const byte*) BGCOL#0) ← *((const byte*) BGCOL2#0) [ ] ( main:3 [ ] ) always clobbers reg byte a @@ -6163,10 +6197,10 @@ Statement [202] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ div Statement [206] if((word) divr16u::rem#6<(const word) XSIN_SIZE#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:21::div32u16u:98::divr16u:187 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:3::sin16s_gen2:21::div32u16u:98::divr16u:191 [ div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a Statement [208] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) XSIN_SIZE#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:21::div32u16u:98::divr16u:187 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:3::sin16s_gen2:21::div32u16u:98::divr16u:191 [ div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a Statement [212] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:21::div32u16u:98::divr16u:187 [ divr16u::return#0 rem16u#1 ] main:3::sin16s_gen2:21::div32u16u:98::divr16u:191 [ div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a -Statement [215] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) $3e8 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:3::memset:13 [ memset::str#2 memset::c#3 memset::end#0 ] main:3::memset:15 [ memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a -Statement [216] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::memset:13 [ memset::c#3 memset::end#0 memset::dst#3 ] main:3::memset:15 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [215] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) $3e8 [ memset::str#3 memset::c#3 memset::end#0 ] ( main:3::memset:13 [ memset::str#3 memset::c#3 memset::end#0 ] main:3::memset:15 [ memset::str#3 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [216] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::memset:13 [ memset::c#3 memset::end#0 memset::dst#3 ] main:3::memset:15 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a Statement [218] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::memset:13 [ memset::c#3 memset::end#0 memset::dst#2 ] main:3::memset:15 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y -Statement [220] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::memset:13 [ memset::c#3 memset::end#0 memset::dst#1 ] main:3::memset:15 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [220] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::memset:13 [ memset::c#3 memset::end#0 memset::dst#1 ] main:3::memset:15 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a Potential registers zp ZP_BYTE:2 [ main::ch#2 main::ch#1 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , Potential registers zp ZP_WORD:3 [ xsin_idx#11 xsin_idx#19 xsin_idx#3 ] : zp ZP_WORD:3 , Potential registers zp ZP_BYTE:5 [ render_logo::screen_idx#10 render_logo::screen_idx#4 render_logo::screen_idx#18 render_logo::screen_idx#3 ] : zp ZP_BYTE:5 , reg byte x , reg byte y , @@ -6191,7 +6225,7 @@ Potential registers zp ZP_WORD:45 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem# Potential registers zp ZP_WORD:47 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] : zp ZP_WORD:47 , Potential registers zp ZP_WORD:49 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] : zp ZP_WORD:49 , Potential registers zp ZP_BYTE:51 [ divr16u::i#2 divr16u::i#1 ] : zp ZP_BYTE:51 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:52 [ memset::str#2 ] : zp ZP_WORD:52 , +Potential registers zp ZP_WORD:52 [ memset::str#3 ] : zp ZP_WORD:52 , Potential registers zp ZP_BYTE:54 [ memset::c#3 ] : zp ZP_BYTE:54 , reg byte x , Potential registers zp ZP_WORD:55 [ memset::dst#2 memset::dst#3 memset::dst#1 ] : zp ZP_WORD:55 , Potential registers zp ZP_WORD:57 [ loop::$5 ] : zp ZP_WORD:57 , @@ -6264,62 +6298,62 @@ Uplift Scope [mulu16_sel] 24: zp ZP_WORD:40 [ mulu16_sel::v1#5 mulu16_sel::v1#3 Uplift Scope [sin16s_gen2] 22: zp ZP_DWORD:98 [ sin16s_gen2::$5 ] 18.33: zp ZP_WORD:15 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] 11: zp ZP_WORD:102 [ sin16s_gen2::$8 ] 10.33: zp ZP_DWORD:9 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] 8.8: zp ZP_WORD:13 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] 0.87: zp ZP_DWORD:86 [ sin16s_gen2::step#0 ] Uplift Scope [loop] 22: zp ZP_WORD:57 [ loop::$5 ] 22: zp ZP_WORD:59 [ loop::$1 ] 22: zp ZP_WORD:61 [ loop::xpos#0 ] Uplift Scope [mul16s] 22: zp ZP_DWORD:94 [ mul16s::return#2 ] 10: zp ZP_DWORD:17 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 ] 4.33: zp ZP_DWORD:112 [ mul16s::return#0 ] 4: zp ZP_WORD:108 [ mul16s::$9 ] 4: zp ZP_WORD:110 [ mul16s::$16 ] 2.6: zp ZP_WORD:92 [ mul16s::a#0 ] -Uplift Scope [memset] 38: zp ZP_WORD:55 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:179 [ memset::end#0 ] 1.57: zp ZP_BYTE:54 [ memset::c#3 ] 0: zp ZP_WORD:52 [ memset::str#2 ] +Uplift Scope [memset] 38: zp ZP_WORD:55 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:179 [ memset::end#0 ] 1.57: zp ZP_BYTE:54 [ memset::c#3 ] 0: zp ZP_WORD:52 [ memset::str#3 ] Uplift Scope [main] 38.5: zp ZP_BYTE:2 [ main::ch#2 main::ch#1 ] Uplift Scope [] 26.12: zp ZP_WORD:3 [ xsin_idx#11 xsin_idx#19 xsin_idx#3 ] 0.8: zp ZP_WORD:177 [ rem16u#1 ] Uplift Scope [div32u16u] 4: zp ZP_DWORD:82 [ div32u16u::return#2 ] 4: zp ZP_WORD:169 [ div32u16u::quotient_lo#0 ] 1.33: zp ZP_DWORD:171 [ div32u16u::return#0 ] 0.8: zp ZP_WORD:165 [ div32u16u::quotient_hi#0 ] -Uplifting [mul16u] best 74992 combination zp ZP_DWORD:25 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:29 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:23 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] zp ZP_WORD:21 [ mul16u::b#1 ] zp ZP_DWORD:104 [ mul16u::return#2 ] zp ZP_DWORD:149 [ mul16u::return#3 ] -Uplifting [divr16u] best 74782 combination zp ZP_WORD:45 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:49 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:47 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:163 [ divr16u::return#2 ] zp ZP_WORD:167 [ divr16u::return#3 ] -Uplifting [sin16s] best 74782 combination zp ZP_DWORD:34 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:90 [ sin16s::return#0 ] zp ZP_WORD:38 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:117 [ sin16s::$4 ] zp ZP_WORD:125 [ sin16s::x2#0 ] zp ZP_WORD:133 [ sin16s::x3_6#0 ] zp ZP_WORD:139 [ sin16s::x4#0 ] zp ZP_WORD:143 [ sin16s::x5#0 ] zp ZP_WORD:145 [ sin16s::x5_128#0 ] zp ZP_WORD:129 [ sin16s::x3#0 ] zp ZP_WORD:147 [ sin16s::usinx#1 ] zp ZP_WORD:121 [ sin16s::x1#0 ] zp ZP_WORD:135 [ sin16s::usinx#0 ] zp ZP_BYTE:33 [ sin16s::isUpper#2 ] -Uplifting [mulu16_sel] best 74766 combination zp ZP_WORD:40 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:42 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:123 [ mulu16_sel::return#0 ] zp ZP_WORD:127 [ mulu16_sel::return#1 ] zp ZP_WORD:131 [ mulu16_sel::return#2 ] zp ZP_WORD:137 [ mulu16_sel::return#10 ] zp ZP_WORD:141 [ mulu16_sel::return#11 ] zp ZP_DWORD:153 [ mulu16_sel::$0 ] zp ZP_DWORD:157 [ mulu16_sel::$1 ] zp ZP_WORD:161 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ] -Uplifting [sin16s_gen2] best 74766 combination zp ZP_DWORD:98 [ sin16s_gen2::$5 ] zp ZP_WORD:15 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] zp ZP_WORD:102 [ sin16s_gen2::$8 ] zp ZP_DWORD:9 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] zp ZP_WORD:13 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] zp ZP_DWORD:86 [ sin16s_gen2::step#0 ] -Uplifting [loop] best 74766 combination zp ZP_WORD:57 [ loop::$5 ] zp ZP_WORD:59 [ loop::$1 ] zp ZP_WORD:61 [ loop::xpos#0 ] -Uplifting [mul16s] best 74766 combination zp ZP_DWORD:94 [ mul16s::return#2 ] zp ZP_DWORD:17 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 ] zp ZP_DWORD:112 [ mul16s::return#0 ] zp ZP_WORD:108 [ mul16s::$9 ] zp ZP_WORD:110 [ mul16s::$16 ] zp ZP_WORD:92 [ mul16s::a#0 ] -Uplifting [memset] best 74750 combination zp ZP_WORD:55 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:179 [ memset::end#0 ] reg byte x [ memset::c#3 ] zp ZP_WORD:52 [ memset::str#2 ] -Uplifting [main] best 74630 combination reg byte x [ main::ch#2 main::ch#1 ] -Uplifting [] best 74630 combination zp ZP_WORD:3 [ xsin_idx#11 xsin_idx#19 xsin_idx#3 ] zp ZP_WORD:177 [ rem16u#1 ] -Uplifting [div32u16u] best 74630 combination zp ZP_DWORD:82 [ div32u16u::return#2 ] zp ZP_WORD:169 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:171 [ div32u16u::return#0 ] zp ZP_WORD:165 [ div32u16u::quotient_hi#0 ] +Uplifting [mul16u] best 75022 combination zp ZP_DWORD:25 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:29 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:23 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] zp ZP_WORD:21 [ mul16u::b#1 ] zp ZP_DWORD:104 [ mul16u::return#2 ] zp ZP_DWORD:149 [ mul16u::return#3 ] +Uplifting [divr16u] best 74812 combination zp ZP_WORD:45 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:49 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:47 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:163 [ divr16u::return#2 ] zp ZP_WORD:167 [ divr16u::return#3 ] +Uplifting [sin16s] best 74812 combination zp ZP_DWORD:34 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:90 [ sin16s::return#0 ] zp ZP_WORD:38 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:117 [ sin16s::$4 ] zp ZP_WORD:125 [ sin16s::x2#0 ] zp ZP_WORD:133 [ sin16s::x3_6#0 ] zp ZP_WORD:139 [ sin16s::x4#0 ] zp ZP_WORD:143 [ sin16s::x5#0 ] zp ZP_WORD:145 [ sin16s::x5_128#0 ] zp ZP_WORD:129 [ sin16s::x3#0 ] zp ZP_WORD:147 [ sin16s::usinx#1 ] zp ZP_WORD:121 [ sin16s::x1#0 ] zp ZP_WORD:135 [ sin16s::usinx#0 ] zp ZP_BYTE:33 [ sin16s::isUpper#2 ] +Uplifting [mulu16_sel] best 74796 combination zp ZP_WORD:40 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:42 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:123 [ mulu16_sel::return#0 ] zp ZP_WORD:127 [ mulu16_sel::return#1 ] zp ZP_WORD:131 [ mulu16_sel::return#2 ] zp ZP_WORD:137 [ mulu16_sel::return#10 ] zp ZP_WORD:141 [ mulu16_sel::return#11 ] zp ZP_DWORD:153 [ mulu16_sel::$0 ] zp ZP_DWORD:157 [ mulu16_sel::$1 ] zp ZP_WORD:161 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ] +Uplifting [sin16s_gen2] best 74796 combination zp ZP_DWORD:98 [ sin16s_gen2::$5 ] zp ZP_WORD:15 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] zp ZP_WORD:102 [ sin16s_gen2::$8 ] zp ZP_DWORD:9 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] zp ZP_WORD:13 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] zp ZP_DWORD:86 [ sin16s_gen2::step#0 ] +Uplifting [loop] best 74796 combination zp ZP_WORD:57 [ loop::$5 ] zp ZP_WORD:59 [ loop::$1 ] zp ZP_WORD:61 [ loop::xpos#0 ] +Uplifting [mul16s] best 74796 combination zp ZP_DWORD:94 [ mul16s::return#2 ] zp ZP_DWORD:17 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 ] zp ZP_DWORD:112 [ mul16s::return#0 ] zp ZP_WORD:108 [ mul16s::$9 ] zp ZP_WORD:110 [ mul16s::$16 ] zp ZP_WORD:92 [ mul16s::a#0 ] +Uplifting [memset] best 74780 combination zp ZP_WORD:55 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:179 [ memset::end#0 ] reg byte x [ memset::c#3 ] zp ZP_WORD:52 [ memset::str#3 ] +Uplifting [main] best 74660 combination reg byte x [ main::ch#2 main::ch#1 ] +Uplifting [] best 74660 combination zp ZP_WORD:3 [ xsin_idx#11 xsin_idx#19 xsin_idx#3 ] zp ZP_WORD:177 [ rem16u#1 ] +Uplifting [div32u16u] best 74660 combination zp ZP_DWORD:82 [ div32u16u::return#2 ] zp ZP_WORD:169 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:171 [ div32u16u::return#0 ] zp ZP_WORD:165 [ div32u16u::quotient_hi#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:5 [ render_logo::screen_idx#10 render_logo::screen_idx#4 render_logo::screen_idx#18 render_logo::screen_idx#3 ] -Uplifting [render_logo] best 69530 combination reg byte y [ render_logo::screen_idx#10 render_logo::screen_idx#4 render_logo::screen_idx#18 render_logo::screen_idx#3 ] +Uplifting [render_logo] best 69560 combination reg byte y [ render_logo::screen_idx#10 render_logo::screen_idx#4 render_logo::screen_idx#18 render_logo::screen_idx#3 ] Attempting to uplift remaining variables inzp ZP_BYTE:8 [ render_logo::screen_idx#15 render_logo::screen_idx#21 render_logo::screen_idx#5 render_logo::screen_idx#6 ] -Uplifting [render_logo] best 64730 combination reg byte y [ render_logo::screen_idx#15 render_logo::screen_idx#21 render_logo::screen_idx#5 render_logo::screen_idx#6 ] +Uplifting [render_logo] best 64760 combination reg byte y [ render_logo::screen_idx#15 render_logo::screen_idx#21 render_logo::screen_idx#5 render_logo::screen_idx#6 ] Attempting to uplift remaining variables inzp ZP_BYTE:7 [ render_logo::logo_idx#11 render_logo::logo_idx#14 render_logo::logo_idx#4 ] -Uplifting [render_logo] best 64730 combination zp ZP_BYTE:7 [ render_logo::logo_idx#11 render_logo::logo_idx#14 render_logo::logo_idx#4 ] +Uplifting [render_logo] best 64760 combination zp ZP_BYTE:7 [ render_logo::logo_idx#11 render_logo::logo_idx#14 render_logo::logo_idx#4 ] Attempting to uplift remaining variables inzp ZP_BYTE:6 [ render_logo::logo_idx#10 render_logo::logo_idx#3 ] -Uplifting [render_logo] best 64730 combination zp ZP_BYTE:6 [ render_logo::logo_idx#10 render_logo::logo_idx#3 ] +Uplifting [render_logo] best 64760 combination zp ZP_BYTE:6 [ render_logo::logo_idx#10 render_logo::logo_idx#3 ] Attempting to uplift remaining variables inzp ZP_BYTE:71 [ render_logo::$33 ] -Uplifting [render_logo] best 64330 combination reg byte a [ render_logo::$33 ] +Uplifting [render_logo] best 64360 combination reg byte a [ render_logo::$33 ] Attempting to uplift remaining variables inzp ZP_BYTE:72 [ render_logo::$36 ] -Uplifting [render_logo] best 63930 combination reg byte a [ render_logo::$36 ] +Uplifting [render_logo] best 63960 combination reg byte a [ render_logo::$36 ] Attempting to uplift remaining variables inzp ZP_BYTE:73 [ render_logo::$39 ] -Uplifting [render_logo] best 63530 combination reg byte a [ render_logo::$39 ] +Uplifting [render_logo] best 63560 combination reg byte a [ render_logo::$39 ] Attempting to uplift remaining variables inzp ZP_BYTE:74 [ render_logo::$42 ] -Uplifting [render_logo] best 63130 combination reg byte a [ render_logo::$42 ] +Uplifting [render_logo] best 63160 combination reg byte a [ render_logo::$42 ] Attempting to uplift remaining variables inzp ZP_BYTE:75 [ render_logo::$45 ] -Uplifting [render_logo] best 62730 combination reg byte a [ render_logo::$45 ] +Uplifting [render_logo] best 62760 combination reg byte a [ render_logo::$45 ] Attempting to uplift remaining variables inzp ZP_BYTE:77 [ render_logo::$73 ] -Uplifting [render_logo] best 62330 combination reg byte a [ render_logo::$73 ] +Uplifting [render_logo] best 62360 combination reg byte a [ render_logo::$73 ] Attempting to uplift remaining variables inzp ZP_BYTE:78 [ render_logo::$76 ] -Uplifting [render_logo] best 61930 combination reg byte a [ render_logo::$76 ] +Uplifting [render_logo] best 61960 combination reg byte a [ render_logo::$76 ] Attempting to uplift remaining variables inzp ZP_BYTE:79 [ render_logo::$79 ] -Uplifting [render_logo] best 61530 combination reg byte a [ render_logo::$79 ] +Uplifting [render_logo] best 61560 combination reg byte a [ render_logo::$79 ] Attempting to uplift remaining variables inzp ZP_BYTE:80 [ render_logo::$82 ] -Uplifting [render_logo] best 61130 combination reg byte a [ render_logo::$82 ] +Uplifting [render_logo] best 61160 combination reg byte a [ render_logo::$82 ] Attempting to uplift remaining variables inzp ZP_BYTE:81 [ render_logo::$85 ] -Uplifting [render_logo] best 60730 combination reg byte a [ render_logo::$85 ] +Uplifting [render_logo] best 60760 combination reg byte a [ render_logo::$85 ] Attempting to uplift remaining variables inzp ZP_BYTE:65 [ render_logo::$0 ] -Uplifting [render_logo] best 60724 combination reg byte a [ render_logo::$0 ] +Uplifting [render_logo] best 60754 combination reg byte a [ render_logo::$0 ] Attempting to uplift remaining variables inzp ZP_BYTE:66 [ render_logo::$1 ] -Uplifting [render_logo] best 60718 combination reg byte a [ render_logo::$1 ] +Uplifting [render_logo] best 60748 combination reg byte a [ render_logo::$1 ] Attempting to uplift remaining variables inzp ZP_BYTE:67 [ render_logo::$2 ] -Uplifting [render_logo] best 60712 combination reg byte a [ render_logo::$2 ] +Uplifting [render_logo] best 60742 combination reg byte a [ render_logo::$2 ] Attempting to uplift remaining variables inzp ZP_BYTE:76 [ render_logo::logo_idx#1 ] -Uplifting [render_logo] best 60706 combination reg byte a [ render_logo::logo_idx#1 ] +Uplifting [render_logo] best 60736 combination reg byte a [ render_logo::logo_idx#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:70 [ render_logo::x_char#0 ] -Uplifting [render_logo] best 60706 combination zp ZP_BYTE:70 [ render_logo::x_char#0 ] +Uplifting [render_logo] best 60736 combination zp ZP_BYTE:70 [ render_logo::x_char#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:33 [ sin16s::isUpper#2 ] -Uplifting [sin16s] best 60706 combination zp ZP_BYTE:33 [ sin16s::isUpper#2 ] +Uplifting [sin16s] best 60736 combination zp ZP_BYTE:33 [ sin16s::isUpper#2 ] Coalescing zero page register with common assignment [ zp ZP_WORD:38 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] ] with [ zp ZP_WORD:147 [ sin16s::usinx#1 ] ] - score: 2 Coalescing zero page register with common assignment [ zp ZP_WORD:40 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] ] with [ zp ZP_WORD:129 [ sin16s::x3#0 ] ] - score: 2 Coalescing zero page register with common assignment [ zp ZP_WORD:45 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] ] with [ zp ZP_WORD:177 [ rem16u#1 ] ] - score: 2 @@ -6333,7 +6367,7 @@ Coalescing zero page register with common assignment [ zp ZP_WORD:40 [ mulu16_se Coalescing zero page register with common assignment [ zp ZP_WORD:40 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 ] ] with [ zp ZP_WORD:139 [ sin16s::x4#0 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:49 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] ] with [ zp ZP_WORD:163 [ divr16u::return#2 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:49 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 ] ] with [ zp ZP_WORD:167 [ divr16u::return#3 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:52 [ memset::str#2 ] ] with [ zp ZP_WORD:55 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:52 [ memset::str#3 ] ] with [ zp ZP_WORD:55 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:57 [ loop::$5 ] ] with [ zp ZP_WORD:59 [ loop::$1 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:61 [ loop::xpos#0 ] ] with [ zp ZP_WORD:63 [ render_logo::xpos#0 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_DWORD:82 [ div32u16u::return#2 ] ] with [ zp ZP_DWORD:86 [ sin16s_gen2::step#0 ] ] - score: 1 @@ -6373,7 +6407,7 @@ Allocated (was zp ZP_WORD:40) zp ZP_WORD:33 [ mulu16_sel::v1#5 mulu16_sel::v1#3 Allocated (was zp ZP_WORD:45) zp ZP_WORD:35 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ] Allocated (was zp ZP_WORD:47) zp ZP_WORD:37 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] Allocated (was zp ZP_WORD:49) zp ZP_WORD:39 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] -Allocated (was zp ZP_WORD:52) zp ZP_WORD:41 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] +Allocated (was zp ZP_WORD:52) zp ZP_WORD:41 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] Allocated (was zp ZP_WORD:57) zp ZP_WORD:43 [ loop::$5 loop::$1 loop::xpos#0 render_logo::xpos#0 ] Allocated (was zp ZP_WORD:68) zp ZP_WORD:45 [ render_logo::$3 ] Allocated (was zp ZP_BYTE:70) zp ZP_BYTE:47 [ render_logo::x_char#0 ] @@ -6472,7 +6506,7 @@ main: { memset_from_b3: // [214] phi (byte) memset::c#3 = (const byte) BLACK#0 [phi:main::@3->memset#0] -- vbuxx=vbuc1 ldx #BLACK - // [214] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:main::@3->memset#1] -- pvoz1=pvoc1 + // [214] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:main::@3->memset#1] -- pvoz1=pvoc1 lda #<SCREEN sta memset.str lda #>SCREEN @@ -6488,7 +6522,7 @@ main: { memset_from_b4: // [214] phi (byte) memset::c#3 = (const byte) WHITE#0|(byte) 8 [phi:main::@4->memset#0] -- vbuxx=vbuc1 ldx #WHITE|8 - // [214] phi (void*) memset::str#2 = (void*)(const byte*) COLS#0 [phi:main::@4->memset#1] -- pvoz1=pvoc1 + // [214] phi (void*) memset::str#3 = (void*)(const byte*) COLS#0 [phi:main::@4->memset#1] -- pvoz1=pvoc1 lda #<COLS sta memset.str lda #>COLS @@ -7753,7 +7787,10 @@ memset: { .label end = $3e .label dst = $29 .label str = $29 - // [215] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) $3e8 -- pbuz1=pbuz2_plus_vwuc1 + jmp b1 + // memset::@1 + b1: + // [215] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) $3e8 -- pbuz1=pbuz2_plus_vwuc1 lda str clc adc #<$3e8 @@ -7761,14 +7798,14 @@ memset: { lda str+1 adc #>$3e8 sta end+1 - // [216] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 - // [217] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - b1_from_memset: - b1_from_b1: - // [217] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - jmp b1 - // memset::@1 - b1: + // [216] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + // [217] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + b2_from_b1: + b2_from_b2: + // [217] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + jmp b2 + // memset::@2 + b2: // [218] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx txa ldy #0 @@ -7778,13 +7815,13 @@ memset: { bne !+ inc dst+1 !: - // [220] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [220] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1_from_b1 + bne b2_from_b2 lda dst cmp end - bne b1_from_b1 + bne b2_from_b2 jmp breturn // memset::@return breturn: @@ -7887,6 +7924,7 @@ Removing instruction jmp b3 Removing instruction jmp b6 Removing instruction jmp breturn Removing instruction jmp b1 +Removing instruction jmp b2 Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination Removing instruction lda BGCOL2 @@ -7916,8 +7954,8 @@ Replacing label b2_from_b1 with b2 Replacing label b3_from_b2 with b3 Replacing label b3_from_b2 with b3 Replacing label b1_from_b3 with b1 -Replacing label b1_from_b1 with b1 -Replacing label b1_from_b1 with b1 +Replacing label b2_from_b2 with b2 +Replacing label b2_from_b2 with b2 Removing instruction b1: Removing instruction b2_from_b1: Removing instruction b2: @@ -7956,8 +7994,8 @@ Removing instruction b2_from_b4: Removing instruction b3_from_b2: Removing instruction b3_from_b5: Removing instruction breturn: -Removing instruction b1_from_memset: -Removing instruction b1_from_b1: +Removing instruction b2_from_b1: +Removing instruction b2_from_b2: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: Removing instruction b3: @@ -8039,6 +8077,7 @@ Removing instruction b1_from_divr16u: Removing instruction b4: Removing instruction b5: Removing instruction b6: +Removing instruction b1: Removing instruction breturn: Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly @@ -8201,6 +8240,7 @@ FINAL SYMBOL TABLE (byte*) main::toD0181_screen (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (label) memset::@1 +(label) memset::@2 (label) memset::@return (byte) memset::c (byte) memset::c#3 reg byte x 1.5714285714285714 @@ -8213,7 +8253,7 @@ FINAL SYMBOL TABLE (word) memset::num (void*) memset::return (void*) memset::str -(void*) memset::str#2 str zp ZP_WORD:41 +(void*) memset::str#3 str zp ZP_WORD:41 (signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) (word~) mul16s::$16 $16 zp ZP_WORD:54 4.0 (word~) mul16s::$9 $9 zp ZP_WORD:54 4.0 @@ -8460,7 +8500,7 @@ zp ZP_WORD:35 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 di zp ZP_WORD:37 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:39 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] -zp ZP_WORD:41 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] +zp ZP_WORD:41 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] reg byte x [ memset::c#3 ] zp ZP_WORD:43 [ loop::$5 loop::$1 loop::xpos#0 render_logo::xpos#0 ] reg byte a [ render_logo::$0 ] @@ -8572,7 +8612,7 @@ main: { // [214] phi from main::@3 to memset [phi:main::@3->memset] // [214] phi (byte) memset::c#3 = (const byte) BLACK#0 [phi:main::@3->memset#0] -- vbuxx=vbuc1 ldx #BLACK - // [214] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:main::@3->memset#1] -- pvoz1=pvoc1 + // [214] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:main::@3->memset#1] -- pvoz1=pvoc1 lda #<SCREEN sta memset.str lda #>SCREEN @@ -8585,7 +8625,7 @@ main: { // [214] phi from main::@4 to memset [phi:main::@4->memset] // [214] phi (byte) memset::c#3 = (const byte) WHITE#0|(byte) 8 [phi:main::@4->memset#0] -- vbuxx=vbuc1 ldx #WHITE|8 - // [214] phi (void*) memset::str#2 = (void*)(const byte*) COLS#0 [phi:main::@4->memset#1] -- pvoz1=pvoc1 + // [214] phi (void*) memset::str#3 = (void*)(const byte*) COLS#0 [phi:main::@4->memset#1] -- pvoz1=pvoc1 lda #<COLS sta memset.str lda #>COLS @@ -9777,8 +9817,9 @@ memset: { .label end = $3e .label dst = $29 .label str = $29 + // memset::@1 // end = (char*)str + num - // [215] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) $3e8 -- pbuz1=pbuz2_plus_vwuc1 + // [215] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) $3e8 -- pbuz1=pbuz2_plus_vwuc1 lda str clc adc #<$3e8 @@ -9786,11 +9827,11 @@ memset: { lda str+1 adc #>$3e8 sta end+1 - // [216] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 - // [217] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - // [217] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - // memset::@1 - b1: + // [216] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + // [217] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + // [217] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + // memset::@2 + b2: // *dst = c // [218] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx txa @@ -9802,13 +9843,13 @@ memset: { bne !+ inc dst+1 !: - // [220] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [220] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1 + bne b2 lda dst cmp end - bne b1 + bne b2 // memset::@return // } // [221] return diff --git a/src/test/ref/examples/scrolllogo/scrolllogo.sym b/src/test/ref/examples/scrolllogo/scrolllogo.sym index 187cd042c..200047792 100644 --- a/src/test/ref/examples/scrolllogo/scrolllogo.sym +++ b/src/test/ref/examples/scrolllogo/scrolllogo.sym @@ -125,6 +125,7 @@ (byte*) main::toD0181_screen (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (label) memset::@1 +(label) memset::@2 (label) memset::@return (byte) memset::c (byte) memset::c#3 reg byte x 1.5714285714285714 @@ -137,7 +138,7 @@ (word) memset::num (void*) memset::return (void*) memset::str -(void*) memset::str#2 str zp ZP_WORD:41 +(void*) memset::str#3 str zp ZP_WORD:41 (signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) (word~) mul16s::$16 $16 zp ZP_WORD:54 4.0 (word~) mul16s::$9 $9 zp ZP_WORD:54 4.0 @@ -384,7 +385,7 @@ zp ZP_WORD:35 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 di zp ZP_WORD:37 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:39 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] -zp ZP_WORD:41 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] +zp ZP_WORD:41 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] reg byte x [ memset::c#3 ] zp ZP_WORD:43 [ loop::$5 loop::$1 loop::xpos#0 render_logo::xpos#0 ] reg byte a [ render_logo::$0 ] diff --git a/src/test/ref/examples/showlogo/showlogo.asm b/src/test/ref/examples/showlogo/showlogo.asm index 3e315ae0b..999e99937 100644 --- a/src/test/ref/examples/showlogo/showlogo.asm +++ b/src/test/ref/examples/showlogo/showlogo.asm @@ -31,24 +31,24 @@ main: { lda #VIC_MCM|VIC_CSEL sta D016 ldx #BLACK - lda #<$28*$19 - sta memset.num - lda #>$28*$19 - sta memset.num+1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 - jsr memset - ldx #WHITE|8 lda #<$28*$19 sta memset.num lda #>$28*$19 sta memset.num+1 + jsr memset + ldx #WHITE|8 lda #<COLS sta memset.str lda #>COLS sta memset.str+1 + lda #<$28*$19 + sta memset.num + lda #>$28*$19 + sta memset.num+1 jsr memset ldx #0 b1: @@ -63,12 +63,16 @@ main: { jmp b2 } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage(2) str, byte register(X) c, word zeropage(4) num) +// memset(void* zeropage(4) str, byte register(X) c, word zeropage(2) num) memset: { - .label end = 4 - .label dst = 2 - .label str = 2 - .label num = 4 + .label end = 2 + .label dst = 4 + .label num = 2 + .label str = 4 + lda num + beq breturn + lda num+1 + beq breturn lda end clc adc str @@ -76,7 +80,7 @@ memset: { lda end+1 adc str+1 sta end+1 - b1: + b2: txa ldy #0 sta (dst),y @@ -86,10 +90,11 @@ memset: { !: lda dst+1 cmp end+1 - bne b1 + bne b2 lda dst cmp end - bne b1 + bne b2 + breturn: rts } .pc = LOGO "LOGO" diff --git a/src/test/ref/examples/showlogo/showlogo.cfg b/src/test/ref/examples/showlogo/showlogo.cfg index 7770485df..e5513a984 100644 --- a/src/test/ref/examples/showlogo/showlogo.cfg +++ b/src/test/ref/examples/showlogo/showlogo.cfg @@ -45,17 +45,20 @@ main::@2: scope:[main] from main::@1 main::@2 to:main::@2 memset: scope:[memset] from main::@3 main::@4 [21] (byte) memset::c#3 ← phi( main::@4/(const byte) WHITE#0|(byte) 8 main::@3/(const byte) BLACK#0 ) + [21] (void*) memset::str#3 ← phi( main::@4/(void*)(const byte*) COLS#0 main::@3/(void*)(const byte*) SCREEN#0 ) [21] (word) memset::num#2 ← phi( main::@4/(word)(number) $28*(number) $19 main::@3/(word)(number) $28*(number) $19 ) - [21] (void*) memset::str#2 ← phi( main::@4/(void*)(const byte*) COLS#0 main::@3/(void*)(const byte*) SCREEN#0 ) - [22] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 - [23] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + [22] if((word) memset::num#2<=(byte) 0) goto memset::@return to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - [24] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) - [25] *((byte*) memset::dst#2) ← (byte) memset::c#3 - [26] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - [27] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 +memset::@1: scope:[memset] from memset + [23] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 + [24] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + to:memset::@2 +memset::@2: scope:[memset] from memset::@1 memset::@2 + [25] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 ) + [26] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [27] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [28] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 to:memset::@return -memset::@return: scope:[memset] from memset::@1 - [28] return +memset::@return: scope:[memset] from memset memset::@2 + [29] return to:@return diff --git a/src/test/ref/examples/showlogo/showlogo.log b/src/test/ref/examples/showlogo/showlogo.log index e6fb1abd7..1b7a1506f 100644 --- a/src/test/ref/examples/showlogo/showlogo.log +++ b/src/test/ref/examples/showlogo/showlogo.log @@ -9,6 +9,7 @@ Culled Empty Block (label) @3 Culled Empty Block (label) @4 Culled Empty Block (label) @5 Culled Empty Block (label) @6 +Culled Empty Block (label) memset::@5 Culled Empty Block (label) memset::@3 Culled Empty Block (label) @7 Culled Empty Block (label) main::toD0181_@1 @@ -34,30 +35,38 @@ CONTROL FLOW GRAPH SSA (byte) DARK_GREY#0 ← (number) $b to:@8 memset: scope:[memset] from main::@10 main::@9 - (byte) memset::c#3 ← phi( main::@10/(byte) memset::c#1 main::@9/(byte) memset::c#0 ) + (byte) memset::c#4 ← phi( main::@10/(byte) memset::c#1 main::@9/(byte) memset::c#0 ) + (void*) memset::str#4 ← phi( main::@10/(void*) memset::str#1 main::@9/(void*) memset::str#0 ) (word) memset::num#2 ← phi( main::@10/(word) memset::num#1 main::@9/(word) memset::num#0 ) - (void*) memset::str#2 ← phi( main::@10/(void*) memset::str#1 main::@9/(void*) memset::str#0 ) - (byte*~) memset::$0 ← ((byte*)) (void*) memset::str#2 - (byte*~) memset::$1 ← (byte*~) memset::$0 + (word) memset::num#2 - (byte*) memset::end#0 ← (byte*~) memset::$1 - (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#2 - to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - (void*) memset::str#4 ← phi( memset/(void*) memset::str#2 memset::@1/(void*) memset::str#4 ) - (byte*) memset::end#1 ← phi( memset/(byte*) memset::end#0 memset::@1/(byte*) memset::end#1 ) - (byte*) memset::dst#2 ← phi( memset/(byte*) memset::dst#0 memset::@1/(byte*) memset::dst#1 ) - (byte) memset::c#2 ← phi( memset/(byte) memset::c#3 memset::@1/(byte) memset::c#2 ) + (bool~) memset::$0 ← (word) memset::num#2 > (number) 0 + (bool~) memset::$1 ← ! (bool~) memset::$0 + if((bool~) memset::$1) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + (void*) memset::str#2 ← phi( memset/(void*) memset::str#4 memset::@4/(void*) memset::str#5 ) + (void*) memset::return#0 ← (void*) memset::str#2 + to:memset::@return +memset::@2: scope:[memset] from memset + (byte) memset::c#3 ← phi( memset/(byte) memset::c#4 ) + (word) memset::num#3 ← phi( memset/(word) memset::num#2 ) + (void*) memset::str#3 ← phi( memset/(void*) memset::str#4 ) + (byte*~) memset::$2 ← ((byte*)) (void*) memset::str#3 + (byte*~) memset::$3 ← (byte*~) memset::$2 + (word) memset::num#3 + (byte*) memset::end#0 ← (byte*~) memset::$3 + (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#3 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + (void*) memset::str#5 ← phi( memset::@2/(void*) memset::str#3 memset::@4/(void*) memset::str#5 ) + (byte*) memset::end#1 ← phi( memset::@2/(byte*) memset::end#0 memset::@4/(byte*) memset::end#1 ) + (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + (byte) memset::c#2 ← phi( memset::@2/(byte) memset::c#3 memset::@4/(byte) memset::c#2 ) *((byte*) memset::dst#2) ← (byte) memset::c#2 (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - (bool~) memset::$2 ← (byte*) memset::dst#1 != (byte*) memset::end#1 - if((bool~) memset::$2) goto memset::@1 - to:memset::@2 -memset::@2: scope:[memset] from memset::@1 - (void*) memset::str#3 ← phi( memset::@1/(void*) memset::str#4 ) - (void*) memset::return#0 ← (void*) memset::str#3 - to:memset::@return -memset::@return: scope:[memset] from memset::@2 - (void*) memset::return#4 ← phi( memset::@2/(void*) memset::return#0 ) + (bool~) memset::$4 ← (byte*) memset::dst#1 != (byte*) memset::end#1 + if((bool~) memset::$4) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + (void*) memset::return#4 ← phi( memset::@1/(void*) memset::return#0 ) (void*) memset::return#1 ← (void*) memset::return#4 return to:@return @@ -228,17 +237,21 @@ SYMBOL TABLE SSA (byte*) main::toD0181_screen#0 (byte*) main::toD0181_screen#1 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) -(byte*~) memset::$0 -(byte*~) memset::$1 -(bool~) memset::$2 +(bool~) memset::$0 +(bool~) memset::$1 +(byte*~) memset::$2 +(byte*~) memset::$3 +(bool~) memset::$4 (label) memset::@1 (label) memset::@2 +(label) memset::@4 (label) memset::@return (byte) memset::c (byte) memset::c#0 (byte) memset::c#1 (byte) memset::c#2 (byte) memset::c#3 +(byte) memset::c#4 (byte*) memset::dst (byte*) memset::dst#0 (byte*) memset::dst#1 @@ -250,6 +263,7 @@ SYMBOL TABLE SSA (word) memset::num#0 (word) memset::num#1 (word) memset::num#2 +(word) memset::num#3 (void*) memset::return (void*) memset::return#0 (void*) memset::return#1 @@ -262,12 +276,14 @@ SYMBOL TABLE SSA (void*) memset::str#2 (void*) memset::str#3 (void*) memset::str#4 +(void*) memset::str#5 Adding number conversion cast (unumber) $10 in (byte) VIC_MCM#0 ← (number) $10 Adding number conversion cast (unumber) 8 in (byte) VIC_CSEL#0 ← (number) 8 Adding number conversion cast (unumber) 0 in (byte) BLACK#0 ← (number) 0 Adding number conversion cast (unumber) 1 in (byte) WHITE#0 ← (number) 1 Adding number conversion cast (unumber) $b in (byte) DARK_GREY#0 ← (number) $b +Adding number conversion cast (unumber) 0 in (bool~) memset::$0 ← (word) memset::num#2 > (number) 0 Adding number conversion cast (unumber) $3fff in (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (number) $3fff Adding number conversion cast (unumber) main::toD0181_$1#0 in (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (unumber)(number) $3fff Adding number conversion cast (unumber) 4 in (number~) main::toD0181_$2#0 ← (unumber~) main::toD0181_$1#0 * (number) 4 @@ -296,8 +312,8 @@ Inlining cast (byte*) COLS#0 ← (byte*)(number) $d800 Inlining cast (byte) BLACK#0 ← (unumber)(number) 0 Inlining cast (byte) WHITE#0 ← (unumber)(number) 1 Inlining cast (byte) DARK_GREY#0 ← (unumber)(number) $b -Inlining cast (byte*~) memset::$0 ← (byte*)(void*) memset::str#2 -Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 +Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 +Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400 Inlining cast (byte*) LOGO#0 ← (byte*)(number) $2000 Inlining cast (word~) main::toD0181_$0#0 ← (word)(byte*) main::toD0181_screen#1 @@ -317,6 +333,7 @@ Simplifying constant pointer cast (byte*) 55296 Simplifying constant integer cast 0 Simplifying constant integer cast 1 Simplifying constant integer cast $b +Simplifying constant integer cast 0 Simplifying constant pointer cast (byte*) 1024 Simplifying constant pointer cast (byte*) 8192 Simplifying constant integer cast $3fff @@ -331,6 +348,7 @@ Finalized unsigned number type (byte) 8 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) $b +Finalized unsigned number type (byte) 0 Finalized unsigned number type (word) $3fff Finalized unsigned number type (byte) 4 Finalized unsigned number type (byte) 4 @@ -345,8 +363,13 @@ Inferred type updated to byte in (unumber~) main::toD0181_$6#0 ← (byte~) main: Inferred type updated to byte in (unumber~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f Inferred type updated to byte in (unumber~) main::toD0181_$8#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 Inferred type updated to byte in (unumber~) main::$3 ← (byte) WHITE#0 | (byte) 8 -Alias (byte*) memset::end#0 = (byte*~) memset::$1 -Alias (void*) memset::return#0 = (void*) memset::str#3 (void*) memset::str#4 (void*) memset::return#4 (void*) memset::return#1 +Inversing boolean not [14] (bool~) memset::$1 ← (word) memset::num#2 <= (byte) 0 from [13] (bool~) memset::$0 ← (word) memset::num#2 > (byte) 0 +Successful SSA optimization Pass2UnaryNotSimplification +Alias (void*) memset::return#0 = (void*) memset::str#2 (void*) memset::return#4 (void*) memset::return#1 +Alias (void*) memset::str#3 = (void*) memset::str#4 +Alias (word) memset::num#2 = (word) memset::num#3 +Alias (byte) memset::c#3 = (byte) memset::c#4 +Alias (byte*) memset::end#0 = (byte*~) memset::$3 Alias (byte*) main::toD0181_screen#0 = (byte*) main::toD0181_screen#1 Alias (byte*) main::toD0181_gfx#0 = (byte*) main::toD0181_gfx#1 Alias (byte) main::toD0181_return#0 = (byte~) main::toD0181_$8#0 (byte) main::toD0181_return#2 (byte) main::toD0181_return#1 (byte) main::toD0181_return#3 (byte~) main::$0 @@ -354,17 +377,20 @@ Alias (byte) memset::c#1 = (byte~) main::$3 Successful SSA optimization Pass2AliasElimination Self Phi Eliminated (byte) memset::c#2 Self Phi Eliminated (byte*) memset::end#1 -Self Phi Eliminated (void*) memset::return#0 +Self Phi Eliminated (void*) memset::str#5 Successful SSA optimization Pass2SelfPhiElimination Identical Phi Values (byte) memset::c#2 (byte) memset::c#3 Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0 -Identical Phi Values (void*) memset::return#0 (void*) memset::str#2 +Identical Phi Values (void*) memset::str#5 (void*) memset::str#3 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) memset::$2 [21] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -Simple Condition (bool~) main::$5 [70] if((byte) main::ch#1!=rangelast(0,$ef)) goto main::@1 +Identical Phi Values (void*) memset::return#0 (void*) memset::str#3 +Successful SSA optimization Pass2IdenticalPhiElimination +Simple Condition (bool~) memset::$1 [15] if((word) memset::num#2<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [27] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 +Simple Condition (bool~) main::$5 [74] if((byte) main::ch#1!=rangelast(0,$ef)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [56] (word) memset::num#0 ← (unumber)(number) $28*(number) $19 -Constant right-side identified [62] (word) memset::num#1 ← (unumber)(number) $28*(number) $19 +Constant right-side identified [60] (word) memset::num#0 ← (unumber)(number) $28*(number) $19 +Constant right-side identified [66] (word) memset::num#1 ← (unumber)(number) $28*(number) $19 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) BORDERCOL#0 = (byte*) 53280 Constant (const byte*) BGCOL#0 = (byte*) 53281 @@ -388,17 +414,17 @@ Constant (const byte*) main::toD0181_screen#0 = SCREEN#0 Constant (const byte*) main::toD0181_gfx#0 = LOGO#0 Constant (const byte) memset::c#0 = BLACK#0 Successful SSA optimization Pass2ConstantIdentification -Constant value identified (word)main::toD0181_screen#0 in [37] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 -Constant value identified (word)main::toD0181_gfx#0 in [41] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 -Constant value identified (void*)SCREEN#0 in [54] (void*) memset::str#0 ← (void*)(const byte*) SCREEN#0 -Constant value identified (void*)COLS#0 in [60] (void*) memset::str#1 ← (void*)(const byte*) COLS#0 +Constant value identified (word)main::toD0181_screen#0 in [41] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 +Constant value identified (word)main::toD0181_gfx#0 in [45] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 +Constant value identified (void*)SCREEN#0 in [58] (void*) memset::str#0 ← (void*)(const byte*) SCREEN#0 +Constant value identified (void*)COLS#0 in [64] (void*) memset::str#1 ← (void*)(const byte*) COLS#0 Successful SSA optimization Pass2ConstantValues -if() condition always true - replacing block destination [71] if(true) goto main::@4 +if() condition always true - replacing block destination [75] if(true) goto main::@4 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [68] main::ch#1 ← ++ main::ch#2 to ++ -Resolved ranged comparison value [70] if(main::ch#1!=rangelast(0,$ef)) goto main::@1 to (number) $f0 -Eliminating unused variable (void*) memset::return#2 and assignment [28] (void*) memset::return#2 ← (void*) memset::str#2 -Eliminating unused variable (void*) memset::return#3 and assignment [32] (void*) memset::return#3 ← (void*) memset::str#2 +Resolved ranged next value [72] main::ch#1 ← ++ main::ch#2 to ++ +Resolved ranged comparison value [74] if(main::ch#1!=rangelast(0,$ef)) goto main::@1 to (number) $f0 +Eliminating unused variable (void*) memset::return#2 and assignment [29] (void*) memset::return#2 ← (void*) memset::str#3 +Eliminating unused variable (void*) memset::return#3 and assignment [33] (void*) memset::return#3 ← (void*) memset::str#3 Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks @@ -408,9 +434,9 @@ Simplifying constant integer cast $f0 Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) $f0 Successful SSA optimization PassNFinalizeNumberTypeConversions -Constant right-side identified [24] (byte~) main::$1 ← (const byte) VIC_MCM#0 | (const byte) VIC_CSEL#0 -Constant right-side identified [28] (byte) memset::c#1 ← (const byte) WHITE#0 | (byte) 8 -Constant right-side identified [35] (byte*~) main::$8 ← (const byte*) SCREEN#0 + (word) $3e7 +Constant right-side identified [25] (byte~) main::$1 ← (const byte) VIC_MCM#0 | (const byte) VIC_CSEL#0 +Constant right-side identified [29] (byte) memset::c#1 ← (const byte) WHITE#0 | (byte) 8 +Constant right-side identified [36] (byte*~) main::$8 ← (const byte*) SCREEN#0 + (word) $3e7 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) main::toD0181_$0#0 = (word)main::toD0181_screen#0 Constant (const word) main::toD0181_$4#0 = (word)main::toD0181_gfx#0 @@ -420,30 +446,30 @@ Constant (const byte) memset::c#1 = WHITE#0|8 Constant (const void*) memset::str#1 = (void*)COLS#0 Constant (const byte*) main::$8 = SCREEN#0+$3e7 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [14] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff -Constant right-side identified [17] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 +Constant right-side identified [15] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff +Constant right-side identified [18] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&$3fff Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [14] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 -Constant right-side identified [16] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 +Constant right-side identified [15] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 +Constant right-side identified [17] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) main::toD0181_$2#0 = main::toD0181_$1#0*4 Constant (const byte) main::toD0181_$6#0 = main::toD0181_$5#0/4 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [14] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 -Constant right-side identified [15] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f +Constant right-side identified [15] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 +Constant right-side identified [16] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::toD0181_$3#0 = >main::toD0181_$2#0 Constant (const byte) main::toD0181_$7#0 = main::toD0181_$6#0&$f Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [14] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 +Constant right-side identified [15] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0 Successful SSA optimization Pass2ConstantIdentification -Inlining Noop Cast [1] (byte*~) memset::$0 ← (byte*)(void*) memset::str#2 keeping memset::str#2 -Inlining Noop Cast [3] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 keeping memset::str#2 +Inlining Noop Cast [2] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 keeping memset::str#3 +Inlining Noop Cast [4] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 keeping memset::str#3 Successful SSA optimization Pass2NopCastInlining Inlining constant with var siblings (const word) memset::num#0 Inlining constant with var siblings (const word) memset::num#1 @@ -472,7 +498,7 @@ Constant inlined memset::c#1 = (const byte) WHITE#0|(byte) 8 Constant inlined main::ch#0 = (byte) 0 Constant inlined main::$8 = (const byte*) SCREEN#0+(word) $3e7 Successful SSA optimization Pass2ConstantInlining -Added new block during phi lifting memset::@4(between memset::@1 and memset::@1) +Added new block during phi lifting memset::@6(between memset::@4 and memset::@4) Added new block during phi lifting main::@12(between main::@1 and main::@1) Adding NOP phi() at start of @begin Adding NOP phi() at start of @9 @@ -483,24 +509,26 @@ Adding NOP phi() at start of main::toD0181_@return Adding NOP phi() at start of main::@10 Adding NOP phi() at start of main::@11 Adding NOP phi() at start of main::@3 -Adding NOP phi() at start of memset::@2 +Adding NOP phi() at start of memset::@1 CALL GRAPH Calls in [] to main:3 Calls in [main] to memset:14 memset:16 Created 5 initial phi equivalence classes Coalesced [25] main::ch#3 ← main::ch#1 -Coalesced [35] memset::dst#4 ← memset::dst#1 +Coalesced [36] memset::dst#4 ← memset::dst#1 Coalesced down to 5 phi equivalence classes Culled Empty Block (label) @10 Culled Empty Block (label) main::toD0181_@return Culled Empty Block (label) main::@11 Culled Empty Block (label) main::@3 Culled Empty Block (label) main::@12 -Culled Empty Block (label) memset::@2 -Culled Empty Block (label) memset::@4 +Culled Empty Block (label) memset::@1 +Culled Empty Block (label) memset::@6 Renumbering block @8 to @1 Renumbering block @9 to @2 +Renumbering block memset::@2 to memset::@1 +Renumbering block memset::@4 to memset::@2 Renumbering block main::@4 to main::@2 Renumbering block main::@9 to main::@3 Renumbering block main::@10 to main::@4 @@ -558,19 +586,22 @@ main::@2: scope:[main] from main::@1 main::@2 to:main::@2 memset: scope:[memset] from main::@3 main::@4 [21] (byte) memset::c#3 ← phi( main::@4/(const byte) WHITE#0|(byte) 8 main::@3/(const byte) BLACK#0 ) + [21] (void*) memset::str#3 ← phi( main::@4/(void*)(const byte*) COLS#0 main::@3/(void*)(const byte*) SCREEN#0 ) [21] (word) memset::num#2 ← phi( main::@4/(word)(number) $28*(number) $19 main::@3/(word)(number) $28*(number) $19 ) - [21] (void*) memset::str#2 ← phi( main::@4/(void*)(const byte*) COLS#0 main::@3/(void*)(const byte*) SCREEN#0 ) - [22] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 - [23] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + [22] if((word) memset::num#2<=(byte) 0) goto memset::@return to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - [24] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) - [25] *((byte*) memset::dst#2) ← (byte) memset::c#3 - [26] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - [27] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 +memset::@1: scope:[memset] from memset + [23] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 + [24] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + to:memset::@2 +memset::@2: scope:[memset] from memset::@1 memset::@2 + [25] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 ) + [26] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [27] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [28] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 to:memset::@return -memset::@return: scope:[memset] from memset::@1 - [28] return +memset::@return: scope:[memset] from memset memset::@2 + [29] return to:@return @@ -607,7 +638,7 @@ VARIABLE REGISTER WEIGHTS (byte*) main::toD0181_screen (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (byte) memset::c -(byte) memset::c#3 1.5714285714285714 +(byte) memset::c#3 1.375 (byte*) memset::dst (byte*) memset::dst#1 16.5 (byte*) memset::dst#2 17.5 @@ -618,25 +649,25 @@ VARIABLE REGISTER WEIGHTS (word) memset::num#2 2.0 (void*) memset::return (void*) memset::str -(void*) memset::str#2 +(void*) memset::str#3 Initial phi equivalence classes [ main::ch#2 main::ch#1 ] -[ memset::str#2 ] [ memset::num#2 ] +[ memset::str#3 ] [ memset::c#3 ] [ memset::dst#2 memset::dst#3 memset::dst#1 ] Added variable memset::end#0 to zero page equivalence class [ memset::end#0 ] Complete equivalence classes [ main::ch#2 main::ch#1 ] -[ memset::str#2 ] [ memset::num#2 ] +[ memset::str#3 ] [ memset::c#3 ] [ memset::dst#2 memset::dst#3 memset::dst#1 ] [ memset::end#0 ] Allocated zp ZP_BYTE:2 [ main::ch#2 main::ch#1 ] -Allocated zp ZP_WORD:3 [ memset::str#2 ] -Allocated zp ZP_WORD:5 [ memset::num#2 ] +Allocated zp ZP_WORD:3 [ memset::num#2 ] +Allocated zp ZP_WORD:5 [ memset::str#3 ] Allocated zp ZP_BYTE:7 [ memset::c#3 ] Allocated zp ZP_WORD:8 [ memset::dst#2 memset::dst#3 memset::dst#1 ] Allocated zp ZP_WORD:10 [ memset::end#0 ] @@ -718,16 +749,16 @@ main: { // [21] phi (byte) memset::c#3 = (const byte) BLACK#0 [phi:main::@3->memset#0] -- vbuz1=vbuc1 lda #BLACK sta memset.c - // [21] phi (word) memset::num#2 = (word)(number) $28*(number) $19 [phi:main::@3->memset#1] -- vwuz1=vwuc1 - lda #<$28*$19 - sta memset.num - lda #>$28*$19 - sta memset.num+1 - // [21] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:main::@3->memset#2] -- pvoz1=pvoc1 + // [21] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:main::@3->memset#1] -- pvoz1=pvoc1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 + // [21] phi (word) memset::num#2 = (word)(number) $28*(number) $19 [phi:main::@3->memset#2] -- vwuz1=vwuc1 + lda #<$28*$19 + sta memset.num + lda #>$28*$19 + sta memset.num+1 jsr memset // [13] phi from main::@3 to main::@4 [phi:main::@3->main::@4] b4_from_b3: @@ -740,16 +771,16 @@ main: { // [21] phi (byte) memset::c#3 = (const byte) WHITE#0|(byte) 8 [phi:main::@4->memset#0] -- vbuz1=vbuc1 lda #WHITE|8 sta memset.c - // [21] phi (word) memset::num#2 = (word)(number) $28*(number) $19 [phi:main::@4->memset#1] -- vwuz1=vwuc1 - lda #<$28*$19 - sta memset.num - lda #>$28*$19 - sta memset.num+1 - // [21] phi (void*) memset::str#2 = (void*)(const byte*) COLS#0 [phi:main::@4->memset#2] -- pvoz1=pvoc1 + // [21] phi (void*) memset::str#3 = (void*)(const byte*) COLS#0 [phi:main::@4->memset#1] -- pvoz1=pvoc1 lda #<COLS sta memset.str lda #>COLS sta memset.str+1 + // [21] phi (word) memset::num#2 = (word)(number) $28*(number) $19 [phi:main::@4->memset#2] -- vwuz1=vwuc1 + lda #<$28*$19 + sta memset.num + lda #>$28*$19 + sta memset.num+1 jsr memset // [15] phi from main::@4 to main::@1 [phi:main::@4->main::@1] b1_from_b4: @@ -784,14 +815,22 @@ main: { } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage(3) str, byte zeropage(7) c, word zeropage(5) num) +// memset(void* zeropage(5) str, byte zeropage(7) c, word zeropage(3) num) memset: { .label end = $a .label dst = 8 - .label str = 3 - .label num = 5 + .label num = 3 + .label str = 5 .label c = 7 - // [22] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz3 + // [22] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 + lda num + beq breturn + lda num+1 + beq breturn + jmp b1 + // memset::@1 + b1: + // [23] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz3 lda str clc adc num @@ -799,38 +838,38 @@ memset: { lda str+1 adc num+1 sta end+1 - // [23] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 -- pbuz1=pbuz2 + // [24] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 -- pbuz1=pbuz2 lda str sta dst lda str+1 sta dst+1 - // [24] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - b1_from_memset: - b1_from_b1: - // [24] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - jmp b1 - // memset::@1 - b1: - // [25] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuz2 + // [25] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + b2_from_b1: + b2_from_b2: + // [25] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + jmp b2 + // memset::@2 + b2: + // [26] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuz2 lda c ldy #0 sta (dst),y - // [26] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [27] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [27] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [28] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1_from_b1 + bne b2_from_b2 lda dst cmp end - bne b1_from_b1 + bne b2_from_b2 jmp breturn // memset::@return breturn: - // [28] return + // [29] return rts } // File Data @@ -849,41 +888,43 @@ Statement [7] *((const byte*) BGCOL#0) ← *((const byte*) BGCOL2#0) [ ] ( main: Statement [8] *((const byte*) BGCOL3#0) ← (const byte) BLACK#0 [ ] ( main:3 [ ] ) always clobbers reg byte a Statement [10] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:3 [ ] ) always clobbers reg byte a Statement [11] *((const byte*) D016#0) ← (const byte) VIC_MCM#0|(const byte) VIC_CSEL#0 [ ] ( main:3 [ ] ) always clobbers reg byte a -Statement [22] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:3::memset:12 [ memset::str#2 memset::c#3 memset::end#0 ] main:3::memset:14 [ memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [22] if((word) memset::num#2<=(byte) 0) goto memset::@return [ memset::num#2 memset::str#3 memset::c#3 ] ( main:3::memset:12 [ memset::num#2 memset::str#3 memset::c#3 ] main:3::memset:14 [ memset::num#2 memset::str#3 memset::c#3 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:7 [ memset::c#3 ] -Statement [23] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::memset:12 [ memset::c#3 memset::end#0 memset::dst#3 ] main:3::memset:14 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a -Statement [25] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::memset:12 [ memset::c#3 memset::end#0 memset::dst#2 ] main:3::memset:14 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [23] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 [ memset::str#3 memset::c#3 memset::end#0 ] ( main:3::memset:12 [ memset::str#3 memset::c#3 memset::end#0 ] main:3::memset:14 [ memset::str#3 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [24] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::memset:12 [ memset::c#3 memset::end#0 memset::dst#3 ] main:3::memset:14 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [26] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::memset:12 [ memset::c#3 memset::end#0 memset::dst#2 ] main:3::memset:14 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:7 [ memset::c#3 ] -Statement [27] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::memset:12 [ memset::c#3 memset::end#0 memset::dst#1 ] main:3::memset:14 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [28] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::memset:12 [ memset::c#3 memset::end#0 memset::dst#1 ] main:3::memset:14 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a Statement [5] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 [ ] ( main:3 [ ] ) always clobbers reg byte a Statement [6] *((const byte*) BGCOL2#0) ← (const byte) DARK_GREY#0 [ ] ( main:3 [ ] ) always clobbers reg byte a Statement [7] *((const byte*) BGCOL#0) ← *((const byte*) BGCOL2#0) [ ] ( main:3 [ ] ) always clobbers reg byte a Statement [8] *((const byte*) BGCOL3#0) ← (const byte) BLACK#0 [ ] ( main:3 [ ] ) always clobbers reg byte a Statement [10] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:3 [ ] ) always clobbers reg byte a Statement [11] *((const byte*) D016#0) ← (const byte) VIC_MCM#0|(const byte) VIC_CSEL#0 [ ] ( main:3 [ ] ) always clobbers reg byte a -Statement [22] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:3::memset:12 [ memset::str#2 memset::c#3 memset::end#0 ] main:3::memset:14 [ memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a -Statement [23] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::memset:12 [ memset::c#3 memset::end#0 memset::dst#3 ] main:3::memset:14 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a -Statement [25] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::memset:12 [ memset::c#3 memset::end#0 memset::dst#2 ] main:3::memset:14 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y -Statement [27] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::memset:12 [ memset::c#3 memset::end#0 memset::dst#1 ] main:3::memset:14 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [22] if((word) memset::num#2<=(byte) 0) goto memset::@return [ memset::num#2 memset::str#3 memset::c#3 ] ( main:3::memset:12 [ memset::num#2 memset::str#3 memset::c#3 ] main:3::memset:14 [ memset::num#2 memset::str#3 memset::c#3 ] ) always clobbers reg byte a +Statement [23] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 [ memset::str#3 memset::c#3 memset::end#0 ] ( main:3::memset:12 [ memset::str#3 memset::c#3 memset::end#0 ] main:3::memset:14 [ memset::str#3 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [24] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::memset:12 [ memset::c#3 memset::end#0 memset::dst#3 ] main:3::memset:14 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [26] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::memset:12 [ memset::c#3 memset::end#0 memset::dst#2 ] main:3::memset:14 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [28] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::memset:12 [ memset::c#3 memset::end#0 memset::dst#1 ] main:3::memset:14 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a Potential registers zp ZP_BYTE:2 [ main::ch#2 main::ch#1 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:3 [ memset::str#2 ] : zp ZP_WORD:3 , -Potential registers zp ZP_WORD:5 [ memset::num#2 ] : zp ZP_WORD:5 , +Potential registers zp ZP_WORD:3 [ memset::num#2 ] : zp ZP_WORD:3 , +Potential registers zp ZP_WORD:5 [ memset::str#3 ] : zp ZP_WORD:5 , Potential registers zp ZP_BYTE:7 [ memset::c#3 ] : zp ZP_BYTE:7 , reg byte x , Potential registers zp ZP_WORD:8 [ memset::dst#2 memset::dst#3 memset::dst#1 ] : zp ZP_WORD:8 , Potential registers zp ZP_WORD:10 [ memset::end#0 ] : zp ZP_WORD:10 , REGISTER UPLIFT SCOPES -Uplift Scope [memset] 38: zp ZP_WORD:8 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:10 [ memset::end#0 ] 2: zp ZP_WORD:5 [ memset::num#2 ] 1.57: zp ZP_BYTE:7 [ memset::c#3 ] 0: zp ZP_WORD:3 [ memset::str#2 ] +Uplift Scope [memset] 38: zp ZP_WORD:8 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:10 [ memset::end#0 ] 2: zp ZP_WORD:3 [ memset::num#2 ] 1.38: zp ZP_BYTE:7 [ memset::c#3 ] 0: zp ZP_WORD:5 [ memset::str#3 ] Uplift Scope [main] 38.5: zp ZP_BYTE:2 [ main::ch#2 main::ch#1 ] Uplift Scope [] -Uplifting [memset] best 6240 combination zp ZP_WORD:8 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:10 [ memset::end#0 ] zp ZP_WORD:5 [ memset::num#2 ] reg byte x [ memset::c#3 ] zp ZP_WORD:3 [ memset::str#2 ] -Uplifting [main] best 6120 combination reg byte x [ main::ch#2 main::ch#1 ] -Uplifting [] best 6120 combination -Coalescing zero page register with common assignment [ zp ZP_WORD:3 [ memset::str#2 ] ] with [ zp ZP_WORD:8 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:5 [ memset::num#2 ] ] with [ zp ZP_WORD:10 [ memset::end#0 ] ] - score: 1 -Allocated (was zp ZP_WORD:3) zp ZP_WORD:2 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] -Allocated (was zp ZP_WORD:5) zp ZP_WORD:4 [ memset::num#2 memset::end#0 ] +Uplifting [memset] best 6254 combination zp ZP_WORD:8 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:10 [ memset::end#0 ] zp ZP_WORD:3 [ memset::num#2 ] reg byte x [ memset::c#3 ] zp ZP_WORD:5 [ memset::str#3 ] +Uplifting [main] best 6134 combination reg byte x [ main::ch#2 main::ch#1 ] +Uplifting [] best 6134 combination +Coalescing zero page register with common assignment [ zp ZP_WORD:3 [ memset::num#2 ] ] with [ zp ZP_WORD:10 [ memset::end#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:5 [ memset::str#3 ] ] with [ zp ZP_WORD:8 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1 +Allocated (was zp ZP_WORD:3) zp ZP_WORD:2 [ memset::num#2 memset::end#0 ] +Allocated (was zp ZP_WORD:5) zp ZP_WORD:4 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -960,16 +1001,16 @@ main: { memset_from_b3: // [21] phi (byte) memset::c#3 = (const byte) BLACK#0 [phi:main::@3->memset#0] -- vbuxx=vbuc1 ldx #BLACK - // [21] phi (word) memset::num#2 = (word)(number) $28*(number) $19 [phi:main::@3->memset#1] -- vwuz1=vwuc1 - lda #<$28*$19 - sta memset.num - lda #>$28*$19 - sta memset.num+1 - // [21] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:main::@3->memset#2] -- pvoz1=pvoc1 + // [21] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:main::@3->memset#1] -- pvoz1=pvoc1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 + // [21] phi (word) memset::num#2 = (word)(number) $28*(number) $19 [phi:main::@3->memset#2] -- vwuz1=vwuc1 + lda #<$28*$19 + sta memset.num + lda #>$28*$19 + sta memset.num+1 jsr memset // [13] phi from main::@3 to main::@4 [phi:main::@3->main::@4] b4_from_b3: @@ -981,16 +1022,16 @@ main: { memset_from_b4: // [21] phi (byte) memset::c#3 = (const byte) WHITE#0|(byte) 8 [phi:main::@4->memset#0] -- vbuxx=vbuc1 ldx #WHITE|8 - // [21] phi (word) memset::num#2 = (word)(number) $28*(number) $19 [phi:main::@4->memset#1] -- vwuz1=vwuc1 - lda #<$28*$19 - sta memset.num - lda #>$28*$19 - sta memset.num+1 - // [21] phi (void*) memset::str#2 = (void*)(const byte*) COLS#0 [phi:main::@4->memset#2] -- pvoz1=pvoc1 + // [21] phi (void*) memset::str#3 = (void*)(const byte*) COLS#0 [phi:main::@4->memset#1] -- pvoz1=pvoc1 lda #<COLS sta memset.str lda #>COLS sta memset.str+1 + // [21] phi (word) memset::num#2 = (word)(number) $28*(number) $19 [phi:main::@4->memset#2] -- vwuz1=vwuc1 + lda #<$28*$19 + sta memset.num + lda #>$28*$19 + sta memset.num+1 jsr memset // [15] phi from main::@4 to main::@1 [phi:main::@4->main::@1] b1_from_b4: @@ -1022,13 +1063,21 @@ main: { } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage(2) str, byte register(X) c, word zeropage(4) num) +// memset(void* zeropage(4) str, byte register(X) c, word zeropage(2) num) memset: { - .label end = 4 - .label dst = 2 - .label str = 2 - .label num = 4 - // [22] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 + .label end = 2 + .label dst = 4 + .label num = 2 + .label str = 4 + // [22] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 + lda num + beq breturn + lda num+1 + beq breturn + jmp b1 + // memset::@1 + b1: + // [23] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 lda end clc adc str @@ -1036,34 +1085,34 @@ memset: { lda end+1 adc str+1 sta end+1 - // [23] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 - // [24] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - b1_from_memset: - b1_from_b1: - // [24] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - jmp b1 - // memset::@1 - b1: - // [25] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx + // [24] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + // [25] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + b2_from_b1: + b2_from_b2: + // [25] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + jmp b2 + // memset::@2 + b2: + // [26] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx txa ldy #0 sta (dst),y - // [26] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [27] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [27] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [28] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1_from_b1 + bne b2_from_b2 lda dst cmp end - bne b1_from_b1 + bne b2_from_b2 jmp breturn // memset::@return breturn: - // [28] return + // [29] return rts } // File Data @@ -1085,13 +1134,14 @@ Removing instruction jmp b4 Removing instruction jmp b1 Removing instruction jmp b2 Removing instruction jmp b1 +Removing instruction jmp b2 Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination Removing instruction lda BGCOL2 Succesful ASM optimization Pass5UnnecesaryLoadElimination Replacing label b1_from_b1 with b1 -Replacing label b1_from_b1 with b1 -Replacing label b1_from_b1 with b1 +Replacing label b2_from_b2 with b2 +Replacing label b2_from_b2 with b2 Removing instruction b1: Removing instruction b2_from_b1: Removing instruction b2: @@ -1101,15 +1151,15 @@ Removing instruction toD0181: Removing instruction b4_from_b3: Removing instruction memset_from_b4: Removing instruction b1_from_b1: -Removing instruction b1_from_memset: -Removing instruction b1_from_b1: +Removing instruction b2_from_b1: +Removing instruction b2_from_b2: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: Removing instruction b3: Removing instruction memset_from_b3: Removing instruction b4: Removing instruction b1_from_b4: -Removing instruction breturn: +Removing instruction b1: Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main @@ -1176,29 +1226,30 @@ FINAL SYMBOL TABLE (byte*) main::toD0181_screen (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (label) memset::@1 +(label) memset::@2 (label) memset::@return (byte) memset::c -(byte) memset::c#3 reg byte x 1.5714285714285714 +(byte) memset::c#3 reg byte x 1.375 (byte*) memset::dst -(byte*) memset::dst#1 dst zp ZP_WORD:2 16.5 -(byte*) memset::dst#2 dst zp ZP_WORD:2 17.5 -(byte*~) memset::dst#3 dst zp ZP_WORD:2 4.0 +(byte*) memset::dst#1 dst zp ZP_WORD:4 16.5 +(byte*) memset::dst#2 dst zp ZP_WORD:4 17.5 +(byte*~) memset::dst#3 dst zp ZP_WORD:4 4.0 (byte*) memset::end -(byte*) memset::end#0 end zp ZP_WORD:4 2.1666666666666665 +(byte*) memset::end#0 end zp ZP_WORD:2 2.1666666666666665 (word) memset::num -(word) memset::num#2 num zp ZP_WORD:4 2.0 +(word) memset::num#2 num zp ZP_WORD:2 2.0 (void*) memset::return (void*) memset::str -(void*) memset::str#2 str zp ZP_WORD:2 +(void*) memset::str#3 str zp ZP_WORD:4 reg byte x [ main::ch#2 main::ch#1 ] -zp ZP_WORD:2 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] -zp ZP_WORD:4 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:2 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:4 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] reg byte x [ memset::c#3 ] FINAL ASSEMBLER -Score: 5876 +Score: 5887 // File Comments // Basic Upstart @@ -1265,16 +1316,16 @@ main: { // [21] phi from main::@3 to memset [phi:main::@3->memset] // [21] phi (byte) memset::c#3 = (const byte) BLACK#0 [phi:main::@3->memset#0] -- vbuxx=vbuc1 ldx #BLACK - // [21] phi (word) memset::num#2 = (word)(number) $28*(number) $19 [phi:main::@3->memset#1] -- vwuz1=vwuc1 - lda #<$28*$19 - sta memset.num - lda #>$28*$19 - sta memset.num+1 - // [21] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:main::@3->memset#2] -- pvoz1=pvoc1 + // [21] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:main::@3->memset#1] -- pvoz1=pvoc1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 + // [21] phi (word) memset::num#2 = (word)(number) $28*(number) $19 [phi:main::@3->memset#2] -- vwuz1=vwuc1 + lda #<$28*$19 + sta memset.num + lda #>$28*$19 + sta memset.num+1 jsr memset // [13] phi from main::@3 to main::@4 [phi:main::@3->main::@4] // main::@4 @@ -1283,16 +1334,16 @@ main: { // [21] phi from main::@4 to memset [phi:main::@4->memset] // [21] phi (byte) memset::c#3 = (const byte) WHITE#0|(byte) 8 [phi:main::@4->memset#0] -- vbuxx=vbuc1 ldx #WHITE|8 - // [21] phi (word) memset::num#2 = (word)(number) $28*(number) $19 [phi:main::@4->memset#1] -- vwuz1=vwuc1 - lda #<$28*$19 - sta memset.num - lda #>$28*$19 - sta memset.num+1 - // [21] phi (void*) memset::str#2 = (void*)(const byte*) COLS#0 [phi:main::@4->memset#2] -- pvoz1=pvoc1 + // [21] phi (void*) memset::str#3 = (void*)(const byte*) COLS#0 [phi:main::@4->memset#1] -- pvoz1=pvoc1 lda #<COLS sta memset.str lda #>COLS sta memset.str+1 + // [21] phi (word) memset::num#2 = (word)(number) $28*(number) $19 [phi:main::@4->memset#2] -- vwuz1=vwuc1 + lda #<$28*$19 + sta memset.num + lda #>$28*$19 + sta memset.num+1 jsr memset // [15] phi from main::@4 to main::@1 [phi:main::@4->main::@1] // [15] phi (byte) main::ch#2 = (byte) 0 [phi:main::@4->main::@1#0] -- vbuxx=vbuc1 @@ -1323,14 +1374,21 @@ main: { } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage(2) str, byte register(X) c, word zeropage(4) num) +// memset(void* zeropage(4) str, byte register(X) c, word zeropage(2) num) memset: { - .label end = 4 - .label dst = 2 - .label str = 2 - .label num = 4 + .label end = 2 + .label dst = 4 + .label num = 2 + .label str = 4 + // if(num>0) + // [22] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 + lda num + beq breturn + lda num+1 + beq breturn + // memset::@1 // end = (char*)str + num - // [22] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 + // [23] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 lda end clc adc str @@ -1338,32 +1396,33 @@ memset: { lda end+1 adc str+1 sta end+1 - // [23] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 - // [24] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - // [24] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - // memset::@1 - b1: + // [24] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + // [25] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + // [25] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + // memset::@2 + b2: // *dst = c - // [25] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx + // [26] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx txa ldy #0 sta (dst),y // for(char* dst = str; dst!=end; dst++) - // [26] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [27] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [27] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [28] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1 + bne b2 lda dst cmp end - bne b1 + bne b2 // memset::@return + breturn: // } - // [28] return + // [29] return rts } // File Data diff --git a/src/test/ref/examples/showlogo/showlogo.sym b/src/test/ref/examples/showlogo/showlogo.sym index 872a57277..6c3fc3e6b 100644 --- a/src/test/ref/examples/showlogo/showlogo.sym +++ b/src/test/ref/examples/showlogo/showlogo.sym @@ -54,22 +54,23 @@ (byte*) main::toD0181_screen (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (label) memset::@1 +(label) memset::@2 (label) memset::@return (byte) memset::c -(byte) memset::c#3 reg byte x 1.5714285714285714 +(byte) memset::c#3 reg byte x 1.375 (byte*) memset::dst -(byte*) memset::dst#1 dst zp ZP_WORD:2 16.5 -(byte*) memset::dst#2 dst zp ZP_WORD:2 17.5 -(byte*~) memset::dst#3 dst zp ZP_WORD:2 4.0 +(byte*) memset::dst#1 dst zp ZP_WORD:4 16.5 +(byte*) memset::dst#2 dst zp ZP_WORD:4 17.5 +(byte*~) memset::dst#3 dst zp ZP_WORD:4 4.0 (byte*) memset::end -(byte*) memset::end#0 end zp ZP_WORD:4 2.1666666666666665 +(byte*) memset::end#0 end zp ZP_WORD:2 2.1666666666666665 (word) memset::num -(word) memset::num#2 num zp ZP_WORD:4 2.0 +(word) memset::num#2 num zp ZP_WORD:2 2.0 (void*) memset::return (void*) memset::str -(void*) memset::str#2 str zp ZP_WORD:2 +(void*) memset::str#3 str zp ZP_WORD:4 reg byte x [ main::ch#2 main::ch#1 ] -zp ZP_WORD:2 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] -zp ZP_WORD:4 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:2 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:4 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] reg byte x [ memset::c#3 ] diff --git a/src/test/ref/examples/sinplotter/sine-plotter.asm b/src/test/ref/examples/sinplotter/sine-plotter.asm index 7b6b6d3e5..715695731 100644 --- a/src/test/ref/examples/sinplotter/sine-plotter.asm +++ b/src/test/ref/examples/sinplotter/sine-plotter.asm @@ -716,34 +716,38 @@ divr16u: { bitmap_clear: { .const col = WHITE*$10 ldx #col - lda #<$3e8 - sta memset.num - lda #>$3e8 - sta memset.num+1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 jsr memset ldx #0 - lda #<$1f40 - sta memset.num - lda #>$1f40 - sta memset.num+1 lda #<BITMAP sta memset.str lda #>BITMAP sta memset.str+1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 jsr memset rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage($2b) str, byte register(X) c, word zeropage($2d) num) +// memset(void* zeropage($2d) str, byte register(X) c, word zeropage($2b) num) memset: { - .label end = $2d - .label dst = $2b - .label str = $2b - .label num = $2d + .label end = $2b + .label dst = $2d + .label num = $2b + .label str = $2d + lda num + beq breturn + lda num+1 + beq breturn lda end clc adc str @@ -751,7 +755,7 @@ memset: { lda end+1 adc str+1 sta end+1 - b1: + b2: txa ldy #0 sta (dst),y @@ -761,10 +765,11 @@ memset: { !: lda dst+1 cmp end+1 - bne b1 + bne b2 lda dst cmp end - bne b1 + bne b2 + breturn: rts } // Initialize bitmap plotting tables diff --git a/src/test/ref/examples/sinplotter/sine-plotter.cfg b/src/test/ref/examples/sinplotter/sine-plotter.cfg index a0e6b6f64..763e23122 100644 --- a/src/test/ref/examples/sinplotter/sine-plotter.cfg +++ b/src/test/ref/examples/sinplotter/sine-plotter.cfg @@ -367,57 +367,60 @@ bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 to:@return memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [189] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) + [189] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) [189] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 ) - [189] (void*) memset::str#2 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) - [190] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 - [191] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + [190] if((word) memset::num#2<=(byte) 0) goto memset::@return to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - [192] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) - [193] *((byte*) memset::dst#2) ← (byte) memset::c#3 - [194] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - [195] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 +memset::@1: scope:[memset] from memset + [191] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 + [192] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + to:memset::@2 +memset::@2: scope:[memset] from memset::@1 memset::@2 + [193] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 ) + [194] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [195] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [196] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 to:memset::@return -memset::@return: scope:[memset] from memset::@1 - [196] return +memset::@return: scope:[memset] from memset memset::@2 + [197] return to:@return bitmap_init: scope:[bitmap_init] from main::@3 - [197] phi() + [198] phi() to:bitmap_init::@1 bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2 - [198] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) - [198] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) - [199] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 - [200] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 - [201] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 + [199] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) + [199] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) + [200] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 + [201] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 + [202] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 to:bitmap_init::@2 bitmap_init::@6: scope:[bitmap_init] from bitmap_init::@1 - [202] phi() + [203] phi() to:bitmap_init::@2 bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6 - [203] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) - [204] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 - [205] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 + [204] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) + [205] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 + [206] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 to:bitmap_init::@3 bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4 - [206] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) - [206] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) - [207] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 - [208] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 - [209] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 - [210] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 - [211] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 - [212] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 - [213] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 + [207] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) + [207] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) + [208] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 + [209] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 + [210] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 + [211] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 + [212] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 + [213] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 + [214] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 to:bitmap_init::@5 bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@3 - [214] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 + [215] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 to:bitmap_init::@4 bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 - [215] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) - [216] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 - [217] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 + [216] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) + [217] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 + [218] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 to:bitmap_init::@return bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 - [218] return + [219] return to:@return diff --git a/src/test/ref/examples/sinplotter/sine-plotter.log b/src/test/ref/examples/sinplotter/sine-plotter.log index 4ba6c4110..63df755a4 100644 --- a/src/test/ref/examples/sinplotter/sine-plotter.log +++ b/src/test/ref/examples/sinplotter/sine-plotter.log @@ -44,6 +44,7 @@ Culled Empty Block (label) @23 Culled Empty Block (label) @24 Culled Empty Block (label) @25 Culled Empty Block (label) @26 +Culled Empty Block (label) memset::@5 Culled Empty Block (label) memset::@3 Culled Empty Block (label) @27 Culled Empty Block (label) bitmap_init::@8 @@ -552,30 +553,38 @@ mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@2 return to:@return memset: scope:[memset] from bitmap_clear bitmap_clear::@1 - (byte) memset::c#3 ← phi( bitmap_clear/(byte) memset::c#0 bitmap_clear::@1/(byte) memset::c#1 ) + (byte) memset::c#4 ← phi( bitmap_clear/(byte) memset::c#0 bitmap_clear::@1/(byte) memset::c#1 ) + (void*) memset::str#4 ← phi( bitmap_clear/(void*) memset::str#0 bitmap_clear::@1/(void*) memset::str#1 ) (word) memset::num#2 ← phi( bitmap_clear/(word) memset::num#0 bitmap_clear::@1/(word) memset::num#1 ) - (void*) memset::str#2 ← phi( bitmap_clear/(void*) memset::str#0 bitmap_clear::@1/(void*) memset::str#1 ) - (byte*~) memset::$0 ← ((byte*)) (void*) memset::str#2 - (byte*~) memset::$1 ← (byte*~) memset::$0 + (word) memset::num#2 - (byte*) memset::end#0 ← (byte*~) memset::$1 - (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#2 - to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - (void*) memset::str#4 ← phi( memset/(void*) memset::str#2 memset::@1/(void*) memset::str#4 ) - (byte*) memset::end#1 ← phi( memset/(byte*) memset::end#0 memset::@1/(byte*) memset::end#1 ) - (byte*) memset::dst#2 ← phi( memset/(byte*) memset::dst#0 memset::@1/(byte*) memset::dst#1 ) - (byte) memset::c#2 ← phi( memset/(byte) memset::c#3 memset::@1/(byte) memset::c#2 ) + (bool~) memset::$0 ← (word) memset::num#2 > (number) 0 + (bool~) memset::$1 ← ! (bool~) memset::$0 + if((bool~) memset::$1) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + (void*) memset::str#2 ← phi( memset/(void*) memset::str#4 memset::@4/(void*) memset::str#5 ) + (void*) memset::return#0 ← (void*) memset::str#2 + to:memset::@return +memset::@2: scope:[memset] from memset + (byte) memset::c#3 ← phi( memset/(byte) memset::c#4 ) + (word) memset::num#3 ← phi( memset/(word) memset::num#2 ) + (void*) memset::str#3 ← phi( memset/(void*) memset::str#4 ) + (byte*~) memset::$2 ← ((byte*)) (void*) memset::str#3 + (byte*~) memset::$3 ← (byte*~) memset::$2 + (word) memset::num#3 + (byte*) memset::end#0 ← (byte*~) memset::$3 + (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#3 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + (void*) memset::str#5 ← phi( memset::@2/(void*) memset::str#3 memset::@4/(void*) memset::str#5 ) + (byte*) memset::end#1 ← phi( memset::@2/(byte*) memset::end#0 memset::@4/(byte*) memset::end#1 ) + (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + (byte) memset::c#2 ← phi( memset::@2/(byte) memset::c#3 memset::@4/(byte) memset::c#2 ) *((byte*) memset::dst#2) ← (byte) memset::c#2 (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - (bool~) memset::$2 ← (byte*) memset::dst#1 != (byte*) memset::end#1 - if((bool~) memset::$2) goto memset::@1 - to:memset::@2 -memset::@2: scope:[memset] from memset::@1 - (void*) memset::str#3 ← phi( memset::@1/(void*) memset::str#4 ) - (void*) memset::return#0 ← (void*) memset::str#3 - to:memset::@return -memset::@return: scope:[memset] from memset::@2 - (void*) memset::return#4 ← phi( memset::@2/(void*) memset::return#0 ) + (bool~) memset::$4 ← (byte*) memset::dst#1 != (byte*) memset::end#1 + if((bool~) memset::$4) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + (void*) memset::return#4 ← phi( memset::@1/(void*) memset::return#0 ) (void*) memset::return#1 ← (void*) memset::return#4 return to:@return @@ -1375,17 +1384,21 @@ SYMBOL TABLE SSA (byte) main::vicSelectGfxBank1_toDd001_return#2 (byte) main::vicSelectGfxBank1_toDd001_return#3 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) -(byte*~) memset::$0 -(byte*~) memset::$1 -(bool~) memset::$2 +(bool~) memset::$0 +(bool~) memset::$1 +(byte*~) memset::$2 +(byte*~) memset::$3 +(bool~) memset::$4 (label) memset::@1 (label) memset::@2 +(label) memset::@4 (label) memset::@return (byte) memset::c (byte) memset::c#0 (byte) memset::c#1 (byte) memset::c#2 (byte) memset::c#3 +(byte) memset::c#4 (byte*) memset::dst (byte*) memset::dst#0 (byte*) memset::dst#1 @@ -1397,6 +1410,7 @@ SYMBOL TABLE SSA (word) memset::num#0 (word) memset::num#1 (word) memset::num#2 +(word) memset::num#3 (void*) memset::return (void*) memset::return#0 (void*) memset::return#1 @@ -1409,6 +1423,7 @@ SYMBOL TABLE SSA (void*) memset::str#2 (void*) memset::str#3 (void*) memset::str#4 +(void*) memset::str#5 (signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) (word~) mul16s::$0 (word~) mul16s::$1 @@ -1880,6 +1895,7 @@ Adding number conversion cast (unumber) 0 in (byte) mulu16_sel::select#3 ← (nu Adding number conversion cast (unumber) 0 in (byte) mulu16_sel::select#4 ← (number) 0 Adding number conversion cast (unumber) 4 in (word~) sin16s::$12 ← (word) sin16s::x5#0 >> (number) 4 Adding number conversion cast (unumber) 0 in (bool~) sin16s::$15 ← (byte) sin16s::isUpper#2 != (number) 0 +Adding number conversion cast (unumber) 0 in (bool~) memset::$0 ← (word) memset::num#2 > (number) 0 Adding number conversion cast (unumber) $80 in (byte) bitmap_init::bits#0 ← (number) $80 Adding number conversion cast (unumber) 1 in (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (number) 1 Adding number conversion cast (unumber) 0 in (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (number) 0 @@ -1969,8 +1985,8 @@ Inlining cast (byte) mulu16_sel::select#3 ← (unumber)(number) 0 Inlining cast (byte) mulu16_sel::select#4 ← (unumber)(number) 0 Inlining cast (signed word~) sin16s::$14 ← (signed word)(word) sin16s::usinx#1 Inlining cast (signed word~) sin16s::$19 ← (signed word)(word) sin16s::usinx#3 -Inlining cast (byte*~) memset::$0 ← (byte*)(void*) memset::str#2 -Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 +Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 +Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 Inlining cast (byte) bitmap_init::bits#0 ← (unumber)(number) $80 Inlining cast (byte) bitmap_init::bits#2 ← (unumber)(number) $80 Inlining cast (byte) memset::c#1 ← (unumber)(number) 0 @@ -2039,6 +2055,7 @@ Simplifying constant integer cast 0 Simplifying constant integer cast 0 Simplifying constant integer cast 4 Simplifying constant integer cast 0 +Simplifying constant integer cast 0 Simplifying constant integer cast $80 Simplifying constant integer cast 1 Simplifying constant integer cast 0 @@ -2115,6 +2132,7 @@ Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 4 Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) $80 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 0 @@ -2175,9 +2193,10 @@ Inversing boolean not [121] (bool~) mul16s::$6 ← (signed word) mul16s::b#2 >= Inversing boolean not [189] (bool~) sin16s::$1 ← (dword) sin16s::x#3 < (dword) PI_u4f28#0 from [188] (bool~) sin16s::$0 ← (dword) sin16s::x#3 >= (dword) PI_u4f28#0 Inversing boolean not [193] (bool~) sin16s::$3 ← (dword) sin16s::x#4 < (dword) PI_HALF_u4f28#0 from [192] (bool~) sin16s::$2 ← (dword) sin16s::x#4 >= (dword) PI_HALF_u4f28#0 Inversing boolean not [252] (bool~) sin16s::$16 ← (byte) sin16s::isUpper#2 == (byte) 0 from [251] (bool~) sin16s::$15 ← (byte) sin16s::isUpper#2 != (byte) 0 -Inversing boolean not [309] (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits#1 != (byte) 0 from [308] (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (byte) 0 -Inversing boolean not [329] (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte) 7 from [328] (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte) 7 -Inversing boolean not [476] (bool~) render_sine::$8 ← (word) render_sine::xpos#1 != (word) $140 from [475] (bool~) render_sine::$7 ← (word) render_sine::xpos#1 == (word) $140 +Inversing boolean not [281] (bool~) memset::$1 ← (word) memset::num#2 <= (byte) 0 from [280] (bool~) memset::$0 ← (word) memset::num#2 > (byte) 0 +Inversing boolean not [313] (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits#1 != (byte) 0 from [312] (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (byte) 0 +Inversing boolean not [333] (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte) 7 from [332] (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte) 7 +Inversing boolean not [480] (bool~) render_sine::$8 ← (word) render_sine::xpos#1 != (word) $140 from [479] (bool~) render_sine::$7 ← (word) render_sine::xpos#1 == (word) $140 Successful SSA optimization Pass2UnaryNotSimplification Alias (word) divr16u::rem#0 = (word~) divr16u::$0 (word) divr16u::rem#7 Alias (word) divr16u::dividend#0 = (word~) divr16u::$6 (word) divr16u::dividend#8 @@ -2269,8 +2288,11 @@ Alias (signed word) sin16s::sinx#1 = (signed word~) sin16s::$20 Alias (dword) mul16u::return#3 = (dword) mul16u::return#6 Alias (byte) mulu16_sel::select#5 = (byte) mulu16_sel::select#6 Alias (word) mulu16_sel::return#12 = (word) mulu16_sel::return#5 (word~) mulu16_sel::$2 (word) mulu16_sel::return#6 -Alias (byte*) memset::end#0 = (byte*~) memset::$1 -Alias (void*) memset::return#0 = (void*) memset::str#3 (void*) memset::str#4 (void*) memset::return#4 (void*) memset::return#1 +Alias (void*) memset::return#0 = (void*) memset::str#2 (void*) memset::return#4 (void*) memset::return#1 +Alias (void*) memset::str#3 = (void*) memset::str#4 +Alias (word) memset::num#2 = (word) memset::num#3 +Alias (byte) memset::c#3 = (byte) memset::c#4 +Alias (byte*) memset::end#0 = (byte*~) memset::$3 Alias (byte) bitmap_init::x#2 = (byte) bitmap_init::x#4 Alias (byte*) bitmap_init::gfx#4 = (byte*) bitmap_init::gfx#5 Alias (byte*) bitmap_gfx#28 = (byte*) bitmap_gfx#29 @@ -2345,7 +2367,7 @@ Self Phi Eliminated (word) sin16s_gen2::wavelength#2 Self Phi Eliminated (word) rem16u#16 Self Phi Eliminated (byte) memset::c#2 Self Phi Eliminated (byte*) memset::end#1 -Self Phi Eliminated (void*) memset::return#0 +Self Phi Eliminated (void*) memset::str#5 Self Phi Eliminated (byte*) bitmap_init::gfx#2 Self Phi Eliminated (byte*) bitmap_gfx#22 Self Phi Eliminated (byte*) bitmap_screen#21 @@ -2377,7 +2399,7 @@ Identical Phi Values (word) rem16u#16 (word) rem16u#15 Identical Phi Values (dword) sin16s::x#3 (dword) sin16s::x#0 Identical Phi Values (byte) memset::c#2 (byte) memset::c#3 Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0 -Identical Phi Values (void*) memset::return#0 (void*) memset::str#2 +Identical Phi Values (void*) memset::str#5 (void*) memset::str#3 Identical Phi Values (byte*) bitmap_init::gfx#1 (byte*) bitmap_init::gfx#0 Identical Phi Values (byte*) bitmap_init::screen#1 (byte*) bitmap_init::screen#0 Identical Phi Values (byte*) bitmap_init::gfx#2 (byte*) bitmap_init::gfx#1 @@ -2402,7 +2424,9 @@ Identical Phi Values (byte*) bitmap_gfx#10 (byte*) bitmap_gfx#14 Identical Phi Values (byte*) bitmap_screen#10 (byte*) bitmap_screen#13 Identical Phi Values (word) rem16u#10 (word) rem16u#18 Successful SSA optimization Pass2IdenticalPhiElimination -Identified duplicate assignment right side [327] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 +Identical Phi Values (void*) memset::return#0 (void*) memset::str#3 +Successful SSA optimization Pass2IdenticalPhiElimination +Identified duplicate assignment right side [331] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 Successful SSA optimization Pass2DuplicateRValueIdentification Simple Condition (bool~) divr16u::$4 [27] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 Simple Condition (bool~) divr16u::$9 [35] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 @@ -2415,21 +2439,22 @@ Simple Condition (bool~) sin16s_gen2::$10 [182] if((word) sin16s_gen2::i#1<(word Simple Condition (bool~) sin16s::$1 [190] if((dword) sin16s::x#0<(dword) PI_u4f28#0) goto sin16s::@1 Simple Condition (bool~) sin16s::$3 [194] if((dword) sin16s::x#4<(dword) PI_HALF_u4f28#0) goto sin16s::@2 Simple Condition (bool~) sin16s::$16 [253] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@3 -Simple Condition (bool~) memset::$2 [288] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -Simple Condition (bool~) bitmap_init::$1 [310] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 -Simple Condition (bool~) bitmap_init::$2 [314] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 -Simple Condition (bool~) bitmap_init::$9 [330] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 -Simple Condition (bool~) bitmap_init::$11 [334] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 -Simple Condition (bool~) render_sine::$8 [477] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@2 -Simple Condition (bool~) render_sine::$9 [481] if((word) render_sine::sin_idx#1<(word) SIN_SIZE#0) goto render_sine::@1 -Simple Condition (bool~) wrap_y::$1 [488] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 -Simple Condition (bool~) wrap_y::$2 [493] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@8 +Simple Condition (bool~) memset::$1 [282] if((word) memset::num#2<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [294] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 +Simple Condition (bool~) bitmap_init::$1 [314] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$2 [318] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$9 [334] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 +Simple Condition (bool~) bitmap_init::$11 [338] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 +Simple Condition (bool~) render_sine::$8 [481] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@2 +Simple Condition (bool~) render_sine::$9 [485] if((word) render_sine::sin_idx#1<(word) SIN_SIZE#0) goto render_sine::@1 +Simple Condition (bool~) wrap_y::$1 [492] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 +Simple Condition (bool~) wrap_y::$2 [497] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@8 Successful SSA optimization Pass2ConditionalJumpSimplification Constant right-side identified [220] (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6 -Constant right-side identified [297] (byte[$100]) bitmap_plot_ylo#0 ← { fill( $100, 0) } -Constant right-side identified [298] (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } -Constant right-side identified [299] (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } -Constant right-side identified [371] (signed word[$200]) sin#0 ← { fill( $200, 0) } +Constant right-side identified [301] (byte[$100]) bitmap_plot_ylo#0 ← { fill( $100, 0) } +Constant right-side identified [302] (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } +Constant right-side identified [303] (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } +Constant right-side identified [375] (signed word[$200]) sin#0 ← { fill( $200, 0) } Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) PROCPORT_DDR#0 = (byte*) 0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -2509,24 +2534,24 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const word) divr16u::divisor#0 = div32u16u::divisor#0 Constant (const word) divr16u::divisor#1 = div32u16u::divisor#0 Successful SSA optimization Pass2ConstantIdentification -Constant value identified (void*)bitmap_screen#1 in [346] (void*) memset::str#0 ← (void*)(const byte*) bitmap_screen#1 -Constant value identified (void*)bitmap_gfx#1 in [352] (void*) memset::str#1 ← (void*)(const byte*) bitmap_gfx#1 -Constant value identified (word)main::vicSelectGfxBank1_gfx#0 in [386] (word~) main::vicSelectGfxBank1_toDd001_$0#0 ← (word)(const byte*) main::vicSelectGfxBank1_gfx#0 -Constant value identified (word)main::toD0181_screen#0 in [401] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 -Constant value identified (word)main::toD0181_gfx#0 in [405] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 +Constant value identified (void*)bitmap_screen#1 in [350] (void*) memset::str#0 ← (void*)(const byte*) bitmap_screen#1 +Constant value identified (void*)bitmap_gfx#1 in [356] (void*) memset::str#1 ← (void*)(const byte*) bitmap_gfx#1 +Constant value identified (word)main::vicSelectGfxBank1_gfx#0 in [390] (word~) main::vicSelectGfxBank1_toDd001_$0#0 ← (word)(const byte*) main::vicSelectGfxBank1_gfx#0 +Constant value identified (word)main::toD0181_screen#0 in [405] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 +Constant value identified (word)main::toD0181_gfx#0 in [409] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 Successful SSA optimization Pass2ConstantValues -if() condition always true - replacing block destination [436] if(true) goto main::@2 +if() condition always true - replacing block destination [440] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs Resolved ranged next value [40] divr16u::i#1 ← ++ divr16u::i#2 to ++ Resolved ranged comparison value [42] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 -Resolved ranged next value [312] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ -Resolved ranged comparison value [314] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 -Resolved ranged next value [332] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ -Resolved ranged comparison value [334] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 -Simplifying expression containing zero bitmap_clear::$0 in [344] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0 +Resolved ranged next value [316] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ +Resolved ranged comparison value [318] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 +Resolved ranged next value [336] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ +Resolved ranged comparison value [338] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 +Simplifying expression containing zero bitmap_clear::$0 in [348] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0 Successful SSA optimization PassNSimplifyExpressionWithZero -Eliminating unused variable (void*) memset::return#2 and assignment [167] (void*) memset::return#2 ← (void*) memset::str#2 -Eliminating unused variable (void*) memset::return#3 and assignment [170] (void*) memset::return#3 ← (void*) memset::str#2 +Eliminating unused variable (void*) memset::return#2 and assignment [168] (void*) memset::return#2 ← (void*) memset::str#3 +Eliminating unused variable (void*) memset::return#3 and assignment [171] (void*) memset::return#3 ← (void*) memset::str#3 Eliminating unused constant (const byte) bitmap_clear::bgcol#0 Eliminating unused constant (const word) rem16u#0 Eliminating unused constant (const byte*) bitmap_screen#0 @@ -2556,8 +2581,8 @@ Successful SSA optimization Pass2AliasElimination Constant right-side identified [18] (word) divr16u::dividend#1 ← > (const dword) div32u16u::dividend#0 Constant right-side identified [22] (word) divr16u::dividend#2 ← < (const dword) div32u16u::dividend#0 Constant right-side identified [58] (signed word) sin16s_gen2::ampl#0 ← (const signed word) sin16s_gen2::max#0 - (const signed word) sin16s_gen2::min#0 -Constant right-side identified [162] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 -Constant right-side identified [181] (byte~) main::$0 ← (const byte) VIC_BMM#0 | (const byte) VIC_DEN#0 +Constant right-side identified [163] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 +Constant right-side identified [182] (byte~) main::$0 ← (const byte) VIC_BMM#0 | (const byte) VIC_DEN#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) divr16u::dividend#1 = >div32u16u::dividend#0 Constant (const word) divr16u::dividend#2 = <div32u16u::dividend#0 @@ -2588,10 +2613,10 @@ Successful SSA optimization Pass2EliminateUnusedBlocks Alias (dword) mul16s::m#4 = (dword) mul16s::m#5 Successful SSA optimization Pass2AliasElimination Constant right-side identified [51] (signed word~) sin16s_gen2::$1 ← (const signed word) sin16s_gen2::ampl#0 >> (signed byte) 1 -Constant right-side identified [166] (byte~) main::$1 ← (const byte) main::$0 | (const byte) VIC_RSEL#0 -Constant right-side identified [170] (byte~) main::vicSelectGfxBank1_toDd001_$1#0 ← > (const word) main::vicSelectGfxBank1_toDd001_$0#0 -Constant right-side identified [175] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff -Constant right-side identified [178] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 +Constant right-side identified [167] (byte~) main::$1 ← (const byte) main::$0 | (const byte) VIC_RSEL#0 +Constant right-side identified [171] (byte~) main::vicSelectGfxBank1_toDd001_$1#0 ← > (const word) main::vicSelectGfxBank1_toDd001_$0#0 +Constant right-side identified [176] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff +Constant right-side identified [179] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) mul16u::b#0 = (word)mul16s::b#0 Constant (const word) mul16s::$10 = (word)mul16s::b#0 @@ -2602,10 +2627,10 @@ Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&$3fff Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0 Successful SSA optimization Pass2ConstantIdentification Constant right-side identified [48] (signed word) sin16s_gen2::offs#0 ← (const signed word) sin16s_gen2::min#0 + (const signed word) sin16s_gen2::$1 -Constant right-side identified [162] (byte~) main::$2 ← (const byte) main::$1 | (byte) 3 -Constant right-side identified [165] (byte~) main::vicSelectGfxBank1_toDd001_$2#0 ← (const byte) main::vicSelectGfxBank1_toDd001_$1#0 / (byte) $40 -Constant right-side identified [169] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 -Constant right-side identified [171] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 +Constant right-side identified [163] (byte~) main::$2 ← (const byte) main::$1 | (byte) 3 +Constant right-side identified [166] (byte~) main::vicSelectGfxBank1_toDd001_$2#0 ← (const byte) main::vicSelectGfxBank1_toDd001_$1#0 / (byte) $40 +Constant right-side identified [170] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 +Constant right-side identified [172] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const signed word) sin16s_gen2::offs#0 = sin16s_gen2::min#0+sin16s_gen2::$1 Constant (const byte) main::$2 = main::$1|3 @@ -2617,7 +2642,7 @@ Simplifying constant evaluating to zero (const signed word) sin16s_gen2::min#0+( Simplifying constant evaluating to zero (const byte) main::vicSelectGfxBank1_toDd001_$1#0/(byte) $40 in Successful SSA optimization PassNSimplifyConstantZero Simplifying expression containing zero sin16s_gen2::$7 in [62] (signed word~) sin16s_gen2::$8 ← (const signed word) sin16s_gen2::offs#0 + (signed word~) sin16s_gen2::$7 -Simplifying expression containing zero 3 in [166] (byte) main::vicSelectGfxBank1_toDd001_return#0 ← (byte) 3 ^ (const byte) main::vicSelectGfxBank1_toDd001_$2#0 +Simplifying expression containing zero 3 in [167] (byte) main::vicSelectGfxBank1_toDd001_return#0 ← (byte) 3 ^ (const byte) main::vicSelectGfxBank1_toDd001_$2#0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const signed word) sin16s_gen2::$1 Eliminating unused constant (const signed word) sin16s_gen2::offs#0 @@ -2630,27 +2655,27 @@ Eliminating unused constant (const byte*) main::vicSelectGfxBank1_gfx#0 Successful SSA optimization PassNEliminateUnusedVars Alias (signed word~) sin16s_gen2::$8 = (signed word~) sin16s_gen2::$7 Successful SSA optimization Pass2AliasElimination -Constant right-side identified [166] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 -Constant right-side identified [167] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f +Constant right-side identified [167] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 +Constant right-side identified [168] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::vicSelectGfxBank1_toDd001_return#0 = 3 Constant (const byte) main::toD0181_$3#0 = >main::toD0181_$2#0 Constant (const byte) main::toD0181_$7#0 = main::toD0181_$6#0&$f Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [164] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 +Constant right-side identified [165] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0 Successful SSA optimization Pass2ConstantIdentification Inlining Noop Cast [60] (signed word~) sin16s_gen2::$8 ← (signed word)(word~) sin16s_gen2::$6 keeping sin16s_gen2::$8 -Inlining Noop Cast [151] (byte*) bitmap_plot::plotter#0 ← (byte*)(word~) bitmap_plot::$3 keeping bitmap_plot::plotter#0 +Inlining Noop Cast [152] (byte*) bitmap_plot::plotter#0 ← (byte*)(word~) bitmap_plot::$3 keeping bitmap_plot::plotter#0 Successful SSA optimization Pass2NopCastInlining Inlining Noop Cast [101] (signed word) sin16s::sinx#0 ← (signed word)(word) sin16s::usinx#1 keeping sin16s::usinx#1 Inlining Noop Cast [105] (signed word~) sin16s::$19 ← (signed word)(word) sin16s::usinx#1 keeping sin16s::usinx#1 -Inlining Noop Cast [118] (byte*~) memset::$0 ← (byte*)(void*) memset::str#2 keeping memset::str#2 -Inlining Noop Cast [120] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 keeping memset::str#2 +Inlining Noop Cast [119] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 keeping memset::str#3 +Inlining Noop Cast [121] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 keeping memset::str#3 Successful SSA optimization Pass2NopCastInlining -Rewriting multiplication to use shift [171] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 * (const byte) SIZEOF_SIGNED_WORD -Rewriting multiplication to use shift [181] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 * (const byte) SIZEOF_SIGNED_WORD +Rewriting multiplication to use shift [172] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 * (const byte) SIZEOF_SIGNED_WORD +Rewriting multiplication to use shift [182] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 * (const byte) SIZEOF_SIGNED_WORD Successful SSA optimization Pass2MultiplyToShiftRewriting Inlining constant with var siblings (const word) divr16u::quotient#0 Inlining constant with var siblings (const byte) divr16u::i#0 @@ -2754,7 +2779,7 @@ Added new block during phi lifting sin16s::@13(between sin16s and sin16s::@1) Fixing phi predecessor for sin16s::isUpper#2 to new block ( sin16s -> sin16s::@13 ) during phi lifting. Added new block during phi lifting sin16s::@14(between sin16s::@1 and sin16s::@2) Added new block during phi lifting sin16s::@15(between sin16s::@12 and sin16s::@3) -Added new block during phi lifting memset::@4(between memset::@1 and memset::@1) +Added new block during phi lifting memset::@6(between memset::@4 and memset::@4) Added new block during phi lifting bitmap_init::@9(between bitmap_init::@2 and bitmap_init::@1) Added new block during phi lifting bitmap_init::@10(between bitmap_init::@1 and bitmap_init::@2) Added new block during phi lifting bitmap_init::@11(between bitmap_init::@6 and bitmap_init::@5) @@ -2787,7 +2812,7 @@ Adding NOP phi() at start of div32u16u Adding NOP phi() at start of bitmap_clear Adding NOP phi() at start of bitmap_clear::@1 Adding NOP phi() at start of bitmap_clear::@2 -Adding NOP phi() at start of memset::@2 +Adding NOP phi() at start of memset::@1 Adding NOP phi() at start of bitmap_init Adding NOP phi() at start of bitmap_init::@3 Adding NOP phi() at start of bitmap_init::@4 @@ -2858,14 +2883,14 @@ Coalesced [245] divr16u::i#7 ← divr16u::i#1 Coalesced [246] divr16u::rem#17 ← divr16u::rem#6 Coalesced [247] divr16u::return#7 ← divr16u::quotient#1 Coalesced [248] divr16u::rem#15 ← divr16u::rem#0 -Coalesced [264] memset::dst#4 ← memset::dst#1 -Coalesced [284] bitmap_init::yoffs#7 ← bitmap_init::yoffs#1 -Coalesced [289] bitmap_init::y#5 ← bitmap_init::y#1 -Coalesced [290] bitmap_init::yoffs#5 ← bitmap_init::yoffs#4 -Coalesced (already) [291] bitmap_init::yoffs#6 ← bitmap_init::yoffs#2 -Coalesced [292] bitmap_init::bits#5 ← bitmap_init::bits#4 -Coalesced [293] bitmap_init::x#5 ← bitmap_init::x#1 -Coalesced [294] bitmap_init::bits#6 ← bitmap_init::bits#1 +Coalesced [265] memset::dst#4 ← memset::dst#1 +Coalesced [285] bitmap_init::yoffs#7 ← bitmap_init::yoffs#1 +Coalesced [290] bitmap_init::y#5 ← bitmap_init::y#1 +Coalesced [291] bitmap_init::yoffs#5 ← bitmap_init::yoffs#4 +Coalesced (already) [292] bitmap_init::yoffs#6 ← bitmap_init::yoffs#2 +Coalesced [293] bitmap_init::bits#5 ← bitmap_init::bits#4 +Coalesced [294] bitmap_init::x#5 ← bitmap_init::x#1 +Coalesced [295] bitmap_init::bits#6 ← bitmap_init::bits#1 Coalesced down to 30 phi equivalence classes Culled Empty Block (label) @6 Culled Empty Block (label) @17 @@ -2889,8 +2914,8 @@ Culled Empty Block (label) divr16u::@8 Culled Empty Block (label) divr16u::@10 Culled Empty Block (label) divr16u::@9 Culled Empty Block (label) bitmap_clear::@2 -Culled Empty Block (label) memset::@2 -Culled Empty Block (label) memset::@4 +Culled Empty Block (label) memset::@1 +Culled Empty Block (label) memset::@6 Culled Empty Block (label) bitmap_init::@3 Culled Empty Block (label) bitmap_init::@4 Culled Empty Block (label) bitmap_init::@11 @@ -2912,6 +2937,8 @@ Renumbering block sin16s::@11 to sin16s::@10 Renumbering block sin16s::@12 to sin16s::@11 Renumbering block sin16s::@15 to sin16s::@12 Renumbering block mulu16_sel::@2 to mulu16_sel::@1 +Renumbering block memset::@2 to memset::@1 +Renumbering block memset::@4 to memset::@2 Renumbering block bitmap_init::@5 to bitmap_init::@3 Renumbering block bitmap_init::@6 to bitmap_init::@4 Renumbering block bitmap_init::@7 to bitmap_init::@5 @@ -3317,59 +3344,62 @@ bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 to:@return memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [189] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) + [189] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) [189] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 ) - [189] (void*) memset::str#2 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) - [190] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 - [191] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + [190] if((word) memset::num#2<=(byte) 0) goto memset::@return to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - [192] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) - [193] *((byte*) memset::dst#2) ← (byte) memset::c#3 - [194] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - [195] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 +memset::@1: scope:[memset] from memset + [191] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 + [192] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + to:memset::@2 +memset::@2: scope:[memset] from memset::@1 memset::@2 + [193] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 ) + [194] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [195] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [196] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 to:memset::@return -memset::@return: scope:[memset] from memset::@1 - [196] return +memset::@return: scope:[memset] from memset memset::@2 + [197] return to:@return bitmap_init: scope:[bitmap_init] from main::@3 - [197] phi() + [198] phi() to:bitmap_init::@1 bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2 - [198] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) - [198] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) - [199] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 - [200] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 - [201] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 + [199] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) + [199] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) + [200] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 + [201] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 + [202] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 to:bitmap_init::@2 bitmap_init::@6: scope:[bitmap_init] from bitmap_init::@1 - [202] phi() + [203] phi() to:bitmap_init::@2 bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6 - [203] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) - [204] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 - [205] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 + [204] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) + [205] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 + [206] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 to:bitmap_init::@3 bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4 - [206] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) - [206] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) - [207] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 - [208] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 - [209] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 - [210] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 - [211] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 - [212] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 - [213] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 + [207] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) + [207] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) + [208] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 + [209] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 + [210] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 + [211] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 + [212] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 + [213] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 + [214] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 to:bitmap_init::@5 bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@3 - [214] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 + [215] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 to:bitmap_init::@4 bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 - [215] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) - [216] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 - [217] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 + [216] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) + [217] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 + [218] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 to:bitmap_init::@return bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 - [218] return + [219] return to:@return @@ -3502,7 +3532,7 @@ VARIABLE REGISTER WEIGHTS (byte) main::vicSelectGfxBank1_toDd001_return (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (byte) memset::c -(byte) memset::c#3 1.5714285714285714 +(byte) memset::c#3 1.375 (byte*) memset::dst (byte*) memset::dst#1 16.5 (byte*) memset::dst#2 17.5 @@ -3513,7 +3543,7 @@ VARIABLE REGISTER WEIGHTS (word) memset::num#2 2.0 (void*) memset::return (void*) memset::str -(void*) memset::str#2 +(void*) memset::str#3 (signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) (word~) mul16s::$16 4.0 (word~) mul16s::$9 4.0 @@ -3688,8 +3718,8 @@ Initial phi equivalence classes [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] [ divr16u::i#2 divr16u::i#1 ] -[ memset::str#2 ] [ memset::num#2 ] +[ memset::str#3 ] [ memset::c#3 ] [ memset::dst#2 memset::dst#3 memset::dst#1 ] [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] @@ -3779,8 +3809,8 @@ Complete equivalence classes [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] [ divr16u::i#2 divr16u::i#1 ] -[ memset::str#2 ] [ memset::num#2 ] +[ memset::str#3 ] [ memset::c#3 ] [ memset::dst#2 memset::dst#3 memset::dst#1 ] [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] @@ -3869,8 +3899,8 @@ Allocated zp ZP_WORD:47 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u: Allocated zp ZP_WORD:49 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] Allocated zp ZP_WORD:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] Allocated zp ZP_BYTE:53 [ divr16u::i#2 divr16u::i#1 ] -Allocated zp ZP_WORD:54 [ memset::str#2 ] -Allocated zp ZP_WORD:56 [ memset::num#2 ] +Allocated zp ZP_WORD:54 [ memset::num#2 ] +Allocated zp ZP_WORD:56 [ memset::str#3 ] Allocated zp ZP_BYTE:58 [ memset::c#3 ] Allocated zp ZP_WORD:59 [ memset::dst#2 memset::dst#3 memset::dst#1 ] Allocated zp ZP_BYTE:61 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] @@ -4043,7 +4073,7 @@ main: { lda #toD0181_return sta D018 // [14] call bitmap_init - // [197] phi from main::@3 to bitmap_init [phi:main::@3->bitmap_init] + // [198] phi from main::@3 to bitmap_init [phi:main::@3->bitmap_init] bitmap_init_from_b3: jsr bitmap_init // [15] phi from main::@3 to main::@4 [phi:main::@3->main::@4] @@ -5421,16 +5451,16 @@ bitmap_clear: { // [189] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuz1=vbuc1 lda #col sta memset.c - // [189] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 - lda #<$3e8 - sta memset.num - lda #>$3e8 - sta memset.num+1 - // [189] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + // [189] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 + // [189] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#2] -- vwuz1=vwuc1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 jsr memset // [186] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] b1_from_bitmap_clear: @@ -5443,16 +5473,16 @@ bitmap_clear: { // [189] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuz1=vbuc1 lda #0 sta memset.c - // [189] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 - lda #<$1f40 - sta memset.num - lda #>$1f40 - sta memset.num+1 - // [189] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + // [189] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1 lda #<BITMAP sta memset.str lda #>BITMAP sta memset.str+1 + // [189] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#2] -- vwuz1=vwuc1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 jsr memset jmp breturn // bitmap_clear::@return @@ -5462,14 +5492,22 @@ bitmap_clear: { } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage($36) str, byte zeropage($3a) c, word zeropage($38) num) +// memset(void* zeropage($38) str, byte zeropage($3a) c, word zeropage($36) num) memset: { .label end = $bb .label dst = $3b - .label str = $36 - .label num = $38 + .label num = $36 + .label str = $38 .label c = $3a - // [190] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz3 + // [190] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 + lda num + beq breturn + lda num+1 + beq breturn + jmp b1 + // memset::@1 + b1: + // [191] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz3 lda str clc adc num @@ -5477,38 +5515,38 @@ memset: { lda str+1 adc num+1 sta end+1 - // [191] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 -- pbuz1=pbuz2 + // [192] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 -- pbuz1=pbuz2 lda str sta dst lda str+1 sta dst+1 - // [192] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - b1_from_memset: - b1_from_b1: - // [192] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - jmp b1 - // memset::@1 - b1: - // [193] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuz2 + // [193] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + b2_from_b1: + b2_from_b2: + // [193] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + jmp b2 + // memset::@2 + b2: + // [194] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuz2 lda c ldy #0 sta (dst),y - // [194] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [195] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [195] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [196] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1_from_b1 + bne b2_from_b2 lda dst cmp end - bne b1_from_b1 + bne b2_from_b2 jmp breturn // memset::@return breturn: - // [196] return + // [197] return rts } // bitmap_init @@ -5522,103 +5560,103 @@ bitmap_init: { .label x = $3e .label y = $3f .label yoffs = $40 - // [198] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + // [199] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] b1_from_bitmap_init: - // [198] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuz1=vbuc1 + // [199] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuz1=vbuc1 lda #0 sta x - // [198] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuz1=vbuc1 + // [199] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuz1=vbuc1 lda #$80 sta bits jmp b1 - // [198] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + // [199] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] b1_from_b2: - // [198] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - // [198] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + // [199] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + // [199] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy jmp b1 // bitmap_init::@1 b1: - // [199] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuz1=vbuz2 + // [200] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuz1=vbuz2 lda bits ldy x sta bitmap_plot_bit,y - // [200] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuz1=vbuz1_ror_1 + // [201] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuz1=vbuz1_ror_1 lsr bits - // [201] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuz1_neq_0_then_la1 + // [202] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuz1_neq_0_then_la1 lda bits cmp #0 bne b6_from_b1 - // [203] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + // [204] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] b2_from_b1: - // [203] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuz1=vbuc1 + // [204] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuz1=vbuc1 lda #$80 sta bits jmp b2 - // [202] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + // [203] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] b6_from_b1: jmp b6 // bitmap_init::@6 b6: - // [203] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + // [204] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] b2_from_b6: - // [203] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + // [204] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy jmp b2 // bitmap_init::@2 b2: - // [204] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuz1=_inc_vbuz1 + // [205] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuz1=_inc_vbuz1 inc x - // [205] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuz1_neq_0_then_la1 + // [206] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuz1_neq_0_then_la1 lda x cmp #0 bne b1_from_b2 - // [206] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + // [207] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] b3_from_b2: - // [206] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + // [207] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #<BITMAP sta yoffs lda #>BITMAP sta yoffs+1 - // [206] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuz1=vbuc1 + // [207] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuz1=vbuc1 lda #0 sta y jmp b3 - // [206] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + // [207] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] b3_from_b4: - // [206] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - // [206] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + // [207] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + // [207] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy jmp b3 // bitmap_init::@3 b3: - // [207] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 + // [208] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 lda #7 and y sta _7 - // [208] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuz1=_lo_pbuz2 + // [209] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuz1=_lo_pbuz2 lda yoffs sta _4 - // [209] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuz1=vbuz2_bor_vbuz3 + // [210] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuz1=vbuz2_bor_vbuz3 lda _7 ora _4 sta _5 - // [210] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuz1=vbuz2 + // [211] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuz1=vbuz2 lda _5 ldy y sta bitmap_plot_ylo,y - // [211] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuz1=_hi_pbuz2 + // [212] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuz1=_hi_pbuz2 lda yoffs+1 sta _6 - // [212] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuz1=vbuz2 + // [213] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuz1=vbuz2 lda _6 ldy y sta bitmap_plot_yhi,y - // [213] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + // [214] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp _7 bne b4_from_b3 jmp b5 // bitmap_init::@5 b5: - // [214] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + // [215] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda yoffs adc #<$28*8 @@ -5626,23 +5664,23 @@ bitmap_init: { lda yoffs+1 adc #>$28*8 sta yoffs+1 - // [215] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + // [216] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] b4_from_b3: b4_from_b5: - // [215] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + // [216] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy jmp b4 // bitmap_init::@4 b4: - // [216] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuz1=_inc_vbuz1 + // [217] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuz1=_inc_vbuz1 inc y - // [217] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuz1_neq_0_then_la1 + // [218] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuz1_neq_0_then_la1 lda y cmp #0 bne b3_from_b4 jmp breturn // bitmap_init::@return breturn: - // [218] return + // [219] return rts } // File Data @@ -5765,13 +5803,14 @@ Statement [172] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ div Statement [176] if((word) divr16u::rem#6<(const word) SIN_SIZE#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:2::sin16s_gen2:18::div32u16u:68::divr16u:157 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:2::sin16s_gen2:18::div32u16u:68::divr16u:161 [ div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a Statement [178] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) SIN_SIZE#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:2::sin16s_gen2:18::div32u16u:68::divr16u:157 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:2::sin16s_gen2:18::div32u16u:68::divr16u:161 [ div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a Statement [182] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:2::sin16s_gen2:18::div32u16u:68::divr16u:157 [ divr16u::return#0 rem16u#1 ] main:2::sin16s_gen2:18::div32u16u:68::divr16u:161 [ div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a -Statement [190] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:2::bitmap_clear:16::memset:185 [ memset::str#2 memset::c#3 memset::end#0 ] main:2::bitmap_clear:16::memset:187 [ memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [190] if((word) memset::num#2<=(byte) 0) goto memset::@return [ memset::num#2 memset::str#3 memset::c#3 ] ( main:2::bitmap_clear:16::memset:185 [ memset::num#2 memset::str#3 memset::c#3 ] main:2::bitmap_clear:16::memset:187 [ memset::num#2 memset::str#3 memset::c#3 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:58 [ memset::c#3 ] -Statement [191] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:2::bitmap_clear:16::memset:185 [ memset::c#3 memset::end#0 memset::dst#3 ] main:2::bitmap_clear:16::memset:187 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a -Statement [193] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:2::bitmap_clear:16::memset:185 [ memset::c#3 memset::end#0 memset::dst#2 ] main:2::bitmap_clear:16::memset:187 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [191] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 [ memset::str#3 memset::c#3 memset::end#0 ] ( main:2::bitmap_clear:16::memset:185 [ memset::str#3 memset::c#3 memset::end#0 ] main:2::bitmap_clear:16::memset:187 [ memset::str#3 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [192] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:2::bitmap_clear:16::memset:185 [ memset::c#3 memset::end#0 memset::dst#3 ] main:2::bitmap_clear:16::memset:187 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [194] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:2::bitmap_clear:16::memset:185 [ memset::c#3 memset::end#0 memset::dst#2 ] main:2::bitmap_clear:16::memset:187 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:58 [ memset::c#3 ] -Statement [195] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:2::bitmap_clear:16::memset:185 [ memset::c#3 memset::end#0 memset::dst#1 ] main:2::bitmap_clear:16::memset:187 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a -Statement [214] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:2::bitmap_init:14 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a +Statement [196] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:2::bitmap_clear:16::memset:185 [ memset::c#3 memset::end#0 memset::dst#1 ] main:2::bitmap_clear:16::memset:187 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [215] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:2::bitmap_init:14 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:63 [ bitmap_init::y#2 bitmap_init::y#1 ] Statement [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [6] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2 [ ] ) always clobbers reg byte a @@ -5872,12 +5911,13 @@ Statement [172] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ div Statement [176] if((word) divr16u::rem#6<(const word) SIN_SIZE#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:2::sin16s_gen2:18::div32u16u:68::divr16u:157 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:2::sin16s_gen2:18::div32u16u:68::divr16u:161 [ div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a Statement [178] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) SIN_SIZE#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:2::sin16s_gen2:18::div32u16u:68::divr16u:157 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:2::sin16s_gen2:18::div32u16u:68::divr16u:161 [ div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a Statement [182] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:2::sin16s_gen2:18::div32u16u:68::divr16u:157 [ divr16u::return#0 rem16u#1 ] main:2::sin16s_gen2:18::div32u16u:68::divr16u:161 [ div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a -Statement [190] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:2::bitmap_clear:16::memset:185 [ memset::str#2 memset::c#3 memset::end#0 ] main:2::bitmap_clear:16::memset:187 [ memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a -Statement [191] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:2::bitmap_clear:16::memset:185 [ memset::c#3 memset::end#0 memset::dst#3 ] main:2::bitmap_clear:16::memset:187 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a -Statement [193] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:2::bitmap_clear:16::memset:185 [ memset::c#3 memset::end#0 memset::dst#2 ] main:2::bitmap_clear:16::memset:187 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y -Statement [195] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:2::bitmap_clear:16::memset:185 [ memset::c#3 memset::end#0 memset::dst#1 ] main:2::bitmap_clear:16::memset:187 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a -Statement [207] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ( main:2::bitmap_init:14 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ) always clobbers reg byte a -Statement [214] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:2::bitmap_init:14 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a +Statement [190] if((word) memset::num#2<=(byte) 0) goto memset::@return [ memset::num#2 memset::str#3 memset::c#3 ] ( main:2::bitmap_clear:16::memset:185 [ memset::num#2 memset::str#3 memset::c#3 ] main:2::bitmap_clear:16::memset:187 [ memset::num#2 memset::str#3 memset::c#3 ] ) always clobbers reg byte a +Statement [191] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 [ memset::str#3 memset::c#3 memset::end#0 ] ( main:2::bitmap_clear:16::memset:185 [ memset::str#3 memset::c#3 memset::end#0 ] main:2::bitmap_clear:16::memset:187 [ memset::str#3 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [192] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:2::bitmap_clear:16::memset:185 [ memset::c#3 memset::end#0 memset::dst#3 ] main:2::bitmap_clear:16::memset:187 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [194] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:2::bitmap_clear:16::memset:185 [ memset::c#3 memset::end#0 memset::dst#2 ] main:2::bitmap_clear:16::memset:187 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [196] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:2::bitmap_clear:16::memset:185 [ memset::c#3 memset::end#0 memset::dst#1 ] main:2::bitmap_clear:16::memset:187 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [208] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ( main:2::bitmap_init:14 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ) always clobbers reg byte a +Statement [215] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:2::bitmap_init:14 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a Potential registers zp ZP_WORD:2 [ render_sine::sin_idx#2 render_sine::sin_idx#1 ] : zp ZP_WORD:2 , Potential registers zp ZP_WORD:4 [ render_sine::xpos#3 render_sine::xpos#8 render_sine::xpos#1 ] : zp ZP_WORD:4 , Potential registers zp ZP_BYTE:6 [ bitmap_plot::y#2 bitmap_plot::y#0 bitmap_plot::y#1 ] : zp ZP_BYTE:6 , reg byte a , reg byte x , reg byte y , @@ -5901,8 +5941,8 @@ Potential registers zp ZP_WORD:47 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem# Potential registers zp ZP_WORD:49 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] : zp ZP_WORD:49 , Potential registers zp ZP_WORD:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] : zp ZP_WORD:51 , Potential registers zp ZP_BYTE:53 [ divr16u::i#2 divr16u::i#1 ] : zp ZP_BYTE:53 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:54 [ memset::str#2 ] : zp ZP_WORD:54 , -Potential registers zp ZP_WORD:56 [ memset::num#2 ] : zp ZP_WORD:56 , +Potential registers zp ZP_WORD:54 [ memset::num#2 ] : zp ZP_WORD:54 , +Potential registers zp ZP_WORD:56 [ memset::str#3 ] : zp ZP_WORD:56 , Potential registers zp ZP_BYTE:58 [ memset::c#3 ] : zp ZP_BYTE:58 , reg byte x , Potential registers zp ZP_WORD:59 [ memset::dst#2 memset::dst#3 memset::dst#1 ] : zp ZP_WORD:59 , Potential registers zp ZP_BYTE:61 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] : zp ZP_BYTE:61 , reg byte a , reg byte x , reg byte y , @@ -5980,36 +6020,36 @@ Uplift Scope [sin16s] 27.5: zp ZP_DWORD:36 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 Uplift Scope [mulu16_sel] 24: zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] 21: zp ZP_WORD:44 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] 4: zp ZP_WORD:131 [ mulu16_sel::return#0 ] 4: zp ZP_WORD:135 [ mulu16_sel::return#1 ] 4: zp ZP_WORD:139 [ mulu16_sel::return#2 ] 4: zp ZP_WORD:145 [ mulu16_sel::return#10 ] 4: zp ZP_WORD:149 [ mulu16_sel::return#11 ] 4: zp ZP_DWORD:161 [ mulu16_sel::$0 ] 4: zp ZP_DWORD:165 [ mulu16_sel::$1 ] 1.71: zp ZP_WORD:169 [ mulu16_sel::return#12 ] 0.33: zp ZP_BYTE:46 [ mulu16_sel::select#5 ] Uplift Scope [sin16s_gen2] 22: zp ZP_DWORD:106 [ sin16s_gen2::$5 ] 18.33: zp ZP_WORD:17 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] 11: zp ZP_WORD:110 [ sin16s_gen2::$8 ] 10.33: zp ZP_DWORD:11 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] 8.8: zp ZP_WORD:15 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] 0.87: zp ZP_DWORD:94 [ sin16s_gen2::step#0 ] Uplift Scope [mul16s] 22: zp ZP_DWORD:102 [ mul16s::return#2 ] 10: zp ZP_DWORD:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 ] 4.33: zp ZP_DWORD:120 [ mul16s::return#0 ] 4: zp ZP_WORD:116 [ mul16s::$9 ] 4: zp ZP_WORD:118 [ mul16s::$16 ] 2.6: zp ZP_WORD:100 [ mul16s::a#0 ] -Uplift Scope [memset] 38: zp ZP_WORD:59 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:187 [ memset::end#0 ] 2: zp ZP_WORD:56 [ memset::num#2 ] 1.57: zp ZP_BYTE:58 [ memset::c#3 ] 0: zp ZP_WORD:54 [ memset::str#2 ] +Uplift Scope [memset] 38: zp ZP_WORD:59 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:187 [ memset::end#0 ] 2: zp ZP_WORD:54 [ memset::num#2 ] 1.38: zp ZP_BYTE:58 [ memset::c#3 ] 0: zp ZP_WORD:56 [ memset::str#3 ] Uplift Scope [div32u16u] 4: zp ZP_DWORD:90 [ div32u16u::return#2 ] 4: zp ZP_WORD:177 [ div32u16u::quotient_lo#0 ] 1.33: zp ZP_DWORD:179 [ div32u16u::return#0 ] 0.8: zp ZP_WORD:173 [ div32u16u::quotient_hi#0 ] Uplift Scope [] 0.8: zp ZP_WORD:185 [ rem16u#1 ] Uplift Scope [bitmap_clear] Uplift Scope [main] -Uplifting [mul16u] best 31072 combination zp ZP_DWORD:27 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:31 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:25 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] zp ZP_WORD:23 [ mul16u::b#1 ] zp ZP_DWORD:112 [ mul16u::return#2 ] zp ZP_DWORD:157 [ mul16u::return#3 ] -Uplifting [wrap_y] best 30889 combination zp ZP_WORD:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#0 wrap_y::y#1 wrap_y::y#2 wrap_y::y#3 ] reg byte a [ wrap_y::return#0 ] reg byte a [ wrap_y::return#1 ] reg byte a [ wrap_y::return#2 ] -Uplifting [divr16u] best 30679 combination zp ZP_WORD:47 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:49 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:171 [ divr16u::return#2 ] zp ZP_WORD:175 [ divr16u::return#3 ] -Uplifting [render_sine] best 30599 combination zp ZP_WORD:66 [ render_sine::$10 ] zp ZP_WORD:68 [ render_sine::$0 ] zp ZP_WORD:70 [ render_sine::sin_val#0 ] zp ZP_WORD:74 [ render_sine::$11 ] zp ZP_WORD:76 [ render_sine::$3 ] zp ZP_WORD:78 [ render_sine::sin2_val#0 ] zp ZP_WORD:4 [ render_sine::xpos#3 render_sine::xpos#8 render_sine::xpos#1 ] zp ZP_WORD:2 [ render_sine::sin_idx#2 render_sine::sin_idx#1 ] reg byte x [ render_sine::ypos#0 ] reg byte x [ render_sine::ypos2#0 ] -Uplifting [bitmap_init] best 30089 combination zp ZP_WORD:64 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp ZP_BYTE:191 [ bitmap_init::$5 ] zp ZP_BYTE:192 [ bitmap_init::$6 ] zp ZP_BYTE:189 [ bitmap_init::$7 ] +Uplifting [mul16u] best 31086 combination zp ZP_DWORD:27 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:31 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:25 [ mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] zp ZP_WORD:23 [ mul16u::b#1 ] zp ZP_DWORD:112 [ mul16u::return#2 ] zp ZP_DWORD:157 [ mul16u::return#3 ] +Uplifting [wrap_y] best 30903 combination zp ZP_WORD:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#0 wrap_y::y#1 wrap_y::y#2 wrap_y::y#3 ] reg byte a [ wrap_y::return#0 ] reg byte a [ wrap_y::return#1 ] reg byte a [ wrap_y::return#2 ] +Uplifting [divr16u] best 30693 combination zp ZP_WORD:47 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:49 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:171 [ divr16u::return#2 ] zp ZP_WORD:175 [ divr16u::return#3 ] +Uplifting [render_sine] best 30613 combination zp ZP_WORD:66 [ render_sine::$10 ] zp ZP_WORD:68 [ render_sine::$0 ] zp ZP_WORD:70 [ render_sine::sin_val#0 ] zp ZP_WORD:74 [ render_sine::$11 ] zp ZP_WORD:76 [ render_sine::$3 ] zp ZP_WORD:78 [ render_sine::sin2_val#0 ] zp ZP_WORD:4 [ render_sine::xpos#3 render_sine::xpos#8 render_sine::xpos#1 ] zp ZP_WORD:2 [ render_sine::sin_idx#2 render_sine::sin_idx#1 ] reg byte x [ render_sine::ypos#0 ] reg byte x [ render_sine::ypos2#0 ] +Uplifting [bitmap_init] best 30103 combination zp ZP_WORD:64 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp ZP_BYTE:191 [ bitmap_init::$5 ] zp ZP_BYTE:192 [ bitmap_init::$6 ] zp ZP_BYTE:189 [ bitmap_init::$7 ] Limited combination testing to 100 combinations of 15360 possible. -Uplifting [bitmap_plot] best 30022 combination reg byte x [ bitmap_plot::y#2 bitmap_plot::y#0 bitmap_plot::y#1 ] zp ZP_WORD:7 [ bitmap_plot::x#2 bitmap_plot::x#0 bitmap_plot::x#1 ] zp ZP_WORD:84 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp ZP_WORD:86 [ bitmap_plot::plotter#1 ] zp ZP_WORD:82 [ bitmap_plot::plotter#0 ] -Uplifting [sin16s] best 30022 combination zp ZP_DWORD:36 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:98 [ sin16s::return#0 ] zp ZP_WORD:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:125 [ sin16s::$4 ] zp ZP_WORD:133 [ sin16s::x2#0 ] zp ZP_WORD:141 [ sin16s::x3_6#0 ] zp ZP_WORD:147 [ sin16s::x4#0 ] zp ZP_WORD:151 [ sin16s::x5#0 ] zp ZP_WORD:153 [ sin16s::x5_128#0 ] zp ZP_WORD:137 [ sin16s::x3#0 ] zp ZP_WORD:155 [ sin16s::usinx#1 ] zp ZP_WORD:129 [ sin16s::x1#0 ] zp ZP_WORD:143 [ sin16s::usinx#0 ] zp ZP_BYTE:35 [ sin16s::isUpper#2 ] -Uplifting [mulu16_sel] best 30006 combination zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:44 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:131 [ mulu16_sel::return#0 ] zp ZP_WORD:135 [ mulu16_sel::return#1 ] zp ZP_WORD:139 [ mulu16_sel::return#2 ] zp ZP_WORD:145 [ mulu16_sel::return#10 ] zp ZP_WORD:149 [ mulu16_sel::return#11 ] zp ZP_DWORD:161 [ mulu16_sel::$0 ] zp ZP_DWORD:165 [ mulu16_sel::$1 ] zp ZP_WORD:169 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ] -Uplifting [sin16s_gen2] best 30006 combination zp ZP_DWORD:106 [ sin16s_gen2::$5 ] zp ZP_WORD:17 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] zp ZP_WORD:110 [ sin16s_gen2::$8 ] zp ZP_DWORD:11 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] zp ZP_WORD:15 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] zp ZP_DWORD:94 [ sin16s_gen2::step#0 ] -Uplifting [mul16s] best 30006 combination zp ZP_DWORD:102 [ mul16s::return#2 ] zp ZP_DWORD:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 ] zp ZP_DWORD:120 [ mul16s::return#0 ] zp ZP_WORD:116 [ mul16s::$9 ] zp ZP_WORD:118 [ mul16s::$16 ] zp ZP_WORD:100 [ mul16s::a#0 ] -Uplifting [memset] best 29990 combination zp ZP_WORD:59 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:187 [ memset::end#0 ] zp ZP_WORD:56 [ memset::num#2 ] reg byte x [ memset::c#3 ] zp ZP_WORD:54 [ memset::str#2 ] -Uplifting [div32u16u] best 29990 combination zp ZP_DWORD:90 [ div32u16u::return#2 ] zp ZP_WORD:177 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:179 [ div32u16u::return#0 ] zp ZP_WORD:173 [ div32u16u::quotient_hi#0 ] -Uplifting [] best 29990 combination zp ZP_WORD:185 [ rem16u#1 ] -Uplifting [bitmap_clear] best 29990 combination -Uplifting [main] best 29990 combination +Uplifting [bitmap_plot] best 30036 combination reg byte x [ bitmap_plot::y#2 bitmap_plot::y#0 bitmap_plot::y#1 ] zp ZP_WORD:7 [ bitmap_plot::x#2 bitmap_plot::x#0 bitmap_plot::x#1 ] zp ZP_WORD:84 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp ZP_WORD:86 [ bitmap_plot::plotter#1 ] zp ZP_WORD:82 [ bitmap_plot::plotter#0 ] +Uplifting [sin16s] best 30036 combination zp ZP_DWORD:36 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:98 [ sin16s::return#0 ] zp ZP_WORD:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:125 [ sin16s::$4 ] zp ZP_WORD:133 [ sin16s::x2#0 ] zp ZP_WORD:141 [ sin16s::x3_6#0 ] zp ZP_WORD:147 [ sin16s::x4#0 ] zp ZP_WORD:151 [ sin16s::x5#0 ] zp ZP_WORD:153 [ sin16s::x5_128#0 ] zp ZP_WORD:137 [ sin16s::x3#0 ] zp ZP_WORD:155 [ sin16s::usinx#1 ] zp ZP_WORD:129 [ sin16s::x1#0 ] zp ZP_WORD:143 [ sin16s::usinx#0 ] zp ZP_BYTE:35 [ sin16s::isUpper#2 ] +Uplifting [mulu16_sel] best 30020 combination zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:44 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:131 [ mulu16_sel::return#0 ] zp ZP_WORD:135 [ mulu16_sel::return#1 ] zp ZP_WORD:139 [ mulu16_sel::return#2 ] zp ZP_WORD:145 [ mulu16_sel::return#10 ] zp ZP_WORD:149 [ mulu16_sel::return#11 ] zp ZP_DWORD:161 [ mulu16_sel::$0 ] zp ZP_DWORD:165 [ mulu16_sel::$1 ] zp ZP_WORD:169 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ] +Uplifting [sin16s_gen2] best 30020 combination zp ZP_DWORD:106 [ sin16s_gen2::$5 ] zp ZP_WORD:17 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] zp ZP_WORD:110 [ sin16s_gen2::$8 ] zp ZP_DWORD:11 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] zp ZP_WORD:15 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] zp ZP_DWORD:94 [ sin16s_gen2::step#0 ] +Uplifting [mul16s] best 30020 combination zp ZP_DWORD:102 [ mul16s::return#2 ] zp ZP_DWORD:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 ] zp ZP_DWORD:120 [ mul16s::return#0 ] zp ZP_WORD:116 [ mul16s::$9 ] zp ZP_WORD:118 [ mul16s::$16 ] zp ZP_WORD:100 [ mul16s::a#0 ] +Uplifting [memset] best 30004 combination zp ZP_WORD:59 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:187 [ memset::end#0 ] zp ZP_WORD:54 [ memset::num#2 ] reg byte x [ memset::c#3 ] zp ZP_WORD:56 [ memset::str#3 ] +Uplifting [div32u16u] best 30004 combination zp ZP_DWORD:90 [ div32u16u::return#2 ] zp ZP_WORD:177 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:179 [ div32u16u::return#0 ] zp ZP_WORD:173 [ div32u16u::quotient_hi#0 ] +Uplifting [] best 30004 combination zp ZP_WORD:185 [ rem16u#1 ] +Uplifting [bitmap_clear] best 30004 combination +Uplifting [main] best 30004 combination Attempting to uplift remaining variables inzp ZP_BYTE:191 [ bitmap_init::$5 ] -Uplifting [bitmap_init] best 29930 combination reg byte a [ bitmap_init::$5 ] +Uplifting [bitmap_init] best 29944 combination reg byte a [ bitmap_init::$5 ] Attempting to uplift remaining variables inzp ZP_BYTE:192 [ bitmap_init::$6 ] -Uplifting [bitmap_init] best 29870 combination reg byte a [ bitmap_init::$6 ] +Uplifting [bitmap_init] best 29884 combination reg byte a [ bitmap_init::$6 ] Attempting to uplift remaining variables inzp ZP_BYTE:189 [ bitmap_init::$7 ] -Uplifting [bitmap_init] best 29870 combination zp ZP_BYTE:189 [ bitmap_init::$7 ] +Uplifting [bitmap_init] best 29884 combination zp ZP_BYTE:189 [ bitmap_init::$7 ] Attempting to uplift remaining variables inzp ZP_BYTE:35 [ sin16s::isUpper#2 ] -Uplifting [sin16s] best 29870 combination zp ZP_BYTE:35 [ sin16s::isUpper#2 ] +Uplifting [sin16s] best 29884 combination zp ZP_BYTE:35 [ sin16s::isUpper#2 ] Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ render_sine::xpos#3 render_sine::xpos#8 render_sine::xpos#1 ] ] with [ zp ZP_WORD:7 [ bitmap_plot::x#2 bitmap_plot::x#0 bitmap_plot::x#1 ] ] - score: 2 Coalescing zero page register with common assignment [ zp ZP_WORD:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] ] with [ zp ZP_WORD:155 [ sin16s::usinx#1 ] ] - score: 2 Coalescing zero page register with common assignment [ zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] ] with [ zp ZP_WORD:137 [ sin16s::x3#0 ] ] - score: 2 @@ -6026,8 +6066,8 @@ Coalescing zero page register with common assignment [ zp ZP_WORD:42 [ mulu16_se Coalescing zero page register with common assignment [ zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 ] ] with [ zp ZP_WORD:147 [ sin16s::x4#0 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] ] with [ zp ZP_WORD:171 [ divr16u::return#2 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 ] ] with [ zp ZP_WORD:175 [ divr16u::return#3 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:54 [ memset::str#2 ] ] with [ zp ZP_WORD:59 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:56 [ memset::num#2 ] ] with [ zp ZP_WORD:187 [ memset::end#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:54 [ memset::num#2 ] ] with [ zp ZP_WORD:187 [ memset::end#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:56 [ memset::str#3 ] ] with [ zp ZP_WORD:59 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:66 [ render_sine::$10 ] ] with [ zp ZP_WORD:68 [ render_sine::$0 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:74 [ render_sine::$11 ] ] with [ zp ZP_WORD:76 [ render_sine::$3 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:82 [ bitmap_plot::plotter#0 ] ] with [ zp ZP_WORD:86 [ bitmap_plot::plotter#1 ] ] - score: 1 @@ -6067,8 +6107,8 @@ Allocated (was zp ZP_WORD:42) zp ZP_WORD:35 [ mulu16_sel::v1#5 mulu16_sel::v1#3 Allocated (was zp ZP_WORD:47) zp ZP_WORD:37 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ] Allocated (was zp ZP_WORD:49) zp ZP_WORD:39 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] Allocated (was zp ZP_WORD:51) zp ZP_WORD:41 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] -Allocated (was zp ZP_WORD:54) zp ZP_WORD:43 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] -Allocated (was zp ZP_WORD:56) zp ZP_WORD:45 [ memset::num#2 memset::end#0 ] +Allocated (was zp ZP_WORD:54) zp ZP_WORD:43 [ memset::num#2 memset::end#0 ] +Allocated (was zp ZP_WORD:56) zp ZP_WORD:45 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] Allocated (was zp ZP_WORD:64) zp ZP_WORD:47 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] Allocated (was zp ZP_WORD:82) zp ZP_WORD:49 [ bitmap_plot::plotter#0 bitmap_plot::plotter#1 ] Allocated (was zp ZP_WORD:84) zp ZP_WORD:51 [ bitmap_plot::$1 ] @@ -6186,7 +6226,7 @@ main: { lda #toD0181_return sta D018 // [14] call bitmap_init - // [197] phi from main::@3 to bitmap_init [phi:main::@3->bitmap_init] + // [198] phi from main::@3 to bitmap_init [phi:main::@3->bitmap_init] bitmap_init_from_b3: jsr bitmap_init // [15] phi from main::@3 to main::@4 [phi:main::@3->main::@4] @@ -7331,16 +7371,16 @@ bitmap_clear: { memset_from_bitmap_clear: // [189] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1 ldx #col - // [189] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 - lda #<$3e8 - sta memset.num - lda #>$3e8 - sta memset.num+1 - // [189] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + // [189] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 + // [189] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#2] -- vwuz1=vwuc1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 jsr memset // [186] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] b1_from_bitmap_clear: @@ -7352,16 +7392,16 @@ bitmap_clear: { memset_from_b1: // [189] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1 ldx #0 - // [189] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 - lda #<$1f40 - sta memset.num - lda #>$1f40 - sta memset.num+1 - // [189] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + // [189] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1 lda #<BITMAP sta memset.str lda #>BITMAP sta memset.str+1 + // [189] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#2] -- vwuz1=vwuc1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 jsr memset jmp breturn // bitmap_clear::@return @@ -7371,13 +7411,21 @@ bitmap_clear: { } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage($2b) str, byte register(X) c, word zeropage($2d) num) +// memset(void* zeropage($2d) str, byte register(X) c, word zeropage($2b) num) memset: { - .label end = $2d - .label dst = $2b - .label str = $2b - .label num = $2d - // [190] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 + .label end = $2b + .label dst = $2d + .label num = $2b + .label str = $2d + // [190] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 + lda num + beq breturn + lda num+1 + beq breturn + jmp b1 + // memset::@1 + b1: + // [191] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 lda end clc adc str @@ -7385,34 +7433,34 @@ memset: { lda end+1 adc str+1 sta end+1 - // [191] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 - // [192] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - b1_from_memset: - b1_from_b1: - // [192] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - jmp b1 - // memset::@1 - b1: - // [193] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx + // [192] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + // [193] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + b2_from_b1: + b2_from_b2: + // [193] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + jmp b2 + // memset::@2 + b2: + // [194] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx txa ldy #0 sta (dst),y - // [194] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [195] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [195] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [196] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1_from_b1 + bne b2_from_b2 lda dst cmp end - bne b1_from_b1 + bne b2_from_b2 jmp breturn // memset::@return breturn: - // [196] return + // [197] return rts } // bitmap_init @@ -7420,86 +7468,86 @@ memset: { bitmap_init: { .label _7 = $43 .label yoffs = $2f - // [198] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + // [199] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] b1_from_bitmap_init: - // [198] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 + // [199] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 ldx #0 - // [198] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 + // [199] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 lda #$80 jmp b1 - // [198] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + // [199] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] b1_from_b2: - // [198] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - // [198] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + // [199] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + // [199] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy jmp b1 // bitmap_init::@1 b1: - // [199] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa + // [200] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_bit,x - // [200] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 + // [201] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 lsr - // [201] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 + // [202] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 cmp #0 bne b6_from_b1 - // [203] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + // [204] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] b2_from_b1: - // [203] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 + // [204] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 lda #$80 jmp b2 - // [202] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + // [203] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] b6_from_b1: jmp b6 // bitmap_init::@6 b6: - // [203] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + // [204] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] b2_from_b6: - // [203] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + // [204] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy jmp b2 // bitmap_init::@2 b2: - // [204] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx + // [205] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx inx - // [205] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 + // [206] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 cpx #0 bne b1_from_b2 - // [206] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + // [207] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] b3_from_b2: - // [206] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + // [207] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #<BITMAP sta yoffs lda #>BITMAP sta yoffs+1 - // [206] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 + // [207] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 ldx #0 jmp b3 - // [206] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + // [207] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] b3_from_b4: - // [206] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - // [206] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + // [207] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + // [207] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy jmp b3 // bitmap_init::@3 b3: - // [207] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 + // [208] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 lda #7 sax _7 - // [208] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 + // [209] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 lda yoffs - // [209] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa + // [210] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa ora _7 - // [210] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa + // [211] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_ylo,x - // [211] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 + // [212] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 lda yoffs+1 - // [212] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa + // [213] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_yhi,x - // [213] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + // [214] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp _7 bne b4_from_b3 jmp b5 // bitmap_init::@5 b5: - // [214] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + // [215] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda yoffs adc #<$28*8 @@ -7507,22 +7555,22 @@ bitmap_init: { lda yoffs+1 adc #>$28*8 sta yoffs+1 - // [215] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + // [216] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] b4_from_b3: b4_from_b5: - // [215] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + // [216] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy jmp b4 // bitmap_init::@4 b4: - // [216] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx + // [217] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx inx - // [217] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 + // [218] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 cpx #0 bne b3_from_b4 jmp breturn // bitmap_init::@return breturn: - // [218] return + // [219] return rts } // File Data @@ -7605,6 +7653,7 @@ Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp breturn Removing instruction jmp b1 +Removing instruction jmp b2 Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp b6 @@ -7645,8 +7694,8 @@ Replacing label b2_from_b1 with b2 Replacing label b3_from_b2 with b3 Replacing label b3_from_b2 with b3 Replacing label b1_from_b3 with b1 -Replacing label b1_from_b1 with b1 -Replacing label b1_from_b1 with b1 +Replacing label b2_from_b2 with b2 +Replacing label b2_from_b2 with b2 Replacing label b6_from_b1 with b2 Replacing label b1_from_b2 with b1 Replacing label b4_from_b3 with b4 @@ -7694,8 +7743,8 @@ Removing instruction b3_from_b5: Removing instruction breturn: Removing instruction b1_from_bitmap_clear: Removing instruction memset_from_b1: -Removing instruction b1_from_memset: -Removing instruction b1_from_b1: +Removing instruction b2_from_b1: +Removing instruction b2_from_b2: Removing instruction b1_from_b2: Removing instruction b6_from_b1: Removing instruction b6: @@ -7767,7 +7816,7 @@ Removing instruction b6: Removing instruction memset_from_bitmap_clear: Removing instruction b1: Removing instruction breturn: -Removing instruction breturn: +Removing instruction b1: Removing instruction b1_from_bitmap_init: Removing instruction b2_from_b1: Removing instruction b3_from_b2: @@ -7988,20 +8037,21 @@ FINAL SYMBOL TABLE (const byte) main::vicSelectGfxBank1_toDd001_return#0 vicSelectGfxBank1_toDd001_return = (byte) 3 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (label) memset::@1 +(label) memset::@2 (label) memset::@return (byte) memset::c -(byte) memset::c#3 reg byte x 1.5714285714285714 +(byte) memset::c#3 reg byte x 1.375 (byte*) memset::dst -(byte*) memset::dst#1 dst zp ZP_WORD:43 16.5 -(byte*) memset::dst#2 dst zp ZP_WORD:43 17.5 -(byte*~) memset::dst#3 dst zp ZP_WORD:43 4.0 +(byte*) memset::dst#1 dst zp ZP_WORD:45 16.5 +(byte*) memset::dst#2 dst zp ZP_WORD:45 17.5 +(byte*~) memset::dst#3 dst zp ZP_WORD:45 4.0 (byte*) memset::end -(byte*) memset::end#0 end zp ZP_WORD:45 2.1666666666666665 +(byte*) memset::end#0 end zp ZP_WORD:43 2.1666666666666665 (word) memset::num -(word) memset::num#2 num zp ZP_WORD:45 2.0 +(word) memset::num#2 num zp ZP_WORD:43 2.0 (void*) memset::return (void*) memset::str -(void*) memset::str#2 str zp ZP_WORD:43 +(void*) memset::str#3 str zp ZP_WORD:45 (signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) (word~) mul16s::$16 $16 zp ZP_WORD:59 4.0 (word~) mul16s::$9 $9 zp ZP_WORD:59 4.0 @@ -8223,8 +8273,8 @@ zp ZP_WORD:37 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 di zp ZP_WORD:39 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:41 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] -zp ZP_WORD:43 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] -zp ZP_WORD:45 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:43 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:45 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] reg byte x [ memset::c#3 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] @@ -8254,7 +8304,7 @@ reg byte a [ bitmap_init::$6 ] FINAL ASSEMBLER -Score: 24793 +Score: 24804 // File Comments // Generate a big sinus and plot it on a bitmap @@ -8348,7 +8398,7 @@ main: { sta D018 // bitmap_init(BITMAP, SCREEN) // [14] call bitmap_init - // [197] phi from main::@3 to bitmap_init [phi:main::@3->bitmap_init] + // [198] phi from main::@3 to bitmap_init [phi:main::@3->bitmap_init] jsr bitmap_init // [15] phi from main::@3 to main::@4 [phi:main::@3->main::@4] // main::@4 @@ -9448,16 +9498,16 @@ bitmap_clear: { // [189] phi from bitmap_clear to memset [phi:bitmap_clear->memset] // [189] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1 ldx #col - // [189] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 - lda #<$3e8 - sta memset.num - lda #>$3e8 - sta memset.num+1 - // [189] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + // [189] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1 lda #<SCREEN sta memset.str lda #>SCREEN sta memset.str+1 + // [189] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#2] -- vwuz1=vwuc1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 jsr memset // [186] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] // bitmap_clear::@1 @@ -9466,16 +9516,16 @@ bitmap_clear: { // [189] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset] // [189] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1 ldx #0 - // [189] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 - lda #<$1f40 - sta memset.num - lda #>$1f40 - sta memset.num+1 - // [189] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + // [189] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1 lda #<BITMAP sta memset.str lda #>BITMAP sta memset.str+1 + // [189] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#2] -- vwuz1=vwuc1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 jsr memset // bitmap_clear::@return // } @@ -9484,14 +9534,21 @@ bitmap_clear: { } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zeropage($2b) str, byte register(X) c, word zeropage($2d) num) +// memset(void* zeropage($2d) str, byte register(X) c, word zeropage($2b) num) memset: { - .label end = $2d - .label dst = $2b - .label str = $2b - .label num = $2d + .label end = $2b + .label dst = $2d + .label num = $2b + .label str = $2d + // if(num>0) + // [190] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 + lda num + beq breturn + lda num+1 + beq breturn + // memset::@1 // end = (char*)str + num - // [190] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 + // [191] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 lda end clc adc str @@ -9499,32 +9556,33 @@ memset: { lda end+1 adc str+1 sta end+1 - // [191] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 - // [192] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - // [192] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - // memset::@1 - b1: + // [192] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + // [193] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + // [193] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + // memset::@2 + b2: // *dst = c - // [193] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx + // [194] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx txa ldy #0 sta (dst),y // for(char* dst = str; dst!=end; dst++) - // [194] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [195] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - // [195] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [196] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1 + bne b2 lda dst cmp end - bne b1 + bne b2 // memset::@return + breturn: // } - // [196] return + // [197] return rts } // bitmap_init @@ -9532,81 +9590,81 @@ memset: { bitmap_init: { .label _7 = $43 .label yoffs = $2f - // [198] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] - // [198] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 + // [199] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + // [199] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 ldx #0 - // [198] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 + // [199] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 lda #$80 - // [198] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] - // [198] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - // [198] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + // [199] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + // [199] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + // [199] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy // bitmap_init::@1 b1: // bitmap_plot_bit[x] = bits - // [199] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa + // [200] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_bit,x // bits >>= 1 - // [200] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 + // [201] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 lsr // if(bits==0) - // [201] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 + // [202] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 cmp #0 bne b2 - // [203] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] - // [203] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 + // [204] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + // [204] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 lda #$80 - // [202] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + // [203] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] // bitmap_init::@6 - // [203] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] - // [203] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + // [204] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + // [204] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy // bitmap_init::@2 b2: // for(byte x : 0..255) - // [204] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx + // [205] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx inx - // [205] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 + // [206] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 cpx #0 bne b1 - // [206] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] - // [206] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + // [207] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + // [207] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #<BITMAP sta yoffs lda #>BITMAP sta yoffs+1 - // [206] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 + // [207] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 ldx #0 - // [206] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] - // [206] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - // [206] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + // [207] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + // [207] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + // [207] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy // bitmap_init::@3 b3: // y&$7 - // [207] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 + // [208] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 lda #7 sax _7 // <yoffs - // [208] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 + // [209] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 lda yoffs // y&$7 | <yoffs - // [209] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa + // [210] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa ora _7 // bitmap_plot_ylo[y] = y&$7 | <yoffs - // [210] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa + // [211] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_ylo,x // >yoffs - // [211] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 + // [212] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 lda yoffs+1 // bitmap_plot_yhi[y] = >yoffs - // [212] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa + // [213] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_yhi,x // if((y&$7)==7) - // [213] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + // [214] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp _7 bne b4 // bitmap_init::@5 // yoffs = yoffs + 40*8 - // [214] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + // [215] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda yoffs adc #<$28*8 @@ -9614,19 +9672,19 @@ bitmap_init: { lda yoffs+1 adc #>$28*8 sta yoffs+1 - // [215] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] - // [215] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + // [216] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + // [216] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy // bitmap_init::@4 b4: // for(byte y : 0..255) - // [216] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx + // [217] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx inx - // [217] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 + // [218] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 cpx #0 bne b3 // bitmap_init::@return // } - // [218] return + // [219] return rts } // File Data diff --git a/src/test/ref/examples/sinplotter/sine-plotter.sym b/src/test/ref/examples/sinplotter/sine-plotter.sym index 838556b6a..e197cfb0a 100644 --- a/src/test/ref/examples/sinplotter/sine-plotter.sym +++ b/src/test/ref/examples/sinplotter/sine-plotter.sym @@ -187,20 +187,21 @@ (const byte) main::vicSelectGfxBank1_toDd001_return#0 vicSelectGfxBank1_toDd001_return = (byte) 3 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (label) memset::@1 +(label) memset::@2 (label) memset::@return (byte) memset::c -(byte) memset::c#3 reg byte x 1.5714285714285714 +(byte) memset::c#3 reg byte x 1.375 (byte*) memset::dst -(byte*) memset::dst#1 dst zp ZP_WORD:43 16.5 -(byte*) memset::dst#2 dst zp ZP_WORD:43 17.5 -(byte*~) memset::dst#3 dst zp ZP_WORD:43 4.0 +(byte*) memset::dst#1 dst zp ZP_WORD:45 16.5 +(byte*) memset::dst#2 dst zp ZP_WORD:45 17.5 +(byte*~) memset::dst#3 dst zp ZP_WORD:45 4.0 (byte*) memset::end -(byte*) memset::end#0 end zp ZP_WORD:45 2.1666666666666665 +(byte*) memset::end#0 end zp ZP_WORD:43 2.1666666666666665 (word) memset::num -(word) memset::num#2 num zp ZP_WORD:45 2.0 +(word) memset::num#2 num zp ZP_WORD:43 2.0 (void*) memset::return (void*) memset::str -(void*) memset::str#2 str zp ZP_WORD:43 +(void*) memset::str#3 str zp ZP_WORD:45 (signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) (word~) mul16s::$16 $16 zp ZP_WORD:59 4.0 (word~) mul16s::$9 $9 zp ZP_WORD:59 4.0 @@ -422,8 +423,8 @@ zp ZP_WORD:37 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 di zp ZP_WORD:39 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:41 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] -zp ZP_WORD:43 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] -zp ZP_WORD:45 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:43 [ memset::num#2 memset::end#0 ] +zp ZP_WORD:45 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] reg byte x [ memset::c#3 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] diff --git a/src/test/ref/malloc-0.log b/src/test/ref/malloc-0.log index ece23d59f..a63cf24c4 100644 --- a/src/test/ref/malloc-0.log +++ b/src/test/ref/malloc-0.log @@ -1,20 +1,27 @@ Fixing pointer addition (word*~) bsearch16u::$7 ← (word*) bsearch16u::items + (byte~) bsearch16u::$6 Fixing pointer addition (word*~) bsearch16u::$15 ← (word*) bsearch16u::pivot + (number) 1 Fixing pointer addition (word*~) bsearch16u::$1 ← (word*) bsearch16u::items - (number) 1 +Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src) Identified constant variable (byte*) HEAP_TOP -Culled Empty Block (label) malloc::@1 Culled Empty Block (label) @1 Culled Empty Block (label) @2 +Culled Empty Block (label) @3 +Culled Empty Block (label) malloc::@1 +Culled Empty Block (label) @5 +Culled Empty Block (label) @6 +Culled Empty Block (label) @7 Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from + to:@4 +@4: scope:[] from @begin (byte*) HEAP_TOP#0 ← ((byte*)) (number) $a000 (byte*) heap_head#0 ← (byte*) HEAP_TOP#0 - to:@3 -malloc: scope:[malloc] from @3 - (word) malloc::size#1 ← phi( @3/(word) malloc::size#0 ) - (byte*) heap_head#4 ← phi( @3/(byte*) heap_head#7 ) + to:@8 +malloc: scope:[malloc] from @8 + (word) malloc::size#1 ← phi( @8/(word) malloc::size#0 ) + (byte*) heap_head#4 ← phi( @8/(byte*) heap_head#7 ) (byte*~) malloc::$0 ← (byte*) heap_head#4 - (word) malloc::size#1 (byte*) malloc::mem#0 ← (byte*~) malloc::$0 (byte*) heap_head#1 ← (byte*) malloc::mem#0 @@ -27,21 +34,21 @@ malloc::@return: scope:[malloc] from malloc (byte*) heap_head#2 ← (byte*) heap_head#5 return to:@return -@3: scope:[] from @begin - (byte*) heap_head#7 ← phi( @begin/(byte*) heap_head#0 ) +@8: scope:[] from @4 + (byte*) heap_head#7 ← phi( @4/(byte*) heap_head#0 ) (word) malloc::size#0 ← (number) $100 call malloc (void*) malloc::return#2 ← (void*) malloc::return#1 - to:@5 -@5: scope:[] from @3 - (byte*) heap_head#6 ← phi( @3/(byte*) heap_head#2 ) - (void*) malloc::return#4 ← phi( @3/(void*) malloc::return#2 ) + to:@10 +@10: scope:[] from @8 + (byte*) heap_head#6 ← phi( @8/(byte*) heap_head#2 ) + (void*) malloc::return#4 ← phi( @8/(void*) malloc::return#2 ) (void*~) $0 ← (void*) malloc::return#4 (byte*) heap_head#3 ← (byte*) heap_head#6 (byte*) BYTES#0 ← ((byte*)) (void*~) $0 - to:@4 -main: scope:[main] from @4 - (byte*) BYTES#2 ← phi( @4/(byte*) BYTES#3 ) + to:@9 +main: scope:[main] from @9 + (byte*) BYTES#2 ← phi( @9/(byte*) BYTES#3 ) (byte) main::i#0 ← (byte) 0 to:main::@1 main::@1: scope:[main] from main main::@1 @@ -55,20 +62,21 @@ main::@1: scope:[main] from main main::@1 main::@return: scope:[main] from main::@1 return to:@return -@4: scope:[] from @5 - (byte*) BYTES#3 ← phi( @5/(byte*) BYTES#0 ) +@9: scope:[] from @10 + (byte*) BYTES#3 ← phi( @10/(byte*) BYTES#0 ) call main - to:@6 -@6: scope:[] from @4 + to:@11 +@11: scope:[] from @9 to:@end -@end: scope:[] from @6 +@end: scope:[] from @11 SYMBOL TABLE SSA (void*~) $0 -(label) @3 +(label) @10 +(label) @11 (label) @4 -(label) @5 -(label) @6 +(label) @8 +(label) @9 (label) @begin (label) @end (byte*) BYTES @@ -178,24 +186,26 @@ Constant inlined malloc::return#2 = (const void*) malloc::return#0 Successful SSA optimization Pass2ConstantInlining Added new block during phi lifting main::@3(between main::@1 and main::@1) Adding NOP phi() at start of @begin -Adding NOP phi() at start of @3 -Adding NOP phi() at start of @5 Adding NOP phi() at start of @4 -Adding NOP phi() at start of @6 +Adding NOP phi() at start of @8 +Adding NOP phi() at start of @10 +Adding NOP phi() at start of @9 +Adding NOP phi() at start of @11 Adding NOP phi() at start of @end Adding NOP phi() at start of main Adding NOP phi() at start of malloc CALL GRAPH -Calls in [] to malloc:2 main:5 +Calls in [] to malloc:3 main:6 Created 1 initial phi equivalence classes -Coalesced [14] main::i#3 ← main::i#1 +Coalesced [15] main::i#3 ← main::i#1 Coalesced down to 1 phi equivalence classes -Culled Empty Block (label) @5 -Culled Empty Block (label) @6 +Culled Empty Block (label) @4 +Culled Empty Block (label) @10 +Culled Empty Block (label) @11 Culled Empty Block (label) main::@3 -Renumbering block @3 to @1 -Renumbering block @4 to @2 +Renumbering block @8 to @1 +Renumbering block @9 to @2 Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 Adding NOP phi() at start of @2 diff --git a/src/test/ref/malloc-1.log b/src/test/ref/malloc-1.log index 9beae54fd..f6ef42d6b 100644 --- a/src/test/ref/malloc-1.log +++ b/src/test/ref/malloc-1.log @@ -2,20 +2,27 @@ Fixing pointer addition (word*~) bsearch16u::$7 ← (word*) bsearch16u::items + Fixing pointer addition (word*~) bsearch16u::$15 ← (word*) bsearch16u::pivot + (number) 1 Fixing pointer addition (word*~) bsearch16u::$1 ← (word*) bsearch16u::items - (number) 1 Fixing pointer increment (word*) main::w ← ++ (word*) main::w +Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src) Identified constant variable (byte*) HEAP_TOP -Culled Empty Block (label) malloc::@1 Culled Empty Block (label) @1 Culled Empty Block (label) @2 +Culled Empty Block (label) @3 +Culled Empty Block (label) malloc::@1 +Culled Empty Block (label) @5 +Culled Empty Block (label) @6 +Culled Empty Block (label) @7 Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from + to:@4 +@4: scope:[] from @begin (byte*) HEAP_TOP#0 ← ((byte*)) (number) $a000 (byte*) heap_head#0 ← (byte*) HEAP_TOP#0 - to:@3 -malloc: scope:[malloc] from @3 - (word) malloc::size#1 ← phi( @3/(word) malloc::size#0 ) - (byte*) heap_head#4 ← phi( @3/(byte*) heap_head#7 ) + to:@8 +malloc: scope:[malloc] from @8 + (word) malloc::size#1 ← phi( @8/(word) malloc::size#0 ) + (byte*) heap_head#4 ← phi( @8/(byte*) heap_head#7 ) (byte*~) malloc::$0 ← (byte*) heap_head#4 - (word) malloc::size#1 (byte*) malloc::mem#0 ← (byte*~) malloc::$0 (byte*) heap_head#1 ← (byte*) malloc::mem#0 @@ -28,21 +35,21 @@ malloc::@return: scope:[malloc] from malloc (byte*) heap_head#2 ← (byte*) heap_head#5 return to:@return -@3: scope:[] from @begin - (byte*) heap_head#7 ← phi( @begin/(byte*) heap_head#0 ) +@8: scope:[] from @4 + (byte*) heap_head#7 ← phi( @4/(byte*) heap_head#0 ) (word) malloc::size#0 ← (number) $200 call malloc (void*) malloc::return#2 ← (void*) malloc::return#1 - to:@5 -@5: scope:[] from @3 - (byte*) heap_head#6 ← phi( @3/(byte*) heap_head#2 ) - (void*) malloc::return#4 ← phi( @3/(void*) malloc::return#2 ) + to:@10 +@10: scope:[] from @8 + (byte*) heap_head#6 ← phi( @8/(byte*) heap_head#2 ) + (void*) malloc::return#4 ← phi( @8/(void*) malloc::return#2 ) (void*~) $0 ← (void*) malloc::return#4 (byte*) heap_head#3 ← (byte*) heap_head#6 (word*) WORDS#0 ← ((word*)) (void*~) $0 - to:@4 -main: scope:[main] from @4 - (word*) WORDS#1 ← phi( @4/(word*) WORDS#2 ) + to:@9 +main: scope:[main] from @9 + (word*) WORDS#1 ← phi( @9/(word*) WORDS#2 ) (word*) main::w#0 ← (word*) WORDS#1 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -58,20 +65,21 @@ main::@1: scope:[main] from main main::@1 main::@return: scope:[main] from main::@1 return to:@return -@4: scope:[] from @5 - (word*) WORDS#2 ← phi( @5/(word*) WORDS#0 ) +@9: scope:[] from @10 + (word*) WORDS#2 ← phi( @10/(word*) WORDS#0 ) call main - to:@6 -@6: scope:[] from @4 + to:@11 +@11: scope:[] from @9 to:@end -@end: scope:[] from @6 +@end: scope:[] from @11 SYMBOL TABLE SSA (void*~) $0 -(label) @3 +(label) @10 +(label) @11 (label) @4 -(label) @5 -(label) @6 +(label) @8 +(label) @9 (label) @begin (label) @end (byte*) HEAP_TOP @@ -186,25 +194,27 @@ Constant inlined main::w#0 = (const word*) WORDS#0 Successful SSA optimization Pass2ConstantInlining Added new block during phi lifting main::@3(between main::@1 and main::@1) Adding NOP phi() at start of @begin -Adding NOP phi() at start of @3 -Adding NOP phi() at start of @5 Adding NOP phi() at start of @4 -Adding NOP phi() at start of @6 +Adding NOP phi() at start of @8 +Adding NOP phi() at start of @10 +Adding NOP phi() at start of @9 +Adding NOP phi() at start of @11 Adding NOP phi() at start of @end Adding NOP phi() at start of main Adding NOP phi() at start of malloc CALL GRAPH -Calls in [] to malloc:2 main:5 +Calls in [] to malloc:3 main:6 Created 2 initial phi equivalence classes -Coalesced [15] main::i#3 ← main::i#1 -Coalesced [16] main::w#3 ← main::w#1 +Coalesced [16] main::i#3 ← main::i#1 +Coalesced [17] main::w#3 ← main::w#1 Coalesced down to 2 phi equivalence classes -Culled Empty Block (label) @5 -Culled Empty Block (label) @6 +Culled Empty Block (label) @4 +Culled Empty Block (label) @10 +Culled Empty Block (label) @11 Culled Empty Block (label) main::@3 -Renumbering block @3 to @1 -Renumbering block @4 to @2 +Renumbering block @8 to @1 +Renumbering block @9 to @2 Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 Adding NOP phi() at start of @2 diff --git a/src/test/ref/memory-heap.log b/src/test/ref/memory-heap.log index 4847ce3ef..9e1d61954 100644 --- a/src/test/ref/memory-heap.log +++ b/src/test/ref/memory-heap.log @@ -1,18 +1,25 @@ Fixing pointer addition (word*~) bsearch16u::$7 ← (word*) bsearch16u::items + (byte~) bsearch16u::$6 Fixing pointer addition (word*~) bsearch16u::$15 ← (word*) bsearch16u::pivot + (number) 1 Fixing pointer addition (word*~) bsearch16u::$1 ← (word*) bsearch16u::items - (number) 1 +Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src) Identified constant variable (byte*) HEAP_TOP Identified constant variable (byte*) main::screen -Culled Empty Block (label) malloc::@1 Culled Empty Block (label) @1 Culled Empty Block (label) @2 Culled Empty Block (label) @3 +Culled Empty Block (label) malloc::@1 +Culled Empty Block (label) @5 +Culled Empty Block (label) @6 +Culled Empty Block (label) @7 +Culled Empty Block (label) @8 CONTROL FLOW GRAPH SSA @begin: scope:[] from + to:@4 +@4: scope:[] from @begin (byte*) HEAP_TOP#0 ← ((byte*)) (number) $a000 (byte*) heap_head#0 ← (byte*) HEAP_TOP#0 - to:@4 + to:@9 malloc: scope:[malloc] from main main::@3 (word) malloc::size#2 ← phi( main/(word) malloc::size#0 main::@3/(word) malloc::size#1 ) (byte*) heap_head#7 ← phi( main/(byte*) heap_head#13 main::@3/(byte*) heap_head#3 ) @@ -33,8 +40,8 @@ free: scope:[free] from main::@2 main::@5 free::@return: scope:[free] from free return to:@return -main: scope:[main] from @4 - (byte*) heap_head#13 ← phi( @4/(byte*) heap_head#15 ) +main: scope:[main] from @9 + (byte*) heap_head#13 ← phi( @9/(byte*) heap_head#15 ) (word) malloc::size#0 ← (number) $64 call malloc (void*) malloc::return#2 ← (void*) malloc::return#1 @@ -97,19 +104,20 @@ main::@return: scope:[main] from main::@6 (byte*) heap_head#5 ← (byte*) heap_head#11 return to:@return -@4: scope:[] from @begin - (byte*) heap_head#15 ← phi( @begin/(byte*) heap_head#0 ) +@9: scope:[] from @4 + (byte*) heap_head#15 ← phi( @4/(byte*) heap_head#0 ) call main - to:@5 -@5: scope:[] from @4 - (byte*) heap_head#12 ← phi( @4/(byte*) heap_head#5 ) + to:@10 +@10: scope:[] from @9 + (byte*) heap_head#12 ← phi( @9/(byte*) heap_head#5 ) (byte*) heap_head#6 ← (byte*) heap_head#12 to:@end -@end: scope:[] from @5 +@end: scope:[] from @10 SYMBOL TABLE SSA +(label) @10 (label) @4 -(label) @5 +(label) @9 (label) @begin (label) @end (byte*) HEAP_TOP @@ -287,24 +295,26 @@ Successful SSA optimization Pass2IdenticalPhiElimination Added new block during phi lifting main::@7(between main::@1 and main::@1) Adding NOP phi() at start of @begin Adding NOP phi() at start of @4 -Adding NOP phi() at start of @5 +Adding NOP phi() at start of @9 +Adding NOP phi() at start of @10 Adding NOP phi() at start of @end Adding NOP phi() at start of main Adding NOP phi() at start of main::@2 Adding NOP phi() at start of main::@5 Adding NOP phi() at start of free CALL GRAPH -Calls in [] to main:2 -Calls in [main] to malloc:6 malloc:9 free:18 free:20 +Calls in [] to main:3 +Calls in [main] to malloc:7 malloc:10 free:19 free:21 Created 2 initial phi equivalence classes -Coalesced [8] heap_head#19 ← heap_head#1 -Coalesced [24] main::i#3 ← main::i#1 -Not coalescing [29] heap_head#1 ← malloc::mem#0 +Coalesced [9] heap_head#19 ← heap_head#1 +Coalesced [25] main::i#3 ← main::i#1 +Not coalescing [30] heap_head#1 ← malloc::mem#0 Coalesced down to 3 phi equivalence classes -Culled Empty Block (label) @5 +Culled Empty Block (label) @4 +Culled Empty Block (label) @10 Culled Empty Block (label) main::@7 -Renumbering block @4 to @1 +Renumbering block @9 to @1 Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 Adding NOP phi() at start of @end diff --git a/src/test/ref/plasma-center.log b/src/test/ref/plasma-center.log index 8da04bc52..aa9a88ff3 100644 --- a/src/test/ref/plasma-center.log +++ b/src/test/ref/plasma-center.log @@ -15,9 +15,16 @@ Inlined call (byte~) main::$7 ← call toD018 (byte*) SCREEN2 (byte*) CHARSET Culled Empty Block (label) @1 Culled Empty Block (label) @2 Culled Empty Block (label) @3 -Culled Empty Block (label) malloc::@1 +Culled Empty Block (label) @4 Culled Empty Block (label) @5 Culled Empty Block (label) @6 +Culled Empty Block (label) memset::@5 +Culled Empty Block (label) memset::@3 +Culled Empty Block (label) @7 +Culled Empty Block (label) malloc::@1 +Culled Empty Block (label) @9 +Culled Empty Block (label) @10 +Culled Empty Block (label) @11 Culled Empty Block (label) bsearch16u::@11 Culled Empty Block (label) bsearch16u::@12 Culled Empty Block (label) bsearch16u::@14 @@ -25,15 +32,10 @@ Culled Empty Block (label) bsearch16u::@16 Culled Empty Block (label) bsearch16u::@17 Culled Empty Block (label) bsearch16u::@4 Culled Empty Block (label) bsearch16u::@5 -Culled Empty Block (label) @7 -Culled Empty Block (label) @8 -Culled Empty Block (label) @9 -Culled Empty Block (label) memset::@3 -Culled Empty Block (label) @10 Culled Empty Block (label) init_squares::@2 -Culled Empty Block (label) @12 -Culled Empty Block (label) sqr::@1 Culled Empty Block (label) @13 +Culled Empty Block (label) sqr::@1 +Culled Empty Block (label) @14 Culled Empty Block (label) sqrt::@1 Culled Empty Block (label) atan2_16::@9 Culled Empty Block (label) atan2_16::@10 @@ -47,8 +49,7 @@ Culled Empty Block (label) atan2_16::@23 Culled Empty Block (label) atan2_16::@31 Culled Empty Block (label) atan2_16::@32 Culled Empty Block (label) atan2_16::@14 -Culled Empty Block (label) @15 -Culled Empty Block (label) @17 +Culled Empty Block (label) @16 Culled Empty Block (label) @18 Culled Empty Block (label) @19 Culled Empty Block (label) @20 @@ -68,7 +69,8 @@ Culled Empty Block (label) @33 Culled Empty Block (label) @34 Culled Empty Block (label) @35 Culled Empty Block (label) @36 -Culled Empty Block (label) @38 +Culled Empty Block (label) @37 +Culled Empty Block (label) @39 Culled Empty Block (label) sid_rnd::@1 Culled Empty Block (label) main::toD0181_@1 Culled Empty Block (label) main::toD0182_@1 @@ -76,15 +78,15 @@ Culled Empty Block (label) main::@4 Culled Empty Block (label) main::@3 Culled Empty Block (label) main::@5 Culled Empty Block (label) main::@6 -Culled Empty Block (label) @41 -Culled Empty Block (label) init_angle_screen::@4 Culled Empty Block (label) @42 +Culled Empty Block (label) init_angle_screen::@4 +Culled Empty Block (label) @43 Culled Empty Block (label) init_dist_screen::@13 Culled Empty Block (label) init_dist_screen::@14 Culled Empty Block (label) init_dist_screen::@9 Culled Empty Block (label) init_dist_screen::@10 Culled Empty Block (label) init_dist_screen::@12 -Culled Empty Block (label) @43 +Culled Empty Block (label) @44 Culled Empty Block (label) make_plasma_charset::@10 CONTROL FLOW GRAPH SSA @@ -92,14 +94,50 @@ CONTROL FLOW GRAPH SSA (byte*) D018#0 ← ((byte*)) (number) $d018 (byte*) COLS#0 ← ((byte*)) (number) $d800 (byte) BLACK#0 ← (number) 0 - to:@4 -@4: scope:[] from @begin + to:@8 +memset: scope:[memset] from main::@11 + (byte) memset::c#3 ← phi( main::@11/(byte) memset::c#0 ) + (void*) memset::str#3 ← phi( main::@11/(void*) memset::str#0 ) + (word) memset::num#1 ← phi( main::@11/(word) memset::num#0 ) + (bool~) memset::$0 ← (word) memset::num#1 > (number) 0 + (bool~) memset::$1 ← ! (bool~) memset::$0 + if((bool~) memset::$1) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + (void*) memset::str#1 ← phi( memset/(void*) memset::str#3 memset::@4/(void*) memset::str#4 ) + (void*) memset::return#0 ← (void*) memset::str#1 + to:memset::@return +memset::@2: scope:[memset] from memset + (byte) memset::c#2 ← phi( memset/(byte) memset::c#3 ) + (word) memset::num#2 ← phi( memset/(word) memset::num#1 ) + (void*) memset::str#2 ← phi( memset/(void*) memset::str#3 ) + (byte*~) memset::$2 ← ((byte*)) (void*) memset::str#2 + (byte*~) memset::$3 ← (byte*~) memset::$2 + (word) memset::num#2 + (byte*) memset::end#0 ← (byte*~) memset::$3 + (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#2 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + (void*) memset::str#4 ← phi( memset::@2/(void*) memset::str#2 memset::@4/(void*) memset::str#4 ) + (byte*) memset::end#1 ← phi( memset::@2/(byte*) memset::end#0 memset::@4/(byte*) memset::end#1 ) + (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + (byte) memset::c#1 ← phi( memset::@2/(byte) memset::c#2 memset::@4/(byte) memset::c#1 ) + *((byte*) memset::dst#2) ← (byte) memset::c#1 + (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + (bool~) memset::$4 ← (byte*) memset::dst#1 != (byte*) memset::end#1 + if((bool~) memset::$4) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + (void*) memset::return#3 ← phi( memset::@1/(void*) memset::return#0 ) + (void*) memset::return#1 ← (void*) memset::return#3 + return + to:@return +@8: scope:[] from @begin (byte*) HEAP_TOP#0 ← ((byte*)) (number) $a000 (byte*) heap_head#0 ← (byte*) HEAP_TOP#0 - to:@11 -malloc: scope:[malloc] from @39 @45 init_squares - (word) malloc::size#3 ← phi( @39/(word) malloc::size#1 @45/(word) malloc::size#2 init_squares/(word) malloc::size#0 ) - (byte*) heap_head#12 ← phi( @39/(byte*) heap_head#23 @45/(byte*) heap_head#5 init_squares/(byte*) heap_head#24 ) + to:@12 +malloc: scope:[malloc] from @40 @46 init_squares + (word) malloc::size#3 ← phi( @40/(word) malloc::size#1 @46/(word) malloc::size#2 init_squares/(word) malloc::size#0 ) + (byte*) heap_head#12 ← phi( @40/(byte*) heap_head#23 @46/(byte*) heap_head#5 init_squares/(byte*) heap_head#24 ) (byte*~) malloc::$0 ← (byte*) heap_head#12 - (word) malloc::size#3 (byte*) malloc::mem#0 ← (byte*~) malloc::$0 (byte*) heap_head#1 ← (byte*) malloc::mem#0 @@ -194,39 +232,11 @@ bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2 (word*~) bsearch16u::$4 ← phi( bsearch16u::@1/(word*~) bsearch16u::$3 bsearch16u::@2/(word*~) bsearch16u::$2 ) (word*) bsearch16u::return#2 ← (word*~) bsearch16u::$4 to:bsearch16u::@return -memset: scope:[memset] from main::@11 - (byte) memset::c#2 ← phi( main::@11/(byte) memset::c#0 ) - (word) memset::num#1 ← phi( main::@11/(word) memset::num#0 ) - (void*) memset::str#1 ← phi( main::@11/(void*) memset::str#0 ) - (byte*~) memset::$0 ← ((byte*)) (void*) memset::str#1 - (byte*~) memset::$1 ← (byte*~) memset::$0 + (word) memset::num#1 - (byte*) memset::end#0 ← (byte*~) memset::$1 - (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#1 - to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - (void*) memset::str#3 ← phi( memset/(void*) memset::str#1 memset::@1/(void*) memset::str#3 ) - (byte*) memset::end#1 ← phi( memset/(byte*) memset::end#0 memset::@1/(byte*) memset::end#1 ) - (byte*) memset::dst#2 ← phi( memset/(byte*) memset::dst#0 memset::@1/(byte*) memset::dst#1 ) - (byte) memset::c#1 ← phi( memset/(byte) memset::c#2 memset::@1/(byte) memset::c#1 ) - *((byte*) memset::dst#2) ← (byte) memset::c#1 - (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - (bool~) memset::$2 ← (byte*) memset::dst#1 != (byte*) memset::end#1 - if((bool~) memset::$2) goto memset::@1 - to:memset::@2 -memset::@2: scope:[memset] from memset::@1 - (void*) memset::str#2 ← phi( memset::@1/(void*) memset::str#3 ) - (void*) memset::return#0 ← (void*) memset::str#2 - to:memset::@return -memset::@return: scope:[memset] from memset::@2 - (void*) memset::return#3 ← phi( memset::@2/(void*) memset::return#0 ) - (void*) memset::return#1 ← (void*) memset::return#3 - return - to:@return -@11: scope:[] from @4 - (byte*) heap_head#44 ← phi( @4/(byte*) heap_head#0 ) +@12: scope:[] from @8 + (byte*) heap_head#44 ← phi( @8/(byte*) heap_head#0 ) (byte) NUM_SQUARES#0 ← (number) $ff (word*) SQUARES#0 ← (word*) 0 - to:@14 + to:@15 init_squares: scope:[init_squares] from init_dist_screen (byte*) heap_head#24 ← phi( init_dist_screen/(byte*) heap_head#28 ) (byte) NUM_SQUARES#6 ← phi( init_dist_screen/(byte) NUM_SQUARES#3 ) @@ -306,15 +316,15 @@ sqrt::@return: scope:[sqrt] from sqrt::@2 (byte) sqrt::return#1 ← (byte) sqrt::return#3 return to:@return -@14: scope:[] from @11 - (word*) SQUARES#49 ← phi( @11/(word*) SQUARES#0 ) - (byte) NUM_SQUARES#42 ← phi( @11/(byte) NUM_SQUARES#0 ) - (byte*) heap_head#40 ← phi( @11/(byte*) heap_head#44 ) +@15: scope:[] from @12 + (word*) SQUARES#49 ← phi( @12/(word*) SQUARES#0 ) + (byte) NUM_SQUARES#42 ← phi( @12/(byte) NUM_SQUARES#0 ) + (byte*) heap_head#40 ← phi( @12/(byte*) heap_head#44 ) (byte) CORDIC_ITERATIONS_16#0 ← (number) $f (word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 ← kickasm {{ .for (var i=0; i<CORDIC_ITERATIONS_16; i++) .word 256*2*256*atan(1/pow(2,i))/PI/2 }} - to:@16 + to:@17 atan2_16: scope:[atan2_16] from init_angle_screen::@2 (signed word) atan2_16::x#9 ← phi( init_angle_screen::@2/(signed word) atan2_16::x#0 ) (signed word) atan2_16::y#1 ← phi( init_angle_screen::@2/(signed word) atan2_16::y#0 ) @@ -525,14 +535,14 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 (word) atan2_16::return#1 ← (word) atan2_16::return#3 return to:@return -@16: scope:[] from @14 - (word*) SQUARES#47 ← phi( @14/(word*) SQUARES#49 ) - (byte) NUM_SQUARES#38 ← phi( @14/(byte) NUM_SQUARES#42 ) - (byte*) heap_head#36 ← phi( @14/(byte*) heap_head#40 ) +@17: scope:[] from @15 + (word*) SQUARES#47 ← phi( @15/(word*) SQUARES#49 ) + (byte) NUM_SQUARES#38 ← phi( @15/(byte) NUM_SQUARES#42 ) + (byte*) heap_head#36 ← phi( @15/(byte*) heap_head#40 ) (byte*) print_screen#0 ← ((byte*)) (number) $400 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 - to:@37 + to:@38 print_char: scope:[print_char] from make_plasma_charset::@8 (byte*) print_char_cursor#11 ← phi( make_plasma_charset::@8/(byte*) print_char_cursor#20 ) (byte) print_char::ch#1 ← phi( make_plasma_charset::@8/(byte) print_char::ch#0 ) @@ -569,18 +579,18 @@ print_cls::@return: scope:[print_cls] from print_cls::@2 (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#13 return to:@return -@37: scope:[] from @16 - (byte*) print_screen#14 ← phi( @16/(byte*) print_screen#0 ) - (byte*) print_char_cursor#43 ← phi( @16/(byte*) print_char_cursor#0 ) - (byte*) print_line_cursor#38 ← phi( @16/(byte*) print_line_cursor#0 ) - (word*) SQUARES#45 ← phi( @16/(word*) SQUARES#47 ) - (byte) NUM_SQUARES#35 ← phi( @16/(byte) NUM_SQUARES#38 ) - (byte*) heap_head#31 ← phi( @16/(byte*) heap_head#36 ) +@38: scope:[] from @17 + (byte*) print_screen#14 ← phi( @17/(byte*) print_screen#0 ) + (byte*) print_char_cursor#43 ← phi( @17/(byte*) print_char_cursor#0 ) + (byte*) print_line_cursor#38 ← phi( @17/(byte*) print_line_cursor#0 ) + (word*) SQUARES#45 ← phi( @17/(word*) SQUARES#47 ) + (byte) NUM_SQUARES#35 ← phi( @17/(byte) NUM_SQUARES#38 ) + (byte*) heap_head#31 ← phi( @17/(byte*) heap_head#36 ) (word*) SID_VOICE3_FREQ#0 ← ((word*)) (number) $d40e (byte*) SID_VOICE3_CONTROL#0 ← ((byte*)) (number) $d412 (byte) SID_CONTROL_NOISE#0 ← (number) $80 (byte*) SID_VOICE3_OSC#0 ← ((byte*)) (number) $d41b - to:@39 + to:@40 sid_rnd_init: scope:[sid_rnd_init] from make_plasma_charset *((word*) SID_VOICE3_FREQ#0) ← (number) $ffff *((byte*) SID_VOICE3_CONTROL#0) ← (byte) SID_CONTROL_NOISE#0 @@ -596,59 +606,59 @@ sid_rnd::@return: scope:[sid_rnd] from sid_rnd (byte) sid_rnd::return#1 ← (byte) sid_rnd::return#3 return to:@return -@39: scope:[] from @37 - (byte*) print_screen#13 ← phi( @37/(byte*) print_screen#14 ) - (byte*) print_char_cursor#39 ← phi( @37/(byte*) print_char_cursor#43 ) - (byte*) print_line_cursor#34 ← phi( @37/(byte*) print_line_cursor#38 ) - (word*) SQUARES#43 ← phi( @37/(word*) SQUARES#45 ) - (byte) NUM_SQUARES#32 ← phi( @37/(byte) NUM_SQUARES#35 ) - (byte*) heap_head#23 ← phi( @37/(byte*) heap_head#31 ) +@40: scope:[] from @38 + (byte*) print_screen#13 ← phi( @38/(byte*) print_screen#14 ) + (byte*) print_char_cursor#39 ← phi( @38/(byte*) print_char_cursor#43 ) + (byte*) print_line_cursor#34 ← phi( @38/(byte*) print_line_cursor#38 ) + (word*) SQUARES#43 ← phi( @38/(word*) SQUARES#45 ) + (byte) NUM_SQUARES#32 ← phi( @38/(byte) NUM_SQUARES#35 ) + (byte*) heap_head#23 ← phi( @38/(byte*) heap_head#31 ) (byte[$200]) SINTABLE#0 ← kickasm {{ .for(var i=0;i<$200;i++) .byte round(127.5+127.5*sin(2*PI*i/256)) }} (word) malloc::size#1 ← (number) $3e8 call malloc (void*) malloc::return#3 ← (void*) malloc::return#1 - to:@45 -@45: scope:[] from @39 - (byte*) print_screen#12 ← phi( @39/(byte*) print_screen#13 ) - (byte*) print_char_cursor#36 ← phi( @39/(byte*) print_char_cursor#39 ) - (byte*) print_line_cursor#31 ← phi( @39/(byte*) print_line_cursor#34 ) - (word*) SQUARES#39 ← phi( @39/(word*) SQUARES#43 ) - (byte) NUM_SQUARES#28 ← phi( @39/(byte) NUM_SQUARES#32 ) - (byte*) heap_head#16 ← phi( @39/(byte*) heap_head#2 ) - (void*) malloc::return#7 ← phi( @39/(void*) malloc::return#3 ) + to:@46 +@46: scope:[] from @40 + (byte*) print_screen#12 ← phi( @40/(byte*) print_screen#13 ) + (byte*) print_char_cursor#36 ← phi( @40/(byte*) print_char_cursor#39 ) + (byte*) print_line_cursor#31 ← phi( @40/(byte*) print_line_cursor#34 ) + (word*) SQUARES#39 ← phi( @40/(word*) SQUARES#43 ) + (byte) NUM_SQUARES#28 ← phi( @40/(byte) NUM_SQUARES#32 ) + (byte*) heap_head#16 ← phi( @40/(byte*) heap_head#2 ) + (void*) malloc::return#7 ← phi( @40/(void*) malloc::return#3 ) (void*~) $0 ← (void*) malloc::return#7 (byte*) heap_head#5 ← (byte*) heap_head#16 (byte*) SCREEN_DIST#0 ← ((byte*)) (void*~) $0 (word) malloc::size#2 ← (number) $3e8 call malloc (void*) malloc::return#4 ← (void*) malloc::return#1 - to:@46 -@46: scope:[] from @45 - (byte*) print_screen#11 ← phi( @45/(byte*) print_screen#12 ) - (byte*) print_char_cursor#34 ← phi( @45/(byte*) print_char_cursor#36 ) - (byte*) print_line_cursor#28 ← phi( @45/(byte*) print_line_cursor#31 ) - (word*) SQUARES#36 ← phi( @45/(word*) SQUARES#39 ) - (byte) NUM_SQUARES#25 ← phi( @45/(byte) NUM_SQUARES#28 ) - (byte*) heap_head#17 ← phi( @45/(byte*) heap_head#2 ) - (void*) malloc::return#8 ← phi( @45/(void*) malloc::return#4 ) + to:@47 +@47: scope:[] from @46 + (byte*) print_screen#11 ← phi( @46/(byte*) print_screen#12 ) + (byte*) print_char_cursor#34 ← phi( @46/(byte*) print_char_cursor#36 ) + (byte*) print_line_cursor#28 ← phi( @46/(byte*) print_line_cursor#31 ) + (word*) SQUARES#36 ← phi( @46/(word*) SQUARES#39 ) + (byte) NUM_SQUARES#25 ← phi( @46/(byte) NUM_SQUARES#28 ) + (byte*) heap_head#17 ← phi( @46/(byte*) heap_head#2 ) + (void*) malloc::return#8 ← phi( @46/(void*) malloc::return#4 ) (void*~) $1 ← (void*) malloc::return#8 (byte*) heap_head#6 ← (byte*) heap_head#17 (byte*) SCREEN_ANGLE#0 ← ((byte*)) (void*~) $1 (byte*) CHARSET#0 ← ((byte*)) (number) $2000 (byte*) SCREEN1#0 ← ((byte*)) (number) $2800 (byte*) SCREEN2#0 ← ((byte*)) (number) $2c00 - to:@40 -main: scope:[main] from @44 - (byte) sin_offset_y#30 ← phi( @44/(byte) sin_offset_y#18 ) - (byte) sin_offset_x#30 ← phi( @44/(byte) sin_offset_x#18 ) - (byte*) print_screen#8 ← phi( @44/(byte*) print_screen#9 ) - (byte*) print_char_cursor#32 ← phi( @44/(byte*) print_char_cursor#25 ) - (byte*) print_line_cursor#26 ← phi( @44/(byte*) print_line_cursor#18 ) - (word*) SQUARES#21 ← phi( @44/(word*) SQUARES#25 ) - (byte*) heap_head#26 ← phi( @44/(byte*) heap_head#30 ) - (byte) NUM_SQUARES#14 ← phi( @44/(byte) NUM_SQUARES#17 ) + to:@41 +main: scope:[main] from @45 + (byte) sin_offset_y#30 ← phi( @45/(byte) sin_offset_y#18 ) + (byte) sin_offset_x#30 ← phi( @45/(byte) sin_offset_x#18 ) + (byte*) print_screen#8 ← phi( @45/(byte*) print_screen#9 ) + (byte*) print_char_cursor#32 ← phi( @45/(byte*) print_char_cursor#25 ) + (byte*) print_line_cursor#26 ← phi( @45/(byte*) print_line_cursor#18 ) + (word*) SQUARES#21 ← phi( @45/(word*) SQUARES#25 ) + (byte*) heap_head#26 ← phi( @45/(byte*) heap_head#30 ) + (byte) NUM_SQUARES#14 ← phi( @45/(byte) NUM_SQUARES#17 ) (byte*) init_dist_screen::screen#0 ← (byte*) SCREEN_DIST#0 call init_dist_screen to:main::@9 @@ -858,16 +868,16 @@ main::@return: scope:[main] from main::@1 (byte) sin_offset_y#2 ← (byte) sin_offset_y#9 return to:@return -@40: scope:[] from @46 - (byte*) print_screen#10 ← phi( @46/(byte*) print_screen#11 ) - (byte*) print_char_cursor#31 ← phi( @46/(byte*) print_char_cursor#34 ) - (byte*) print_line_cursor#25 ← phi( @46/(byte*) print_line_cursor#28 ) - (word*) SQUARES#33 ← phi( @46/(word*) SQUARES#36 ) - (byte*) heap_head#35 ← phi( @46/(byte*) heap_head#6 ) - (byte) NUM_SQUARES#22 ← phi( @46/(byte) NUM_SQUARES#25 ) +@41: scope:[] from @47 + (byte*) print_screen#10 ← phi( @47/(byte*) print_screen#11 ) + (byte*) print_char_cursor#31 ← phi( @47/(byte*) print_char_cursor#34 ) + (byte*) print_line_cursor#25 ← phi( @47/(byte*) print_line_cursor#28 ) + (word*) SQUARES#33 ← phi( @47/(word*) SQUARES#36 ) + (byte*) heap_head#35 ← phi( @47/(byte*) heap_head#6 ) + (byte) NUM_SQUARES#22 ← phi( @47/(byte) NUM_SQUARES#25 ) (byte) sin_offset_x#3 ← (number) 0 (byte) sin_offset_y#3 ← (number) 0 - to:@44 + to:@45 doplasma: scope:[doplasma] from main::@2 main::@7 (byte*) doplasma::screen#6 ← phi( main::@2/(byte*) doplasma::screen#0 main::@7/(byte*) doplasma::screen#1 ) (byte) sin_offset_y#10 ← phi( main::@2/(byte) sin_offset_y#14 main::@7/(byte) sin_offset_y#15 ) @@ -1359,25 +1369,25 @@ make_plasma_charset::@return: scope:[make_plasma_charset] from make_plasma_char (byte*) print_char_cursor#9 ← (byte*) print_char_cursor#18 return to:@return -@44: scope:[] from @40 - (byte*) print_screen#9 ← phi( @40/(byte*) print_screen#10 ) - (byte) sin_offset_y#18 ← phi( @40/(byte) sin_offset_y#3 ) - (byte) sin_offset_x#18 ← phi( @40/(byte) sin_offset_x#3 ) - (byte*) print_char_cursor#25 ← phi( @40/(byte*) print_char_cursor#31 ) - (byte*) print_line_cursor#18 ← phi( @40/(byte*) print_line_cursor#25 ) - (word*) SQUARES#25 ← phi( @40/(word*) SQUARES#33 ) - (byte*) heap_head#30 ← phi( @40/(byte*) heap_head#35 ) - (byte) NUM_SQUARES#17 ← phi( @40/(byte) NUM_SQUARES#22 ) +@45: scope:[] from @41 + (byte*) print_screen#9 ← phi( @41/(byte*) print_screen#10 ) + (byte) sin_offset_y#18 ← phi( @41/(byte) sin_offset_y#3 ) + (byte) sin_offset_x#18 ← phi( @41/(byte) sin_offset_x#3 ) + (byte*) print_char_cursor#25 ← phi( @41/(byte*) print_char_cursor#31 ) + (byte*) print_line_cursor#18 ← phi( @41/(byte*) print_line_cursor#25 ) + (word*) SQUARES#25 ← phi( @41/(word*) SQUARES#33 ) + (byte*) heap_head#30 ← phi( @41/(byte*) heap_head#35 ) + (byte) NUM_SQUARES#17 ← phi( @41/(byte) NUM_SQUARES#22 ) call main - to:@47 -@47: scope:[] from @44 - (byte) sin_offset_y#13 ← phi( @44/(byte) sin_offset_y#2 ) - (byte) sin_offset_x#13 ← phi( @44/(byte) sin_offset_x#2 ) - (byte*) print_char_cursor#19 ← phi( @44/(byte*) print_char_cursor#6 ) - (byte*) print_line_cursor#13 ← phi( @44/(byte*) print_line_cursor#4 ) - (word*) SQUARES#16 ← phi( @44/(word*) SQUARES#4 ) - (byte*) heap_head#22 ← phi( @44/(byte*) heap_head#8 ) - (byte) NUM_SQUARES#12 ← phi( @44/(byte) NUM_SQUARES#2 ) + to:@48 +@48: scope:[] from @45 + (byte) sin_offset_y#13 ← phi( @45/(byte) sin_offset_y#2 ) + (byte) sin_offset_x#13 ← phi( @45/(byte) sin_offset_x#2 ) + (byte*) print_char_cursor#19 ← phi( @45/(byte*) print_char_cursor#6 ) + (byte*) print_line_cursor#13 ← phi( @45/(byte*) print_line_cursor#4 ) + (word*) SQUARES#16 ← phi( @45/(word*) SQUARES#4 ) + (byte*) heap_head#22 ← phi( @45/(byte*) heap_head#8 ) + (byte) NUM_SQUARES#12 ← phi( @45/(byte) NUM_SQUARES#2 ) (byte) NUM_SQUARES#5 ← (byte) NUM_SQUARES#12 (byte*) heap_head#11 ← (byte*) heap_head#22 (word*) SQUARES#7 ← (word*) SQUARES#16 @@ -1386,22 +1396,22 @@ make_plasma_charset::@return: scope:[make_plasma_charset] from make_plasma_char (byte) sin_offset_x#6 ← (byte) sin_offset_x#13 (byte) sin_offset_y#6 ← (byte) sin_offset_y#13 to:@end -@end: scope:[] from @47 +@end: scope:[] from @48 SYMBOL TABLE SSA (void*~) $0 (void*~) $1 -(label) @11 -(label) @14 -(label) @16 -(label) @37 -(label) @39 -(label) @4 +(label) @12 +(label) @15 +(label) @17 +(label) @38 (label) @40 -(label) @44 +(label) @41 (label) @45 (label) @46 (label) @47 +(label) @48 +(label) @8 (label) @begin (label) @end (byte) BLACK @@ -2323,16 +2333,20 @@ SYMBOL TABLE SSA (word) malloc::size#2 (word) malloc::size#3 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) -(byte*~) memset::$0 -(byte*~) memset::$1 -(bool~) memset::$2 +(bool~) memset::$0 +(bool~) memset::$1 +(byte*~) memset::$2 +(byte*~) memset::$3 +(bool~) memset::$4 (label) memset::@1 (label) memset::@2 +(label) memset::@4 (label) memset::@return (byte) memset::c (byte) memset::c#0 (byte) memset::c#1 (byte) memset::c#2 +(byte) memset::c#3 (byte*) memset::dst (byte*) memset::dst#0 (byte*) memset::dst#1 @@ -2343,6 +2357,7 @@ SYMBOL TABLE SSA (word) memset::num (word) memset::num#0 (word) memset::num#1 +(word) memset::num#2 (void*) memset::return (void*) memset::return#0 (void*) memset::return#1 @@ -2353,6 +2368,7 @@ SYMBOL TABLE SSA (void*) memset::str#1 (void*) memset::str#2 (void*) memset::str#3 +(void*) memset::str#4 (void()) print_char((byte) print_char::ch) (label) print_char::@return (byte) print_char::ch @@ -2599,6 +2615,7 @@ Fixing inline constructor with init_angle_screen::$17 ← (byte)init_angle_scree Fixing inline constructor with init_angle_screen::$18 ← (byte)init_angle_screen::$6 w= (byte)0 Successful SSA optimization Pass2FixInlineConstructorsNew Adding number conversion cast (unumber) 0 in (byte) BLACK#0 ← (number) 0 +Adding number conversion cast (unumber) 0 in (bool~) memset::$0 ← (word) memset::num#1 > (number) 0 Adding number conversion cast (unumber) 0 in (bool~) bsearch16u::$5 ← (byte) bsearch16u::num#3 > (number) 0 Adding number conversion cast (unumber) 1 in (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#4 >> (number) 1 Adding number conversion cast (snumber) 0 in (bool~) bsearch16u::$11 ← (signed word) bsearch16u::result#0 == (number) 0 @@ -2752,12 +2769,12 @@ Successful SSA optimization PassNAddArrayNumberTypeConversions Inlining cast (byte*) D018#0 ← (byte*)(number) $d018 Inlining cast (byte*) COLS#0 ← (byte*)(number) $d800 Inlining cast (byte) BLACK#0 ← (unumber)(number) 0 +Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#2 +Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 Inlining cast (byte*) HEAP_TOP#0 ← (byte*)(number) $a000 Inlining cast (void*) malloc::return#0 ← (void*)(byte*) malloc::mem#0 Inlining cast (signed word~) bsearch16u::$8 ← (signed word)(word) bsearch16u::key#1 Inlining cast (signed word~) bsearch16u::$9 ← (signed word)*((word*) bsearch16u::pivot#0) -Inlining cast (byte*~) memset::$0 ← (byte*)(void*) memset::str#1 -Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#1 Inlining cast (byte) NUM_SQUARES#0 ← (unumber)(number) $ff Inlining cast (word*) SQUARES#1 ← (word*)(void*~) init_squares::$1 Inlining cast (word) init_squares::sqr#0 ← (unumber)(number) 0 @@ -2799,6 +2816,7 @@ Successful SSA optimization Pass2InlineCast Simplifying constant pointer cast (byte*) 53272 Simplifying constant pointer cast (byte*) 55296 Simplifying constant integer cast 0 +Simplifying constant integer cast 0 Simplifying constant pointer cast (byte*) 40960 Simplifying constant integer cast 0 Simplifying constant integer cast 1 @@ -2907,6 +2925,7 @@ Simplifying constant integer cast $100 Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 1 Finalized signed number type (signed byte) 0 Finalized signed number type (signed byte) 0 @@ -3036,15 +3055,21 @@ Inferred type updated to byte in (unumber~) make_plasma_charset::$4 ← (byte~) Inferred type updated to word in (unumber~) make_plasma_charset::$8 ← (word) make_plasma_charset::c#3 * (byte) 8 Inferred type updated to word in (unumber~) make_plasma_charset::$9 ← (word~) make_plasma_charset::$8 + (byte) make_plasma_charset::i#2 Inferred type updated to byte in (unumber~) make_plasma_charset::$11 ← (word) make_plasma_charset::c#4 & (byte) 7 -Inversing boolean not [28] (bool~) bsearch16u::$12 ← (signed word) bsearch16u::result#0 != (signed byte) 0 from [27] (bool~) bsearch16u::$11 ← (signed word) bsearch16u::result#0 == (signed byte) 0 -Inversing boolean not [35] (bool~) bsearch16u::$14 ← (signed word) bsearch16u::result#1 <= (signed byte) 0 from [34] (bool~) bsearch16u::$13 ← (signed word) bsearch16u::result#1 > (signed byte) 0 -Inversing boolean not [151] (bool~) atan2_16::$18 ← (signed word) atan2_16::yi#3 != (signed byte) 0 from [150] (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (signed byte) 0 -Inversing boolean not [160] (bool~) atan2_16::$11 ← (signed word) atan2_16::x#4 >= (signed byte) 0 from [159] (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (signed byte) 0 -Inversing boolean not [171] (bool~) atan2_16::$20 ← (byte) 0 == (byte) atan2_16::shift#4 from [170] (bool~) atan2_16::$25 ← (byte) 0 != (byte) atan2_16::shift#4 -Inversing boolean not [195] (bool~) atan2_16::$14 ← (signed word) atan2_16::y#4 >= (signed byte) 0 from [194] (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (signed byte) 0 -Inversing boolean not [525] (bool~) make_plasma_charset::$6 ← (byte~) make_plasma_charset::$4 <= (byte) make_plasma_charset::s#1 from [524] (bool~) make_plasma_charset::$5 ← (byte~) make_plasma_charset::$4 > (byte) make_plasma_charset::s#1 -Inversing boolean not [543] (bool~) make_plasma_charset::$13 ← (byte~) make_plasma_charset::$11 != (byte) 0 from [542] (bool~) make_plasma_charset::$12 ← (byte~) make_plasma_charset::$11 == (byte) 0 +Inversing boolean not [5] (bool~) memset::$1 ← (word) memset::num#1 <= (byte) 0 from [4] (bool~) memset::$0 ← (word) memset::num#1 > (byte) 0 +Inversing boolean not [47] (bool~) bsearch16u::$12 ← (signed word) bsearch16u::result#0 != (signed byte) 0 from [46] (bool~) bsearch16u::$11 ← (signed word) bsearch16u::result#0 == (signed byte) 0 +Inversing boolean not [54] (bool~) bsearch16u::$14 ← (signed word) bsearch16u::result#1 <= (signed byte) 0 from [53] (bool~) bsearch16u::$13 ← (signed word) bsearch16u::result#1 > (signed byte) 0 +Inversing boolean not [155] (bool~) atan2_16::$18 ← (signed word) atan2_16::yi#3 != (signed byte) 0 from [154] (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (signed byte) 0 +Inversing boolean not [164] (bool~) atan2_16::$11 ← (signed word) atan2_16::x#4 >= (signed byte) 0 from [163] (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (signed byte) 0 +Inversing boolean not [175] (bool~) atan2_16::$20 ← (byte) 0 == (byte) atan2_16::shift#4 from [174] (bool~) atan2_16::$25 ← (byte) 0 != (byte) atan2_16::shift#4 +Inversing boolean not [199] (bool~) atan2_16::$14 ← (signed word) atan2_16::y#4 >= (signed byte) 0 from [198] (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (signed byte) 0 +Inversing boolean not [529] (bool~) make_plasma_charset::$6 ← (byte~) make_plasma_charset::$4 <= (byte) make_plasma_charset::s#1 from [528] (bool~) make_plasma_charset::$5 ← (byte~) make_plasma_charset::$4 > (byte) make_plasma_charset::s#1 +Inversing boolean not [547] (bool~) make_plasma_charset::$13 ← (byte~) make_plasma_charset::$11 != (byte) 0 from [546] (bool~) make_plasma_charset::$12 ← (byte~) make_plasma_charset::$11 == (byte) 0 Successful SSA optimization Pass2UnaryNotSimplification +Alias (void*) memset::return#0 = (void*) memset::str#1 (void*) memset::return#3 (void*) memset::return#1 +Alias (void*) memset::str#2 = (void*) memset::str#3 +Alias (word) memset::num#1 = (word) memset::num#2 +Alias (byte) memset::c#2 = (byte) memset::c#3 +Alias (byte*) memset::end#0 = (byte*~) memset::$3 Alias (byte*) HEAP_TOP#0 = (byte*) heap_head#0 (byte*) heap_head#44 (byte*) heap_head#40 (byte*) heap_head#36 (byte*) heap_head#31 (byte*) heap_head#23 Alias (byte*) malloc::mem#0 = (byte*~) malloc::$0 Alias (void*) malloc::return#0 = (void*) malloc::return#5 (void*) malloc::return#1 @@ -3058,8 +3083,6 @@ Alias (word*) bsearch16u::return#1 = (word*) bsearch16u::return#4 Alias (word*) bsearch16u::items#0 = (word*~) bsearch16u::$15 Alias (word*~) bsearch16u::$2 = (word*~) bsearch16u::$1 Alias (word*) bsearch16u::return#2 = (word*~) bsearch16u::$4 -Alias (byte*) memset::end#0 = (byte*~) memset::$1 -Alias (void*) memset::return#0 = (void*) memset::str#2 (void*) memset::str#3 (void*) memset::return#3 (void*) memset::return#1 Alias (word) malloc::size#0 = (byte~) init_squares::$0 Alias (void*) malloc::return#2 = (void*) malloc::return#6 Alias (byte) NUM_SQUARES#6 = (byte) NUM_SQUARES#7 @@ -3290,10 +3313,10 @@ Alias (byte) make_plasma_charset::s#1 = (byte) make_plasma_charset::s#4 Alias (byte*) print_line_cursor#12 = (byte*) print_line_cursor#23 (byte*) print_line_cursor#36 Alias (byte*) print_char_cursor#20 = (byte*) print_char_cursor#41 Successful SSA optimization Pass2AliasElimination -Self Phi Eliminated (word) bsearch16u::key#1 Self Phi Eliminated (byte) memset::c#1 Self Phi Eliminated (byte*) memset::end#1 -Self Phi Eliminated (void*) memset::return#0 +Self Phi Eliminated (void*) memset::str#4 +Self Phi Eliminated (word) bsearch16u::key#1 Self Phi Eliminated (byte*) heap_head#15 Self Phi Eliminated (word*) SQUARES#17 Self Phi Eliminated (signed word) atan2_16::yi#10 @@ -3333,16 +3356,16 @@ Self Phi Eliminated (byte*) make_plasma_charset::charset#1 Self Phi Eliminated (byte*) print_line_cursor#12 Self Phi Eliminated (byte*) print_char_cursor#20 Successful SSA optimization Pass2SelfPhiElimination +Identical Phi Values (word) memset::num#1 (word) memset::num#0 +Identical Phi Values (void*) memset::str#2 (void*) memset::str#0 +Identical Phi Values (byte) memset::c#2 (byte) memset::c#0 +Identical Phi Values (byte) memset::c#1 (byte) memset::c#2 +Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0 +Identical Phi Values (void*) memset::str#4 (void*) memset::str#2 Identical Phi Values (byte) bsearch16u::num#7 (byte) bsearch16u::num#2 Identical Phi Values (word*) bsearch16u::items#7 (word*) bsearch16u::items#1 Identical Phi Values (word) bsearch16u::key#4 (word) bsearch16u::key#0 Identical Phi Values (word) bsearch16u::key#1 (word) bsearch16u::key#4 -Identical Phi Values (void*) memset::str#1 (void*) memset::str#0 -Identical Phi Values (word) memset::num#1 (word) memset::num#0 -Identical Phi Values (byte) memset::c#2 (byte) memset::c#0 -Identical Phi Values (byte) memset::c#1 (byte) memset::c#2 -Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0 -Identical Phi Values (void*) memset::return#0 (void*) memset::str#1 Identical Phi Values (byte) NUM_SQUARES#6 (byte) NUM_SQUARES#3 Identical Phi Values (byte*) heap_head#24 (byte*) heap_head#28 Identical Phi Values (byte*) heap_head#14 (byte*) heap_head#1 @@ -3432,45 +3455,47 @@ Identical Phi Values (byte*) print_char_cursor#10 (byte*) print_char_cursor#15 Identical Phi Values (byte) sin_offset_x#13 (byte) sin_offset_x#14 Identical Phi Values (byte) sin_offset_y#13 (byte) sin_offset_y#14 Successful SSA optimization Pass2IdenticalPhiElimination +Identical Phi Values (void*) memset::return#0 (void*) memset::str#0 Identical Phi Values (word*) SQUARES#9 (word*) SQUARES#18 Identical Phi Values (signed word) atan2_16::x#4 (signed word) atan2_16::x#17 Identical Phi Values (signed word) atan2_16::y#4 (signed word) atan2_16::y#19 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) bsearch16u::$5 [17] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@7 -Simple Condition (bool~) bsearch16u::$12 [29] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 -Simple Condition (bool~) bsearch16u::$0 [32] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@1 -Simple Condition (bool~) bsearch16u::$14 [36] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 -Simple Condition (bool~) memset::$2 [66] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -Simple Condition (bool~) init_squares::$5 [96] if((byte) init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 -Simple Condition (bool~) atan2_16::$0 [129] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -Simple Condition (bool~) atan2_16::$5 [138] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -Simple Condition (bool~) atan2_16::$18 [152] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 -Simple Condition (bool~) atan2_16::$11 [161] if((signed word) atan2_16::x#17>=(signed byte) 0) goto atan2_16::@7 -Simple Condition (bool~) atan2_16::$19 [164] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 -Simple Condition (bool~) atan2_16::$20 [172] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 -Simple Condition (bool~) atan2_16::$21 [175] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 -Simple Condition (bool~) atan2_16::$22 [192] if((byte) atan2_16::i#1!=rangelast(0,atan2_16::$16)) goto atan2_16::@15 -Simple Condition (bool~) atan2_16::$14 [196] if((signed word) atan2_16::y#19>=(signed byte) 0) goto atan2_16::@8 -Simple Condition (bool~) print_cls::$1 [225] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 -Simple Condition (bool~) doplasma::$3 [361] if((byte) doplasma::x#1!=rangelast(0,$27)) goto doplasma::@2 -Simple Condition (bool~) doplasma::$4 [368] if((byte) doplasma::y#1!=rangelast(0,$19)) goto doplasma::@1 -Simple Condition (bool~) init_angle_screen::$15 [417] if((byte) init_angle_screen::x#1<=(byte) $13) goto init_angle_screen::@2 -Simple Condition (bool~) init_angle_screen::$16 [423] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 -Simple Condition (bool~) init_dist_screen::$3 [439] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 -Simple Condition (bool~) init_dist_screen::$11 [460] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 -Simple Condition (bool~) init_dist_screen::$20 [490] if((byte) init_dist_screen::x#1<=(byte) $13) goto init_dist_screen::@5 -Simple Condition (bool~) init_dist_screen::$21 [496] if((byte) init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 -Simple Condition (bool~) make_plasma_charset::$6 [526] if((byte~) make_plasma_charset::$4<=(byte) make_plasma_charset::s#3) goto make_plasma_charset::@4 -Simple Condition (bool~) make_plasma_charset::$7 [530] if((byte) make_plasma_charset::ii#1<(byte) 8) goto make_plasma_charset::@3 -Simple Condition (bool~) make_plasma_charset::$10 [539] if((byte) make_plasma_charset::i#1<(byte) 8) goto make_plasma_charset::@2 -Simple Condition (bool~) make_plasma_charset::$13 [544] if((byte~) make_plasma_charset::$11!=(byte) 0) goto make_plasma_charset::@9 -Simple Condition (bool~) make_plasma_charset::$15 [548] if((word) make_plasma_charset::c#1<(word) $100) goto make_plasma_charset::@1 +Simple Condition (bool~) memset::$1 [6] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [18] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 +Simple Condition (bool~) bsearch16u::$5 [36] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@7 +Simple Condition (bool~) bsearch16u::$12 [48] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 +Simple Condition (bool~) bsearch16u::$0 [51] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@1 +Simple Condition (bool~) bsearch16u::$14 [55] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 +Simple Condition (bool~) init_squares::$5 [100] if((byte) init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 +Simple Condition (bool~) atan2_16::$0 [133] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 +Simple Condition (bool~) atan2_16::$5 [142] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 +Simple Condition (bool~) atan2_16::$18 [156] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 +Simple Condition (bool~) atan2_16::$11 [165] if((signed word) atan2_16::x#17>=(signed byte) 0) goto atan2_16::@7 +Simple Condition (bool~) atan2_16::$19 [168] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 +Simple Condition (bool~) atan2_16::$20 [176] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 +Simple Condition (bool~) atan2_16::$21 [179] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 +Simple Condition (bool~) atan2_16::$22 [196] if((byte) atan2_16::i#1!=rangelast(0,atan2_16::$16)) goto atan2_16::@15 +Simple Condition (bool~) atan2_16::$14 [200] if((signed word) atan2_16::y#19>=(signed byte) 0) goto atan2_16::@8 +Simple Condition (bool~) print_cls::$1 [229] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 +Simple Condition (bool~) doplasma::$3 [365] if((byte) doplasma::x#1!=rangelast(0,$27)) goto doplasma::@2 +Simple Condition (bool~) doplasma::$4 [372] if((byte) doplasma::y#1!=rangelast(0,$19)) goto doplasma::@1 +Simple Condition (bool~) init_angle_screen::$15 [421] if((byte) init_angle_screen::x#1<=(byte) $13) goto init_angle_screen::@2 +Simple Condition (bool~) init_angle_screen::$16 [427] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 +Simple Condition (bool~) init_dist_screen::$3 [443] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 +Simple Condition (bool~) init_dist_screen::$11 [464] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6 +Simple Condition (bool~) init_dist_screen::$20 [494] if((byte) init_dist_screen::x#1<=(byte) $13) goto init_dist_screen::@5 +Simple Condition (bool~) init_dist_screen::$21 [500] if((byte) init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 +Simple Condition (bool~) make_plasma_charset::$6 [530] if((byte~) make_plasma_charset::$4<=(byte) make_plasma_charset::s#3) goto make_plasma_charset::@4 +Simple Condition (bool~) make_plasma_charset::$7 [534] if((byte) make_plasma_charset::ii#1<(byte) 8) goto make_plasma_charset::@3 +Simple Condition (bool~) make_plasma_charset::$10 [543] if((byte) make_plasma_charset::i#1<(byte) 8) goto make_plasma_charset::@2 +Simple Condition (bool~) make_plasma_charset::$13 [548] if((byte~) make_plasma_charset::$11!=(byte) 0) goto make_plasma_charset::@9 +Simple Condition (bool~) make_plasma_charset::$15 [552] if((word) make_plasma_charset::c#1<(word) $100) goto make_plasma_charset::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [192] if((byte) atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 +Negating conditional jump and destination [196] if((byte) atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement -Constant right-side identified [45] (byte~) bsearch16u::$17 ← (byte) 1 * (const byte) SIZEOF_WORD -Constant right-side identified [52] (byte~) bsearch16u::$18 ← (byte) 1 * (const byte) SIZEOF_WORD -Constant right-side identified [503] (byte[8]) make_plasma_charset::bittab#0 ← { (byte) 1, (byte) 2, (byte) 4, (byte) 8, (byte) $10, (byte) $20, (byte) $40, (byte) $80 } +Constant right-side identified [64] (byte~) bsearch16u::$17 ← (byte) 1 * (const byte) SIZEOF_WORD +Constant right-side identified [71] (byte~) bsearch16u::$18 ← (byte) 1 * (const byte) SIZEOF_WORD +Constant right-side identified [507] (byte[8]) make_plasma_charset::bittab#0 ← { (byte) 1, (byte) 2, (byte) 4, (byte) 8, (byte) $10, (byte) $20, (byte) $40, (byte) $80 } Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) D018#0 = (byte*) 53272 Constant (const byte*) COLS#0 = (byte*) 55296 @@ -3530,25 +3555,26 @@ Constant (const byte*) doplasma::screen#1 = SCREEN2#0 Constant (const byte*) main::toD0182_screen#0 = SCREEN2#0 Constant (const byte*) main::toD0182_gfx#0 = CHARSET#0 Successful SSA optimization Pass2ConstantIdentification -Constant value identified (void*)COLS#0 in [279] (void*) memset::str#0 ← (void*)(const byte*) COLS#0 -Constant value identified (word)main::toD0181_screen#0 in [296] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 -Constant value identified (word)main::toD0181_gfx#0 in [300] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 -Constant value identified (word)main::toD0182_screen#0 in [319] (word~) main::toD0182_$0#0 ← (word)(const byte*) main::toD0182_screen#0 -Constant value identified (word)main::toD0182_gfx#0 in [323] (word~) main::toD0182_$4#0 ← (word)(const byte*) main::toD0182_gfx#0 +Constant value identified (void*)COLS#0 in [283] (void*) memset::str#0 ← (void*)(const byte*) COLS#0 +Constant value identified (word)main::toD0181_screen#0 in [300] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 +Constant value identified (word)main::toD0181_gfx#0 in [304] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 +Constant value identified (word)main::toD0182_screen#0 in [323] (word~) main::toD0182_$0#0 ← (word)(const byte*) main::toD0182_screen#0 +Constant value identified (word)main::toD0182_gfx#0 in [327] (word~) main::toD0182_$4#0 ← (word)(const byte*) main::toD0182_gfx#0 Successful SSA optimization Pass2ConstantValues -if() condition always true - replacing block destination [286] if(true) goto main::@2 +if() condition always false - eliminating [6] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always true - replacing block destination [290] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [359] doplasma::x#1 ← ++ doplasma::x#2 to ++ -Resolved ranged comparison value [361] if(doplasma::x#1!=rangelast(0,$27)) goto doplasma::@2 to (number) $28 -Resolved ranged next value [366] doplasma::y#1 ← ++ doplasma::y#4 to ++ -Resolved ranged comparison value [368] if(doplasma::y#1!=rangelast(0,$19)) goto doplasma::@1 to (number) $1a -Resolved ranged next value [421] init_angle_screen::y#1 ← ++ init_angle_screen::y#4 to ++ -Resolved ranged comparison value [423] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d -Resolved ranged next value [494] init_dist_screen::y#1 ← ++ init_dist_screen::y#10 to ++ -Resolved ranged comparison value [496] if(init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 to (number) $d -Rewriting conditional comparison [417] if((byte) init_angle_screen::x#1<=(byte) $13) goto init_angle_screen::@2 -Rewriting conditional comparison [490] if((byte) init_dist_screen::x#1<=(byte) $13) goto init_dist_screen::@5 -De-inlining pointer[w] to *(pointer+w) [536] *((byte*) make_plasma_charset::charset#6 + (word~) make_plasma_charset::$9) ← (byte) make_plasma_charset::b#3 +Resolved ranged next value [363] doplasma::x#1 ← ++ doplasma::x#2 to ++ +Resolved ranged comparison value [365] if(doplasma::x#1!=rangelast(0,$27)) goto doplasma::@2 to (number) $28 +Resolved ranged next value [370] doplasma::y#1 ← ++ doplasma::y#4 to ++ +Resolved ranged comparison value [372] if(doplasma::y#1!=rangelast(0,$19)) goto doplasma::@1 to (number) $1a +Resolved ranged next value [425] init_angle_screen::y#1 ← ++ init_angle_screen::y#4 to ++ +Resolved ranged comparison value [427] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d +Resolved ranged next value [498] init_dist_screen::y#1 ← ++ init_dist_screen::y#10 to ++ +Resolved ranged comparison value [500] if(init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 to (number) $d +Rewriting conditional comparison [421] if((byte) init_angle_screen::x#1<=(byte) $13) goto init_angle_screen::@2 +Rewriting conditional comparison [494] if((byte) init_dist_screen::x#1<=(byte) $13) goto init_dist_screen::@5 +De-inlining pointer[w] to *(pointer+w) [540] *((byte*) make_plasma_charset::charset#6 + (word~) make_plasma_charset::$9) ← (byte) make_plasma_charset::b#3 Successful SSA optimization Pass2DeInlineWordDerefIdx Eliminating unused variable (void*) memset::return#2 and assignment [130] (void*) memset::return#2 ← (void*) memset::str#0 Eliminating unused variable - keeping the phi block (byte*) heap_head#51 @@ -3628,8 +3654,8 @@ Constant (const word) main::toD0181_$4#0 = (word)main::toD0181_gfx#0 Constant (const word) main::toD0182_$0#0 = (word)main::toD0182_screen#0 Constant (const word) main::toD0182_$4#0 = (word)main::toD0182_gfx#0 Successful SSA optimization Pass2ConstantIdentification -Constant value identified (byte*)memset::str#0 in [24] (byte*~) memset::$0 ← (byte*)(const void*) memset::str#0 -Constant value identified (byte*)memset::str#0 in [26] (byte*) memset::dst#0 ← (byte*)(const void*) memset::str#0 +Constant value identified (byte*)memset::str#0 in [0] (byte*~) memset::$2 ← (byte*)(const void*) memset::str#0 +Constant value identified (byte*)memset::str#0 in [2] (byte*) memset::dst#0 ← (byte*)(const void*) memset::str#0 Successful SSA optimization Pass2ConstantValues Resolved ranged next value [45] init_squares::i#1 ← ++ init_squares::i#2 to ++ Resolved ranged comparison value [46] if(init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 to (const byte) init_squares::$2+(number) 1 @@ -3659,20 +3685,20 @@ Constant right-side identified [129] (byte~) main::toD0181_$5#0 ← > (const wor Constant right-side identified [135] (word~) main::toD0182_$1#0 ← (const word) main::toD0182_$0#0 & (word) $3fff Constant right-side identified [138] (byte~) main::toD0182_$5#0 ← > (const word) main::toD0182_$4#0 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) memset::$0 = (byte*)memset::str#0 +Constant (const byte*) memset::$2 = (byte*)memset::str#0 Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&$3fff Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0 Constant (const word) main::toD0182_$1#0 = main::toD0182_$0#0&$3fff Constant (const byte) main::toD0182_$5#0 = >main::toD0182_$4#0 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [24] (byte*) memset::end#0 ← (const byte*) memset::$0 + (const word) memset::num#0 +Constant right-side identified [0] (byte*) memset::end#0 ← (const byte*) memset::$2 + (const word) memset::num#0 Constant right-side identified [124] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 Constant right-side identified [126] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 Constant right-side identified [131] (word~) main::toD0182_$2#0 ← (const word) main::toD0182_$1#0 * (byte) 4 Constant right-side identified [133] (byte~) main::toD0182_$6#0 ← (const byte) main::toD0182_$5#0 / (byte) 4 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte*) memset::end#0 = memset::$0+memset::num#0 +Constant (const byte*) memset::end#0 = memset::$2+memset::num#0 Constant (const word) main::toD0181_$2#0 = main::toD0181_$1#0*4 Constant (const byte) main::toD0181_$6#0 = main::toD0181_$5#0/4 Constant (const word) main::toD0182_$2#0 = main::toD0182_$1#0*4 @@ -3694,9 +3720,9 @@ Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0 Constant (const byte) main::toD0182_return#0 = main::toD0182_$3#0|main::toD0182_$7#0 Successful SSA optimization Pass2ConstantIdentification -Inlining Noop Cast [3] (void*) malloc::return#0 ← (void*)(byte*) malloc::mem#0 keeping malloc::mem#0 -Inlining Noop Cast [10] (signed word~) bsearch16u::$8 ← (signed word)(word) bsearch16u::key#0 keeping bsearch16u::key#0 -Inlining Noop Cast [11] (signed word~) bsearch16u::$9 ← (signed word)*((word*) bsearch16u::pivot#0) keeping *(bsearch16u::pivot#0) +Inlining Noop Cast [8] (void*) malloc::return#0 ← (void*)(byte*) malloc::mem#0 keeping malloc::mem#0 +Inlining Noop Cast [15] (signed word~) bsearch16u::$8 ← (signed word)(word) bsearch16u::key#0 keeping bsearch16u::key#0 +Inlining Noop Cast [16] (signed word~) bsearch16u::$9 ← (signed word)*((word*) bsearch16u::pivot#0) keeping *(bsearch16u::pivot#0) Successful SSA optimization Pass2NopCastInlining Inlining Noop Cast [30] (void*) malloc::return#2 ← (void*)(byte*) malloc::mem#0 keeping malloc::mem#0 Inlining Noop Cast [108] (void*) malloc::return#3 ← (void*)(byte*) malloc::mem#0 keeping malloc::mem#0 @@ -3708,7 +3734,7 @@ Inlining Noop Cast [114] (byte*) SCREEN_ANGLE#0 ← (byte*)(void*~) $1 keeping S Inlining Noop Cast [152] (signed word) init_angle_screen::xw#0 ← (signed word)(word~) init_angle_screen::$4 keeping init_angle_screen::xw#0 Inlining Noop Cast [155] (signed word) init_angle_screen::yw#0 ← (signed word)(word~) init_angle_screen::$7 keeping init_angle_screen::yw#0 Successful SSA optimization Pass2NopCastInlining -Rewriting multiplication to use shift [8] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 * (const byte) SIZEOF_WORD +Rewriting multiplication to use shift [13] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 * (const byte) SIZEOF_WORD Rewriting multiplication to use shift [37] (byte~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 Rewriting multiplication to use shift [44] (byte~) sqr::$0 ← (byte) sqr::val#2 * (const byte) SIZEOF_WORD Rewriting division to use shift [53] (word~) sqrt::$1 ← (word~) sqrt::$3 / (const byte) SIZEOF_WORD @@ -3721,11 +3747,11 @@ Rewriting multiplication to use shift [181] (byte) init_dist_screen::y2#0 ← (b Rewriting multiplication to use shift [191] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 * (byte) 2 Rewriting multiplication to use shift [233] (word~) make_plasma_charset::$8 ← (word) make_plasma_charset::c#2 * (byte) 8 Successful SSA optimization Pass2MultiplyToShiftRewriting +Inlining constant with var siblings (const byte*) memset::dst#0 Inlining constant with var siblings (const word) malloc::size#1 Inlining constant with var siblings (const word) malloc::size#2 Inlining constant with var siblings (const word) malloc::size#0 Inlining constant with var siblings (const byte) bsearch16u::num#2 -Inlining constant with var siblings (const byte*) memset::dst#0 Inlining constant with var siblings (const word) init_squares::sqr#0 Inlining constant with var siblings (const byte) init_squares::i#0 Inlining constant with var siblings (const word) atan2_16::angle#0 @@ -3779,7 +3805,7 @@ Constant inlined print_cls::$0 = (const byte*) print_line_cursor#0+(word) $3e8 Constant inlined init_angle_screen::x#0 = (byte) 0 Constant inlined init_dist_screen::y#0 = (byte) 0 Constant inlined init_dist_screen::xb#0 = (byte) $27 -Constant inlined memset::$0 = (byte*)(const void*) memset::str#0 +Constant inlined memset::$2 = (byte*)(const void*) memset::str#0 Constant inlined doplasma::y#0 = (byte) 0 Constant inlined malloc::size#2 = (word) $3e8 Constant inlined make_plasma_charset::i#0 = (byte) 0 @@ -3802,8 +3828,8 @@ Constant inlined main::toD0181_$4#0 = (word)(const byte*) CHARSET#0 Constant inlined main::toD0182_$1#0 = (word)(const byte*) SCREEN2#0&(word) $3fff Constant inlined init_squares::$2 = (const byte) NUM_SQUARES#3-(byte) 1 Successful SSA optimization Pass2ConstantInlining +Added new block during phi lifting memset::@6(between memset::@4 and memset::@4) Added new block during phi lifting bsearch16u::@18(between bsearch16u::@9 and bsearch16u::@10) -Added new block during phi lifting memset::@4(between memset::@1 and memset::@1) Added new block during phi lifting init_squares::@4(between init_squares::@1 and init_squares::@1) Added new block during phi lifting atan2_16::@34(between atan2_16::@27 and atan2_16::@15) Added new block during phi lifting atan2_16::@35(between atan2_16::@15 and atan2_16::@17) @@ -3824,15 +3850,15 @@ Added new block during phi lifting make_plasma_charset::@17(between make_plasma_ Added new block during phi lifting make_plasma_charset::@18(between make_plasma_charset::@13 and make_plasma_charset::@4) Added new block during phi lifting make_plasma_charset::@19(between make_plasma_charset::@7 and make_plasma_charset::@9) Adding NOP phi() at start of @begin -Adding NOP phi() at start of @4 -Adding NOP phi() at start of @11 -Adding NOP phi() at start of @14 -Adding NOP phi() at start of @16 -Adding NOP phi() at start of @37 -Adding NOP phi() at start of @39 +Adding NOP phi() at start of @8 +Adding NOP phi() at start of @12 +Adding NOP phi() at start of @15 +Adding NOP phi() at start of @17 +Adding NOP phi() at start of @38 Adding NOP phi() at start of @40 -Adding NOP phi() at start of @44 -Adding NOP phi() at start of @47 +Adding NOP phi() at start of @41 +Adding NOP phi() at start of @45 +Adding NOP phi() at start of @48 Adding NOP phi() at start of @end Adding NOP phi() at start of main::@10 Adding NOP phi() at start of main::@11 @@ -3845,6 +3871,7 @@ Adding NOP phi() at start of main::toD0182 Adding NOP phi() at start of main::toD0182_@return Adding NOP phi() at start of memset Adding NOP phi() at start of memset::@2 +Adding NOP phi() at start of memset::@1 Adding NOP phi() at start of make_plasma_charset Adding NOP phi() at start of make_plasma_charset::@11 Adding NOP phi() at start of make_plasma_charset::@12 @@ -3855,11 +3882,11 @@ Adding NOP phi() at start of init_dist_screen CALL GRAPH Calls in [] to malloc:7 malloc:10 main:14 Calls in [main] to init_dist_screen:18 init_angle_screen:20 make_plasma_charset:22 memset:24 doplasma:29 doplasma:36 -Calls in [make_plasma_charset] to sid_rnd_init:79 print_cls:81 sid_rnd:88 print_char:107 -Calls in [init_angle_screen] to atan2_16:149 -Calls in [init_dist_screen] to init_squares:245 sqr:257 sqr:268 sqrt:273 -Calls in [sqrt] to bsearch16u:299 -Calls in [init_squares] to malloc:339 +Calls in [make_plasma_charset] to sid_rnd_init:80 print_cls:82 sid_rnd:89 print_char:108 +Calls in [init_angle_screen] to atan2_16:150 +Calls in [init_dist_screen] to init_squares:246 sqr:258 sqr:269 sqrt:274 +Calls in [sqrt] to bsearch16u:300 +Calls in [init_squares] to malloc:340 Created 60 initial phi equivalence classes Coalesced [9] heap_head#59 ← heap_head#1 @@ -3877,94 +3904,94 @@ Coalesced [66] doplasma::dist#6 ← doplasma::dist#1 Coalesced [67] doplasma::screen#8 ← doplasma::screen#2 Coalesced [68] doplasma::y#5 ← doplasma::y#1 Coalesced [69] doplasma::x#3 ← doplasma::x#1 -Coalesced [77] memset::dst#3 ← memset::dst#1 -Coalesced [94] make_plasma_charset::b#9 ← make_plasma_charset::b#1 -Coalesced [108] print_char_cursor#53 ← print_char_cursor#1 -Coalesced [113] make_plasma_charset::c#13 ← make_plasma_charset::c#1 -Coalesced [114] print_char_cursor#52 ← print_char_cursor#18 -Coalesced (already) [115] print_char_cursor#54 ← print_char_cursor#49 -Coalesced [116] make_plasma_charset::i#8 ← make_plasma_charset::i#1 -Coalesced [117] make_plasma_charset::ii#6 ← make_plasma_charset::ii#1 -Coalesced [118] make_plasma_charset::b#7 ← make_plasma_charset::b#3 -Coalesced (already) [119] make_plasma_charset::b#8 ← make_plasma_charset::b#2 -Coalesced [132] print_cls::sc#3 ← print_cls::sc#1 -Coalesced [138] init_angle_screen::screen_bottomline#6 ← init_angle_screen::screen_bottomline#0 -Coalesced [139] init_angle_screen::screen_topline#6 ← init_angle_screen::screen_topline#0 -Coalesced [169] init_angle_screen::y#6 ← init_angle_screen::y#1 -Coalesced [170] init_angle_screen::screen_bottomline#7 ← init_angle_screen::screen_bottomline#1 -Coalesced [171] init_angle_screen::screen_topline#7 ← init_angle_screen::screen_topline#1 -Coalesced [172] init_angle_screen::x#4 ← init_angle_screen::x#1 -Coalesced [173] init_angle_screen::xb#4 ← init_angle_screen::xb#1 -Coalesced [176] atan2_16::yi#17 ← atan2_16::$2 -Coalesced [180] atan2_16::xi#14 ← atan2_16::$7 -Coalesced [182] atan2_16::yi#19 ← atan2_16::yi#0 -Coalesced [183] atan2_16::xi#16 ← atan2_16::xi#0 -Coalesced [186] atan2_16::angle#22 ← atan2_16::angle#12 -Coalesced [191] atan2_16::angle#27 ← atan2_16::angle#4 -Coalesced [195] atan2_16::return#5 ← atan2_16::angle#5 -Coalesced [198] atan2_16::return#6 ← atan2_16::angle#11 -Coalesced [199] atan2_16::angle#26 ← atan2_16::angle#1 -Not coalescing [200] atan2_16::shift#5 ← atan2_16::i#2 -Not coalescing [201] atan2_16::xd#10 ← atan2_16::xi#3 -Not coalescing [202] atan2_16::yd#10 ← atan2_16::yi#3 -Coalesced [208] atan2_16::yd#13 ← atan2_16::yd#2 -Coalesced [209] atan2_16::xd#13 ← atan2_16::xd#2 -Coalesced [216] atan2_16::yi#21 ← atan2_16::yi#2 -Coalesced [217] atan2_16::angle#25 ← atan2_16::angle#3 -Coalesced [218] atan2_16::xi#18 ← atan2_16::xi#2 -Coalesced [222] atan2_16::yi#18 ← atan2_16::yi#8 -Coalesced [223] atan2_16::xi#15 ← atan2_16::xi#8 -Coalesced [224] atan2_16::i#12 ← atan2_16::i#1 -Coalesced [225] atan2_16::angle#21 ← atan2_16::angle#13 -Coalesced (already) [226] atan2_16::angle#23 ← atan2_16::angle#13 -Coalesced [231] atan2_16::yi#20 ← atan2_16::yi#1 -Coalesced [232] atan2_16::angle#24 ← atan2_16::angle#2 -Coalesced [233] atan2_16::xi#17 ← atan2_16::xi#1 -Coalesced [234] atan2_16::yd#12 ← atan2_16::yd#3 -Coalesced [235] atan2_16::xd#12 ← atan2_16::xd#3 -Coalesced [239] atan2_16::shift#6 ← atan2_16::shift#1 -Coalesced [240] atan2_16::xd#11 ← atan2_16::xd#1 -Coalesced [241] atan2_16::yd#11 ← atan2_16::yd#1 -Not coalescing [242] atan2_16::xi#13 ← atan2_16::x#0 -Not coalescing [243] atan2_16::yi#16 ← atan2_16::y#0 -Coalesced [247] init_dist_screen::screen_topline#15 ← init_dist_screen::screen#0 -Coalesced [248] init_dist_screen::screen_bottomline#15 ← init_dist_screen::screen_bottomline#0 -Coalesced [253] init_dist_screen::yd#2 ← init_dist_screen::$5 -Coalesced [256] sqr::val#3 ← sqr::val#0 -Coalesced [264] init_dist_screen::xd#2 ← init_dist_screen::$13 -Coalesced [267] sqr::val#4 ← sqr::val#1 -Coalesced [288] init_dist_screen::y#14 ← init_dist_screen::y#1 -Coalesced [289] init_dist_screen::screen_topline#14 ← init_dist_screen::screen_topline#1 -Coalesced [290] init_dist_screen::screen_bottomline#14 ← init_dist_screen::screen_bottomline#1 -Coalesced [291] init_dist_screen::x#8 ← init_dist_screen::x#1 -Coalesced [292] init_dist_screen::xb#8 ← init_dist_screen::xb#1 -Coalesced [294] init_dist_screen::xd#1 ← init_dist_screen::$15 -Coalesced [296] init_dist_screen::yd#1 ← init_dist_screen::$7 -Coalesced [306] bsearch16u::items#10 ← bsearch16u::items#1 -Coalesced [311] bsearch16u::return#9 ← bsearch16u::$2 -Coalesced [313] bsearch16u::return#7 ← bsearch16u::return#2 -Coalesced [316] bsearch16u::return#8 ← bsearch16u::items#2 -Not coalescing [322] bsearch16u::return#6 ← bsearch16u::pivot#0 -Coalesced [326] bsearch16u::num#10 ← bsearch16u::num#1 -Coalesced [327] bsearch16u::items#12 ← bsearch16u::items#0 -Coalesced [330] bsearch16u::num#9 ← bsearch16u::num#0 -Coalesced [331] bsearch16u::items#11 ← bsearch16u::items#8 -Coalesced [332] bsearch16u::num#11 ← bsearch16u::num#3 -Coalesced (already) [333] bsearch16u::items#13 ← bsearch16u::items#2 -Coalesced (already) [338] heap_head#60 ← heap_head#1 -Coalesced [342] init_squares::squares#4 ← init_squares::squares#0 -Coalesced [352] init_squares::sqr#3 ← init_squares::sqr#1 -Coalesced [353] init_squares::squares#3 ← init_squares::squares#1 -Coalesced [354] init_squares::i#3 ← init_squares::i#1 -Not coalescing [357] heap_head#1 ← malloc::mem#0 +Coalesced [78] memset::dst#3 ← memset::dst#1 +Coalesced [95] make_plasma_charset::b#9 ← make_plasma_charset::b#1 +Coalesced [109] print_char_cursor#53 ← print_char_cursor#1 +Coalesced [114] make_plasma_charset::c#13 ← make_plasma_charset::c#1 +Coalesced [115] print_char_cursor#52 ← print_char_cursor#18 +Coalesced (already) [116] print_char_cursor#54 ← print_char_cursor#49 +Coalesced [117] make_plasma_charset::i#8 ← make_plasma_charset::i#1 +Coalesced [118] make_plasma_charset::ii#6 ← make_plasma_charset::ii#1 +Coalesced [119] make_plasma_charset::b#7 ← make_plasma_charset::b#3 +Coalesced (already) [120] make_plasma_charset::b#8 ← make_plasma_charset::b#2 +Coalesced [133] print_cls::sc#3 ← print_cls::sc#1 +Coalesced [139] init_angle_screen::screen_bottomline#6 ← init_angle_screen::screen_bottomline#0 +Coalesced [140] init_angle_screen::screen_topline#6 ← init_angle_screen::screen_topline#0 +Coalesced [170] init_angle_screen::y#6 ← init_angle_screen::y#1 +Coalesced [171] init_angle_screen::screen_bottomline#7 ← init_angle_screen::screen_bottomline#1 +Coalesced [172] init_angle_screen::screen_topline#7 ← init_angle_screen::screen_topline#1 +Coalesced [173] init_angle_screen::x#4 ← init_angle_screen::x#1 +Coalesced [174] init_angle_screen::xb#4 ← init_angle_screen::xb#1 +Coalesced [177] atan2_16::yi#17 ← atan2_16::$2 +Coalesced [181] atan2_16::xi#14 ← atan2_16::$7 +Coalesced [183] atan2_16::yi#19 ← atan2_16::yi#0 +Coalesced [184] atan2_16::xi#16 ← atan2_16::xi#0 +Coalesced [187] atan2_16::angle#22 ← atan2_16::angle#12 +Coalesced [192] atan2_16::angle#27 ← atan2_16::angle#4 +Coalesced [196] atan2_16::return#5 ← atan2_16::angle#5 +Coalesced [199] atan2_16::return#6 ← atan2_16::angle#11 +Coalesced [200] atan2_16::angle#26 ← atan2_16::angle#1 +Not coalescing [201] atan2_16::shift#5 ← atan2_16::i#2 +Not coalescing [202] atan2_16::xd#10 ← atan2_16::xi#3 +Not coalescing [203] atan2_16::yd#10 ← atan2_16::yi#3 +Coalesced [209] atan2_16::yd#13 ← atan2_16::yd#2 +Coalesced [210] atan2_16::xd#13 ← atan2_16::xd#2 +Coalesced [217] atan2_16::yi#21 ← atan2_16::yi#2 +Coalesced [218] atan2_16::angle#25 ← atan2_16::angle#3 +Coalesced [219] atan2_16::xi#18 ← atan2_16::xi#2 +Coalesced [223] atan2_16::yi#18 ← atan2_16::yi#8 +Coalesced [224] atan2_16::xi#15 ← atan2_16::xi#8 +Coalesced [225] atan2_16::i#12 ← atan2_16::i#1 +Coalesced [226] atan2_16::angle#21 ← atan2_16::angle#13 +Coalesced (already) [227] atan2_16::angle#23 ← atan2_16::angle#13 +Coalesced [232] atan2_16::yi#20 ← atan2_16::yi#1 +Coalesced [233] atan2_16::angle#24 ← atan2_16::angle#2 +Coalesced [234] atan2_16::xi#17 ← atan2_16::xi#1 +Coalesced [235] atan2_16::yd#12 ← atan2_16::yd#3 +Coalesced [236] atan2_16::xd#12 ← atan2_16::xd#3 +Coalesced [240] atan2_16::shift#6 ← atan2_16::shift#1 +Coalesced [241] atan2_16::xd#11 ← atan2_16::xd#1 +Coalesced [242] atan2_16::yd#11 ← atan2_16::yd#1 +Not coalescing [243] atan2_16::xi#13 ← atan2_16::x#0 +Not coalescing [244] atan2_16::yi#16 ← atan2_16::y#0 +Coalesced [248] init_dist_screen::screen_topline#15 ← init_dist_screen::screen#0 +Coalesced [249] init_dist_screen::screen_bottomline#15 ← init_dist_screen::screen_bottomline#0 +Coalesced [254] init_dist_screen::yd#2 ← init_dist_screen::$5 +Coalesced [257] sqr::val#3 ← sqr::val#0 +Coalesced [265] init_dist_screen::xd#2 ← init_dist_screen::$13 +Coalesced [268] sqr::val#4 ← sqr::val#1 +Coalesced [289] init_dist_screen::y#14 ← init_dist_screen::y#1 +Coalesced [290] init_dist_screen::screen_topline#14 ← init_dist_screen::screen_topline#1 +Coalesced [291] init_dist_screen::screen_bottomline#14 ← init_dist_screen::screen_bottomline#1 +Coalesced [292] init_dist_screen::x#8 ← init_dist_screen::x#1 +Coalesced [293] init_dist_screen::xb#8 ← init_dist_screen::xb#1 +Coalesced [295] init_dist_screen::xd#1 ← init_dist_screen::$15 +Coalesced [297] init_dist_screen::yd#1 ← init_dist_screen::$7 +Coalesced [307] bsearch16u::items#10 ← bsearch16u::items#1 +Coalesced [312] bsearch16u::return#9 ← bsearch16u::$2 +Coalesced [314] bsearch16u::return#7 ← bsearch16u::return#2 +Coalesced [317] bsearch16u::return#8 ← bsearch16u::items#2 +Not coalescing [323] bsearch16u::return#6 ← bsearch16u::pivot#0 +Coalesced [327] bsearch16u::num#10 ← bsearch16u::num#1 +Coalesced [328] bsearch16u::items#12 ← bsearch16u::items#0 +Coalesced [331] bsearch16u::num#9 ← bsearch16u::num#0 +Coalesced [332] bsearch16u::items#11 ← bsearch16u::items#8 +Coalesced [333] bsearch16u::num#11 ← bsearch16u::num#3 +Coalesced (already) [334] bsearch16u::items#13 ← bsearch16u::items#2 +Coalesced (already) [339] heap_head#60 ← heap_head#1 +Coalesced [343] init_squares::squares#4 ← init_squares::squares#0 +Coalesced [353] init_squares::sqr#3 ← init_squares::sqr#1 +Coalesced [354] init_squares::squares#3 ← init_squares::squares#1 +Coalesced [355] init_squares::i#3 ← init_squares::i#1 +Not coalescing [358] heap_head#1 ← malloc::mem#0 Coalesced down to 46 phi equivalence classes -Culled Empty Block (label) @4 -Culled Empty Block (label) @11 -Culled Empty Block (label) @14 -Culled Empty Block (label) @16 -Culled Empty Block (label) @37 -Culled Empty Block (label) @40 -Culled Empty Block (label) @47 +Culled Empty Block (label) @8 +Culled Empty Block (label) @12 +Culled Empty Block (label) @15 +Culled Empty Block (label) @17 +Culled Empty Block (label) @38 +Culled Empty Block (label) @41 +Culled Empty Block (label) @48 Culled Empty Block (label) main::@12 Culled Empty Block (label) main::@13 Culled Empty Block (label) main::toD0181_@return @@ -3973,7 +4000,8 @@ Culled Empty Block (label) main::toD0182_@return Culled Empty Block (label) doplasma::@5 Culled Empty Block (label) doplasma::@6 Culled Empty Block (label) memset::@2 -Culled Empty Block (label) memset::@4 +Culled Empty Block (label) memset::@1 +Culled Empty Block (label) memset::@6 Culled Empty Block (label) make_plasma_charset::@12 Culled Empty Block (label) make_plasma_charset::@14 Culled Empty Block (label) make_plasma_charset::@15 @@ -3996,10 +4024,11 @@ Culled Empty Block (label) init_dist_screen::@20 Culled Empty Block (label) bsearch16u::@1 Culled Empty Block (label) bsearch16u::@18 Culled Empty Block (label) init_squares::@4 -Renumbering block @39 to @1 -Renumbering block @44 to @2 -Renumbering block @45 to @3 -Renumbering block @46 to @4 +Renumbering block @40 to @1 +Renumbering block @45 to @2 +Renumbering block @46 to @3 +Renumbering block @47 to @4 +Renumbering block memset::@4 to memset::@1 Renumbering block bsearch16u::@2 to bsearch16u::@1 Renumbering block bsearch16u::@3 to bsearch16u::@2 Renumbering block bsearch16u::@6 to bsearch16u::@3 diff --git a/src/test/ref/scan-desire-problem.asm b/src/test/ref/scan-desire-problem.asm index 92ed0035f..3bb3d5b65 100644 --- a/src/test/ref/scan-desire-problem.asm +++ b/src/test/ref/scan-desire-problem.asm @@ -247,7 +247,7 @@ memset: { lda str+1 adc #>$3e8 sta end+1 - b1: + b2: txa ldy #0 sta (dst),y @@ -257,10 +257,10 @@ memset: { !: lda dst+1 cmp end+1 - bne b1 + bne b2 lda dst cmp end - bne b1 + bne b2 rts } init_sprites: { diff --git a/src/test/ref/scan-desire-problem.cfg b/src/test/ref/scan-desire-problem.cfg index 6b90a1cb4..afa358f77 100644 --- a/src/test/ref/scan-desire-problem.cfg +++ b/src/test/ref/scan-desire-problem.cfg @@ -119,17 +119,19 @@ init::@return: scope:[init] from init::@1 to:@return memset: scope:[memset] from init::@2 init::@3 [70] (byte) memset::c#3 ← phi( init::@2/(byte) 0 init::@3/(const byte) BLACK#0 ) - [70] (void*) memset::str#2 ← phi( init::@2/(void*)(const byte*) screen#0 init::@3/(void*)(const byte*) colors#0 ) - [71] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) $3e8 - [72] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + [70] (void*) memset::str#3 ← phi( init::@2/(void*)(const byte*) screen#0 init::@3/(void*)(const byte*) colors#0 ) to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - [73] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) +memset::@1: scope:[memset] from memset + [71] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) $3e8 + [72] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + to:memset::@2 +memset::@2: scope:[memset] from memset::@1 memset::@2 + [73] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 ) [74] *((byte*) memset::dst#2) ← (byte) memset::c#3 [75] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - [76] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 + [76] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 to:memset::@return -memset::@return: scope:[memset] from memset::@1 +memset::@return: scope:[memset] from memset::@2 [77] return to:@return init_sprites: scope:[init_sprites] from init diff --git a/src/test/ref/scan-desire-problem.log b/src/test/ref/scan-desire-problem.log index 29907a837..f5776c57b 100644 --- a/src/test/ref/scan-desire-problem.log +++ b/src/test/ref/scan-desire-problem.log @@ -14,6 +14,7 @@ Culled Empty Block (label) @10 Culled Empty Block (label) @11 Culled Empty Block (label) @12 Culled Empty Block (label) @13 +Culled Empty Block (label) memset::@5 Culled Empty Block (label) memset::@3 Culled Empty Block (label) @14 Culled Empty Block (label) @15 @@ -54,30 +55,38 @@ CONTROL FLOW GRAPH SSA (byte) YELLOW#0 ← (number) 7 to:@20 memset: scope:[memset] from init::@2 init::@3 - (byte) memset::c#3 ← phi( init::@2/(byte) memset::c#0 init::@3/(byte) memset::c#1 ) + (byte) memset::c#4 ← phi( init::@2/(byte) memset::c#0 init::@3/(byte) memset::c#1 ) + (void*) memset::str#4 ← phi( init::@2/(void*) memset::str#0 init::@3/(void*) memset::str#1 ) (word) memset::num#2 ← phi( init::@2/(word) memset::num#0 init::@3/(word) memset::num#1 ) - (void*) memset::str#2 ← phi( init::@2/(void*) memset::str#0 init::@3/(void*) memset::str#1 ) - (byte*~) memset::$0 ← ((byte*)) (void*) memset::str#2 - (byte*~) memset::$1 ← (byte*~) memset::$0 + (word) memset::num#2 - (byte*) memset::end#0 ← (byte*~) memset::$1 - (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#2 - to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - (void*) memset::str#4 ← phi( memset/(void*) memset::str#2 memset::@1/(void*) memset::str#4 ) - (byte*) memset::end#1 ← phi( memset/(byte*) memset::end#0 memset::@1/(byte*) memset::end#1 ) - (byte*) memset::dst#2 ← phi( memset/(byte*) memset::dst#0 memset::@1/(byte*) memset::dst#1 ) - (byte) memset::c#2 ← phi( memset/(byte) memset::c#3 memset::@1/(byte) memset::c#2 ) + (bool~) memset::$0 ← (word) memset::num#2 > (number) 0 + (bool~) memset::$1 ← ! (bool~) memset::$0 + if((bool~) memset::$1) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + (void*) memset::str#2 ← phi( memset/(void*) memset::str#4 memset::@4/(void*) memset::str#5 ) + (void*) memset::return#0 ← (void*) memset::str#2 + to:memset::@return +memset::@2: scope:[memset] from memset + (byte) memset::c#3 ← phi( memset/(byte) memset::c#4 ) + (word) memset::num#3 ← phi( memset/(word) memset::num#2 ) + (void*) memset::str#3 ← phi( memset/(void*) memset::str#4 ) + (byte*~) memset::$2 ← ((byte*)) (void*) memset::str#3 + (byte*~) memset::$3 ← (byte*~) memset::$2 + (word) memset::num#3 + (byte*) memset::end#0 ← (byte*~) memset::$3 + (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#3 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@4 + (void*) memset::str#5 ← phi( memset::@2/(void*) memset::str#3 memset::@4/(void*) memset::str#5 ) + (byte*) memset::end#1 ← phi( memset::@2/(byte*) memset::end#0 memset::@4/(byte*) memset::end#1 ) + (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 ) + (byte) memset::c#2 ← phi( memset::@2/(byte) memset::c#3 memset::@4/(byte) memset::c#2 ) *((byte*) memset::dst#2) ← (byte) memset::c#2 (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - (bool~) memset::$2 ← (byte*) memset::dst#1 != (byte*) memset::end#1 - if((bool~) memset::$2) goto memset::@1 - to:memset::@2 -memset::@2: scope:[memset] from memset::@1 - (void*) memset::str#3 ← phi( memset::@1/(void*) memset::str#4 ) - (void*) memset::return#0 ← (void*) memset::str#3 - to:memset::@return -memset::@return: scope:[memset] from memset::@2 - (void*) memset::return#4 ← phi( memset::@2/(void*) memset::return#0 ) + (bool~) memset::$4 ← (byte*) memset::dst#1 != (byte*) memset::end#1 + if((bool~) memset::$4) goto memset::@4 + to:memset::@1 +memset::@return: scope:[memset] from memset::@1 + (void*) memset::return#4 ← phi( memset::@1/(void*) memset::return#0 ) (void*) memset::return#1 ← (void*) memset::return#4 return to:@return @@ -441,17 +450,21 @@ SYMBOL TABLE SSA (byte) main::z (byte) main::z#0 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) -(byte*~) memset::$0 -(byte*~) memset::$1 -(bool~) memset::$2 +(bool~) memset::$0 +(bool~) memset::$1 +(byte*~) memset::$2 +(byte*~) memset::$3 +(bool~) memset::$4 (label) memset::@1 (label) memset::@2 +(label) memset::@4 (label) memset::@return (byte) memset::c (byte) memset::c#0 (byte) memset::c#1 (byte) memset::c#2 (byte) memset::c#3 +(byte) memset::c#4 (byte*) memset::dst (byte*) memset::dst#0 (byte*) memset::dst#1 @@ -463,6 +476,7 @@ SYMBOL TABLE SSA (word) memset::num#0 (word) memset::num#1 (word) memset::num#2 +(word) memset::num#3 (void*) memset::return (void*) memset::return#0 (void*) memset::return#1 @@ -475,6 +489,7 @@ SYMBOL TABLE SSA (void*) memset::str#2 (void*) memset::str#3 (void*) memset::str#4 +(void*) memset::str#5 (word()) mul8u((byte) mul8u::a , (byte) mul8u::b) (bool~) mul8u::$0 (number~) mul8u::$1 @@ -532,6 +547,7 @@ Adding number conversion cast (unumber) 2 in (byte) RED#0 ← (number) 2 Adding number conversion cast (unumber) 5 in (byte) GREEN#0 ← (number) 5 Adding number conversion cast (unumber) 6 in (byte) BLUE#0 ← (number) 6 Adding number conversion cast (unumber) 7 in (byte) YELLOW#0 ← (number) 7 +Adding number conversion cast (unumber) 0 in (bool~) memset::$0 ← (word) memset::num#2 > (number) 0 Adding number conversion cast (unumber) 0 in (word) mul8u::res#0 ← (number) 0 Adding number conversion cast (unumber) 0 in (bool~) mul8u::$0 ← (byte) mul8u::a#2 != (number) 0 Adding number conversion cast (unumber) 1 in (number~) mul8u::$1 ← (byte) mul8u::a#3 & (number) 1 @@ -599,8 +615,8 @@ Inlining cast (byte) RED#0 ← (unumber)(number) 2 Inlining cast (byte) GREEN#0 ← (unumber)(number) 5 Inlining cast (byte) BLUE#0 ← (unumber)(number) 6 Inlining cast (byte) YELLOW#0 ← (unumber)(number) 7 -Inlining cast (byte*~) memset::$0 ← (byte*)(void*) memset::str#2 -Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 +Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 +Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 Inlining cast (word) mul8u::res#0 ← (unumber)(number) 0 Inlining cast (byte*) screen#0 ← (byte*)(number) $400 Inlining cast (byte*) charset#0 ← (byte*)(number) $2000 @@ -644,6 +660,7 @@ Simplifying constant integer cast 6 Simplifying constant integer cast 7 Simplifying constant integer cast 0 Simplifying constant integer cast 0 +Simplifying constant integer cast 0 Simplifying constant integer cast 1 Simplifying constant integer cast 0 Simplifying constant integer cast 1 @@ -691,6 +708,7 @@ Finalized unsigned number type (byte) 6 Finalized unsigned number type (byte) 7 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 1 @@ -738,10 +756,14 @@ Inferred type updated to word in (unumber~) draw_block::$7 ← (word) draw_block Inferred type updated to word in (unumber~) draw_block::$8 ← (word) draw_block::z#1 + (byte) $28 Inferred type updated to word in (unumber~) draw_block::$9 ← (word) draw_block::z#1 + (byte) $29 Inferred type updated to word in (unumber~) draw_block::$10 ← (word) draw_block::z#1 + (byte) $29 -Inversing boolean not [42] (bool~) mul8u::$3 ← (byte~) mul8u::$1 == (byte) 0 from [41] (bool~) mul8u::$2 ← (byte~) mul8u::$1 != (byte) 0 +Inversing boolean not [20] (bool~) memset::$1 ← (word) memset::num#2 <= (byte) 0 from [19] (bool~) memset::$0 ← (word) memset::num#2 > (byte) 0 +Inversing boolean not [46] (bool~) mul8u::$3 ← (byte~) mul8u::$1 == (byte) 0 from [45] (bool~) mul8u::$2 ← (byte~) mul8u::$1 != (byte) 0 Successful SSA optimization Pass2UnaryNotSimplification -Alias (byte*) memset::end#0 = (byte*~) memset::$1 -Alias (void*) memset::return#0 = (void*) memset::str#3 (void*) memset::str#4 (void*) memset::return#4 (void*) memset::return#1 +Alias (void*) memset::return#0 = (void*) memset::str#2 (void*) memset::return#4 (void*) memset::return#1 +Alias (void*) memset::str#3 = (void*) memset::str#4 +Alias (word) memset::num#2 = (word) memset::num#3 +Alias (byte) memset::c#3 = (byte) memset::c#4 +Alias (byte*) memset::end#0 = (byte*~) memset::$3 Alias (word) mul8u::mb#0 = (byte) mul8u::b#1 Alias (byte) mul8u::a#2 = (byte) mul8u::a#3 (byte) mul8u::a#6 Alias (word) mul8u::mb#3 = (word) mul8u::mb#4 (word) mul8u::mb#5 @@ -767,12 +789,12 @@ Alias (word) mul8u::mb#2 = (word) mul8u::mb#3 Successful SSA optimization Pass2AliasElimination Self Phi Eliminated (byte) memset::c#2 Self Phi Eliminated (byte*) memset::end#1 -Self Phi Eliminated (void*) memset::return#0 +Self Phi Eliminated (void*) memset::str#5 Self Phi Eliminated (byte) main::x#2 Successful SSA optimization Pass2SelfPhiElimination Identical Phi Values (byte) memset::c#2 (byte) memset::c#3 Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0 -Identical Phi Values (void*) memset::return#0 (void*) memset::str#2 +Identical Phi Values (void*) memset::str#5 (void*) memset::str#3 Identical Phi Values (word) mul8u::mb#0 (byte) mul8u::b#0 Identical Phi Values (byte) mul8u::a#5 (byte) mul8u::a#1 Identical Phi Values (byte) main::x#2 (byte) main::x#4 @@ -780,11 +802,14 @@ Identical Phi Values (byte) draw_block::tileno#2 (byte) draw_block::tileno#0 Identical Phi Values (byte) draw_block::x#1 (byte) draw_block::x#0 Identical Phi Values (byte) draw_block::y#2 (byte) draw_block::y#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) memset::$2 [27] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -Simple Condition (bool~) mul8u::$0 [38] if((byte) mul8u::a#2!=(byte) 0) goto mul8u::@2 -Simple Condition (bool~) mul8u::$3 [43] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4 -Simple Condition (bool~) main::$3 [78] if((byte) main::y#1<(byte) 9) goto main::@2 -Simple Condition (bool~) main::$4 [82] if((byte) main::x#1<(byte) $10) goto main::@1 +Identical Phi Values (void*) memset::return#0 (void*) memset::str#3 +Successful SSA optimization Pass2IdenticalPhiElimination +Simple Condition (bool~) memset::$1 [21] if((word) memset::num#2<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [33] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4 +Simple Condition (bool~) mul8u::$0 [42] if((byte) mul8u::a#2!=(byte) 0) goto mul8u::@2 +Simple Condition (bool~) mul8u::$3 [47] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4 +Simple Condition (bool~) main::$3 [82] if((byte) main::y#1<(byte) 9) goto main::@2 +Simple Condition (bool~) main::$4 [86] if((byte) main::x#1<(byte) $10) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SPRITES_XMSB#0 = (byte*) 53264 Constant (const byte*) SPRITES_ENABLE#0 = (byte*) 53269 @@ -822,24 +847,24 @@ Constant (const byte) memset::c#1 = BLACK#0 Constant (const byte*) init::toD0181_screen#0 = screen#0 Constant (const byte*) init::toD0181_gfx#0 = charset#0 Successful SSA optimization Pass2ConstantIdentification -Constant value identified (void*)screen#0 in [86] (void*) memset::str#0 ← (void*)(const byte*) screen#0 -Constant value identified (void*)colors#0 in [91] (void*) memset::str#1 ← (void*)(const byte*) colors#0 -Constant value identified (word)init::toD0181_screen#0 in [99] (word~) init::toD0181_$0#0 ← (word)(const byte*) init::toD0181_screen#0 -Constant value identified (word)init::toD0181_gfx#0 in [103] (word~) init::toD0181_$4#0 ← (word)(const byte*) init::toD0181_gfx#0 +Constant value identified (void*)screen#0 in [90] (void*) memset::str#0 ← (void*)(const byte*) screen#0 +Constant value identified (void*)colors#0 in [95] (void*) memset::str#1 ← (void*)(const byte*) colors#0 +Constant value identified (word)init::toD0181_screen#0 in [103] (word~) init::toD0181_$0#0 ← (word)(const byte*) init::toD0181_screen#0 +Constant value identified (word)init::toD0181_gfx#0 in [107] (word~) init::toD0181_$4#0 ← (word)(const byte*) init::toD0181_gfx#0 Successful SSA optimization Pass2ConstantValues -if() condition always true - replacing block destination [83] if(true) goto main::@5 +if() condition always true - replacing block destination [87] if(true) goto main::@5 Successful SSA optimization Pass2ConstantIfs -De-inlining pointer[w] to *(pointer+w) [145] *((const byte*) screen#0 + (word) draw_block::z#1) ← (byte) draw_block::drawtile#0 -De-inlining pointer[w] to *(pointer+w) [146] *((const byte*) colors#0 + (word) draw_block::z#1) ← (const byte) YELLOW#0 -De-inlining pointer[w] to *(pointer+w) [148] *((const byte*) screen#0 + (word~) draw_block::$5) ← (byte) 1 -De-inlining pointer[w] to *(pointer+w) [150] *((const byte*) colors#0 + (word~) draw_block::$6) ← (const byte) YELLOW#0 -De-inlining pointer[w] to *(pointer+w) [152] *((const byte*) screen#0 + (word~) draw_block::$7) ← (byte) 2 -De-inlining pointer[w] to *(pointer+w) [154] *((const byte*) colors#0 + (word~) draw_block::$8) ← (const byte) YELLOW#0 -De-inlining pointer[w] to *(pointer+w) [156] *((const byte*) screen#0 + (word~) draw_block::$9) ← (byte) 3 -De-inlining pointer[w] to *(pointer+w) [158] *((const byte*) colors#0 + (word~) draw_block::$10) ← (const byte) YELLOW#0 +De-inlining pointer[w] to *(pointer+w) [149] *((const byte*) screen#0 + (word) draw_block::z#1) ← (byte) draw_block::drawtile#0 +De-inlining pointer[w] to *(pointer+w) [150] *((const byte*) colors#0 + (word) draw_block::z#1) ← (const byte) YELLOW#0 +De-inlining pointer[w] to *(pointer+w) [152] *((const byte*) screen#0 + (word~) draw_block::$5) ← (byte) 1 +De-inlining pointer[w] to *(pointer+w) [154] *((const byte*) colors#0 + (word~) draw_block::$6) ← (const byte) YELLOW#0 +De-inlining pointer[w] to *(pointer+w) [156] *((const byte*) screen#0 + (word~) draw_block::$7) ← (byte) 2 +De-inlining pointer[w] to *(pointer+w) [158] *((const byte*) colors#0 + (word~) draw_block::$8) ← (const byte) YELLOW#0 +De-inlining pointer[w] to *(pointer+w) [160] *((const byte*) screen#0 + (word~) draw_block::$9) ← (byte) 3 +De-inlining pointer[w] to *(pointer+w) [162] *((const byte*) colors#0 + (word~) draw_block::$10) ← (const byte) YELLOW#0 Successful SSA optimization Pass2DeInlineWordDerefIdx -Eliminating unused variable (void*) memset::return#2 and assignment [35] (void*) memset::return#2 ← (void*) memset::str#2 -Eliminating unused variable (void*) memset::return#3 and assignment [38] (void*) memset::return#3 ← (void*) memset::str#2 +Eliminating unused variable (void*) memset::return#2 and assignment [36] (void*) memset::return#2 ← (void*) memset::str#3 +Eliminating unused variable (void*) memset::return#3 and assignment [39] (void*) memset::return#3 ← (void*) memset::str#3 Eliminating unused constant (const byte) draw_block::color#0 Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return @@ -849,30 +874,30 @@ Constant (const void*) memset::str#1 = (void*)colors#0 Constant (const word) init::toD0181_$0#0 = (word)init::toD0181_screen#0 Constant (const word) init::toD0181_$4#0 = (word)init::toD0181_gfx#0 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [34] (word~) init::toD0181_$1#0 ← (const word) init::toD0181_$0#0 & (word) $3fff -Constant right-side identified [37] (byte~) init::toD0181_$5#0 ← > (const word) init::toD0181_$4#0 +Constant right-side identified [35] (word~) init::toD0181_$1#0 ← (const word) init::toD0181_$0#0 & (word) $3fff +Constant right-side identified [38] (byte~) init::toD0181_$5#0 ← > (const word) init::toD0181_$4#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) init::toD0181_$1#0 = init::toD0181_$0#0&$3fff Constant (const byte) init::toD0181_$5#0 = >init::toD0181_$4#0 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [34] (word~) init::toD0181_$2#0 ← (const word) init::toD0181_$1#0 * (byte) 4 -Constant right-side identified [36] (byte~) init::toD0181_$6#0 ← (const byte) init::toD0181_$5#0 / (byte) 4 +Constant right-side identified [35] (word~) init::toD0181_$2#0 ← (const word) init::toD0181_$1#0 * (byte) 4 +Constant right-side identified [37] (byte~) init::toD0181_$6#0 ← (const byte) init::toD0181_$5#0 / (byte) 4 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) init::toD0181_$2#0 = init::toD0181_$1#0*4 Constant (const byte) init::toD0181_$6#0 = init::toD0181_$5#0/4 Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [34] (byte~) init::toD0181_$3#0 ← > (const word) init::toD0181_$2#0 -Constant right-side identified [35] (byte~) init::toD0181_$7#0 ← (const byte) init::toD0181_$6#0 & (byte) $f +Constant right-side identified [35] (byte~) init::toD0181_$3#0 ← > (const word) init::toD0181_$2#0 +Constant right-side identified [36] (byte~) init::toD0181_$7#0 ← (const byte) init::toD0181_$6#0 & (byte) $f Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) init::toD0181_$3#0 = >init::toD0181_$2#0 Constant (const byte) init::toD0181_$7#0 = init::toD0181_$6#0&$f Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [34] (byte) init::toD0181_return#0 ← (const byte) init::toD0181_$3#0 | (const byte) init::toD0181_$7#0 +Constant right-side identified [35] (byte) init::toD0181_return#0 ← (const byte) init::toD0181_$3#0 | (const byte) init::toD0181_$7#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) init::toD0181_return#0 = init::toD0181_$3#0|init::toD0181_$7#0 Successful SSA optimization Pass2ConstantIdentification -Inlining Noop Cast [1] (byte*~) memset::$0 ← (byte*)(void*) memset::str#2 keeping memset::str#2 -Inlining Noop Cast [3] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 keeping memset::str#2 +Inlining Noop Cast [2] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 keeping memset::str#3 +Inlining Noop Cast [4] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 keeping memset::str#3 Successful SSA optimization Pass2NopCastInlining Inlining constant with var siblings (const byte) memset::c#0 Inlining constant with var siblings (const word) memset::num#0 @@ -914,7 +939,9 @@ Alias (word) draw_block::z#1 = (word~) draw_block::$5 (word~) draw_block::$6 (wo Successful SSA optimization Pass2AliasElimination Identical Phi Values (word) memset::num#2 (word) $3e8 Successful SSA optimization Pass2IdenticalPhiElimination -Added new block during phi lifting memset::@4(between memset::@1 and memset::@1) +if() condition always false - eliminating [1] if((word) $3e8<=(byte) 0) goto memset::@1 +Successful SSA optimization Pass2ConstantIfs +Added new block during phi lifting memset::@6(between memset::@4 and memset::@4) Added new block during phi lifting mul8u::@10(between mul8u::@2 and mul8u::@4) Added new block during phi lifting main::@9(between main::@3 and main::@1) Added new block during phi lifting main::@10(between main::@8 and main::@2) @@ -933,7 +960,7 @@ Adding NOP phi() at start of init::@3 Adding NOP phi() at start of init::@4 Adding NOP phi() at start of init::toD0181 Adding NOP phi() at start of init::toD0181_@return -Adding NOP phi() at start of memset::@2 +Adding NOP phi() at start of memset::@1 CALL GRAPH Calls in [] to main:3 Calls in [main] to init:7 draw_block:16 @@ -960,9 +987,11 @@ Culled Empty Block (label) mul8u::@3 Culled Empty Block (label) mul8u::@10 Culled Empty Block (label) init::@4 Culled Empty Block (label) init::toD0181_@return -Culled Empty Block (label) memset::@2 -Culled Empty Block (label) memset::@4 +Culled Empty Block (label) memset::@1 +Culled Empty Block (label) memset::@6 Renumbering block @24 to @1 +Renumbering block memset::@2 to memset::@1 +Renumbering block memset::@4 to memset::@2 Renumbering block mul8u::@4 to mul8u::@3 Renumbering block mul8u::@7 to mul8u::@4 Renumbering block main::@5 to main::@4 @@ -1100,17 +1129,19 @@ init::@return: scope:[init] from init::@1 to:@return memset: scope:[memset] from init::@2 init::@3 [70] (byte) memset::c#3 ← phi( init::@2/(byte) 0 init::@3/(const byte) BLACK#0 ) - [70] (void*) memset::str#2 ← phi( init::@2/(void*)(const byte*) screen#0 init::@3/(void*)(const byte*) colors#0 ) - [71] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) $3e8 - [72] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + [70] (void*) memset::str#3 ← phi( init::@2/(void*)(const byte*) screen#0 init::@3/(void*)(const byte*) colors#0 ) to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - [73] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) +memset::@1: scope:[memset] from memset + [71] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) $3e8 + [72] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + to:memset::@2 +memset::@2: scope:[memset] from memset::@1 memset::@2 + [73] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 ) [74] *((byte*) memset::dst#2) ← (byte) memset::c#3 [75] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - [76] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 + [76] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 to:memset::@return -memset::@return: scope:[memset] from memset::@1 +memset::@return: scope:[memset] from memset::@2 [77] return to:@return init_sprites: scope:[init_sprites] from init @@ -1210,7 +1241,7 @@ VARIABLE REGISTER WEIGHTS (word) memset::num (void*) memset::return (void*) memset::str -(void*) memset::str#2 +(void*) memset::str#3 (word()) mul8u((byte) mul8u::a , (byte) mul8u::b) (byte~) mul8u::$1 2002.0 (byte) mul8u::a @@ -1236,7 +1267,7 @@ Initial phi equivalence classes [ mul8u::a#2 mul8u::a#1 mul8u::a#0 ] [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] [ mul8u::mb#2 mul8u::mb#1 ] -[ memset::str#2 ] +[ memset::str#3 ] [ memset::c#3 ] [ memset::dst#2 memset::dst#3 memset::dst#1 ] Added variable main::z#0 to zero page equivalence class [ main::z#0 ] @@ -1267,7 +1298,7 @@ Complete equivalence classes [ mul8u::a#2 mul8u::a#1 mul8u::a#0 ] [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] [ mul8u::mb#2 mul8u::mb#1 ] -[ memset::str#2 ] +[ memset::str#3 ] [ memset::c#3 ] [ memset::dst#2 memset::dst#3 memset::dst#1 ] [ main::z#0 ] @@ -1297,7 +1328,7 @@ Allocated zp ZP_BYTE:3 [ main::y#2 main::y#1 ] Allocated zp ZP_BYTE:4 [ mul8u::a#2 mul8u::a#1 mul8u::a#0 ] Allocated zp ZP_WORD:5 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] Allocated zp ZP_WORD:7 [ mul8u::mb#2 mul8u::mb#1 ] -Allocated zp ZP_WORD:9 [ memset::str#2 ] +Allocated zp ZP_WORD:9 [ memset::str#3 ] Allocated zp ZP_BYTE:11 [ memset::c#3 ] Allocated zp ZP_WORD:12 [ memset::dst#2 memset::dst#3 memset::dst#1 ] Allocated zp ZP_BYTE:14 [ main::z#0 ] @@ -1712,7 +1743,7 @@ init: { // [70] phi (byte) memset::c#3 = (byte) 0 [phi:init::@2->memset#0] -- vbuz1=vbuc1 lda #0 sta memset.c - // [70] phi (void*) memset::str#2 = (void*)(const byte*) screen#0 [phi:init::@2->memset#1] -- pvoz1=pvoc1 + // [70] phi (void*) memset::str#3 = (void*)(const byte*) screen#0 [phi:init::@2->memset#1] -- pvoz1=pvoc1 lda #<screen sta memset.str lda #>screen @@ -1729,7 +1760,7 @@ init: { // [70] phi (byte) memset::c#3 = (const byte) BLACK#0 [phi:init::@3->memset#0] -- vbuz1=vbuc1 lda #BLACK sta memset.c - // [70] phi (void*) memset::str#2 = (void*)(const byte*) colors#0 [phi:init::@3->memset#1] -- pvoz1=pvoc1 + // [70] phi (void*) memset::str#3 = (void*)(const byte*) colors#0 [phi:init::@3->memset#1] -- pvoz1=pvoc1 lda #<colors sta memset.str lda #>colors @@ -1778,7 +1809,10 @@ memset: { .label dst = $c .label str = 9 .label c = $b - // [71] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) $3e8 -- pbuz1=pbuz2_plus_vwuc1 + jmp b1 + // memset::@1 + b1: + // [71] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) $3e8 -- pbuz1=pbuz2_plus_vwuc1 lda str clc adc #<$3e8 @@ -1786,18 +1820,18 @@ memset: { lda str+1 adc #>$3e8 sta end+1 - // [72] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 -- pbuz1=pbuz2 + // [72] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 -- pbuz1=pbuz2 lda str sta dst lda str+1 sta dst+1 - // [73] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - b1_from_memset: - b1_from_b1: - // [73] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - jmp b1 - // memset::@1 - b1: + // [73] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + b2_from_b1: + b2_from_b2: + // [73] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + jmp b2 + // memset::@2 + b2: // [74] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuz2 lda c ldy #0 @@ -1807,13 +1841,13 @@ memset: { bne !+ inc dst+1 !: - // [76] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [76] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1_from_b1 + bne b2_from_b2 lda dst cmp end - bne b1_from_b1 + bne b2_from_b2 jmp breturn // memset::@return breturn: @@ -1890,12 +1924,12 @@ Statement [65] *((const byte*) BGCOL1#0) ← (const byte) BLACK#0 [ ] ( main:2:: Statement [66] *((const byte*) BGCOL2#0) ← (const byte) RED#0 [ ] ( main:2::init:5 [ ] ) always clobbers reg byte a Statement [67] *((const byte*) BGCOL3#0) ← (const byte) BLUE#0 [ ] ( main:2::init:5 [ ] ) always clobbers reg byte a Statement [68] *((const byte*) BGCOL4#0) ← (const byte) GREEN#0 [ ] ( main:2::init:5 [ ] ) always clobbers reg byte a -Statement [71] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) $3e8 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:2::init:5::memset:58 [ memset::str#2 memset::c#3 memset::end#0 ] main:2::init:5::memset:60 [ memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [71] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) $3e8 [ memset::str#3 memset::c#3 memset::end#0 ] ( main:2::init:5::memset:58 [ memset::str#3 memset::c#3 memset::end#0 ] main:2::init:5::memset:60 [ memset::str#3 memset::c#3 memset::end#0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:11 [ memset::c#3 ] -Statement [72] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:2::init:5::memset:58 [ memset::c#3 memset::end#0 memset::dst#3 ] main:2::init:5::memset:60 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [72] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:2::init:5::memset:58 [ memset::c#3 memset::end#0 memset::dst#3 ] main:2::init:5::memset:60 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a Statement [74] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:2::init:5::memset:58 [ memset::c#3 memset::end#0 memset::dst#2 ] main:2::init:5::memset:60 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:11 [ memset::c#3 ] -Statement [76] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:2::init:5::memset:58 [ memset::c#3 memset::end#0 memset::dst#1 ] main:2::init:5::memset:60 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [76] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:2::init:5::memset:58 [ memset::c#3 memset::end#0 memset::dst#1 ] main:2::init:5::memset:60 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a Statement [78] *((const byte*) SPRITES_ENABLE#0) ← (byte) 1 [ ] ( main:2::init:5::init_sprites:56 [ ] ) always clobbers reg byte a Statement [79] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 [ ] ( main:2::init:5::init_sprites:56 [ ] ) always clobbers reg byte a Statement [80] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0 [ ] ( main:2::init:5::init_sprites:56 [ ] ) always clobbers reg byte a @@ -1934,10 +1968,10 @@ Statement [65] *((const byte*) BGCOL1#0) ← (const byte) BLACK#0 [ ] ( main:2:: Statement [66] *((const byte*) BGCOL2#0) ← (const byte) RED#0 [ ] ( main:2::init:5 [ ] ) always clobbers reg byte a Statement [67] *((const byte*) BGCOL3#0) ← (const byte) BLUE#0 [ ] ( main:2::init:5 [ ] ) always clobbers reg byte a Statement [68] *((const byte*) BGCOL4#0) ← (const byte) GREEN#0 [ ] ( main:2::init:5 [ ] ) always clobbers reg byte a -Statement [71] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) $3e8 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:2::init:5::memset:58 [ memset::str#2 memset::c#3 memset::end#0 ] main:2::init:5::memset:60 [ memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a -Statement [72] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:2::init:5::memset:58 [ memset::c#3 memset::end#0 memset::dst#3 ] main:2::init:5::memset:60 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [71] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) $3e8 [ memset::str#3 memset::c#3 memset::end#0 ] ( main:2::init:5::memset:58 [ memset::str#3 memset::c#3 memset::end#0 ] main:2::init:5::memset:60 [ memset::str#3 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [72] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:2::init:5::memset:58 [ memset::c#3 memset::end#0 memset::dst#3 ] main:2::init:5::memset:60 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a Statement [74] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:2::init:5::memset:58 [ memset::c#3 memset::end#0 memset::dst#2 ] main:2::init:5::memset:60 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y -Statement [76] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:2::init:5::memset:58 [ memset::c#3 memset::end#0 memset::dst#1 ] main:2::init:5::memset:60 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [76] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:2::init:5::memset:58 [ memset::c#3 memset::end#0 memset::dst#1 ] main:2::init:5::memset:60 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a Statement [78] *((const byte*) SPRITES_ENABLE#0) ← (byte) 1 [ ] ( main:2::init:5::init_sprites:56 [ ] ) always clobbers reg byte a Statement [79] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 [ ] ( main:2::init:5::init_sprites:56 [ ] ) always clobbers reg byte a Statement [80] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0 [ ] ( main:2::init:5::init_sprites:56 [ ] ) always clobbers reg byte a @@ -1949,7 +1983,7 @@ Potential registers zp ZP_BYTE:3 [ main::y#2 main::y#1 ] : zp ZP_BYTE:3 , reg by Potential registers zp ZP_BYTE:4 [ mul8u::a#2 mul8u::a#1 mul8u::a#0 ] : zp ZP_BYTE:4 , reg byte x , reg byte y , Potential registers zp ZP_WORD:5 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] : zp ZP_WORD:5 , Potential registers zp ZP_WORD:7 [ mul8u::mb#2 mul8u::mb#1 ] : zp ZP_WORD:7 , -Potential registers zp ZP_WORD:9 [ memset::str#2 ] : zp ZP_WORD:9 , +Potential registers zp ZP_WORD:9 [ memset::str#3 ] : zp ZP_WORD:9 , Potential registers zp ZP_BYTE:11 [ memset::c#3 ] : zp ZP_BYTE:11 , reg byte x , Potential registers zp ZP_WORD:12 [ memset::dst#2 memset::dst#3 memset::dst#1 ] : zp ZP_WORD:12 , Potential registers zp ZP_BYTE:14 [ main::z#0 ] : zp ZP_BYTE:14 , reg byte a , reg byte x , reg byte y , @@ -1979,35 +2013,35 @@ REGISTER UPLIFT SCOPES Uplift Scope [mul8u] 3,503.83: zp ZP_WORD:5 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] 2,431: zp ZP_WORD:7 [ mul8u::mb#2 mul8u::mb#1 ] 2,002: zp ZP_BYTE:46 [ mul8u::$1 ] 1,670.67: zp ZP_BYTE:4 [ mul8u::a#2 mul8u::a#1 mul8u::a#0 ] 4: zp ZP_WORD:23 [ mul8u::return#2 ] Uplift Scope [main] 209.21: zp ZP_BYTE:3 [ main::y#2 main::y#1 ] 202: zp ZP_BYTE:14 [ main::z#0 ] 202: zp ZP_BYTE:15 [ main::tile#0 ] 38.9: zp ZP_BYTE:2 [ main::x#4 main::x#1 ] Uplift Scope [draw_block] 34.33: zp ZP_BYTE:16 [ draw_block::tileno#0 ] 34.33: zp ZP_BYTE:17 [ draw_block::x#0 ] 34.33: zp ZP_BYTE:18 [ draw_block::y#0 ] 4: zp ZP_BYTE:22 [ draw_block::y#1 ] 4: zp ZP_WORD:25 [ draw_block::z#0 ] 4: zp ZP_WORD:30 [ draw_block::$11 ] 4: zp ZP_WORD:32 [ draw_block::$12 ] 4: zp ZP_WORD:34 [ draw_block::$13 ] 4: zp ZP_WORD:36 [ draw_block::$14 ] 4: zp ZP_WORD:38 [ draw_block::$15 ] 4: zp ZP_WORD:40 [ draw_block::$16 ] 4: zp ZP_WORD:42 [ draw_block::$17 ] 4: zp ZP_WORD:44 [ draw_block::$18 ] 2: zp ZP_BYTE:29 [ draw_block::drawtile#0 ] 1.12: zp ZP_WORD:27 [ draw_block::z#1 ] 0.67: zp ZP_WORD:20 [ draw_block::x1#0 ] 0.5: zp ZP_BYTE:19 [ draw_block::tileno#1 ] -Uplift Scope [memset] 38: zp ZP_WORD:12 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:47 [ memset::end#0 ] 1.57: zp ZP_BYTE:11 [ memset::c#3 ] 0: zp ZP_WORD:9 [ memset::str#2 ] +Uplift Scope [memset] 38: zp ZP_WORD:12 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:47 [ memset::end#0 ] 1.57: zp ZP_BYTE:11 [ memset::c#3 ] 0: zp ZP_WORD:9 [ memset::str#3 ] Uplift Scope [init] Uplift Scope [init_sprites] Uplift Scope [] -Uplifting [mul8u] best 92836 combination zp ZP_WORD:5 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] zp ZP_WORD:7 [ mul8u::mb#2 mul8u::mb#1 ] reg byte a [ mul8u::$1 ] reg byte x [ mul8u::a#2 mul8u::a#1 mul8u::a#0 ] zp ZP_WORD:23 [ mul8u::return#2 ] -Uplifting [main] best 91836 combination zp ZP_BYTE:3 [ main::y#2 main::y#1 ] reg byte a [ main::z#0 ] reg byte a [ main::tile#0 ] zp ZP_BYTE:2 [ main::x#4 main::x#1 ] -Uplifting [draw_block] best 90927 combination reg byte a [ draw_block::tileno#0 ] reg byte y [ draw_block::x#0 ] reg byte x [ draw_block::y#0 ] reg byte a [ draw_block::y#1 ] zp ZP_WORD:25 [ draw_block::z#0 ] zp ZP_WORD:30 [ draw_block::$11 ] zp ZP_WORD:32 [ draw_block::$12 ] zp ZP_WORD:34 [ draw_block::$13 ] zp ZP_WORD:36 [ draw_block::$14 ] zp ZP_WORD:38 [ draw_block::$15 ] zp ZP_WORD:40 [ draw_block::$16 ] zp ZP_WORD:42 [ draw_block::$17 ] zp ZP_WORD:44 [ draw_block::$18 ] zp ZP_BYTE:29 [ draw_block::drawtile#0 ] zp ZP_WORD:27 [ draw_block::z#1 ] zp ZP_WORD:20 [ draw_block::x1#0 ] zp ZP_BYTE:19 [ draw_block::tileno#1 ] +Uplifting [mul8u] best 92866 combination zp ZP_WORD:5 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] zp ZP_WORD:7 [ mul8u::mb#2 mul8u::mb#1 ] reg byte a [ mul8u::$1 ] reg byte x [ mul8u::a#2 mul8u::a#1 mul8u::a#0 ] zp ZP_WORD:23 [ mul8u::return#2 ] +Uplifting [main] best 91866 combination zp ZP_BYTE:3 [ main::y#2 main::y#1 ] reg byte a [ main::z#0 ] reg byte a [ main::tile#0 ] zp ZP_BYTE:2 [ main::x#4 main::x#1 ] +Uplifting [draw_block] best 90957 combination reg byte a [ draw_block::tileno#0 ] reg byte y [ draw_block::x#0 ] reg byte x [ draw_block::y#0 ] reg byte a [ draw_block::y#1 ] zp ZP_WORD:25 [ draw_block::z#0 ] zp ZP_WORD:30 [ draw_block::$11 ] zp ZP_WORD:32 [ draw_block::$12 ] zp ZP_WORD:34 [ draw_block::$13 ] zp ZP_WORD:36 [ draw_block::$14 ] zp ZP_WORD:38 [ draw_block::$15 ] zp ZP_WORD:40 [ draw_block::$16 ] zp ZP_WORD:42 [ draw_block::$17 ] zp ZP_WORD:44 [ draw_block::$18 ] zp ZP_BYTE:29 [ draw_block::drawtile#0 ] zp ZP_WORD:27 [ draw_block::z#1 ] zp ZP_WORD:20 [ draw_block::x1#0 ] zp ZP_BYTE:19 [ draw_block::tileno#1 ] Limited combination testing to 100 combinations of 1296 possible. -Uplifting [memset] best 90911 combination zp ZP_WORD:12 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:47 [ memset::end#0 ] reg byte x [ memset::c#3 ] zp ZP_WORD:9 [ memset::str#2 ] -Uplifting [init] best 90911 combination -Uplifting [init_sprites] best 90911 combination -Uplifting [] best 90911 combination +Uplifting [memset] best 90941 combination zp ZP_WORD:12 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:47 [ memset::end#0 ] reg byte x [ memset::c#3 ] zp ZP_WORD:9 [ memset::str#3 ] +Uplifting [init] best 90941 combination +Uplifting [init_sprites] best 90941 combination +Uplifting [] best 90941 combination Attempting to uplift remaining variables inzp ZP_BYTE:3 [ main::y#2 main::y#1 ] -Uplifting [main] best 90911 combination zp ZP_BYTE:3 [ main::y#2 main::y#1 ] +Uplifting [main] best 90941 combination zp ZP_BYTE:3 [ main::y#2 main::y#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::x#4 main::x#1 ] -Uplifting [main] best 90911 combination zp ZP_BYTE:2 [ main::x#4 main::x#1 ] +Uplifting [main] best 90941 combination zp ZP_BYTE:2 [ main::x#4 main::x#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:29 [ draw_block::drawtile#0 ] -Uplifting [draw_block] best 90907 combination reg byte x [ draw_block::drawtile#0 ] +Uplifting [draw_block] best 90937 combination reg byte x [ draw_block::drawtile#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:19 [ draw_block::tileno#1 ] -Uplifting [draw_block] best 90907 combination zp ZP_BYTE:19 [ draw_block::tileno#1 ] +Uplifting [draw_block] best 90937 combination zp ZP_BYTE:19 [ draw_block::tileno#1 ] Coalescing zero page register with common assignment [ zp ZP_WORD:5 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] ] with [ zp ZP_WORD:23 [ mul8u::return#2 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:9 [ memset::str#2 ] ] with [ zp ZP_WORD:12 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:9 [ memset::str#3 ] ] with [ zp ZP_WORD:12 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:20 [ draw_block::x1#0 ] ] with [ zp ZP_WORD:27 [ draw_block::z#1 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:5 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 ] ] with [ zp ZP_WORD:25 [ draw_block::z#0 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:20 [ draw_block::x1#0 draw_block::z#1 ] ] with [ zp ZP_WORD:44 [ draw_block::$18 ] ] - score: 1 Allocated (was zp ZP_WORD:5) zp ZP_WORD:4 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 draw_block::z#0 ] Allocated (was zp ZP_WORD:7) zp ZP_WORD:6 [ mul8u::mb#2 mul8u::mb#1 ] -Allocated (was zp ZP_WORD:9) zp ZP_WORD:8 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] +Allocated (was zp ZP_WORD:9) zp ZP_WORD:8 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] Allocated (was zp ZP_BYTE:19) zp ZP_BYTE:10 [ draw_block::tileno#1 ] Allocated (was zp ZP_WORD:20) zp ZP_WORD:11 [ draw_block::x1#0 draw_block::z#1 draw_block::$18 ] Allocated (was zp ZP_WORD:30) zp ZP_WORD:13 [ draw_block::$11 ] @@ -2379,7 +2413,7 @@ init: { memset_from_b2: // [70] phi (byte) memset::c#3 = (byte) 0 [phi:init::@2->memset#0] -- vbuxx=vbuc1 ldx #0 - // [70] phi (void*) memset::str#2 = (void*)(const byte*) screen#0 [phi:init::@2->memset#1] -- pvoz1=pvoc1 + // [70] phi (void*) memset::str#3 = (void*)(const byte*) screen#0 [phi:init::@2->memset#1] -- pvoz1=pvoc1 lda #<screen sta memset.str lda #>screen @@ -2395,7 +2429,7 @@ init: { memset_from_b3: // [70] phi (byte) memset::c#3 = (const byte) BLACK#0 [phi:init::@3->memset#0] -- vbuxx=vbuc1 ldx #BLACK - // [70] phi (void*) memset::str#2 = (void*)(const byte*) colors#0 [phi:init::@3->memset#1] -- pvoz1=pvoc1 + // [70] phi (void*) memset::str#3 = (void*)(const byte*) colors#0 [phi:init::@3->memset#1] -- pvoz1=pvoc1 lda #<colors sta memset.str lda #>colors @@ -2443,7 +2477,10 @@ memset: { .label end = $1b .label dst = 8 .label str = 8 - // [71] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) $3e8 -- pbuz1=pbuz2_plus_vwuc1 + jmp b1 + // memset::@1 + b1: + // [71] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) $3e8 -- pbuz1=pbuz2_plus_vwuc1 lda str clc adc #<$3e8 @@ -2451,14 +2488,14 @@ memset: { lda str+1 adc #>$3e8 sta end+1 - // [72] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 - // [73] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - b1_from_memset: - b1_from_b1: - // [73] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - jmp b1 - // memset::@1 - b1: + // [72] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + // [73] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + b2_from_b1: + b2_from_b2: + // [73] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + jmp b2 + // memset::@2 + b2: // [74] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx txa ldy #0 @@ -2468,13 +2505,13 @@ memset: { bne !+ inc dst+1 !: - // [76] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [76] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1_from_b1 + bne b2_from_b2 lda dst cmp end - bne b1_from_b1 + bne b2_from_b2 jmp breturn // memset::@return breturn: @@ -2530,6 +2567,7 @@ Removing instruction jmp toD0181 Removing instruction jmp b1 Removing instruction jmp breturn Removing instruction jmp b1 +Removing instruction jmp b2 Removing instruction jmp breturn Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination @@ -2549,8 +2587,8 @@ Replacing label b2_from_b5 with b2 Replacing label b1_from_b3 with b1 Replacing label b4_from_b4 with b4 Replacing label b3_from_b2 with b3 -Replacing label b1_from_b1 with b1 -Replacing label b1_from_b1 with b1 +Replacing label b2_from_b2 with b2 +Replacing label b2_from_b2 with b2 Removing instruction b1_from_bbegin: Removing instruction b1: Removing instruction main_from_b1: @@ -2568,8 +2606,8 @@ Removing instruction b3_from_b2: Removing instruction memset_from_b3: Removing instruction toD0181_from_b3: Removing instruction toD0181: -Removing instruction b1_from_memset: -Removing instruction b1_from_b1: +Removing instruction b2_from_b1: +Removing instruction b2_from_b2: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: Removing instruction init_from_main: @@ -2587,6 +2625,7 @@ Removing instruction b2: Removing instruction b3: Removing instruction b1: Removing instruction breturn: +Removing instruction b1: Removing instruction breturn: Removing instruction breturn: Succesful ASM optimization Pass5UnusedLabelElimination @@ -2711,6 +2750,7 @@ FINAL SYMBOL TABLE (byte) main::z#0 reg byte a 202.0 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (label) memset::@1 +(label) memset::@2 (label) memset::@return (byte) memset::c (byte) memset::c#3 reg byte x 1.5714285714285714 @@ -2723,7 +2763,7 @@ FINAL SYMBOL TABLE (word) memset::num (void*) memset::return (void*) memset::str -(void*) memset::str#2 str zp ZP_WORD:8 +(void*) memset::str#3 str zp ZP_WORD:8 (word()) mul8u((byte) mul8u::a , (byte) mul8u::b) (byte~) mul8u::$1 reg byte a 2002.0 (label) mul8u::@1 @@ -2756,7 +2796,7 @@ zp ZP_BYTE:3 [ main::y#2 main::y#1 ] reg byte x [ mul8u::a#2 mul8u::a#1 mul8u::a#0 ] zp ZP_WORD:4 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 draw_block::z#0 ] zp ZP_WORD:6 [ mul8u::mb#2 mul8u::mb#1 ] -zp ZP_WORD:8 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] +zp ZP_WORD:8 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] reg byte x [ memset::c#3 ] reg byte a [ main::z#0 ] reg byte a [ main::tile#0 ] @@ -3120,7 +3160,7 @@ init: { // [70] phi from init::@2 to memset [phi:init::@2->memset] // [70] phi (byte) memset::c#3 = (byte) 0 [phi:init::@2->memset#0] -- vbuxx=vbuc1 ldx #0 - // [70] phi (void*) memset::str#2 = (void*)(const byte*) screen#0 [phi:init::@2->memset#1] -- pvoz1=pvoc1 + // [70] phi (void*) memset::str#3 = (void*)(const byte*) screen#0 [phi:init::@2->memset#1] -- pvoz1=pvoc1 lda #<screen sta memset.str lda #>screen @@ -3133,7 +3173,7 @@ init: { // [70] phi from init::@3 to memset [phi:init::@3->memset] // [70] phi (byte) memset::c#3 = (const byte) BLACK#0 [phi:init::@3->memset#0] -- vbuxx=vbuc1 ldx #BLACK - // [70] phi (void*) memset::str#2 = (void*)(const byte*) colors#0 [phi:init::@3->memset#1] -- pvoz1=pvoc1 + // [70] phi (void*) memset::str#3 = (void*)(const byte*) colors#0 [phi:init::@3->memset#1] -- pvoz1=pvoc1 lda #<colors sta memset.str lda #>colors @@ -3181,8 +3221,9 @@ memset: { .label end = $1b .label dst = 8 .label str = 8 + // memset::@1 // end = (char*)str + num - // [71] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) $3e8 -- pbuz1=pbuz2_plus_vwuc1 + // [71] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) $3e8 -- pbuz1=pbuz2_plus_vwuc1 lda str clc adc #<$3e8 @@ -3190,11 +3231,11 @@ memset: { lda str+1 adc #>$3e8 sta end+1 - // [72] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 - // [73] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] - // [73] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy - // memset::@1 - b1: + // [72] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 + // [73] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2] + // [73] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy + // memset::@2 + b2: // *dst = c // [74] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx txa @@ -3206,13 +3247,13 @@ memset: { bne !+ inc dst+1 !: - // [76] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + // [76] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 lda dst+1 cmp end+1 - bne b1 + bne b2 lda dst cmp end - bne b1 + bne b2 // memset::@return // } // [77] return diff --git a/src/test/ref/scan-desire-problem.sym b/src/test/ref/scan-desire-problem.sym index 8099d8155..4121ea247 100644 --- a/src/test/ref/scan-desire-problem.sym +++ b/src/test/ref/scan-desire-problem.sym @@ -109,6 +109,7 @@ (byte) main::z#0 reg byte a 202.0 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (label) memset::@1 +(label) memset::@2 (label) memset::@return (byte) memset::c (byte) memset::c#3 reg byte x 1.5714285714285714 @@ -121,7 +122,7 @@ (word) memset::num (void*) memset::return (void*) memset::str -(void*) memset::str#2 str zp ZP_WORD:8 +(void*) memset::str#3 str zp ZP_WORD:8 (word()) mul8u((byte) mul8u::a , (byte) mul8u::b) (byte~) mul8u::$1 reg byte a 2002.0 (label) mul8u::@1 @@ -154,7 +155,7 @@ zp ZP_BYTE:3 [ main::y#2 main::y#1 ] reg byte x [ mul8u::a#2 mul8u::a#1 mul8u::a#0 ] zp ZP_WORD:4 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 draw_block::z#0 ] zp ZP_WORD:6 [ mul8u::mb#2 mul8u::mb#1 ] -zp ZP_WORD:8 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] +zp ZP_WORD:8 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ] reg byte x [ memset::c#3 ] reg byte a [ main::z#0 ] reg byte a [ main::tile#0 ] diff --git a/src/test/ref/screen-center-angle.log b/src/test/ref/screen-center-angle.log index b98db759d..e0fb90661 100644 --- a/src/test/ref/screen-center-angle.log +++ b/src/test/ref/screen-center-angle.log @@ -5,6 +5,7 @@ Fixing pointer addition (word*~) bsearch16u::$15 ← (word*) bsearch16u::pivot + Fixing pointer addition (word*~) bsearch16u::$1 ← (word*) bsearch16u::items - (number) 1 Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i) Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i) +Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src) Warning! Adding boolean cast to non-boolean sub-expression (byte) atan2_16::shift Identified constant variable (byte*) HEAP_TOP Identified constant variable (byte*) main::BASE_SCREEN @@ -14,10 +15,15 @@ Inlined call (byte~) main::$1 ← call toD018 (byte*) SCREEN (byte*) CHARSET Inlined call (byte~) main::$7 ← call toD018 (byte*) main::BASE_SCREEN (byte*) main::BASE_CHARSET Culled Empty Block (label) @1 Culled Empty Block (label) @2 +Culled Empty Block (label) @3 Culled Empty Block (label) @4 Culled Empty Block (label) @5 Culled Empty Block (label) @6 Culled Empty Block (label) @7 +Culled Empty Block (label) @9 +Culled Empty Block (label) @10 +Culled Empty Block (label) @11 +Culled Empty Block (label) @12 Culled Empty Block (label) init_font_hex::@6 Culled Empty Block (label) atan2_16::@9 Culled Empty Block (label) atan2_16::@10 @@ -31,13 +37,8 @@ Culled Empty Block (label) atan2_16::@23 Culled Empty Block (label) atan2_16::@31 Culled Empty Block (label) atan2_16::@32 Culled Empty Block (label) atan2_16::@14 -Culled Empty Block (label) @9 -Culled Empty Block (label) clock::@1 -Culled Empty Block (label) @11 -Culled Empty Block (label) @12 -Culled Empty Block (label) @13 Culled Empty Block (label) @14 -Culled Empty Block (label) @15 +Culled Empty Block (label) clock::@1 Culled Empty Block (label) @16 Culled Empty Block (label) @17 Culled Empty Block (label) @18 @@ -48,21 +49,26 @@ Culled Empty Block (label) @22 Culled Empty Block (label) @23 Culled Empty Block (label) @24 Culled Empty Block (label) @25 +Culled Empty Block (label) @26 Culled Empty Block (label) @27 Culled Empty Block (label) @28 Culled Empty Block (label) @29 Culled Empty Block (label) @30 -Culled Empty Block (label) @31 Culled Empty Block (label) @32 +Culled Empty Block (label) @33 +Culled Empty Block (label) @34 +Culled Empty Block (label) @35 +Culled Empty Block (label) @36 +Culled Empty Block (label) @37 Culled Empty Block (label) main::toD0181_@1 Culled Empty Block (label) main::toD0182_@1 -Culled Empty Block (label) @34 +Culled Empty Block (label) @39 Culled Empty Block (label) init_angle_screen::@4 CONTROL FLOW GRAPH SSA @begin: scope:[] from - to:@3 -@3: scope:[] from @begin + to:@8 +@8: scope:[] from @begin (byte*) D018#0 ← ((byte*)) (number) $d018 (dword*) CIA2_TIMER_AB#0 ← ((dword*)) (number) $dd04 (byte*) CIA2_TIMER_A_CONTROL#0 ← ((byte*)) (number) $dd0e @@ -72,7 +78,7 @@ CONTROL FLOW GRAPH SSA (byte) CIA_TIMER_CONTROL_CONTINUOUS#0 ← (number) 0 (byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES#0 ← (number) 0 (byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 ← (number) $40 - to:@8 + to:@13 init_font_hex: scope:[init_font_hex] from main (byte*) init_font_hex::charset#6 ← phi( main/(byte*) init_font_hex::charset#1 ) (byte*) init_font_hex::proto_hi#0 ← (byte[]) FONT_HEX_PROTO#0 @@ -142,13 +148,13 @@ init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4 init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 return to:@return -@8: scope:[] from @3 +@13: scope:[] from @8 (byte[]) FONT_HEX_PROTO#0 ← { (number) 2, (number) 5, (number) 5, (number) 5, (number) 2, (number) 6, (number) 2, (number) 2, (number) 2, (number) 7, (number) 6, (number) 1, (number) 2, (number) 4, (number) 7, (number) 6, (number) 1, (number) 2, (number) 1, (number) 6, (number) 5, (number) 5, (number) 7, (number) 1, (number) 1, (number) 7, (number) 4, (number) 6, (number) 1, (number) 6, (number) 3, (number) 4, (number) 6, (number) 5, (number) 2, (number) 7, (number) 1, (number) 1, (number) 1, (number) 1, (number) 2, (number) 5, (number) 2, (number) 5, (number) 2, (number) 2, (number) 5, (number) 3, (number) 1, (number) 1, (number) 2, (number) 5, (number) 7, (number) 5, (number) 5, (number) 6, (number) 5, (number) 6, (number) 5, (number) 6, (number) 2, (number) 5, (number) 4, (number) 5, (number) 2, (number) 6, (number) 5, (number) 5, (number) 5, (number) 6, (number) 7, (number) 4, (number) 6, (number) 4, (number) 7, (number) 7, (number) 4, (number) 6, (number) 4, (number) 4 } (byte) CORDIC_ITERATIONS_16#0 ← (number) $f (word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 ← kickasm {{ .for (var i=0; i<CORDIC_ITERATIONS_16; i++) .word 256*2*256*atan(1/pow(2,i))/PI/2 }} - to:@10 + to:@15 atan2_16: scope:[atan2_16] from init_angle_screen::@2 (signed word) atan2_16::x#9 ← phi( init_angle_screen::@2/(signed word) atan2_16::x#0 ) (signed word) atan2_16::y#1 ← phi( init_angle_screen::@2/(signed word) atan2_16::y#0 ) @@ -359,9 +365,9 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 (word) atan2_16::return#1 ← (word) atan2_16::return#3 return to:@return -@10: scope:[] from @8 +@15: scope:[] from @13 (dword) CLOCKS_PER_INIT#0 ← (number) $12 - to:@26 + to:@31 clock: scope:[clock] from main::@5 (number~) clock::$0 ← (number) $ffffffff - *((dword*) CIA2_TIMER_AB#0) (dword) clock::return#0 ← (number~) clock::$0 @@ -433,9 +439,9 @@ print_dword_at::@2: scope:[print_dword_at] from print_dword_at::@1 print_dword_at::@return: scope:[print_dword_at] from print_dword_at::@2 return to:@return -@26: scope:[] from @10 +@31: scope:[] from @15 (byte[]) print_hextab#0 ← (const string) $0 - to:@33 + to:@38 print_byte_at: scope:[print_byte_at] from print_word_at print_word_at::@1 (byte*) print_byte_at::at#2 ← phi( print_word_at/(byte*) print_byte_at::at#0 print_word_at::@1/(byte*) print_byte_at::at#1 ) (byte) print_byte_at::b#2 ← phi( print_word_at/(byte) print_byte_at::b#0 print_word_at::@1/(byte) print_byte_at::b#1 ) @@ -466,11 +472,11 @@ print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print_char_at::@return: scope:[print_char_at] from print_char_at return to:@return -@33: scope:[] from @26 +@38: scope:[] from @31 (byte*) CHARSET#0 ← ((byte*)) (number) $2000 (byte*) SCREEN#0 ← ((byte*)) (number) $2800 - to:@35 -main: scope:[main] from @35 + to:@40 +main: scope:[main] from @40 (byte*) init_font_hex::charset#1 ← (byte*) CHARSET#0 call init_font_hex to:main::@3 @@ -623,21 +629,21 @@ init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@5 init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@3 return to:@return -@35: scope:[] from @33 +@40: scope:[] from @38 call main - to:@36 -@36: scope:[] from @35 + to:@41 +@41: scope:[] from @40 to:@end -@end: scope:[] from @36 +@end: scope:[] from @41 SYMBOL TABLE SSA (const string) $0 = (string) "0123456789abcdef" -(label) @10 -(label) @26 -(label) @3 -(label) @33 -(label) @35 -(label) @36 +(label) @13 +(label) @15 +(label) @31 +(label) @38 +(label) @40 +(label) @41 (label) @8 (label) @begin (label) @end @@ -1917,13 +1923,13 @@ Added new block during phi lifting atan2_16::@39(between atan2_16::@7 and atan2_ Added new block during phi lifting init_angle_screen::@6(between init_angle_screen::@3 and init_angle_screen::@1) Added new block during phi lifting init_angle_screen::@7(between init_angle_screen::@5 and init_angle_screen::@2) Adding NOP phi() at start of @begin -Adding NOP phi() at start of @3 Adding NOP phi() at start of @8 -Adding NOP phi() at start of @10 -Adding NOP phi() at start of @26 -Adding NOP phi() at start of @33 -Adding NOP phi() at start of @35 -Adding NOP phi() at start of @36 +Adding NOP phi() at start of @13 +Adding NOP phi() at start of @15 +Adding NOP phi() at start of @31 +Adding NOP phi() at start of @38 +Adding NOP phi() at start of @40 +Adding NOP phi() at start of @41 Adding NOP phi() at start of @end Adding NOP phi() at start of main Adding NOP phi() at start of main::@3 @@ -2005,12 +2011,12 @@ Coalesced [212] init_font_hex::c1#5 ← init_font_hex::c1#1 Coalesced [213] init_font_hex::i#3 ← init_font_hex::i#1 Coalesced [214] init_font_hex::idx#7 ← init_font_hex::idx#2 Coalesced down to 28 phi equivalence classes -Culled Empty Block (label) @3 Culled Empty Block (label) @8 -Culled Empty Block (label) @10 -Culled Empty Block (label) @26 -Culled Empty Block (label) @33 -Culled Empty Block (label) @36 +Culled Empty Block (label) @13 +Culled Empty Block (label) @15 +Culled Empty Block (label) @31 +Culled Empty Block (label) @38 +Culled Empty Block (label) @41 Culled Empty Block (label) main::@3 Culled Empty Block (label) main::toD0181_@return Culled Empty Block (label) main::@7 @@ -2029,7 +2035,7 @@ Culled Empty Block (label) atan2_16::@37 Culled Empty Block (label) init_font_hex::@7 Culled Empty Block (label) init_font_hex::@8 Culled Empty Block (label) init_font_hex::@9 -Renumbering block @35 to @1 +Renumbering block @40 to @1 Renumbering block atan2_16::@13 to atan2_16::@9 Renumbering block atan2_16::@15 to atan2_16::@10 Renumbering block atan2_16::@16 to atan2_16::@11 diff --git a/src/test/ref/screen-center-distance.log b/src/test/ref/screen-center-distance.log index 3ea65a54a..2b7ad9d98 100644 --- a/src/test/ref/screen-center-distance.log +++ b/src/test/ref/screen-center-distance.log @@ -6,15 +6,20 @@ Fixing pointer addition (word*~) bsearch16u::$1 ← (word*) bsearch16u::items - Fixing pointer increment (word*) init_squares::squares ← ++ (word*) init_squares::squares Fixing pointer addition (word~) sqrt::$1 ← (word*) sqrt::found - (word*) SQUARES Fixing pointer array-indexing *((word*) SQUARES + (byte) sqr::val) +Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src) Identified constant variable (byte*) HEAP_TOP Identified constant variable (byte*) main::BASE_SCREEN Identified constant variable (byte*) main::BASE_CHARSET Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx Inlined call (byte~) main::$1 ← call toD018 (byte*) SCREEN (byte*) CHARSET Inlined call (byte~) main::$7 ← call toD018 (byte*) main::BASE_SCREEN (byte*) main::BASE_CHARSET -Culled Empty Block (label) malloc::@1 Culled Empty Block (label) @1 Culled Empty Block (label) @2 +Culled Empty Block (label) @3 +Culled Empty Block (label) malloc::@1 +Culled Empty Block (label) @5 +Culled Empty Block (label) @6 +Culled Empty Block (label) @7 Culled Empty Block (label) bsearch16u::@11 Culled Empty Block (label) bsearch16u::@12 Culled Empty Block (label) bsearch16u::@14 @@ -23,21 +28,16 @@ Culled Empty Block (label) bsearch16u::@17 Culled Empty Block (label) bsearch16u::@4 Culled Empty Block (label) bsearch16u::@5 Culled Empty Block (label) init_squares::@2 -Culled Empty Block (label) @4 -Culled Empty Block (label) sqr::@1 -Culled Empty Block (label) @5 -Culled Empty Block (label) sqrt::@1 -Culled Empty Block (label) @7 -Culled Empty Block (label) @8 Culled Empty Block (label) @9 +Culled Empty Block (label) sqr::@1 Culled Empty Block (label) @10 -Culled Empty Block (label) init_font_hex::@6 -Culled Empty Block (label) clock::@1 +Culled Empty Block (label) sqrt::@1 Culled Empty Block (label) @12 Culled Empty Block (label) @13 Culled Empty Block (label) @14 Culled Empty Block (label) @15 -Culled Empty Block (label) @16 +Culled Empty Block (label) init_font_hex::@6 +Culled Empty Block (label) clock::@1 Culled Empty Block (label) @17 Culled Empty Block (label) @18 Culled Empty Block (label) @19 @@ -48,15 +48,20 @@ Culled Empty Block (label) @23 Culled Empty Block (label) @24 Culled Empty Block (label) @25 Culled Empty Block (label) @26 +Culled Empty Block (label) @27 Culled Empty Block (label) @28 Culled Empty Block (label) @29 Culled Empty Block (label) @30 Culled Empty Block (label) @31 -Culled Empty Block (label) @32 Culled Empty Block (label) @33 +Culled Empty Block (label) @34 +Culled Empty Block (label) @35 +Culled Empty Block (label) @36 +Culled Empty Block (label) @37 +Culled Empty Block (label) @38 Culled Empty Block (label) main::toD0181_@1 Culled Empty Block (label) main::toD0182_@1 -Culled Empty Block (label) @35 +Culled Empty Block (label) @40 Culled Empty Block (label) init_dist_screen::@13 Culled Empty Block (label) init_dist_screen::@14 Culled Empty Block (label) init_dist_screen::@9 @@ -65,9 +70,11 @@ Culled Empty Block (label) init_dist_screen::@12 CONTROL FLOW GRAPH SSA @begin: scope:[] from + to:@4 +@4: scope:[] from @begin (byte*) HEAP_TOP#0 ← ((byte*)) (number) $a000 (byte*) heap_head#0 ← (byte*) HEAP_TOP#0 - to:@3 + to:@8 malloc: scope:[malloc] from init_squares (word) malloc::size#1 ← phi( init_squares/(word) malloc::size#0 ) (byte*) heap_head#10 ← phi( init_squares/(byte*) heap_head#19 ) @@ -165,11 +172,11 @@ bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2 (word*~) bsearch16u::$4 ← phi( bsearch16u::@1/(word*~) bsearch16u::$3 bsearch16u::@2/(word*~) bsearch16u::$2 ) (word*) bsearch16u::return#2 ← (word*~) bsearch16u::$4 to:bsearch16u::@return -@3: scope:[] from @begin - (byte*) heap_head#43 ← phi( @begin/(byte*) heap_head#0 ) +@8: scope:[] from @4 + (byte*) heap_head#43 ← phi( @4/(byte*) heap_head#0 ) (byte) NUM_SQUARES#0 ← (number) $ff (word*) SQUARES#0 ← (word*) 0 - to:@6 + to:@11 init_squares: scope:[init_squares] from init_dist_screen (byte*) heap_head#19 ← phi( init_dist_screen/(byte*) heap_head#23 ) (byte) NUM_SQUARES#6 ← phi( init_dist_screen/(byte) NUM_SQUARES#3 ) @@ -249,10 +256,10 @@ sqrt::@return: scope:[sqrt] from sqrt::@2 (byte) sqrt::return#1 ← (byte) sqrt::return#3 return to:@return -@6: scope:[] from @3 - (word*) SQUARES#43 ← phi( @3/(word*) SQUARES#0 ) - (byte*) heap_head#38 ← phi( @3/(byte*) heap_head#43 ) - (byte) NUM_SQUARES#32 ← phi( @3/(byte) NUM_SQUARES#0 ) +@11: scope:[] from @8 + (word*) SQUARES#43 ← phi( @8/(word*) SQUARES#0 ) + (byte*) heap_head#38 ← phi( @8/(byte*) heap_head#43 ) + (byte) NUM_SQUARES#32 ← phi( @8/(byte) NUM_SQUARES#0 ) (byte*) D018#0 ← ((byte*)) (number) $d018 (dword*) CIA2_TIMER_AB#0 ← ((dword*)) (number) $dd04 (byte*) CIA2_TIMER_A_CONTROL#0 ← ((byte*)) (number) $dd0e @@ -262,7 +269,7 @@ sqrt::@return: scope:[sqrt] from sqrt::@2 (byte) CIA_TIMER_CONTROL_CONTINUOUS#0 ← (number) 0 (byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES#0 ← (number) 0 (byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 ← (number) $40 - to:@11 + to:@16 init_font_hex: scope:[init_font_hex] from main (byte*) init_font_hex::charset#6 ← phi( main/(byte*) init_font_hex::charset#1 ) (byte*) init_font_hex::proto_hi#0 ← (byte[]) FONT_HEX_PROTO#0 @@ -332,13 +339,13 @@ init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4 init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 return to:@return -@11: scope:[] from @6 - (word*) SQUARES#39 ← phi( @6/(word*) SQUARES#43 ) - (byte*) heap_head#34 ← phi( @6/(byte*) heap_head#38 ) - (byte) NUM_SQUARES#28 ← phi( @6/(byte) NUM_SQUARES#32 ) +@16: scope:[] from @11 + (word*) SQUARES#39 ← phi( @11/(word*) SQUARES#43 ) + (byte*) heap_head#34 ← phi( @11/(byte*) heap_head#38 ) + (byte) NUM_SQUARES#28 ← phi( @11/(byte) NUM_SQUARES#32 ) (byte[]) FONT_HEX_PROTO#0 ← { (number) 2, (number) 5, (number) 5, (number) 5, (number) 2, (number) 6, (number) 2, (number) 2, (number) 2, (number) 7, (number) 6, (number) 1, (number) 2, (number) 4, (number) 7, (number) 6, (number) 1, (number) 2, (number) 1, (number) 6, (number) 5, (number) 5, (number) 7, (number) 1, (number) 1, (number) 7, (number) 4, (number) 6, (number) 1, (number) 6, (number) 3, (number) 4, (number) 6, (number) 5, (number) 2, (number) 7, (number) 1, (number) 1, (number) 1, (number) 1, (number) 2, (number) 5, (number) 2, (number) 5, (number) 2, (number) 2, (number) 5, (number) 3, (number) 1, (number) 1, (number) 2, (number) 5, (number) 7, (number) 5, (number) 5, (number) 6, (number) 5, (number) 6, (number) 5, (number) 6, (number) 2, (number) 5, (number) 4, (number) 5, (number) 2, (number) 6, (number) 5, (number) 5, (number) 5, (number) 6, (number) 7, (number) 4, (number) 6, (number) 4, (number) 7, (number) 7, (number) 4, (number) 6, (number) 4, (number) 4 } (dword) CLOCKS_PER_INIT#0 ← (number) $12 - to:@27 + to:@32 clock: scope:[clock] from main::@5 (number~) clock::$0 ← (number) $ffffffff - *((dword*) CIA2_TIMER_AB#0) (dword) clock::return#0 ← (number~) clock::$0 @@ -410,12 +417,12 @@ print_dword_at::@2: scope:[print_dword_at] from print_dword_at::@1 print_dword_at::@return: scope:[print_dword_at] from print_dword_at::@2 return to:@return -@27: scope:[] from @11 - (word*) SQUARES#34 ← phi( @11/(word*) SQUARES#39 ) - (byte*) heap_head#30 ← phi( @11/(byte*) heap_head#34 ) - (byte) NUM_SQUARES#23 ← phi( @11/(byte) NUM_SQUARES#28 ) +@32: scope:[] from @16 + (word*) SQUARES#34 ← phi( @16/(word*) SQUARES#39 ) + (byte*) heap_head#30 ← phi( @16/(byte*) heap_head#34 ) + (byte) NUM_SQUARES#23 ← phi( @16/(byte) NUM_SQUARES#28 ) (byte[]) print_hextab#0 ← (const string) $0 - to:@34 + to:@39 print_byte_at: scope:[print_byte_at] from print_word_at print_word_at::@1 (byte*) print_byte_at::at#2 ← phi( print_word_at/(byte*) print_byte_at::at#0 print_word_at::@1/(byte*) print_byte_at::at#1 ) (byte) print_byte_at::b#2 ← phi( print_word_at/(byte) print_byte_at::b#0 print_word_at::@1/(byte) print_byte_at::b#1 ) @@ -446,17 +453,17 @@ print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print_char_at::@return: scope:[print_char_at] from print_char_at return to:@return -@34: scope:[] from @27 - (word*) SQUARES#33 ← phi( @27/(word*) SQUARES#34 ) - (byte*) heap_head#29 ← phi( @27/(byte*) heap_head#30 ) - (byte) NUM_SQUARES#22 ← phi( @27/(byte) NUM_SQUARES#23 ) +@39: scope:[] from @32 + (word*) SQUARES#33 ← phi( @32/(word*) SQUARES#34 ) + (byte*) heap_head#29 ← phi( @32/(byte*) heap_head#30 ) + (byte) NUM_SQUARES#22 ← phi( @32/(byte) NUM_SQUARES#23 ) (byte*) CHARSET#0 ← ((byte*)) (number) $2000 (byte*) SCREEN#0 ← ((byte*)) (number) $2800 - to:@36 -main: scope:[main] from @36 - (word*) SQUARES#46 ← phi( @36/(word*) SQUARES#25 ) - (byte*) heap_head#44 ← phi( @36/(byte*) heap_head#25 ) - (byte) NUM_SQUARES#36 ← phi( @36/(byte) NUM_SQUARES#17 ) + to:@41 +main: scope:[main] from @41 + (word*) SQUARES#46 ← phi( @41/(word*) SQUARES#25 ) + (byte*) heap_head#44 ← phi( @41/(byte*) heap_head#25 ) + (byte) NUM_SQUARES#36 ← phi( @41/(byte) NUM_SQUARES#17 ) (byte*) init_font_hex::charset#1 ← (byte*) CHARSET#0 call init_font_hex to:main::@3 @@ -780,31 +787,32 @@ init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@11 (word*) SQUARES#6 ← (word*) SQUARES#15 return to:@return -@36: scope:[] from @34 - (word*) SQUARES#25 ← phi( @34/(word*) SQUARES#33 ) - (byte*) heap_head#25 ← phi( @34/(byte*) heap_head#29 ) - (byte) NUM_SQUARES#17 ← phi( @34/(byte) NUM_SQUARES#22 ) +@41: scope:[] from @39 + (word*) SQUARES#25 ← phi( @39/(word*) SQUARES#33 ) + (byte*) heap_head#25 ← phi( @39/(byte*) heap_head#29 ) + (byte) NUM_SQUARES#17 ← phi( @39/(byte) NUM_SQUARES#22 ) call main - to:@37 -@37: scope:[] from @36 - (word*) SQUARES#16 ← phi( @36/(word*) SQUARES#4 ) - (byte*) heap_head#18 ← phi( @36/(byte*) heap_head#6 ) - (byte) NUM_SQUARES#12 ← phi( @36/(byte) NUM_SQUARES#2 ) + to:@42 +@42: scope:[] from @41 + (word*) SQUARES#16 ← phi( @41/(word*) SQUARES#4 ) + (byte*) heap_head#18 ← phi( @41/(byte*) heap_head#6 ) + (byte) NUM_SQUARES#12 ← phi( @41/(byte) NUM_SQUARES#2 ) (byte) NUM_SQUARES#5 ← (byte) NUM_SQUARES#12 (byte*) heap_head#9 ← (byte*) heap_head#18 (word*) SQUARES#7 ← (word*) SQUARES#16 to:@end -@end: scope:[] from @37 +@end: scope:[] from @42 SYMBOL TABLE SSA (const string) $0 = (string) "0123456789abcdef" (label) @11 -(label) @27 -(label) @3 -(label) @34 -(label) @36 -(label) @37 -(label) @6 +(label) @16 +(label) @32 +(label) @39 +(label) @4 +(label) @41 +(label) @42 +(label) @8 (label) @begin (label) @end (byte*) CHARSET @@ -2350,13 +2358,14 @@ Added new block during phi lifting init_font_hex::@9(between init_font_hex::@3 a Added new block during phi lifting init_dist_screen::@19(between init_dist_screen::@11 and init_dist_screen::@1) Added new block during phi lifting init_dist_screen::@20(between init_dist_screen::@18 and init_dist_screen::@5) Adding NOP phi() at start of @begin -Adding NOP phi() at start of @3 -Adding NOP phi() at start of @6 +Adding NOP phi() at start of @4 +Adding NOP phi() at start of @8 Adding NOP phi() at start of @11 -Adding NOP phi() at start of @27 -Adding NOP phi() at start of @34 -Adding NOP phi() at start of @36 -Adding NOP phi() at start of @37 +Adding NOP phi() at start of @16 +Adding NOP phi() at start of @32 +Adding NOP phi() at start of @39 +Adding NOP phi() at start of @41 +Adding NOP phi() at start of @42 Adding NOP phi() at start of @end Adding NOP phi() at start of main Adding NOP phi() at start of main::@3 @@ -2378,66 +2387,67 @@ Adding NOP phi() at start of init_squares::@3 Adding NOP phi() at start of malloc Adding NOP phi() at start of init_font_hex CALL GRAPH -Calls in [] to main:7 -Calls in [main] to init_font_hex:11 clock_start:16 init_dist_screen:18 clock:20 print_dword_at:25 -Calls in [print_dword_at] to print_word_at:33 print_word_at:36 -Calls in [print_word_at] to print_byte_at:44 print_byte_at:49 -Calls in [print_byte_at] to print_char_at:58 print_char_at:64 -Calls in [init_dist_screen] to init_squares:73 sqr:83 sqr:94 sqrt:99 -Calls in [sqrt] to bsearch16u:124 -Calls in [init_squares] to malloc:164 +Calls in [] to main:8 +Calls in [main] to init_font_hex:12 clock_start:17 init_dist_screen:19 clock:21 print_dword_at:26 +Calls in [print_dword_at] to print_word_at:34 print_word_at:37 +Calls in [print_word_at] to print_byte_at:45 print_byte_at:50 +Calls in [print_byte_at] to print_char_at:59 print_char_at:65 +Calls in [init_dist_screen] to init_squares:74 sqr:84 sqr:95 sqrt:100 +Calls in [sqrt] to bsearch16u:125 +Calls in [init_squares] to malloc:165 Created 31 initial phi equivalence classes -Coalesced [32] print_word_at::w#4 ← print_word_at::w#0 -Coalesced [35] print_word_at::w#5 ← print_word_at::w#1 -Coalesced [42] print_byte_at::b#4 ← print_byte_at::b#0 -Coalesced [43] print_byte_at::at#4 ← print_byte_at::at#0 -Coalesced [47] print_byte_at::b#5 ← print_byte_at::b#1 -Coalesced [48] print_byte_at::at#5 ← print_byte_at::at#1 -Coalesced [56] print_char_at::ch#3 ← print_char_at::ch#0 -Coalesced [57] print_char_at::at#3 ← print_char_at::at#0 -Coalesced [62] print_char_at::ch#4 ← print_char_at::ch#1 -Coalesced [63] print_char_at::at#4 ← print_char_at::at#1 -Coalesced [79] init_dist_screen::yd#2 ← init_dist_screen::$5 -Coalesced [82] sqr::val#3 ← sqr::val#0 -Coalesced [90] init_dist_screen::xd#2 ← init_dist_screen::$13 -Coalesced [93] sqr::val#4 ← sqr::val#1 -Coalesced [114] init_dist_screen::y#14 ← init_dist_screen::y#1 -Coalesced [115] init_dist_screen::screen_topline#14 ← init_dist_screen::screen_topline#1 -Coalesced [116] init_dist_screen::screen_bottomline#14 ← init_dist_screen::screen_bottomline#1 -Coalesced [117] init_dist_screen::x#8 ← init_dist_screen::x#1 -Coalesced [118] init_dist_screen::xb#8 ← init_dist_screen::xb#1 -Coalesced [120] init_dist_screen::xd#1 ← init_dist_screen::$15 -Coalesced [122] init_dist_screen::yd#1 ← init_dist_screen::$7 -Coalesced [136] bsearch16u::return#9 ← bsearch16u::$2 -Coalesced [138] bsearch16u::return#7 ← bsearch16u::return#2 -Coalesced [141] bsearch16u::return#8 ← bsearch16u::items#2 -Not coalescing [147] bsearch16u::return#6 ← bsearch16u::pivot#0 -Coalesced [151] bsearch16u::num#10 ← bsearch16u::num#1 -Coalesced [152] bsearch16u::items#11 ← bsearch16u::items#0 -Coalesced [155] bsearch16u::num#9 ← bsearch16u::num#0 -Coalesced [156] bsearch16u::items#10 ← bsearch16u::items#8 -Coalesced [157] bsearch16u::num#11 ← bsearch16u::num#3 -Coalesced (already) [158] bsearch16u::items#12 ← bsearch16u::items#2 -Coalesced [175] init_squares::sqr#3 ← init_squares::sqr#1 -Coalesced [176] init_squares::squares#3 ← init_squares::squares#1 -Coalesced [177] init_squares::i#3 ← init_squares::i#1 -Coalesced [188] init_font_hex::charset#9 ← init_font_hex::charset#5 -Coalesced [210] init_font_hex::charset#8 ← init_font_hex::charset#0 -Coalesced [211] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1 -Coalesced [212] init_font_hex::c#7 ← init_font_hex::c#1 -Coalesced (already) [213] init_font_hex::charset#10 ← init_font_hex::charset#0 -Coalesced [214] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1 -Coalesced [215] init_font_hex::c1#5 ← init_font_hex::c1#1 -Coalesced [216] init_font_hex::i#3 ← init_font_hex::i#1 -Coalesced [217] init_font_hex::idx#7 ← init_font_hex::idx#2 +Coalesced [33] print_word_at::w#4 ← print_word_at::w#0 +Coalesced [36] print_word_at::w#5 ← print_word_at::w#1 +Coalesced [43] print_byte_at::b#4 ← print_byte_at::b#0 +Coalesced [44] print_byte_at::at#4 ← print_byte_at::at#0 +Coalesced [48] print_byte_at::b#5 ← print_byte_at::b#1 +Coalesced [49] print_byte_at::at#5 ← print_byte_at::at#1 +Coalesced [57] print_char_at::ch#3 ← print_char_at::ch#0 +Coalesced [58] print_char_at::at#3 ← print_char_at::at#0 +Coalesced [63] print_char_at::ch#4 ← print_char_at::ch#1 +Coalesced [64] print_char_at::at#4 ← print_char_at::at#1 +Coalesced [80] init_dist_screen::yd#2 ← init_dist_screen::$5 +Coalesced [83] sqr::val#3 ← sqr::val#0 +Coalesced [91] init_dist_screen::xd#2 ← init_dist_screen::$13 +Coalesced [94] sqr::val#4 ← sqr::val#1 +Coalesced [115] init_dist_screen::y#14 ← init_dist_screen::y#1 +Coalesced [116] init_dist_screen::screen_topline#14 ← init_dist_screen::screen_topline#1 +Coalesced [117] init_dist_screen::screen_bottomline#14 ← init_dist_screen::screen_bottomline#1 +Coalesced [118] init_dist_screen::x#8 ← init_dist_screen::x#1 +Coalesced [119] init_dist_screen::xb#8 ← init_dist_screen::xb#1 +Coalesced [121] init_dist_screen::xd#1 ← init_dist_screen::$15 +Coalesced [123] init_dist_screen::yd#1 ← init_dist_screen::$7 +Coalesced [137] bsearch16u::return#9 ← bsearch16u::$2 +Coalesced [139] bsearch16u::return#7 ← bsearch16u::return#2 +Coalesced [142] bsearch16u::return#8 ← bsearch16u::items#2 +Not coalescing [148] bsearch16u::return#6 ← bsearch16u::pivot#0 +Coalesced [152] bsearch16u::num#10 ← bsearch16u::num#1 +Coalesced [153] bsearch16u::items#11 ← bsearch16u::items#0 +Coalesced [156] bsearch16u::num#9 ← bsearch16u::num#0 +Coalesced [157] bsearch16u::items#10 ← bsearch16u::items#8 +Coalesced [158] bsearch16u::num#11 ← bsearch16u::num#3 +Coalesced (already) [159] bsearch16u::items#12 ← bsearch16u::items#2 +Coalesced [176] init_squares::sqr#3 ← init_squares::sqr#1 +Coalesced [177] init_squares::squares#3 ← init_squares::squares#1 +Coalesced [178] init_squares::i#3 ← init_squares::i#1 +Coalesced [189] init_font_hex::charset#9 ← init_font_hex::charset#5 +Coalesced [211] init_font_hex::charset#8 ← init_font_hex::charset#0 +Coalesced [212] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1 +Coalesced [213] init_font_hex::c#7 ← init_font_hex::c#1 +Coalesced (already) [214] init_font_hex::charset#10 ← init_font_hex::charset#0 +Coalesced [215] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1 +Coalesced [216] init_font_hex::c1#5 ← init_font_hex::c1#1 +Coalesced [217] init_font_hex::i#3 ← init_font_hex::i#1 +Coalesced [218] init_font_hex::idx#7 ← init_font_hex::idx#2 Coalesced down to 27 phi equivalence classes -Culled Empty Block (label) @3 -Culled Empty Block (label) @6 +Culled Empty Block (label) @4 +Culled Empty Block (label) @8 Culled Empty Block (label) @11 -Culled Empty Block (label) @27 -Culled Empty Block (label) @34 -Culled Empty Block (label) @37 +Culled Empty Block (label) @16 +Culled Empty Block (label) @32 +Culled Empty Block (label) @39 +Culled Empty Block (label) @42 Culled Empty Block (label) main::@3 Culled Empty Block (label) main::toD0181_@return Culled Empty Block (label) main::@7 @@ -2455,7 +2465,7 @@ Culled Empty Block (label) init_squares::@4 Culled Empty Block (label) init_font_hex::@7 Culled Empty Block (label) init_font_hex::@8 Culled Empty Block (label) init_font_hex::@9 -Renumbering block @36 to @1 +Renumbering block @41 to @1 Renumbering block bsearch16u::@2 to bsearch16u::@1 Renumbering block bsearch16u::@3 to bsearch16u::@2 Renumbering block bsearch16u::@6 to bsearch16u::@3 diff --git a/src/test/ref/screen-show-spiral-buckets.log b/src/test/ref/screen-show-spiral-buckets.log index 4ba8875df..506d48868 100644 --- a/src/test/ref/screen-show-spiral-buckets.log +++ b/src/test/ref/screen-show-spiral-buckets.log @@ -14,15 +14,21 @@ Fixing pointer array-indexing *((word[]) main::bucket + (byte) main::i) Fixing pointer array-indexing *((word*[]) BUCKETS + (word) init_buckets::i2) Fixing pointer array-indexing *((word*[]) BUCKETS + (word~) init_buckets::$9) Fixing pointer array-indexing *((word*) init_buckets::bucket + *((byte[]) BUCKET_IDX + (byte) init_buckets::distance)) +Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src) Warning! Adding boolean cast to non-boolean sub-expression (byte) atan2_16::shift Identified constant variable (byte*) HEAP_TOP Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx Culled Empty Block (label) @1 Culled Empty Block (label) @2 Culled Empty Block (label) @3 -Culled Empty Block (label) malloc::@1 +Culled Empty Block (label) @4 Culled Empty Block (label) @5 Culled Empty Block (label) @6 +Culled Empty Block (label) @7 +Culled Empty Block (label) malloc::@1 +Culled Empty Block (label) @9 +Culled Empty Block (label) @10 +Culled Empty Block (label) @11 Culled Empty Block (label) bsearch16u::@11 Culled Empty Block (label) bsearch16u::@12 Culled Empty Block (label) bsearch16u::@14 @@ -31,9 +37,9 @@ Culled Empty Block (label) bsearch16u::@17 Culled Empty Block (label) bsearch16u::@4 Culled Empty Block (label) bsearch16u::@5 Culled Empty Block (label) init_squares::@2 -Culled Empty Block (label) @8 +Culled Empty Block (label) @13 Culled Empty Block (label) sqr::@1 -Culled Empty Block (label) @9 +Culled Empty Block (label) @14 Culled Empty Block (label) sqrt::@1 Culled Empty Block (label) atan2_16::@9 Culled Empty Block (label) atan2_16::@10 @@ -47,7 +53,7 @@ Culled Empty Block (label) atan2_16::@23 Culled Empty Block (label) atan2_16::@31 Culled Empty Block (label) atan2_16::@32 Culled Empty Block (label) atan2_16::@14 -Culled Empty Block (label) @11 +Culled Empty Block (label) @16 Culled Empty Block (label) main::@2 Culled Empty Block (label) main::@19 Culled Empty Block (label) main::@3 @@ -63,9 +69,9 @@ Culled Empty Block (label) main::@26 Culled Empty Block (label) main::@28 Culled Empty Block (label) main::@29 Culled Empty Block (label) init_buckets::@10 -Culled Empty Block (label) @14 +Culled Empty Block (label) @19 Culled Empty Block (label) init_angle_screen::@4 -Culled Empty Block (label) @15 +Culled Empty Block (label) @20 Culled Empty Block (label) init_dist_screen::@13 Culled Empty Block (label) init_dist_screen::@14 Culled Empty Block (label) init_dist_screen::@9 @@ -77,14 +83,14 @@ CONTROL FLOW GRAPH SSA (byte*) RASTER#0 ← ((byte*)) (number) $d012 (byte*) BORDERCOL#0 ← ((byte*)) (number) $d020 (byte*) COLS#0 ← ((byte*)) (number) $d800 - to:@4 -@4: scope:[] from @begin + to:@8 +@8: scope:[] from @begin (byte*) HEAP_TOP#0 ← ((byte*)) (number) $a000 (byte*) heap_head#0 ← (byte*) HEAP_TOP#0 - to:@7 -malloc: scope:[malloc] from @12 @13 @17 @19 @20 init_buckets::@5 init_squares - (word) malloc::size#7 ← phi( @12/(word) malloc::size#1 @13/(word) malloc::size#3 @17/(word) malloc::size#2 @19/(word) malloc::size#4 @20/(word) malloc::size#5 init_buckets::@5/(word) malloc::size#6 init_squares/(word) malloc::size#0 ) - (byte*) heap_head#18 ← phi( @12/(byte*) heap_head#35 @13/(byte*) heap_head#36 @17/(byte*) heap_head#5 @19/(byte*) heap_head#10 @20/(byte*) heap_head#11 init_buckets::@5/(byte*) heap_head#37 init_squares/(byte*) heap_head#38 ) + to:@12 +malloc: scope:[malloc] from @17 @18 @22 @24 @25 init_buckets::@5 init_squares + (word) malloc::size#7 ← phi( @17/(word) malloc::size#1 @18/(word) malloc::size#3 @22/(word) malloc::size#2 @24/(word) malloc::size#4 @25/(word) malloc::size#5 init_buckets::@5/(word) malloc::size#6 init_squares/(word) malloc::size#0 ) + (byte*) heap_head#18 ← phi( @17/(byte*) heap_head#35 @18/(byte*) heap_head#36 @22/(byte*) heap_head#5 @24/(byte*) heap_head#10 @25/(byte*) heap_head#11 init_buckets::@5/(byte*) heap_head#37 init_squares/(byte*) heap_head#38 ) (byte*~) malloc::$0 ← (byte*) heap_head#18 - (word) malloc::size#7 (byte*) malloc::mem#0 ← (byte*~) malloc::$0 (byte*) heap_head#1 ← (byte*) malloc::mem#0 @@ -179,11 +185,11 @@ bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2 (word*~) bsearch16u::$4 ← phi( bsearch16u::@1/(word*~) bsearch16u::$3 bsearch16u::@2/(word*~) bsearch16u::$2 ) (word*) bsearch16u::return#2 ← (word*~) bsearch16u::$4 to:bsearch16u::@return -@7: scope:[] from @4 - (byte*) heap_head#54 ← phi( @4/(byte*) heap_head#0 ) +@12: scope:[] from @8 + (byte*) heap_head#54 ← phi( @8/(byte*) heap_head#0 ) (byte) NUM_SQUARES#0 ← (number) $ff (word*) SQUARES#0 ← (word*) 0 - to:@10 + to:@15 init_squares: scope:[init_squares] from init_dist_screen (byte*) heap_head#38 ← phi( init_dist_screen/(byte*) heap_head#44 ) (byte) NUM_SQUARES#6 ← phi( init_dist_screen/(byte) NUM_SQUARES#3 ) @@ -263,15 +269,15 @@ sqrt::@return: scope:[sqrt] from sqrt::@2 (byte) sqrt::return#1 ← (byte) sqrt::return#3 return to:@return -@10: scope:[] from @7 - (word*) SQUARES#57 ← phi( @7/(word*) SQUARES#0 ) - (byte) NUM_SQUARES#51 ← phi( @7/(byte) NUM_SQUARES#0 ) - (byte*) heap_head#47 ← phi( @7/(byte*) heap_head#54 ) +@15: scope:[] from @12 + (word*) SQUARES#57 ← phi( @12/(word*) SQUARES#0 ) + (byte) NUM_SQUARES#51 ← phi( @12/(byte) NUM_SQUARES#0 ) + (byte*) heap_head#47 ← phi( @12/(byte*) heap_head#54 ) (byte) CORDIC_ITERATIONS_16#0 ← (number) $f (word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 ← kickasm {{ .for (var i=0; i<CORDIC_ITERATIONS_16; i++) .word 256*2*256*atan(1/pow(2,i))/PI/2 }} - to:@12 + to:@17 atan2_16: scope:[atan2_16] from init_angle_screen::@2 (signed word) atan2_16::x#9 ← phi( init_angle_screen::@2/(signed word) atan2_16::x#0 ) (signed word) atan2_16::y#1 ← phi( init_angle_screen::@2/(signed word) atan2_16::y#0 ) @@ -482,41 +488,41 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 (word) atan2_16::return#1 ← (word) atan2_16::return#3 return to:@return -@12: scope:[] from @10 - (word*) SQUARES#56 ← phi( @10/(word*) SQUARES#57 ) - (byte) NUM_SQUARES#49 ← phi( @10/(byte) NUM_SQUARES#51 ) - (byte*) heap_head#35 ← phi( @10/(byte*) heap_head#47 ) +@17: scope:[] from @15 + (word*) SQUARES#56 ← phi( @15/(word*) SQUARES#57 ) + (byte) NUM_SQUARES#49 ← phi( @15/(byte) NUM_SQUARES#51 ) + (byte*) heap_head#35 ← phi( @15/(byte*) heap_head#47 ) (word) malloc::size#1 ← (number) $3e8 call malloc (void*) malloc::return#3 ← (void*) malloc::return#1 - to:@17 -@17: scope:[] from @12 - (word*) SQUARES#54 ← phi( @12/(word*) SQUARES#56 ) - (byte) NUM_SQUARES#45 ← phi( @12/(byte) NUM_SQUARES#49 ) - (byte*) heap_head#22 ← phi( @12/(byte*) heap_head#2 ) - (void*) malloc::return#11 ← phi( @12/(void*) malloc::return#3 ) + to:@22 +@22: scope:[] from @17 + (word*) SQUARES#54 ← phi( @17/(word*) SQUARES#56 ) + (byte) NUM_SQUARES#45 ← phi( @17/(byte) NUM_SQUARES#49 ) + (byte*) heap_head#22 ← phi( @17/(byte*) heap_head#2 ) + (void*) malloc::return#11 ← phi( @17/(void*) malloc::return#3 ) (void*~) $0 ← (void*) malloc::return#11 (byte*) heap_head#5 ← (byte*) heap_head#22 (byte[]) SCREEN_DIST#0 ← ((byte*)) (void*~) $0 (word) malloc::size#2 ← (number) $3e8 call malloc (void*) malloc::return#4 ← (void*) malloc::return#1 - to:@18 -@18: scope:[] from @17 - (word*) SQUARES#53 ← phi( @17/(word*) SQUARES#54 ) - (byte) NUM_SQUARES#43 ← phi( @17/(byte) NUM_SQUARES#45 ) - (byte*) heap_head#23 ← phi( @17/(byte*) heap_head#2 ) - (void*) malloc::return#12 ← phi( @17/(void*) malloc::return#4 ) + to:@23 +@23: scope:[] from @22 + (word*) SQUARES#53 ← phi( @22/(word*) SQUARES#54 ) + (byte) NUM_SQUARES#43 ← phi( @22/(byte) NUM_SQUARES#45 ) + (byte*) heap_head#23 ← phi( @22/(byte*) heap_head#2 ) + (void*) malloc::return#12 ← phi( @22/(void*) malloc::return#4 ) (void*~) $1 ← (void*) malloc::return#12 (byte*) heap_head#6 ← (byte*) heap_head#23 (byte[]) SCREEN_ANGLE#0 ← ((byte*)) (void*~) $1 (byte*) SCREEN_FILL#0 ← ((byte*)) (number) $400 (byte) FILL_CHAR#0 ← (byte) '*' - to:@13 -main: scope:[main] from @16 - (word*) SQUARES#21 ← phi( @16/(word*) SQUARES#25 ) - (byte*) heap_head#40 ← phi( @16/(byte*) heap_head#46 ) - (byte) NUM_SQUARES#14 ← phi( @16/(byte) NUM_SQUARES#17 ) + to:@18 +main: scope:[main] from @21 + (word*) SQUARES#21 ← phi( @21/(word*) SQUARES#25 ) + (byte*) heap_head#40 ← phi( @21/(byte*) heap_head#46 ) + (byte) NUM_SQUARES#14 ← phi( @21/(byte) NUM_SQUARES#17 ) asm { sei } (byte*) init_dist_screen::screen#0 ← (byte[]) SCREEN_DIST#0 call init_dist_screen @@ -707,21 +713,21 @@ main::@return: scope:[main] from main::@24 (word*) SQUARES#4 ← (word*) SQUARES#13 return to:@return -@13: scope:[] from @18 - (word*) SQUARES#49 ← phi( @18/(word*) SQUARES#53 ) - (byte) NUM_SQUARES#38 ← phi( @18/(byte) NUM_SQUARES#43 ) - (byte*) heap_head#36 ← phi( @18/(byte*) heap_head#6 ) +@18: scope:[] from @23 + (word*) SQUARES#49 ← phi( @23/(word*) SQUARES#53 ) + (byte) NUM_SQUARES#38 ← phi( @23/(byte) NUM_SQUARES#43 ) + (byte*) heap_head#36 ← phi( @23/(byte*) heap_head#6 ) (byte) NUM_BUCKETS#0 ← (number) $30 (byte~) $2 ← (byte) NUM_BUCKETS#0 * (const byte) SIZEOF_BYTE (word) malloc::size#3 ← (byte~) $2 call malloc (void*) malloc::return#5 ← (void*) malloc::return#1 - to:@19 -@19: scope:[] from @13 - (word*) SQUARES#45 ← phi( @13/(word*) SQUARES#49 ) - (byte) NUM_SQUARES#34 ← phi( @13/(byte) NUM_SQUARES#38 ) - (byte*) heap_head#27 ← phi( @13/(byte*) heap_head#2 ) - (void*) malloc::return#13 ← phi( @13/(void*) malloc::return#5 ) + to:@24 +@24: scope:[] from @18 + (word*) SQUARES#45 ← phi( @18/(word*) SQUARES#49 ) + (byte) NUM_SQUARES#34 ← phi( @18/(byte) NUM_SQUARES#38 ) + (byte*) heap_head#27 ← phi( @18/(byte*) heap_head#2 ) + (void*) malloc::return#13 ← phi( @18/(void*) malloc::return#5 ) (void*~) $3 ← (void*) malloc::return#13 (byte*) heap_head#10 ← (byte*) heap_head#27 (byte[]) BUCKET_SIZES#0 ← ((byte*)) (void*~) $3 @@ -729,12 +735,12 @@ main::@return: scope:[main] from main::@24 (word) malloc::size#4 ← (byte~) $4 call malloc (void*) malloc::return#6 ← (void*) malloc::return#1 - to:@20 -@20: scope:[] from @19 - (word*) SQUARES#39 ← phi( @19/(word*) SQUARES#45 ) - (byte) NUM_SQUARES#28 ← phi( @19/(byte) NUM_SQUARES#34 ) - (byte*) heap_head#28 ← phi( @19/(byte*) heap_head#2 ) - (void*) malloc::return#14 ← phi( @19/(void*) malloc::return#6 ) + to:@25 +@25: scope:[] from @24 + (word*) SQUARES#39 ← phi( @24/(word*) SQUARES#45 ) + (byte) NUM_SQUARES#28 ← phi( @24/(byte) NUM_SQUARES#34 ) + (byte*) heap_head#28 ← phi( @24/(byte*) heap_head#2 ) + (void*) malloc::return#14 ← phi( @24/(void*) malloc::return#6 ) (void*~) $5 ← (void*) malloc::return#14 (byte*) heap_head#11 ← (byte*) heap_head#28 (word*[]) BUCKETS#0 ← ((word**)) (void*~) $5 @@ -742,16 +748,16 @@ main::@return: scope:[main] from main::@24 (word) malloc::size#5 ← (byte~) $6 call malloc (void*) malloc::return#7 ← (void*) malloc::return#1 - to:@21 -@21: scope:[] from @20 - (word*) SQUARES#34 ← phi( @20/(word*) SQUARES#39 ) - (byte) NUM_SQUARES#23 ← phi( @20/(byte) NUM_SQUARES#28 ) - (byte*) heap_head#29 ← phi( @20/(byte*) heap_head#2 ) - (void*) malloc::return#15 ← phi( @20/(void*) malloc::return#7 ) + to:@26 +@26: scope:[] from @25 + (word*) SQUARES#34 ← phi( @25/(word*) SQUARES#39 ) + (byte) NUM_SQUARES#23 ← phi( @25/(byte) NUM_SQUARES#28 ) + (byte*) heap_head#29 ← phi( @25/(byte*) heap_head#2 ) + (void*) malloc::return#15 ← phi( @25/(void*) malloc::return#7 ) (void*~) $7 ← (void*) malloc::return#15 (byte*) heap_head#12 ← (byte*) heap_head#29 (byte[]) BUCKET_IDX#0 ← ((byte*)) (void*~) $7 - to:@16 + to:@21 init_buckets: scope:[init_buckets] from main::@31 (byte*) heap_head#74 ← phi( main::@31/(byte*) heap_head#41 ) (byte*) init_buckets::screen#6 ← phi( main::@31/(byte*) init_buckets::screen#0 ) @@ -1129,21 +1135,21 @@ init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@11 (word*) SQUARES#6 ← (word*) SQUARES#15 return to:@return -@16: scope:[] from @21 - (word*) SQUARES#25 ← phi( @21/(word*) SQUARES#34 ) - (byte*) heap_head#46 ← phi( @21/(byte*) heap_head#12 ) - (byte) NUM_SQUARES#17 ← phi( @21/(byte) NUM_SQUARES#23 ) +@21: scope:[] from @26 + (word*) SQUARES#25 ← phi( @26/(word*) SQUARES#34 ) + (byte*) heap_head#46 ← phi( @26/(byte*) heap_head#12 ) + (byte) NUM_SQUARES#17 ← phi( @26/(byte) NUM_SQUARES#23 ) call main - to:@22 -@22: scope:[] from @16 - (word*) SQUARES#16 ← phi( @16/(word*) SQUARES#4 ) - (byte*) heap_head#34 ← phi( @16/(byte*) heap_head#9 ) - (byte) NUM_SQUARES#12 ← phi( @16/(byte) NUM_SQUARES#2 ) + to:@27 +@27: scope:[] from @21 + (word*) SQUARES#16 ← phi( @21/(word*) SQUARES#4 ) + (byte*) heap_head#34 ← phi( @21/(byte*) heap_head#9 ) + (byte) NUM_SQUARES#12 ← phi( @21/(byte) NUM_SQUARES#2 ) (byte) NUM_SQUARES#5 ← (byte) NUM_SQUARES#12 (byte*) heap_head#17 ← (byte*) heap_head#34 (word*) SQUARES#7 ← (word*) SQUARES#16 to:@end -@end: scope:[] from @22 +@end: scope:[] from @27 SYMBOL TABLE SSA (void*~) $0 @@ -1154,18 +1160,18 @@ SYMBOL TABLE SSA (void*~) $5 (byte~) $6 (void*~) $7 -(label) @10 (label) @12 -(label) @13 -(label) @16 +(label) @15 (label) @17 (label) @18 -(label) @19 -(label) @20 (label) @21 (label) @22 -(label) @4 -(label) @7 +(label) @23 +(label) @24 +(label) @25 +(label) @26 +(label) @27 +(label) @8 (label) @begin (label) @end (byte*) BORDERCOL @@ -3137,12 +3143,12 @@ Added new block during phi lifting init_angle_screen::@7(between init_angle_scre Added new block during phi lifting init_dist_screen::@19(between init_dist_screen::@11 and init_dist_screen::@1) Added new block during phi lifting init_dist_screen::@20(between init_dist_screen::@18 and init_dist_screen::@5) Adding NOP phi() at start of @begin -Adding NOP phi() at start of @4 -Adding NOP phi() at start of @7 -Adding NOP phi() at start of @10 +Adding NOP phi() at start of @8 Adding NOP phi() at start of @12 -Adding NOP phi() at start of @16 -Adding NOP phi() at start of @22 +Adding NOP phi() at start of @15 +Adding NOP phi() at start of @17 +Adding NOP phi() at start of @21 +Adding NOP phi() at start of @27 Adding NOP phi() at start of @end Adding NOP phi() at start of main::@32 Adding NOP phi() at start of main::@6 @@ -3256,10 +3262,10 @@ Coalesced [341] init_squares::sqr#3 ← init_squares::sqr#1 Coalesced [342] init_squares::squares#3 ← init_squares::squares#1 Coalesced [343] init_squares::i#3 ← init_squares::i#1 Coalesced down to 45 phi equivalence classes -Culled Empty Block (label) @4 -Culled Empty Block (label) @7 -Culled Empty Block (label) @10 -Culled Empty Block (label) @22 +Culled Empty Block (label) @8 +Culled Empty Block (label) @12 +Culled Empty Block (label) @15 +Culled Empty Block (label) @27 Culled Empty Block (label) main::@32 Culled Empty Block (label) main::@6 Culled Empty Block (label) main::@24 @@ -3283,14 +3289,14 @@ Culled Empty Block (label) init_dist_screen::@20 Culled Empty Block (label) bsearch16u::@1 Culled Empty Block (label) bsearch16u::@18 Culled Empty Block (label) init_squares::@4 -Renumbering block @12 to @1 -Renumbering block @13 to @2 -Renumbering block @16 to @3 -Renumbering block @17 to @4 -Renumbering block @18 to @5 -Renumbering block @19 to @6 -Renumbering block @20 to @7 -Renumbering block @21 to @8 +Renumbering block @17 to @1 +Renumbering block @18 to @2 +Renumbering block @21 to @3 +Renumbering block @22 to @4 +Renumbering block @23 to @5 +Renumbering block @24 to @6 +Renumbering block @25 to @7 +Renumbering block @26 to @8 Renumbering block bsearch16u::@2 to bsearch16u::@1 Renumbering block bsearch16u::@3 to bsearch16u::@2 Renumbering block bsearch16u::@6 to bsearch16u::@3 diff --git a/src/test/ref/screen-show-spiral.cfg b/src/test/ref/screen-show-spiral.cfg index a83d83c62..02cfcec0b 100644 --- a/src/test/ref/screen-show-spiral.cfg +++ b/src/test/ref/screen-show-spiral.cfg @@ -377,8 +377,8 @@ init_squares::@return: scope:[init_squares] from init_squares::@1 [189] return to:@return malloc: scope:[malloc] from @1 @3 init_squares - [190] (word) malloc::size#3 ← phi( @3/(word) $3e8 @1/(word) $3e8 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD ) - [190] (byte*) heap_head#12 ← phi( @3/(byte*) heap_head#1 @1/(const byte*) HEAP_TOP#0 init_squares/(byte*) heap_head#1 ) + [190] (word) malloc::size#3 ← phi( @1/(word) $3e8 @3/(word) $3e8 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD ) + [190] (byte*) heap_head#12 ← phi( @1/(const byte*) HEAP_TOP#0 @3/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) [191] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 [192] (byte*) heap_head#1 ← (byte*) malloc::mem#0 to:malloc::@return diff --git a/src/test/ref/screen-show-spiral.log b/src/test/ref/screen-show-spiral.log index 8997e89c0..8dd149baf 100644 --- a/src/test/ref/screen-show-spiral.log +++ b/src/test/ref/screen-show-spiral.log @@ -6,11 +6,16 @@ Fixing pointer addition (word~) sqrt::$1 ← (word*) sqrt::found - (word*) SQUAR Fixing pointer array-indexing *((word*) SQUARES + (byte) sqr::val) Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i) Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i) +Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src) Warning! Adding boolean cast to non-boolean sub-expression (byte) atan2_16::shift Identified constant variable (byte*) HEAP_TOP -Culled Empty Block (label) malloc::@1 Culled Empty Block (label) @1 Culled Empty Block (label) @2 +Culled Empty Block (label) @3 +Culled Empty Block (label) malloc::@1 +Culled Empty Block (label) @5 +Culled Empty Block (label) @6 +Culled Empty Block (label) @7 Culled Empty Block (label) bsearch16u::@11 Culled Empty Block (label) bsearch16u::@12 Culled Empty Block (label) bsearch16u::@14 @@ -19,9 +24,9 @@ Culled Empty Block (label) bsearch16u::@17 Culled Empty Block (label) bsearch16u::@4 Culled Empty Block (label) bsearch16u::@5 Culled Empty Block (label) init_squares::@2 -Culled Empty Block (label) @4 +Culled Empty Block (label) @9 Culled Empty Block (label) sqr::@1 -Culled Empty Block (label) @5 +Culled Empty Block (label) @10 Culled Empty Block (label) sqrt::@1 Culled Empty Block (label) atan2_16::@9 Culled Empty Block (label) atan2_16::@10 @@ -35,7 +40,7 @@ Culled Empty Block (label) atan2_16::@23 Culled Empty Block (label) atan2_16::@31 Culled Empty Block (label) atan2_16::@32 Culled Empty Block (label) atan2_16::@14 -Culled Empty Block (label) @7 +Culled Empty Block (label) @12 Culled Empty Block (label) main::@14 Culled Empty Block (label) main::@3 Culled Empty Block (label) main::@15 @@ -44,9 +49,9 @@ Culled Empty Block (label) main::@10 Culled Empty Block (label) main::@13 Culled Empty Block (label) main::@11 Culled Empty Block (label) main::@16 -Culled Empty Block (label) @9 +Culled Empty Block (label) @14 Culled Empty Block (label) init_angle_screen::@4 -Culled Empty Block (label) @10 +Culled Empty Block (label) @15 Culled Empty Block (label) init_dist_screen::@13 Culled Empty Block (label) init_dist_screen::@14 Culled Empty Block (label) init_dist_screen::@9 @@ -55,12 +60,14 @@ Culled Empty Block (label) init_dist_screen::@12 CONTROL FLOW GRAPH SSA @begin: scope:[] from + to:@4 +@4: scope:[] from @begin (byte*) HEAP_TOP#0 ← ((byte*)) (number) $a000 (byte*) heap_head#0 ← (byte*) HEAP_TOP#0 - to:@3 -malloc: scope:[malloc] from @12 @8 init_squares - (word) malloc::size#3 ← phi( @12/(word) malloc::size#2 @8/(word) malloc::size#1 init_squares/(word) malloc::size#0 ) - (byte*) heap_head#12 ← phi( @12/(byte*) heap_head#5 @8/(byte*) heap_head#23 init_squares/(byte*) heap_head#24 ) + to:@8 +malloc: scope:[malloc] from @13 @17 init_squares + (word) malloc::size#3 ← phi( @13/(word) malloc::size#1 @17/(word) malloc::size#2 init_squares/(word) malloc::size#0 ) + (byte*) heap_head#12 ← phi( @13/(byte*) heap_head#23 @17/(byte*) heap_head#5 init_squares/(byte*) heap_head#24 ) (byte*~) malloc::$0 ← (byte*) heap_head#12 - (word) malloc::size#3 (byte*) malloc::mem#0 ← (byte*~) malloc::$0 (byte*) heap_head#1 ← (byte*) malloc::mem#0 @@ -155,11 +162,11 @@ bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2 (word*~) bsearch16u::$4 ← phi( bsearch16u::@1/(word*~) bsearch16u::$3 bsearch16u::@2/(word*~) bsearch16u::$2 ) (word*) bsearch16u::return#2 ← (word*~) bsearch16u::$4 to:bsearch16u::@return -@3: scope:[] from @begin - (byte*) heap_head#37 ← phi( @begin/(byte*) heap_head#0 ) +@8: scope:[] from @4 + (byte*) heap_head#37 ← phi( @4/(byte*) heap_head#0 ) (byte) NUM_SQUARES#0 ← (number) $ff (word*) SQUARES#0 ← (word*) 0 - to:@6 + to:@11 init_squares: scope:[init_squares] from init_dist_screen (byte*) heap_head#24 ← phi( init_dist_screen/(byte*) heap_head#29 ) (byte) NUM_SQUARES#6 ← phi( init_dist_screen/(byte) NUM_SQUARES#3 ) @@ -239,15 +246,15 @@ sqrt::@return: scope:[sqrt] from sqrt::@2 (byte) sqrt::return#1 ← (byte) sqrt::return#3 return to:@return -@6: scope:[] from @3 - (word*) SQUARES#45 ← phi( @3/(word*) SQUARES#0 ) - (byte) NUM_SQUARES#34 ← phi( @3/(byte) NUM_SQUARES#0 ) - (byte*) heap_head#32 ← phi( @3/(byte*) heap_head#37 ) +@11: scope:[] from @8 + (word*) SQUARES#45 ← phi( @8/(word*) SQUARES#0 ) + (byte) NUM_SQUARES#34 ← phi( @8/(byte) NUM_SQUARES#0 ) + (byte*) heap_head#32 ← phi( @8/(byte*) heap_head#37 ) (byte) CORDIC_ITERATIONS_16#0 ← (number) $f (word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 ← kickasm {{ .for (var i=0; i<CORDIC_ITERATIONS_16; i++) .word 256*2*256*atan(1/pow(2,i))/PI/2 }} - to:@8 + to:@13 atan2_16: scope:[atan2_16] from init_angle_screen::@2 (signed word) atan2_16::x#9 ← phi( init_angle_screen::@2/(signed word) atan2_16::x#0 ) (signed word) atan2_16::y#1 ← phi( init_angle_screen::@2/(signed word) atan2_16::y#0 ) @@ -458,41 +465,41 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 (word) atan2_16::return#1 ← (word) atan2_16::return#3 return to:@return -@8: scope:[] from @6 - (word*) SQUARES#42 ← phi( @6/(word*) SQUARES#45 ) - (byte) NUM_SQUARES#31 ← phi( @6/(byte) NUM_SQUARES#34 ) - (byte*) heap_head#23 ← phi( @6/(byte*) heap_head#32 ) +@13: scope:[] from @11 + (word*) SQUARES#42 ← phi( @11/(word*) SQUARES#45 ) + (byte) NUM_SQUARES#31 ← phi( @11/(byte) NUM_SQUARES#34 ) + (byte*) heap_head#23 ← phi( @11/(byte*) heap_head#32 ) (word) malloc::size#1 ← (number) $3e8 call malloc (void*) malloc::return#3 ← (void*) malloc::return#1 - to:@12 -@12: scope:[] from @8 - (word*) SQUARES#36 ← phi( @8/(word*) SQUARES#42 ) - (byte) NUM_SQUARES#25 ← phi( @8/(byte) NUM_SQUARES#31 ) - (byte*) heap_head#16 ← phi( @8/(byte*) heap_head#2 ) - (void*) malloc::return#7 ← phi( @8/(void*) malloc::return#3 ) + to:@17 +@17: scope:[] from @13 + (word*) SQUARES#36 ← phi( @13/(word*) SQUARES#42 ) + (byte) NUM_SQUARES#25 ← phi( @13/(byte) NUM_SQUARES#31 ) + (byte*) heap_head#16 ← phi( @13/(byte*) heap_head#2 ) + (void*) malloc::return#7 ← phi( @13/(void*) malloc::return#3 ) (void*~) $0 ← (void*) malloc::return#7 (byte*) heap_head#5 ← (byte*) heap_head#16 (byte*) SCREEN_DIST#0 ← ((byte*)) (void*~) $0 (word) malloc::size#2 ← (number) $3e8 call malloc (void*) malloc::return#4 ← (void*) malloc::return#1 - to:@13 -@13: scope:[] from @12 - (word*) SQUARES#35 ← phi( @12/(word*) SQUARES#36 ) - (byte) NUM_SQUARES#24 ← phi( @12/(byte) NUM_SQUARES#25 ) - (byte*) heap_head#17 ← phi( @12/(byte*) heap_head#2 ) - (void*) malloc::return#8 ← phi( @12/(void*) malloc::return#4 ) + to:@18 +@18: scope:[] from @17 + (word*) SQUARES#35 ← phi( @17/(word*) SQUARES#36 ) + (byte) NUM_SQUARES#24 ← phi( @17/(byte) NUM_SQUARES#25 ) + (byte*) heap_head#17 ← phi( @17/(byte*) heap_head#2 ) + (void*) malloc::return#8 ← phi( @17/(void*) malloc::return#4 ) (void*~) $1 ← (void*) malloc::return#8 (byte*) heap_head#6 ← (byte*) heap_head#17 (byte*) SCREEN_ANGLE#0 ← ((byte*)) (void*~) $1 (byte*) SCREEN_FILL#0 ← ((byte*)) (number) $400 (byte) FILL_CHAR#0 ← (byte) '@' - to:@11 -main: scope:[main] from @11 - (word*) SQUARES#21 ← phi( @11/(word*) SQUARES#26 ) - (byte*) heap_head#26 ← phi( @11/(byte*) heap_head#31 ) - (byte) NUM_SQUARES#14 ← phi( @11/(byte) NUM_SQUARES#18 ) + to:@16 +main: scope:[main] from @16 + (word*) SQUARES#21 ← phi( @16/(word*) SQUARES#26 ) + (byte*) heap_head#26 ← phi( @16/(byte*) heap_head#31 ) + (byte) NUM_SQUARES#14 ← phi( @16/(byte) NUM_SQUARES#18 ) (byte*) init_dist_screen::screen#0 ← (byte*) SCREEN_DIST#0 call init_dist_screen to:main::@17 @@ -880,31 +887,32 @@ init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@11 (word*) SQUARES#6 ← (word*) SQUARES#15 return to:@return -@11: scope:[] from @13 - (word*) SQUARES#26 ← phi( @13/(word*) SQUARES#35 ) - (byte*) heap_head#31 ← phi( @13/(byte*) heap_head#6 ) - (byte) NUM_SQUARES#18 ← phi( @13/(byte) NUM_SQUARES#24 ) +@16: scope:[] from @18 + (word*) SQUARES#26 ← phi( @18/(word*) SQUARES#35 ) + (byte*) heap_head#31 ← phi( @18/(byte*) heap_head#6 ) + (byte) NUM_SQUARES#18 ← phi( @18/(byte) NUM_SQUARES#24 ) call main - to:@14 -@14: scope:[] from @11 - (word*) SQUARES#16 ← phi( @11/(word*) SQUARES#4 ) - (byte*) heap_head#22 ← phi( @11/(byte*) heap_head#8 ) - (byte) NUM_SQUARES#12 ← phi( @11/(byte) NUM_SQUARES#2 ) + to:@19 +@19: scope:[] from @16 + (word*) SQUARES#16 ← phi( @16/(word*) SQUARES#4 ) + (byte*) heap_head#22 ← phi( @16/(byte*) heap_head#8 ) + (byte) NUM_SQUARES#12 ← phi( @16/(byte) NUM_SQUARES#2 ) (byte) NUM_SQUARES#5 ← (byte) NUM_SQUARES#12 (byte*) heap_head#11 ← (byte*) heap_head#22 (word*) SQUARES#7 ← (word*) SQUARES#16 to:@end -@end: scope:[] from @14 +@end: scope:[] from @19 SYMBOL TABLE SSA (void*~) $0 (void*~) $1 (label) @11 -(label) @12 (label) @13 -(label) @14 -(label) @3 -(label) @6 +(label) @16 +(label) @17 +(label) @18 +(label) @19 +(label) @4 (label) @8 (label) @begin (label) @end @@ -2452,111 +2460,113 @@ Added new block during phi lifting init_angle_screen::@7(between init_angle_scre Added new block during phi lifting init_dist_screen::@19(between init_dist_screen::@11 and init_dist_screen::@1) Added new block during phi lifting init_dist_screen::@20(between init_dist_screen::@18 and init_dist_screen::@5) Adding NOP phi() at start of @begin -Adding NOP phi() at start of @3 -Adding NOP phi() at start of @6 +Adding NOP phi() at start of @4 Adding NOP phi() at start of @8 Adding NOP phi() at start of @11 -Adding NOP phi() at start of @14 +Adding NOP phi() at start of @13 +Adding NOP phi() at start of @16 +Adding NOP phi() at start of @19 Adding NOP phi() at start of @end Adding NOP phi() at start of main::@18 Adding NOP phi() at start of main::@1 Adding NOP phi() at start of init_dist_screen CALL GRAPH -Calls in [] to malloc:4 malloc:7 main:10 -Calls in [main] to init_dist_screen:14 init_angle_screen:16 -Calls in [init_angle_screen] to atan2_16:59 -Calls in [init_dist_screen] to init_squares:155 sqr:167 sqr:178 sqrt:183 -Calls in [sqrt] to bsearch16u:209 -Calls in [init_squares] to malloc:249 +Calls in [] to malloc:5 malloc:8 main:11 +Calls in [main] to init_dist_screen:15 init_angle_screen:17 +Calls in [init_angle_screen] to atan2_16:60 +Calls in [init_dist_screen] to init_squares:156 sqr:168 sqr:179 sqrt:184 +Calls in [sqrt] to bsearch16u:210 +Calls in [init_squares] to malloc:250 Created 48 initial phi equivalence classes -Coalesced [6] heap_head#52 ← heap_head#1 -Coalesced [21] main::dist#6 ← main::dist#0 -Coalesced [22] main::angle#6 ← main::angle#0 -Coalesced [27] main::min_dist_angle#9 ← main::dist_angle#0 -Not coalescing [28] main::min_fill#10 ← main::fill#2 -Coalesced [37] main::fill#6 ← main::fill#1 -Coalesced [38] main::dist#7 ← main::dist#1 -Coalesced [39] main::angle#7 ← main::angle#1 -Not coalescing [40] main::min_dist_angle#6 ← main::min_dist_angle#3 -Coalesced [41] main::min_fill#7 ← main::min_fill#2 -Not coalescing [42] main::min_dist_angle#8 ← main::min_dist_angle#2 -Coalesced (already) [43] main::min_fill#9 ← main::min_fill#5 -Not coalescing [44] main::min_dist_angle#7 ← main::min_dist_angle#2 -Coalesced (already) [45] main::min_fill#8 ← main::min_fill#5 -Coalesced [48] init_angle_screen::screen_bottomline#6 ← init_angle_screen::screen_bottomline#0 -Coalesced [49] init_angle_screen::screen_topline#6 ← init_angle_screen::screen_topline#0 -Coalesced [79] init_angle_screen::y#6 ← init_angle_screen::y#1 -Coalesced [80] init_angle_screen::screen_bottomline#7 ← init_angle_screen::screen_bottomline#1 -Coalesced [81] init_angle_screen::screen_topline#7 ← init_angle_screen::screen_topline#1 -Coalesced [82] init_angle_screen::x#4 ← init_angle_screen::x#1 -Coalesced [83] init_angle_screen::xb#4 ← init_angle_screen::xb#1 -Coalesced [86] atan2_16::yi#17 ← atan2_16::$2 -Coalesced [90] atan2_16::xi#14 ← atan2_16::$7 -Coalesced [92] atan2_16::yi#19 ← atan2_16::yi#0 -Coalesced [93] atan2_16::xi#16 ← atan2_16::xi#0 -Coalesced [96] atan2_16::angle#22 ← atan2_16::angle#12 -Coalesced [101] atan2_16::angle#27 ← atan2_16::angle#4 -Coalesced [105] atan2_16::return#5 ← atan2_16::angle#5 -Coalesced [108] atan2_16::return#6 ← atan2_16::angle#11 -Coalesced [109] atan2_16::angle#26 ← atan2_16::angle#1 -Not coalescing [110] atan2_16::shift#5 ← atan2_16::i#2 -Not coalescing [111] atan2_16::xd#10 ← atan2_16::xi#3 -Not coalescing [112] atan2_16::yd#10 ← atan2_16::yi#3 -Coalesced [118] atan2_16::yd#13 ← atan2_16::yd#2 -Coalesced [119] atan2_16::xd#13 ← atan2_16::xd#2 -Coalesced [126] atan2_16::yi#21 ← atan2_16::yi#2 -Coalesced [127] atan2_16::angle#25 ← atan2_16::angle#3 -Coalesced [128] atan2_16::xi#18 ← atan2_16::xi#2 -Coalesced [132] atan2_16::yi#18 ← atan2_16::yi#8 -Coalesced [133] atan2_16::xi#15 ← atan2_16::xi#8 -Coalesced [134] atan2_16::i#12 ← atan2_16::i#1 -Coalesced [135] atan2_16::angle#21 ← atan2_16::angle#13 -Coalesced (already) [136] atan2_16::angle#23 ← atan2_16::angle#13 -Coalesced [141] atan2_16::yi#20 ← atan2_16::yi#1 -Coalesced [142] atan2_16::angle#24 ← atan2_16::angle#2 -Coalesced [143] atan2_16::xi#17 ← atan2_16::xi#1 -Coalesced [144] atan2_16::yd#12 ← atan2_16::yd#3 -Coalesced [145] atan2_16::xd#12 ← atan2_16::xd#3 -Coalesced [149] atan2_16::shift#6 ← atan2_16::shift#1 -Coalesced [150] atan2_16::xd#11 ← atan2_16::xd#1 -Coalesced [151] atan2_16::yd#11 ← atan2_16::yd#1 -Not coalescing [152] atan2_16::xi#13 ← atan2_16::x#0 -Not coalescing [153] atan2_16::yi#16 ← atan2_16::y#0 -Coalesced [157] init_dist_screen::screen_topline#15 ← init_dist_screen::screen#0 -Coalesced [158] init_dist_screen::screen_bottomline#15 ← init_dist_screen::screen_bottomline#0 -Coalesced [163] init_dist_screen::yd#2 ← init_dist_screen::$5 -Coalesced [166] sqr::val#3 ← sqr::val#0 -Coalesced [174] init_dist_screen::xd#2 ← init_dist_screen::$13 -Coalesced [177] sqr::val#4 ← sqr::val#1 -Coalesced [198] init_dist_screen::y#14 ← init_dist_screen::y#1 -Coalesced [199] init_dist_screen::screen_topline#14 ← init_dist_screen::screen_topline#1 -Coalesced [200] init_dist_screen::screen_bottomline#14 ← init_dist_screen::screen_bottomline#1 -Coalesced [201] init_dist_screen::x#8 ← init_dist_screen::x#1 -Coalesced [202] init_dist_screen::xb#8 ← init_dist_screen::xb#1 -Coalesced [204] init_dist_screen::xd#1 ← init_dist_screen::$15 -Coalesced [206] init_dist_screen::yd#1 ← init_dist_screen::$7 -Coalesced [216] bsearch16u::items#10 ← bsearch16u::items#1 -Coalesced [221] bsearch16u::return#9 ← bsearch16u::$2 -Coalesced [223] bsearch16u::return#7 ← bsearch16u::return#2 -Coalesced [226] bsearch16u::return#8 ← bsearch16u::items#2 -Not coalescing [232] bsearch16u::return#6 ← bsearch16u::pivot#0 -Coalesced [236] bsearch16u::num#10 ← bsearch16u::num#1 -Coalesced [237] bsearch16u::items#12 ← bsearch16u::items#0 -Coalesced [240] bsearch16u::num#9 ← bsearch16u::num#0 -Coalesced [241] bsearch16u::items#11 ← bsearch16u::items#8 -Coalesced [242] bsearch16u::num#11 ← bsearch16u::num#3 -Coalesced (already) [243] bsearch16u::items#13 ← bsearch16u::items#2 -Coalesced (already) [248] heap_head#53 ← heap_head#1 -Coalesced [252] init_squares::squares#4 ← init_squares::squares#0 -Coalesced [262] init_squares::sqr#3 ← init_squares::sqr#1 -Coalesced [263] init_squares::squares#3 ← init_squares::squares#1 -Coalesced [264] init_squares::i#3 ← init_squares::i#1 -Not coalescing [267] heap_head#1 ← malloc::mem#0 +Coalesced [7] heap_head#52 ← heap_head#1 +Coalesced [22] main::dist#6 ← main::dist#0 +Coalesced [23] main::angle#6 ← main::angle#0 +Coalesced [28] main::min_dist_angle#9 ← main::dist_angle#0 +Not coalescing [29] main::min_fill#10 ← main::fill#2 +Coalesced [38] main::fill#6 ← main::fill#1 +Coalesced [39] main::dist#7 ← main::dist#1 +Coalesced [40] main::angle#7 ← main::angle#1 +Not coalescing [41] main::min_dist_angle#6 ← main::min_dist_angle#3 +Coalesced [42] main::min_fill#7 ← main::min_fill#2 +Not coalescing [43] main::min_dist_angle#8 ← main::min_dist_angle#2 +Coalesced (already) [44] main::min_fill#9 ← main::min_fill#5 +Not coalescing [45] main::min_dist_angle#7 ← main::min_dist_angle#2 +Coalesced (already) [46] main::min_fill#8 ← main::min_fill#5 +Coalesced [49] init_angle_screen::screen_bottomline#6 ← init_angle_screen::screen_bottomline#0 +Coalesced [50] init_angle_screen::screen_topline#6 ← init_angle_screen::screen_topline#0 +Coalesced [80] init_angle_screen::y#6 ← init_angle_screen::y#1 +Coalesced [81] init_angle_screen::screen_bottomline#7 ← init_angle_screen::screen_bottomline#1 +Coalesced [82] init_angle_screen::screen_topline#7 ← init_angle_screen::screen_topline#1 +Coalesced [83] init_angle_screen::x#4 ← init_angle_screen::x#1 +Coalesced [84] init_angle_screen::xb#4 ← init_angle_screen::xb#1 +Coalesced [87] atan2_16::yi#17 ← atan2_16::$2 +Coalesced [91] atan2_16::xi#14 ← atan2_16::$7 +Coalesced [93] atan2_16::yi#19 ← atan2_16::yi#0 +Coalesced [94] atan2_16::xi#16 ← atan2_16::xi#0 +Coalesced [97] atan2_16::angle#22 ← atan2_16::angle#12 +Coalesced [102] atan2_16::angle#27 ← atan2_16::angle#4 +Coalesced [106] atan2_16::return#5 ← atan2_16::angle#5 +Coalesced [109] atan2_16::return#6 ← atan2_16::angle#11 +Coalesced [110] atan2_16::angle#26 ← atan2_16::angle#1 +Not coalescing [111] atan2_16::shift#5 ← atan2_16::i#2 +Not coalescing [112] atan2_16::xd#10 ← atan2_16::xi#3 +Not coalescing [113] atan2_16::yd#10 ← atan2_16::yi#3 +Coalesced [119] atan2_16::yd#13 ← atan2_16::yd#2 +Coalesced [120] atan2_16::xd#13 ← atan2_16::xd#2 +Coalesced [127] atan2_16::yi#21 ← atan2_16::yi#2 +Coalesced [128] atan2_16::angle#25 ← atan2_16::angle#3 +Coalesced [129] atan2_16::xi#18 ← atan2_16::xi#2 +Coalesced [133] atan2_16::yi#18 ← atan2_16::yi#8 +Coalesced [134] atan2_16::xi#15 ← atan2_16::xi#8 +Coalesced [135] atan2_16::i#12 ← atan2_16::i#1 +Coalesced [136] atan2_16::angle#21 ← atan2_16::angle#13 +Coalesced (already) [137] atan2_16::angle#23 ← atan2_16::angle#13 +Coalesced [142] atan2_16::yi#20 ← atan2_16::yi#1 +Coalesced [143] atan2_16::angle#24 ← atan2_16::angle#2 +Coalesced [144] atan2_16::xi#17 ← atan2_16::xi#1 +Coalesced [145] atan2_16::yd#12 ← atan2_16::yd#3 +Coalesced [146] atan2_16::xd#12 ← atan2_16::xd#3 +Coalesced [150] atan2_16::shift#6 ← atan2_16::shift#1 +Coalesced [151] atan2_16::xd#11 ← atan2_16::xd#1 +Coalesced [152] atan2_16::yd#11 ← atan2_16::yd#1 +Not coalescing [153] atan2_16::xi#13 ← atan2_16::x#0 +Not coalescing [154] atan2_16::yi#16 ← atan2_16::y#0 +Coalesced [158] init_dist_screen::screen_topline#15 ← init_dist_screen::screen#0 +Coalesced [159] init_dist_screen::screen_bottomline#15 ← init_dist_screen::screen_bottomline#0 +Coalesced [164] init_dist_screen::yd#2 ← init_dist_screen::$5 +Coalesced [167] sqr::val#3 ← sqr::val#0 +Coalesced [175] init_dist_screen::xd#2 ← init_dist_screen::$13 +Coalesced [178] sqr::val#4 ← sqr::val#1 +Coalesced [199] init_dist_screen::y#14 ← init_dist_screen::y#1 +Coalesced [200] init_dist_screen::screen_topline#14 ← init_dist_screen::screen_topline#1 +Coalesced [201] init_dist_screen::screen_bottomline#14 ← init_dist_screen::screen_bottomline#1 +Coalesced [202] init_dist_screen::x#8 ← init_dist_screen::x#1 +Coalesced [203] init_dist_screen::xb#8 ← init_dist_screen::xb#1 +Coalesced [205] init_dist_screen::xd#1 ← init_dist_screen::$15 +Coalesced [207] init_dist_screen::yd#1 ← init_dist_screen::$7 +Coalesced [217] bsearch16u::items#10 ← bsearch16u::items#1 +Coalesced [222] bsearch16u::return#9 ← bsearch16u::$2 +Coalesced [224] bsearch16u::return#7 ← bsearch16u::return#2 +Coalesced [227] bsearch16u::return#8 ← bsearch16u::items#2 +Not coalescing [233] bsearch16u::return#6 ← bsearch16u::pivot#0 +Coalesced [237] bsearch16u::num#10 ← bsearch16u::num#1 +Coalesced [238] bsearch16u::items#12 ← bsearch16u::items#0 +Coalesced [241] bsearch16u::num#9 ← bsearch16u::num#0 +Coalesced [242] bsearch16u::items#11 ← bsearch16u::items#8 +Coalesced [243] bsearch16u::num#11 ← bsearch16u::num#3 +Coalesced (already) [244] bsearch16u::items#13 ← bsearch16u::items#2 +Coalesced (already) [249] heap_head#53 ← heap_head#1 +Coalesced [253] init_squares::squares#4 ← init_squares::squares#0 +Coalesced [263] init_squares::sqr#3 ← init_squares::sqr#1 +Coalesced [264] init_squares::squares#3 ← init_squares::squares#1 +Coalesced [265] init_squares::i#3 ← init_squares::i#1 +Not coalescing [268] heap_head#1 ← malloc::mem#0 Coalesced down to 38 phi equivalence classes -Culled Empty Block (label) @3 -Culled Empty Block (label) @6 -Culled Empty Block (label) @14 +Culled Empty Block (label) @4 +Culled Empty Block (label) @8 +Culled Empty Block (label) @11 +Culled Empty Block (label) @19 Culled Empty Block (label) main::@18 Culled Empty Block (label) main::@1 Culled Empty Block (label) init_angle_screen::@6 @@ -2572,10 +2582,10 @@ Culled Empty Block (label) init_dist_screen::@20 Culled Empty Block (label) bsearch16u::@1 Culled Empty Block (label) bsearch16u::@18 Culled Empty Block (label) init_squares::@4 -Renumbering block @8 to @1 -Renumbering block @11 to @2 -Renumbering block @12 to @3 -Renumbering block @13 to @4 +Renumbering block @13 to @1 +Renumbering block @16 to @2 +Renumbering block @17 to @3 +Renumbering block @18 to @4 Renumbering block bsearch16u::@2 to bsearch16u::@1 Renumbering block bsearch16u::@3 to bsearch16u::@2 Renumbering block bsearch16u::@6 to bsearch16u::@3 @@ -3005,8 +3015,8 @@ init_squares::@return: scope:[init_squares] from init_squares::@1 [189] return to:@return malloc: scope:[malloc] from @1 @3 init_squares - [190] (word) malloc::size#3 ← phi( @3/(word) $3e8 @1/(word) $3e8 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD ) - [190] (byte*) heap_head#12 ← phi( @3/(byte*) heap_head#1 @1/(const byte*) HEAP_TOP#0 init_squares/(byte*) heap_head#1 ) + [190] (word) malloc::size#3 ← phi( @1/(word) $3e8 @3/(word) $3e8 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD ) + [190] (byte*) heap_head#12 ← phi( @1/(const byte*) HEAP_TOP#0 @3/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) [191] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 [192] (byte*) heap_head#1 ← (byte*) malloc::mem#0 to:malloc::@return