From c74b86a616c53026b1a8afaef1c1f336e6ea34b1 Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Sun, 3 Dec 2017 23:24:25 +0100 Subject: [PATCH] Moved tables into methods. --- .../java/dk/camelot64/kickc/test/print.kc | 5 +- .../dk/camelot64/kickc/test/ref/printmsg.log | 20 +- .../camelot64/kickc/test/ref/sinus-basic.asm | 16 +- .../camelot64/kickc/test/ref/sinus-basic.cfg | 14 +- .../camelot64/kickc/test/ref/sinus-basic.log | 1535 +++++++---------- .../camelot64/kickc/test/ref/sinus-basic.sym | 20 +- .../dk/camelot64/kickc/test/sinus-basic.kc | 7 +- 7 files changed, 672 insertions(+), 945 deletions(-) diff --git a/src/main/java/dk/camelot64/kickc/test/print.kc b/src/main/java/dk/camelot64/kickc/test/print.kc index 77a1884ad..3bdd3c141 100644 --- a/src/main/java/dk/camelot64/kickc/test/print.kc +++ b/src/main/java/dk/camelot64/kickc/test/print.kc @@ -23,11 +23,10 @@ void print_word(word w) { print_byte(>4]); print_char(hextab[b&$f]); } diff --git a/src/main/java/dk/camelot64/kickc/test/ref/printmsg.log b/src/main/java/dk/camelot64/kickc/test/ref/printmsg.log index 3e0958455..0a03b3686 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/printmsg.log +++ b/src/main/java/dk/camelot64/kickc/test/ref/printmsg.log @@ -39,11 +39,10 @@ void print_word(word w) { print_byte(>4]); print_char(hextab[b&$f]); } @@ -92,13 +91,13 @@ proc (void()) print_word((word) print_word::w) print_word::@return: return endproc // print_word() - (byte[]) hextab ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } proc (void()) print_byte((byte) print_byte::b) + (byte[]) print_byte::hextab ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } (byte~) print_byte::$0 ← (byte) print_byte::b >> (byte/signed byte/word/signed word) 4 - (byte~) print_byte::$1 ← (byte[]) hextab *idx (byte~) print_byte::$0 + (byte~) print_byte::$1 ← (byte[]) print_byte::hextab *idx (byte~) print_byte::$0 (void~) print_byte::$2 ← call print_char (byte~) print_byte::$1 (byte~) print_byte::$3 ← (byte) print_byte::b & (byte/signed byte/word/signed word) 15 - (byte~) print_byte::$4 ← (byte[]) hextab *idx (byte~) print_byte::$3 + (byte~) print_byte::$4 ← (byte[]) print_byte::hextab *idx (byte~) print_byte::$3 (void~) print_byte::$5 ← call print_char (byte~) print_byte::$4 print_byte::@return: return @@ -126,7 +125,6 @@ endproc // main() SYMBOLS (byte*) char_cursor -(byte[]) hextab (byte*) line_cursor (void()) main() (void~) main::$0 @@ -148,6 +146,7 @@ SYMBOLS (void~) print_byte::$5 (label) print_byte::@return (byte) print_byte::b +(byte[]) print_byte::hextab (void()) print_char((byte) print_char::ch) (label) print_char::@return (byte) print_char::ch @@ -227,14 +226,14 @@ print_word::@return: scope:[print_word] from print_word return to:@return @3: scope:[] from @2 - (byte[]) hextab ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } to:@4 print_byte: scope:[print_byte] from + (byte[]) print_byte::hextab ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } (byte~) print_byte::$0 ← (byte) print_byte::b >> (byte/signed byte/word/signed word) 4 - (byte~) print_byte::$1 ← (byte[]) hextab *idx (byte~) print_byte::$0 + (byte~) print_byte::$1 ← (byte[]) print_byte::hextab *idx (byte~) print_byte::$0 (void~) print_byte::$2 ← call print_char (byte~) print_byte::$1 (byte~) print_byte::$3 ← (byte) print_byte::b & (byte/signed byte/word/signed word) 15 - (byte~) print_byte::$4 ← (byte[]) hextab *idx (byte~) print_byte::$3 + (byte~) print_byte::$4 ← (byte[]) print_byte::hextab *idx (byte~) print_byte::$3 (void~) print_byte::$5 ← call print_char (byte~) print_byte::$4 to:print_byte::@return print_byte::@return: scope:[print_byte] from print_byte @@ -273,7 +272,6 @@ main::@return: scope:[main] from main Removing unused procedure print_word Removing unused procedure print_byte Removing unused procedure print_char -Eliminating unused variable (byte[]) hextab and assignment [14] (byte[]) hextab ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } Eliminating unused variable - keeping the call (void~) main::$0 Eliminating unused variable - keeping the call (void~) main::$1 Eliminating unused variable - keeping the call (void~) main::$2 diff --git a/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.asm b/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.asm index ca791dd78..8cb8c1343 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.asm +++ b/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.asm @@ -3,14 +3,11 @@ .pc = $80d "Program" .const memLo = $fe .const memHi = $ff - .const f_2pi = $e2e5 .label char_cursor = 5 .label line_cursor = 3 - hextab: .byte '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' - f_i: .byte 0, 0, 0, 0, 0 - f_127: .byte 0, 0, 0, 0, 0 jsr main main: { + .const f_2pi = $e2e5 .label _3 = 9 .label _12 = 9 .label i = 2 @@ -78,6 +75,8 @@ main: { lda print_ln._0+1 sta char_cursor+1 jmp b1 + f_i: .byte 0, 0, 0, 0, 0 + f_127: .byte 0, 0, 0, 0, 0 } print_ln: { .label _0 = 3 @@ -124,6 +123,7 @@ print_byte: { lda hextab,x jsr print_char rts + hextab: .byte '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' } print_char: { ldy #0 @@ -149,9 +149,9 @@ getFAC: { rts } addMEMtoFAC: { - lda #f_127 + lda #>main.f_127 sta prepareMEM.mem+1 jsr prepareMEM lda $fe @@ -180,9 +180,9 @@ sinFAC: { rts } divMEMbyFAC: { - lda #f_i + lda #>main.f_i sta prepareMEM.mem+1 jsr prepareMEM lda $fe diff --git a/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.cfg b/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.cfg index ffbb39c46..03438ae26 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.cfg +++ b/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.cfg @@ -21,7 +21,7 @@ main::@4: scope:[main] from main::@3 to:main::@1 main::@1: scope:[main] from main::@17 main::@4 [10] (byte*) line_cursor#13 ← phi( main::@17/(byte*~) print_ln::$0 main::@4/((byte*))(word/signed word) 1024 ) [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) - [10] (byte*) char_cursor#32 ← phi( main::@17/(byte*~) char_cursor#50 main::@4/((byte*))(word/signed word) 1024 ) [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + [10] (byte*) char_cursor#32 ← phi( main::@17/(byte*~) char_cursor#48 main::@4/((byte*))(word/signed word) 1024 ) [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) [10] (byte) main::i#10 ← phi( main::@17/(byte) main::i#1 main::@4/(byte/signed byte/word/signed word) 1 ) [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) [11] (word~) main::$3 ← ((word)) (byte) main::i#10 [ main::i#10 char_cursor#32 line_cursor#13 main::$3 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 main::$3 ] ) [12] (word) setFAC::w#1 ← (word~) main::$3 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#1 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#1 ] ) @@ -77,7 +77,7 @@ main::@return: scope:[main] from main::@16 [38] return [ ] ( main:2 [ ] ) to:@return main::@17: scope:[main] from main::@16 - [39] (byte*~) char_cursor#50 ← (byte*~) print_ln::$0 [ main::i#1 char_cursor#50 print_ln::$0 ] ( main:2 [ main::i#1 char_cursor#50 print_ln::$0 ] ) + [39] (byte*~) char_cursor#48 ← (byte*~) print_ln::$0 [ main::i#1 char_cursor#48 print_ln::$0 ] ( main:2 [ main::i#1 char_cursor#48 print_ln::$0 ] ) to:main::@1 print_ln: scope:[print_ln] from main::@15 [40] phi() [ line_cursor#13 char_cursor#10 ] ( main:2::print_ln:35 [ main::i#10 line_cursor#13 char_cursor#10 ] ) @@ -107,13 +107,13 @@ print_byte: scope:[print_byte] from print_word print_word::@1 [52] (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#32 print_word::@1/(byte*) char_cursor#10 ) [ print_byte::b#2 char_cursor#31 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 ] ) [52] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) [ print_byte::b#2 char_cursor#31 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 ] ) [53] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word) 4 [ print_byte::b#2 char_cursor#31 print_byte::$0 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_byte::$0 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_byte::$0 ] ) - [54] (byte~) print_byte::$1 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$0 [ print_byte::b#2 char_cursor#31 print_byte::$1 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_byte::$1 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_byte::$1 ] ) + [54] (byte~) print_byte::$1 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$0 [ print_byte::b#2 char_cursor#31 print_byte::$1 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_byte::$1 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_byte::$1 ] ) [55] (byte) print_char::ch#0 ← (byte~) print_byte::$1 [ print_byte::b#2 char_cursor#31 print_char::ch#0 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_char::ch#0 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_char::ch#0 ] ) [56] call print_char param-assignment [ char_cursor#10 print_byte::b#2 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::b#2 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::b#2 ] ) to:print_byte::@1 print_byte::@1: scope:[print_byte] from print_byte [57] (byte~) print_byte::$3 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word) 15 [ char_cursor#10 print_byte::$3 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$3 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$3 ] ) - [58] (byte~) print_byte::$4 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$3 [ char_cursor#10 print_byte::$4 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$4 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$4 ] ) + [58] (byte~) print_byte::$4 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$3 [ char_cursor#10 print_byte::$4 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$4 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$4 ] ) [59] (byte) print_char::ch#1 ← (byte~) print_byte::$4 [ char_cursor#10 print_char::ch#1 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_char::ch#1 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_char::ch#1 ] ) [60] call print_char param-assignment [ char_cursor#10 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 ] ) to:print_byte::@return @@ -148,7 +148,7 @@ addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 [73] return [ ] ( main:2::addMEMtoFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:@return prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC - [74] (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte[]) f_127#0 divMEMbyFAC/(const byte[]) f_i#0 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) [ prepareMEM::mem#5 ] ( main:2::addMEMtoFAC:27::prepareMEM:71 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:15::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:25::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::divMEMbyFAC:21::prepareMEM:88 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:5::prepareMEM:94 [ prepareMEM::mem#5 ] main:2::setFAC:13::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:19::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setMEMtoFAC:9::prepareMEM:99 [ prepareMEM::mem#5 ] main:2::setMEMtoFAC:17::prepareMEM:99 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] ) + [74] (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte[]) main::f_127#0 divMEMbyFAC/(const byte[]) main::f_i#0 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) [ prepareMEM::mem#5 ] ( main:2::addMEMtoFAC:27::prepareMEM:71 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:15::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:25::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::divMEMbyFAC:21::prepareMEM:88 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:5::prepareMEM:94 [ prepareMEM::mem#5 ] main:2::setFAC:13::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:19::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setMEMtoFAC:9::prepareMEM:99 [ prepareMEM::mem#5 ] main:2::setMEMtoFAC:17::prepareMEM:99 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] ) [75] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 [ prepareMEM::mem#5 prepareMEM::$0 ] ( main:2::addMEMtoFAC:27::prepareMEM:71 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:15::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:25::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::divMEMbyFAC:21::prepareMEM:88 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:5::prepareMEM:94 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:13::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:19::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:9::prepareMEM:99 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:17::prepareMEM:99 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] ) [76] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#5 ] ( main:2::addMEMtoFAC:27::prepareMEM:71 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:15::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:25::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::divMEMbyFAC:21::prepareMEM:88 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:5::prepareMEM:94 [ prepareMEM::mem#5 ] main:2::setFAC:13::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:19::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setMEMtoFAC:9::prepareMEM:99 [ prepareMEM::mem#5 ] main:2::setMEMtoFAC:17::prepareMEM:99 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] ) [77] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 [ prepareMEM::$1 ] ( main:2::addMEMtoFAC:27::prepareMEM:71 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:15::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:25::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::divMEMbyFAC:21::prepareMEM:88 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:5::prepareMEM:94 [ prepareMEM::$1 ] main:2::setFAC:13::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:19::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setMEMtoFAC:9::prepareMEM:99 [ prepareMEM::$1 ] main:2::setMEMtoFAC:17::prepareMEM:99 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] ) @@ -158,7 +158,7 @@ prepareMEM::@return: scope:[prepareMEM] from prepareMEM [79] return [ ] ( main:2::addMEMtoFAC:27::prepareMEM:71 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:15::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:25::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:21::prepareMEM:88 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:5::prepareMEM:94 [ ] main:2::setFAC:13::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:19::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:9::prepareMEM:99 [ ] main:2::setMEMtoFAC:17::prepareMEM:99 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:@return mulFACbyMEM: scope:[mulFACbyMEM] from main::@11 main::@6 - [80] (byte*) mulFACbyMEM::mem#2 ← phi( main::@11/(const byte[]) f_127#0 main::@6/(const byte*) f_2pi#0 ) [ mulFACbyMEM::mem#2 ] ( main:2::mulFACbyMEM:15 [ main::i#10 char_cursor#32 line_cursor#13 mulFACbyMEM::mem#2 ] main:2::mulFACbyMEM:25 [ main::i#10 char_cursor#32 line_cursor#13 mulFACbyMEM::mem#2 ] ) + [80] (byte*) mulFACbyMEM::mem#2 ← phi( main::@11/(const byte[]) main::f_127#0 main::@6/(const byte*) main::f_2pi#0 ) [ mulFACbyMEM::mem#2 ] ( main:2::mulFACbyMEM:15 [ main::i#10 char_cursor#32 line_cursor#13 mulFACbyMEM::mem#2 ] main:2::mulFACbyMEM:25 [ main::i#10 char_cursor#32 line_cursor#13 mulFACbyMEM::mem#2 ] ) [81] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#4 ] ( main:2::mulFACbyMEM:15 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:25 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] ) [82] call prepareMEM param-assignment [ ] ( main:2::mulFACbyMEM:15 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:25 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:mulFACbyMEM::@1 @@ -197,7 +197,7 @@ setFAC::@return: scope:[setFAC] from setFAC::@1 [96] return [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:13 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:19 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@4 main::@7 - [97] (byte*) setMEMtoFAC::mem#2 ← phi( main::@4/(const byte[]) f_127#0 main::@7/(const byte[]) f_i#0 ) [ setMEMtoFAC::mem#2 ] ( main:2::setMEMtoFAC:9 [ setMEMtoFAC::mem#2 ] main:2::setMEMtoFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setMEMtoFAC::mem#2 ] ) + [97] (byte*) setMEMtoFAC::mem#2 ← phi( main::@4/(const byte[]) main::f_127#0 main::@7/(const byte[]) main::f_i#0 ) [ setMEMtoFAC::mem#2 ] ( main:2::setMEMtoFAC:9 [ setMEMtoFAC::mem#2 ] main:2::setMEMtoFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setMEMtoFAC::mem#2 ] ) [98] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#1 ] ( main:2::setMEMtoFAC:9 [ prepareMEM::mem#1 ] main:2::setMEMtoFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#1 ] ) [99] call prepareMEM param-assignment [ ] ( main:2::setMEMtoFAC:9 [ ] main:2::setMEMtoFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:setMEMtoFAC::@1 diff --git a/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.log b/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.log index cb9d766a4..11203084d 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.log +++ b/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.log @@ -1,11 +1,10 @@ import "print" import "basic-floats" -byte[] f_i = {0, 0, 0, 0, 0}; -byte[] f_127 = {0, 0, 0, 0, 0}; -byte* f_2pi = $e2e5; - void main() { + byte[] f_i = {0, 0, 0, 0, 0}; + byte[] f_127 = {0, 0, 0, 0, 0}; + const byte* f_2pi = $e2e5; setFAC(1275); divFACby10(); setMEMtoFAC(f_127); @@ -49,11 +48,10 @@ void print_word(word w) { print_byte(>4]); print_char(hextab[b&$f]); } @@ -384,13 +382,13 @@ proc (void()) print_word((word) print_word::w) print_word::@return: return endproc // print_word() - (byte[]) hextab ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } proc (void()) print_byte((byte) print_byte::b) + (byte[]) print_byte::hextab ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } (byte~) print_byte::$0 ← (byte) print_byte::b >> (byte/signed byte/word/signed word) 4 - (byte~) print_byte::$1 ← (byte[]) hextab *idx (byte~) print_byte::$0 + (byte~) print_byte::$1 ← (byte[]) print_byte::hextab *idx (byte~) print_byte::$0 (void~) print_byte::$2 ← call print_char (byte~) print_byte::$1 (byte~) print_byte::$3 ← (byte) print_byte::b & (byte/signed byte/word/signed word) 15 - (byte~) print_byte::$4 ← (byte[]) hextab *idx (byte~) print_byte::$3 + (byte~) print_byte::$4 ← (byte[]) print_byte::hextab *idx (byte~) print_byte::$3 (void~) print_byte::$5 ← call print_char (byte~) print_byte::$4 print_byte::@return: return @@ -557,24 +555,24 @@ proc (void()) mulFACby10() mulFACby10::@return: return endproc // mulFACby10() - (byte[]) f_i ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } - (byte[]) f_127 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } - (byte*) f_2pi ← (word) 58085 proc (void()) main() + (byte[]) main::f_i ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } + (byte[]) main::f_127 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } + (byte*) main::f_2pi ← (word) 58085 (void~) main::$0 ← call setFAC (word/signed word) 1275 (void~) main::$1 ← call divFACby10 - (void~) main::$2 ← call setMEMtoFAC (byte[]) f_127 + (void~) main::$2 ← call setMEMtoFAC (byte[]) main::f_127 (byte) main::i ← (byte/signed byte/word/signed word) 1 main::@1: (word~) main::$3 ← ((word)) (byte) main::i (void~) main::$4 ← call setFAC (word~) main::$3 - (void~) main::$5 ← call mulFACbyMEM (byte*) f_2pi - (void~) main::$6 ← call setMEMtoFAC (byte[]) f_i + (void~) main::$5 ← call mulFACbyMEM (byte*) main::f_2pi + (void~) main::$6 ← call setMEMtoFAC (byte[]) main::f_i (void~) main::$7 ← call setFAC (byte/signed byte/word/signed word) 25 - (void~) main::$8 ← call divMEMbyFAC (byte[]) f_i + (void~) main::$8 ← call divMEMbyFAC (byte[]) main::f_i (void~) main::$9 ← call sinFAC - (void~) main::$10 ← call mulFACbyMEM (byte[]) f_127 - (void~) main::$11 ← call addMEMtoFAC (byte[]) f_127 + (void~) main::$10 ← call mulFACbyMEM (byte[]) main::f_127 + (void~) main::$11 ← call addMEMtoFAC (byte[]) main::f_127 (word~) main::$12 ← call getFAC (void~) main::$13 ← call print_word (word~) main::$12 (void~) main::$14 ← call print_ln @@ -606,14 +604,10 @@ SYMBOLS (byte*) divMEMbyFAC::mem (void()) expFAC() (label) expFAC::@return -(byte[]) f_127 -(byte*) f_2pi -(byte[]) f_i (word()) getFAC() (label) getFAC::@return (word) getFAC::return (word) getFAC::w -(byte[]) hextab (void()) intFAC() (label) intFAC::@return (byte*) line_cursor @@ -638,6 +632,9 @@ SYMBOLS (void~) main::$9 (label) main::@1 (label) main::@return +(byte[]) main::f_127 +(byte*) main::f_2pi +(byte[]) main::f_i (byte) main::i (byte*) memHi (byte*) memLo @@ -661,6 +658,7 @@ SYMBOLS (void~) print_byte::$5 (label) print_byte::@return (byte) print_byte::b +(byte[]) print_byte::hextab (void()) print_char((byte) print_char::ch) (label) print_char::@return (byte) print_char::ch @@ -728,7 +726,7 @@ SYMBOLS Promoting word/signed word to byte* in line_cursor ← ((byte*)) 1024 Promoting byte/word/signed word to byte* in memLo ← ((byte*)) 254 Promoting byte/word/signed word to byte* in memHi ← ((byte*)) 255 -Promoting word to byte* in f_2pi ← ((byte*)) 58085 +Promoting word to byte* in main::f_2pi ← ((byte*)) 58085 INITIAL CONTROL FLOW GRAPH @begin: scope:[] from (byte*) line_cursor ← ((byte*)) (word/signed word) 1024 @@ -784,14 +782,14 @@ print_word::@return: scope:[print_word] from print_word return to:@return @3: scope:[] from @2 - (byte[]) hextab ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } to:@4 print_byte: scope:[print_byte] from + (byte[]) print_byte::hextab ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } (byte~) print_byte::$0 ← (byte) print_byte::b >> (byte/signed byte/word/signed word) 4 - (byte~) print_byte::$1 ← (byte[]) hextab *idx (byte~) print_byte::$0 + (byte~) print_byte::$1 ← (byte[]) print_byte::hextab *idx (byte~) print_byte::$0 (void~) print_byte::$2 ← call print_char (byte~) print_byte::$1 (byte~) print_byte::$3 ← (byte) print_byte::b & (byte/signed byte/word/signed word) 15 - (byte~) print_byte::$4 ← (byte[]) hextab *idx (byte~) print_byte::$3 + (byte~) print_byte::$4 ← (byte[]) print_byte::hextab *idx (byte~) print_byte::$3 (void~) print_byte::$5 ← call print_char (byte~) print_byte::$4 to:print_byte::@return print_byte::@return: scope:[print_byte] from print_byte @@ -1045,26 +1043,26 @@ mulFACby10::@return: scope:[mulFACby10] from mulFACby10 return to:@return @32: scope:[] from @31 - (byte[]) f_i ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } - (byte[]) f_127 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } - (byte*) f_2pi ← ((byte*)) (word) 58085 to:@33 main: scope:[main] from + (byte[]) main::f_i ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } + (byte[]) main::f_127 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } + (byte*) main::f_2pi ← ((byte*)) (word) 58085 (void~) main::$0 ← call setFAC (word/signed word) 1275 (void~) main::$1 ← call divFACby10 - (void~) main::$2 ← call setMEMtoFAC (byte[]) f_127 + (void~) main::$2 ← call setMEMtoFAC (byte[]) main::f_127 (byte) main::i ← (byte/signed byte/word/signed word) 1 to:main::@1 main::@1: scope:[main] from main main::@1 (word~) main::$3 ← ((word)) (byte) main::i (void~) main::$4 ← call setFAC (word~) main::$3 - (void~) main::$5 ← call mulFACbyMEM (byte*) f_2pi - (void~) main::$6 ← call setMEMtoFAC (byte[]) f_i + (void~) main::$5 ← call mulFACbyMEM (byte*) main::f_2pi + (void~) main::$6 ← call setMEMtoFAC (byte[]) main::f_i (void~) main::$7 ← call setFAC (byte/signed byte/word/signed word) 25 - (void~) main::$8 ← call divMEMbyFAC (byte[]) f_i + (void~) main::$8 ← call divMEMbyFAC (byte[]) main::f_i (void~) main::$9 ← call sinFAC - (void~) main::$10 ← call mulFACbyMEM (byte[]) f_127 - (void~) main::$11 ← call addMEMtoFAC (byte[]) f_127 + (void~) main::$10 ← call mulFACbyMEM (byte[]) main::f_127 + (void~) main::$11 ← call addMEMtoFAC (byte[]) main::f_127 (word~) main::$12 ← call getFAC (void~) main::$13 ← call print_word (word~) main::$12 (void~) main::$14 ← call print_ln @@ -1125,6 +1123,7 @@ Eliminating unused variable - keeping the call (void~) main::$13 Eliminating unused variable - keeping the call (void~) main::$14 Removing empty block @1 Removing empty block @2 +Removing empty block @3 Removing empty block @4 Removing empty block @6 Removing empty block @7 @@ -1153,12 +1152,13 @@ Removing empty block @28 Removing empty block @29 Removing empty block @30 Removing empty block @31 +Removing empty block @32 Removing empty block main::@2 CONTROL FLOW GRAPH @begin: scope:[] from (byte*) line_cursor ← ((byte*)) (word/signed word) 1024 (byte*) char_cursor ← (byte*) line_cursor - to:@3 + to:@5 print_ln: scope:[print_ln] from to:print_ln::@1 print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 @@ -1182,15 +1182,13 @@ print_word: scope:[print_word] from print_word::@return: scope:[print_word] from print_word return to:@return -@3: scope:[] from @begin - (byte[]) hextab ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } - to:@5 print_byte: scope:[print_byte] from + (byte[]) print_byte::hextab ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } (byte~) print_byte::$0 ← (byte) print_byte::b >> (byte/signed byte/word/signed word) 4 - (byte~) print_byte::$1 ← (byte[]) hextab *idx (byte~) print_byte::$0 + (byte~) print_byte::$1 ← (byte[]) print_byte::hextab *idx (byte~) print_byte::$0 call print_char (byte~) print_byte::$1 (byte~) print_byte::$3 ← (byte) print_byte::b & (byte/signed byte/word/signed word) 15 - (byte~) print_byte::$4 ← (byte[]) hextab *idx (byte~) print_byte::$3 + (byte~) print_byte::$4 ← (byte[]) print_byte::hextab *idx (byte~) print_byte::$3 call print_char (byte~) print_byte::$4 to:print_byte::@return print_byte::@return: scope:[print_byte] from print_byte @@ -1203,10 +1201,10 @@ print_char: scope:[print_char] from print_char::@return: scope:[print_char] from print_char return to:@return -@5: scope:[] from @3 +@5: scope:[] from @begin (byte*) memLo ← ((byte*)) (byte/word/signed word) 254 (byte*) memHi ← ((byte*)) (byte/word/signed word) 255 - to:@32 + to:@33 prepareMEM: scope:[prepareMEM] from (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem *((byte*) memLo) ← (byte~) prepareMEM::$0 @@ -1275,27 +1273,25 @@ divFACby10: scope:[divFACby10] from divFACby10::@return: scope:[divFACby10] from divFACby10 return to:@return -@32: scope:[] from @5 - (byte[]) f_i ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } - (byte[]) f_127 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } - (byte*) f_2pi ← ((byte*)) (word) 58085 - to:@33 main: scope:[main] from + (byte[]) main::f_i ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } + (byte[]) main::f_127 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } + (byte*) main::f_2pi ← ((byte*)) (word) 58085 call setFAC (word/signed word) 1275 call divFACby10 - call setMEMtoFAC (byte[]) f_127 + call setMEMtoFAC (byte[]) main::f_127 (byte) main::i ← (byte/signed byte/word/signed word) 1 to:main::@1 main::@1: scope:[main] from main main::@1 (word~) main::$3 ← ((word)) (byte) main::i call setFAC (word~) main::$3 - call mulFACbyMEM (byte*) f_2pi - call setMEMtoFAC (byte[]) f_i + call mulFACbyMEM (byte*) main::f_2pi + call setMEMtoFAC (byte[]) main::f_i call setFAC (byte/signed byte/word/signed word) 25 - call divMEMbyFAC (byte[]) f_i + call divMEMbyFAC (byte[]) main::f_i call sinFAC - call mulFACbyMEM (byte[]) f_127 - call addMEMtoFAC (byte[]) f_127 + call mulFACbyMEM (byte[]) main::f_127 + call addMEMtoFAC (byte[]) main::f_127 (word~) main::$12 ← call getFAC call print_word (word~) main::$12 call print_ln @@ -1306,7 +1302,7 @@ main::@1: scope:[main] from main main::@1 main::@return: scope:[main] from main::@1 return to:@return -@33: scope:[] from @32 +@33: scope:[] from @5 call main to:@end @end: scope:[] from @33 @@ -1324,7 +1320,7 @@ CONTROL FLOW GRAPH WITH ASSIGNMENT CALL @begin: scope:[] from (byte*) line_cursor ← ((byte*)) (word/signed word) 1024 (byte*) char_cursor ← (byte*) line_cursor - to:@3 + to:@5 print_ln: scope:[print_ln] from main::@15 to:print_ln::@1 print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 @@ -1359,19 +1355,17 @@ print_word::@return: scope:[print_word] from print_word::@2 (byte*) char_cursor ← (byte*) char_cursor return to:@return -@3: scope:[] from @begin - (byte[]) hextab ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } - to:@5 print_byte: scope:[print_byte] from print_word print_word::@1 + (byte[]) print_byte::hextab ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } (byte~) print_byte::$0 ← (byte) print_byte::b >> (byte/signed byte/word/signed word) 4 - (byte~) print_byte::$1 ← (byte[]) hextab *idx (byte~) print_byte::$0 + (byte~) print_byte::$1 ← (byte[]) print_byte::hextab *idx (byte~) print_byte::$0 (byte) print_char::ch ← (byte~) print_byte::$1 call print_char param-assignment to:print_byte::@1 print_byte::@1: scope:[print_byte] from print_byte (byte*) char_cursor ← (byte*) char_cursor (byte~) print_byte::$3 ← (byte) print_byte::b & (byte/signed byte/word/signed word) 15 - (byte~) print_byte::$4 ← (byte[]) hextab *idx (byte~) print_byte::$3 + (byte~) print_byte::$4 ← (byte[]) print_byte::hextab *idx (byte~) print_byte::$3 (byte) print_char::ch ← (byte~) print_byte::$4 call print_char param-assignment to:print_byte::@2 @@ -1390,10 +1384,10 @@ print_char::@return: scope:[print_char] from print_char (byte*) char_cursor ← (byte*) char_cursor return to:@return -@5: scope:[] from @3 +@5: scope:[] from @begin (byte*) memLo ← ((byte*)) (byte/word/signed word) 254 (byte*) memHi ← ((byte*)) (byte/word/signed word) 255 - to:@32 + to:@33 prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem *((byte*) memLo) ← (byte~) prepareMEM::$0 @@ -1477,12 +1471,10 @@ divFACby10: scope:[divFACby10] from main::@3 divFACby10::@return: scope:[divFACby10] from divFACby10 return to:@return -@32: scope:[] from @5 - (byte[]) f_i ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } - (byte[]) f_127 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } - (byte*) f_2pi ← ((byte*)) (word) 58085 - to:@33 main: scope:[main] from @33 + (byte[]) main::f_i ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } + (byte[]) main::f_127 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } + (byte*) main::f_2pi ← ((byte*)) (word) 58085 (word) setFAC::w ← (word/signed word) 1275 call setFAC param-assignment to:main::@3 @@ -1490,7 +1482,7 @@ main::@3: scope:[main] from main call divFACby10 param-assignment to:main::@4 main::@4: scope:[main] from main::@3 - (byte*) setMEMtoFAC::mem ← (byte[]) f_127 + (byte*) setMEMtoFAC::mem ← (byte[]) main::f_127 call setMEMtoFAC param-assignment to:main::@5 main::@5: scope:[main] from main::@4 @@ -1502,11 +1494,11 @@ main::@1: scope:[main] from main::@16 main::@5 call setFAC param-assignment to:main::@6 main::@6: scope:[main] from main::@1 - (byte*) mulFACbyMEM::mem ← (byte*) f_2pi + (byte*) mulFACbyMEM::mem ← (byte*) main::f_2pi call mulFACbyMEM param-assignment to:main::@7 main::@7: scope:[main] from main::@6 - (byte*) setMEMtoFAC::mem ← (byte[]) f_i + (byte*) setMEMtoFAC::mem ← (byte[]) main::f_i call setMEMtoFAC param-assignment to:main::@8 main::@8: scope:[main] from main::@7 @@ -1514,18 +1506,18 @@ main::@8: scope:[main] from main::@7 call setFAC param-assignment to:main::@9 main::@9: scope:[main] from main::@8 - (byte*) divMEMbyFAC::mem ← (byte[]) f_i + (byte*) divMEMbyFAC::mem ← (byte[]) main::f_i call divMEMbyFAC param-assignment to:main::@10 main::@10: scope:[main] from main::@9 call sinFAC param-assignment to:main::@11 main::@11: scope:[main] from main::@10 - (byte*) mulFACbyMEM::mem ← (byte[]) f_127 + (byte*) mulFACbyMEM::mem ← (byte[]) main::f_127 call mulFACbyMEM param-assignment to:main::@12 main::@12: scope:[main] from main::@11 - (byte*) addMEMtoFAC::mem ← (byte[]) f_127 + (byte*) addMEMtoFAC::mem ← (byte[]) main::f_127 call addMEMtoFAC param-assignment to:main::@13 main::@13: scope:[main] from main::@12 @@ -1552,7 +1544,7 @@ main::@return: scope:[main] from main::@16 (byte*) line_cursor ← (byte*) line_cursor return to:@return -@33: scope:[] from @32 +@33: scope:[] from @5 call main param-assignment to:@34 @34: scope:[] from @33 @@ -1577,14 +1569,11 @@ Completing Phi functions... Completing Phi functions... Completing Phi functions... Completing Phi functions... -Completing Phi functions... -Completing Phi functions... -Completing Phi functions... CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) line_cursor#0 ← ((byte*)) (word/signed word) 1024 (byte*) char_cursor#0 ← (byte*) line_cursor#0 - to:@3 + to:@5 print_ln: scope:[print_ln] from main::@15 (byte*) char_cursor#29 ← phi( main::@15/(byte*) char_cursor#11 ) (byte*) line_cursor#12 ← phi( main::@15/(byte*) line_cursor#13 ) @@ -1609,7 +1598,6 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 return to:@return print_word: scope:[print_word] from main::@14 - (byte[]) hextab#3 ← phi( main::@14/(byte[]) hextab#5 ) (byte*) char_cursor#30 ← phi( main::@14/(byte*) char_cursor#32 ) (word) print_word::w#1 ← phi( main::@14/(word) print_word::w#0 ) (byte~) print_word::$0 ← > (word) print_word::w#1 @@ -1617,7 +1605,6 @@ print_word: scope:[print_word] from main::@14 call print_byte param-assignment to:print_word::@1 print_word::@1: scope:[print_word] from print_word - (byte[]) hextab#4 ← phi( print_word/(byte[]) hextab#3 ) (word) print_word::w#2 ← phi( print_word/(word) print_word::w#1 ) (byte*) char_cursor#17 ← phi( print_word/(byte*) char_cursor#30 ) (byte*) char_cursor#3 ← (byte*) char_cursor#17 @@ -1634,27 +1621,21 @@ print_word::@return: scope:[print_word] from print_word::@2 (byte*) char_cursor#5 ← (byte*) char_cursor#19 return to:@return -@3: scope:[] from @begin - (byte*) line_cursor#19 ← phi( @begin/(byte*) line_cursor#0 ) - (byte*) char_cursor#38 ← phi( @begin/(byte*) char_cursor#0 ) - (byte[]) hextab#0 ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } - to:@5 print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#30 print_word::@1/(byte*) char_cursor#3 ) - (byte[]) hextab#1 ← phi( print_word/(byte[]) hextab#3 print_word::@1/(byte[]) hextab#4 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) + (byte[]) print_byte::hextab#0 ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word) 4 - (byte~) print_byte::$1 ← (byte[]) hextab#1 *idx (byte~) print_byte::$0 + (byte~) print_byte::$1 ← (byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$0 (byte) print_char::ch#0 ← (byte~) print_byte::$1 call print_char param-assignment to:print_byte::@1 print_byte::@1: scope:[print_byte] from print_byte - (byte[]) hextab#2 ← phi( print_byte/(byte[]) hextab#1 ) (byte) print_byte::b#3 ← phi( print_byte/(byte) print_byte::b#2 ) (byte*) char_cursor#20 ← phi( print_byte/(byte*) char_cursor#31 ) (byte*) char_cursor#6 ← (byte*) char_cursor#20 (byte~) print_byte::$3 ← (byte) print_byte::b#3 & (byte/signed byte/word/signed word) 15 - (byte~) print_byte::$4 ← (byte[]) hextab#2 *idx (byte~) print_byte::$3 + (byte~) print_byte::$4 ← (byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$3 (byte) print_char::ch#1 ← (byte~) print_byte::$4 call print_char param-assignment to:print_byte::@2 @@ -1678,13 +1659,12 @@ print_char::@return: scope:[print_char] from print_char (byte*) char_cursor#10 ← (byte*) char_cursor#24 return to:@return -@5: scope:[] from @3 - (byte[]) hextab#23 ← phi( @3/(byte[]) hextab#0 ) - (byte*) line_cursor#17 ← phi( @3/(byte*) line_cursor#19 ) - (byte*) char_cursor#36 ← phi( @3/(byte*) char_cursor#38 ) +@5: scope:[] from @begin + (byte*) line_cursor#16 ← phi( @begin/(byte*) line_cursor#0 ) + (byte*) char_cursor#35 ← phi( @begin/(byte*) char_cursor#0 ) (byte*) memLo#0 ← ((byte*)) (byte/word/signed word) 254 (byte*) memHi#0 ← ((byte*)) (byte/word/signed word) 255 - to:@32 + to:@33 prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#2 divMEMbyFAC/(byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 @@ -1775,59 +1755,42 @@ divFACby10: scope:[divFACby10] from main::@3 divFACby10::@return: scope:[divFACby10] from divFACby10 return to:@return -@32: scope:[] from @5 - (byte[]) hextab#22 ← phi( @5/(byte[]) hextab#23 ) - (byte*) line_cursor#16 ← phi( @5/(byte*) line_cursor#17 ) - (byte*) char_cursor#35 ← phi( @5/(byte*) char_cursor#36 ) - (byte[]) f_i#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } - (byte[]) f_127#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } - (byte*) f_2pi#0 ← ((byte*)) (word) 58085 - to:@33 main: scope:[main] from @33 - (byte*) line_cursor#31 ← phi( @33/(byte*) line_cursor#14 ) - (byte[]) hextab#20 ← phi( @33/(byte[]) hextab#21 ) - (byte*) char_cursor#49 ← phi( @33/(byte*) char_cursor#33 ) - (byte[]) f_i#12 ← phi( @33/(byte[]) f_i#14 ) - (byte*) f_2pi#9 ← phi( @33/(byte*) f_2pi#11 ) - (byte[]) f_127#6 ← phi( @33/(byte[]) f_127#8 ) + (byte*) line_cursor#29 ← phi( @33/(byte*) line_cursor#14 ) + (byte*) char_cursor#47 ← phi( @33/(byte*) char_cursor#33 ) + (byte[]) main::f_i#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } + (byte[]) main::f_127#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } + (byte*) main::f_2pi#0 ← ((byte*)) (word) 58085 (word) setFAC::w#0 ← (word/signed word) 1275 call setFAC param-assignment to:main::@3 main::@3: scope:[main] from main - (byte*) line_cursor#30 ← phi( main/(byte*) line_cursor#31 ) - (byte[]) hextab#19 ← phi( main/(byte[]) hextab#20 ) - (byte*) char_cursor#48 ← phi( main/(byte*) char_cursor#49 ) - (byte[]) f_i#10 ← phi( main/(byte[]) f_i#12 ) - (byte*) f_2pi#7 ← phi( main/(byte*) f_2pi#9 ) - (byte[]) f_127#4 ← phi( main/(byte[]) f_127#6 ) + (byte*) line_cursor#28 ← phi( main/(byte*) line_cursor#29 ) + (byte*) char_cursor#46 ← phi( main/(byte*) char_cursor#47 ) + (byte[]) main::f_i#10 ← phi( main/(byte[]) main::f_i#0 ) + (byte[]) main::f_127#4 ← phi( main/(byte[]) main::f_127#0 ) call divFACby10 param-assignment to:main::@4 main::@4: scope:[main] from main::@3 - (byte*) line_cursor#29 ← phi( main::@3/(byte*) line_cursor#30 ) - (byte[]) hextab#17 ← phi( main::@3/(byte[]) hextab#19 ) - (byte*) char_cursor#47 ← phi( main::@3/(byte*) char_cursor#48 ) - (byte[]) f_i#8 ← phi( main::@3/(byte[]) f_i#10 ) - (byte*) f_2pi#5 ← phi( main::@3/(byte*) f_2pi#7 ) - (byte[]) f_127#1 ← phi( main::@3/(byte[]) f_127#4 ) - (byte*) setMEMtoFAC::mem#0 ← (byte[]) f_127#1 + (byte*) line_cursor#27 ← phi( main::@3/(byte*) line_cursor#28 ) + (byte*) char_cursor#45 ← phi( main::@3/(byte*) char_cursor#46 ) + (byte[]) main::f_i#8 ← phi( main::@3/(byte[]) main::f_i#10 ) + (byte[]) main::f_127#1 ← phi( main::@3/(byte[]) main::f_127#4 ) + (byte*) setMEMtoFAC::mem#0 ← (byte[]) main::f_127#1 call setMEMtoFAC param-assignment to:main::@5 main::@5: scope:[main] from main::@4 - (byte*) line_cursor#28 ← phi( main::@4/(byte*) line_cursor#29 ) - (byte[]) hextab#16 ← phi( main::@4/(byte[]) hextab#17 ) - (byte*) char_cursor#46 ← phi( main::@4/(byte*) char_cursor#47 ) - (byte[]) f_127#14 ← phi( main::@4/(byte[]) f_127#1 ) - (byte[]) f_i#7 ← phi( main::@4/(byte[]) f_i#8 ) - (byte*) f_2pi#4 ← phi( main::@4/(byte*) f_2pi#5 ) + (byte*) line_cursor#26 ← phi( main::@4/(byte*) line_cursor#27 ) + (byte*) char_cursor#44 ← phi( main::@4/(byte*) char_cursor#45 ) + (byte[]) main::f_127#12 ← phi( main::@4/(byte[]) main::f_127#1 ) + (byte[]) main::f_i#7 ← phi( main::@4/(byte[]) main::f_i#8 ) (byte) main::i#0 ← (byte/signed byte/word/signed word) 1 to:main::@1 main::@1: scope:[main] from main::@16 main::@5 - (byte*) line_cursor#27 ← phi( main::@16/(byte*) line_cursor#3 main::@5/(byte*) line_cursor#28 ) - (byte[]) hextab#14 ← phi( main::@16/(byte[]) hextab#15 main::@5/(byte[]) hextab#16 ) - (byte*) char_cursor#45 ← phi( main::@16/(byte*) char_cursor#12 main::@5/(byte*) char_cursor#46 ) - (byte[]) f_127#12 ← phi( main::@16/(byte[]) f_127#13 main::@5/(byte[]) f_127#14 ) - (byte[]) f_i#5 ← phi( main::@16/(byte[]) f_i#6 main::@5/(byte[]) f_i#7 ) - (byte*) f_2pi#2 ← phi( main::@16/(byte*) f_2pi#3 main::@5/(byte*) f_2pi#4 ) + (byte*) line_cursor#25 ← phi( main::@16/(byte*) line_cursor#3 main::@5/(byte*) line_cursor#26 ) + (byte*) char_cursor#43 ← phi( main::@16/(byte*) char_cursor#12 main::@5/(byte*) char_cursor#44 ) + (byte[]) main::f_127#10 ← phi( main::@16/(byte[]) main::f_127#11 main::@5/(byte[]) main::f_127#12 ) + (byte[]) main::f_i#5 ← phi( main::@16/(byte[]) main::f_i#6 main::@5/(byte[]) main::f_i#7 ) (byte) main::i#2 ← phi( main::@16/(byte) main::i#1 main::@5/(byte) main::i#0 ) (word~) main::$3 ← ((word)) (byte) main::i#2 (word) setFAC::w#1 ← (word~) main::$3 @@ -1835,97 +1798,79 @@ main::@1: scope:[main] from main::@16 main::@5 to:main::@6 main::@6: scope:[main] from main::@1 (byte) main::i#13 ← phi( main::@1/(byte) main::i#2 ) - (byte*) line_cursor#26 ← phi( main::@1/(byte*) line_cursor#27 ) - (byte[]) hextab#13 ← phi( main::@1/(byte[]) hextab#14 ) - (byte*) char_cursor#44 ← phi( main::@1/(byte*) char_cursor#45 ) - (byte[]) f_127#11 ← phi( main::@1/(byte[]) f_127#12 ) - (byte[]) f_i#3 ← phi( main::@1/(byte[]) f_i#5 ) - (byte*) f_2pi#1 ← phi( main::@1/(byte*) f_2pi#2 ) - (byte*) mulFACbyMEM::mem#0 ← (byte*) f_2pi#1 + (byte*) line_cursor#24 ← phi( main::@1/(byte*) line_cursor#25 ) + (byte*) char_cursor#42 ← phi( main::@1/(byte*) char_cursor#43 ) + (byte[]) main::f_127#9 ← phi( main::@1/(byte[]) main::f_127#10 ) + (byte[]) main::f_i#3 ← phi( main::@1/(byte[]) main::f_i#5 ) + (byte*) mulFACbyMEM::mem#0 ← (byte*) main::f_2pi#0 call mulFACbyMEM param-assignment to:main::@7 main::@7: scope:[main] from main::@6 - (byte*) f_2pi#17 ← phi( main::@6/(byte*) f_2pi#1 ) (byte) main::i#12 ← phi( main::@6/(byte) main::i#13 ) - (byte*) line_cursor#25 ← phi( main::@6/(byte*) line_cursor#26 ) - (byte[]) hextab#12 ← phi( main::@6/(byte[]) hextab#13 ) - (byte*) char_cursor#43 ← phi( main::@6/(byte*) char_cursor#44 ) - (byte[]) f_127#10 ← phi( main::@6/(byte[]) f_127#11 ) - (byte[]) f_i#1 ← phi( main::@6/(byte[]) f_i#3 ) - (byte*) setMEMtoFAC::mem#1 ← (byte[]) f_i#1 + (byte*) line_cursor#23 ← phi( main::@6/(byte*) line_cursor#24 ) + (byte*) char_cursor#41 ← phi( main::@6/(byte*) char_cursor#42 ) + (byte[]) main::f_127#8 ← phi( main::@6/(byte[]) main::f_127#9 ) + (byte[]) main::f_i#1 ← phi( main::@6/(byte[]) main::f_i#3 ) + (byte*) setMEMtoFAC::mem#1 ← (byte[]) main::f_i#1 call setMEMtoFAC param-assignment to:main::@8 main::@8: scope:[main] from main::@7 - (byte*) f_2pi#16 ← phi( main::@7/(byte*) f_2pi#17 ) (byte) main::i#11 ← phi( main::@7/(byte) main::i#12 ) - (byte*) line_cursor#24 ← phi( main::@7/(byte*) line_cursor#25 ) - (byte[]) hextab#11 ← phi( main::@7/(byte[]) hextab#12 ) - (byte*) char_cursor#42 ← phi( main::@7/(byte*) char_cursor#43 ) - (byte[]) f_127#9 ← phi( main::@7/(byte[]) f_127#10 ) - (byte[]) f_i#4 ← phi( main::@7/(byte[]) f_i#1 ) + (byte*) line_cursor#22 ← phi( main::@7/(byte*) line_cursor#23 ) + (byte*) char_cursor#40 ← phi( main::@7/(byte*) char_cursor#41 ) + (byte[]) main::f_127#7 ← phi( main::@7/(byte[]) main::f_127#8 ) + (byte[]) main::f_i#4 ← phi( main::@7/(byte[]) main::f_i#1 ) (word) setFAC::w#2 ← (byte/signed byte/word/signed word) 25 call setFAC param-assignment to:main::@9 main::@9: scope:[main] from main::@8 - (byte*) f_2pi#15 ← phi( main::@8/(byte*) f_2pi#16 ) (byte) main::i#10 ← phi( main::@8/(byte) main::i#11 ) - (byte*) line_cursor#23 ← phi( main::@8/(byte*) line_cursor#24 ) - (byte[]) hextab#10 ← phi( main::@8/(byte[]) hextab#11 ) - (byte*) char_cursor#41 ← phi( main::@8/(byte*) char_cursor#42 ) - (byte[]) f_127#7 ← phi( main::@8/(byte[]) f_127#9 ) - (byte[]) f_i#2 ← phi( main::@8/(byte[]) f_i#4 ) - (byte*) divMEMbyFAC::mem#0 ← (byte[]) f_i#2 + (byte*) line_cursor#21 ← phi( main::@8/(byte*) line_cursor#22 ) + (byte*) char_cursor#39 ← phi( main::@8/(byte*) char_cursor#40 ) + (byte[]) main::f_127#6 ← phi( main::@8/(byte[]) main::f_127#7 ) + (byte[]) main::f_i#2 ← phi( main::@8/(byte[]) main::f_i#4 ) + (byte*) divMEMbyFAC::mem#0 ← (byte[]) main::f_i#2 call divMEMbyFAC param-assignment to:main::@10 main::@10: scope:[main] from main::@9 - (byte[]) f_i#17 ← phi( main::@9/(byte[]) f_i#2 ) - (byte*) f_2pi#14 ← phi( main::@9/(byte*) f_2pi#15 ) + (byte[]) main::f_i#15 ← phi( main::@9/(byte[]) main::f_i#2 ) (byte) main::i#9 ← phi( main::@9/(byte) main::i#10 ) - (byte*) line_cursor#22 ← phi( main::@9/(byte*) line_cursor#23 ) - (byte[]) hextab#9 ← phi( main::@9/(byte[]) hextab#10 ) - (byte*) char_cursor#40 ← phi( main::@9/(byte*) char_cursor#41 ) - (byte[]) f_127#5 ← phi( main::@9/(byte[]) f_127#7 ) + (byte*) line_cursor#20 ← phi( main::@9/(byte*) line_cursor#21 ) + (byte*) char_cursor#38 ← phi( main::@9/(byte*) char_cursor#39 ) + (byte[]) main::f_127#5 ← phi( main::@9/(byte[]) main::f_127#6 ) call sinFAC param-assignment to:main::@11 main::@11: scope:[main] from main::@10 - (byte[]) f_i#16 ← phi( main::@10/(byte[]) f_i#17 ) - (byte*) f_2pi#13 ← phi( main::@10/(byte*) f_2pi#14 ) + (byte[]) main::f_i#14 ← phi( main::@10/(byte[]) main::f_i#15 ) (byte) main::i#8 ← phi( main::@10/(byte) main::i#9 ) - (byte*) line_cursor#21 ← phi( main::@10/(byte*) line_cursor#22 ) - (byte[]) hextab#8 ← phi( main::@10/(byte[]) hextab#9 ) - (byte*) char_cursor#39 ← phi( main::@10/(byte*) char_cursor#40 ) - (byte[]) f_127#2 ← phi( main::@10/(byte[]) f_127#5 ) - (byte*) mulFACbyMEM::mem#1 ← (byte[]) f_127#2 + (byte*) line_cursor#19 ← phi( main::@10/(byte*) line_cursor#20 ) + (byte*) char_cursor#37 ← phi( main::@10/(byte*) char_cursor#38 ) + (byte[]) main::f_127#2 ← phi( main::@10/(byte[]) main::f_127#5 ) + (byte*) mulFACbyMEM::mem#1 ← (byte[]) main::f_127#2 call mulFACbyMEM param-assignment to:main::@12 main::@12: scope:[main] from main::@11 - (byte[]) f_i#15 ← phi( main::@11/(byte[]) f_i#16 ) - (byte*) f_2pi#12 ← phi( main::@11/(byte*) f_2pi#13 ) + (byte[]) main::f_i#13 ← phi( main::@11/(byte[]) main::f_i#14 ) (byte) main::i#7 ← phi( main::@11/(byte) main::i#8 ) - (byte*) line_cursor#20 ← phi( main::@11/(byte*) line_cursor#21 ) - (byte[]) hextab#7 ← phi( main::@11/(byte[]) hextab#8 ) - (byte*) char_cursor#37 ← phi( main::@11/(byte*) char_cursor#39 ) - (byte[]) f_127#3 ← phi( main::@11/(byte[]) f_127#2 ) - (byte*) addMEMtoFAC::mem#0 ← (byte[]) f_127#3 + (byte*) line_cursor#18 ← phi( main::@11/(byte*) line_cursor#19 ) + (byte*) char_cursor#36 ← phi( main::@11/(byte*) char_cursor#37 ) + (byte[]) main::f_127#3 ← phi( main::@11/(byte[]) main::f_127#2 ) + (byte*) addMEMtoFAC::mem#0 ← (byte[]) main::f_127#3 call addMEMtoFAC param-assignment to:main::@13 main::@13: scope:[main] from main::@12 - (byte[]) f_127#17 ← phi( main::@12/(byte[]) f_127#3 ) - (byte[]) f_i#13 ← phi( main::@12/(byte[]) f_i#15 ) - (byte*) f_2pi#10 ← phi( main::@12/(byte*) f_2pi#12 ) + (byte[]) main::f_127#15 ← phi( main::@12/(byte[]) main::f_127#3 ) + (byte[]) main::f_i#12 ← phi( main::@12/(byte[]) main::f_i#13 ) (byte) main::i#6 ← phi( main::@12/(byte) main::i#7 ) - (byte*) line_cursor#18 ← phi( main::@12/(byte*) line_cursor#20 ) - (byte[]) hextab#6 ← phi( main::@12/(byte[]) hextab#7 ) - (byte*) char_cursor#34 ← phi( main::@12/(byte*) char_cursor#37 ) + (byte*) line_cursor#17 ← phi( main::@12/(byte*) line_cursor#18 ) + (byte*) char_cursor#34 ← phi( main::@12/(byte*) char_cursor#36 ) (word) getFAC::return#2 ← call getFAC param-assignment to:main::@14 main::@14: scope:[main] from main::@13 - (byte[]) f_127#16 ← phi( main::@13/(byte[]) f_127#17 ) - (byte[]) f_i#11 ← phi( main::@13/(byte[]) f_i#13 ) - (byte*) f_2pi#8 ← phi( main::@13/(byte*) f_2pi#10 ) + (byte[]) main::f_127#14 ← phi( main::@13/(byte[]) main::f_127#15 ) + (byte[]) main::f_i#11 ← phi( main::@13/(byte[]) main::f_i#12 ) (byte) main::i#5 ← phi( main::@13/(byte) main::i#6 ) - (byte*) line_cursor#15 ← phi( main::@13/(byte*) line_cursor#18 ) - (byte[]) hextab#5 ← phi( main::@13/(byte[]) hextab#6 ) + (byte*) line_cursor#15 ← phi( main::@13/(byte*) line_cursor#17 ) (byte*) char_cursor#32 ← phi( main::@13/(byte*) char_cursor#34 ) (word) getFAC::return#4 ← phi( main::@13/(word) getFAC::return#2 ) (word~) main::$12 ← (word) getFAC::return#4 @@ -1933,10 +1878,8 @@ main::@14: scope:[main] from main::@13 call print_word param-assignment to:main::@15 main::@15: scope:[main] from main::@14 - (byte[]) hextab#18 ← phi( main::@14/(byte[]) hextab#5 ) - (byte[]) f_127#15 ← phi( main::@14/(byte[]) f_127#16 ) - (byte[]) f_i#9 ← phi( main::@14/(byte[]) f_i#11 ) - (byte*) f_2pi#6 ← phi( main::@14/(byte*) f_2pi#8 ) + (byte[]) main::f_127#13 ← phi( main::@14/(byte[]) main::f_127#14 ) + (byte[]) main::f_i#9 ← phi( main::@14/(byte[]) main::f_i#11 ) (byte) main::i#4 ← phi( main::@14/(byte) main::i#5 ) (byte*) line_cursor#13 ← phi( main::@14/(byte*) line_cursor#15 ) (byte*) char_cursor#25 ← phi( main::@14/(byte*) char_cursor#32 ) @@ -1944,10 +1887,8 @@ main::@15: scope:[main] from main::@14 call print_ln param-assignment to:main::@16 main::@16: scope:[main] from main::@15 - (byte[]) hextab#15 ← phi( main::@15/(byte[]) hextab#18 ) - (byte[]) f_127#13 ← phi( main::@15/(byte[]) f_127#15 ) - (byte[]) f_i#6 ← phi( main::@15/(byte[]) f_i#9 ) - (byte*) f_2pi#3 ← phi( main::@15/(byte*) f_2pi#6 ) + (byte[]) main::f_127#11 ← phi( main::@15/(byte[]) main::f_127#13 ) + (byte[]) main::f_i#6 ← phi( main::@15/(byte[]) main::f_i#9 ) (byte) main::i#3 ← phi( main::@15/(byte) main::i#4 ) (byte*) char_cursor#26 ← phi( main::@15/(byte*) char_cursor#11 ) (byte*) line_cursor#9 ← phi( main::@15/(byte*) line_cursor#13 ) @@ -1964,13 +1905,9 @@ main::@return: scope:[main] from main::@16 (byte*) line_cursor#4 ← (byte*) line_cursor#10 return to:@return -@33: scope:[] from @32 - (byte[]) hextab#21 ← phi( @32/(byte[]) hextab#22 ) - (byte[]) f_i#14 ← phi( @32/(byte[]) f_i#0 ) - (byte*) f_2pi#11 ← phi( @32/(byte*) f_2pi#0 ) - (byte[]) f_127#8 ← phi( @32/(byte[]) f_127#0 ) - (byte*) line_cursor#14 ← phi( @32/(byte*) line_cursor#16 ) - (byte*) char_cursor#33 ← phi( @32/(byte*) char_cursor#35 ) +@33: scope:[] from @5 + (byte*) line_cursor#14 ← phi( @5/(byte*) line_cursor#16 ) + (byte*) char_cursor#33 ← phi( @5/(byte*) char_cursor#35 ) call main param-assignment to:@34 @34: scope:[] from @33 @@ -1985,7 +1922,7 @@ CONTROL FLOW GRAPH WITH ASSIGNMENT CALL & RETURN @begin: scope:[] from (byte*) line_cursor#0 ← ((byte*)) (word/signed word) 1024 (byte*) char_cursor#0 ← (byte*) line_cursor#0 - to:@3 + to:@5 print_ln: scope:[print_ln] from main::@15 (byte*) char_cursor#29 ← phi( main::@15/(byte*) char_cursor#11 ) (byte*) line_cursor#12 ← phi( main::@15/(byte*) line_cursor#13 ) @@ -2010,7 +1947,6 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 return to:@return print_word: scope:[print_word] from main::@14 - (byte[]) hextab#3 ← phi( main::@14/(byte[]) hextab#5 ) (byte*) char_cursor#30 ← phi( main::@14/(byte*) char_cursor#32 ) (word) print_word::w#1 ← phi( main::@14/(word) print_word::w#0 ) (byte~) print_word::$0 ← > (word) print_word::w#1 @@ -2018,7 +1954,6 @@ print_word: scope:[print_word] from main::@14 call print_byte param-assignment to:print_word::@1 print_word::@1: scope:[print_word] from print_word - (byte[]) hextab#4 ← phi( print_word/(byte[]) hextab#3 ) (word) print_word::w#2 ← phi( print_word/(word) print_word::w#1 ) (byte*) char_cursor#17 ← phi( print_word/(byte*) char_cursor#8 ) (byte*) char_cursor#3 ← (byte*) char_cursor#17 @@ -2035,27 +1970,21 @@ print_word::@return: scope:[print_word] from print_word::@2 (byte*) char_cursor#5 ← (byte*) char_cursor#19 return to:@return -@3: scope:[] from @begin - (byte*) line_cursor#19 ← phi( @begin/(byte*) line_cursor#0 ) - (byte*) char_cursor#38 ← phi( @begin/(byte*) char_cursor#0 ) - (byte[]) hextab#0 ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } - to:@5 print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#30 print_word::@1/(byte*) char_cursor#3 ) - (byte[]) hextab#1 ← phi( print_word/(byte[]) hextab#3 print_word::@1/(byte[]) hextab#4 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) + (byte[]) print_byte::hextab#0 ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word) 4 - (byte~) print_byte::$1 ← (byte[]) hextab#1 *idx (byte~) print_byte::$0 + (byte~) print_byte::$1 ← (byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$0 (byte) print_char::ch#0 ← (byte~) print_byte::$1 call print_char param-assignment to:print_byte::@1 print_byte::@1: scope:[print_byte] from print_byte - (byte[]) hextab#2 ← phi( print_byte/(byte[]) hextab#1 ) (byte) print_byte::b#3 ← phi( print_byte/(byte) print_byte::b#2 ) (byte*) char_cursor#20 ← phi( print_byte/(byte*) char_cursor#10 ) (byte*) char_cursor#6 ← (byte*) char_cursor#20 (byte~) print_byte::$3 ← (byte) print_byte::b#3 & (byte/signed byte/word/signed word) 15 - (byte~) print_byte::$4 ← (byte[]) hextab#2 *idx (byte~) print_byte::$3 + (byte~) print_byte::$4 ← (byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$3 (byte) print_char::ch#1 ← (byte~) print_byte::$4 call print_char param-assignment to:print_byte::@2 @@ -2079,13 +2008,12 @@ print_char::@return: scope:[print_char] from print_char (byte*) char_cursor#10 ← (byte*) char_cursor#24 return to:@return -@5: scope:[] from @3 - (byte[]) hextab#23 ← phi( @3/(byte[]) hextab#0 ) - (byte*) line_cursor#17 ← phi( @3/(byte*) line_cursor#19 ) - (byte*) char_cursor#36 ← phi( @3/(byte*) char_cursor#38 ) +@5: scope:[] from @begin + (byte*) line_cursor#16 ← phi( @begin/(byte*) line_cursor#0 ) + (byte*) char_cursor#35 ← phi( @begin/(byte*) char_cursor#0 ) (byte*) memLo#0 ← ((byte*)) (byte/word/signed word) 254 (byte*) memHi#0 ← ((byte*)) (byte/word/signed word) 255 - to:@32 + to:@33 prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#2 divMEMbyFAC/(byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 @@ -2176,59 +2104,42 @@ divFACby10: scope:[divFACby10] from main::@3 divFACby10::@return: scope:[divFACby10] from divFACby10 return to:@return -@32: scope:[] from @5 - (byte[]) hextab#22 ← phi( @5/(byte[]) hextab#23 ) - (byte*) line_cursor#16 ← phi( @5/(byte*) line_cursor#17 ) - (byte*) char_cursor#35 ← phi( @5/(byte*) char_cursor#36 ) - (byte[]) f_i#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } - (byte[]) f_127#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } - (byte*) f_2pi#0 ← ((byte*)) (word) 58085 - to:@33 main: scope:[main] from @33 - (byte*) line_cursor#31 ← phi( @33/(byte*) line_cursor#14 ) - (byte[]) hextab#20 ← phi( @33/(byte[]) hextab#21 ) - (byte*) char_cursor#49 ← phi( @33/(byte*) char_cursor#33 ) - (byte[]) f_i#12 ← phi( @33/(byte[]) f_i#14 ) - (byte*) f_2pi#9 ← phi( @33/(byte*) f_2pi#11 ) - (byte[]) f_127#6 ← phi( @33/(byte[]) f_127#8 ) + (byte*) line_cursor#29 ← phi( @33/(byte*) line_cursor#14 ) + (byte*) char_cursor#47 ← phi( @33/(byte*) char_cursor#33 ) + (byte[]) main::f_i#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } + (byte[]) main::f_127#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } + (byte*) main::f_2pi#0 ← ((byte*)) (word) 58085 (word) setFAC::w#0 ← (word/signed word) 1275 call setFAC param-assignment to:main::@3 main::@3: scope:[main] from main - (byte*) line_cursor#30 ← phi( main/(byte*) line_cursor#31 ) - (byte[]) hextab#19 ← phi( main/(byte[]) hextab#20 ) - (byte*) char_cursor#48 ← phi( main/(byte*) char_cursor#49 ) - (byte[]) f_i#10 ← phi( main/(byte[]) f_i#12 ) - (byte*) f_2pi#7 ← phi( main/(byte*) f_2pi#9 ) - (byte[]) f_127#4 ← phi( main/(byte[]) f_127#6 ) + (byte*) line_cursor#28 ← phi( main/(byte*) line_cursor#29 ) + (byte*) char_cursor#46 ← phi( main/(byte*) char_cursor#47 ) + (byte[]) main::f_i#10 ← phi( main/(byte[]) main::f_i#0 ) + (byte[]) main::f_127#4 ← phi( main/(byte[]) main::f_127#0 ) call divFACby10 param-assignment to:main::@4 main::@4: scope:[main] from main::@3 - (byte*) line_cursor#29 ← phi( main::@3/(byte*) line_cursor#30 ) - (byte[]) hextab#17 ← phi( main::@3/(byte[]) hextab#19 ) - (byte*) char_cursor#47 ← phi( main::@3/(byte*) char_cursor#48 ) - (byte[]) f_i#8 ← phi( main::@3/(byte[]) f_i#10 ) - (byte*) f_2pi#5 ← phi( main::@3/(byte*) f_2pi#7 ) - (byte[]) f_127#1 ← phi( main::@3/(byte[]) f_127#4 ) - (byte*) setMEMtoFAC::mem#0 ← (byte[]) f_127#1 + (byte*) line_cursor#27 ← phi( main::@3/(byte*) line_cursor#28 ) + (byte*) char_cursor#45 ← phi( main::@3/(byte*) char_cursor#46 ) + (byte[]) main::f_i#8 ← phi( main::@3/(byte[]) main::f_i#10 ) + (byte[]) main::f_127#1 ← phi( main::@3/(byte[]) main::f_127#4 ) + (byte*) setMEMtoFAC::mem#0 ← (byte[]) main::f_127#1 call setMEMtoFAC param-assignment to:main::@5 main::@5: scope:[main] from main::@4 - (byte*) line_cursor#28 ← phi( main::@4/(byte*) line_cursor#29 ) - (byte[]) hextab#16 ← phi( main::@4/(byte[]) hextab#17 ) - (byte*) char_cursor#46 ← phi( main::@4/(byte*) char_cursor#47 ) - (byte[]) f_127#14 ← phi( main::@4/(byte[]) f_127#1 ) - (byte[]) f_i#7 ← phi( main::@4/(byte[]) f_i#8 ) - (byte*) f_2pi#4 ← phi( main::@4/(byte*) f_2pi#5 ) + (byte*) line_cursor#26 ← phi( main::@4/(byte*) line_cursor#27 ) + (byte*) char_cursor#44 ← phi( main::@4/(byte*) char_cursor#45 ) + (byte[]) main::f_127#12 ← phi( main::@4/(byte[]) main::f_127#1 ) + (byte[]) main::f_i#7 ← phi( main::@4/(byte[]) main::f_i#8 ) (byte) main::i#0 ← (byte/signed byte/word/signed word) 1 to:main::@1 main::@1: scope:[main] from main::@16 main::@5 - (byte*) line_cursor#27 ← phi( main::@16/(byte*) line_cursor#3 main::@5/(byte*) line_cursor#28 ) - (byte[]) hextab#14 ← phi( main::@16/(byte[]) hextab#15 main::@5/(byte[]) hextab#16 ) - (byte*) char_cursor#45 ← phi( main::@16/(byte*) char_cursor#12 main::@5/(byte*) char_cursor#46 ) - (byte[]) f_127#12 ← phi( main::@16/(byte[]) f_127#13 main::@5/(byte[]) f_127#14 ) - (byte[]) f_i#5 ← phi( main::@16/(byte[]) f_i#6 main::@5/(byte[]) f_i#7 ) - (byte*) f_2pi#2 ← phi( main::@16/(byte*) f_2pi#3 main::@5/(byte*) f_2pi#4 ) + (byte*) line_cursor#25 ← phi( main::@16/(byte*) line_cursor#3 main::@5/(byte*) line_cursor#26 ) + (byte*) char_cursor#43 ← phi( main::@16/(byte*) char_cursor#12 main::@5/(byte*) char_cursor#44 ) + (byte[]) main::f_127#10 ← phi( main::@16/(byte[]) main::f_127#11 main::@5/(byte[]) main::f_127#12 ) + (byte[]) main::f_i#5 ← phi( main::@16/(byte[]) main::f_i#6 main::@5/(byte[]) main::f_i#7 ) (byte) main::i#2 ← phi( main::@16/(byte) main::i#1 main::@5/(byte) main::i#0 ) (word~) main::$3 ← ((word)) (byte) main::i#2 (word) setFAC::w#1 ← (word~) main::$3 @@ -2236,98 +2147,80 @@ main::@1: scope:[main] from main::@16 main::@5 to:main::@6 main::@6: scope:[main] from main::@1 (byte) main::i#13 ← phi( main::@1/(byte) main::i#2 ) - (byte*) line_cursor#26 ← phi( main::@1/(byte*) line_cursor#27 ) - (byte[]) hextab#13 ← phi( main::@1/(byte[]) hextab#14 ) - (byte*) char_cursor#44 ← phi( main::@1/(byte*) char_cursor#45 ) - (byte[]) f_127#11 ← phi( main::@1/(byte[]) f_127#12 ) - (byte[]) f_i#3 ← phi( main::@1/(byte[]) f_i#5 ) - (byte*) f_2pi#1 ← phi( main::@1/(byte*) f_2pi#2 ) - (byte*) mulFACbyMEM::mem#0 ← (byte*) f_2pi#1 + (byte*) line_cursor#24 ← phi( main::@1/(byte*) line_cursor#25 ) + (byte*) char_cursor#42 ← phi( main::@1/(byte*) char_cursor#43 ) + (byte[]) main::f_127#9 ← phi( main::@1/(byte[]) main::f_127#10 ) + (byte[]) main::f_i#3 ← phi( main::@1/(byte[]) main::f_i#5 ) + (byte*) mulFACbyMEM::mem#0 ← (byte*) main::f_2pi#0 call mulFACbyMEM param-assignment to:main::@7 main::@7: scope:[main] from main::@6 - (byte*) f_2pi#17 ← phi( main::@6/(byte*) f_2pi#1 ) (byte) main::i#12 ← phi( main::@6/(byte) main::i#13 ) - (byte*) line_cursor#25 ← phi( main::@6/(byte*) line_cursor#26 ) - (byte[]) hextab#12 ← phi( main::@6/(byte[]) hextab#13 ) - (byte*) char_cursor#43 ← phi( main::@6/(byte*) char_cursor#44 ) - (byte[]) f_127#10 ← phi( main::@6/(byte[]) f_127#11 ) - (byte[]) f_i#1 ← phi( main::@6/(byte[]) f_i#3 ) - (byte*) setMEMtoFAC::mem#1 ← (byte[]) f_i#1 + (byte*) line_cursor#23 ← phi( main::@6/(byte*) line_cursor#24 ) + (byte*) char_cursor#41 ← phi( main::@6/(byte*) char_cursor#42 ) + (byte[]) main::f_127#8 ← phi( main::@6/(byte[]) main::f_127#9 ) + (byte[]) main::f_i#1 ← phi( main::@6/(byte[]) main::f_i#3 ) + (byte*) setMEMtoFAC::mem#1 ← (byte[]) main::f_i#1 call setMEMtoFAC param-assignment to:main::@8 main::@8: scope:[main] from main::@7 - (byte*) f_2pi#16 ← phi( main::@7/(byte*) f_2pi#17 ) (byte) main::i#11 ← phi( main::@7/(byte) main::i#12 ) - (byte*) line_cursor#24 ← phi( main::@7/(byte*) line_cursor#25 ) - (byte[]) hextab#11 ← phi( main::@7/(byte[]) hextab#12 ) - (byte*) char_cursor#42 ← phi( main::@7/(byte*) char_cursor#43 ) - (byte[]) f_127#9 ← phi( main::@7/(byte[]) f_127#10 ) - (byte[]) f_i#4 ← phi( main::@7/(byte[]) f_i#1 ) + (byte*) line_cursor#22 ← phi( main::@7/(byte*) line_cursor#23 ) + (byte*) char_cursor#40 ← phi( main::@7/(byte*) char_cursor#41 ) + (byte[]) main::f_127#7 ← phi( main::@7/(byte[]) main::f_127#8 ) + (byte[]) main::f_i#4 ← phi( main::@7/(byte[]) main::f_i#1 ) (word) setFAC::w#2 ← (byte/signed byte/word/signed word) 25 call setFAC param-assignment to:main::@9 main::@9: scope:[main] from main::@8 - (byte*) f_2pi#15 ← phi( main::@8/(byte*) f_2pi#16 ) (byte) main::i#10 ← phi( main::@8/(byte) main::i#11 ) - (byte*) line_cursor#23 ← phi( main::@8/(byte*) line_cursor#24 ) - (byte[]) hextab#10 ← phi( main::@8/(byte[]) hextab#11 ) - (byte*) char_cursor#41 ← phi( main::@8/(byte*) char_cursor#42 ) - (byte[]) f_127#7 ← phi( main::@8/(byte[]) f_127#9 ) - (byte[]) f_i#2 ← phi( main::@8/(byte[]) f_i#4 ) - (byte*) divMEMbyFAC::mem#0 ← (byte[]) f_i#2 + (byte*) line_cursor#21 ← phi( main::@8/(byte*) line_cursor#22 ) + (byte*) char_cursor#39 ← phi( main::@8/(byte*) char_cursor#40 ) + (byte[]) main::f_127#6 ← phi( main::@8/(byte[]) main::f_127#7 ) + (byte[]) main::f_i#2 ← phi( main::@8/(byte[]) main::f_i#4 ) + (byte*) divMEMbyFAC::mem#0 ← (byte[]) main::f_i#2 call divMEMbyFAC param-assignment to:main::@10 main::@10: scope:[main] from main::@9 - (byte[]) f_i#17 ← phi( main::@9/(byte[]) f_i#2 ) - (byte*) f_2pi#14 ← phi( main::@9/(byte*) f_2pi#15 ) + (byte[]) main::f_i#15 ← phi( main::@9/(byte[]) main::f_i#2 ) (byte) main::i#9 ← phi( main::@9/(byte) main::i#10 ) - (byte*) line_cursor#22 ← phi( main::@9/(byte*) line_cursor#23 ) - (byte[]) hextab#9 ← phi( main::@9/(byte[]) hextab#10 ) - (byte*) char_cursor#40 ← phi( main::@9/(byte*) char_cursor#41 ) - (byte[]) f_127#5 ← phi( main::@9/(byte[]) f_127#7 ) + (byte*) line_cursor#20 ← phi( main::@9/(byte*) line_cursor#21 ) + (byte*) char_cursor#38 ← phi( main::@9/(byte*) char_cursor#39 ) + (byte[]) main::f_127#5 ← phi( main::@9/(byte[]) main::f_127#6 ) call sinFAC param-assignment to:main::@11 main::@11: scope:[main] from main::@10 - (byte[]) f_i#16 ← phi( main::@10/(byte[]) f_i#17 ) - (byte*) f_2pi#13 ← phi( main::@10/(byte*) f_2pi#14 ) + (byte[]) main::f_i#14 ← phi( main::@10/(byte[]) main::f_i#15 ) (byte) main::i#8 ← phi( main::@10/(byte) main::i#9 ) - (byte*) line_cursor#21 ← phi( main::@10/(byte*) line_cursor#22 ) - (byte[]) hextab#8 ← phi( main::@10/(byte[]) hextab#9 ) - (byte*) char_cursor#39 ← phi( main::@10/(byte*) char_cursor#40 ) - (byte[]) f_127#2 ← phi( main::@10/(byte[]) f_127#5 ) - (byte*) mulFACbyMEM::mem#1 ← (byte[]) f_127#2 + (byte*) line_cursor#19 ← phi( main::@10/(byte*) line_cursor#20 ) + (byte*) char_cursor#37 ← phi( main::@10/(byte*) char_cursor#38 ) + (byte[]) main::f_127#2 ← phi( main::@10/(byte[]) main::f_127#5 ) + (byte*) mulFACbyMEM::mem#1 ← (byte[]) main::f_127#2 call mulFACbyMEM param-assignment to:main::@12 main::@12: scope:[main] from main::@11 - (byte[]) f_i#15 ← phi( main::@11/(byte[]) f_i#16 ) - (byte*) f_2pi#12 ← phi( main::@11/(byte*) f_2pi#13 ) + (byte[]) main::f_i#13 ← phi( main::@11/(byte[]) main::f_i#14 ) (byte) main::i#7 ← phi( main::@11/(byte) main::i#8 ) - (byte*) line_cursor#20 ← phi( main::@11/(byte*) line_cursor#21 ) - (byte[]) hextab#7 ← phi( main::@11/(byte[]) hextab#8 ) - (byte*) char_cursor#37 ← phi( main::@11/(byte*) char_cursor#39 ) - (byte[]) f_127#3 ← phi( main::@11/(byte[]) f_127#2 ) - (byte*) addMEMtoFAC::mem#0 ← (byte[]) f_127#3 + (byte*) line_cursor#18 ← phi( main::@11/(byte*) line_cursor#19 ) + (byte*) char_cursor#36 ← phi( main::@11/(byte*) char_cursor#37 ) + (byte[]) main::f_127#3 ← phi( main::@11/(byte[]) main::f_127#2 ) + (byte*) addMEMtoFAC::mem#0 ← (byte[]) main::f_127#3 call addMEMtoFAC param-assignment to:main::@13 main::@13: scope:[main] from main::@12 - (byte[]) f_127#17 ← phi( main::@12/(byte[]) f_127#3 ) - (byte[]) f_i#13 ← phi( main::@12/(byte[]) f_i#15 ) - (byte*) f_2pi#10 ← phi( main::@12/(byte*) f_2pi#12 ) + (byte[]) main::f_127#15 ← phi( main::@12/(byte[]) main::f_127#3 ) + (byte[]) main::f_i#12 ← phi( main::@12/(byte[]) main::f_i#13 ) (byte) main::i#6 ← phi( main::@12/(byte) main::i#7 ) - (byte*) line_cursor#18 ← phi( main::@12/(byte*) line_cursor#20 ) - (byte[]) hextab#6 ← phi( main::@12/(byte[]) hextab#7 ) - (byte*) char_cursor#34 ← phi( main::@12/(byte*) char_cursor#37 ) + (byte*) line_cursor#17 ← phi( main::@12/(byte*) line_cursor#18 ) + (byte*) char_cursor#34 ← phi( main::@12/(byte*) char_cursor#36 ) call getFAC param-assignment (word) getFAC::return#2 ← (word) getFAC::return#1 to:main::@14 main::@14: scope:[main] from main::@13 - (byte[]) f_127#16 ← phi( main::@13/(byte[]) f_127#17 ) - (byte[]) f_i#11 ← phi( main::@13/(byte[]) f_i#13 ) - (byte*) f_2pi#8 ← phi( main::@13/(byte*) f_2pi#10 ) + (byte[]) main::f_127#14 ← phi( main::@13/(byte[]) main::f_127#15 ) + (byte[]) main::f_i#11 ← phi( main::@13/(byte[]) main::f_i#12 ) (byte) main::i#5 ← phi( main::@13/(byte) main::i#6 ) - (byte*) line_cursor#15 ← phi( main::@13/(byte*) line_cursor#18 ) - (byte[]) hextab#5 ← phi( main::@13/(byte[]) hextab#6 ) + (byte*) line_cursor#15 ← phi( main::@13/(byte*) line_cursor#17 ) (byte*) char_cursor#32 ← phi( main::@13/(byte*) char_cursor#34 ) (word) getFAC::return#4 ← phi( main::@13/(word) getFAC::return#2 ) (word~) main::$12 ← (word) getFAC::return#4 @@ -2335,10 +2228,8 @@ main::@14: scope:[main] from main::@13 call print_word param-assignment to:main::@15 main::@15: scope:[main] from main::@14 - (byte[]) hextab#18 ← phi( main::@14/(byte[]) hextab#5 ) - (byte[]) f_127#15 ← phi( main::@14/(byte[]) f_127#16 ) - (byte[]) f_i#9 ← phi( main::@14/(byte[]) f_i#11 ) - (byte*) f_2pi#6 ← phi( main::@14/(byte*) f_2pi#8 ) + (byte[]) main::f_127#13 ← phi( main::@14/(byte[]) main::f_127#14 ) + (byte[]) main::f_i#9 ← phi( main::@14/(byte[]) main::f_i#11 ) (byte) main::i#4 ← phi( main::@14/(byte) main::i#5 ) (byte*) line_cursor#13 ← phi( main::@14/(byte*) line_cursor#15 ) (byte*) char_cursor#25 ← phi( main::@14/(byte*) char_cursor#5 ) @@ -2346,10 +2237,8 @@ main::@15: scope:[main] from main::@14 call print_ln param-assignment to:main::@16 main::@16: scope:[main] from main::@15 - (byte[]) hextab#15 ← phi( main::@15/(byte[]) hextab#18 ) - (byte[]) f_127#13 ← phi( main::@15/(byte[]) f_127#15 ) - (byte[]) f_i#6 ← phi( main::@15/(byte[]) f_i#9 ) - (byte*) f_2pi#3 ← phi( main::@15/(byte*) f_2pi#6 ) + (byte[]) main::f_127#11 ← phi( main::@15/(byte[]) main::f_127#13 ) + (byte[]) main::f_i#6 ← phi( main::@15/(byte[]) main::f_i#9 ) (byte) main::i#3 ← phi( main::@15/(byte) main::i#4 ) (byte*) char_cursor#26 ← phi( main::@15/(byte*) char_cursor#2 ) (byte*) line_cursor#9 ← phi( main::@15/(byte*) line_cursor#2 ) @@ -2366,13 +2255,9 @@ main::@return: scope:[main] from main::@16 (byte*) line_cursor#4 ← (byte*) line_cursor#10 return to:@return -@33: scope:[] from @32 - (byte[]) hextab#21 ← phi( @32/(byte[]) hextab#22 ) - (byte[]) f_i#14 ← phi( @32/(byte[]) f_i#0 ) - (byte*) f_2pi#11 ← phi( @32/(byte*) f_2pi#0 ) - (byte[]) f_127#8 ← phi( @32/(byte[]) f_127#0 ) - (byte*) line_cursor#14 ← phi( @32/(byte*) line_cursor#16 ) - (byte*) char_cursor#33 ← phi( @32/(byte*) char_cursor#35 ) +@33: scope:[] from @5 + (byte*) line_cursor#14 ← phi( @5/(byte*) line_cursor#16 ) + (byte*) char_cursor#33 ← phi( @5/(byte*) char_cursor#35 ) call main param-assignment to:@34 @34: scope:[] from @33 @@ -2384,8 +2269,6 @@ main::@return: scope:[main] from main::@16 @end: scope:[] from @34 INITIAL SSA SYMBOL TABLE -(label) @3 -(label) @32 (label) @33 (label) @34 (label) @5 @@ -2441,8 +2324,6 @@ INITIAL SSA SYMBOL TABLE (byte*) char_cursor#45 (byte*) char_cursor#46 (byte*) char_cursor#47 -(byte*) char_cursor#48 -(byte*) char_cursor#49 (byte*) char_cursor#5 (byte*) char_cursor#6 (byte*) char_cursor#7 @@ -2456,63 +2337,6 @@ INITIAL SSA SYMBOL TABLE (byte*) divMEMbyFAC::mem (byte*) divMEMbyFAC::mem#0 (byte*) divMEMbyFAC::mem#1 -(byte[]) f_127 -(byte[]) f_127#0 -(byte[]) f_127#1 -(byte[]) f_127#10 -(byte[]) f_127#11 -(byte[]) f_127#12 -(byte[]) f_127#13 -(byte[]) f_127#14 -(byte[]) f_127#15 -(byte[]) f_127#16 -(byte[]) f_127#17 -(byte[]) f_127#2 -(byte[]) f_127#3 -(byte[]) f_127#4 -(byte[]) f_127#5 -(byte[]) f_127#6 -(byte[]) f_127#7 -(byte[]) f_127#8 -(byte[]) f_127#9 -(byte*) f_2pi -(byte*) f_2pi#0 -(byte*) f_2pi#1 -(byte*) f_2pi#10 -(byte*) f_2pi#11 -(byte*) f_2pi#12 -(byte*) f_2pi#13 -(byte*) f_2pi#14 -(byte*) f_2pi#15 -(byte*) f_2pi#16 -(byte*) f_2pi#17 -(byte*) f_2pi#2 -(byte*) f_2pi#3 -(byte*) f_2pi#4 -(byte*) f_2pi#5 -(byte*) f_2pi#6 -(byte*) f_2pi#7 -(byte*) f_2pi#8 -(byte*) f_2pi#9 -(byte[]) f_i -(byte[]) f_i#0 -(byte[]) f_i#1 -(byte[]) f_i#10 -(byte[]) f_i#11 -(byte[]) f_i#12 -(byte[]) f_i#13 -(byte[]) f_i#14 -(byte[]) f_i#15 -(byte[]) f_i#16 -(byte[]) f_i#17 -(byte[]) f_i#2 -(byte[]) f_i#3 -(byte[]) f_i#4 -(byte[]) f_i#5 -(byte[]) f_i#6 -(byte[]) f_i#7 -(byte[]) f_i#8 -(byte[]) f_i#9 (word()) getFAC() (label) getFAC::@return (word) getFAC::return @@ -2525,31 +2349,6 @@ INITIAL SSA SYMBOL TABLE (word) getFAC::w#0 (word) getFAC::w#1 (word) getFAC::w#2 -(byte[]) hextab -(byte[]) hextab#0 -(byte[]) hextab#1 -(byte[]) hextab#10 -(byte[]) hextab#11 -(byte[]) hextab#12 -(byte[]) hextab#13 -(byte[]) hextab#14 -(byte[]) hextab#15 -(byte[]) hextab#16 -(byte[]) hextab#17 -(byte[]) hextab#18 -(byte[]) hextab#19 -(byte[]) hextab#2 -(byte[]) hextab#20 -(byte[]) hextab#21 -(byte[]) hextab#22 -(byte[]) hextab#23 -(byte[]) hextab#3 -(byte[]) hextab#4 -(byte[]) hextab#5 -(byte[]) hextab#6 -(byte[]) hextab#7 -(byte[]) hextab#8 -(byte[]) hextab#9 (byte*) line_cursor (byte*) line_cursor#0 (byte*) line_cursor#1 @@ -2575,8 +2374,6 @@ INITIAL SSA SYMBOL TABLE (byte*) line_cursor#28 (byte*) line_cursor#29 (byte*) line_cursor#3 -(byte*) line_cursor#30 -(byte*) line_cursor#31 (byte*) line_cursor#4 (byte*) line_cursor#5 (byte*) line_cursor#6 @@ -2603,6 +2400,42 @@ INITIAL SSA SYMBOL TABLE (label) main::@8 (label) main::@9 (label) main::@return +(byte[]) main::f_127 +(byte[]) main::f_127#0 +(byte[]) main::f_127#1 +(byte[]) main::f_127#10 +(byte[]) main::f_127#11 +(byte[]) main::f_127#12 +(byte[]) main::f_127#13 +(byte[]) main::f_127#14 +(byte[]) main::f_127#15 +(byte[]) main::f_127#2 +(byte[]) main::f_127#3 +(byte[]) main::f_127#4 +(byte[]) main::f_127#5 +(byte[]) main::f_127#6 +(byte[]) main::f_127#7 +(byte[]) main::f_127#8 +(byte[]) main::f_127#9 +(byte*) main::f_2pi +(byte*) main::f_2pi#0 +(byte[]) main::f_i +(byte[]) main::f_i#0 +(byte[]) main::f_i#1 +(byte[]) main::f_i#10 +(byte[]) main::f_i#11 +(byte[]) main::f_i#12 +(byte[]) main::f_i#13 +(byte[]) main::f_i#14 +(byte[]) main::f_i#15 +(byte[]) main::f_i#2 +(byte[]) main::f_i#3 +(byte[]) main::f_i#4 +(byte[]) main::f_i#5 +(byte[]) main::f_i#6 +(byte[]) main::f_i#7 +(byte[]) main::f_i#8 +(byte[]) main::f_i#9 (byte) main::i (byte) main::i#0 (byte) main::i#1 @@ -2653,6 +2486,8 @@ INITIAL SSA SYMBOL TABLE (byte) print_byte::b#1 (byte) print_byte::b#2 (byte) print_byte::b#3 +(byte[]) print_byte::hextab +(byte[]) print_byte::hextab#0 (void()) print_char((byte) print_char::ch) (label) print_char::@return (byte) print_char::ch @@ -2699,13 +2534,11 @@ Not aliassing across scopes: char_cursor#29 char_cursor#11 Not aliassing across scopes: line_cursor#1 print_ln::$0 Not aliassing across scopes: print_word::w#1 print_word::w#0 Not aliassing across scopes: char_cursor#30 char_cursor#32 -Not aliassing across scopes: hextab#3 hextab#5 Not aliassing across scopes: print_byte::b#0 print_word::$0 Not aliassing across scopes: char_cursor#17 char_cursor#8 Not aliassing across scopes: print_byte::b#1 print_word::$2 Not aliassing across scopes: char_cursor#18 char_cursor#8 Not aliassing across scopes: print_byte::b#2 print_byte::b#0 -Not aliassing across scopes: hextab#1 hextab#3 Not aliassing across scopes: char_cursor#31 char_cursor#30 Not aliassing across scopes: print_char::ch#0 print_byte::$1 Not aliassing across scopes: char_cursor#20 char_cursor#10 @@ -2724,19 +2557,15 @@ Not aliassing across scopes: divMEMbyFAC::mem#1 divMEMbyFAC::mem#0 Not aliassing across scopes: prepareMEM::mem#3 divMEMbyFAC::mem#1 Not aliassing across scopes: mulFACbyMEM::mem#2 mulFACbyMEM::mem#1 Not aliassing across scopes: prepareMEM::mem#4 mulFACbyMEM::mem#2 -Not aliassing across scopes: f_127#6 f_127#8 -Not aliassing across scopes: f_2pi#9 f_2pi#11 -Not aliassing across scopes: f_i#12 f_i#14 -Not aliassing across scopes: char_cursor#49 char_cursor#33 -Not aliassing across scopes: hextab#20 hextab#21 -Not aliassing across scopes: line_cursor#31 line_cursor#14 -Not aliassing across scopes: setMEMtoFAC::mem#0 f_127#1 +Not aliassing across scopes: char_cursor#47 char_cursor#33 +Not aliassing across scopes: line_cursor#29 line_cursor#14 +Not aliassing across scopes: setMEMtoFAC::mem#0 main::f_127#1 Not aliassing across scopes: setFAC::w#1 main::$3 -Not aliassing across scopes: mulFACbyMEM::mem#0 f_2pi#1 -Not aliassing across scopes: setMEMtoFAC::mem#1 f_i#1 -Not aliassing across scopes: divMEMbyFAC::mem#0 f_i#2 -Not aliassing across scopes: mulFACbyMEM::mem#1 f_127#2 -Not aliassing across scopes: addMEMtoFAC::mem#0 f_127#3 +Not aliassing across scopes: mulFACbyMEM::mem#0 main::f_2pi#0 +Not aliassing across scopes: setMEMtoFAC::mem#1 main::f_i#1 +Not aliassing across scopes: divMEMbyFAC::mem#0 main::f_i#2 +Not aliassing across scopes: mulFACbyMEM::mem#1 main::f_127#2 +Not aliassing across scopes: addMEMtoFAC::mem#0 main::f_127#3 Not aliassing across scopes: getFAC::return#2 getFAC::return#1 Not aliassing across scopes: main::$12 getFAC::return#4 Not aliassing across scopes: print_word::w#0 main::$12 @@ -2746,43 +2575,31 @@ Not aliassing across scopes: char_cursor#26 char_cursor#2 Not aliassing across scopes: char_cursor#28 char_cursor#13 Not aliassing across scopes: line_cursor#11 line_cursor#4 Alias candidate removed (byte*) line_cursor#0 -Alias candidate removed (byte*) line_cursor#19 -Alias candidate removed (byte*) line_cursor#17 Alias candidate removed (byte*) line_cursor#16 Alias candidate removed (byte*) char_cursor#1 -Alias (byte*) char_cursor#0 = (byte*) char_cursor#38 (byte*) char_cursor#36 (byte*) char_cursor#35 (byte*) char_cursor#33 (byte*) line_cursor#14 +Alias (byte*) char_cursor#0 = (byte*) char_cursor#35 (byte*) char_cursor#33 (byte*) line_cursor#14 Alias (byte*) char_cursor#16 = (byte*) line_cursor#7 (byte*) line_cursor#1 (byte*) line_cursor#8 (byte*) line_cursor#2 (byte*) char_cursor#2 Alias (word) print_word::w#1 = (word) print_word::w#2 -Alias (byte[]) hextab#3 = (byte[]) hextab#4 Alias (byte*) char_cursor#17 = (byte*) char_cursor#3 Alias (byte*) char_cursor#18 = (byte*) char_cursor#4 (byte*) char_cursor#19 (byte*) char_cursor#5 Alias (byte) print_byte::b#2 = (byte) print_byte::b#3 -Alias (byte[]) hextab#1 = (byte[]) hextab#2 Alias (byte*) char_cursor#20 = (byte*) char_cursor#6 Alias (byte*) char_cursor#21 = (byte*) char_cursor#7 (byte*) char_cursor#22 (byte*) char_cursor#8 Alias (byte*) char_cursor#10 = (byte*) char_cursor#24 (byte*) char_cursor#9 -Alias (byte[]) hextab#0 = (byte[]) hextab#23 (byte[]) hextab#22 (byte[]) hextab#21 Alias (word) getFAC::return#0 = (word) getFAC::w#2 (word) getFAC::return#3 (word) getFAC::return#1 -Alias (byte[]) f_127#1 = (byte[]) f_127#4 (byte[]) f_127#6 (byte[]) f_127#14 -Alias (byte*) f_2pi#4 = (byte*) f_2pi#7 (byte*) f_2pi#9 (byte*) f_2pi#5 -Alias (byte[]) f_i#10 = (byte[]) f_i#12 (byte[]) f_i#8 (byte[]) f_i#7 -Alias (byte*) char_cursor#46 = (byte*) char_cursor#48 (byte*) char_cursor#49 (byte*) char_cursor#47 -Alias (byte[]) hextab#16 = (byte[]) hextab#19 (byte[]) hextab#20 (byte[]) hextab#17 -Alias (byte*) line_cursor#28 = (byte*) line_cursor#30 (byte*) line_cursor#31 (byte*) line_cursor#29 -Alias (byte*) f_2pi#1 = (byte*) f_2pi#2 (byte*) f_2pi#17 (byte*) f_2pi#16 (byte*) f_2pi#15 (byte*) f_2pi#14 (byte*) f_2pi#13 (byte*) f_2pi#12 (byte*) f_2pi#10 (byte*) f_2pi#8 (byte*) f_2pi#6 (byte*) f_2pi#3 -Alias (byte[]) f_i#1 = (byte[]) f_i#3 (byte[]) f_i#5 (byte[]) f_i#4 (byte[]) f_i#2 (byte[]) f_i#17 (byte[]) f_i#16 (byte[]) f_i#15 (byte[]) f_i#13 (byte[]) f_i#11 (byte[]) f_i#9 (byte[]) f_i#6 -Alias (byte[]) f_127#10 = (byte[]) f_127#11 (byte[]) f_127#12 (byte[]) f_127#9 (byte[]) f_127#7 (byte[]) f_127#5 (byte[]) f_127#2 (byte[]) f_127#3 (byte[]) f_127#17 (byte[]) f_127#16 (byte[]) f_127#15 (byte[]) f_127#13 -Alias (byte*) char_cursor#32 = (byte*) char_cursor#44 (byte*) char_cursor#45 (byte*) char_cursor#43 (byte*) char_cursor#42 (byte*) char_cursor#41 (byte*) char_cursor#40 (byte*) char_cursor#39 (byte*) char_cursor#37 (byte*) char_cursor#34 -Alias (byte[]) hextab#10 = (byte[]) hextab#13 (byte[]) hextab#14 (byte[]) hextab#12 (byte[]) hextab#11 (byte[]) hextab#9 (byte[]) hextab#8 (byte[]) hextab#7 (byte[]) hextab#6 (byte[]) hextab#5 (byte[]) hextab#18 (byte[]) hextab#15 -Alias (byte*) line_cursor#13 = (byte*) line_cursor#26 (byte*) line_cursor#27 (byte*) line_cursor#25 (byte*) line_cursor#24 (byte*) line_cursor#23 (byte*) line_cursor#22 (byte*) line_cursor#21 (byte*) line_cursor#20 (byte*) line_cursor#18 (byte*) line_cursor#15 +Alias (byte[]) main::f_127#0 = (byte[]) main::f_127#4 (byte[]) main::f_127#1 (byte[]) main::f_127#12 +Alias (byte[]) main::f_i#0 = (byte[]) main::f_i#10 (byte[]) main::f_i#8 (byte[]) main::f_i#7 +Alias (byte*) char_cursor#44 = (byte*) char_cursor#46 (byte*) char_cursor#47 (byte*) char_cursor#45 +Alias (byte*) line_cursor#26 = (byte*) line_cursor#28 (byte*) line_cursor#29 (byte*) line_cursor#27 +Alias (byte[]) main::f_i#1 = (byte[]) main::f_i#3 (byte[]) main::f_i#5 (byte[]) main::f_i#4 (byte[]) main::f_i#2 (byte[]) main::f_i#15 (byte[]) main::f_i#14 (byte[]) main::f_i#13 (byte[]) main::f_i#12 (byte[]) main::f_i#11 (byte[]) main::f_i#9 (byte[]) main::f_i#6 +Alias (byte[]) main::f_127#10 = (byte[]) main::f_127#9 (byte[]) main::f_127#8 (byte[]) main::f_127#7 (byte[]) main::f_127#6 (byte[]) main::f_127#5 (byte[]) main::f_127#2 (byte[]) main::f_127#3 (byte[]) main::f_127#15 (byte[]) main::f_127#14 (byte[]) main::f_127#13 (byte[]) main::f_127#11 +Alias (byte*) char_cursor#32 = (byte*) char_cursor#42 (byte*) char_cursor#43 (byte*) char_cursor#41 (byte*) char_cursor#40 (byte*) char_cursor#39 (byte*) char_cursor#38 (byte*) char_cursor#37 (byte*) char_cursor#36 (byte*) char_cursor#34 +Alias (byte*) line_cursor#13 = (byte*) line_cursor#24 (byte*) line_cursor#25 (byte*) line_cursor#23 (byte*) line_cursor#22 (byte*) line_cursor#21 (byte*) line_cursor#20 (byte*) line_cursor#19 (byte*) line_cursor#18 (byte*) line_cursor#17 (byte*) line_cursor#15 Alias (byte) main::i#10 = (byte) main::i#13 (byte) main::i#2 (byte) main::i#12 (byte) main::i#11 (byte) main::i#9 (byte) main::i#8 (byte) main::i#7 (byte) main::i#6 (byte) main::i#5 (byte) main::i#4 (byte) main::i#3 Alias (word) getFAC::return#2 = (word) getFAC::return#4 Alias (byte*) char_cursor#11 = (byte*) char_cursor#25 Alias (byte*) line_cursor#10 = (byte*) line_cursor#3 (byte*) line_cursor#9 (byte*) line_cursor#4 Alias (byte*) char_cursor#12 = (byte*) char_cursor#26 (byte*) char_cursor#27 (byte*) char_cursor#13 -Alias (byte[]) f_127#0 = (byte[]) f_127#8 -Alias (byte*) f_2pi#0 = (byte*) f_2pi#11 -Alias (byte[]) f_i#0 = (byte[]) f_i#14 Alias (byte*) char_cursor#14 = (byte*) char_cursor#28 Alias (byte*) line_cursor#11 = (byte*) line_cursor#5 Succesful SSA optimization Pass2AliasElimination @@ -2790,7 +2607,7 @@ CONTROL FLOW GRAPH @begin: scope:[] from (byte*) line_cursor#0 ← ((byte*)) (word/signed word) 1024 (byte*) char_cursor#0 ← (byte*) line_cursor#0 - to:@3 + to:@5 print_ln: scope:[print_ln] from main::@15 (byte*) char_cursor#29 ← phi( main::@15/(byte*) char_cursor#11 ) (byte*) line_cursor#12 ← phi( main::@15/(byte*) line_cursor#13 ) @@ -2811,7 +2628,6 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 return to:@return print_word: scope:[print_word] from main::@14 - (byte[]) hextab#3 ← phi( main::@14/(byte[]) hextab#10 ) (byte*) char_cursor#30 ← phi( main::@14/(byte*) char_cursor#32 ) (word) print_word::w#1 ← phi( main::@14/(word) print_word::w#0 ) (byte~) print_word::$0 ← > (word) print_word::w#1 @@ -2830,23 +2646,19 @@ print_word::@2: scope:[print_word] from print_word::@1 print_word::@return: scope:[print_word] from print_word::@2 return to:@return -@3: scope:[] from @begin - (byte*) line_cursor#19 ← phi( @begin/(byte*) line_cursor#0 ) - (byte[]) hextab#0 ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } - to:@5 print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#30 print_word::@1/(byte*) char_cursor#17 ) - (byte[]) hextab#1 ← phi( print_word/(byte[]) hextab#3 print_word::@1/(byte[]) hextab#3 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) + (byte[]) print_byte::hextab#0 ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word) 4 - (byte~) print_byte::$1 ← (byte[]) hextab#1 *idx (byte~) print_byte::$0 + (byte~) print_byte::$1 ← (byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$0 (byte) print_char::ch#0 ← (byte~) print_byte::$1 call print_char param-assignment to:print_byte::@1 print_byte::@1: scope:[print_byte] from print_byte (byte*) char_cursor#20 ← phi( print_byte/(byte*) char_cursor#10 ) (byte~) print_byte::$3 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word) 15 - (byte~) print_byte::$4 ← (byte[]) hextab#1 *idx (byte~) print_byte::$3 + (byte~) print_byte::$4 ← (byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$3 (byte) print_char::ch#1 ← (byte~) print_byte::$4 call print_char param-assignment to:print_byte::@2 @@ -2865,11 +2677,11 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char return to:@return -@5: scope:[] from @3 - (byte*) line_cursor#17 ← phi( @3/(byte*) line_cursor#19 ) +@5: scope:[] from @begin + (byte*) line_cursor#16 ← phi( @begin/(byte*) line_cursor#0 ) (byte*) memLo#0 ← ((byte*)) (byte/word/signed word) 254 (byte*) memHi#0 ← ((byte*)) (byte/word/signed word) 255 - to:@32 + to:@33 prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#2 divMEMbyFAC/(byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 @@ -2957,19 +2769,12 @@ divFACby10: scope:[divFACby10] from main::@3 divFACby10::@return: scope:[divFACby10] from divFACby10 return to:@return -@32: scope:[] from @5 - (byte*) line_cursor#16 ← phi( @5/(byte*) line_cursor#17 ) - (byte[]) f_i#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } - (byte[]) f_127#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } - (byte*) f_2pi#0 ← ((byte*)) (word) 58085 - to:@33 main: scope:[main] from @33 - (byte*) line_cursor#28 ← phi( @33/(byte*) char_cursor#0 ) - (byte[]) hextab#16 ← phi( @33/(byte[]) hextab#0 ) - (byte*) char_cursor#46 ← phi( @33/(byte*) char_cursor#0 ) - (byte[]) f_i#10 ← phi( @33/(byte[]) f_i#0 ) - (byte*) f_2pi#4 ← phi( @33/(byte*) f_2pi#0 ) - (byte[]) f_127#1 ← phi( @33/(byte[]) f_127#0 ) + (byte*) line_cursor#26 ← phi( @33/(byte*) char_cursor#0 ) + (byte*) char_cursor#44 ← phi( @33/(byte*) char_cursor#0 ) + (byte[]) main::f_i#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } + (byte[]) main::f_127#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } + (byte*) main::f_2pi#0 ← ((byte*)) (word) 58085 (word) setFAC::w#0 ← (word/signed word) 1275 call setFAC param-assignment to:main::@3 @@ -2977,30 +2782,28 @@ main::@3: scope:[main] from main call divFACby10 param-assignment to:main::@4 main::@4: scope:[main] from main::@3 - (byte*) setMEMtoFAC::mem#0 ← (byte[]) f_127#1 + (byte*) setMEMtoFAC::mem#0 ← (byte[]) main::f_127#0 call setMEMtoFAC param-assignment to:main::@5 main::@5: scope:[main] from main::@4 (byte) main::i#0 ← (byte/signed byte/word/signed word) 1 to:main::@1 main::@1: scope:[main] from main::@16 main::@5 - (byte*) line_cursor#13 ← phi( main::@16/(byte*) line_cursor#10 main::@5/(byte*) line_cursor#28 ) - (byte[]) hextab#10 ← phi( main::@16/(byte[]) hextab#10 main::@5/(byte[]) hextab#16 ) - (byte*) char_cursor#32 ← phi( main::@16/(byte*) char_cursor#12 main::@5/(byte*) char_cursor#46 ) - (byte[]) f_127#10 ← phi( main::@16/(byte[]) f_127#10 main::@5/(byte[]) f_127#1 ) - (byte[]) f_i#1 ← phi( main::@16/(byte[]) f_i#1 main::@5/(byte[]) f_i#10 ) - (byte*) f_2pi#1 ← phi( main::@16/(byte*) f_2pi#1 main::@5/(byte*) f_2pi#4 ) + (byte*) line_cursor#13 ← phi( main::@16/(byte*) line_cursor#10 main::@5/(byte*) line_cursor#26 ) + (byte*) char_cursor#32 ← phi( main::@16/(byte*) char_cursor#12 main::@5/(byte*) char_cursor#44 ) + (byte[]) main::f_127#10 ← phi( main::@16/(byte[]) main::f_127#10 main::@5/(byte[]) main::f_127#0 ) + (byte[]) main::f_i#1 ← phi( main::@16/(byte[]) main::f_i#1 main::@5/(byte[]) main::f_i#0 ) (byte) main::i#10 ← phi( main::@16/(byte) main::i#1 main::@5/(byte) main::i#0 ) (word~) main::$3 ← ((word)) (byte) main::i#10 (word) setFAC::w#1 ← (word~) main::$3 call setFAC param-assignment to:main::@6 main::@6: scope:[main] from main::@1 - (byte*) mulFACbyMEM::mem#0 ← (byte*) f_2pi#1 + (byte*) mulFACbyMEM::mem#0 ← (byte*) main::f_2pi#0 call mulFACbyMEM param-assignment to:main::@7 main::@7: scope:[main] from main::@6 - (byte*) setMEMtoFAC::mem#1 ← (byte[]) f_i#1 + (byte*) setMEMtoFAC::mem#1 ← (byte[]) main::f_i#1 call setMEMtoFAC param-assignment to:main::@8 main::@8: scope:[main] from main::@7 @@ -3008,18 +2811,18 @@ main::@8: scope:[main] from main::@7 call setFAC param-assignment to:main::@9 main::@9: scope:[main] from main::@8 - (byte*) divMEMbyFAC::mem#0 ← (byte[]) f_i#1 + (byte*) divMEMbyFAC::mem#0 ← (byte[]) main::f_i#1 call divMEMbyFAC param-assignment to:main::@10 main::@10: scope:[main] from main::@9 call sinFAC param-assignment to:main::@11 main::@11: scope:[main] from main::@10 - (byte*) mulFACbyMEM::mem#1 ← (byte[]) f_127#10 + (byte*) mulFACbyMEM::mem#1 ← (byte[]) main::f_127#10 call mulFACbyMEM param-assignment to:main::@12 main::@12: scope:[main] from main::@11 - (byte*) addMEMtoFAC::mem#0 ← (byte[]) f_127#10 + (byte*) addMEMtoFAC::mem#0 ← (byte[]) main::f_127#10 call addMEMtoFAC param-assignment to:main::@13 main::@13: scope:[main] from main::@12 @@ -3045,8 +2848,8 @@ main::@16: scope:[main] from main::@15 main::@return: scope:[main] from main::@16 return to:@return -@33: scope:[] from @32 - (byte*) char_cursor#0 ← phi( @32/(byte*) line_cursor#16 ) +@33: scope:[] from @5 + (byte*) char_cursor#0 ← phi( @5/(byte*) line_cursor#16 ) call main param-assignment to:@34 @34: scope:[] from @33 @@ -3060,13 +2863,11 @@ Not aliassing across scopes: char_cursor#29 char_cursor#11 Not aliassing across scopes: char_cursor#16 print_ln::$0 Not aliassing across scopes: print_word::w#1 print_word::w#0 Not aliassing across scopes: char_cursor#30 char_cursor#32 -Not aliassing across scopes: hextab#3 hextab#10 Not aliassing across scopes: print_byte::b#0 print_word::$0 Not aliassing across scopes: char_cursor#17 char_cursor#21 Not aliassing across scopes: print_byte::b#1 print_word::$2 Not aliassing across scopes: char_cursor#18 char_cursor#21 Not aliassing across scopes: print_byte::b#2 print_byte::b#0 -Not aliassing across scopes: hextab#1 hextab#3 Not aliassing across scopes: char_cursor#31 char_cursor#30 Not aliassing across scopes: print_char::ch#0 print_byte::$1 Not aliassing across scopes: char_cursor#20 char_cursor#10 @@ -3085,23 +2886,17 @@ Not aliassing across scopes: divMEMbyFAC::mem#1 divMEMbyFAC::mem#0 Not aliassing across scopes: prepareMEM::mem#3 divMEMbyFAC::mem#1 Not aliassing across scopes: mulFACbyMEM::mem#2 mulFACbyMEM::mem#1 Not aliassing across scopes: prepareMEM::mem#4 mulFACbyMEM::mem#2 -Not aliassing across scopes: f_127#1 f_127#0 -Not aliassing across scopes: f_2pi#4 f_2pi#0 -Not aliassing across scopes: f_i#10 f_i#0 -Not aliassing across scopes: char_cursor#46 char_cursor#0 -Not aliassing across scopes: hextab#16 hextab#0 -Not aliassing across scopes: line_cursor#28 char_cursor#0 -Not aliassing across scopes: setMEMtoFAC::mem#0 f_127#1 -Not aliassing identity: f_2pi#1 f_2pi#1 -Not aliassing identity: f_i#1 f_i#1 -Not aliassing identity: f_127#10 f_127#10 -Not aliassing identity: hextab#10 hextab#10 +Not aliassing across scopes: char_cursor#44 char_cursor#0 +Not aliassing across scopes: line_cursor#26 char_cursor#0 +Not aliassing across scopes: setMEMtoFAC::mem#0 main::f_127#0 +Not aliassing identity: main::f_i#1 main::f_i#1 +Not aliassing identity: main::f_127#10 main::f_127#10 Not aliassing across scopes: setFAC::w#1 main::$3 -Not aliassing across scopes: mulFACbyMEM::mem#0 f_2pi#1 -Not aliassing across scopes: setMEMtoFAC::mem#1 f_i#1 -Not aliassing across scopes: divMEMbyFAC::mem#0 f_i#1 -Not aliassing across scopes: mulFACbyMEM::mem#1 f_127#10 -Not aliassing across scopes: addMEMtoFAC::mem#0 f_127#10 +Not aliassing across scopes: mulFACbyMEM::mem#0 main::f_2pi#0 +Not aliassing across scopes: setMEMtoFAC::mem#1 main::f_i#1 +Not aliassing across scopes: divMEMbyFAC::mem#0 main::f_i#1 +Not aliassing across scopes: mulFACbyMEM::mem#1 main::f_127#10 +Not aliassing across scopes: addMEMtoFAC::mem#0 main::f_127#10 Not aliassing across scopes: getFAC::return#2 getFAC::return#0 Not aliassing across scopes: main::$12 getFAC::return#2 Not aliassing across scopes: print_word::w#0 main::$12 @@ -3110,13 +2905,13 @@ Not aliassing across scopes: line_cursor#10 char_cursor#16 Not aliassing across scopes: char_cursor#12 char_cursor#16 Not aliassing across scopes: char_cursor#14 char_cursor#12 Not aliassing across scopes: line_cursor#11 line_cursor#10 -Alias (byte*) char_cursor#0 = (byte*) line_cursor#0 (byte*) line_cursor#19 (byte*) line_cursor#17 (byte*) line_cursor#16 +Alias (byte*) char_cursor#0 = (byte*) line_cursor#0 (byte*) line_cursor#16 Alias (byte*) char_cursor#1 = (byte*) char_cursor#16 Succesful SSA optimization Pass2AliasElimination CONTROL FLOW GRAPH @begin: scope:[] from (byte*) char_cursor#0 ← ((byte*)) (word/signed word) 1024 - to:@3 + to:@5 print_ln: scope:[print_ln] from main::@15 (byte*) char_cursor#29 ← phi( main::@15/(byte*) char_cursor#11 ) (byte*) line_cursor#12 ← phi( main::@15/(byte*) line_cursor#13 ) @@ -3135,7 +2930,6 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 return to:@return print_word: scope:[print_word] from main::@14 - (byte[]) hextab#3 ← phi( main::@14/(byte[]) hextab#10 ) (byte*) char_cursor#30 ← phi( main::@14/(byte*) char_cursor#32 ) (word) print_word::w#1 ← phi( main::@14/(word) print_word::w#0 ) (byte~) print_word::$0 ← > (word) print_word::w#1 @@ -3154,22 +2948,19 @@ print_word::@2: scope:[print_word] from print_word::@1 print_word::@return: scope:[print_word] from print_word::@2 return to:@return -@3: scope:[] from @begin - (byte[]) hextab#0 ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } - to:@5 print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#30 print_word::@1/(byte*) char_cursor#17 ) - (byte[]) hextab#1 ← phi( print_word/(byte[]) hextab#3 print_word::@1/(byte[]) hextab#3 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) + (byte[]) print_byte::hextab#0 ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word) 4 - (byte~) print_byte::$1 ← (byte[]) hextab#1 *idx (byte~) print_byte::$0 + (byte~) print_byte::$1 ← (byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$0 (byte) print_char::ch#0 ← (byte~) print_byte::$1 call print_char param-assignment to:print_byte::@1 print_byte::@1: scope:[print_byte] from print_byte (byte*) char_cursor#20 ← phi( print_byte/(byte*) char_cursor#10 ) (byte~) print_byte::$3 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word) 15 - (byte~) print_byte::$4 ← (byte[]) hextab#1 *idx (byte~) print_byte::$3 + (byte~) print_byte::$4 ← (byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$3 (byte) print_char::ch#1 ← (byte~) print_byte::$4 call print_char param-assignment to:print_byte::@2 @@ -3188,10 +2979,10 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char return to:@return -@5: scope:[] from @3 +@5: scope:[] from @begin (byte*) memLo#0 ← ((byte*)) (byte/word/signed word) 254 (byte*) memHi#0 ← ((byte*)) (byte/word/signed word) 255 - to:@32 + to:@33 prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#2 divMEMbyFAC/(byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 @@ -3279,18 +3070,12 @@ divFACby10: scope:[divFACby10] from main::@3 divFACby10::@return: scope:[divFACby10] from divFACby10 return to:@return -@32: scope:[] from @5 - (byte[]) f_i#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } - (byte[]) f_127#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } - (byte*) f_2pi#0 ← ((byte*)) (word) 58085 - to:@33 main: scope:[main] from @33 - (byte*) line_cursor#28 ← phi( @33/(byte*) char_cursor#0 ) - (byte[]) hextab#16 ← phi( @33/(byte[]) hextab#0 ) - (byte*) char_cursor#46 ← phi( @33/(byte*) char_cursor#0 ) - (byte[]) f_i#10 ← phi( @33/(byte[]) f_i#0 ) - (byte*) f_2pi#4 ← phi( @33/(byte*) f_2pi#0 ) - (byte[]) f_127#1 ← phi( @33/(byte[]) f_127#0 ) + (byte*) line_cursor#26 ← phi( @33/(byte*) char_cursor#0 ) + (byte*) char_cursor#44 ← phi( @33/(byte*) char_cursor#0 ) + (byte[]) main::f_i#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } + (byte[]) main::f_127#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } + (byte*) main::f_2pi#0 ← ((byte*)) (word) 58085 (word) setFAC::w#0 ← (word/signed word) 1275 call setFAC param-assignment to:main::@3 @@ -3298,30 +3083,28 @@ main::@3: scope:[main] from main call divFACby10 param-assignment to:main::@4 main::@4: scope:[main] from main::@3 - (byte*) setMEMtoFAC::mem#0 ← (byte[]) f_127#1 + (byte*) setMEMtoFAC::mem#0 ← (byte[]) main::f_127#0 call setMEMtoFAC param-assignment to:main::@5 main::@5: scope:[main] from main::@4 (byte) main::i#0 ← (byte/signed byte/word/signed word) 1 to:main::@1 main::@1: scope:[main] from main::@16 main::@5 - (byte*) line_cursor#13 ← phi( main::@16/(byte*) line_cursor#10 main::@5/(byte*) line_cursor#28 ) - (byte[]) hextab#10 ← phi( main::@16/(byte[]) hextab#10 main::@5/(byte[]) hextab#16 ) - (byte*) char_cursor#32 ← phi( main::@16/(byte*) char_cursor#12 main::@5/(byte*) char_cursor#46 ) - (byte[]) f_127#10 ← phi( main::@16/(byte[]) f_127#10 main::@5/(byte[]) f_127#1 ) - (byte[]) f_i#1 ← phi( main::@16/(byte[]) f_i#1 main::@5/(byte[]) f_i#10 ) - (byte*) f_2pi#1 ← phi( main::@16/(byte*) f_2pi#1 main::@5/(byte*) f_2pi#4 ) + (byte*) line_cursor#13 ← phi( main::@16/(byte*) line_cursor#10 main::@5/(byte*) line_cursor#26 ) + (byte*) char_cursor#32 ← phi( main::@16/(byte*) char_cursor#12 main::@5/(byte*) char_cursor#44 ) + (byte[]) main::f_127#10 ← phi( main::@16/(byte[]) main::f_127#10 main::@5/(byte[]) main::f_127#0 ) + (byte[]) main::f_i#1 ← phi( main::@16/(byte[]) main::f_i#1 main::@5/(byte[]) main::f_i#0 ) (byte) main::i#10 ← phi( main::@16/(byte) main::i#1 main::@5/(byte) main::i#0 ) (word~) main::$3 ← ((word)) (byte) main::i#10 (word) setFAC::w#1 ← (word~) main::$3 call setFAC param-assignment to:main::@6 main::@6: scope:[main] from main::@1 - (byte*) mulFACbyMEM::mem#0 ← (byte*) f_2pi#1 + (byte*) mulFACbyMEM::mem#0 ← (byte*) main::f_2pi#0 call mulFACbyMEM param-assignment to:main::@7 main::@7: scope:[main] from main::@6 - (byte*) setMEMtoFAC::mem#1 ← (byte[]) f_i#1 + (byte*) setMEMtoFAC::mem#1 ← (byte[]) main::f_i#1 call setMEMtoFAC param-assignment to:main::@8 main::@8: scope:[main] from main::@7 @@ -3329,18 +3112,18 @@ main::@8: scope:[main] from main::@7 call setFAC param-assignment to:main::@9 main::@9: scope:[main] from main::@8 - (byte*) divMEMbyFAC::mem#0 ← (byte[]) f_i#1 + (byte*) divMEMbyFAC::mem#0 ← (byte[]) main::f_i#1 call divMEMbyFAC param-assignment to:main::@10 main::@10: scope:[main] from main::@9 call sinFAC param-assignment to:main::@11 main::@11: scope:[main] from main::@10 - (byte*) mulFACbyMEM::mem#1 ← (byte[]) f_127#10 + (byte*) mulFACbyMEM::mem#1 ← (byte[]) main::f_127#10 call mulFACbyMEM param-assignment to:main::@12 main::@12: scope:[main] from main::@11 - (byte*) addMEMtoFAC::mem#0 ← (byte[]) f_127#10 + (byte*) addMEMtoFAC::mem#0 ← (byte[]) main::f_127#10 call addMEMtoFAC param-assignment to:main::@13 main::@13: scope:[main] from main::@12 @@ -3366,7 +3149,7 @@ main::@16: scope:[main] from main::@15 main::@return: scope:[main] from main::@16 return to:@return -@33: scope:[] from @32 +@33: scope:[] from @5 call main param-assignment to:@34 @34: scope:[] from @33 @@ -3380,13 +3163,11 @@ Not aliassing across scopes: char_cursor#29 char_cursor#11 Not aliassing across scopes: char_cursor#1 print_ln::$0 Not aliassing across scopes: print_word::w#1 print_word::w#0 Not aliassing across scopes: char_cursor#30 char_cursor#32 -Not aliassing across scopes: hextab#3 hextab#10 Not aliassing across scopes: print_byte::b#0 print_word::$0 Not aliassing across scopes: char_cursor#17 char_cursor#21 Not aliassing across scopes: print_byte::b#1 print_word::$2 Not aliassing across scopes: char_cursor#18 char_cursor#21 Not aliassing across scopes: print_byte::b#2 print_byte::b#0 -Not aliassing across scopes: hextab#1 hextab#3 Not aliassing across scopes: char_cursor#31 char_cursor#30 Not aliassing across scopes: print_char::ch#0 print_byte::$1 Not aliassing across scopes: char_cursor#20 char_cursor#10 @@ -3405,23 +3186,17 @@ Not aliassing across scopes: divMEMbyFAC::mem#1 divMEMbyFAC::mem#0 Not aliassing across scopes: prepareMEM::mem#3 divMEMbyFAC::mem#1 Not aliassing across scopes: mulFACbyMEM::mem#2 mulFACbyMEM::mem#1 Not aliassing across scopes: prepareMEM::mem#4 mulFACbyMEM::mem#2 -Not aliassing across scopes: f_127#1 f_127#0 -Not aliassing across scopes: f_2pi#4 f_2pi#0 -Not aliassing across scopes: f_i#10 f_i#0 -Not aliassing across scopes: char_cursor#46 char_cursor#0 -Not aliassing across scopes: hextab#16 hextab#0 -Not aliassing across scopes: line_cursor#28 char_cursor#0 -Not aliassing across scopes: setMEMtoFAC::mem#0 f_127#1 -Not aliassing identity: f_2pi#1 f_2pi#1 -Not aliassing identity: f_i#1 f_i#1 -Not aliassing identity: f_127#10 f_127#10 -Not aliassing identity: hextab#10 hextab#10 +Not aliassing across scopes: char_cursor#44 char_cursor#0 +Not aliassing across scopes: line_cursor#26 char_cursor#0 +Not aliassing across scopes: setMEMtoFAC::mem#0 main::f_127#0 +Not aliassing identity: main::f_i#1 main::f_i#1 +Not aliassing identity: main::f_127#10 main::f_127#10 Not aliassing across scopes: setFAC::w#1 main::$3 -Not aliassing across scopes: mulFACbyMEM::mem#0 f_2pi#1 -Not aliassing across scopes: setMEMtoFAC::mem#1 f_i#1 -Not aliassing across scopes: divMEMbyFAC::mem#0 f_i#1 -Not aliassing across scopes: mulFACbyMEM::mem#1 f_127#10 -Not aliassing across scopes: addMEMtoFAC::mem#0 f_127#10 +Not aliassing across scopes: mulFACbyMEM::mem#0 main::f_2pi#0 +Not aliassing across scopes: setMEMtoFAC::mem#1 main::f_i#1 +Not aliassing across scopes: divMEMbyFAC::mem#0 main::f_i#1 +Not aliassing across scopes: mulFACbyMEM::mem#1 main::f_127#10 +Not aliassing across scopes: addMEMtoFAC::mem#0 main::f_127#10 Not aliassing across scopes: getFAC::return#2 getFAC::return#0 Not aliassing across scopes: main::$12 getFAC::return#2 Not aliassing across scopes: print_word::w#0 main::$12 @@ -3431,15 +3206,13 @@ Not aliassing across scopes: char_cursor#12 char_cursor#1 Not aliassing across scopes: char_cursor#14 char_cursor#12 Not aliassing across scopes: line_cursor#11 line_cursor#10 Self Phi Eliminated (byte*) char_cursor#15 -Self Phi Eliminated (byte*) f_2pi#1 -Self Phi Eliminated (byte[]) f_i#1 -Self Phi Eliminated (byte[]) f_127#10 -Self Phi Eliminated (byte[]) hextab#10 +Self Phi Eliminated (byte[]) main::f_i#1 +Self Phi Eliminated (byte[]) main::f_127#10 Succesful SSA optimization Pass2SelfPhiElimination CONTROL FLOW GRAPH @begin: scope:[] from (byte*) char_cursor#0 ← ((byte*)) (word/signed word) 1024 - to:@3 + to:@5 print_ln: scope:[print_ln] from main::@15 (byte*) char_cursor#29 ← phi( main::@15/(byte*) char_cursor#11 ) (byte*) line_cursor#12 ← phi( main::@15/(byte*) line_cursor#13 ) @@ -3458,7 +3231,6 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 return to:@return print_word: scope:[print_word] from main::@14 - (byte[]) hextab#3 ← phi( main::@14/(byte[]) hextab#10 ) (byte*) char_cursor#30 ← phi( main::@14/(byte*) char_cursor#32 ) (word) print_word::w#1 ← phi( main::@14/(word) print_word::w#0 ) (byte~) print_word::$0 ← > (word) print_word::w#1 @@ -3477,22 +3249,19 @@ print_word::@2: scope:[print_word] from print_word::@1 print_word::@return: scope:[print_word] from print_word::@2 return to:@return -@3: scope:[] from @begin - (byte[]) hextab#0 ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } - to:@5 print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#30 print_word::@1/(byte*) char_cursor#17 ) - (byte[]) hextab#1 ← phi( print_word/(byte[]) hextab#3 print_word::@1/(byte[]) hextab#3 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) + (byte[]) print_byte::hextab#0 ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word) 4 - (byte~) print_byte::$1 ← (byte[]) hextab#1 *idx (byte~) print_byte::$0 + (byte~) print_byte::$1 ← (byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$0 (byte) print_char::ch#0 ← (byte~) print_byte::$1 call print_char param-assignment to:print_byte::@1 print_byte::@1: scope:[print_byte] from print_byte (byte*) char_cursor#20 ← phi( print_byte/(byte*) char_cursor#10 ) (byte~) print_byte::$3 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word) 15 - (byte~) print_byte::$4 ← (byte[]) hextab#1 *idx (byte~) print_byte::$3 + (byte~) print_byte::$4 ← (byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$3 (byte) print_char::ch#1 ← (byte~) print_byte::$4 call print_char param-assignment to:print_byte::@2 @@ -3511,10 +3280,10 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char return to:@return -@5: scope:[] from @3 +@5: scope:[] from @begin (byte*) memLo#0 ← ((byte*)) (byte/word/signed word) 254 (byte*) memHi#0 ← ((byte*)) (byte/word/signed word) 255 - to:@32 + to:@33 prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#2 divMEMbyFAC/(byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 @@ -3602,18 +3371,12 @@ divFACby10: scope:[divFACby10] from main::@3 divFACby10::@return: scope:[divFACby10] from divFACby10 return to:@return -@32: scope:[] from @5 - (byte[]) f_i#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } - (byte[]) f_127#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } - (byte*) f_2pi#0 ← ((byte*)) (word) 58085 - to:@33 main: scope:[main] from @33 - (byte*) line_cursor#28 ← phi( @33/(byte*) char_cursor#0 ) - (byte[]) hextab#16 ← phi( @33/(byte[]) hextab#0 ) - (byte*) char_cursor#46 ← phi( @33/(byte*) char_cursor#0 ) - (byte[]) f_i#10 ← phi( @33/(byte[]) f_i#0 ) - (byte*) f_2pi#4 ← phi( @33/(byte*) f_2pi#0 ) - (byte[]) f_127#1 ← phi( @33/(byte[]) f_127#0 ) + (byte*) line_cursor#26 ← phi( @33/(byte*) char_cursor#0 ) + (byte*) char_cursor#44 ← phi( @33/(byte*) char_cursor#0 ) + (byte[]) main::f_i#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } + (byte[]) main::f_127#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } + (byte*) main::f_2pi#0 ← ((byte*)) (word) 58085 (word) setFAC::w#0 ← (word/signed word) 1275 call setFAC param-assignment to:main::@3 @@ -3621,30 +3384,28 @@ main::@3: scope:[main] from main call divFACby10 param-assignment to:main::@4 main::@4: scope:[main] from main::@3 - (byte*) setMEMtoFAC::mem#0 ← (byte[]) f_127#1 + (byte*) setMEMtoFAC::mem#0 ← (byte[]) main::f_127#0 call setMEMtoFAC param-assignment to:main::@5 main::@5: scope:[main] from main::@4 (byte) main::i#0 ← (byte/signed byte/word/signed word) 1 to:main::@1 main::@1: scope:[main] from main::@16 main::@5 - (byte*) line_cursor#13 ← phi( main::@16/(byte*) line_cursor#10 main::@5/(byte*) line_cursor#28 ) - (byte[]) hextab#10 ← phi( main::@5/(byte[]) hextab#16 ) - (byte*) char_cursor#32 ← phi( main::@16/(byte*) char_cursor#12 main::@5/(byte*) char_cursor#46 ) - (byte[]) f_127#10 ← phi( main::@5/(byte[]) f_127#1 ) - (byte[]) f_i#1 ← phi( main::@5/(byte[]) f_i#10 ) - (byte*) f_2pi#1 ← phi( main::@5/(byte*) f_2pi#4 ) + (byte*) line_cursor#13 ← phi( main::@16/(byte*) line_cursor#10 main::@5/(byte*) line_cursor#26 ) + (byte*) char_cursor#32 ← phi( main::@16/(byte*) char_cursor#12 main::@5/(byte*) char_cursor#44 ) + (byte[]) main::f_127#10 ← phi( main::@5/(byte[]) main::f_127#0 ) + (byte[]) main::f_i#1 ← phi( main::@5/(byte[]) main::f_i#0 ) (byte) main::i#10 ← phi( main::@16/(byte) main::i#1 main::@5/(byte) main::i#0 ) (word~) main::$3 ← ((word)) (byte) main::i#10 (word) setFAC::w#1 ← (word~) main::$3 call setFAC param-assignment to:main::@6 main::@6: scope:[main] from main::@1 - (byte*) mulFACbyMEM::mem#0 ← (byte*) f_2pi#1 + (byte*) mulFACbyMEM::mem#0 ← (byte*) main::f_2pi#0 call mulFACbyMEM param-assignment to:main::@7 main::@7: scope:[main] from main::@6 - (byte*) setMEMtoFAC::mem#1 ← (byte[]) f_i#1 + (byte*) setMEMtoFAC::mem#1 ← (byte[]) main::f_i#1 call setMEMtoFAC param-assignment to:main::@8 main::@8: scope:[main] from main::@7 @@ -3652,18 +3413,18 @@ main::@8: scope:[main] from main::@7 call setFAC param-assignment to:main::@9 main::@9: scope:[main] from main::@8 - (byte*) divMEMbyFAC::mem#0 ← (byte[]) f_i#1 + (byte*) divMEMbyFAC::mem#0 ← (byte[]) main::f_i#1 call divMEMbyFAC param-assignment to:main::@10 main::@10: scope:[main] from main::@9 call sinFAC param-assignment to:main::@11 main::@11: scope:[main] from main::@10 - (byte*) mulFACbyMEM::mem#1 ← (byte[]) f_127#10 + (byte*) mulFACbyMEM::mem#1 ← (byte[]) main::f_127#10 call mulFACbyMEM param-assignment to:main::@12 main::@12: scope:[main] from main::@11 - (byte*) addMEMtoFAC::mem#0 ← (byte[]) f_127#10 + (byte*) addMEMtoFAC::mem#0 ← (byte[]) main::f_127#10 call addMEMtoFAC param-assignment to:main::@13 main::@13: scope:[main] from main::@12 @@ -3689,7 +3450,7 @@ main::@16: scope:[main] from main::@15 main::@return: scope:[main] from main::@16 return to:@return -@33: scope:[] from @32 +@33: scope:[] from @5 call main param-assignment to:@34 @34: scope:[] from @33 @@ -3703,24 +3464,16 @@ Redundant Phi (byte*) char_cursor#29 (byte*) char_cursor#11 Redundant Phi (byte*) char_cursor#15 (byte*) char_cursor#29 Redundant Phi (word) print_word::w#1 (word) print_word::w#0 Redundant Phi (byte*) char_cursor#30 (byte*) char_cursor#32 -Redundant Phi (byte[]) hextab#3 (byte[]) hextab#10 Redundant Phi (byte*) char_cursor#17 (byte*) char_cursor#21 Redundant Phi (byte*) char_cursor#18 (byte*) char_cursor#21 -Redundant Phi (byte[]) hextab#1 (byte[]) hextab#3 Redundant Phi (byte*) char_cursor#20 (byte*) char_cursor#10 Redundant Phi (byte*) char_cursor#21 (byte*) char_cursor#10 Redundant Phi (byte*) addMEMtoFAC::mem#1 (byte*) addMEMtoFAC::mem#0 Redundant Phi (byte*) divMEMbyFAC::mem#1 (byte*) divMEMbyFAC::mem#0 -Redundant Phi (byte[]) f_127#1 (byte[]) f_127#0 -Redundant Phi (byte*) f_2pi#4 (byte*) f_2pi#0 -Redundant Phi (byte[]) f_i#10 (byte[]) f_i#0 -Redundant Phi (byte*) char_cursor#46 (byte*) char_cursor#0 -Redundant Phi (byte[]) hextab#16 (byte[]) hextab#0 -Redundant Phi (byte*) line_cursor#28 (byte*) char_cursor#0 -Redundant Phi (byte*) f_2pi#1 (byte*) f_2pi#4 -Redundant Phi (byte[]) f_i#1 (byte[]) f_i#10 -Redundant Phi (byte[]) f_127#10 (byte[]) f_127#1 -Redundant Phi (byte[]) hextab#10 (byte[]) hextab#16 +Redundant Phi (byte*) char_cursor#44 (byte*) char_cursor#0 +Redundant Phi (byte*) line_cursor#26 (byte*) char_cursor#0 +Redundant Phi (byte[]) main::f_i#1 (byte[]) main::f_i#0 +Redundant Phi (byte[]) main::f_127#10 (byte[]) main::f_127#0 Redundant Phi (byte*) char_cursor#11 (byte*) char_cursor#18 Redundant Phi (byte*) line_cursor#10 (byte*) char_cursor#1 Redundant Phi (byte*) char_cursor#12 (byte*) char_cursor#1 @@ -3730,7 +3483,7 @@ Succesful SSA optimization Pass2RedundantPhiElimination CONTROL FLOW GRAPH @begin: scope:[] from (byte*) char_cursor#0 ← ((byte*)) (word/signed word) 1024 - to:@3 + to:@5 print_ln: scope:[print_ln] from main::@15 to:print_ln::@1 print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 @@ -3760,20 +3513,18 @@ print_word::@2: scope:[print_word] from print_word::@1 print_word::@return: scope:[print_word] from print_word::@2 return to:@return -@3: scope:[] from @begin - (byte[]) hextab#0 ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } - to:@5 print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#32 print_word::@1/(byte*) char_cursor#10 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) + (byte[]) print_byte::hextab#0 ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word) 4 - (byte~) print_byte::$1 ← (byte[]) hextab#0 *idx (byte~) print_byte::$0 + (byte~) print_byte::$1 ← (byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$0 (byte) print_char::ch#0 ← (byte~) print_byte::$1 call print_char param-assignment to:print_byte::@1 print_byte::@1: scope:[print_byte] from print_byte (byte~) print_byte::$3 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word) 15 - (byte~) print_byte::$4 ← (byte[]) hextab#0 *idx (byte~) print_byte::$3 + (byte~) print_byte::$4 ← (byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$3 (byte) print_char::ch#1 ← (byte~) print_byte::$4 call print_char param-assignment to:print_byte::@2 @@ -3791,10 +3542,10 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char return to:@return -@5: scope:[] from @3 +@5: scope:[] from @begin (byte*) memLo#0 ← ((byte*)) (byte/word/signed word) 254 (byte*) memHi#0 ← ((byte*)) (byte/word/signed word) 255 - to:@32 + to:@33 prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#2 divMEMbyFAC/(byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 @@ -3880,12 +3631,10 @@ divFACby10: scope:[divFACby10] from main::@3 divFACby10::@return: scope:[divFACby10] from divFACby10 return to:@return -@32: scope:[] from @5 - (byte[]) f_i#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } - (byte[]) f_127#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } - (byte*) f_2pi#0 ← ((byte*)) (word) 58085 - to:@33 main: scope:[main] from @33 + (byte[]) main::f_i#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } + (byte[]) main::f_127#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } + (byte*) main::f_2pi#0 ← ((byte*)) (word) 58085 (word) setFAC::w#0 ← (word/signed word) 1275 call setFAC param-assignment to:main::@3 @@ -3893,7 +3642,7 @@ main::@3: scope:[main] from main call divFACby10 param-assignment to:main::@4 main::@4: scope:[main] from main::@3 - (byte*) setMEMtoFAC::mem#0 ← (byte[]) f_127#0 + (byte*) setMEMtoFAC::mem#0 ← (byte[]) main::f_127#0 call setMEMtoFAC param-assignment to:main::@5 main::@5: scope:[main] from main::@4 @@ -3908,11 +3657,11 @@ main::@1: scope:[main] from main::@16 main::@5 call setFAC param-assignment to:main::@6 main::@6: scope:[main] from main::@1 - (byte*) mulFACbyMEM::mem#0 ← (byte*) f_2pi#0 + (byte*) mulFACbyMEM::mem#0 ← (byte*) main::f_2pi#0 call mulFACbyMEM param-assignment to:main::@7 main::@7: scope:[main] from main::@6 - (byte*) setMEMtoFAC::mem#1 ← (byte[]) f_i#0 + (byte*) setMEMtoFAC::mem#1 ← (byte[]) main::f_i#0 call setMEMtoFAC param-assignment to:main::@8 main::@8: scope:[main] from main::@7 @@ -3920,18 +3669,18 @@ main::@8: scope:[main] from main::@7 call setFAC param-assignment to:main::@9 main::@9: scope:[main] from main::@8 - (byte*) divMEMbyFAC::mem#0 ← (byte[]) f_i#0 + (byte*) divMEMbyFAC::mem#0 ← (byte[]) main::f_i#0 call divMEMbyFAC param-assignment to:main::@10 main::@10: scope:[main] from main::@9 call sinFAC param-assignment to:main::@11 main::@11: scope:[main] from main::@10 - (byte*) mulFACbyMEM::mem#1 ← (byte[]) f_127#0 + (byte*) mulFACbyMEM::mem#1 ← (byte[]) main::f_127#0 call mulFACbyMEM param-assignment to:main::@12 main::@12: scope:[main] from main::@11 - (byte*) addMEMtoFAC::mem#0 ← (byte[]) f_127#0 + (byte*) addMEMtoFAC::mem#0 ← (byte[]) main::f_127#0 call addMEMtoFAC param-assignment to:main::@13 main::@13: scope:[main] from main::@12 @@ -3954,7 +3703,7 @@ main::@16: scope:[main] from main::@15 main::@return: scope:[main] from main::@16 return to:@return -@33: scope:[] from @32 +@33: scope:[] from @5 call main param-assignment to:@34 @34: scope:[] from @33 @@ -3967,7 +3716,7 @@ Succesful SSA optimization Pass2ConditionalJumpSimplification CONTROL FLOW GRAPH @begin: scope:[] from (byte*) char_cursor#0 ← ((byte*)) (word/signed word) 1024 - to:@3 + to:@5 print_ln: scope:[print_ln] from main::@15 to:print_ln::@1 print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 @@ -3996,20 +3745,18 @@ print_word::@2: scope:[print_word] from print_word::@1 print_word::@return: scope:[print_word] from print_word::@2 return to:@return -@3: scope:[] from @begin - (byte[]) hextab#0 ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } - to:@5 print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#32 print_word::@1/(byte*) char_cursor#10 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) + (byte[]) print_byte::hextab#0 ← { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word) 4 - (byte~) print_byte::$1 ← (byte[]) hextab#0 *idx (byte~) print_byte::$0 + (byte~) print_byte::$1 ← (byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$0 (byte) print_char::ch#0 ← (byte~) print_byte::$1 call print_char param-assignment to:print_byte::@1 print_byte::@1: scope:[print_byte] from print_byte (byte~) print_byte::$3 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word) 15 - (byte~) print_byte::$4 ← (byte[]) hextab#0 *idx (byte~) print_byte::$3 + (byte~) print_byte::$4 ← (byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$3 (byte) print_char::ch#1 ← (byte~) print_byte::$4 call print_char param-assignment to:print_byte::@2 @@ -4027,10 +3774,10 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char return to:@return -@5: scope:[] from @3 +@5: scope:[] from @begin (byte*) memLo#0 ← ((byte*)) (byte/word/signed word) 254 (byte*) memHi#0 ← ((byte*)) (byte/word/signed word) 255 - to:@32 + to:@33 prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#2 divMEMbyFAC/(byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 @@ -4116,12 +3863,10 @@ divFACby10: scope:[divFACby10] from main::@3 divFACby10::@return: scope:[divFACby10] from divFACby10 return to:@return -@32: scope:[] from @5 - (byte[]) f_i#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } - (byte[]) f_127#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } - (byte*) f_2pi#0 ← ((byte*)) (word) 58085 - to:@33 main: scope:[main] from @33 + (byte[]) main::f_i#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } + (byte[]) main::f_127#0 ← { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } + (byte*) main::f_2pi#0 ← ((byte*)) (word) 58085 (word) setFAC::w#0 ← (word/signed word) 1275 call setFAC param-assignment to:main::@3 @@ -4129,7 +3874,7 @@ main::@3: scope:[main] from main call divFACby10 param-assignment to:main::@4 main::@4: scope:[main] from main::@3 - (byte*) setMEMtoFAC::mem#0 ← (byte[]) f_127#0 + (byte*) setMEMtoFAC::mem#0 ← (byte[]) main::f_127#0 call setMEMtoFAC param-assignment to:main::@5 main::@5: scope:[main] from main::@4 @@ -4144,11 +3889,11 @@ main::@1: scope:[main] from main::@16 main::@5 call setFAC param-assignment to:main::@6 main::@6: scope:[main] from main::@1 - (byte*) mulFACbyMEM::mem#0 ← (byte*) f_2pi#0 + (byte*) mulFACbyMEM::mem#0 ← (byte*) main::f_2pi#0 call mulFACbyMEM param-assignment to:main::@7 main::@7: scope:[main] from main::@6 - (byte*) setMEMtoFAC::mem#1 ← (byte[]) f_i#0 + (byte*) setMEMtoFAC::mem#1 ← (byte[]) main::f_i#0 call setMEMtoFAC param-assignment to:main::@8 main::@8: scope:[main] from main::@7 @@ -4156,18 +3901,18 @@ main::@8: scope:[main] from main::@7 call setFAC param-assignment to:main::@9 main::@9: scope:[main] from main::@8 - (byte*) divMEMbyFAC::mem#0 ← (byte[]) f_i#0 + (byte*) divMEMbyFAC::mem#0 ← (byte[]) main::f_i#0 call divMEMbyFAC param-assignment to:main::@10 main::@10: scope:[main] from main::@9 call sinFAC param-assignment to:main::@11 main::@11: scope:[main] from main::@10 - (byte*) mulFACbyMEM::mem#1 ← (byte[]) f_127#0 + (byte*) mulFACbyMEM::mem#1 ← (byte[]) main::f_127#0 call mulFACbyMEM param-assignment to:main::@12 main::@12: scope:[main] from main::@11 - (byte*) addMEMtoFAC::mem#0 ← (byte[]) f_127#0 + (byte*) addMEMtoFAC::mem#0 ← (byte[]) main::f_127#0 call addMEMtoFAC param-assignment to:main::@13 main::@13: scope:[main] from main::@12 @@ -4189,7 +3934,7 @@ main::@16: scope:[main] from main::@15 main::@return: scope:[main] from main::@16 return to:@return -@33: scope:[] from @32 +@33: scope:[] from @5 call main param-assignment to:@34 @34: scope:[] from @33 @@ -4197,20 +3942,20 @@ main::@return: scope:[main] from main::@16 @end: scope:[] from @34 Constant (const byte*) char_cursor#0 = ((byte*))1024 -Constant (const byte[]) hextab#0 = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' } +Constant (const byte[]) print_byte::hextab#0 = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' } Constant (const byte*) memLo#0 = ((byte*))254 Constant (const byte*) memHi#0 = ((byte*))255 Constant (const word) getFAC::w#0 = 0 -Constant (const byte[]) f_i#0 = { 0, 0, 0, 0, 0 } -Constant (const byte[]) f_127#0 = { 0, 0, 0, 0, 0 } -Constant (const byte*) f_2pi#0 = ((byte*))58085 +Constant (const byte[]) main::f_i#0 = { 0, 0, 0, 0, 0 } +Constant (const byte[]) main::f_127#0 = { 0, 0, 0, 0, 0 } +Constant (const byte*) main::f_2pi#0 = ((byte*))58085 Constant (const word) setFAC::w#0 = 1275 Constant (const byte) main::i#0 = 1 Constant (const word) setFAC::w#2 = 25 Succesful SSA optimization Pass2ConstantIdentification CONTROL FLOW GRAPH @begin: scope:[] from - to:@3 + to:@5 print_ln: scope:[print_ln] from main::@15 to:print_ln::@1 print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 @@ -4239,19 +3984,17 @@ print_word::@2: scope:[print_word] from print_word::@1 print_word::@return: scope:[print_word] from print_word::@2 return to:@return -@3: scope:[] from @begin - to:@5 print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#32 print_word::@1/(byte*) char_cursor#10 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word) 4 - (byte~) print_byte::$1 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$0 + (byte~) print_byte::$1 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$0 (byte) print_char::ch#0 ← (byte~) print_byte::$1 call print_char param-assignment to:print_byte::@1 print_byte::@1: scope:[print_byte] from print_byte (byte~) print_byte::$3 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word) 15 - (byte~) print_byte::$4 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$3 + (byte~) print_byte::$4 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$3 (byte) print_char::ch#1 ← (byte~) print_byte::$4 call print_char param-assignment to:print_byte::@2 @@ -4269,8 +4012,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char return to:@return -@5: scope:[] from @3 - to:@32 +@5: scope:[] from @begin + to:@33 prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#2 divMEMbyFAC/(byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 @@ -4355,8 +4098,6 @@ divFACby10: scope:[divFACby10] from main::@3 divFACby10::@return: scope:[divFACby10] from divFACby10 return to:@return -@32: scope:[] from @5 - to:@33 main: scope:[main] from @33 call setFAC param-assignment to:main::@3 @@ -4364,7 +4105,7 @@ main::@3: scope:[main] from main call divFACby10 param-assignment to:main::@4 main::@4: scope:[main] from main::@3 - (byte*) setMEMtoFAC::mem#0 ← (const byte[]) f_127#0 + (byte*) setMEMtoFAC::mem#0 ← (const byte[]) main::f_127#0 call setMEMtoFAC param-assignment to:main::@5 main::@5: scope:[main] from main::@4 @@ -4378,29 +4119,29 @@ main::@1: scope:[main] from main::@16 main::@5 call setFAC param-assignment to:main::@6 main::@6: scope:[main] from main::@1 - (byte*) mulFACbyMEM::mem#0 ← (const byte*) f_2pi#0 + (byte*) mulFACbyMEM::mem#0 ← (const byte*) main::f_2pi#0 call mulFACbyMEM param-assignment to:main::@7 main::@7: scope:[main] from main::@6 - (byte*) setMEMtoFAC::mem#1 ← (const byte[]) f_i#0 + (byte*) setMEMtoFAC::mem#1 ← (const byte[]) main::f_i#0 call setMEMtoFAC param-assignment to:main::@8 main::@8: scope:[main] from main::@7 call setFAC param-assignment to:main::@9 main::@9: scope:[main] from main::@8 - (byte*) divMEMbyFAC::mem#0 ← (const byte[]) f_i#0 + (byte*) divMEMbyFAC::mem#0 ← (const byte[]) main::f_i#0 call divMEMbyFAC param-assignment to:main::@10 main::@10: scope:[main] from main::@9 call sinFAC param-assignment to:main::@11 main::@11: scope:[main] from main::@10 - (byte*) mulFACbyMEM::mem#1 ← (const byte[]) f_127#0 + (byte*) mulFACbyMEM::mem#1 ← (const byte[]) main::f_127#0 call mulFACbyMEM param-assignment to:main::@12 main::@12: scope:[main] from main::@11 - (byte*) addMEMtoFAC::mem#0 ← (const byte[]) f_127#0 + (byte*) addMEMtoFAC::mem#0 ← (const byte[]) main::f_127#0 call addMEMtoFAC param-assignment to:main::@13 main::@13: scope:[main] from main::@12 @@ -4422,23 +4163,23 @@ main::@16: scope:[main] from main::@15 main::@return: scope:[main] from main::@16 return to:@return -@33: scope:[] from @32 +@33: scope:[] from @5 call main param-assignment to:@34 @34: scope:[] from @33 to:@end @end: scope:[] from @34 -Constant (const byte*) setMEMtoFAC::mem#0 = f_127#0 -Constant (const byte*) mulFACbyMEM::mem#0 = f_2pi#0 -Constant (const byte*) setMEMtoFAC::mem#1 = f_i#0 -Constant (const byte*) divMEMbyFAC::mem#0 = f_i#0 -Constant (const byte*) mulFACbyMEM::mem#1 = f_127#0 -Constant (const byte*) addMEMtoFAC::mem#0 = f_127#0 +Constant (const byte*) setMEMtoFAC::mem#0 = main::f_127#0 +Constant (const byte*) mulFACbyMEM::mem#0 = main::f_2pi#0 +Constant (const byte*) setMEMtoFAC::mem#1 = main::f_i#0 +Constant (const byte*) divMEMbyFAC::mem#0 = main::f_i#0 +Constant (const byte*) mulFACbyMEM::mem#1 = main::f_127#0 +Constant (const byte*) addMEMtoFAC::mem#0 = main::f_127#0 Succesful SSA optimization Pass2ConstantIdentification CONTROL FLOW GRAPH @begin: scope:[] from - to:@3 + to:@5 print_ln: scope:[print_ln] from main::@15 to:print_ln::@1 print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 @@ -4467,19 +4208,17 @@ print_word::@2: scope:[print_word] from print_word::@1 print_word::@return: scope:[print_word] from print_word::@2 return to:@return -@3: scope:[] from @begin - to:@5 print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#32 print_word::@1/(byte*) char_cursor#10 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word) 4 - (byte~) print_byte::$1 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$0 + (byte~) print_byte::$1 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$0 (byte) print_char::ch#0 ← (byte~) print_byte::$1 call print_char param-assignment to:print_byte::@1 print_byte::@1: scope:[print_byte] from print_byte (byte~) print_byte::$3 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word) 15 - (byte~) print_byte::$4 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$3 + (byte~) print_byte::$4 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$3 (byte) print_char::ch#1 ← (byte~) print_byte::$4 call print_char param-assignment to:print_byte::@2 @@ -4497,8 +4236,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char return to:@return -@5: scope:[] from @3 - to:@32 +@5: scope:[] from @begin + to:@33 prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#2 divMEMbyFAC/(byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 @@ -4583,8 +4322,6 @@ divFACby10: scope:[divFACby10] from main::@3 divFACby10::@return: scope:[divFACby10] from divFACby10 return to:@return -@32: scope:[] from @5 - to:@33 main: scope:[main] from @33 call setFAC param-assignment to:main::@3 @@ -4644,7 +4381,7 @@ main::@16: scope:[main] from main::@15 main::@return: scope:[main] from main::@16 return to:@return -@33: scope:[] from @32 +@33: scope:[] from @5 call main param-assignment to:@34 @34: scope:[] from @33 @@ -4656,7 +4393,7 @@ Constant (const byte*) prepareMEM::mem#3 = divMEMbyFAC::mem#0 Succesful SSA optimization Pass2ConstantIdentification CONTROL FLOW GRAPH @begin: scope:[] from - to:@3 + to:@5 print_ln: scope:[print_ln] from main::@15 to:print_ln::@1 print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 @@ -4685,19 +4422,17 @@ print_word::@2: scope:[print_word] from print_word::@1 print_word::@return: scope:[print_word] from print_word::@2 return to:@return -@3: scope:[] from @begin - to:@5 print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#32 print_word::@1/(byte*) char_cursor#10 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word) 4 - (byte~) print_byte::$1 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$0 + (byte~) print_byte::$1 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$0 (byte) print_char::ch#0 ← (byte~) print_byte::$1 call print_char param-assignment to:print_byte::@1 print_byte::@1: scope:[print_byte] from print_byte (byte~) print_byte::$3 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word) 15 - (byte~) print_byte::$4 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$3 + (byte~) print_byte::$4 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$3 (byte) print_char::ch#1 ← (byte~) print_byte::$4 call print_char param-assignment to:print_byte::@2 @@ -4715,8 +4450,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char return to:@return -@5: scope:[] from @3 - to:@32 +@5: scope:[] from @begin + to:@33 prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte*) prepareMEM::mem#2 divMEMbyFAC/(const byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 @@ -4799,8 +4534,6 @@ divFACby10: scope:[divFACby10] from main::@3 divFACby10::@return: scope:[divFACby10] from divFACby10 return to:@return -@32: scope:[] from @5 - to:@33 main: scope:[main] from @33 call setFAC param-assignment to:main::@3 @@ -4860,7 +4593,7 @@ main::@16: scope:[main] from main::@15 main::@return: scope:[main] from main::@16 return to:@return -@33: scope:[] from @32 +@33: scope:[] from @5 call main param-assignment to:@34 @34: scope:[] from @33 @@ -4869,10 +4602,8 @@ main::@return: scope:[main] from main::@16 Culled Empty Block (label) print_ln::@2 Culled Empty Block (label) print_word::@2 -Culled Empty Block (label) @3 Culled Empty Block (label) print_byte::@2 Culled Empty Block (label) @5 -Culled Empty Block (label) @32 Culled Empty Block (label) main::@5 Culled Empty Block (label) @34 Succesful SSA optimization Pass2CullEmptyBlocks @@ -4907,13 +4638,13 @@ print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#32 print_word::@1/(byte*) char_cursor#10 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word) 4 - (byte~) print_byte::$1 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$0 + (byte~) print_byte::$1 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$0 (byte) print_char::ch#0 ← (byte~) print_byte::$1 call print_char param-assignment to:print_byte::@1 print_byte::@1: scope:[print_byte] from print_byte (byte~) print_byte::$3 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word) 15 - (byte~) print_byte::$4 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$3 + (byte~) print_byte::$4 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$3 (byte) print_char::ch#1 ← (byte~) print_byte::$4 call print_char param-assignment to:print_byte::@return @@ -5137,17 +4868,17 @@ Inlining constant with var siblings (const byte*) char_cursor#0 Inlining constant with var siblings (const byte*) char_cursor#0 Inlining constant with var siblings (const byte*) char_cursor#0 Inlining constant with var siblings (const byte*) char_cursor#0 -Constant inlined addMEMtoFAC::mem#0 = (const byte[]) f_127#0 +Constant inlined addMEMtoFAC::mem#0 = (const byte[]) main::f_127#0 Constant inlined setFAC::w#2 = (byte/signed byte/word/signed word) 25 -Constant inlined prepareMEM::mem#2 = (const byte[]) f_127#0 -Constant inlined prepareMEM::mem#3 = (const byte[]) f_i#0 -Constant inlined divMEMbyFAC::mem#0 = (const byte[]) f_i#0 +Constant inlined prepareMEM::mem#2 = (const byte[]) main::f_127#0 +Constant inlined prepareMEM::mem#3 = (const byte[]) main::f_i#0 +Constant inlined divMEMbyFAC::mem#0 = (const byte[]) main::f_i#0 Constant inlined main::i#0 = (byte/signed byte/word/signed word) 1 -Constant inlined setMEMtoFAC::mem#1 = (const byte[]) f_i#0 -Constant inlined mulFACbyMEM::mem#0 = (const byte*) f_2pi#0 +Constant inlined setMEMtoFAC::mem#1 = (const byte[]) main::f_i#0 +Constant inlined mulFACbyMEM::mem#0 = (const byte*) main::f_2pi#0 Constant inlined char_cursor#0 = ((byte*))(word/signed word) 1024 -Constant inlined setMEMtoFAC::mem#0 = (const byte[]) f_127#0 -Constant inlined mulFACbyMEM::mem#1 = (const byte[]) f_127#0 +Constant inlined setMEMtoFAC::mem#0 = (const byte[]) main::f_127#0 +Constant inlined mulFACbyMEM::mem#1 = (const byte[]) main::f_127#0 Constant inlined getFAC::w#0 = (byte/signed byte/word/signed word) 0 Constant inlined setFAC::w#0 = (word/signed word) 1275 Succesful SSA optimization Pass2ConstantInlining @@ -5182,13 +4913,13 @@ print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#32 print_word::@1/(byte*) char_cursor#10 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word) 4 - (byte~) print_byte::$1 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$0 + (byte~) print_byte::$1 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$0 (byte) print_char::ch#0 ← (byte~) print_byte::$1 call print_char param-assignment to:print_byte::@1 print_byte::@1: scope:[print_byte] from print_byte (byte~) print_byte::$3 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word) 15 - (byte~) print_byte::$4 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$3 + (byte~) print_byte::$4 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$3 (byte) print_char::ch#1 ← (byte~) print_byte::$4 call print_char param-assignment to:print_byte::@return @@ -5205,7 +4936,7 @@ print_char::@return: scope:[print_char] from print_char return to:@return prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC - (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte[]) f_127#0 divMEMbyFAC/(const byte[]) f_i#0 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) + (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte[]) main::f_127#0 divMEMbyFAC/(const byte[]) main::f_i#0 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 @@ -5235,7 +4966,7 @@ getFAC::@return: scope:[getFAC] from getFAC return to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@4 main::@7 - (byte*) setMEMtoFAC::mem#2 ← phi( main::@4/(const byte[]) f_127#0 main::@7/(const byte[]) f_i#0 ) + (byte*) setMEMtoFAC::mem#2 ← phi( main::@4/(const byte[]) main::f_127#0 main::@7/(const byte[]) main::f_i#0 ) (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 call prepareMEM param-assignment to:setMEMtoFAC::@1 @@ -5264,7 +4995,7 @@ divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 return to:@return mulFACbyMEM: scope:[mulFACbyMEM] from main::@11 main::@6 - (byte*) mulFACbyMEM::mem#2 ← phi( main::@11/(const byte[]) f_127#0 main::@6/(const byte*) f_2pi#0 ) + (byte*) mulFACbyMEM::mem#2 ← phi( main::@11/(const byte[]) main::f_127#0 main::@6/(const byte*) main::f_2pi#0 ) (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 call prepareMEM param-assignment to:mulFACbyMEM::@1 @@ -5368,12 +5099,6 @@ FINAL SYMBOL TABLE (label) divMEMbyFAC::@1 (label) divMEMbyFAC::@return (byte*) divMEMbyFAC::mem -(byte[]) f_127 -(const byte[]) f_127#0 = { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } -(byte*) f_2pi -(const byte*) f_2pi#0 = ((byte*))(word) 58085 -(byte[]) f_i -(const byte[]) f_i#0 = { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (word()) getFAC() (label) getFAC::@return (word) getFAC::return @@ -5381,8 +5106,6 @@ FINAL SYMBOL TABLE (word) getFAC::return#2 (word) getFAC::w (word) getFAC::w#1 -(byte[]) hextab -(const byte[]) hextab#0 = { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } (byte*) line_cursor (byte*) line_cursor#13 (byte*) line_cursor#6 @@ -5404,6 +5127,12 @@ FINAL SYMBOL TABLE (label) main::@8 (label) main::@9 (label) main::@return +(byte[]) main::f_127 +(const byte[]) main::f_127#0 = { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } +(byte*) main::f_2pi +(const byte*) main::f_2pi#0 = ((byte*))(word) 58085 +(byte[]) main::f_i +(const byte[]) main::f_i#0 = { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (byte) main::i (byte) main::i#1 (byte) main::i#10 @@ -5436,6 +5165,8 @@ FINAL SYMBOL TABLE (byte) print_byte::b#0 (byte) print_byte::b#1 (byte) print_byte::b#2 +(byte[]) print_byte::hextab +(const byte[]) print_byte::hextab#0 = { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } (void()) print_char((byte) print_char::ch) (label) print_char::@return (byte) print_char::ch @@ -5489,8 +5220,8 @@ main::@4: scope:[main] from main::@3 call setMEMtoFAC param-assignment to:main::@1 main::@1: scope:[main] from main::@17 main::@4 - (byte*) line_cursor#13 ← phi( main::@17/(byte*~) char_cursor#51 main::@4/((byte*))(word/signed word) 1024 ) - (byte*) char_cursor#32 ← phi( main::@17/(byte*~) char_cursor#50 main::@4/((byte*))(word/signed word) 1024 ) + (byte*) line_cursor#13 ← phi( main::@17/(byte*~) char_cursor#49 main::@4/((byte*))(word/signed word) 1024 ) + (byte*) char_cursor#32 ← phi( main::@17/(byte*~) char_cursor#48 main::@4/((byte*))(word/signed word) 1024 ) (byte) main::i#10 ← phi( main::@17/(byte~) main::i#14 main::@4/(byte/signed byte/word/signed word) 1 ) (word~) main::$3 ← ((word)) (byte) main::i#10 (word) setFAC::w#1 ← (word~) main::$3 @@ -5539,14 +5270,14 @@ main::@return: scope:[main] from main::@16 to:@return main::@17: scope:[main] from main::@16 (byte~) main::i#14 ← (byte) main::i#1 - (byte*~) char_cursor#50 ← (byte*) char_cursor#1 - (byte*~) char_cursor#51 ← (byte*) char_cursor#1 + (byte*~) char_cursor#48 ← (byte*) char_cursor#1 + (byte*~) char_cursor#49 ← (byte*) char_cursor#1 to:main::@1 print_ln: scope:[print_ln] from main::@15 - (byte*~) line_cursor#32 ← (byte*) line_cursor#13 + (byte*~) line_cursor#30 ← (byte*) line_cursor#13 to:print_ln::@1 print_ln::@1: scope:[print_ln] from print_ln print_ln::@3 - (byte*) line_cursor#6 ← phi( print_ln/(byte*~) line_cursor#32 print_ln::@3/(byte*~) char_cursor#52 ) + (byte*) line_cursor#6 ← phi( print_ln/(byte*~) line_cursor#30 print_ln::@3/(byte*~) char_cursor#50 ) (byte*~) print_ln::$0 ← (byte*) line_cursor#6 + (byte/signed byte/word/signed word) 40 (byte*) char_cursor#1 ← (byte*~) print_ln::$0 if((byte*) char_cursor#1<(byte*) char_cursor#10) goto print_ln::@3 @@ -5555,48 +5286,48 @@ print_ln::@return: scope:[print_ln] from print_ln::@1 return to:@return print_ln::@3: scope:[print_ln] from print_ln::@1 - (byte*~) char_cursor#52 ← (byte*) char_cursor#1 + (byte*~) char_cursor#50 ← (byte*) char_cursor#1 to:print_ln::@1 print_word: scope:[print_word] from main::@14 (byte~) print_word::$0 ← > (word) print_word::w#0 (byte) print_byte::b#0 ← (byte~) print_word::$0 (byte~) print_byte::b#4 ← (byte) print_byte::b#0 - (byte*~) char_cursor#53 ← (byte*) char_cursor#32 + (byte*~) char_cursor#51 ← (byte*) char_cursor#32 call print_byte param-assignment to:print_word::@1 print_word::@1: scope:[print_word] from print_word (byte~) print_word::$2 ← < (word) print_word::w#0 (byte) print_byte::b#1 ← (byte~) print_word::$2 (byte~) print_byte::b#5 ← (byte) print_byte::b#1 - (byte*~) char_cursor#54 ← (byte*) char_cursor#10 + (byte*~) char_cursor#52 ← (byte*) char_cursor#10 call print_byte param-assignment to:print_word::@return print_word::@return: scope:[print_word] from print_word::@1 return to:@return print_byte: scope:[print_byte] from print_word print_word::@1 - (byte*) char_cursor#31 ← phi( print_word/(byte*~) char_cursor#53 print_word::@1/(byte*~) char_cursor#54 ) + (byte*) char_cursor#31 ← phi( print_word/(byte*~) char_cursor#51 print_word::@1/(byte*~) char_cursor#52 ) (byte) print_byte::b#2 ← phi( print_word/(byte~) print_byte::b#4 print_word::@1/(byte~) print_byte::b#5 ) (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word) 4 - (byte~) print_byte::$1 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$0 + (byte~) print_byte::$1 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$0 (byte) print_char::ch#0 ← (byte~) print_byte::$1 (byte~) print_char::ch#3 ← (byte) print_char::ch#0 - (byte*~) char_cursor#55 ← (byte*) char_cursor#31 + (byte*~) char_cursor#53 ← (byte*) char_cursor#31 call print_char param-assignment to:print_byte::@1 print_byte::@1: scope:[print_byte] from print_byte (byte~) print_byte::$3 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word) 15 - (byte~) print_byte::$4 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$3 + (byte~) print_byte::$4 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$3 (byte) print_char::ch#1 ← (byte~) print_byte::$4 (byte~) print_char::ch#4 ← (byte) print_char::ch#1 - (byte*~) char_cursor#56 ← (byte*) char_cursor#10 + (byte*~) char_cursor#54 ← (byte*) char_cursor#10 call print_char param-assignment to:print_byte::@return print_byte::@return: scope:[print_byte] from print_byte::@1 return to:@return print_char: scope:[print_char] from print_byte print_byte::@1 - (byte*) char_cursor#23 ← phi( print_byte/(byte*~) char_cursor#55 print_byte::@1/(byte*~) char_cursor#56 ) + (byte*) char_cursor#23 ← phi( print_byte/(byte*~) char_cursor#53 print_byte::@1/(byte*~) char_cursor#54 ) (byte) print_char::ch#2 ← phi( print_byte/(byte~) print_char::ch#3 print_byte::@1/(byte~) print_char::ch#4 ) *((byte*) char_cursor#23) ← (byte) print_char::ch#2 (byte*) char_cursor#10 ← ++ (byte*) char_cursor#23 @@ -5622,7 +5353,7 @@ addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 return to:@return prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC - (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte[]) f_127#0 divMEMbyFAC/(const byte[]) f_i#0 mulFACbyMEM/(byte*~) prepareMEM::mem#6 setFAC/(byte*~) prepareMEM::mem#7 setMEMtoFAC/(byte*~) prepareMEM::mem#8 ) + (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte[]) main::f_127#0 divMEMbyFAC/(const byte[]) main::f_i#0 mulFACbyMEM/(byte*~) prepareMEM::mem#6 setFAC/(byte*~) prepareMEM::mem#7 setMEMtoFAC/(byte*~) prepareMEM::mem#8 ) (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 @@ -5632,7 +5363,7 @@ prepareMEM::@return: scope:[prepareMEM] from prepareMEM return to:@return mulFACbyMEM: scope:[mulFACbyMEM] from main::@11 main::@6 - (byte*) mulFACbyMEM::mem#2 ← phi( main::@11/(const byte[]) f_127#0 main::@6/(const byte*) f_2pi#0 ) + (byte*) mulFACbyMEM::mem#2 ← phi( main::@11/(const byte[]) main::f_127#0 main::@6/(const byte*) main::f_2pi#0 ) (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 (byte*~) prepareMEM::mem#6 ← (byte*) prepareMEM::mem#4 call prepareMEM param-assignment @@ -5672,7 +5403,7 @@ setFAC::@return: scope:[setFAC] from setFAC::@1 return to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@4 main::@7 - (byte*) setMEMtoFAC::mem#2 ← phi( main::@4/(const byte[]) f_127#0 main::@7/(const byte[]) f_i#0 ) + (byte*) setMEMtoFAC::mem#2 ← phi( main::@4/(const byte[]) main::f_127#0 main::@7/(const byte[]) main::f_i#0 ) (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 (byte*~) prepareMEM::mem#8 ← (byte*) prepareMEM::mem#1 call prepareMEM param-assignment @@ -5769,8 +5500,8 @@ main::@4: scope:[main] from main::@3 [9] call setMEMtoFAC param-assignment [ ] to:main::@1 main::@1: scope:[main] from main::@17 main::@4 - [10] (byte*) line_cursor#13 ← phi( main::@17/(byte*~) char_cursor#51 main::@4/((byte*))(word/signed word) 1024 ) [ main::i#10 char_cursor#32 line_cursor#13 ] - [10] (byte*) char_cursor#32 ← phi( main::@17/(byte*~) char_cursor#50 main::@4/((byte*))(word/signed word) 1024 ) [ main::i#10 char_cursor#32 line_cursor#13 ] + [10] (byte*) line_cursor#13 ← phi( main::@17/(byte*~) char_cursor#49 main::@4/((byte*))(word/signed word) 1024 ) [ main::i#10 char_cursor#32 line_cursor#13 ] + [10] (byte*) char_cursor#32 ← phi( main::@17/(byte*~) char_cursor#48 main::@4/((byte*))(word/signed word) 1024 ) [ main::i#10 char_cursor#32 line_cursor#13 ] [10] (byte) main::i#10 ← phi( main::@17/(byte~) main::i#14 main::@4/(byte/signed byte/word/signed word) 1 ) [ main::i#10 char_cursor#32 line_cursor#13 ] [11] (word~) main::$3 ← ((word)) (byte) main::i#10 [ main::i#10 char_cursor#32 line_cursor#13 main::$3 ] [12] (word) setFAC::w#1 ← (word~) main::$3 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#1 ] @@ -5828,14 +5559,14 @@ main::@return: scope:[main] from main::@16 to:@return main::@17: scope:[main] from main::@16 [40] (byte~) main::i#14 ← (byte) main::i#1 [ main::i#14 char_cursor#1 ] - [41] (byte*~) char_cursor#50 ← (byte*) char_cursor#1 [ main::i#14 char_cursor#50 char_cursor#1 ] - [42] (byte*~) char_cursor#51 ← (byte*) char_cursor#1 [ main::i#14 char_cursor#50 char_cursor#51 ] + [41] (byte*~) char_cursor#48 ← (byte*) char_cursor#1 [ main::i#14 char_cursor#48 char_cursor#1 ] + [42] (byte*~) char_cursor#49 ← (byte*) char_cursor#1 [ main::i#14 char_cursor#48 char_cursor#49 ] to:main::@1 print_ln: scope:[print_ln] from main::@15 - [43] (byte*~) line_cursor#32 ← (byte*) line_cursor#13 [ line_cursor#32 char_cursor#10 ] + [43] (byte*~) line_cursor#30 ← (byte*) line_cursor#13 [ line_cursor#30 char_cursor#10 ] to:print_ln::@1 print_ln::@1: scope:[print_ln] from print_ln print_ln::@3 - [44] (byte*) line_cursor#6 ← phi( print_ln/(byte*~) line_cursor#32 print_ln::@3/(byte*~) char_cursor#52 ) [ line_cursor#6 char_cursor#10 ] + [44] (byte*) line_cursor#6 ← phi( print_ln/(byte*~) line_cursor#30 print_ln::@3/(byte*~) char_cursor#50 ) [ line_cursor#6 char_cursor#10 ] [45] (byte*~) print_ln::$0 ← (byte*) line_cursor#6 + (byte/signed byte/word/signed word) 40 [ print_ln::$0 char_cursor#10 ] [46] (byte*) char_cursor#1 ← (byte*~) print_ln::$0 [ char_cursor#1 char_cursor#10 ] [47] if((byte*) char_cursor#1<(byte*) char_cursor#10) goto print_ln::@3 [ char_cursor#1 char_cursor#10 ] @@ -5844,48 +5575,48 @@ print_ln::@return: scope:[print_ln] from print_ln::@1 [48] return [ char_cursor#1 ] to:@return print_ln::@3: scope:[print_ln] from print_ln::@1 - [49] (byte*~) char_cursor#52 ← (byte*) char_cursor#1 [ char_cursor#52 char_cursor#10 ] + [49] (byte*~) char_cursor#50 ← (byte*) char_cursor#1 [ char_cursor#50 char_cursor#10 ] to:print_ln::@1 print_word: scope:[print_word] from main::@14 [50] (byte~) print_word::$0 ← > (word) print_word::w#0 [ char_cursor#32 print_word::w#0 print_word::$0 ] [51] (byte) print_byte::b#0 ← (byte~) print_word::$0 [ char_cursor#32 print_word::w#0 print_byte::b#0 ] [52] (byte~) print_byte::b#4 ← (byte) print_byte::b#0 [ char_cursor#32 print_word::w#0 print_byte::b#4 ] - [53] (byte*~) char_cursor#53 ← (byte*) char_cursor#32 [ print_word::w#0 print_byte::b#4 char_cursor#53 ] + [53] (byte*~) char_cursor#51 ← (byte*) char_cursor#32 [ print_word::w#0 print_byte::b#4 char_cursor#51 ] [54] call print_byte param-assignment [ print_word::w#0 char_cursor#10 ] to:print_word::@1 print_word::@1: scope:[print_word] from print_word [55] (byte~) print_word::$2 ← < (word) print_word::w#0 [ char_cursor#10 print_word::$2 ] [56] (byte) print_byte::b#1 ← (byte~) print_word::$2 [ char_cursor#10 print_byte::b#1 ] [57] (byte~) print_byte::b#5 ← (byte) print_byte::b#1 [ char_cursor#10 print_byte::b#5 ] - [58] (byte*~) char_cursor#54 ← (byte*) char_cursor#10 [ print_byte::b#5 char_cursor#54 ] + [58] (byte*~) char_cursor#52 ← (byte*) char_cursor#10 [ print_byte::b#5 char_cursor#52 ] [59] call print_byte param-assignment [ char_cursor#10 ] to:print_word::@return print_word::@return: scope:[print_word] from print_word::@1 [60] return [ char_cursor#10 ] to:@return print_byte: scope:[print_byte] from print_word print_word::@1 - [61] (byte*) char_cursor#31 ← phi( print_word/(byte*~) char_cursor#53 print_word::@1/(byte*~) char_cursor#54 ) [ print_byte::b#2 char_cursor#31 ] + [61] (byte*) char_cursor#31 ← phi( print_word/(byte*~) char_cursor#51 print_word::@1/(byte*~) char_cursor#52 ) [ print_byte::b#2 char_cursor#31 ] [61] (byte) print_byte::b#2 ← phi( print_word/(byte~) print_byte::b#4 print_word::@1/(byte~) print_byte::b#5 ) [ print_byte::b#2 char_cursor#31 ] [62] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word) 4 [ print_byte::b#2 char_cursor#31 print_byte::$0 ] - [63] (byte~) print_byte::$1 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$0 [ print_byte::b#2 char_cursor#31 print_byte::$1 ] + [63] (byte~) print_byte::$1 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$0 [ print_byte::b#2 char_cursor#31 print_byte::$1 ] [64] (byte) print_char::ch#0 ← (byte~) print_byte::$1 [ print_byte::b#2 char_cursor#31 print_char::ch#0 ] [65] (byte~) print_char::ch#3 ← (byte) print_char::ch#0 [ print_byte::b#2 char_cursor#31 print_char::ch#3 ] - [66] (byte*~) char_cursor#55 ← (byte*) char_cursor#31 [ print_byte::b#2 print_char::ch#3 char_cursor#55 ] + [66] (byte*~) char_cursor#53 ← (byte*) char_cursor#31 [ print_byte::b#2 print_char::ch#3 char_cursor#53 ] [67] call print_char param-assignment [ char_cursor#10 print_byte::b#2 ] to:print_byte::@1 print_byte::@1: scope:[print_byte] from print_byte [68] (byte~) print_byte::$3 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word) 15 [ char_cursor#10 print_byte::$3 ] - [69] (byte~) print_byte::$4 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$3 [ char_cursor#10 print_byte::$4 ] + [69] (byte~) print_byte::$4 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$3 [ char_cursor#10 print_byte::$4 ] [70] (byte) print_char::ch#1 ← (byte~) print_byte::$4 [ char_cursor#10 print_char::ch#1 ] [71] (byte~) print_char::ch#4 ← (byte) print_char::ch#1 [ char_cursor#10 print_char::ch#4 ] - [72] (byte*~) char_cursor#56 ← (byte*) char_cursor#10 [ print_char::ch#4 char_cursor#56 ] + [72] (byte*~) char_cursor#54 ← (byte*) char_cursor#10 [ print_char::ch#4 char_cursor#54 ] [73] call print_char param-assignment [ char_cursor#10 ] to:print_byte::@return print_byte::@return: scope:[print_byte] from print_byte::@1 [74] return [ char_cursor#10 ] to:@return print_char: scope:[print_char] from print_byte print_byte::@1 - [75] (byte*) char_cursor#23 ← phi( print_byte/(byte*~) char_cursor#55 print_byte::@1/(byte*~) char_cursor#56 ) [ print_char::ch#2 char_cursor#23 ] + [75] (byte*) char_cursor#23 ← phi( print_byte/(byte*~) char_cursor#53 print_byte::@1/(byte*~) char_cursor#54 ) [ print_char::ch#2 char_cursor#23 ] [75] (byte) print_char::ch#2 ← phi( print_byte/(byte~) print_char::ch#3 print_byte::@1/(byte~) print_char::ch#4 ) [ print_char::ch#2 char_cursor#23 ] [76] *((byte*) char_cursor#23) ← (byte) print_char::ch#2 [ char_cursor#23 ] [77] (byte*) char_cursor#10 ← ++ (byte*) char_cursor#23 [ char_cursor#10 ] @@ -5912,7 +5643,7 @@ addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 [86] return [ ] to:@return prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC - [87] (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte[]) f_127#0 divMEMbyFAC/(const byte[]) f_i#0 mulFACbyMEM/(byte*~) prepareMEM::mem#6 setFAC/(byte*~) prepareMEM::mem#7 setMEMtoFAC/(byte*~) prepareMEM::mem#8 ) [ prepareMEM::mem#5 ] + [87] (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte[]) main::f_127#0 divMEMbyFAC/(const byte[]) main::f_i#0 mulFACbyMEM/(byte*~) prepareMEM::mem#6 setFAC/(byte*~) prepareMEM::mem#7 setMEMtoFAC/(byte*~) prepareMEM::mem#8 ) [ prepareMEM::mem#5 ] [88] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 [ prepareMEM::mem#5 prepareMEM::$0 ] [89] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#5 ] [90] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 [ prepareMEM::$1 ] @@ -5922,7 +5653,7 @@ prepareMEM::@return: scope:[prepareMEM] from prepareMEM [92] return [ ] to:@return mulFACbyMEM: scope:[mulFACbyMEM] from main::@11 main::@6 - [93] (byte*) mulFACbyMEM::mem#2 ← phi( main::@11/(const byte[]) f_127#0 main::@6/(const byte*) f_2pi#0 ) [ mulFACbyMEM::mem#2 ] + [93] (byte*) mulFACbyMEM::mem#2 ← phi( main::@11/(const byte[]) main::f_127#0 main::@6/(const byte*) main::f_2pi#0 ) [ mulFACbyMEM::mem#2 ] [94] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#4 ] [95] (byte*~) prepareMEM::mem#6 ← (byte*) prepareMEM::mem#4 [ prepareMEM::mem#6 ] [96] call prepareMEM param-assignment [ ] @@ -5963,7 +5694,7 @@ setFAC::@return: scope:[setFAC] from setFAC::@1 [111] return [ ] to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@4 main::@7 - [112] (byte*) setMEMtoFAC::mem#2 ← phi( main::@4/(const byte[]) f_127#0 main::@7/(const byte[]) f_i#0 ) [ setMEMtoFAC::mem#2 ] + [112] (byte*) setMEMtoFAC::mem#2 ← phi( main::@4/(const byte[]) main::f_127#0 main::@7/(const byte[]) main::f_i#0 ) [ setMEMtoFAC::mem#2 ] [113] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#1 ] [114] (byte*~) prepareMEM::mem#8 ← (byte*) prepareMEM::mem#1 [ prepareMEM::mem#8 ] [115] call prepareMEM param-assignment [ ] @@ -5984,19 +5715,19 @@ divFACby10::@return: scope:[divFACby10] from divFACby10 Created 12 initial phi equivalence classes Coalesced [13] setFAC::w#4 ← setFAC::w#1 Coalesced [40] main::i#14 ← main::i#1 -Not coalescing [41] char_cursor#50 ← char_cursor#1 -Coalesced [42] char_cursor#51 ← char_cursor#1 -Coalesced [43] line_cursor#32 ← line_cursor#13 +Not coalescing [41] char_cursor#48 ← char_cursor#1 +Coalesced [42] char_cursor#49 ← char_cursor#1 +Coalesced [43] line_cursor#30 ← line_cursor#13 Coalesced [46] char_cursor#1 ← print_ln::$0 -Coalesced (already) [49] char_cursor#52 ← char_cursor#1 +Coalesced (already) [49] char_cursor#50 ← char_cursor#1 Coalesced [52] print_byte::b#4 ← print_byte::b#0 -Coalesced [53] char_cursor#53 ← char_cursor#32 +Coalesced [53] char_cursor#51 ← char_cursor#32 Coalesced [57] print_byte::b#5 ← print_byte::b#1 -Coalesced [58] char_cursor#54 ← char_cursor#10 +Coalesced [58] char_cursor#52 ← char_cursor#10 Coalesced [65] print_char::ch#3 ← print_char::ch#0 -Coalesced [66] char_cursor#55 ← char_cursor#31 +Coalesced [66] char_cursor#53 ← char_cursor#31 Coalesced [71] print_char::ch#4 ← print_char::ch#1 -Coalesced (already) [72] char_cursor#56 ← char_cursor#10 +Coalesced (already) [72] char_cursor#54 ← char_cursor#10 Coalesced [95] prepareMEM::mem#6 ← prepareMEM::mem#4 Coalesced [108] prepareMEM::mem#7 ← prepareMEM::mem#0 Coalesced [114] prepareMEM::mem#8 ← prepareMEM::mem#1 @@ -6072,7 +5803,7 @@ main::@4: scope:[main] from main::@3 to:main::@1 main::@1: scope:[main] from main::@17 main::@4 [10] (byte*) line_cursor#13 ← phi( main::@17/(byte*~) print_ln::$0 main::@4/((byte*))(word/signed word) 1024 ) [ main::i#10 char_cursor#32 line_cursor#13 ] - [10] (byte*) char_cursor#32 ← phi( main::@17/(byte*~) char_cursor#50 main::@4/((byte*))(word/signed word) 1024 ) [ main::i#10 char_cursor#32 line_cursor#13 ] + [10] (byte*) char_cursor#32 ← phi( main::@17/(byte*~) char_cursor#48 main::@4/((byte*))(word/signed word) 1024 ) [ main::i#10 char_cursor#32 line_cursor#13 ] [10] (byte) main::i#10 ← phi( main::@17/(byte) main::i#1 main::@4/(byte/signed byte/word/signed word) 1 ) [ main::i#10 char_cursor#32 line_cursor#13 ] [11] (word~) main::$3 ← ((word)) (byte) main::i#10 [ main::i#10 char_cursor#32 line_cursor#13 main::$3 ] [12] (word) setFAC::w#1 ← (word~) main::$3 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#1 ] @@ -6128,7 +5859,7 @@ main::@return: scope:[main] from main::@16 [38] return [ ] to:@return main::@17: scope:[main] from main::@16 - [39] (byte*~) char_cursor#50 ← (byte*~) print_ln::$0 [ main::i#1 char_cursor#50 print_ln::$0 ] + [39] (byte*~) char_cursor#48 ← (byte*~) print_ln::$0 [ main::i#1 char_cursor#48 print_ln::$0 ] to:main::@1 print_ln: scope:[print_ln] from main::@15 [40] phi() [ line_cursor#13 char_cursor#10 ] @@ -6158,13 +5889,13 @@ print_byte: scope:[print_byte] from print_word print_word::@1 [52] (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#32 print_word::@1/(byte*) char_cursor#10 ) [ print_byte::b#2 char_cursor#31 ] [52] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) [ print_byte::b#2 char_cursor#31 ] [53] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word) 4 [ print_byte::b#2 char_cursor#31 print_byte::$0 ] - [54] (byte~) print_byte::$1 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$0 [ print_byte::b#2 char_cursor#31 print_byte::$1 ] + [54] (byte~) print_byte::$1 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$0 [ print_byte::b#2 char_cursor#31 print_byte::$1 ] [55] (byte) print_char::ch#0 ← (byte~) print_byte::$1 [ print_byte::b#2 char_cursor#31 print_char::ch#0 ] [56] call print_char param-assignment [ char_cursor#10 print_byte::b#2 ] to:print_byte::@1 print_byte::@1: scope:[print_byte] from print_byte [57] (byte~) print_byte::$3 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word) 15 [ char_cursor#10 print_byte::$3 ] - [58] (byte~) print_byte::$4 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$3 [ char_cursor#10 print_byte::$4 ] + [58] (byte~) print_byte::$4 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$3 [ char_cursor#10 print_byte::$4 ] [59] (byte) print_char::ch#1 ← (byte~) print_byte::$4 [ char_cursor#10 print_char::ch#1 ] [60] call print_char param-assignment [ char_cursor#10 ] to:print_byte::@return @@ -6199,7 +5930,7 @@ addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 [73] return [ ] to:@return prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC - [74] (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte[]) f_127#0 divMEMbyFAC/(const byte[]) f_i#0 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) [ prepareMEM::mem#5 ] + [74] (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte[]) main::f_127#0 divMEMbyFAC/(const byte[]) main::f_i#0 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) [ prepareMEM::mem#5 ] [75] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 [ prepareMEM::mem#5 prepareMEM::$0 ] [76] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#5 ] [77] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 [ prepareMEM::$1 ] @@ -6209,7 +5940,7 @@ prepareMEM::@return: scope:[prepareMEM] from prepareMEM [79] return [ ] to:@return mulFACbyMEM: scope:[mulFACbyMEM] from main::@11 main::@6 - [80] (byte*) mulFACbyMEM::mem#2 ← phi( main::@11/(const byte[]) f_127#0 main::@6/(const byte*) f_2pi#0 ) [ mulFACbyMEM::mem#2 ] + [80] (byte*) mulFACbyMEM::mem#2 ← phi( main::@11/(const byte[]) main::f_127#0 main::@6/(const byte*) main::f_2pi#0 ) [ mulFACbyMEM::mem#2 ] [81] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#4 ] [82] call prepareMEM param-assignment [ ] to:mulFACbyMEM::@1 @@ -6248,7 +5979,7 @@ setFAC::@return: scope:[setFAC] from setFAC::@1 [96] return [ ] to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@4 main::@7 - [97] (byte*) setMEMtoFAC::mem#2 ← phi( main::@4/(const byte[]) f_127#0 main::@7/(const byte[]) f_i#0 ) [ setMEMtoFAC::mem#2 ] + [97] (byte*) setMEMtoFAC::mem#2 ← phi( main::@4/(const byte[]) main::f_127#0 main::@7/(const byte[]) main::f_i#0 ) [ setMEMtoFAC::mem#2 ] [98] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#1 ] [99] call prepareMEM param-assignment [ ] to:setMEMtoFAC::@1 @@ -6289,7 +6020,7 @@ main::@4: scope:[main] from main::@3 to:main::@1 main::@1: scope:[main] from main::@17 main::@4 [10] (byte*) line_cursor#13 ← phi( main::@17/(byte*~) print_ln::$0 main::@4/((byte*))(word/signed word) 1024 ) [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) - [10] (byte*) char_cursor#32 ← phi( main::@17/(byte*~) char_cursor#50 main::@4/((byte*))(word/signed word) 1024 ) [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) + [10] (byte*) char_cursor#32 ← phi( main::@17/(byte*~) char_cursor#48 main::@4/((byte*))(word/signed word) 1024 ) [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) [10] (byte) main::i#10 ← phi( main::@17/(byte) main::i#1 main::@4/(byte/signed byte/word/signed word) 1 ) [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) [11] (word~) main::$3 ← ((word)) (byte) main::i#10 [ main::i#10 char_cursor#32 line_cursor#13 main::$3 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 main::$3 ] ) [12] (word) setFAC::w#1 ← (word~) main::$3 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#1 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 setFAC::w#1 ] ) @@ -6345,7 +6076,7 @@ main::@return: scope:[main] from main::@16 [38] return [ ] ( main:2 [ ] ) to:@return main::@17: scope:[main] from main::@16 - [39] (byte*~) char_cursor#50 ← (byte*~) print_ln::$0 [ main::i#1 char_cursor#50 print_ln::$0 ] ( main:2 [ main::i#1 char_cursor#50 print_ln::$0 ] ) + [39] (byte*~) char_cursor#48 ← (byte*~) print_ln::$0 [ main::i#1 char_cursor#48 print_ln::$0 ] ( main:2 [ main::i#1 char_cursor#48 print_ln::$0 ] ) to:main::@1 print_ln: scope:[print_ln] from main::@15 [40] phi() [ line_cursor#13 char_cursor#10 ] ( main:2::print_ln:35 [ main::i#10 line_cursor#13 char_cursor#10 ] ) @@ -6375,13 +6106,13 @@ print_byte: scope:[print_byte] from print_word print_word::@1 [52] (byte*) char_cursor#31 ← phi( print_word/(byte*) char_cursor#32 print_word::@1/(byte*) char_cursor#10 ) [ print_byte::b#2 char_cursor#31 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 ] ) [52] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) [ print_byte::b#2 char_cursor#31 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 ] ) [53] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word) 4 [ print_byte::b#2 char_cursor#31 print_byte::$0 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_byte::$0 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_byte::$0 ] ) - [54] (byte~) print_byte::$1 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$0 [ print_byte::b#2 char_cursor#31 print_byte::$1 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_byte::$1 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_byte::$1 ] ) + [54] (byte~) print_byte::$1 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$0 [ print_byte::b#2 char_cursor#31 print_byte::$1 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_byte::$1 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_byte::$1 ] ) [55] (byte) print_char::ch#0 ← (byte~) print_byte::$1 [ print_byte::b#2 char_cursor#31 print_char::ch#0 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_char::ch#0 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_char::ch#0 ] ) [56] call print_char param-assignment [ char_cursor#10 print_byte::b#2 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::b#2 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::b#2 ] ) to:print_byte::@1 print_byte::@1: scope:[print_byte] from print_byte [57] (byte~) print_byte::$3 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word) 15 [ char_cursor#10 print_byte::$3 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$3 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$3 ] ) - [58] (byte~) print_byte::$4 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$3 [ char_cursor#10 print_byte::$4 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$4 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$4 ] ) + [58] (byte~) print_byte::$4 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$3 [ char_cursor#10 print_byte::$4 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$4 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$4 ] ) [59] (byte) print_char::ch#1 ← (byte~) print_byte::$4 [ char_cursor#10 print_char::ch#1 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_char::ch#1 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_char::ch#1 ] ) [60] call print_char param-assignment [ char_cursor#10 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 ] ) to:print_byte::@return @@ -6416,7 +6147,7 @@ addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 [73] return [ ] ( main:2::addMEMtoFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:@return prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC - [74] (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte[]) f_127#0 divMEMbyFAC/(const byte[]) f_i#0 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) [ prepareMEM::mem#5 ] ( main:2::addMEMtoFAC:27::prepareMEM:71 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:15::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:25::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::divMEMbyFAC:21::prepareMEM:88 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:5::prepareMEM:94 [ prepareMEM::mem#5 ] main:2::setFAC:13::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:19::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setMEMtoFAC:9::prepareMEM:99 [ prepareMEM::mem#5 ] main:2::setMEMtoFAC:17::prepareMEM:99 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] ) + [74] (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte[]) main::f_127#0 divMEMbyFAC/(const byte[]) main::f_i#0 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 ) [ prepareMEM::mem#5 ] ( main:2::addMEMtoFAC:27::prepareMEM:71 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:15::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:25::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::divMEMbyFAC:21::prepareMEM:88 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:5::prepareMEM:94 [ prepareMEM::mem#5 ] main:2::setFAC:13::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:19::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setMEMtoFAC:9::prepareMEM:99 [ prepareMEM::mem#5 ] main:2::setMEMtoFAC:17::prepareMEM:99 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] ) [75] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 [ prepareMEM::mem#5 prepareMEM::$0 ] ( main:2::addMEMtoFAC:27::prepareMEM:71 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:15::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::mulFACbyMEM:25::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::divMEMbyFAC:21::prepareMEM:88 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:5::prepareMEM:94 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:13::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setFAC:19::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:9::prepareMEM:99 [ prepareMEM::mem#5 prepareMEM::$0 ] main:2::setMEMtoFAC:17::prepareMEM:99 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 prepareMEM::$0 ] ) [76] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 [ prepareMEM::mem#5 ] ( main:2::addMEMtoFAC:27::prepareMEM:71 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:15::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::mulFACbyMEM:25::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::divMEMbyFAC:21::prepareMEM:88 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:5::prepareMEM:94 [ prepareMEM::mem#5 ] main:2::setFAC:13::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setFAC:19::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] main:2::setMEMtoFAC:9::prepareMEM:99 [ prepareMEM::mem#5 ] main:2::setMEMtoFAC:17::prepareMEM:99 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#5 ] ) [77] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 [ prepareMEM::$1 ] ( main:2::addMEMtoFAC:27::prepareMEM:71 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:15::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::mulFACbyMEM:25::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::divMEMbyFAC:21::prepareMEM:88 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:5::prepareMEM:94 [ prepareMEM::$1 ] main:2::setFAC:13::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setFAC:19::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] main:2::setMEMtoFAC:9::prepareMEM:99 [ prepareMEM::$1 ] main:2::setMEMtoFAC:17::prepareMEM:99 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::$1 ] ) @@ -6426,7 +6157,7 @@ prepareMEM::@return: scope:[prepareMEM] from prepareMEM [79] return [ ] ( main:2::addMEMtoFAC:27::prepareMEM:71 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:15::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:25::prepareMEM:82 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::divMEMbyFAC:21::prepareMEM:88 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:5::prepareMEM:94 [ ] main:2::setFAC:13::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:19::prepareMEM:94 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setMEMtoFAC:9::prepareMEM:99 [ ] main:2::setMEMtoFAC:17::prepareMEM:99 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:@return mulFACbyMEM: scope:[mulFACbyMEM] from main::@11 main::@6 - [80] (byte*) mulFACbyMEM::mem#2 ← phi( main::@11/(const byte[]) f_127#0 main::@6/(const byte*) f_2pi#0 ) [ mulFACbyMEM::mem#2 ] ( main:2::mulFACbyMEM:15 [ main::i#10 char_cursor#32 line_cursor#13 mulFACbyMEM::mem#2 ] main:2::mulFACbyMEM:25 [ main::i#10 char_cursor#32 line_cursor#13 mulFACbyMEM::mem#2 ] ) + [80] (byte*) mulFACbyMEM::mem#2 ← phi( main::@11/(const byte[]) main::f_127#0 main::@6/(const byte*) main::f_2pi#0 ) [ mulFACbyMEM::mem#2 ] ( main:2::mulFACbyMEM:15 [ main::i#10 char_cursor#32 line_cursor#13 mulFACbyMEM::mem#2 ] main:2::mulFACbyMEM:25 [ main::i#10 char_cursor#32 line_cursor#13 mulFACbyMEM::mem#2 ] ) [81] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#4 ] ( main:2::mulFACbyMEM:15 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:25 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#4 ] ) [82] call prepareMEM param-assignment [ ] ( main:2::mulFACbyMEM:15 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::mulFACbyMEM:25 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:mulFACbyMEM::@1 @@ -6465,7 +6196,7 @@ setFAC::@return: scope:[setFAC] from setFAC::@1 [96] return [ ] ( main:2::setFAC:5 [ ] main:2::setFAC:13 [ main::i#10 char_cursor#32 line_cursor#13 ] main:2::setFAC:19 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:@return setMEMtoFAC: scope:[setMEMtoFAC] from main::@4 main::@7 - [97] (byte*) setMEMtoFAC::mem#2 ← phi( main::@4/(const byte[]) f_127#0 main::@7/(const byte[]) f_i#0 ) [ setMEMtoFAC::mem#2 ] ( main:2::setMEMtoFAC:9 [ setMEMtoFAC::mem#2 ] main:2::setMEMtoFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setMEMtoFAC::mem#2 ] ) + [97] (byte*) setMEMtoFAC::mem#2 ← phi( main::@4/(const byte[]) main::f_127#0 main::@7/(const byte[]) main::f_i#0 ) [ setMEMtoFAC::mem#2 ] ( main:2::setMEMtoFAC:9 [ setMEMtoFAC::mem#2 ] main:2::setMEMtoFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 setMEMtoFAC::mem#2 ] ) [98] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#1 ] ( main:2::setMEMtoFAC:9 [ prepareMEM::mem#1 ] main:2::setMEMtoFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 prepareMEM::mem#1 ] ) [99] call prepareMEM param-assignment [ ] ( main:2::setMEMtoFAC:9 [ ] main:2::setMEMtoFAC:17 [ main::i#10 char_cursor#32 line_cursor#13 ] ) to:setMEMtoFAC::@1 @@ -6576,26 +6307,25 @@ VARIABLE REGISTER WEIGHTS (byte*) char_cursor#23 4.0 (byte*) char_cursor#31 1.5 (byte*) char_cursor#32 0.52 -(byte*~) char_cursor#50 22.0 +(byte*~) char_cursor#48 22.0 (void()) divFACby10() (void()) divMEMbyFAC((byte*) divMEMbyFAC::mem) (byte*) divMEMbyFAC::mem -(byte[]) f_127 -(byte*) f_2pi -(byte[]) f_i (word()) getFAC() (word) getFAC::return (word) getFAC::return#0 4.333333333333333 (word) getFAC::return#2 22.0 (word) getFAC::w (word) getFAC::w#1 4.0 -(byte[]) hextab (byte*) line_cursor (byte*) line_cursor#13 0.5 (byte*) line_cursor#6 204.0 (void()) main() (word~) main::$12 22.0 (word~) main::$3 22.0 +(byte[]) main::f_127 +(byte*) main::f_2pi +(byte[]) main::f_i (byte) main::i (byte) main::i#1 11.0 (byte) main::i#10 1.2692307692307692 @@ -6621,6 +6351,7 @@ VARIABLE REGISTER WEIGHTS (byte) print_byte::b#0 4.0 (byte) print_byte::b#1 4.0 (byte) print_byte::b#2 1.6 +(byte[]) print_byte::hextab (void()) print_char((byte) print_char::ch) (byte) print_char::ch (byte) print_char::ch#0 4.0 @@ -6648,7 +6379,7 @@ Initial phi equivalence classes [ line_cursor#6 line_cursor#13 print_ln::$0 ] [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] -[ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#50 char_cursor#10 ] +[ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#48 char_cursor#10 ] [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 ] [ mulFACbyMEM::mem#2 ] [ setFAC::w#3 setFAC::w#1 ] @@ -6673,7 +6404,7 @@ Complete equivalence classes [ line_cursor#6 line_cursor#13 print_ln::$0 ] [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] -[ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#50 char_cursor#10 ] +[ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#48 char_cursor#10 ] [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 ] [ mulFACbyMEM::mem#2 ] [ setFAC::w#3 setFAC::w#1 ] @@ -6697,7 +6428,7 @@ Allocated zp ZP_BYTE:2 [ main::i#10 main::i#1 ] Allocated zp ZP_PTR_BYTE:3 [ line_cursor#6 line_cursor#13 print_ln::$0 ] Allocated zp ZP_BYTE:5 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] Allocated zp ZP_BYTE:6 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] -Allocated zp ZP_PTR_BYTE:7 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#50 char_cursor#10 ] +Allocated zp ZP_PTR_BYTE:7 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#48 char_cursor#10 ] Allocated zp ZP_PTR_BYTE:9 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 ] Allocated zp ZP_PTR_BYTE:11 [ mulFACbyMEM::mem#2 ] Allocated zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 ] @@ -6725,12 +6456,8 @@ INITIAL ASM //SEG1 Global Constants & labels .const memLo = $fe .const memHi = $ff - .const f_2pi = $e2e5 .label char_cursor = 7 .label line_cursor = 3 - hextab: .byte '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' - f_i: .byte 0, 0, 0, 0, 0 - f_127: .byte 0, 0, 0, 0, 0 //SEG2 @begin bbegin: //SEG3 [1] phi from @begin to @33 [phi:@begin->@33] @@ -6749,6 +6476,7 @@ bend_from_b33: bend: //SEG9 main main: { + .const f_2pi = $e2e5 .label _3 = $11 .label _12 = $15 .label i = 2 @@ -6776,7 +6504,7 @@ main: { //SEG18 [9] call setMEMtoFAC param-assignment [ ] ( main:2 [ ] ) //SEG19 [97] phi from main::@4 to setMEMtoFAC [phi:main::@4->setMEMtoFAC] setMEMtoFAC_from_b4: - //SEG20 [97] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_127#0 [phi:main::@4->setMEMtoFAC#0] -- zpptrby1=cowo1 + //SEG20 [97] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) main::f_127#0 [phi:main::@4->setMEMtoFAC#0] -- zpptrby1=cowo1 lda #f_127 @@ -6823,7 +6551,7 @@ main: { //SEG33 [15] call mulFACbyMEM param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG34 [80] phi from main::@6 to mulFACbyMEM [phi:main::@6->mulFACbyMEM] mulFACbyMEM_from_b6: - //SEG35 [80] phi (byte*) mulFACbyMEM::mem#2 = (const byte*) f_2pi#0 [phi:main::@6->mulFACbyMEM#0] -- zpptrby1=cowo1 + //SEG35 [80] phi (byte*) mulFACbyMEM::mem#2 = (const byte*) main::f_2pi#0 [phi:main::@6->mulFACbyMEM#0] -- zpptrby1=cowo1 lda #f_2pi @@ -6837,7 +6565,7 @@ main: { //SEG38 [17] call setMEMtoFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG39 [97] phi from main::@7 to setMEMtoFAC [phi:main::@7->setMEMtoFAC] setMEMtoFAC_from_b7: - //SEG40 [97] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_i#0 [phi:main::@7->setMEMtoFAC#0] -- zpptrby1=cowo1 + //SEG40 [97] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) main::f_i#0 [phi:main::@7->setMEMtoFAC#0] -- zpptrby1=cowo1 lda #f_i @@ -6881,7 +6609,7 @@ main: { //SEG55 [25] call mulFACbyMEM param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG56 [80] phi from main::@11 to mulFACbyMEM [phi:main::@11->mulFACbyMEM] mulFACbyMEM_from_b11: - //SEG57 [80] phi (byte*) mulFACbyMEM::mem#2 = (const byte[]) f_127#0 [phi:main::@11->mulFACbyMEM#0] -- zpptrby1=cowo1 + //SEG57 [80] phi (byte*) mulFACbyMEM::mem#2 = (const byte[]) main::f_127#0 [phi:main::@11->mulFACbyMEM#0] -- zpptrby1=cowo1 lda #f_127 @@ -6948,7 +6676,7 @@ main: { rts //SEG79 main::@17 b17: - //SEG80 [39] (byte*~) char_cursor#50 ← (byte*~) print_ln::$0 [ main::i#1 char_cursor#50 print_ln::$0 ] ( main:2 [ main::i#1 char_cursor#50 print_ln::$0 ] ) -- zpptrby1=zpptrby2 + //SEG80 [39] (byte*~) char_cursor#48 ← (byte*~) print_ln::$0 [ main::i#1 char_cursor#48 print_ln::$0 ] ( main:2 [ main::i#1 char_cursor#48 print_ln::$0 ] ) -- zpptrby1=zpptrby2 lda print_ln._0 sta char_cursor lda print_ln._0+1 @@ -6956,9 +6684,11 @@ main: { //SEG81 [10] phi from main::@17 to main::@1 [phi:main::@17->main::@1] b1_from_b17: //SEG82 [10] phi (byte*) line_cursor#13 = (byte*~) print_ln::$0 [phi:main::@17->main::@1#0] -- register_copy - //SEG83 [10] phi (byte*) char_cursor#32 = (byte*~) char_cursor#50 [phi:main::@17->main::@1#1] -- register_copy + //SEG83 [10] phi (byte*) char_cursor#32 = (byte*~) char_cursor#48 [phi:main::@17->main::@1#1] -- register_copy //SEG84 [10] phi (byte) main::i#10 = (byte) main::i#1 [phi:main::@17->main::@1#2] -- register_copy jmp b1 + f_i: .byte 0, 0, 0, 0, 0 + f_127: .byte 0, 0, 0, 0, 0 } //SEG85 print_ln print_ln: { @@ -7045,7 +6775,7 @@ print_byte: { lsr lsr sta _0 - //SEG111 [54] (byte~) print_byte::$1 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$0 [ print_byte::b#2 char_cursor#31 print_byte::$1 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_byte::$1 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_byte::$1 ] ) -- zpby1=cowo1_derefidx_zpby2 + //SEG111 [54] (byte~) print_byte::$1 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$0 [ print_byte::b#2 char_cursor#31 print_byte::$1 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_byte::$1 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_byte::$1 ] ) -- zpby1=cowo1_derefidx_zpby2 ldx _0 lda hextab,x sta _1 @@ -7065,7 +6795,7 @@ print_byte: { lda b and #$f sta _3 - //SEG119 [58] (byte~) print_byte::$4 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$3 [ char_cursor#10 print_byte::$4 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$4 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$4 ] ) -- zpby1=cowo1_derefidx_zpby2 + //SEG119 [58] (byte~) print_byte::$4 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$3 [ char_cursor#10 print_byte::$4 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$4 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$4 ] ) -- zpby1=cowo1_derefidx_zpby2 ldx _3 lda hextab,x sta _4 @@ -7083,6 +6813,7 @@ print_byte: { breturn: //SEG126 [61] return [ char_cursor#10 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 ] ) rts + hextab: .byte '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' } //SEG127 print_char print_char: { @@ -7132,10 +6863,10 @@ addMEMtoFAC: { //SEG139 [71] call prepareMEM param-assignment [ ] ( main:2::addMEMtoFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG140 [74] phi from addMEMtoFAC to prepareMEM [phi:addMEMtoFAC->prepareMEM] prepareMEM_from_addMEMtoFAC: - //SEG141 [74] phi (byte*) prepareMEM::mem#5 = (const byte[]) f_127#0 [phi:addMEMtoFAC->prepareMEM#0] -- zpptrby1=cowo1 - lda #prepareMEM#0] -- zpptrby1=cowo1 + lda #f_127 + lda #>main.f_127 sta prepareMEM.mem+1 jsr prepareMEM jmp b1 @@ -7215,10 +6946,10 @@ divMEMbyFAC: { //SEG167 [88] call prepareMEM param-assignment [ ] ( main:2::divMEMbyFAC:21 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG168 [74] phi from divMEMbyFAC to prepareMEM [phi:divMEMbyFAC->prepareMEM] prepareMEM_from_divMEMbyFAC: - //SEG169 [74] phi (byte*) prepareMEM::mem#5 = (const byte[]) f_i#0 [phi:divMEMbyFAC->prepareMEM#0] -- zpptrby1=cowo1 - lda #prepareMEM#0] -- zpptrby1=cowo1 + lda #f_i + lda #>main.f_i sta prepareMEM.mem+1 jsr prepareMEM jmp b1 @@ -7310,7 +7041,7 @@ Statement [12] (word) setFAC::w#1 ← (word~) main::$3 [ main::i#10 char_cursor# Statement [30] (word) getFAC::return#2 ← (word) getFAC::return#0 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#2 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 getFAC::return#2 ] ) always clobbers reg byte a Statement [31] (word~) main::$12 ← (word) getFAC::return#2 [ main::i#10 char_cursor#32 line_cursor#13 main::$12 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 main::$12 ] ) always clobbers reg byte a Statement [32] (word) print_word::w#0 ← (word~) main::$12 [ main::i#10 char_cursor#32 line_cursor#13 print_word::w#0 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 print_word::w#0 ] ) always clobbers reg byte a -Statement [39] (byte*~) char_cursor#50 ← (byte*~) print_ln::$0 [ main::i#1 char_cursor#50 print_ln::$0 ] ( main:2 [ main::i#1 char_cursor#50 print_ln::$0 ] ) always clobbers reg byte a +Statement [39] (byte*~) char_cursor#48 ← (byte*~) print_ln::$0 [ main::i#1 char_cursor#48 print_ln::$0 ] ( main:2 [ main::i#1 char_cursor#48 print_ln::$0 ] ) always clobbers reg byte a Statement [42] (byte*~) print_ln::$0 ← (byte*) line_cursor#6 + (byte/signed byte/word/signed word) 40 [ print_ln::$0 char_cursor#10 ] ( main:2::print_ln:35 [ main::i#10 print_ln::$0 char_cursor#10 ] ) always clobbers reg byte a Statement [43] if((byte*~) print_ln::$0<(byte*) char_cursor#10) goto print_ln::@1 [ print_ln::$0 char_cursor#10 ] ( main:2::print_ln:35 [ main::i#10 print_ln::$0 char_cursor#10 ] ) always clobbers reg byte a Statement [45] (byte~) print_word::$0 ← > (word) print_word::w#0 [ char_cursor#32 print_word::w#0 print_word::$0 ] ( main:2::print_word:33 [ main::i#10 line_cursor#13 char_cursor#32 print_word::w#0 print_word::$0 ] ) always clobbers reg byte a @@ -7339,7 +7070,7 @@ Statement [30] (word) getFAC::return#2 ← (word) getFAC::return#0 [ main::i#10 Statement [31] (word~) main::$12 ← (word) getFAC::return#2 [ main::i#10 char_cursor#32 line_cursor#13 main::$12 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 main::$12 ] ) always clobbers reg byte a Statement [32] (word) print_word::w#0 ← (word~) main::$12 [ main::i#10 char_cursor#32 line_cursor#13 print_word::w#0 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 print_word::w#0 ] ) always clobbers reg byte a Statement [37] if((byte) main::i#1!=(byte/signed byte/word/signed word) 26) goto main::@17 [ main::i#1 print_ln::$0 ] ( main:2 [ main::i#1 print_ln::$0 ] ) always clobbers reg byte a -Statement [39] (byte*~) char_cursor#50 ← (byte*~) print_ln::$0 [ main::i#1 char_cursor#50 print_ln::$0 ] ( main:2 [ main::i#1 char_cursor#50 print_ln::$0 ] ) always clobbers reg byte a +Statement [39] (byte*~) char_cursor#48 ← (byte*~) print_ln::$0 [ main::i#1 char_cursor#48 print_ln::$0 ] ( main:2 [ main::i#1 char_cursor#48 print_ln::$0 ] ) always clobbers reg byte a Statement [42] (byte*~) print_ln::$0 ← (byte*) line_cursor#6 + (byte/signed byte/word/signed word) 40 [ print_ln::$0 char_cursor#10 ] ( main:2::print_ln:35 [ main::i#10 print_ln::$0 char_cursor#10 ] ) always clobbers reg byte a Statement [43] if((byte*~) print_ln::$0<(byte*) char_cursor#10) goto print_ln::@1 [ print_ln::$0 char_cursor#10 ] ( main:2::print_ln:35 [ main::i#10 print_ln::$0 char_cursor#10 ] ) always clobbers reg byte a Statement [45] (byte~) print_word::$0 ← > (word) print_word::w#0 [ char_cursor#32 print_word::w#0 print_word::$0 ] ( main:2::print_word:33 [ main::i#10 line_cursor#13 char_cursor#32 print_word::w#0 print_word::$0 ] ) always clobbers reg byte a @@ -7363,7 +7094,7 @@ Potential registers zp ZP_BYTE:2 [ main::i#10 main::i#1 ] : zp ZP_BYTE:2 , Potential registers zp ZP_PTR_BYTE:3 [ line_cursor#6 line_cursor#13 print_ln::$0 ] : zp ZP_PTR_BYTE:3 , Potential registers zp ZP_BYTE:5 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] : zp ZP_BYTE:5 , reg byte a , reg byte x , Potential registers zp ZP_BYTE:6 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] : zp ZP_BYTE:6 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_PTR_BYTE:7 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#50 char_cursor#10 ] : zp ZP_PTR_BYTE:7 , +Potential registers zp ZP_PTR_BYTE:7 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#48 char_cursor#10 ] : zp ZP_PTR_BYTE:7 , Potential registers zp ZP_PTR_BYTE:9 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 ] : zp ZP_PTR_BYTE:9 , Potential registers zp ZP_PTR_BYTE:11 [ mulFACbyMEM::mem#2 ] : zp ZP_PTR_BYTE:11 , Potential registers zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 ] : zp ZP_WORD:13 , @@ -7385,7 +7116,7 @@ Potential registers zp ZP_BYTE:36 [ prepareMEM::$1 ] : zp ZP_BYTE:36 , reg byte Potential registers zp ZP_PTR_BYTE:37 [ setFAC::$0 ] : zp ZP_PTR_BYTE:37 , REGISTER UPLIFT SCOPES -Uplift Scope [] 250.93: zp ZP_PTR_BYTE:3 [ line_cursor#6 line_cursor#13 print_ln::$0 ] 33.65: zp ZP_PTR_BYTE:7 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#50 char_cursor#10 ] +Uplift Scope [] 250.93: zp ZP_PTR_BYTE:3 [ line_cursor#6 line_cursor#13 print_ln::$0 ] 33.65: zp ZP_PTR_BYTE:7 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#48 char_cursor#10 ] Uplift Scope [main] 22: zp ZP_WORD:17 [ main::$3 ] 22: zp ZP_WORD:21 [ main::$12 ] 12.27: zp ZP_BYTE:2 [ main::i#10 main::i#1 ] Uplift Scope [setFAC] 35: zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 ] 4: zp ZP_PTR_BYTE:37 [ setFAC::$0 ] Uplift Scope [getFAC] 22: zp ZP_WORD:19 [ getFAC::return#2 ] 4.33: zp ZP_WORD:33 [ getFAC::return#0 ] 4: zp ZP_WORD:31 [ getFAC::w#1 ] @@ -7401,7 +7132,7 @@ Uplift Scope [divMEMbyFAC] Uplift Scope [sinFAC] Uplift Scope [divFACby10] -Uplifting [] best 7064 combination zp ZP_PTR_BYTE:3 [ line_cursor#6 line_cursor#13 print_ln::$0 ] zp ZP_PTR_BYTE:7 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#50 char_cursor#10 ] +Uplifting [] best 7064 combination zp ZP_PTR_BYTE:3 [ line_cursor#6 line_cursor#13 print_ln::$0 ] zp ZP_PTR_BYTE:7 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#48 char_cursor#10 ] Uplifting [main] best 7064 combination zp ZP_WORD:17 [ main::$3 ] zp ZP_WORD:21 [ main::$12 ] zp ZP_BYTE:2 [ main::i#10 main::i#1 ] Uplifting [setFAC] best 7064 combination zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 ] zp ZP_PTR_BYTE:37 [ setFAC::$0 ] Uplifting [getFAC] best 7064 combination zp ZP_WORD:19 [ getFAC::return#2 ] zp ZP_WORD:33 [ getFAC::return#0 ] zp ZP_WORD:31 [ getFAC::w#1 ] @@ -7427,7 +7158,7 @@ Coalescing zero page register [ zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 main::$3 Coalescing zero page register [ zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 main::$3 getFAC::return#2 main::$12 ] ] with [ zp ZP_WORD:23 [ print_word::w#0 ] ] Coalescing zero page register [ zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 main::$3 getFAC::return#2 main::$12 print_word::w#0 ] ] with [ zp ZP_WORD:31 [ getFAC::w#1 ] ] Coalescing zero page register [ zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 main::$3 getFAC::return#2 main::$12 print_word::w#0 getFAC::w#1 ] ] with [ zp ZP_WORD:33 [ getFAC::return#0 ] ] -Allocated (was zp ZP_PTR_BYTE:7) zp ZP_PTR_BYTE:5 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#50 char_cursor#10 ] +Allocated (was zp ZP_PTR_BYTE:7) zp ZP_PTR_BYTE:5 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#48 char_cursor#10 ] Allocated (was zp ZP_PTR_BYTE:9) zp ZP_PTR_BYTE:7 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 mulFACbyMEM::mem#2 setMEMtoFAC::mem#2 setFAC::$0 ] Allocated (was zp ZP_WORD:13) zp ZP_WORD:9 [ setFAC::w#3 setFAC::w#1 main::$3 getFAC::return#2 main::$12 print_word::w#0 getFAC::w#1 getFAC::return#0 ] Removing instruction jmp b33 @@ -7477,12 +7208,8 @@ ASSEMBLER //SEG1 Global Constants & labels .const memLo = $fe .const memHi = $ff - .const f_2pi = $e2e5 .label char_cursor = 5 .label line_cursor = 3 - hextab: .byte '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' - f_i: .byte 0, 0, 0, 0, 0 - f_127: .byte 0, 0, 0, 0, 0 //SEG2 @begin bbegin: //SEG3 [1] phi from @begin to @33 [phi:@begin->@33] @@ -7499,6 +7226,7 @@ bend_from_b33: bend: //SEG9 main main: { + .const f_2pi = $e2e5 .label _3 = 9 .label _12 = 9 .label i = 2 @@ -7524,7 +7252,7 @@ main: { //SEG18 [9] call setMEMtoFAC param-assignment [ ] ( main:2 [ ] ) //SEG19 [97] phi from main::@4 to setMEMtoFAC [phi:main::@4->setMEMtoFAC] setMEMtoFAC_from_b4: - //SEG20 [97] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_127#0 [phi:main::@4->setMEMtoFAC#0] -- zpptrby1=cowo1 + //SEG20 [97] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) main::f_127#0 [phi:main::@4->setMEMtoFAC#0] -- zpptrby1=cowo1 lda #f_127 @@ -7566,7 +7294,7 @@ main: { //SEG33 [15] call mulFACbyMEM param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG34 [80] phi from main::@6 to mulFACbyMEM [phi:main::@6->mulFACbyMEM] mulFACbyMEM_from_b6: - //SEG35 [80] phi (byte*) mulFACbyMEM::mem#2 = (const byte*) f_2pi#0 [phi:main::@6->mulFACbyMEM#0] -- zpptrby1=cowo1 + //SEG35 [80] phi (byte*) mulFACbyMEM::mem#2 = (const byte*) main::f_2pi#0 [phi:main::@6->mulFACbyMEM#0] -- zpptrby1=cowo1 lda #f_2pi @@ -7579,7 +7307,7 @@ main: { //SEG38 [17] call setMEMtoFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG39 [97] phi from main::@7 to setMEMtoFAC [phi:main::@7->setMEMtoFAC] setMEMtoFAC_from_b7: - //SEG40 [97] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_i#0 [phi:main::@7->setMEMtoFAC#0] -- zpptrby1=cowo1 + //SEG40 [97] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) main::f_i#0 [phi:main::@7->setMEMtoFAC#0] -- zpptrby1=cowo1 lda #f_i @@ -7619,7 +7347,7 @@ main: { //SEG55 [25] call mulFACbyMEM param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG56 [80] phi from main::@11 to mulFACbyMEM [phi:main::@11->mulFACbyMEM] mulFACbyMEM_from_b11: - //SEG57 [80] phi (byte*) mulFACbyMEM::mem#2 = (const byte[]) f_127#0 [phi:main::@11->mulFACbyMEM#0] -- zpptrby1=cowo1 + //SEG57 [80] phi (byte*) mulFACbyMEM::mem#2 = (const byte[]) main::f_127#0 [phi:main::@11->mulFACbyMEM#0] -- zpptrby1=cowo1 lda #f_127 @@ -7671,7 +7399,7 @@ main: { rts //SEG79 main::@17 b17: - //SEG80 [39] (byte*~) char_cursor#50 ← (byte*~) print_ln::$0 [ main::i#1 char_cursor#50 print_ln::$0 ] ( main:2 [ main::i#1 char_cursor#50 print_ln::$0 ] ) -- zpptrby1=zpptrby2 + //SEG80 [39] (byte*~) char_cursor#48 ← (byte*~) print_ln::$0 [ main::i#1 char_cursor#48 print_ln::$0 ] ( main:2 [ main::i#1 char_cursor#48 print_ln::$0 ] ) -- zpptrby1=zpptrby2 lda print_ln._0 sta char_cursor lda print_ln._0+1 @@ -7679,9 +7407,11 @@ main: { //SEG81 [10] phi from main::@17 to main::@1 [phi:main::@17->main::@1] b1_from_b17: //SEG82 [10] phi (byte*) line_cursor#13 = (byte*~) print_ln::$0 [phi:main::@17->main::@1#0] -- register_copy - //SEG83 [10] phi (byte*) char_cursor#32 = (byte*~) char_cursor#50 [phi:main::@17->main::@1#1] -- register_copy + //SEG83 [10] phi (byte*) char_cursor#32 = (byte*~) char_cursor#48 [phi:main::@17->main::@1#1] -- register_copy //SEG84 [10] phi (byte) main::i#10 = (byte) main::i#1 [phi:main::@17->main::@1#2] -- register_copy jmp b1 + f_i: .byte 0, 0, 0, 0, 0 + f_127: .byte 0, 0, 0, 0, 0 } //SEG85 print_ln print_ln: { @@ -7753,7 +7483,7 @@ print_byte: { lsr lsr tay - //SEG111 [54] (byte~) print_byte::$1 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$0 [ print_byte::b#2 char_cursor#31 print_byte::$1 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_byte::$1 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_byte::$1 ] ) -- aby=cowo1_derefidx_yby + //SEG111 [54] (byte~) print_byte::$1 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$0 [ print_byte::b#2 char_cursor#31 print_byte::$1 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_byte::$1 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_byte::$1 ] ) -- aby=cowo1_derefidx_yby lda hextab,y //SEG112 [55] (byte) print_char::ch#0 ← (byte~) print_byte::$1 [ print_byte::b#2 char_cursor#31 print_char::ch#0 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_char::ch#0 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_char::ch#0 ] ) // (byte) print_char::ch#0 = (byte~) print_byte::$1 // register copy reg byte a @@ -7768,7 +7498,7 @@ print_byte: { //SEG118 [57] (byte~) print_byte::$3 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word) 15 [ char_cursor#10 print_byte::$3 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$3 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$3 ] ) -- aby=xby_band_coby1 txa and #$f - //SEG119 [58] (byte~) print_byte::$4 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$3 [ char_cursor#10 print_byte::$4 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$4 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$4 ] ) -- aby=cowo1_derefidx_aby + //SEG119 [58] (byte~) print_byte::$4 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$3 [ char_cursor#10 print_byte::$4 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$4 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$4 ] ) -- aby=cowo1_derefidx_aby tax lda hextab,x //SEG120 [59] (byte) print_char::ch#1 ← (byte~) print_byte::$4 [ char_cursor#10 print_char::ch#1 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_char::ch#1 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_char::ch#1 ] ) @@ -7783,6 +7513,7 @@ print_byte: { breturn: //SEG126 [61] return [ char_cursor#10 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 ] ) rts + hextab: .byte '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' } //SEG127 print_char print_char: { @@ -7825,10 +7556,10 @@ addMEMtoFAC: { //SEG139 [71] call prepareMEM param-assignment [ ] ( main:2::addMEMtoFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG140 [74] phi from addMEMtoFAC to prepareMEM [phi:addMEMtoFAC->prepareMEM] prepareMEM_from_addMEMtoFAC: - //SEG141 [74] phi (byte*) prepareMEM::mem#5 = (const byte[]) f_127#0 [phi:addMEMtoFAC->prepareMEM#0] -- zpptrby1=cowo1 - lda #prepareMEM#0] -- zpptrby1=cowo1 + lda #f_127 + lda #>main.f_127 sta prepareMEM.mem+1 jsr prepareMEM //SEG142 addMEMtoFAC::@1 @@ -7893,10 +7624,10 @@ divMEMbyFAC: { //SEG167 [88] call prepareMEM param-assignment [ ] ( main:2::divMEMbyFAC:21 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG168 [74] phi from divMEMbyFAC to prepareMEM [phi:divMEMbyFAC->prepareMEM] prepareMEM_from_divMEMbyFAC: - //SEG169 [74] phi (byte*) prepareMEM::mem#5 = (const byte[]) f_i#0 [phi:divMEMbyFAC->prepareMEM#0] -- zpptrby1=cowo1 - lda #prepareMEM#0] -- zpptrby1=cowo1 + lda #f_i + lda #>main.f_i sta prepareMEM.mem+1 jsr prepareMEM //SEG170 divMEMbyFAC::@1 @@ -8004,12 +7735,8 @@ ASSEMBLER //SEG1 Global Constants & labels .const memLo = $fe .const memHi = $ff - .const f_2pi = $e2e5 .label char_cursor = 5 .label line_cursor = 3 - hextab: .byte '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' - f_i: .byte 0, 0, 0, 0, 0 - f_127: .byte 0, 0, 0, 0, 0 //SEG2 @begin //SEG3 [1] phi from @begin to @33 [phi:@begin->@33] //SEG4 @33 @@ -8022,6 +7749,7 @@ b33: bend: //SEG9 main main: { + .const f_2pi = $e2e5 .label _3 = 9 .label _12 = 9 .label i = 2 @@ -8044,7 +7772,7 @@ main: { b4: //SEG18 [9] call setMEMtoFAC param-assignment [ ] ( main:2 [ ] ) //SEG19 [97] phi from main::@4 to setMEMtoFAC [phi:main::@4->setMEMtoFAC] - //SEG20 [97] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_127#0 [phi:main::@4->setMEMtoFAC#0] -- zpptrby1=cowo1 + //SEG20 [97] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) main::f_127#0 [phi:main::@4->setMEMtoFAC#0] -- zpptrby1=cowo1 lda #f_127 @@ -8084,7 +7812,7 @@ main: { b6: //SEG33 [15] call mulFACbyMEM param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG34 [80] phi from main::@6 to mulFACbyMEM [phi:main::@6->mulFACbyMEM] - //SEG35 [80] phi (byte*) mulFACbyMEM::mem#2 = (const byte*) f_2pi#0 [phi:main::@6->mulFACbyMEM#0] -- zpptrby1=cowo1 + //SEG35 [80] phi (byte*) mulFACbyMEM::mem#2 = (const byte*) main::f_2pi#0 [phi:main::@6->mulFACbyMEM#0] -- zpptrby1=cowo1 lda #f_2pi @@ -8095,7 +7823,7 @@ main: { b7: //SEG38 [17] call setMEMtoFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG39 [97] phi from main::@7 to setMEMtoFAC [phi:main::@7->setMEMtoFAC] - //SEG40 [97] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_i#0 [phi:main::@7->setMEMtoFAC#0] -- zpptrby1=cowo1 + //SEG40 [97] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) main::f_i#0 [phi:main::@7->setMEMtoFAC#0] -- zpptrby1=cowo1 lda #f_i @@ -8128,7 +7856,7 @@ main: { b11: //SEG55 [25] call mulFACbyMEM param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG56 [80] phi from main::@11 to mulFACbyMEM [phi:main::@11->mulFACbyMEM] - //SEG57 [80] phi (byte*) mulFACbyMEM::mem#2 = (const byte[]) f_127#0 [phi:main::@11->mulFACbyMEM#0] -- zpptrby1=cowo1 + //SEG57 [80] phi (byte*) mulFACbyMEM::mem#2 = (const byte[]) main::f_127#0 [phi:main::@11->mulFACbyMEM#0] -- zpptrby1=cowo1 lda #f_127 @@ -8175,7 +7903,7 @@ main: { rts //SEG79 main::@17 b17: - //SEG80 [39] (byte*~) char_cursor#50 ← (byte*~) print_ln::$0 [ main::i#1 char_cursor#50 print_ln::$0 ] ( main:2 [ main::i#1 char_cursor#50 print_ln::$0 ] ) -- zpptrby1=zpptrby2 + //SEG80 [39] (byte*~) char_cursor#48 ← (byte*~) print_ln::$0 [ main::i#1 char_cursor#48 print_ln::$0 ] ( main:2 [ main::i#1 char_cursor#48 print_ln::$0 ] ) -- zpptrby1=zpptrby2 lda print_ln._0 sta char_cursor lda print_ln._0+1 @@ -8183,9 +7911,11 @@ main: { //SEG81 [10] phi from main::@17 to main::@1 [phi:main::@17->main::@1] b1_from_b17: //SEG82 [10] phi (byte*) line_cursor#13 = (byte*~) print_ln::$0 [phi:main::@17->main::@1#0] -- register_copy - //SEG83 [10] phi (byte*) char_cursor#32 = (byte*~) char_cursor#50 [phi:main::@17->main::@1#1] -- register_copy + //SEG83 [10] phi (byte*) char_cursor#32 = (byte*~) char_cursor#48 [phi:main::@17->main::@1#1] -- register_copy //SEG84 [10] phi (byte) main::i#10 = (byte) main::i#1 [phi:main::@17->main::@1#2] -- register_copy jmp b1 + f_i: .byte 0, 0, 0, 0, 0 + f_127: .byte 0, 0, 0, 0, 0 } //SEG85 print_ln print_ln: { @@ -8255,7 +7985,7 @@ print_byte: { lsr lsr tay - //SEG111 [54] (byte~) print_byte::$1 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$0 [ print_byte::b#2 char_cursor#31 print_byte::$1 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_byte::$1 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_byte::$1 ] ) -- aby=cowo1_derefidx_yby + //SEG111 [54] (byte~) print_byte::$1 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$0 [ print_byte::b#2 char_cursor#31 print_byte::$1 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_byte::$1 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_byte::$1 ] ) -- aby=cowo1_derefidx_yby lda hextab,y //SEG112 [55] (byte) print_char::ch#0 ← (byte~) print_byte::$1 [ print_byte::b#2 char_cursor#31 print_char::ch#0 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_char::ch#0 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_char::ch#0 ] ) // (byte) print_char::ch#0 = (byte~) print_byte::$1 // register copy reg byte a @@ -8270,7 +8000,7 @@ print_byte: { //SEG118 [57] (byte~) print_byte::$3 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word) 15 [ char_cursor#10 print_byte::$3 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$3 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$3 ] ) -- aby=xby_band_coby1 txa and #$f - //SEG119 [58] (byte~) print_byte::$4 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$3 [ char_cursor#10 print_byte::$4 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$4 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$4 ] ) -- aby=cowo1_derefidx_aby + //SEG119 [58] (byte~) print_byte::$4 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$3 [ char_cursor#10 print_byte::$4 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$4 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$4 ] ) -- aby=cowo1_derefidx_aby tax lda hextab,x //SEG120 [59] (byte) print_char::ch#1 ← (byte~) print_byte::$4 [ char_cursor#10 print_char::ch#1 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_char::ch#1 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_char::ch#1 ] ) @@ -8285,6 +8015,7 @@ print_byte: { breturn: //SEG126 [61] return [ char_cursor#10 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 ] ) rts + hextab: .byte '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' } //SEG127 print_char print_char: { @@ -8327,10 +8058,10 @@ addMEMtoFAC: { //SEG139 [71] call prepareMEM param-assignment [ ] ( main:2::addMEMtoFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG140 [74] phi from addMEMtoFAC to prepareMEM [phi:addMEMtoFAC->prepareMEM] prepareMEM_from_addMEMtoFAC: - //SEG141 [74] phi (byte*) prepareMEM::mem#5 = (const byte[]) f_127#0 [phi:addMEMtoFAC->prepareMEM#0] -- zpptrby1=cowo1 - lda #prepareMEM#0] -- zpptrby1=cowo1 + lda #f_127 + lda #>main.f_127 sta prepareMEM.mem+1 jsr prepareMEM //SEG142 addMEMtoFAC::@1 @@ -8395,10 +8126,10 @@ divMEMbyFAC: { //SEG167 [88] call prepareMEM param-assignment [ ] ( main:2::divMEMbyFAC:21 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG168 [74] phi from divMEMbyFAC to prepareMEM [phi:divMEMbyFAC->prepareMEM] prepareMEM_from_divMEMbyFAC: - //SEG169 [74] phi (byte*) prepareMEM::mem#5 = (const byte[]) f_i#0 [phi:divMEMbyFAC->prepareMEM#0] -- zpptrby1=cowo1 - lda #prepareMEM#0] -- zpptrby1=cowo1 + lda #f_i + lda #>main.f_i sta prepareMEM.mem+1 jsr prepareMEM //SEG170 divMEMbyFAC::@1 @@ -8528,12 +8259,8 @@ ASSEMBLER //SEG1 Global Constants & labels .const memLo = $fe .const memHi = $ff - .const f_2pi = $e2e5 .label char_cursor = 5 .label line_cursor = 3 - hextab: .byte '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' - f_i: .byte 0, 0, 0, 0, 0 - f_127: .byte 0, 0, 0, 0, 0 //SEG2 @begin //SEG3 [1] phi from @begin to @33 [phi:@begin->@33] //SEG4 @33 @@ -8544,6 +8271,7 @@ ASSEMBLER //SEG8 @end //SEG9 main main: { + .const f_2pi = $e2e5 .label _3 = 9 .label _12 = 9 .label i = 2 @@ -8563,7 +8291,7 @@ main: { //SEG17 main::@4 //SEG18 [9] call setMEMtoFAC param-assignment [ ] ( main:2 [ ] ) //SEG19 [97] phi from main::@4 to setMEMtoFAC [phi:main::@4->setMEMtoFAC] - //SEG20 [97] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_127#0 [phi:main::@4->setMEMtoFAC#0] -- zpptrby1=cowo1 + //SEG20 [97] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) main::f_127#0 [phi:main::@4->setMEMtoFAC#0] -- zpptrby1=cowo1 lda #f_127 @@ -8600,7 +8328,7 @@ main: { //SEG32 main::@6 //SEG33 [15] call mulFACbyMEM param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG34 [80] phi from main::@6 to mulFACbyMEM [phi:main::@6->mulFACbyMEM] - //SEG35 [80] phi (byte*) mulFACbyMEM::mem#2 = (const byte*) f_2pi#0 [phi:main::@6->mulFACbyMEM#0] -- zpptrby1=cowo1 + //SEG35 [80] phi (byte*) mulFACbyMEM::mem#2 = (const byte*) main::f_2pi#0 [phi:main::@6->mulFACbyMEM#0] -- zpptrby1=cowo1 lda #f_2pi @@ -8610,7 +8338,7 @@ main: { //SEG37 main::@7 //SEG38 [17] call setMEMtoFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG39 [97] phi from main::@7 to setMEMtoFAC [phi:main::@7->setMEMtoFAC] - //SEG40 [97] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_i#0 [phi:main::@7->setMEMtoFAC#0] -- zpptrby1=cowo1 + //SEG40 [97] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) main::f_i#0 [phi:main::@7->setMEMtoFAC#0] -- zpptrby1=cowo1 lda #f_i @@ -8639,7 +8367,7 @@ main: { //SEG54 main::@11 //SEG55 [25] call mulFACbyMEM param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG56 [80] phi from main::@11 to mulFACbyMEM [phi:main::@11->mulFACbyMEM] - //SEG57 [80] phi (byte*) mulFACbyMEM::mem#2 = (const byte[]) f_127#0 [phi:main::@11->mulFACbyMEM#0] -- zpptrby1=cowo1 + //SEG57 [80] phi (byte*) mulFACbyMEM::mem#2 = (const byte[]) main::f_127#0 [phi:main::@11->mulFACbyMEM#0] -- zpptrby1=cowo1 lda #f_127 @@ -8680,16 +8408,18 @@ main: { rts //SEG79 main::@17 b17: - //SEG80 [39] (byte*~) char_cursor#50 ← (byte*~) print_ln::$0 [ main::i#1 char_cursor#50 print_ln::$0 ] ( main:2 [ main::i#1 char_cursor#50 print_ln::$0 ] ) -- zpptrby1=zpptrby2 + //SEG80 [39] (byte*~) char_cursor#48 ← (byte*~) print_ln::$0 [ main::i#1 char_cursor#48 print_ln::$0 ] ( main:2 [ main::i#1 char_cursor#48 print_ln::$0 ] ) -- zpptrby1=zpptrby2 lda print_ln._0 sta char_cursor lda print_ln._0+1 sta char_cursor+1 //SEG81 [10] phi from main::@17 to main::@1 [phi:main::@17->main::@1] //SEG82 [10] phi (byte*) line_cursor#13 = (byte*~) print_ln::$0 [phi:main::@17->main::@1#0] -- register_copy - //SEG83 [10] phi (byte*) char_cursor#32 = (byte*~) char_cursor#50 [phi:main::@17->main::@1#1] -- register_copy + //SEG83 [10] phi (byte*) char_cursor#32 = (byte*~) char_cursor#48 [phi:main::@17->main::@1#1] -- register_copy //SEG84 [10] phi (byte) main::i#10 = (byte) main::i#1 [phi:main::@17->main::@1#2] -- register_copy jmp b1 + f_i: .byte 0, 0, 0, 0, 0 + f_127: .byte 0, 0, 0, 0, 0 } //SEG85 print_ln print_ln: { @@ -8754,7 +8484,7 @@ print_byte: { lsr lsr tay - //SEG111 [54] (byte~) print_byte::$1 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$0 [ print_byte::b#2 char_cursor#31 print_byte::$1 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_byte::$1 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_byte::$1 ] ) -- aby=cowo1_derefidx_yby + //SEG111 [54] (byte~) print_byte::$1 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$0 [ print_byte::b#2 char_cursor#31 print_byte::$1 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_byte::$1 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_byte::$1 ] ) -- aby=cowo1_derefidx_yby lda hextab,y //SEG112 [55] (byte) print_char::ch#0 ← (byte~) print_byte::$1 [ print_byte::b#2 char_cursor#31 print_char::ch#0 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_char::ch#0 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_char::ch#0 ] ) // (byte) print_char::ch#0 = (byte~) print_byte::$1 // register copy reg byte a @@ -8767,7 +8497,7 @@ print_byte: { //SEG118 [57] (byte~) print_byte::$3 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word) 15 [ char_cursor#10 print_byte::$3 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$3 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$3 ] ) -- aby=xby_band_coby1 txa and #$f - //SEG119 [58] (byte~) print_byte::$4 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$3 [ char_cursor#10 print_byte::$4 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$4 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$4 ] ) -- aby=cowo1_derefidx_aby + //SEG119 [58] (byte~) print_byte::$4 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$3 [ char_cursor#10 print_byte::$4 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$4 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$4 ] ) -- aby=cowo1_derefidx_aby tax lda hextab,x //SEG120 [59] (byte) print_char::ch#1 ← (byte~) print_byte::$4 [ char_cursor#10 print_char::ch#1 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_char::ch#1 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_char::ch#1 ] ) @@ -8780,6 +8510,7 @@ print_byte: { //SEG125 print_byte::@return //SEG126 [61] return [ char_cursor#10 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 ] ) rts + hextab: .byte '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' } //SEG127 print_char print_char: { @@ -8819,10 +8550,10 @@ getFAC: { addMEMtoFAC: { //SEG139 [71] call prepareMEM param-assignment [ ] ( main:2::addMEMtoFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG140 [74] phi from addMEMtoFAC to prepareMEM [phi:addMEMtoFAC->prepareMEM] - //SEG141 [74] phi (byte*) prepareMEM::mem#5 = (const byte[]) f_127#0 [phi:addMEMtoFAC->prepareMEM#0] -- zpptrby1=cowo1 - lda #prepareMEM#0] -- zpptrby1=cowo1 + lda #f_127 + lda #>main.f_127 sta prepareMEM.mem+1 jsr prepareMEM //SEG142 addMEMtoFAC::@1 @@ -8879,10 +8610,10 @@ sinFAC: { divMEMbyFAC: { //SEG167 [88] call prepareMEM param-assignment [ ] ( main:2::divMEMbyFAC:21 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG168 [74] phi from divMEMbyFAC to prepareMEM [phi:divMEMbyFAC->prepareMEM] - //SEG169 [74] phi (byte*) prepareMEM::mem#5 = (const byte[]) f_i#0 [phi:divMEMbyFAC->prepareMEM#0] -- zpptrby1=cowo1 - lda #prepareMEM#0] -- zpptrby1=cowo1 + lda #f_i + lda #>main.f_i sta prepareMEM.mem+1 jsr prepareMEM //SEG170 divMEMbyFAC::@1 @@ -8958,19 +8689,13 @@ FINAL SYMBOL TABLE (byte*) char_cursor#23 char_cursor zp ZP_PTR_BYTE:5 4.0 (byte*) char_cursor#31 char_cursor zp ZP_PTR_BYTE:5 1.5 (byte*) char_cursor#32 char_cursor zp ZP_PTR_BYTE:5 0.52 -(byte*~) char_cursor#50 char_cursor zp ZP_PTR_BYTE:5 22.0 +(byte*~) char_cursor#48 char_cursor zp ZP_PTR_BYTE:5 22.0 (void()) divFACby10() (label) divFACby10::@return (void()) divMEMbyFAC((byte*) divMEMbyFAC::mem) (label) divMEMbyFAC::@1 (label) divMEMbyFAC::@return (byte*) divMEMbyFAC::mem -(byte[]) f_127 -(const byte[]) f_127#0 f_127 = { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } -(byte*) f_2pi -(const byte*) f_2pi#0 f_2pi = ((byte*))(word) 58085 -(byte[]) f_i -(const byte[]) f_i#0 f_i = { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (word()) getFAC() (label) getFAC::@return (word) getFAC::return @@ -8978,8 +8703,6 @@ FINAL SYMBOL TABLE (word) getFAC::return#2 return zp ZP_WORD:9 22.0 (word) getFAC::w (word) getFAC::w#1 w zp ZP_WORD:9 4.0 -(byte[]) hextab -(const byte[]) hextab#0 hextab = { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } (byte*) line_cursor (byte*) line_cursor#13 line_cursor zp ZP_PTR_BYTE:3 0.5 (byte*) line_cursor#6 line_cursor zp ZP_PTR_BYTE:3 204.0 @@ -9002,6 +8725,12 @@ FINAL SYMBOL TABLE (label) main::@8 (label) main::@9 (label) main::@return +(byte[]) main::f_127 +(const byte[]) main::f_127#0 f_127 = { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } +(byte*) main::f_2pi +(const byte*) main::f_2pi#0 f_2pi = ((byte*))(word) 58085 +(byte[]) main::f_i +(const byte[]) main::f_i#0 f_i = { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (byte) main::i (byte) main::i#1 i zp ZP_BYTE:2 11.0 (byte) main::i#10 i zp ZP_BYTE:2 1.2692307692307692 @@ -9034,6 +8763,8 @@ FINAL SYMBOL TABLE (byte) print_byte::b#0 reg byte x 4.0 (byte) print_byte::b#1 reg byte x 4.0 (byte) print_byte::b#2 reg byte x 1.6 +(byte[]) print_byte::hextab +(const byte[]) print_byte::hextab#0 hextab = { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } (void()) print_char((byte) print_char::ch) (label) print_char::@return (byte) print_char::ch @@ -9070,7 +8801,7 @@ zp ZP_BYTE:2 [ main::i#10 main::i#1 ] zp ZP_PTR_BYTE:3 [ line_cursor#6 line_cursor#13 print_ln::$0 ] reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] -zp ZP_PTR_BYTE:5 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#50 char_cursor#10 ] +zp ZP_PTR_BYTE:5 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#48 char_cursor#10 ] zp ZP_PTR_BYTE:7 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 mulFACbyMEM::mem#2 setMEMtoFAC::mem#2 setFAC::$0 ] zp ZP_WORD:9 [ setFAC::w#3 setFAC::w#1 main::$3 getFAC::return#2 main::$12 print_word::w#0 getFAC::w#1 getFAC::return#0 ] reg byte a [ print_word::$0 ] @@ -9090,12 +8821,8 @@ FINAL CODE //SEG1 Global Constants & labels .const memLo = $fe .const memHi = $ff - .const f_2pi = $e2e5 .label char_cursor = 5 .label line_cursor = 3 - hextab: .byte '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' - f_i: .byte 0, 0, 0, 0, 0 - f_127: .byte 0, 0, 0, 0, 0 //SEG2 @begin //SEG3 [1] phi from @begin to @33 [phi:@begin->@33] //SEG4 @33 @@ -9106,6 +8833,7 @@ FINAL CODE //SEG8 @end //SEG9 main main: { + .const f_2pi = $e2e5 .label _3 = 9 .label _12 = 9 .label i = 2 @@ -9125,7 +8853,7 @@ main: { //SEG17 main::@4 //SEG18 [9] call setMEMtoFAC param-assignment [ ] ( main:2 [ ] ) //SEG19 [97] phi from main::@4 to setMEMtoFAC [phi:main::@4->setMEMtoFAC] - //SEG20 [97] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_127#0 [phi:main::@4->setMEMtoFAC#0] -- zpptrby1=cowo1 + //SEG20 [97] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) main::f_127#0 [phi:main::@4->setMEMtoFAC#0] -- zpptrby1=cowo1 lda #f_127 @@ -9162,7 +8890,7 @@ main: { //SEG32 main::@6 //SEG33 [15] call mulFACbyMEM param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG34 [80] phi from main::@6 to mulFACbyMEM [phi:main::@6->mulFACbyMEM] - //SEG35 [80] phi (byte*) mulFACbyMEM::mem#2 = (const byte*) f_2pi#0 [phi:main::@6->mulFACbyMEM#0] -- zpptrby1=cowo1 + //SEG35 [80] phi (byte*) mulFACbyMEM::mem#2 = (const byte*) main::f_2pi#0 [phi:main::@6->mulFACbyMEM#0] -- zpptrby1=cowo1 lda #f_2pi @@ -9172,7 +8900,7 @@ main: { //SEG37 main::@7 //SEG38 [17] call setMEMtoFAC param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG39 [97] phi from main::@7 to setMEMtoFAC [phi:main::@7->setMEMtoFAC] - //SEG40 [97] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) f_i#0 [phi:main::@7->setMEMtoFAC#0] -- zpptrby1=cowo1 + //SEG40 [97] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) main::f_i#0 [phi:main::@7->setMEMtoFAC#0] -- zpptrby1=cowo1 lda #f_i @@ -9201,7 +8929,7 @@ main: { //SEG54 main::@11 //SEG55 [25] call mulFACbyMEM param-assignment [ main::i#10 char_cursor#32 line_cursor#13 ] ( main:2 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG56 [80] phi from main::@11 to mulFACbyMEM [phi:main::@11->mulFACbyMEM] - //SEG57 [80] phi (byte*) mulFACbyMEM::mem#2 = (const byte[]) f_127#0 [phi:main::@11->mulFACbyMEM#0] -- zpptrby1=cowo1 + //SEG57 [80] phi (byte*) mulFACbyMEM::mem#2 = (const byte[]) main::f_127#0 [phi:main::@11->mulFACbyMEM#0] -- zpptrby1=cowo1 lda #f_127 @@ -9242,16 +8970,18 @@ main: { rts //SEG79 main::@17 b17: - //SEG80 [39] (byte*~) char_cursor#50 ← (byte*~) print_ln::$0 [ main::i#1 char_cursor#50 print_ln::$0 ] ( main:2 [ main::i#1 char_cursor#50 print_ln::$0 ] ) -- zpptrby1=zpptrby2 + //SEG80 [39] (byte*~) char_cursor#48 ← (byte*~) print_ln::$0 [ main::i#1 char_cursor#48 print_ln::$0 ] ( main:2 [ main::i#1 char_cursor#48 print_ln::$0 ] ) -- zpptrby1=zpptrby2 lda print_ln._0 sta char_cursor lda print_ln._0+1 sta char_cursor+1 //SEG81 [10] phi from main::@17 to main::@1 [phi:main::@17->main::@1] //SEG82 [10] phi (byte*) line_cursor#13 = (byte*~) print_ln::$0 [phi:main::@17->main::@1#0] -- register_copy - //SEG83 [10] phi (byte*) char_cursor#32 = (byte*~) char_cursor#50 [phi:main::@17->main::@1#1] -- register_copy + //SEG83 [10] phi (byte*) char_cursor#32 = (byte*~) char_cursor#48 [phi:main::@17->main::@1#1] -- register_copy //SEG84 [10] phi (byte) main::i#10 = (byte) main::i#1 [phi:main::@17->main::@1#2] -- register_copy jmp b1 + f_i: .byte 0, 0, 0, 0, 0 + f_127: .byte 0, 0, 0, 0, 0 } //SEG85 print_ln print_ln: { @@ -9316,7 +9046,7 @@ print_byte: { lsr lsr tay - //SEG111 [54] (byte~) print_byte::$1 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$0 [ print_byte::b#2 char_cursor#31 print_byte::$1 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_byte::$1 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_byte::$1 ] ) -- aby=cowo1_derefidx_yby + //SEG111 [54] (byte~) print_byte::$1 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$0 [ print_byte::b#2 char_cursor#31 print_byte::$1 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_byte::$1 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_byte::$1 ] ) -- aby=cowo1_derefidx_yby lda hextab,y //SEG112 [55] (byte) print_char::ch#0 ← (byte~) print_byte::$1 [ print_byte::b#2 char_cursor#31 print_char::ch#0 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 print_byte::b#2 char_cursor#31 print_char::ch#0 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 print_byte::b#2 char_cursor#31 print_char::ch#0 ] ) // (byte) print_char::ch#0 = (byte~) print_byte::$1 // register copy reg byte a @@ -9329,7 +9059,7 @@ print_byte: { //SEG118 [57] (byte~) print_byte::$3 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word) 15 [ char_cursor#10 print_byte::$3 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$3 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$3 ] ) -- aby=xby_band_coby1 txa and #$f - //SEG119 [58] (byte~) print_byte::$4 ← (const byte[]) hextab#0 *idx (byte~) print_byte::$3 [ char_cursor#10 print_byte::$4 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$4 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$4 ] ) -- aby=cowo1_derefidx_aby + //SEG119 [58] (byte~) print_byte::$4 ← (const byte[]) print_byte::hextab#0 *idx (byte~) print_byte::$3 [ char_cursor#10 print_byte::$4 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_byte::$4 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_byte::$4 ] ) -- aby=cowo1_derefidx_aby tax lda hextab,x //SEG120 [59] (byte) print_char::ch#1 ← (byte~) print_byte::$4 [ char_cursor#10 print_char::ch#1 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 print_char::ch#1 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 print_char::ch#1 ] ) @@ -9342,6 +9072,7 @@ print_byte: { //SEG125 print_byte::@return //SEG126 [61] return [ char_cursor#10 ] ( main:2::print_word:33::print_byte:47 [ main::i#10 line_cursor#13 print_word::w#0 char_cursor#10 ] main:2::print_word:33::print_byte:50 [ main::i#10 line_cursor#13 char_cursor#10 ] ) rts + hextab: .byte '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' } //SEG127 print_char print_char: { @@ -9381,10 +9112,10 @@ getFAC: { addMEMtoFAC: { //SEG139 [71] call prepareMEM param-assignment [ ] ( main:2::addMEMtoFAC:27 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG140 [74] phi from addMEMtoFAC to prepareMEM [phi:addMEMtoFAC->prepareMEM] - //SEG141 [74] phi (byte*) prepareMEM::mem#5 = (const byte[]) f_127#0 [phi:addMEMtoFAC->prepareMEM#0] -- zpptrby1=cowo1 - lda #prepareMEM#0] -- zpptrby1=cowo1 + lda #f_127 + lda #>main.f_127 sta prepareMEM.mem+1 jsr prepareMEM //SEG142 addMEMtoFAC::@1 @@ -9441,10 +9172,10 @@ sinFAC: { divMEMbyFAC: { //SEG167 [88] call prepareMEM param-assignment [ ] ( main:2::divMEMbyFAC:21 [ main::i#10 char_cursor#32 line_cursor#13 ] ) //SEG168 [74] phi from divMEMbyFAC to prepareMEM [phi:divMEMbyFAC->prepareMEM] - //SEG169 [74] phi (byte*) prepareMEM::mem#5 = (const byte[]) f_i#0 [phi:divMEMbyFAC->prepareMEM#0] -- zpptrby1=cowo1 - lda #prepareMEM#0] -- zpptrby1=cowo1 + lda #f_i + lda #>main.f_i sta prepareMEM.mem+1 jsr prepareMEM //SEG170 divMEMbyFAC::@1 diff --git a/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.sym b/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.sym index e796bd99e..7db8554ad 100644 --- a/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.sym +++ b/src/main/java/dk/camelot64/kickc/test/ref/sinus-basic.sym @@ -10,19 +10,13 @@ (byte*) char_cursor#23 char_cursor zp ZP_PTR_BYTE:5 4.0 (byte*) char_cursor#31 char_cursor zp ZP_PTR_BYTE:5 1.5 (byte*) char_cursor#32 char_cursor zp ZP_PTR_BYTE:5 0.52 -(byte*~) char_cursor#50 char_cursor zp ZP_PTR_BYTE:5 22.0 +(byte*~) char_cursor#48 char_cursor zp ZP_PTR_BYTE:5 22.0 (void()) divFACby10() (label) divFACby10::@return (void()) divMEMbyFAC((byte*) divMEMbyFAC::mem) (label) divMEMbyFAC::@1 (label) divMEMbyFAC::@return (byte*) divMEMbyFAC::mem -(byte[]) f_127 -(const byte[]) f_127#0 f_127 = { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } -(byte*) f_2pi -(const byte*) f_2pi#0 f_2pi = ((byte*))(word) 58085 -(byte[]) f_i -(const byte[]) f_i#0 f_i = { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (word()) getFAC() (label) getFAC::@return (word) getFAC::return @@ -30,8 +24,6 @@ (word) getFAC::return#2 return zp ZP_WORD:9 22.0 (word) getFAC::w (word) getFAC::w#1 w zp ZP_WORD:9 4.0 -(byte[]) hextab -(const byte[]) hextab#0 hextab = { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } (byte*) line_cursor (byte*) line_cursor#13 line_cursor zp ZP_PTR_BYTE:3 0.5 (byte*) line_cursor#6 line_cursor zp ZP_PTR_BYTE:3 204.0 @@ -54,6 +46,12 @@ (label) main::@8 (label) main::@9 (label) main::@return +(byte[]) main::f_127 +(const byte[]) main::f_127#0 f_127 = { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } +(byte*) main::f_2pi +(const byte*) main::f_2pi#0 f_2pi = ((byte*))(word) 58085 +(byte[]) main::f_i +(const byte[]) main::f_i#0 f_i = { (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0, (byte/signed byte/word/signed word) 0 } (byte) main::i (byte) main::i#1 i zp ZP_BYTE:2 11.0 (byte) main::i#10 i zp ZP_BYTE:2 1.2692307692307692 @@ -86,6 +84,8 @@ (byte) print_byte::b#0 reg byte x 4.0 (byte) print_byte::b#1 reg byte x 4.0 (byte) print_byte::b#2 reg byte x 1.6 +(byte[]) print_byte::hextab +(const byte[]) print_byte::hextab#0 hextab = { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' } (void()) print_char((byte) print_char::ch) (label) print_char::@return (byte) print_char::ch @@ -122,7 +122,7 @@ zp ZP_BYTE:2 [ main::i#10 main::i#1 ] zp ZP_PTR_BYTE:3 [ line_cursor#6 line_cursor#13 print_ln::$0 ] reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] -zp ZP_PTR_BYTE:5 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#50 char_cursor#10 ] +zp ZP_PTR_BYTE:5 [ char_cursor#23 char_cursor#31 char_cursor#32 char_cursor#48 char_cursor#10 ] zp ZP_PTR_BYTE:7 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 mulFACbyMEM::mem#2 setMEMtoFAC::mem#2 setFAC::$0 ] zp ZP_WORD:9 [ setFAC::w#3 setFAC::w#1 main::$3 getFAC::return#2 main::$12 print_word::w#0 getFAC::w#1 getFAC::return#0 ] reg byte a [ print_word::$0 ] diff --git a/src/main/java/dk/camelot64/kickc/test/sinus-basic.kc b/src/main/java/dk/camelot64/kickc/test/sinus-basic.kc index 30246580b..a7b357aa5 100644 --- a/src/main/java/dk/camelot64/kickc/test/sinus-basic.kc +++ b/src/main/java/dk/camelot64/kickc/test/sinus-basic.kc @@ -1,11 +1,10 @@ import "print" import "basic-floats" -byte[] f_i = {0, 0, 0, 0, 0}; -byte[] f_127 = {0, 0, 0, 0, 0}; -byte* f_2pi = $e2e5; - void main() { + byte[] f_i = {0, 0, 0, 0, 0}; + byte[] f_127 = {0, 0, 0, 0, 0}; + const byte* f_2pi = $e2e5; setFAC(1275); divFACby10(); setMEMtoFAC(f_127);