1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-16 21:07:56 +00:00
kickc/src/test/ref/multiply-ns.log

865 lines
39 KiB
Plaintext
Raw Normal View History

CONTROL FLOW GRAPH SSA
2020-10-05 20:58:02 +00:00
void main()
main: scope:[main] from __start
2020-10-05 20:58:02 +00:00
main::i#0 = 0
to:main::@1
main::@1: scope:[main] from main main::@1
2020-10-05 20:58:02 +00:00
main::i#2 = phi( main/main::i#0, main::@1/main::i#1 )
main::$0 = main::i#2 * 1
(main::SCREEN+0*$28)[main::i#2] = main::$0
main::$1 = main::i#2 * 2
(main::SCREEN+1*$28)[main::i#2] = main::$1
main::$2 = main::i#2 * 3
(main::SCREEN+2*$28)[main::i#2] = main::$2
main::$3 = main::i#2 * 4
(main::SCREEN+3*$28)[main::i#2] = main::$3
main::$4 = main::i#2 * 5
(main::SCREEN+4*$28)[main::i#2] = main::$4
main::$5 = main::i#2 * 6
(main::SCREEN+5*$28)[main::i#2] = main::$5
main::$6 = main::i#2 * 7
(main::SCREEN+6*$28)[main::i#2] = main::$6
main::$7 = main::i#2 * 8
(main::SCREEN+7*$28)[main::i#2] = main::$7
main::$8 = main::i#2 * 9
(main::SCREEN+8*$28)[main::i#2] = main::$8
main::$9 = main::i#2 * $a
(main::SCREEN+9*$28)[main::i#2] = main::$9
main::$10 = main::i#2 * $b
(main::SCREEN+$a*$28)[main::i#2] = main::$10
main::$11 = main::i#2 * $c
(main::SCREEN+$b*$28)[main::i#2] = main::$11
main::$12 = main::i#2 * $d
(main::SCREEN+$c*$28)[main::i#2] = main::$12
main::$13 = main::i#2 * $e
(main::SCREEN+$d*$28)[main::i#2] = main::$13
main::$14 = main::i#2 * $f
(main::SCREEN+$e*$28)[main::i#2] = main::$14
main::i#1 = main::i#2 + rangenext(0,$11)
main::$15 = main::i#1 != rangelast(0,$11)
if(main::$15) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@1
return
to:@return
2020-06-27 19:18:00 +00:00
2020-10-05 20:58:02 +00:00
void __start()
__start: scope:[__start] from
call main
to:__start::@1
__start::@1: scope:[__start] from __start
to:__start::@return
__start::@return: scope:[__start] from __start::@1
2020-06-27 19:18:00 +00:00
return
to:@return
SYMBOL TABLE SSA
2020-10-05 20:58:02 +00:00
void __start()
void main()
number~ main::$0
number~ main::$1
number~ main::$10
number~ main::$11
number~ main::$12
number~ main::$13
number~ main::$14
bool~ main::$15
number~ main::$2
number~ main::$3
number~ main::$4
number~ main::$5
number~ main::$6
number~ main::$7
number~ main::$8
number~ main::$9
const nomodify byte* main::SCREEN = (byte*)$400
byte main::i
byte main::i#0
byte main::i#1
byte main::i#2
2020-10-05 20:58:02 +00:00
Adding number conversion cast (unumber) 1 in main::$0 = main::i#2 * 1
Adding number conversion cast (unumber) main::$0 in main::$0 = main::i#2 * (unumber)1
Adding number conversion cast (unumber) 0*$28 in (main::SCREEN+0*$28)[main::i#2] = main::$0
Adding number conversion cast (unumber) 2 in main::$1 = main::i#2 * 2
Adding number conversion cast (unumber) main::$1 in main::$1 = main::i#2 * (unumber)2
Adding number conversion cast (unumber) 1*$28 in (main::SCREEN+1*$28)[main::i#2] = main::$1
Adding number conversion cast (unumber) 3 in main::$2 = main::i#2 * 3
Adding number conversion cast (unumber) main::$2 in main::$2 = main::i#2 * (unumber)3
Adding number conversion cast (unumber) 2*$28 in (main::SCREEN+2*$28)[main::i#2] = main::$2
Adding number conversion cast (unumber) 4 in main::$3 = main::i#2 * 4
Adding number conversion cast (unumber) main::$3 in main::$3 = main::i#2 * (unumber)4
Adding number conversion cast (unumber) 3*$28 in (main::SCREEN+3*$28)[main::i#2] = main::$3
Adding number conversion cast (unumber) 5 in main::$4 = main::i#2 * 5
Adding number conversion cast (unumber) main::$4 in main::$4 = main::i#2 * (unumber)5
Adding number conversion cast (unumber) 4*$28 in (main::SCREEN+4*$28)[main::i#2] = main::$4
Adding number conversion cast (unumber) 6 in main::$5 = main::i#2 * 6
Adding number conversion cast (unumber) main::$5 in main::$5 = main::i#2 * (unumber)6
Adding number conversion cast (unumber) 5*$28 in (main::SCREEN+5*$28)[main::i#2] = main::$5
Adding number conversion cast (unumber) 7 in main::$6 = main::i#2 * 7
Adding number conversion cast (unumber) main::$6 in main::$6 = main::i#2 * (unumber)7
Adding number conversion cast (unumber) 6*$28 in (main::SCREEN+6*$28)[main::i#2] = main::$6
Adding number conversion cast (unumber) 8 in main::$7 = main::i#2 * 8
Adding number conversion cast (unumber) main::$7 in main::$7 = main::i#2 * (unumber)8
Adding number conversion cast (unumber) 7*$28 in (main::SCREEN+7*$28)[main::i#2] = main::$7
Adding number conversion cast (unumber) 9 in main::$8 = main::i#2 * 9
Adding number conversion cast (unumber) main::$8 in main::$8 = main::i#2 * (unumber)9
Adding number conversion cast (unumber) 8*$28 in (main::SCREEN+8*$28)[main::i#2] = main::$8
Adding number conversion cast (unumber) $a in main::$9 = main::i#2 * $a
Adding number conversion cast (unumber) main::$9 in main::$9 = main::i#2 * (unumber)$a
Adding number conversion cast (unumber) 9*$28 in (main::SCREEN+9*$28)[main::i#2] = main::$9
Adding number conversion cast (unumber) $b in main::$10 = main::i#2 * $b
Adding number conversion cast (unumber) main::$10 in main::$10 = main::i#2 * (unumber)$b
Adding number conversion cast (unumber) $a*$28 in (main::SCREEN+$a*$28)[main::i#2] = main::$10
Adding number conversion cast (unumber) $c in main::$11 = main::i#2 * $c
Adding number conversion cast (unumber) main::$11 in main::$11 = main::i#2 * (unumber)$c
Adding number conversion cast (unumber) $b*$28 in (main::SCREEN+$b*$28)[main::i#2] = main::$11
Adding number conversion cast (unumber) $d in main::$12 = main::i#2 * $d
Adding number conversion cast (unumber) main::$12 in main::$12 = main::i#2 * (unumber)$d
Adding number conversion cast (unumber) $c*$28 in (main::SCREEN+$c*$28)[main::i#2] = main::$12
Adding number conversion cast (unumber) $e in main::$13 = main::i#2 * $e
Adding number conversion cast (unumber) main::$13 in main::$13 = main::i#2 * (unumber)$e
Adding number conversion cast (unumber) $d*$28 in (main::SCREEN+$d*$28)[main::i#2] = main::$13
Adding number conversion cast (unumber) $f in main::$14 = main::i#2 * $f
Adding number conversion cast (unumber) main::$14 in main::$14 = main::i#2 * (unumber)$f
Adding number conversion cast (unumber) $e*$28 in (main::SCREEN+$e*$28)[main::i#2] = main::$14
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 7
Simplifying constant integer cast 8
Simplifying constant integer cast 9
Simplifying constant integer cast $a
Simplifying constant integer cast $b
Simplifying constant integer cast $c
Simplifying constant integer cast $d
Simplifying constant integer cast $e
Simplifying constant integer cast $f
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 5
Finalized unsigned number type (byte) 6
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 9
Finalized unsigned number type (byte) $a
Finalized unsigned number type (byte) $b
Finalized unsigned number type (byte) $c
Finalized unsigned number type (byte) $d
Finalized unsigned number type (byte) $e
Finalized unsigned number type (byte) $f
Successful SSA optimization PassNFinalizeNumberTypeConversions
2020-10-05 20:58:02 +00:00
Inferred type updated to byte in main::$0 = main::i#2 * 1
Inferred type updated to byte in main::$1 = main::i#2 * 2
Inferred type updated to byte in main::$2 = main::i#2 * 3
Inferred type updated to byte in main::$3 = main::i#2 * 4
Inferred type updated to byte in main::$4 = main::i#2 * 5
Inferred type updated to byte in main::$5 = main::i#2 * 6
Inferred type updated to byte in main::$6 = main::i#2 * 7
Inferred type updated to byte in main::$7 = main::i#2 * 8
Inferred type updated to byte in main::$8 = main::i#2 * 9
Inferred type updated to byte in main::$9 = main::i#2 * $a
Inferred type updated to byte in main::$10 = main::i#2 * $b
Inferred type updated to byte in main::$11 = main::i#2 * $c
Inferred type updated to byte in main::$12 = main::i#2 * $d
Inferred type updated to byte in main::$13 = main::i#2 * $e
Inferred type updated to byte in main::$14 = main::i#2 * $f
Simple Condition main::$15 [34] if(main::i#1!=rangelast(0,$11)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
2020-10-05 20:58:02 +00:00
Constant main::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
2020-10-05 20:58:02 +00:00
Resolved ranged next value [32] main::i#1 = ++ main::i#2 to ++
Resolved ranged comparison value [34] if(main::i#1!=rangelast(0,$11)) goto main::@1 to $12
Simplifying constant evaluating to zero (byte)0*$28 in [3] (main::SCREEN+(byte)0*$28)[main::i#2] = main::$0
Successful SSA optimization PassNSimplifyConstantZero
2020-10-05 20:58:02 +00:00
Simplifying expression containing zero main::SCREEN in [3] (main::SCREEN+0)[main::i#2] = main::$0
Successful SSA optimization PassNSimplifyExpressionWithZero
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
2020-06-27 19:18:00 +00:00
Successful SSA optimization PassNEliminateEmptyStart
2020-10-05 20:58:02 +00:00
Adding number conversion cast (unumber) $12 in [32] if(main::i#1!=$12) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast $12
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $12
Successful SSA optimization PassNFinalizeNumberTypeConversions
2020-10-05 20:58:02 +00:00
Rewriting multiplication to remove identity multiply/divide [1] main::$0 = main::i#2 * 1
Rewriting multiplication to use shift [3] main::$1 = main::i#2 * 2
Rewriting multiplication to use shift and addition[5] main::$2 = main::i#2 * 3
Rewriting multiplication to use shift [7] main::$3 = main::i#2 * 4
Rewriting multiplication to use shift and addition[9] main::$4 = main::i#2 * 5
Rewriting multiplication to use shift and addition[11] main::$5 = main::i#2 * 6
Rewriting multiplication to use shift and addition[13] main::$6 = main::i#2 * 7
Rewriting multiplication to use shift [15] main::$7 = main::i#2 * 8
Rewriting multiplication to use shift and addition[17] main::$8 = main::i#2 * 9
Rewriting multiplication to use shift and addition[19] main::$9 = main::i#2 * $a
Rewriting multiplication to use shift and addition[21] main::$10 = main::i#2 * $b
Rewriting multiplication to use shift and addition[23] main::$11 = main::i#2 * $c
Rewriting multiplication to use shift and addition[25] main::$12 = main::i#2 * $d
Rewriting multiplication to use shift and addition[27] main::$13 = main::i#2 * $e
Rewriting multiplication to use shift and addition[29] main::$14 = main::i#2 * $f
Successful SSA optimization Pass2MultiplyToShiftRewriting
2020-10-05 20:58:02 +00:00
Inlining constant with var siblings main::i#0
Constant inlined main::i#0 = 0
Successful SSA optimization Pass2ConstantInlining
Alias main::i#2 = main::$0
Alias main::$2 = main::$17
Alias main::$4 = main::$19
Alias main::$5 = main::$22
Alias main::$6 = main::$26
Alias main::$8 = main::$28
Alias main::$9 = main::$31
Alias main::$10 = main::$35
Alias main::$11 = main::$38
Alias main::$12 = main::$42
Alias main::$13 = main::$47
Alias main::$14 = main::$53
Successful SSA optimization Pass2AliasElimination
2020-10-05 20:58:02 +00:00
Identified duplicate assignment right side [5] main::$16 = main::i#2 << 1
Identified duplicate assignment right side [11] main::$18 = main::i#2 << 2
Identified duplicate assignment right side [15] main::$20 = main::i#2 << 1
Identified duplicate assignment right side [20] main::$23 = main::i#2 << 1
Identified duplicate assignment right side [28] main::$27 = main::i#2 << 3
Identified duplicate assignment right side [32] main::$29 = main::i#2 << 2
Identified duplicate assignment right side [37] main::$32 = main::i#2 << 2
Identified duplicate assignment right side [43] main::$36 = main::i#2 << 1
Identified duplicate assignment right side [48] main::$39 = main::i#2 << 1
Identified duplicate assignment right side [54] main::$43 = main::i#2 << 1
Identified duplicate assignment right side [61] main::$48 = main::i#2 << 1
Successful SSA optimization Pass2DuplicateRValueIdentification
Alias main::$16 = main::$1 main::$20 main::$23 main::$36 main::$39 main::$43 main::$48
Alias main::$18 = main::$3 main::$29 main::$32
Alias main::$27 = main::$7
Successful SSA optimization Pass2AliasElimination
2020-10-05 20:58:02 +00:00
Identified duplicate assignment right side [13] main::$21 = main::$16 + main::i#2
Identified duplicate assignment right side [17] main::$24 = main::$16 + main::i#2
Identified duplicate assignment right side [27] main::$30 = main::$18 + main::i#2
Identified duplicate assignment right side [31] main::$33 = main::$18 + main::i#2
Identified duplicate assignment right side [36] main::$37 = main::$16 + main::i#2
Identified duplicate assignment right side [40] main::$40 = main::$16 + main::i#2
Identified duplicate assignment right side [45] main::$44 = main::$16 + main::i#2
Identified duplicate assignment right side [51] main::$49 = main::$16 + main::i#2
Successful SSA optimization Pass2DuplicateRValueIdentification
Alias main::$21 = main::$2 main::$24 main::$37 main::$40 main::$44 main::$49
Alias main::$30 = main::$4 main::$33
Successful SSA optimization Pass2AliasElimination
2020-10-05 20:58:02 +00:00
Identified duplicate assignment right side [14] main::$25 = main::$21 << 1
Identified duplicate assignment right side [25] main::$34 = main::$30 << 1
Identified duplicate assignment right side [32] main::$41 = main::$21 << 2
Identified duplicate assignment right side [36] main::$45 = main::$21 << 1
Identified duplicate assignment right side [41] main::$50 = main::$21 << 1
Successful SSA optimization Pass2DuplicateRValueIdentification
Alias main::$25 = main::$5 main::$45 main::$50
Alias main::$34 = main::$9
Alias main::$41 = main::$11
Successful SSA optimization Pass2AliasElimination
2020-10-05 20:58:02 +00:00
Identified duplicate assignment right side [30] main::$46 = main::$25 + main::i#2
Identified duplicate assignment right side [34] main::$51 = main::$25 + main::i#2
Successful SSA optimization Pass2DuplicateRValueIdentification
Alias main::$46 = main::$6 main::$51
Successful SSA optimization Pass2AliasElimination
2020-10-05 20:58:02 +00:00
Identified duplicate assignment right side [30] main::$52 = main::$46 << 1
Successful SSA optimization Pass2DuplicateRValueIdentification
Alias main::$52 = main::$13
Successful SSA optimization Pass2AliasElimination
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 5
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 6
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 9
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $a
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $b
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $c
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $d
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $e
Finalized unsigned number type (byte) $28
Successful SSA optimization PassNFinalizeNumberTypeConversions
Simplifying constant integer cast 1*$28
Simplifying constant integer cast 2*$28
Simplifying constant integer cast 3*$28
Simplifying constant integer cast 4*$28
Simplifying constant integer cast 5*$28
Simplifying constant integer cast 6*$28
Successful SSA optimization PassNCastSimplification
Added new block during phi lifting main::@2(between main::@1 and main::@1)
Adding NOP phi() at start of main
CALL GRAPH
Created 1 initial phi equivalence classes
2020-10-05 20:58:02 +00:00
Coalesced [34] main::i#3 = main::i#1
Coalesced down to 1 phi equivalence classes
2020-10-05 20:58:02 +00:00
Culled Empty Block label main::@2
Adding NOP phi() at start of main
FINAL CONTROL FLOW GRAPH
2020-10-05 20:58:02 +00:00
void main()
2020-06-27 19:18:00 +00:00
main: scope:[main] from
[0] phi()
to:main::@1
main::@1: scope:[main] from main main::@1
2020-10-05 20:58:02 +00:00
[1] main::i#2 = phi( main/0, main::@1/main::i#1 )
[2] main::SCREEN[main::i#2] = main::i#2
[3] main::$16 = main::i#2 << 1
[4] (main::SCREEN+1*$28)[main::i#2] = main::$16
2020-10-05 20:58:02 +00:00
[5] main::$21 = main::$16 + main::i#2
[6] (main::SCREEN+2*$28)[main::i#2] = main::$21
2020-10-05 20:58:02 +00:00
[7] main::$18 = main::i#2 << 2
[8] (main::SCREEN+3*$28)[main::i#2] = main::$18
2020-10-05 20:58:02 +00:00
[9] main::$30 = main::$18 + main::i#2
[10] (main::SCREEN+4*$28)[main::i#2] = main::$30
2020-10-05 20:58:02 +00:00
[11] main::$25 = main::$21 << 1
[12] (main::SCREEN+5*$28)[main::i#2] = main::$25
2020-10-05 20:58:02 +00:00
[13] main::$46 = main::$25 + main::i#2
[14] (main::SCREEN+6*$28)[main::i#2] = main::$46
2020-10-05 20:58:02 +00:00
[15] main::$27 = main::i#2 << 3
[16] (main::SCREEN+(word)7*$28)[main::i#2] = main::$27
[17] main::$8 = main::$27 + main::i#2
[18] (main::SCREEN+(word)8*$28)[main::i#2] = main::$8
[19] main::$34 = main::$30 << 1
[20] (main::SCREEN+(word)9*$28)[main::i#2] = main::$34
[21] main::$10 = main::$34 + main::i#2
[22] (main::SCREEN+(word)$a*$28)[main::i#2] = main::$10
[23] main::$41 = main::$21 << 2
[24] (main::SCREEN+(word)$b*$28)[main::i#2] = main::$41
[25] main::$12 = main::$41 + main::i#2
[26] (main::SCREEN+(word)$c*$28)[main::i#2] = main::$12
[27] main::$52 = main::$46 << 1
[28] (main::SCREEN+(word)$d*$28)[main::i#2] = main::$52
[29] main::$14 = main::$52 + main::i#2
[30] (main::SCREEN+(word)$e*$28)[main::i#2] = main::$14
[31] main::i#1 = ++ main::i#2
[32] if(main::i#1!=$12) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@1
[33] return
to:@return
VARIABLE REGISTER WEIGHTS
2020-10-05 20:58:02 +00:00
void main()
byte~ main::$10 22.0
byte~ main::$12 22.0
byte~ main::$14 22.0
byte~ main::$16 16.5
byte~ main::$18 16.5
byte~ main::$21 2.4444444444444446
byte~ main::$25 16.5
byte~ main::$27 16.5
byte~ main::$30 3.3000000000000003
byte~ main::$34 16.5
byte~ main::$41 16.5
byte~ main::$46 2.357142857142857
byte~ main::$52 16.5
byte~ main::$8 22.0
byte main::i
byte main::i#1 16.5
byte main::i#2 10.266666666666666
Initial phi equivalence classes
[ main::i#2 main::i#1 ]
2019-12-08 15:04:35 +00:00
Added variable main::$16 to live range equivalence class [ main::$16 ]
Added variable main::$21 to live range equivalence class [ main::$21 ]
Added variable main::$18 to live range equivalence class [ main::$18 ]
Added variable main::$30 to live range equivalence class [ main::$30 ]
2019-12-08 15:04:35 +00:00
Added variable main::$25 to live range equivalence class [ main::$25 ]
Added variable main::$46 to live range equivalence class [ main::$46 ]
2019-12-08 15:04:35 +00:00
Added variable main::$27 to live range equivalence class [ main::$27 ]
Added variable main::$8 to live range equivalence class [ main::$8 ]
Added variable main::$34 to live range equivalence class [ main::$34 ]
Added variable main::$10 to live range equivalence class [ main::$10 ]
Added variable main::$41 to live range equivalence class [ main::$41 ]
Added variable main::$12 to live range equivalence class [ main::$12 ]
Added variable main::$52 to live range equivalence class [ main::$52 ]
Added variable main::$14 to live range equivalence class [ main::$14 ]
Complete equivalence classes
[ main::i#2 main::i#1 ]
[ main::$16 ]
[ main::$21 ]
[ main::$18 ]
[ main::$30 ]
[ main::$25 ]
[ main::$46 ]
[ main::$27 ]
[ main::$8 ]
[ main::$34 ]
[ main::$10 ]
[ main::$41 ]
[ main::$12 ]
[ main::$52 ]
[ main::$14 ]
2019-10-12 09:40:36 +00:00
Allocated zp[1]:2 [ main::i#2 main::i#1 ]
Allocated zp[1]:3 [ main::$16 ]
Allocated zp[1]:4 [ main::$21 ]
Allocated zp[1]:5 [ main::$18 ]
Allocated zp[1]:6 [ main::$30 ]
Allocated zp[1]:7 [ main::$25 ]
Allocated zp[1]:8 [ main::$46 ]
Allocated zp[1]:9 [ main::$27 ]
Allocated zp[1]:10 [ main::$8 ]
Allocated zp[1]:11 [ main::$34 ]
Allocated zp[1]:12 [ main::$10 ]
Allocated zp[1]:13 [ main::$41 ]
Allocated zp[1]:14 [ main::$12 ]
Allocated zp[1]:15 [ main::$52 ]
Allocated zp[1]:16 [ main::$14 ]
REGISTER UPLIFT POTENTIAL REGISTERS
2020-10-05 20:58:02 +00:00
Statement [3] main::$16 = main::i#2 << 1 [ main::i#2 main::$16 ] ( [ main::i#2 main::$16 ] { } ) always clobbers reg byte a
2019-10-12 09:40:36 +00:00
Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::i#2 main::i#1 ]
2020-10-05 20:58:02 +00:00
Statement [5] main::$21 = main::$16 + main::i#2 [ main::i#2 main::$21 ] ( [ main::i#2 main::$21 ] { } ) always clobbers reg byte a
Statement [7] main::$18 = main::i#2 << 2 [ main::i#2 main::$21 main::$18 ] ( [ main::i#2 main::$21 main::$18 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:4 [ main::$21 ]
2020-10-05 20:58:02 +00:00
Statement [9] main::$30 = main::$18 + main::i#2 [ main::i#2 main::$21 main::$30 ] ( [ main::i#2 main::$21 main::$30 ] { } ) always clobbers reg byte a
Statement [11] main::$25 = main::$21 << 1 [ main::i#2 main::$21 main::$30 main::$25 ] ( [ main::i#2 main::$21 main::$30 main::$25 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:6 [ main::$30 ]
2020-10-05 20:58:02 +00:00
Statement [13] main::$46 = main::$25 + main::i#2 [ main::i#2 main::$21 main::$30 main::$46 ] ( [ main::i#2 main::$21 main::$30 main::$46 ] { } ) always clobbers reg byte a
Statement [15] main::$27 = main::i#2 << 3 [ main::i#2 main::$21 main::$30 main::$46 main::$27 ] ( [ main::i#2 main::$21 main::$30 main::$46 main::$27 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:8 [ main::$46 ]
2020-10-05 20:58:02 +00:00
Statement [17] main::$8 = main::$27 + main::i#2 [ main::i#2 main::$21 main::$30 main::$46 main::$8 ] ( [ main::i#2 main::$21 main::$30 main::$46 main::$8 ] { } ) always clobbers reg byte a
Statement [19] main::$34 = main::$30 << 1 [ main::i#2 main::$21 main::$46 main::$34 ] ( [ main::i#2 main::$21 main::$46 main::$34 ] { } ) always clobbers reg byte a
Statement [21] main::$10 = main::$34 + main::i#2 [ main::i#2 main::$21 main::$46 main::$10 ] ( [ main::i#2 main::$21 main::$46 main::$10 ] { } ) always clobbers reg byte a
Statement [23] main::$41 = main::$21 << 2 [ main::i#2 main::$46 main::$41 ] ( [ main::i#2 main::$46 main::$41 ] { } ) always clobbers reg byte a
Statement [25] main::$12 = main::$41 + main::i#2 [ main::i#2 main::$46 main::$12 ] ( [ main::i#2 main::$46 main::$12 ] { } ) always clobbers reg byte a
Statement [27] main::$52 = main::$46 << 1 [ main::i#2 main::$52 ] ( [ main::i#2 main::$52 ] { } ) always clobbers reg byte a
Statement [29] main::$14 = main::$52 + main::i#2 [ main::i#2 main::$14 ] ( [ main::i#2 main::$14 ] { } ) always clobbers reg byte a
Statement [2] main::SCREEN[main::i#2] = main::i#2 [ main::i#2 ] ( [ main::i#2 ] { } ) always clobbers reg byte a
Statement [3] main::$16 = main::i#2 << 1 [ main::i#2 main::$16 ] ( [ main::i#2 main::$16 ] { } ) always clobbers reg byte a
Statement [5] main::$21 = main::$16 + main::i#2 [ main::i#2 main::$21 ] ( [ main::i#2 main::$21 ] { } ) always clobbers reg byte a
Statement [6] (main::SCREEN+2*$28)[main::i#2] = main::$21 [ main::i#2 main::$21 ] ( [ main::i#2 main::$21 ] { } ) always clobbers reg byte a
2020-10-05 20:58:02 +00:00
Statement [7] main::$18 = main::i#2 << 2 [ main::i#2 main::$21 main::$18 ] ( [ main::i#2 main::$21 main::$18 ] { } ) always clobbers reg byte a
Statement [9] main::$30 = main::$18 + main::i#2 [ main::i#2 main::$21 main::$30 ] ( [ main::i#2 main::$21 main::$30 ] { } ) always clobbers reg byte a
Statement [10] (main::SCREEN+4*$28)[main::i#2] = main::$30 [ main::i#2 main::$21 main::$30 ] ( [ main::i#2 main::$21 main::$30 ] { } ) always clobbers reg byte a
2020-10-05 20:58:02 +00:00
Statement [11] main::$25 = main::$21 << 1 [ main::i#2 main::$21 main::$30 main::$25 ] ( [ main::i#2 main::$21 main::$30 main::$25 ] { } ) always clobbers reg byte a
Statement [13] main::$46 = main::$25 + main::i#2 [ main::i#2 main::$21 main::$30 main::$46 ] ( [ main::i#2 main::$21 main::$30 main::$46 ] { } ) always clobbers reg byte a
Statement [14] (main::SCREEN+6*$28)[main::i#2] = main::$46 [ main::i#2 main::$21 main::$30 main::$46 ] ( [ main::i#2 main::$21 main::$30 main::$46 ] { } ) always clobbers reg byte a
2020-10-05 20:58:02 +00:00
Statement [15] main::$27 = main::i#2 << 3 [ main::i#2 main::$21 main::$30 main::$46 main::$27 ] ( [ main::i#2 main::$21 main::$30 main::$46 main::$27 ] { } ) always clobbers reg byte a
Statement [17] main::$8 = main::$27 + main::i#2 [ main::i#2 main::$21 main::$30 main::$46 main::$8 ] ( [ main::i#2 main::$21 main::$30 main::$46 main::$8 ] { } ) always clobbers reg byte a
Statement [19] main::$34 = main::$30 << 1 [ main::i#2 main::$21 main::$46 main::$34 ] ( [ main::i#2 main::$21 main::$46 main::$34 ] { } ) always clobbers reg byte a
Statement [21] main::$10 = main::$34 + main::i#2 [ main::i#2 main::$21 main::$46 main::$10 ] ( [ main::i#2 main::$21 main::$46 main::$10 ] { } ) always clobbers reg byte a
Statement [23] main::$41 = main::$21 << 2 [ main::i#2 main::$46 main::$41 ] ( [ main::i#2 main::$46 main::$41 ] { } ) always clobbers reg byte a
Statement [25] main::$12 = main::$41 + main::i#2 [ main::i#2 main::$46 main::$12 ] ( [ main::i#2 main::$46 main::$12 ] { } ) always clobbers reg byte a
Statement [27] main::$52 = main::$46 << 1 [ main::i#2 main::$52 ] ( [ main::i#2 main::$52 ] { } ) always clobbers reg byte a
Statement [29] main::$14 = main::$52 + main::i#2 [ main::i#2 main::$14 ] ( [ main::i#2 main::$14 ] { } ) always clobbers reg byte a
2019-10-12 09:40:36 +00:00
Potential registers zp[1]:2 [ main::i#2 main::i#1 ] : zp[1]:2 , reg byte x , reg byte y ,
Potential registers zp[1]:3 [ main::$16 ] : zp[1]:3 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:4 [ main::$21 ] : zp[1]:4 , reg byte x , reg byte y ,
Potential registers zp[1]:5 [ main::$18 ] : zp[1]:5 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:6 [ main::$30 ] : zp[1]:6 , reg byte x , reg byte y ,
Potential registers zp[1]:7 [ main::$25 ] : zp[1]:7 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:8 [ main::$46 ] : zp[1]:8 , reg byte x , reg byte y ,
Potential registers zp[1]:9 [ main::$27 ] : zp[1]:9 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:10 [ main::$8 ] : zp[1]:10 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:11 [ main::$34 ] : zp[1]:11 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:12 [ main::$10 ] : zp[1]:12 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:13 [ main::$41 ] : zp[1]:13 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:14 [ main::$12 ] : zp[1]:14 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:15 [ main::$52 ] : zp[1]:15 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:16 [ main::$14 ] : zp[1]:16 , reg byte a , reg byte x , reg byte y ,
REGISTER UPLIFT SCOPES
Uplift Scope [main] 26.77: zp[1]:2 [ main::i#2 main::i#1 ] 22: zp[1]:10 [ main::$8 ] 22: zp[1]:12 [ main::$10 ] 22: zp[1]:14 [ main::$12 ] 22: zp[1]:16 [ main::$14 ] 16.5: zp[1]:3 [ main::$16 ] 16.5: zp[1]:5 [ main::$18 ] 16.5: zp[1]:7 [ main::$25 ] 16.5: zp[1]:9 [ main::$27 ] 16.5: zp[1]:11 [ main::$34 ] 16.5: zp[1]:13 [ main::$41 ] 16.5: zp[1]:15 [ main::$52 ] 3.3: zp[1]:6 [ main::$30 ] 2.44: zp[1]:4 [ main::$21 ] 2.36: zp[1]:8 [ main::$46 ]
Uplift Scope []
Uplifting [main] best 2501 combination reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::$8 ] reg byte a [ main::$10 ] reg byte a [ main::$12 ] zp[1]:16 [ main::$14 ] zp[1]:3 [ main::$16 ] zp[1]:5 [ main::$18 ] zp[1]:7 [ main::$25 ] zp[1]:9 [ main::$27 ] zp[1]:11 [ main::$34 ] zp[1]:13 [ main::$41 ] zp[1]:15 [ main::$52 ] zp[1]:6 [ main::$30 ] zp[1]:4 [ main::$21 ] zp[1]:8 [ main::$46 ]
Limited combination testing to 100 combinations of 339738624 possible.
Uplifting [] best 2501 combination
Attempting to uplift remaining variables inzp[1]:16 [ main::$14 ]
Uplifting [main] best 2441 combination reg byte a [ main::$14 ]
Attempting to uplift remaining variables inzp[1]:3 [ main::$16 ]
Uplifting [main] best 2391 combination reg byte a [ main::$16 ]
Attempting to uplift remaining variables inzp[1]:5 [ main::$18 ]
Uplifting [main] best 2341 combination reg byte a [ main::$18 ]
Attempting to uplift remaining variables inzp[1]:7 [ main::$25 ]
Uplifting [main] best 2291 combination reg byte a [ main::$25 ]
Attempting to uplift remaining variables inzp[1]:9 [ main::$27 ]
Uplifting [main] best 2241 combination reg byte a [ main::$27 ]
Attempting to uplift remaining variables inzp[1]:11 [ main::$34 ]
Uplifting [main] best 2191 combination reg byte a [ main::$34 ]
Attempting to uplift remaining variables inzp[1]:13 [ main::$41 ]
Uplifting [main] best 2141 combination reg byte a [ main::$41 ]
Attempting to uplift remaining variables inzp[1]:15 [ main::$52 ]
Uplifting [main] best 2091 combination reg byte a [ main::$52 ]
Attempting to uplift remaining variables inzp[1]:6 [ main::$30 ]
Uplifting [main] best 2061 combination reg byte y [ main::$30 ]
Attempting to uplift remaining variables inzp[1]:4 [ main::$21 ]
Uplifting [main] best 2061 combination zp[1]:4 [ main::$21 ]
Attempting to uplift remaining variables inzp[1]:8 [ main::$46 ]
Uplifting [main] best 2061 combination zp[1]:8 [ main::$46 ]
Allocated (was zp[1]:4) zp[1]:2 [ main::$21 ]
Allocated (was zp[1]:8) zp[1]:3 [ main::$46 ]
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
// Check that multiplication by constants is converted to shift/add
// Upstart
// Commodore 64 PRG executable file
.file [name="multiply-ns.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
// Global Constants & labels
.segment Code
// main
main: {
.label SCREEN = $400
.label __21 = 2
.label __46 = 3
2020-06-27 19:18:00 +00:00
// [1] phi from main to main::@1 [phi:main->main::@1]
__b1_from_main:
2020-10-05 20:58:02 +00:00
// [1] phi main::i#2 = 0 [phi:main->main::@1#0] -- vbuxx=vbuc1
ldx #0
jmp __b1
2020-06-27 19:18:00 +00:00
// [1] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
__b1_from___b1:
2020-10-05 20:58:02 +00:00
// [1] phi main::i#2 = main::i#1 [phi:main::@1->main::@1#0] -- register_copy
jmp __b1
// main::@1
__b1:
2020-10-05 20:58:02 +00:00
// [2] main::SCREEN[main::i#2] = main::i#2 -- pbuc1_derefidx_vbuxx=vbuxx
txa
sta SCREEN,x
2020-10-05 20:58:02 +00:00
// [3] main::$16 = main::i#2 << 1 -- vbuaa=vbuxx_rol_1
txa
asl
// [4] (main::SCREEN+1*$28)[main::i#2] = main::$16 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN+1*$28,x
2020-10-05 20:58:02 +00:00
// [5] main::$21 = main::$16 + main::i#2 -- vbuz1=vbuaa_plus_vbuxx
stx.z $ff
clc
adc.z $ff
sta.z __21
// [6] (main::SCREEN+2*$28)[main::i#2] = main::$21 -- pbuc1_derefidx_vbuxx=vbuz1
lda.z __21
sta SCREEN+2*$28,x
2020-10-05 20:58:02 +00:00
// [7] main::$18 = main::i#2 << 2 -- vbuaa=vbuxx_rol_2
txa
asl
asl
// [8] (main::SCREEN+3*$28)[main::i#2] = main::$18 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN+3*$28,x
2020-10-05 20:58:02 +00:00
// [9] main::$30 = main::$18 + main::i#2 -- vbuyy=vbuaa_plus_vbuxx
stx.z $ff
clc
adc.z $ff
tay
// [10] (main::SCREEN+4*$28)[main::i#2] = main::$30 -- pbuc1_derefidx_vbuxx=vbuyy
tya
sta SCREEN+4*$28,x
2020-10-05 20:58:02 +00:00
// [11] main::$25 = main::$21 << 1 -- vbuaa=vbuz1_rol_1
lda.z __21
asl
// [12] (main::SCREEN+5*$28)[main::i#2] = main::$25 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN+5*$28,x
2020-10-05 20:58:02 +00:00
// [13] main::$46 = main::$25 + main::i#2 -- vbuz1=vbuaa_plus_vbuxx
stx.z $ff
clc
adc.z $ff
sta.z __46
// [14] (main::SCREEN+6*$28)[main::i#2] = main::$46 -- pbuc1_derefidx_vbuxx=vbuz1
lda.z __46
sta SCREEN+6*$28,x
2020-10-05 20:58:02 +00:00
// [15] main::$27 = main::i#2 << 3 -- vbuaa=vbuxx_rol_3
txa
asl
asl
asl
2020-10-05 20:58:02 +00:00
// [16] (main::SCREEN+(word)7*$28)[main::i#2] = main::$27 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN+7*$28,x
2020-10-05 20:58:02 +00:00
// [17] main::$8 = main::$27 + main::i#2 -- vbuaa=vbuaa_plus_vbuxx
stx.z $ff
clc
adc.z $ff
2020-10-05 20:58:02 +00:00
// [18] (main::SCREEN+(word)8*$28)[main::i#2] = main::$8 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN+8*$28,x
2020-10-05 20:58:02 +00:00
// [19] main::$34 = main::$30 << 1 -- vbuaa=vbuyy_rol_1
tya
asl
2020-10-05 20:58:02 +00:00
// [20] (main::SCREEN+(word)9*$28)[main::i#2] = main::$34 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN+9*$28,x
2020-10-05 20:58:02 +00:00
// [21] main::$10 = main::$34 + main::i#2 -- vbuaa=vbuaa_plus_vbuxx
stx.z $ff
clc
adc.z $ff
2020-10-05 20:58:02 +00:00
// [22] (main::SCREEN+(word)$a*$28)[main::i#2] = main::$10 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN+$a*$28,x
2020-10-05 20:58:02 +00:00
// [23] main::$41 = main::$21 << 2 -- vbuaa=vbuz1_rol_2
lda.z __21
asl
asl
2020-10-05 20:58:02 +00:00
// [24] (main::SCREEN+(word)$b*$28)[main::i#2] = main::$41 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN+$b*$28,x
2020-10-05 20:58:02 +00:00
// [25] main::$12 = main::$41 + main::i#2 -- vbuaa=vbuaa_plus_vbuxx
stx.z $ff
clc
adc.z $ff
2020-10-05 20:58:02 +00:00
// [26] (main::SCREEN+(word)$c*$28)[main::i#2] = main::$12 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN+$c*$28,x
2020-10-05 20:58:02 +00:00
// [27] main::$52 = main::$46 << 1 -- vbuaa=vbuz1_rol_1
lda.z __46
asl
2020-10-05 20:58:02 +00:00
// [28] (main::SCREEN+(word)$d*$28)[main::i#2] = main::$52 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN+$d*$28,x
2020-10-05 20:58:02 +00:00
// [29] main::$14 = main::$52 + main::i#2 -- vbuaa=vbuaa_plus_vbuxx
stx.z $ff
clc
adc.z $ff
2020-10-05 20:58:02 +00:00
// [30] (main::SCREEN+(word)$e*$28)[main::i#2] = main::$14 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN+$e*$28,x
2020-10-05 20:58:02 +00:00
// [31] main::i#1 = ++ main::i#2 -- vbuxx=_inc_vbuxx
inx
2020-10-05 20:58:02 +00:00
// [32] if(main::i#1!=$12) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
cpx #$12
bne __b1_from___b1
jmp __breturn
// main::@return
__breturn:
// [33] return
rts
}
// File Data
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda.z __21
Removing instruction lda.z __46
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label __b1_from___b1 with __b1
Removing instruction __b1_from___b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction __b1_from_main:
Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Removing instruction jmp __b1
Succesful ASM optimization Pass5NextJumpElimination
FINAL SYMBOL TABLE
2020-10-05 20:58:02 +00:00
void main()
byte~ main::$10 reg byte a 22.0
byte~ main::$12 reg byte a 22.0
byte~ main::$14 reg byte a 22.0
byte~ main::$16 reg byte a 16.5
byte~ main::$18 reg byte a 16.5
byte~ main::$21 zp[1]:2 2.4444444444444446
byte~ main::$25 reg byte a 16.5
byte~ main::$27 reg byte a 16.5
byte~ main::$30 reg byte y 3.3000000000000003
byte~ main::$34 reg byte a 16.5
byte~ main::$41 reg byte a 16.5
byte~ main::$46 zp[1]:3 2.357142857142857
byte~ main::$52 reg byte a 16.5
byte~ main::$8 reg byte a 22.0
const nomodify byte* main::SCREEN = (byte*) 1024
byte main::i
byte main::i#1 reg byte x 16.5
byte main::i#2 reg byte x 10.266666666666666
reg byte x [ main::i#2 main::i#1 ]
reg byte a [ main::$16 ]
zp[1]:2 [ main::$21 ]
reg byte a [ main::$18 ]
reg byte y [ main::$30 ]
reg byte a [ main::$25 ]
zp[1]:3 [ main::$46 ]
reg byte a [ main::$27 ]
reg byte a [ main::$8 ]
reg byte a [ main::$34 ]
reg byte a [ main::$10 ]
reg byte a [ main::$41 ]
reg byte a [ main::$12 ]
reg byte a [ main::$52 ]
reg byte a [ main::$14 ]
FINAL ASSEMBLER
Score: 1911
// File Comments
// Check that multiplication by constants is converted to shift/add
// Upstart
// Commodore 64 PRG executable file
.file [name="multiply-ns.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
// Global Constants & labels
.segment Code
// main
main: {
.label SCREEN = $400
.label __21 = 2
.label __46 = 3
2020-06-27 19:18:00 +00:00
// [1] phi from main to main::@1 [phi:main->main::@1]
2020-10-05 20:58:02 +00:00
// [1] phi main::i#2 = 0 [phi:main->main::@1#0] -- vbuxx=vbuc1
ldx #0
2020-06-27 19:18:00 +00:00
// [1] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
2020-10-05 20:58:02 +00:00
// [1] phi main::i#2 = main::i#1 [phi:main::@1->main::@1#0] -- register_copy
// main::@1
__b1:
// (SCREEN+0*40)[i] = i*1
2020-10-05 20:58:02 +00:00
// [2] main::SCREEN[main::i#2] = main::i#2 -- pbuc1_derefidx_vbuxx=vbuxx
txa
sta SCREEN,x
// i*2
2020-10-05 20:58:02 +00:00
// [3] main::$16 = main::i#2 << 1 -- vbuaa=vbuxx_rol_1
txa
asl
// (SCREEN+1*40)[i] = i*2
// [4] (main::SCREEN+1*$28)[main::i#2] = main::$16 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN+1*$28,x
// i*3
2020-10-05 20:58:02 +00:00
// [5] main::$21 = main::$16 + main::i#2 -- vbuz1=vbuaa_plus_vbuxx
stx.z $ff
clc
adc.z $ff
sta.z __21
// (SCREEN+2*40)[i] = i*3
// [6] (main::SCREEN+2*$28)[main::i#2] = main::$21 -- pbuc1_derefidx_vbuxx=vbuz1
sta SCREEN+2*$28,x
// i*4
2020-10-05 20:58:02 +00:00
// [7] main::$18 = main::i#2 << 2 -- vbuaa=vbuxx_rol_2
txa
asl
asl
// (SCREEN+3*40)[i] = i*4
// [8] (main::SCREEN+3*$28)[main::i#2] = main::$18 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN+3*$28,x
// i*5
2020-10-05 20:58:02 +00:00
// [9] main::$30 = main::$18 + main::i#2 -- vbuyy=vbuaa_plus_vbuxx
stx.z $ff
clc
adc.z $ff
tay
// (SCREEN+4*40)[i] = i*5
// [10] (main::SCREEN+4*$28)[main::i#2] = main::$30 -- pbuc1_derefidx_vbuxx=vbuyy
tya
sta SCREEN+4*$28,x
// i*6
2020-10-05 20:58:02 +00:00
// [11] main::$25 = main::$21 << 1 -- vbuaa=vbuz1_rol_1
lda.z __21
asl
// (SCREEN+5*40)[i] = i*6
// [12] (main::SCREEN+5*$28)[main::i#2] = main::$25 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN+5*$28,x
// i*7
2020-10-05 20:58:02 +00:00
// [13] main::$46 = main::$25 + main::i#2 -- vbuz1=vbuaa_plus_vbuxx
stx.z $ff
clc
adc.z $ff
sta.z __46
// (SCREEN+6*40)[i] = i*7
// [14] (main::SCREEN+6*$28)[main::i#2] = main::$46 -- pbuc1_derefidx_vbuxx=vbuz1
sta SCREEN+6*$28,x
// i*8
2020-10-05 20:58:02 +00:00
// [15] main::$27 = main::i#2 << 3 -- vbuaa=vbuxx_rol_3
txa
asl
asl
asl
// (SCREEN+7*40)[i] = i*8
2020-10-05 20:58:02 +00:00
// [16] (main::SCREEN+(word)7*$28)[main::i#2] = main::$27 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN+7*$28,x
// i*9
2020-10-05 20:58:02 +00:00
// [17] main::$8 = main::$27 + main::i#2 -- vbuaa=vbuaa_plus_vbuxx
stx.z $ff
clc
adc.z $ff
// (SCREEN+8*40)[i] = i*9
2020-10-05 20:58:02 +00:00
// [18] (main::SCREEN+(word)8*$28)[main::i#2] = main::$8 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN+8*$28,x
// i*10
2020-10-05 20:58:02 +00:00
// [19] main::$34 = main::$30 << 1 -- vbuaa=vbuyy_rol_1
tya
asl
// (SCREEN+9*40)[i] = i*10
2020-10-05 20:58:02 +00:00
// [20] (main::SCREEN+(word)9*$28)[main::i#2] = main::$34 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN+9*$28,x
// i*11
2020-10-05 20:58:02 +00:00
// [21] main::$10 = main::$34 + main::i#2 -- vbuaa=vbuaa_plus_vbuxx
stx.z $ff
clc
adc.z $ff
// (SCREEN+10*40)[i] = i*11
2020-10-05 20:58:02 +00:00
// [22] (main::SCREEN+(word)$a*$28)[main::i#2] = main::$10 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN+$a*$28,x
// i*12
2020-10-05 20:58:02 +00:00
// [23] main::$41 = main::$21 << 2 -- vbuaa=vbuz1_rol_2
lda.z __21
asl
asl
// (SCREEN+11*40)[i] = i*12
2020-10-05 20:58:02 +00:00
// [24] (main::SCREEN+(word)$b*$28)[main::i#2] = main::$41 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN+$b*$28,x
// i*13
2020-10-05 20:58:02 +00:00
// [25] main::$12 = main::$41 + main::i#2 -- vbuaa=vbuaa_plus_vbuxx
stx.z $ff
clc
adc.z $ff
// (SCREEN+12*40)[i] = i*13
2020-10-05 20:58:02 +00:00
// [26] (main::SCREEN+(word)$c*$28)[main::i#2] = main::$12 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN+$c*$28,x
// i*14
2020-10-05 20:58:02 +00:00
// [27] main::$52 = main::$46 << 1 -- vbuaa=vbuz1_rol_1
lda.z __46
asl
// (SCREEN+13*40)[i] = i*14
2020-10-05 20:58:02 +00:00
// [28] (main::SCREEN+(word)$d*$28)[main::i#2] = main::$52 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN+$d*$28,x
// i*15
2020-10-05 20:58:02 +00:00
// [29] main::$14 = main::$52 + main::i#2 -- vbuaa=vbuaa_plus_vbuxx
stx.z $ff
clc
adc.z $ff
// (SCREEN+14*40)[i] = i*15
2020-10-05 20:58:02 +00:00
// [30] (main::SCREEN+(word)$e*$28)[main::i#2] = main::$14 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN+$e*$28,x
// for(byte i: 0..17)
2020-10-05 20:58:02 +00:00
// [31] main::i#1 = ++ main::i#2 -- vbuxx=_inc_vbuxx
inx
2020-10-05 20:58:02 +00:00
// [32] if(main::i#1!=$12) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
cpx #$12
bne __b1
// main::@return
// }
// [33] return
rts
}
// File Data