From 51d1e6f41fd9f6e12329211a459d4d6f96ff2936 Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Wed, 18 Sep 2019 23:00:30 +0200 Subject: [PATCH] Changed control flow graph to print procedure signatures. --- .../kickc/model/ControlFlowBlock.java | 3 - src/test/ref/address-of-0.cfg | 2 + src/test/ref/address-of-0.log | 4 + src/test/ref/address-of-1.cfg | 4 + src/test/ref/address-of-1.log | 8 + src/test/ref/address-of-2.cfg | 6 + src/test/ref/address-of-2.log | 12 + src/test/ref/address-of-3.cfg | 4 + src/test/ref/address-of-3.log | 8 + src/test/ref/array-16bit-lookup.cfg | 4 + src/test/ref/array-16bit-lookup.log | 8 + src/test/ref/array-length-symbolic-min.cfg | 2 + src/test/ref/array-length-symbolic-min.log | 4 + src/test/ref/array-length-symbolic.cfg | 2 + src/test/ref/array-length-symbolic.log | 4 + src/test/ref/arrays-init-kasm-0.cfg | 2 + src/test/ref/arrays-init-kasm-0.log | 4 + src/test/ref/arrays-init-short.cfg | 2 + src/test/ref/arrays-init-short.log | 4 + src/test/ref/arrays-init.cfg | 2 + src/test/ref/arrays-init.log | 4 + src/test/ref/asm-culling-jmp.cfg | 2 + src/test/ref/asm-culling-jmp.log | 4 + src/test/ref/asm-mnemonic-names.cfg | 4 + src/test/ref/asm-mnemonic-names.log | 8 + src/test/ref/asm-uses-0.cfg | 4 + src/test/ref/asm-uses-0.log | 8 + src/test/ref/assignment-chained.cfg | 2 + src/test/ref/assignment-chained.log | 4 + src/test/ref/assignment-compound.cfg | 4 + src/test/ref/assignment-compound.log | 8 + src/test/ref/bgblack.cfg | 2 + src/test/ref/bgblack.log | 4 + src/test/ref/bitmap-circle-2.cfg | 8 + src/test/ref/bitmap-circle-2.log | 16 + src/test/ref/bitmap-circle.cfg | 8 + src/test/ref/bitmap-circle.log | 16 + src/test/ref/bitmap-line-anim-1.cfg | 20 + src/test/ref/bitmap-line-anim-1.log | 40 ++ src/test/ref/bitmap-line-anim-2.cfg | 16 + src/test/ref/bitmap-line-anim-2.log | 32 ++ src/test/ref/bitmap-plot-0.cfg | 14 + src/test/ref/bitmap-plot-0.log | 28 ++ src/test/ref/bitmap-plot-1.cfg | 28 ++ src/test/ref/bitmap-plot-1.log | 56 +++ src/test/ref/bitmap-plot-2.cfg | 28 ++ src/test/ref/bitmap-plot-2.log | 56 +++ src/test/ref/bitmap-plot-3.cfg | 16 + src/test/ref/bitmap-plot-3.log | 32 ++ src/test/ref/bitmap-plotter.cfg | 10 + src/test/ref/bitmap-plotter.log | 20 + src/test/ref/bitwise-not.cfg | 2 + src/test/ref/bitwise-not.log | 4 + src/test/ref/bool-const.cfg | 8 + src/test/ref/bool-const.log | 16 + src/test/ref/bool-function.cfg | 4 + src/test/ref/bool-function.log | 8 + src/test/ref/bool-ifs-min.cfg | 2 + src/test/ref/bool-ifs-min.log | 4 + src/test/ref/bool-nullpointer-exception.cfg | 2 + src/test/ref/bool-nullpointer-exception.log | 4 + src/test/ref/bool-pointer.cfg | 2 + src/test/ref/bool-pointer.log | 4 + src/test/ref/bool-vars.cfg | 10 + src/test/ref/bool-vars.log | 20 + src/test/ref/bresenham.cfg | 2 + src/test/ref/bresenham.log | 4 + src/test/ref/bresenhamarr.cfg | 2 + src/test/ref/bresenhamarr.log | 4 + src/test/ref/c-types.cfg | 32 ++ src/test/ref/c-types.log | 64 +++ src/test/ref/c64dtv-8bppcharstretch.cfg | 10 + src/test/ref/c64dtv-8bppcharstretch.log | 20 + src/test/ref/c64dtv-8bppchunkystretch.cfg | 6 + src/test/ref/c64dtv-8bppchunkystretch.log | 12 + src/test/ref/c64dtv-blitter-box.cfg | 2 + src/test/ref/c64dtv-blitter-box.log | 4 + src/test/ref/c64dtv-blittermin.cfg | 2 + src/test/ref/c64dtv-blittermin.log | 4 + src/test/ref/c64dtv-color.cfg | 2 + src/test/ref/c64dtv-color.log | 4 + src/test/ref/c64dtv-gfxexplorer.cfg | 98 +++++ src/test/ref/c64dtv-gfxexplorer.log | 196 +++++++++ src/test/ref/c64dtv-gfxmodes.cfg | 62 +++ src/test/ref/c64dtv-gfxmodes.log | 124 ++++++ src/test/ref/call-parameter-autocast.cfg | 4 + src/test/ref/call-parameter-autocast.log | 8 + src/test/ref/callconstparam.cfg | 4 + src/test/ref/callconstparam.log | 8 + src/test/ref/cast-deref.cfg | 2 + src/test/ref/cast-deref.log | 4 + src/test/ref/cast-not-needed-2.cfg | 2 + src/test/ref/cast-not-needed-2.log | 4 + src/test/ref/cast-not-needed-3.cfg | 2 + src/test/ref/cast-not-needed-3.log | 4 + src/test/ref/cast-not-needed.cfg | 2 + src/test/ref/cast-not-needed.log | 4 + src/test/ref/cast-precedence-problem.cfg | 2 + src/test/ref/cast-precedence-problem.log | 4 + src/test/ref/casting.cfg | 4 + src/test/ref/casting.log | 8 + src/test/ref/chargen.cfg | 2 + src/test/ref/chargen.log | 4 + src/test/ref/chessboard.cfg | 2 + src/test/ref/chessboard.log | 4 + src/test/ref/cia-timer-cyclecount.cfg | 14 + src/test/ref/cia-timer-cyclecount.log | 28 ++ src/test/ref/cia-timer-simple.cfg | 14 + src/test/ref/cia-timer-simple.log | 28 ++ src/test/ref/clobber-a-problem.cfg | 4 + src/test/ref/clobber-a-problem.log | 8 + src/test/ref/coalesce-assignment.cfg | 2 + src/test/ref/coalesce-assignment.log | 4 + src/test/ref/code-after-return-1.cfg | 2 + src/test/ref/code-after-return-1.log | 6 + src/test/ref/code-after-return.cfg | 2 + src/test/ref/code-after-return.log | 4 + src/test/ref/comma-decl-for.cfg | 2 + src/test/ref/comma-decl-for.log | 4 + src/test/ref/comma-decl.cfg | 2 + src/test/ref/comma-decl.log | 4 + src/test/ref/comma-expr-1.cfg | 2 + src/test/ref/comma-expr-1.log | 4 + src/test/ref/comma-expr-2.cfg | 2 + src/test/ref/comma-expr-2.log | 4 + src/test/ref/comma-expr-for.cfg | 2 + src/test/ref/comma-expr-for.log | 4 + src/test/ref/comparison-rewriting-pointer.cfg | 2 + src/test/ref/comparison-rewriting-pointer.log | 4 + src/test/ref/comparison-rewriting.cfg | 2 + src/test/ref/comparison-rewriting.log | 4 + src/test/ref/complex-conditional-problem.cfg | 2 + src/test/ref/complex-conditional-problem.log | 4 + .../ref/complex/ataritempest/ataritempest.cfg | 6 + .../ref/complex/ataritempest/ataritempest.log | 12 + .../ref/complex/clearscreen/clearscreen.cfg | 22 + .../ref/complex/clearscreen/clearscreen.log | 44 ++ src/test/ref/complex/medusa/medusa.cfg | 4 + src/test/ref/complex/medusa/medusa.log | 8 + .../ref/complex/splines/truetype-splines.cfg | 30 ++ .../ref/complex/splines/truetype-splines.log | 60 +++ src/test/ref/complex/tetris/test-sprites.cfg | 10 + src/test/ref/complex/tetris/test-sprites.log | 20 + src/test/ref/complex/tetris/tetris.cfg | 58 +++ src/test/ref/complex/tetris/tetris.log | 116 +++++ src/test/ref/complex/xmega65/xmega65.cfg | 8 + src/test/ref/complex/xmega65/xmega65.log | 16 + src/test/ref/condition-integer-0.cfg | 2 + src/test/ref/condition-integer-0.log | 4 + src/test/ref/condition-integer-1.cfg | 2 + src/test/ref/condition-integer-1.log | 4 + src/test/ref/condition-integer-2.cfg | 2 + src/test/ref/condition-integer-2.log | 4 + src/test/ref/condition-integer-3.cfg | 2 + src/test/ref/condition-integer-3.log | 4 + src/test/ref/condition-integer-4.cfg | 2 + src/test/ref/condition-integer-4.log | 4 + src/test/ref/condition-type-mismatch.cfg | 2 + src/test/ref/condition-type-mismatch.log | 4 + .../ref/consolidate-array-index-problem.cfg | 2 + .../ref/consolidate-array-index-problem.log | 4 + src/test/ref/consolidate-constant-problem.cfg | 2 + src/test/ref/consolidate-constant-problem.log | 4 + src/test/ref/const-condition.cfg | 2 + src/test/ref/const-condition.log | 4 + src/test/ref/const-early-identification.cfg | 4 + src/test/ref/const-early-identification.log | 8 + src/test/ref/const-identification.cfg | 6 + src/test/ref/const-identification.log | 12 + src/test/ref/const-if-problem.cfg | 2 + src/test/ref/const-if-problem.log | 8 + src/test/ref/const-int-cast-problem.cfg | 2 + src/test/ref/const-int-cast-problem.log | 4 + src/test/ref/const-mult-div.cfg | 2 + src/test/ref/const-mult-div.log | 4 + src/test/ref/const-param.cfg | 4 + src/test/ref/const-param.log | 8 + src/test/ref/const-pointer.cfg | 2 + src/test/ref/const-pointer.log | 4 + src/test/ref/const-signed-promotion.cfg | 2 + src/test/ref/const-signed-promotion.log | 4 + src/test/ref/const-word-pointer.cfg | 2 + src/test/ref/const-word-pointer.log | 4 + src/test/ref/constabsmin.cfg | 2 + src/test/ref/constabsmin.log | 4 + src/test/ref/constant-string-concat-0.cfg | 2 + src/test/ref/constant-string-concat-0.log | 4 + src/test/ref/constant-string-concat.cfg | 2 + src/test/ref/constant-string-concat.log | 4 + src/test/ref/constantmin.cfg | 2 + src/test/ref/constantmin.log | 4 + src/test/ref/constants.cfg | 18 + src/test/ref/constants.log | 36 ++ src/test/ref/cordic-atan2-16-ref.cfg | 14 + src/test/ref/cordic-atan2-16-ref.log | 28 ++ src/test/ref/cordic-atan2-16.cfg | 6 + src/test/ref/cordic-atan2-16.log | 12 + src/test/ref/cordic-atan2-clear.cfg | 8 + src/test/ref/cordic-atan2-clear.log | 16 + src/test/ref/cordic-atan2.cfg | 6 + src/test/ref/cordic-atan2.log | 12 + src/test/ref/cpu-6502.cfg | 2 + src/test/ref/cpu-6502.log | 4 + src/test/ref/danny-joystick-problem.cfg | 2 + src/test/ref/danny-joystick-problem.log | 4 + src/test/ref/deep-nesting.cfg | 202 +++++++++ src/test/ref/deep-nesting.log | 404 ++++++++++++++++++ src/test/ref/default-font.cfg | 4 + src/test/ref/default-font.log | 8 + src/test/ref/deref-to-derefidx-2.cfg | 4 + src/test/ref/deref-to-derefidx-2.log | 8 + src/test/ref/deref-to-derefidx.cfg | 4 + src/test/ref/deref-to-derefidx.log | 8 + src/test/ref/derefidx-word-0.cfg | 2 + src/test/ref/derefidx-word-0.log | 4 + src/test/ref/derefidx-word-1.cfg | 2 + src/test/ref/derefidx-word-1.log | 4 + src/test/ref/derefidx-word-2.cfg | 2 + src/test/ref/derefidx-word-2.log | 4 + src/test/ref/divide-2s.cfg | 2 + src/test/ref/divide-2s.log | 4 + src/test/ref/double-assignment.cfg | 2 + src/test/ref/double-assignment.log | 4 + src/test/ref/double-import.cfg | 2 + src/test/ref/double-import.log | 4 + src/test/ref/double-indexing-arrays.cfg | 2 + src/test/ref/double-indexing-arrays.log | 4 + src/test/ref/duplicate-loop-problem.cfg | 2 + src/test/ref/duplicate-loop-problem.log | 4 + src/test/ref/dword.cfg | 2 + src/test/ref/dword.log | 4 + src/test/ref/emptyblock-error.cfg | 6 + src/test/ref/emptyblock-error.log | 12 + src/test/ref/encoding-literal-char.cfg | 2 + src/test/ref/encoding-literal-char.log | 4 + src/test/ref/enum-0.cfg | 2 + src/test/ref/enum-0.log | 4 + src/test/ref/enum-1.cfg | 2 + src/test/ref/enum-1.log | 4 + src/test/ref/enum-2.cfg | 2 + src/test/ref/enum-2.log | 4 + src/test/ref/enum-3.cfg | 2 + src/test/ref/enum-3.log | 4 + src/test/ref/enum-4.cfg | 2 + src/test/ref/enum-4.log | 4 + src/test/ref/enum-5.cfg | 4 + src/test/ref/enum-5.log | 8 + src/test/ref/enum-6.cfg | 2 + src/test/ref/enum-6.log | 4 + src/test/ref/enum-7.cfg | 2 + src/test/ref/enum-7.log | 4 + src/test/ref/enum-8.cfg | 2 + src/test/ref/enum-8.log | 4 + src/test/ref/euclid-3.cfg | 16 + src/test/ref/euclid-3.log | 32 ++ src/test/ref/euclid-problem-2.cfg | 4 + src/test/ref/euclid-problem-2.log | 8 + src/test/ref/euclid-problem.cfg | 2 + src/test/ref/euclid-problem.log | 4 + src/test/ref/examples/3d/3d.cfg | 28 ++ src/test/ref/examples/3d/3d.log | 56 +++ src/test/ref/examples/3d/perspective.cfg | 22 + src/test/ref/examples/3d/perspective.log | 44 ++ .../examples/bresenham/bitmap-bresenham.cfg | 22 + .../examples/bresenham/bitmap-bresenham.log | 44 ++ .../ref/examples/chargen/chargen-analysis.cfg | 14 + .../ref/examples/chargen/chargen-analysis.log | 28 ++ .../examples/fastmultiply/fastmultiply8.cfg | 16 + .../examples/fastmultiply/fastmultiply8.log | 32 ++ src/test/ref/examples/fire/fire.cfg | 12 + src/test/ref/examples/fire/fire.log | 24 ++ .../ref/examples/helloworld/helloworld.cfg | 6 + .../ref/examples/helloworld/helloworld.log | 12 + src/test/ref/examples/irq/irq-hyperscreen.cfg | 6 + src/test/ref/examples/irq/irq-hyperscreen.log | 12 + src/test/ref/examples/linking/linking.cfg | 4 + src/test/ref/examples/linking/linking.log | 8 + .../multiplexer/simple-multiplexer.cfg | 12 + .../multiplexer/simple-multiplexer.log | 24 ++ src/test/ref/examples/music/music.cfg | 2 + src/test/ref/examples/music/music.log | 4 + src/test/ref/examples/music/music_irq.cfg | 4 + src/test/ref/examples/music/music_irq.log | 8 + .../ref/examples/nmisamples/nmisamples.cfg | 6 + .../ref/examples/nmisamples/nmisamples.log | 12 + .../ref/examples/plasma/plasma-unroll.cfg | 16 + .../ref/examples/plasma/plasma-unroll.log | 32 ++ src/test/ref/examples/plasma/plasma.cfg | 16 + src/test/ref/examples/plasma/plasma.log | 32 ++ .../ref/examples/rasterbars/raster-bars.cfg | 4 + .../ref/examples/rasterbars/raster-bars.log | 8 + src/test/ref/examples/rotate/rotate.cfg | 26 ++ src/test/ref/examples/rotate/rotate.log | 52 +++ src/test/ref/examples/scroll/scroll.cfg | 4 + src/test/ref/examples/scroll/scroll.log | 8 + src/test/ref/examples/scrollbig/scrollbig.cfg | 12 + src/test/ref/examples/scrollbig/scrollbig.log | 24 ++ .../ref/examples/scrolllogo/scrolllogo.cfg | 22 + .../ref/examples/scrolllogo/scrolllogo.log | 44 ++ src/test/ref/examples/showlogo/showlogo.cfg | 4 + src/test/ref/examples/showlogo/showlogo.log | 8 + .../ref/examples/sinplotter/sine-plotter.cfg | 28 ++ .../ref/examples/sinplotter/sine-plotter.log | 56 +++ .../ref/examples/sinsprites/sinus-sprites.cfg | 38 ++ .../ref/examples/sinsprites/sinus-sprites.log | 76 ++++ src/test/ref/examples/zpcode/zpcode.cfg | 6 + src/test/ref/examples/zpcode/zpcode.log | 12 + src/test/ref/fastmultiply-127.cfg | 28 ++ src/test/ref/fastmultiply-127.log | 56 +++ src/test/ref/fibmem.cfg | 2 + src/test/ref/fibmem.log | 4 + src/test/ref/fill-square.cfg | 2 + src/test/ref/fill-square.log | 4 + src/test/ref/fillscreen.cfg | 4 + src/test/ref/fillscreen.log | 8 + src/test/ref/flipper-rex2.cfg | 8 + src/test/ref/flipper-rex2.log | 16 + src/test/ref/font-hex-show.cfg | 4 + src/test/ref/font-hex-show.log | 8 + src/test/ref/for-empty-increment.cfg | 2 + src/test/ref/for-empty-increment.log | 4 + src/test/ref/for-empty-init.cfg | 2 + src/test/ref/for-empty-init.log | 4 + src/test/ref/for-two-vars.cfg | 2 + src/test/ref/for-two-vars.log | 4 + src/test/ref/forced-zeropage.cfg | 2 + src/test/ref/forced-zeropage.log | 4 + src/test/ref/forclassicmin.cfg | 2 + src/test/ref/forclassicmin.log | 4 + src/test/ref/forincrementassign.cfg | 2 + src/test/ref/forincrementassign.log | 4 + src/test/ref/forrangedwords.cfg | 2 + src/test/ref/forrangedwords.log | 4 + src/test/ref/forrangemin.cfg | 2 + src/test/ref/forrangemin.log | 4 + src/test/ref/forrangesymbolic.cfg | 2 + src/test/ref/forrangesymbolic.log | 4 + src/test/ref/fragment-synth.cfg | 4 + src/test/ref/fragment-synth.log | 8 + src/test/ref/fragment-variations.cfg | 4 + src/test/ref/fragment-variations.log | 8 + src/test/ref/function-pointer-noarg-2.cfg | 2 + src/test/ref/function-pointer-noarg-2.log | 8 + src/test/ref/function-pointer-noarg-3.cfg | 6 + src/test/ref/function-pointer-noarg-3.log | 12 + .../ref/function-pointer-noarg-call-10.cfg | 10 + .../ref/function-pointer-noarg-call-10.log | 20 + .../ref/function-pointer-noarg-call-2.cfg | 6 + .../ref/function-pointer-noarg-call-2.log | 12 + .../ref/function-pointer-noarg-call-3.cfg | 8 + .../ref/function-pointer-noarg-call-3.log | 16 + .../ref/function-pointer-noarg-call-4.cfg | 6 + .../ref/function-pointer-noarg-call-4.log | 12 + .../ref/function-pointer-noarg-call-5.cfg | 6 + .../ref/function-pointer-noarg-call-5.log | 12 + .../ref/function-pointer-noarg-call-6.cfg | 4 + .../ref/function-pointer-noarg-call-6.log | 8 + .../ref/function-pointer-noarg-call-7.cfg | 6 + .../ref/function-pointer-noarg-call-7.log | 12 + .../ref/function-pointer-noarg-call-8.cfg | 6 + .../ref/function-pointer-noarg-call-8.log | 12 + .../ref/function-pointer-noarg-call-9.cfg | 4 + .../ref/function-pointer-noarg-call-9.log | 8 + src/test/ref/function-pointer-noarg-call.cfg | 4 + src/test/ref/function-pointer-noarg-call.log | 8 + src/test/ref/function-pointer-noarg.cfg | 6 + src/test/ref/function-pointer-noarg.log | 12 + src/test/ref/function-pointer-return.cfg | 6 + src/test/ref/function-pointer-return.log | 12 + src/test/ref/gfxbank.cfg | 2 + src/test/ref/gfxbank.log | 4 + src/test/ref/global-pc-multiple.cfg | 4 + src/test/ref/global-pc-multiple.log | 8 + src/test/ref/global-pc.cfg | 2 + src/test/ref/global-pc.log | 4 + src/test/ref/halfscii.cfg | 2 + src/test/ref/halfscii.log | 4 + src/test/ref/helloworld0.cfg | 2 + src/test/ref/helloworld0.log | 4 + src/test/ref/helloworld2-inline.cfg | 2 + src/test/ref/helloworld2-inline.log | 4 + src/test/ref/helloworld2.cfg | 4 + src/test/ref/helloworld2.log | 8 + src/test/ref/hex2dec-ptrptr.cfg | 8 + src/test/ref/hex2dec-ptrptr.log | 16 + src/test/ref/hex2dec.cfg | 10 + src/test/ref/hex2dec.log | 20 + src/test/ref/ifmin.cfg | 2 + src/test/ref/ifmin.log | 4 + src/test/ref/immzero.cfg | 2 + src/test/ref/immzero.log | 4 + src/test/ref/importing.cfg | 2 + src/test/ref/importing.log | 4 + src/test/ref/incd020.cfg | 2 + src/test/ref/incd020.log | 4 + src/test/ref/incrementinarray.cfg | 10 + src/test/ref/incrementinarray.log | 20 + src/test/ref/infloop-error.cfg | 2 + src/test/ref/infloop-error.log | 4 + src/test/ref/init-volatiles.cfg | 2 + src/test/ref/init-volatiles.log | 4 + src/test/ref/initializer-0.cfg | 2 + src/test/ref/initializer-0.log | 4 + src/test/ref/initializer-1.cfg | 2 + src/test/ref/initializer-1.log | 4 + src/test/ref/initializer-2.cfg | 2 + src/test/ref/initializer-2.log | 4 + src/test/ref/initializer-3.cfg | 2 + src/test/ref/initializer-3.log | 4 + src/test/ref/inline-asm-clobber-none.cfg | 2 + src/test/ref/inline-asm-clobber-none.log | 4 + src/test/ref/inline-asm-clobber.cfg | 2 + src/test/ref/inline-asm-clobber.log | 4 + src/test/ref/inline-asm-jsr-clobber.cfg | 2 + src/test/ref/inline-asm-jsr-clobber.log | 4 + src/test/ref/inline-asm-label.cfg | 2 + src/test/ref/inline-asm-label.log | 4 + src/test/ref/inline-asm-optimized.cfg | 2 + src/test/ref/inline-asm-optimized.log | 4 + src/test/ref/inline-asm-param.cfg | 2 + src/test/ref/inline-asm-param.log | 4 + src/test/ref/inline-asm-ref-scoped.cfg | 4 + src/test/ref/inline-asm-ref-scoped.log | 8 + src/test/ref/inline-asm-refout-const.cfg | 2 + src/test/ref/inline-asm-refout-const.log | 4 + src/test/ref/inline-asm-refout.cfg | 2 + src/test/ref/inline-asm-refout.log | 4 + src/test/ref/inline-asm.cfg | 2 + src/test/ref/inline-asm.log | 4 + src/test/ref/inline-assignment.cfg | 2 + src/test/ref/inline-assignment.log | 4 + src/test/ref/inline-function-if.cfg | 2 + src/test/ref/inline-function-if.log | 4 + src/test/ref/inline-function-level2.cfg | 2 + src/test/ref/inline-function-level2.log | 4 + src/test/ref/inline-function-min.cfg | 2 + src/test/ref/inline-function-min.log | 4 + src/test/ref/inline-function-print.cfg | 2 + src/test/ref/inline-function-print.log | 4 + src/test/ref/inline-function.cfg | 2 + src/test/ref/inline-function.log | 4 + src/test/ref/inline-kasm-clobber.cfg | 2 + src/test/ref/inline-kasm-clobber.log | 4 + src/test/ref/inline-kasm-data.cfg | 2 + src/test/ref/inline-kasm-data.log | 4 + src/test/ref/inline-kasm-loop.cfg | 2 + src/test/ref/inline-kasm-loop.log | 4 + src/test/ref/inline-kasm-refout.cfg | 2 + src/test/ref/inline-kasm-refout.log | 4 + src/test/ref/inline-kasm-resource.cfg | 2 + src/test/ref/inline-kasm-resource.log | 4 + src/test/ref/inline-pointer-0.cfg | 2 + src/test/ref/inline-pointer-0.log | 4 + src/test/ref/inline-pointer-1.cfg | 4 + src/test/ref/inline-pointer-1.log | 8 + src/test/ref/inline-pointer-2.cfg | 2 + src/test/ref/inline-pointer-2.log | 4 + src/test/ref/inline-string-2.cfg | 6 + src/test/ref/inline-string-2.log | 12 + src/test/ref/inline-string-3.cfg | 2 + src/test/ref/inline-string-3.log | 4 + src/test/ref/inline-string-4.cfg | 4 + src/test/ref/inline-string-4.log | 8 + src/test/ref/inline-string.cfg | 4 + src/test/ref/inline-string.log | 8 + src/test/ref/inline-word-0.cfg | 2 + src/test/ref/inline-word-0.log | 4 + src/test/ref/inline-word-1.cfg | 2 + src/test/ref/inline-word-1.log | 4 + src/test/ref/inline-word-2.cfg | 2 + src/test/ref/inline-word-2.log | 4 + src/test/ref/inline-word.cfg | 2 + src/test/ref/inline-word.log | 4 + src/test/ref/inlinearrayproblem.cfg | 2 + src/test/ref/inlinearrayproblem.log | 4 + src/test/ref/inmem-const-array.cfg | 2 + src/test/ref/inmem-const-array.log | 4 + src/test/ref/inmemarray.cfg | 2 + src/test/ref/inmemarray.log | 4 + src/test/ref/inmemstring.cfg | 2 + src/test/ref/inmemstring.log | 4 + src/test/ref/inner-increment-problem.cfg | 2 + src/test/ref/inner-increment-problem.log | 4 + src/test/ref/int-conversion.cfg | 8 + src/test/ref/int-conversion.log | 16 + src/test/ref/int-literals.cfg | 6 + src/test/ref/int-literals.log | 12 + .../ref/interrupt-volatile-reuse-problem1.cfg | 4 + .../ref/interrupt-volatile-reuse-problem1.log | 8 + .../ref/interrupt-volatile-reuse-problem2.cfg | 4 + .../ref/interrupt-volatile-reuse-problem2.log | 8 + src/test/ref/irq-hardware-clobber-jsr.cfg | 6 + src/test/ref/irq-hardware-clobber-jsr.log | 12 + src/test/ref/irq-hardware-clobber.cfg | 4 + src/test/ref/irq-hardware-clobber.log | 8 + src/test/ref/irq-hardware-stack.cfg | 4 + src/test/ref/irq-hardware-stack.log | 8 + src/test/ref/irq-hardware.cfg | 4 + src/test/ref/irq-hardware.log | 8 + src/test/ref/irq-idx-problem.cfg | 4 + src/test/ref/irq-idx-problem.log | 8 + src/test/ref/irq-kernel-minimal.cfg | 4 + src/test/ref/irq-kernel-minimal.log | 8 + src/test/ref/irq-kernel.cfg | 4 + src/test/ref/irq-kernel.log | 8 + .../ref/irq-local-var-overlap-problem.cfg | 8 + .../ref/irq-local-var-overlap-problem.log | 16 + src/test/ref/irq-raster.cfg | 4 + src/test/ref/irq-raster.log | 8 + src/test/ref/irq-volatile-bool-problem.cfg | 4 + src/test/ref/irq-volatile-bool-problem.log | 8 + src/test/ref/iterarray.cfg | 2 + src/test/ref/iterarray.log | 4 + src/test/ref/kc-ka-string-encoding.cfg | 2 + src/test/ref/kc-ka-string-encoding.log | 4 + src/test/ref/keyboard-glitch.cfg | 10 + src/test/ref/keyboard-glitch.log | 20 + .../ref/kickasm-uses-prevent-deletion.cfg | 4 + .../ref/kickasm-uses-prevent-deletion.log | 8 + src/test/ref/line-anim.cfg | 16 + src/test/ref/line-anim.log | 32 ++ src/test/ref/linegen.cfg | 20 + src/test/ref/linegen.log | 40 ++ src/test/ref/literal-char-minus-number.cfg | 2 + src/test/ref/literal-char-minus-number.log | 4 + src/test/ref/literal-strings.cfg | 2 + src/test/ref/literal-strings.log | 4 + src/test/ref/literal-word-pointer-0.cfg | 4 + src/test/ref/literal-word-pointer-0.log | 8 + src/test/ref/literals.cfg | 2 + src/test/ref/literals.log | 4 + src/test/ref/liverange-call-problem.cfg | 6 + src/test/ref/liverange-call-problem.log | 12 + src/test/ref/liverange-problem-0.cfg | 4 + src/test/ref/liverange-problem-0.log | 8 + src/test/ref/liverange.cfg | 4 + src/test/ref/liverange.log | 8 + src/test/ref/local-string.cfg | 2 + src/test/ref/local-string.log | 4 + src/test/ref/localscope-loops.cfg | 2 + src/test/ref/localscope-loops.log | 4 + src/test/ref/localscope-simple.cfg | 2 + src/test/ref/localscope-simple.log | 4 + src/test/ref/long-pointer-0.cfg | 2 + src/test/ref/long-pointer-0.log | 4 + src/test/ref/long-pointer-1.cfg | 2 + src/test/ref/long-pointer-1.log | 4 + src/test/ref/longbranch-interrupt-problem.cfg | 4 + src/test/ref/longbranch-interrupt-problem.log | 8 + src/test/ref/longjump.cfg | 2 + src/test/ref/longjump.log | 4 + src/test/ref/longjump2.cfg | 6 + src/test/ref/longjump2.log | 12 + src/test/ref/loop-break-continue.cfg | 2 + src/test/ref/loop-break-continue.log | 4 + src/test/ref/loop-break-nested.cfg | 2 + src/test/ref/loop-break-nested.log | 4 + src/test/ref/loop-break.cfg | 2 + src/test/ref/loop-break.log | 4 + src/test/ref/loop-continue.cfg | 2 + src/test/ref/loop-continue.log | 4 + src/test/ref/loop-for-continue.cfg | 2 + src/test/ref/loop-for-continue.log | 4 + src/test/ref/loop-for-empty-body.cfg | 2 + src/test/ref/loop-for-empty-body.log | 4 + src/test/ref/loop-for-sideeffect.cfg | 2 + src/test/ref/loop-for-sideeffect.log | 4 + src/test/ref/loop-memset-min.cfg | 4 + src/test/ref/loop-memset-min.log | 8 + src/test/ref/loop-problem.cfg | 6 + src/test/ref/loop-problem.log | 12 + src/test/ref/loop-problem2.cfg | 6 + src/test/ref/loop-problem2.log | 12 + src/test/ref/loop-while-continue.cfg | 2 + src/test/ref/loop-while-continue.log | 4 + src/test/ref/loop-while-min.cfg | 2 + src/test/ref/loop-while-min.log | 4 + src/test/ref/loop-while-sideeffect.cfg | 2 + src/test/ref/loop-while-sideeffect.log | 4 + src/test/ref/loop100.cfg | 2 + src/test/ref/loop100.log | 4 + src/test/ref/loophead-problem-2.cfg | 4 + src/test/ref/loophead-problem-2.log | 8 + src/test/ref/loophead-problem-3.cfg | 4 + src/test/ref/loophead-problem-3.log | 8 + src/test/ref/loophead-problem.cfg | 4 + src/test/ref/loophead-problem.log | 8 + src/test/ref/loopmin.cfg | 2 + src/test/ref/loopmin.log | 4 + src/test/ref/loopnest.cfg | 4 + src/test/ref/loopnest.log | 8 + src/test/ref/loopnest2.cfg | 6 + src/test/ref/loopnest2.log | 12 + src/test/ref/loopnest3.cfg | 6 + src/test/ref/loopnest3.log | 12 + src/test/ref/loopsplit.cfg | 2 + src/test/ref/loopsplit.log | 4 + src/test/ref/malloc-0.cfg | 4 + src/test/ref/malloc-0.log | 8 + src/test/ref/malloc-1.cfg | 4 + src/test/ref/malloc-1.log | 8 + src/test/ref/mem-alignment.cfg | 2 + src/test/ref/mem-alignment.log | 4 + src/test/ref/memcpy-0.cfg | 4 + src/test/ref/memcpy-0.log | 8 + src/test/ref/memcpy-1.cfg | 4 + src/test/ref/memcpy-1.log | 8 + src/test/ref/memory-heap.cfg | 6 + src/test/ref/memory-heap.log | 12 + src/test/ref/min-fmul-16.cfg | 16 + src/test/ref/min-fmul-16.log | 32 ++ src/test/ref/mixed-array-0.cfg | 2 + src/test/ref/mixed-array-0.log | 4 + src/test/ref/mixed-array-1.cfg | 2 + src/test/ref/mixed-array-1.log | 4 + src/test/ref/modglobal.cfg | 4 + src/test/ref/modglobal.log | 8 + src/test/ref/modglobalmin.cfg | 4 + src/test/ref/modglobalmin.log | 8 + src/test/ref/mul8u-min.cfg | 4 + src/test/ref/mul8u-min.log | 8 + .../simple-multiplexer-irq.cfg | 14 + .../simple-multiplexer-irq.log | 28 ++ src/test/ref/multiply-2s.cfg | 2 + src/test/ref/multiply-2s.log | 4 + src/test/ref/multiply-ns.cfg | 2 + src/test/ref/multiply-ns.log | 4 + src/test/ref/nes-array.cfg | 4 + src/test/ref/nes-array.log | 8 + src/test/ref/no-recursion-heavy.cfg | 10 + src/test/ref/no-recursion-heavy.log | 20 + src/test/ref/noop-cast-elimination.cfg | 2 + src/test/ref/noop-cast-elimination.log | 4 + src/test/ref/norom-charset.cfg | 4 + src/test/ref/norom-charset.log | 8 + src/test/ref/number-conversion.cfg | 4 + src/test/ref/number-conversion.log | 8 + src/test/ref/number-inference-sum.cfg | 2 + src/test/ref/number-inference-sum.log | 4 + src/test/ref/number-type.cfg | 6 + src/test/ref/number-type.log | 12 + src/test/ref/operator-lohi-problem-1.cfg | 2 + src/test/ref/operator-lohi-problem-1.log | 4 + src/test/ref/operator-lohi-problem.cfg | 2 + src/test/ref/operator-lohi-problem.log | 4 + .../ref/optimize-unsigned-comparisons.cfg | 2 + .../ref/optimize-unsigned-comparisons.log | 4 + src/test/ref/overlap-allocation-2.cfg | 6 + src/test/ref/overlap-allocation-2.log | 12 + src/test/ref/overlap-allocation.cfg | 4 + src/test/ref/overlap-allocation.log | 8 + src/test/ref/parse-negated-struct-ref.cfg | 2 + src/test/ref/parse-negated-struct-ref.log | 4 + src/test/ref/plasma-center.cfg | 32 ++ src/test/ref/plasma-center.log | 64 +++ src/test/ref/platform-asm6502.cfg | 2 + src/test/ref/platform-asm6502.log | 4 + src/test/ref/plus-0.cfg | 4 + src/test/ref/plus-0.log | 8 + src/test/ref/pointer-anding.cfg | 2 + src/test/ref/pointer-anding.log | 4 + src/test/ref/pointer-cast-2.cfg | 2 + src/test/ref/pointer-cast-2.log | 4 + src/test/ref/pointer-cast-3.cfg | 2 + src/test/ref/pointer-cast-3.log | 4 + src/test/ref/pointer-cast-4.cfg | 2 + src/test/ref/pointer-cast-4.log | 4 + src/test/ref/pointer-cast.cfg | 2 + src/test/ref/pointer-cast.log | 4 + src/test/ref/pointer-plus-0.cfg | 4 + src/test/ref/pointer-plus-0.log | 8 + src/test/ref/pointer-plus-signed-word.cfg | 2 + src/test/ref/pointer-plus-signed-word.log | 4 + src/test/ref/pointer-pointer-1.cfg | 2 + src/test/ref/pointer-pointer-1.log | 4 + src/test/ref/pointer-pointer-2.cfg | 4 + src/test/ref/pointer-pointer-2.log | 8 + src/test/ref/pointer-pointer-3.cfg | 4 + src/test/ref/pointer-pointer-3.log | 8 + src/test/ref/pointer-void-0.cfg | 2 + src/test/ref/pointer-void-0.log | 4 + src/test/ref/pointer-void-1.cfg | 4 + src/test/ref/pointer-void-1.log | 8 + src/test/ref/pointer-void-2.cfg | 4 + src/test/ref/pointer-void-2.log | 8 + src/test/ref/pointer-void-3.cfg | 4 + src/test/ref/pointer-void-3.log | 8 + src/test/ref/print-problem.cfg | 4 + src/test/ref/print-problem.log | 8 + src/test/ref/printmsg.cfg | 6 + src/test/ref/printmsg.log | 12 + src/test/ref/problem-negative-word-const.cfg | 2 + src/test/ref/problem-negative-word-const.log | 4 + src/test/ref/processor-port-test.cfg | 16 + src/test/ref/processor-port-test.log | 32 ++ src/test/ref/ptr-complex.cfg | 2 + src/test/ref/ptr-complex.log | 4 + src/test/ref/ptrptr-optimize-0.cfg | 2 + src/test/ref/ptrptr-optimize-0.log | 4 + src/test/ref/ptrptr-optimize-1.cfg | 4 + src/test/ref/ptrptr-optimize-1.log | 8 + src/test/ref/ptrptr-optimize-2.cfg | 4 + src/test/ref/ptrptr-optimize-2.log | 8 + src/test/ref/ptrtest.cfg | 10 + src/test/ref/ptrtest.log | 20 + src/test/ref/ptrtestmin.cfg | 2 + src/test/ref/ptrtestmin.log | 4 + src/test/ref/reserve-zp-global.cfg | 4 + src/test/ref/reserve-zp-global.log | 8 + src/test/ref/reserve-zp-procedure-1.cfg | 4 + src/test/ref/reserve-zp-procedure-1.log | 8 + src/test/ref/reserve-zp-procedure-2.cfg | 6 + src/test/ref/reserve-zp-procedure-2.log | 12 + src/test/ref/reserve-zp-procedure-3.cfg | 4 + src/test/ref/reserve-zp-procedure-3.log | 8 + src/test/ref/robozzle64-label-problem.cfg | 4 + src/test/ref/robozzle64-label-problem.log | 8 + src/test/ref/roll-sprite-msb.cfg | 4 + src/test/ref/roll-sprite-msb.log | 8 + src/test/ref/roll-variable.cfg | 2 + src/test/ref/roll-variable.log | 4 + src/test/ref/runtime-unused-procedure.cfg | 2 + src/test/ref/runtime-unused-procedure.log | 6 + src/test/ref/sandbox-ternary-error.cfg | 2 + src/test/ref/sandbox-ternary-error.log | 4 + src/test/ref/sandbox.cfg | 16 + src/test/ref/sandbox.log | 32 ++ src/test/ref/scan-desire-problem.cfg | 12 + src/test/ref/scan-desire-problem.log | 24 ++ src/test/ref/screen-center-angle.cfg | 20 + src/test/ref/screen-center-angle.log | 40 ++ src/test/ref/screen-center-distance.cfg | 28 ++ src/test/ref/screen-center-distance.log | 56 +++ src/test/ref/screen-show-spiral-buckets.cfg | 20 + src/test/ref/screen-show-spiral-buckets.log | 40 ++ src/test/ref/screen-show-spiral.cfg | 18 + src/test/ref/screen-show-spiral.log | 36 ++ src/test/ref/scroll-clobber.cfg | 2 + src/test/ref/scroll-clobber.log | 4 + src/test/ref/scrollbig-clobber.cfg | 4 + src/test/ref/scrollbig-clobber.log | 8 + src/test/ref/semi-struct-1.cfg | 18 + src/test/ref/semi-struct-1.log | 36 ++ src/test/ref/semi-struct-2.cfg | 28 ++ src/test/ref/semi-struct-2.log | 56 +++ src/test/ref/sequence-locality-0.cfg | 2 + src/test/ref/sequence-locality-0.log | 4 + src/test/ref/sequence-locality-1.cfg | 2 + src/test/ref/sequence-locality-1.log | 4 + src/test/ref/sieve-min.cfg | 10 + src/test/ref/sieve-min.log | 20 + src/test/ref/sieve.cfg | 32 ++ src/test/ref/sieve.log | 64 +++ src/test/ref/signed-bytes.cfg | 2 + src/test/ref/signed-bytes.log | 4 + src/test/ref/signed-char-comparison.cfg | 4 + src/test/ref/signed-char-comparison.log | 8 + src/test/ref/signed-indexed-subtract.cfg | 18 + src/test/ref/signed-indexed-subtract.log | 36 ++ src/test/ref/signed-word-minus-byte-2.cfg | 2 + src/test/ref/signed-word-minus-byte-2.log | 4 + src/test/ref/signed-words.cfg | 6 + src/test/ref/signed-words.log | 12 + src/test/ref/simple-loop.cfg | 2 + src/test/ref/simple-loop.log | 4 + src/test/ref/sinus-basic.cfg | 26 ++ src/test/ref/sinus-basic.log | 52 +++ src/test/ref/sinusgen16.cfg | 28 ++ src/test/ref/sinusgen16.log | 56 +++ src/test/ref/sinusgen16b.cfg | 32 ++ src/test/ref/sinusgen16b.log | 64 +++ src/test/ref/sinusgen8.cfg | 26 ++ src/test/ref/sinusgen8.log | 52 +++ src/test/ref/sinusgen8b.cfg | 36 ++ src/test/ref/sinusgen8b.log | 72 ++++ src/test/ref/sinusgenscale8.cfg | 34 ++ src/test/ref/sinusgenscale8.log | 68 +++ src/test/ref/sizeof-arrays.cfg | 2 + src/test/ref/sizeof-arrays.log | 4 + src/test/ref/sizeof-expr.cfg | 2 + src/test/ref/sizeof-expr.log | 4 + src/test/ref/sizeof-struct.cfg | 2 + src/test/ref/sizeof-struct.log | 4 + src/test/ref/sizeof-types.cfg | 2 + src/test/ref/sizeof-types.log | 4 + src/test/ref/stack-relative-addressing.cfg | 4 + src/test/ref/stack-relative-addressing.log | 8 + src/test/ref/statement-sequence-1.cfg | 2 + src/test/ref/statement-sequence-1.log | 4 + .../ref/string-const-consolidation-noroot.cfg | 4 + .../ref/string-const-consolidation-noroot.log | 8 + src/test/ref/string-const-consolidation.cfg | 4 + src/test/ref/string-const-consolidation.log | 8 + src/test/ref/string-encoding-literals.cfg | 2 + src/test/ref/string-encoding-literals.log | 4 + src/test/ref/string-encoding-pragma.cfg | 2 + src/test/ref/string-encoding-pragma.log | 4 + src/test/ref/string-escapes-0.cfg | 2 + src/test/ref/string-escapes-0.log | 4 + src/test/ref/string-escapes-1.cfg | 2 + src/test/ref/string-escapes-1.log | 4 + src/test/ref/string-escapes-2.cfg | 4 + src/test/ref/string-escapes-2.log | 8 + src/test/ref/string-escapes-3.cfg | 2 + src/test/ref/string-escapes-3.log | 4 + src/test/ref/string-pointer-problem.cfg | 4 + src/test/ref/string-pointer-problem.log | 8 + src/test/ref/strip.cfg | 6 + src/test/ref/strip.log | 12 + src/test/ref/struct-0.cfg | 2 + src/test/ref/struct-0.log | 4 + src/test/ref/struct-1.cfg | 2 + src/test/ref/struct-1.log | 4 + src/test/ref/struct-10.cfg | 2 + src/test/ref/struct-10.log | 4 + src/test/ref/struct-11.cfg | 16 + src/test/ref/struct-11.log | 32 ++ src/test/ref/struct-12.cfg | 4 + src/test/ref/struct-12.log | 8 + src/test/ref/struct-2.cfg | 2 + src/test/ref/struct-2.log | 4 + src/test/ref/struct-3.cfg | 4 + src/test/ref/struct-3.log | 8 + src/test/ref/struct-4.cfg | 2 + src/test/ref/struct-4.log | 4 + src/test/ref/struct-5.cfg | 4 + src/test/ref/struct-5.log | 8 + src/test/ref/struct-6.cfg | 2 + src/test/ref/struct-6.log | 4 + src/test/ref/struct-7.cfg | 2 + src/test/ref/struct-7.log | 4 + src/test/ref/struct-8.cfg | 2 + src/test/ref/struct-8.log | 4 + src/test/ref/struct-9.cfg | 2 + src/test/ref/struct-9.log | 4 + src/test/ref/struct-pos-fill.cfg | 2 + src/test/ref/struct-pos-fill.log | 4 + src/test/ref/struct-ptr-0.cfg | 2 + src/test/ref/struct-ptr-0.log | 4 + src/test/ref/struct-ptr-1.cfg | 2 + src/test/ref/struct-ptr-1.log | 4 + src/test/ref/struct-ptr-10.cfg | 2 + src/test/ref/struct-ptr-10.log | 4 + src/test/ref/struct-ptr-11.cfg | 2 + src/test/ref/struct-ptr-11.log | 4 + src/test/ref/struct-ptr-12-ref.cfg | 2 + src/test/ref/struct-ptr-12-ref.log | 4 + src/test/ref/struct-ptr-12.cfg | 2 + src/test/ref/struct-ptr-12.log | 4 + src/test/ref/struct-ptr-13.cfg | 2 + src/test/ref/struct-ptr-13.log | 4 + src/test/ref/struct-ptr-14.cfg | 4 + src/test/ref/struct-ptr-14.log | 8 + src/test/ref/struct-ptr-15.cfg | 2 + src/test/ref/struct-ptr-15.log | 4 + src/test/ref/struct-ptr-16.cfg | 4 + src/test/ref/struct-ptr-16.log | 8 + src/test/ref/struct-ptr-17.cfg | 4 + src/test/ref/struct-ptr-17.log | 8 + src/test/ref/struct-ptr-18.cfg | 4 + src/test/ref/struct-ptr-18.log | 8 + src/test/ref/struct-ptr-19.cfg | 4 + src/test/ref/struct-ptr-19.log | 8 + src/test/ref/struct-ptr-2.cfg | 2 + src/test/ref/struct-ptr-2.log | 4 + src/test/ref/struct-ptr-20.cfg | 2 + src/test/ref/struct-ptr-20.log | 4 + src/test/ref/struct-ptr-21.cfg | 2 + src/test/ref/struct-ptr-21.log | 4 + src/test/ref/struct-ptr-22.cfg | 14 + src/test/ref/struct-ptr-22.log | 28 ++ src/test/ref/struct-ptr-23.cfg | 4 + src/test/ref/struct-ptr-23.log | 8 + src/test/ref/struct-ptr-24.cfg | 4 + src/test/ref/struct-ptr-24.log | 8 + src/test/ref/struct-ptr-25.cfg | 2 + src/test/ref/struct-ptr-25.log | 4 + src/test/ref/struct-ptr-26.cfg | 8 + src/test/ref/struct-ptr-26.log | 16 + src/test/ref/struct-ptr-29.cfg | 4 + src/test/ref/struct-ptr-29.log | 8 + src/test/ref/struct-ptr-3.cfg | 2 + src/test/ref/struct-ptr-3.log | 4 + src/test/ref/struct-ptr-30.cfg | 4 + src/test/ref/struct-ptr-30.log | 8 + src/test/ref/struct-ptr-31.cfg | 4 + src/test/ref/struct-ptr-31.log | 8 + src/test/ref/struct-ptr-32.cfg | 2 + src/test/ref/struct-ptr-32.log | 4 + src/test/ref/struct-ptr-33.cfg | 2 + src/test/ref/struct-ptr-33.log | 4 + src/test/ref/struct-ptr-34.cfg | 4 + src/test/ref/struct-ptr-34.log | 8 + src/test/ref/struct-ptr-4.cfg | 2 + src/test/ref/struct-ptr-4.log | 4 + src/test/ref/struct-ptr-5.cfg | 2 + src/test/ref/struct-ptr-5.log | 4 + src/test/ref/struct-ptr-6.cfg | 2 + src/test/ref/struct-ptr-6.log | 4 + src/test/ref/struct-ptr-7.cfg | 2 + src/test/ref/struct-ptr-7.log | 4 + src/test/ref/struct-ptr-8.cfg | 2 + src/test/ref/struct-ptr-8.log | 4 + src/test/ref/struct-ptr-9.cfg | 2 + src/test/ref/struct-ptr-9.log | 4 + src/test/ref/subexpr-optimize-0.cfg | 2 + src/test/ref/subexpr-optimize-0.log | 4 + src/test/ref/subexpr-optimize-1.cfg | 2 + src/test/ref/subexpr-optimize-1.log | 4 + src/test/ref/subexpr-optimize-2.cfg | 2 + src/test/ref/subexpr-optimize-2.log | 4 + src/test/ref/subexpr-optimize-3.cfg | 2 + src/test/ref/subexpr-optimize-3.log | 4 + src/test/ref/subexpr-optimize-4.cfg | 2 + src/test/ref/subexpr-optimize-4.log | 4 + src/test/ref/summin.cfg | 4 + src/test/ref/summin.log | 8 + src/test/ref/switch-0.cfg | 2 + src/test/ref/switch-0.log | 4 + src/test/ref/switch-1.cfg | 2 + src/test/ref/switch-1.log | 4 + src/test/ref/switch-2.cfg | 2 + src/test/ref/switch-2.log | 4 + src/test/ref/switch-4.cfg | 2 + src/test/ref/switch-4.log | 4 + src/test/ref/ternary-1.cfg | 2 + src/test/ref/ternary-1.log | 4 + src/test/ref/ternary-2.cfg | 2 + src/test/ref/ternary-2.log | 4 + src/test/ref/ternary-3.cfg | 8 + src/test/ref/ternary-3.log | 16 + src/test/ref/ternary-inference.cfg | 2 + src/test/ref/ternary-inference.log | 4 + src/test/ref/test-comments-block.cfg | 4 + src/test/ref/test-comments-block.log | 8 + src/test/ref/test-comments-loop.cfg | 2 + src/test/ref/test-comments-loop.log | 4 + src/test/ref/test-comments-single.cfg | 4 + src/test/ref/test-comments-single.log | 8 + src/test/ref/test-comments-usage.cfg | 2 + src/test/ref/test-comments-usage.log | 4 + src/test/ref/test-comparisons-sword.cfg | 20 + src/test/ref/test-comparisons-sword.log | 40 ++ src/test/ref/test-comparisons-word.cfg | 18 + src/test/ref/test-comparisons-word.log | 36 ++ src/test/ref/test-comparisons.cfg | 16 + src/test/ref/test-comparisons.log | 32 ++ src/test/ref/test-division.cfg | 42 ++ src/test/ref/test-division.log | 84 ++++ src/test/ref/test-interrupt-notype.cfg | 4 + src/test/ref/test-interrupt-notype.log | 8 + .../ref/test-interrupt-volatile-write.cfg | 4 + .../ref/test-interrupt-volatile-write.log | 8 + src/test/ref/test-interrupt-volatile.cfg | 4 + src/test/ref/test-interrupt-volatile.log | 8 + src/test/ref/test-interrupt.cfg | 4 + src/test/ref/test-interrupt.log | 8 + src/test/ref/test-kasm-pc.cfg | 2 + src/test/ref/test-kasm-pc.log | 4 + src/test/ref/test-kasm.cfg | 2 + src/test/ref/test-kasm.log | 4 + src/test/ref/test-keyboard-space.cfg | 8 + src/test/ref/test-keyboard-space.log | 16 + src/test/ref/test-keyboard.cfg | 10 + src/test/ref/test-keyboard.log | 20 + src/test/ref/test-lohiconst.cfg | 2 + src/test/ref/test-lohiconst.log | 4 + src/test/ref/test-lowhigh.cfg | 16 + src/test/ref/test-lowhigh.log | 32 ++ src/test/ref/test-multiply-16bit.cfg | 44 ++ src/test/ref/test-multiply-16bit.log | 88 ++++ src/test/ref/test-multiply-8bit.cfg | 52 +++ src/test/ref/test-multiply-8bit.log | 104 +++++ src/test/ref/test-scroll-up.cfg | 8 + src/test/ref/test-scroll-up.log | 16 + src/test/ref/test-signed-word-minus-byte.cfg | 16 + src/test/ref/test-signed-word-minus-byte.log | 32 ++ src/test/ref/test-word-size-arrays.cfg | 2 + src/test/ref/test-word-size-arrays.log | 4 + src/test/ref/tetris-npe.cfg | 2 + src/test/ref/tetris-npe.log | 4 + src/test/ref/textbox.cfg | 6 + src/test/ref/textbox.log | 12 + src/test/ref/tod018-problem.cfg | 2 + src/test/ref/tod018-problem.log | 4 + src/test/ref/travis1.cfg | 10 + src/test/ref/travis1.log | 20 + src/test/ref/true-inline-words.cfg | 2 + src/test/ref/true-inline-words.log | 4 + src/test/ref/type-inference.cfg | 2 + src/test/ref/type-inference.log | 4 + src/test/ref/type-mix.cfg | 2 + src/test/ref/type-mix.log | 4 + src/test/ref/type-signed.cfg | 12 + src/test/ref/type-signed.log | 24 ++ src/test/ref/typedef-0.cfg | 2 + src/test/ref/typedef-0.log | 4 + src/test/ref/typedef-1.cfg | 2 + src/test/ref/typedef-1.log | 4 + src/test/ref/typedef-2.cfg | 2 + src/test/ref/typedef-2.log | 4 + src/test/ref/typeid-plus-byte-problem.cfg | 2 + src/test/ref/typeid-plus-byte-problem.log | 4 + src/test/ref/typeid-plus-bytes.cfg | 10 + src/test/ref/typeid-plus-bytes.log | 20 + src/test/ref/typeid-simple.cfg | 2 + src/test/ref/typeid-simple.log | 4 + src/test/ref/typeinference-problem.cfg | 2 + src/test/ref/typeinference-problem.log | 4 + src/test/ref/uninitialized.cfg | 2 + src/test/ref/uninitialized.log | 4 + src/test/ref/unroll-for-min.cfg | 2 + src/test/ref/unroll-for-min.log | 4 + src/test/ref/unroll-loop-modifyvar.cfg | 2 + src/test/ref/unroll-loop-modifyvar.log | 4 + src/test/ref/unroll-screenfill-for-double.cfg | 2 + src/test/ref/unroll-screenfill-for-double.log | 4 + src/test/ref/unroll-screenfill-for.cfg | 2 + src/test/ref/unroll-screenfill-for.log | 4 + src/test/ref/unroll-screenfill-while.cfg | 2 + src/test/ref/unroll-screenfill-while.log | 4 + src/test/ref/unroll-while-min.cfg | 2 + src/test/ref/unroll-while-min.log | 4 + src/test/ref/unused-irq.cfg | 6 + src/test/ref/unused-irq.log | 12 + src/test/ref/unused-method.cfg | 2 + src/test/ref/unused-method.log | 4 + src/test/ref/unused-vars.cfg | 4 + src/test/ref/unused-vars.log | 8 + src/test/ref/unusedblockproblem.cfg | 2 + src/test/ref/unusedblockproblem.log | 4 + src/test/ref/useglobal.cfg | 2 + src/test/ref/useglobal.log | 4 + src/test/ref/useuninitialized.cfg | 2 + src/test/ref/useuninitialized.log | 4 + src/test/ref/var-export.cfg | 2 + src/test/ref/var-export.log | 4 + src/test/ref/var-forward-problem.cfg | 2 + src/test/ref/var-forward-problem.log | 4 + src/test/ref/var-forward-problem2.cfg | 2 + src/test/ref/var-forward-problem2.log | 4 + src/test/ref/var-init-problem.cfg | 2 + src/test/ref/var-init-problem.log | 4 + src/test/ref/var-register-noarg.cfg | 2 + src/test/ref/var-register-noarg.log | 4 + src/test/ref/var-register-zp-3.cfg | 6 + src/test/ref/var-register-zp-3.log | 12 + src/test/ref/var-register-zp.cfg | 2 + src/test/ref/var-register-zp.log | 4 + src/test/ref/var-register.cfg | 4 + src/test/ref/var-register.log | 8 + src/test/ref/void-parameter.cfg | 4 + src/test/ref/void-parameter.log | 8 + src/test/ref/voronoi.cfg | 10 + src/test/ref/voronoi.log | 20 + src/test/ref/wfragment1.cfg | 4 + src/test/ref/wfragment1.log | 8 + src/test/ref/word-array-0.cfg | 2 + src/test/ref/word-array-0.log | 4 + src/test/ref/word-array-1.cfg | 2 + src/test/ref/word-array-1.log | 4 + src/test/ref/word-array-2.cfg | 2 + src/test/ref/word-array-2.log | 4 + src/test/ref/word-pointer-compound.cfg | 2 + src/test/ref/word-pointer-compound.log | 4 + src/test/ref/word-pointer-iteration-0.cfg | 2 + src/test/ref/word-pointer-iteration-0.log | 4 + src/test/ref/word-pointer-iteration.cfg | 2 + src/test/ref/word-pointer-iteration.log | 4 + src/test/ref/word-pointer-math-0.cfg | 2 + src/test/ref/word-pointer-math-0.log | 4 + src/test/ref/word-pointer-math-1.cfg | 2 + src/test/ref/word-pointer-math-1.log | 4 + src/test/ref/word-pointer-math.cfg | 2 + src/test/ref/word-pointer-math.log | 4 + src/test/ref/wordexpr.cfg | 2 + src/test/ref/wordexpr.log | 4 + src/test/ref/zeropage-detect-advanced.cfg | 2 + src/test/ref/zeropage-detect-advanced.log | 4 + src/test/ref/zeropage-sinus.cfg | 10 + src/test/ref/zeropage-sinus.log | 20 + src/test/ref/zpparammin.cfg | 6 + src/test/ref/zpparammin.log | 12 + src/test/ref/zpptr.cfg | 2 + src/test/ref/zpptr.log | 4 + 1085 files changed, 10020 insertions(+), 3 deletions(-) diff --git a/src/main/java/dk/camelot64/kickc/model/ControlFlowBlock.java b/src/main/java/dk/camelot64/kickc/model/ControlFlowBlock.java index 05ee9359d..30d8e4718 100644 --- a/src/main/java/dk/camelot64/kickc/model/ControlFlowBlock.java +++ b/src/main/java/dk/camelot64/kickc/model/ControlFlowBlock.java @@ -163,14 +163,11 @@ public class ControlFlowBlock implements Serializable { ControlFlowGraph graph = program.getGraph(); StringBuffer out = new StringBuffer(); - // TODO: Print signature for procedures (requires updating all tests data) - /* if(isProcedureEntry(program)) { Procedure procedure = (Procedure) program.getScope().getScope(scope); out.append("\n"); out.append(procedure.toString(program)+"\n"); } - */ out.append(label.getFullName() + ":"); out.append(" scope:[" + this.scope.getFullName() + "] "); diff --git a/src/test/ref/address-of-0.cfg b/src/test/ref/address-of-0.cfg index 633ce0594..56f1e90b6 100644 --- a/src/test/ref/address-of-0.cfg +++ b/src/test/ref/address-of-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::b#0 ← (byte) 0 to:main::@1 diff --git a/src/test/ref/address-of-0.log b/src/test/ref/address-of-0.log index 67bc5ccd3..d6ab9ab9d 100644 --- a/src/test/ref/address-of-0.log +++ b/src/test/ref/address-of-0.log @@ -5,6 +5,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::b#0 ← (byte) 0 @@ -109,6 +111,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::b#0 ← (byte) 0 to:main::@1 diff --git a/src/test/ref/address-of-1.cfg b/src/test/ref/address-of-1.cfg index fb197b524..31a9ec483 100644 --- a/src/test/ref/address-of-1.cfg +++ b/src/test/ref/address-of-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::b1#0 ← (byte) 0 [5] (byte) main::b2#0 ← (byte) 0 @@ -29,6 +31,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [15] return to:@return + +(void()) setByte((byte*) setByte::ptr , (byte) setByte::b) setByte: scope:[setByte] from main main::@1 main::@2 [16] (byte*) setByte::ptr#3 ← phi( main/&(byte) main::b1#0 main::@1/&(byte) main::b2#0 main::@2/&(byte) main::b3#0 ) [16] (byte) setByte::b#3 ← phi( main/(byte) 'c' main::@1/(byte) 'm' main::@2/(byte) 'l' ) diff --git a/src/test/ref/address-of-1.log b/src/test/ref/address-of-1.log index 0b25f1314..1e2a6723d 100644 --- a/src/test/ref/address-of-1.log +++ b/src/test/ref/address-of-1.log @@ -7,6 +7,8 @@ Culled Empty Block (label) @1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @2 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::b1#0 ← (number) 0 @@ -46,6 +48,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 return to:@return + +(void()) setByte((byte*) setByte::ptr , (byte) setByte::b) setByte: scope:[setByte] from main main::@1 main::@2 (byte*) setByte::ptr#3 ← phi( main/(byte*) setByte::ptr#0 main::@1/(byte*) setByte::ptr#1 main::@2/(byte*) setByte::ptr#2 ) (byte) setByte::b#3 ← phi( main/(byte) setByte::b#0 main::@1/(byte) setByte::b#1 main::@2/(byte) setByte::b#2 ) @@ -198,6 +202,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::b1#0 ← (byte) 0 [5] (byte) main::b2#0 ← (byte) 0 @@ -220,6 +226,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [15] return to:@return + +(void()) setByte((byte*) setByte::ptr , (byte) setByte::b) setByte: scope:[setByte] from main main::@1 main::@2 [16] (byte*) setByte::ptr#3 ← phi( main/&(byte) main::b1#0 main::@1/&(byte) main::b2#0 main::@2/&(byte) main::b3#0 ) [16] (byte) setByte::b#3 ← phi( main/(byte) 'c' main::@1/(byte) 'm' main::@2/(byte) 'l' ) diff --git a/src/test/ref/address-of-2.cfg b/src/test/ref/address-of-2.cfg index 6756e1d01..2f03161b4 100644 --- a/src/test/ref/address-of-2.cfg +++ b/src/test/ref/address-of-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN1#0) ← (byte) val#0 [5] *((const byte*) main::SCREEN2#0) ← (byte) '.' @@ -33,12 +35,16 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [21] return to:@return + +(void()) setp((byte*) setp::p , (byte) setp::v) setp: scope:[setp] from main::@1 [22] *((const byte*) main::ptr#0) ← (const byte) setp::v#0 to:setp::@return setp::@return: scope:[setp] from setp [23] return to:@return + +(void()) setv((byte) setv::v) setv: scope:[setv] from main [24] (byte) val#12 ← (const byte) setv::v#0 to:setv::@return diff --git a/src/test/ref/address-of-2.log b/src/test/ref/address-of-2.log index 9a765c1e1..f34aa8fdc 100644 --- a/src/test/ref/address-of-2.log +++ b/src/test/ref/address-of-2.log @@ -6,6 +6,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte) val#0 ← (number) 0 to:@3 + +(void()) main() main: scope:[main] from @3 (byte) val#8 ← phi( @3/(byte) val#14 ) (byte*) main::SCREEN1#0 ← ((byte*)) (number) $400 @@ -57,6 +59,8 @@ main::@return: scope:[main] from main::@2 (byte) val#4 ← (byte) val#11 return to:@return + +(void()) setv((byte) setv::v) setv: scope:[setv] from main (byte) setv::v#1 ← phi( main/(byte) setv::v#0 ) (byte) val#5 ← (byte) setv::v#1 @@ -66,6 +70,8 @@ setv::@return: scope:[setv] from setv (byte) val#6 ← (byte) val#12 return to:@return + +(void()) setp((byte*) setp::p , (byte) setp::v) setp: scope:[setp] from main::@1 (byte*) setp::p#1 ← phi( main::@1/(byte*) setp::p#0 ) (byte) setp::v#1 ← phi( main::@1/(byte) setp::v#0 ) @@ -298,6 +304,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN1#0) ← (byte) val#0 [5] *((const byte*) main::SCREEN2#0) ← (byte) '.' @@ -324,12 +332,16 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [21] return to:@return + +(void()) setp((byte*) setp::p , (byte) setp::v) setp: scope:[setp] from main::@1 [22] *((const byte*) main::ptr#0) ← (const byte) setp::v#0 to:setp::@return setp::@return: scope:[setp] from setp [23] return to:@return + +(void()) setv((byte) setv::v) setv: scope:[setv] from main [24] (byte) val#12 ← (const byte) setv::v#0 to:setv::@return diff --git a/src/test/ref/address-of-3.cfg b/src/test/ref/address-of-3.cfg index 5dbf959ca..2b5d86038 100644 --- a/src/test/ref/address-of-3.cfg +++ b/src/test/ref/address-of-3.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print @@ -28,6 +30,8 @@ main::@3: scope:[main] from main::@1 main::@return: scope:[main] from main::@3 [14] return to:@return + +(void()) print((signed word*) print::p) print: scope:[print] from main main::@1 main::@2 [15] (signed word*) print::p#3 ← phi( main/(const signed word[]) VALS#0 main::@1/(signed word*) print::p#2 main::@2/(const signed word[]) VALS#0+(byte) 1*(const byte) SIZEOF_SIGNED_WORD ) [15] (byte) idx#12 ← phi( main/(byte) 0 main::@1/(byte) idx#13 main::@2/(byte) idx#13 ) diff --git a/src/test/ref/address-of-3.log b/src/test/ref/address-of-3.log index d87089db4..56bd8943d 100644 --- a/src/test/ref/address-of-3.log +++ b/src/test/ref/address-of-3.log @@ -7,6 +7,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (signed word[]) VALS#0 ← { (number) 1, (number) 2, (number) 3, (number) 4 } to:@1 + +(void()) main() main: scope:[main] from @2 (byte) idx#15 ← phi( @2/(byte) idx#17 ) (signed word*) print::p#0 ← (signed word[]) VALS#0 @@ -50,6 +52,8 @@ main::@return: scope:[main] from main::@5 (signed word*) SCREEN#0 ← ((signed word*)) (number) $400 (byte) idx#4 ← (number) 0 to:@2 + +(void()) print((signed word*) print::p) print: scope:[print] from main main::@1 main::@3 (signed word*) print::p#3 ← phi( main/(signed word*) print::p#0 main::@1/(signed word*) print::p#2 main::@3/(signed word*) print::p#1 ) (byte) idx#12 ← phi( main/(byte) idx#15 main::@1/(byte) idx#16 main::@3/(byte) idx#0 ) @@ -249,6 +253,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print @@ -270,6 +276,8 @@ main::@3: scope:[main] from main::@1 main::@return: scope:[main] from main::@3 [14] return to:@return + +(void()) print((signed word*) print::p) print: scope:[print] from main main::@1 main::@2 [15] (signed word*) print::p#3 ← phi( main/(const signed word[]) VALS#0 main::@1/(signed word*) print::p#2 main::@2/(const signed word[]) VALS#0+(byte) 1*(const byte) SIZEOF_SIGNED_WORD ) [15] (byte) idx#12 ← phi( main/(byte) 0 main::@1/(byte) idx#13 main::@2/(byte) idx#13 ) diff --git a/src/test/ref/array-16bit-lookup.cfg b/src/test/ref/array-16bit-lookup.cfg index fda65490e..19c4b71de 100644 --- a/src/test/ref/array-16bit-lookup.cfg +++ b/src/test/ref/array-16bit-lookup.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -26,6 +28,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [14] return to:@return + +(word()) getValue((word) getValue::index) getValue: scope:[getValue] from main::@1 [15] (byte~) getValue::$0 ← (word) getValue::index#0 & (byte) $7f [16] (byte~) getValue::$4 ← (byte~) getValue::$0 << (byte) 1 diff --git a/src/test/ref/array-16bit-lookup.log b/src/test/ref/array-16bit-lookup.log index 8be53a2e3..c7184700d 100644 --- a/src/test/ref/array-16bit-lookup.log +++ b/src/test/ref/array-16bit-lookup.log @@ -7,6 +7,8 @@ Culled Empty Block (label) getValue::@1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @2 (word*) main::SCREEN#0 ← ((word*)) (number) $400 (byte) main::idx#0 ← (byte) 0 @@ -33,6 +35,8 @@ main::@return: scope:[main] from main::@3 @1: scope:[] from @begin (word[$80]) arr16#0 ← { fill( $80, 0) } to:@2 + +(word()) getValue((word) getValue::index) getValue: scope:[getValue] from main::@1 (word) getValue::index#1 ← phi( main::@1/(word) getValue::index#0 ) (number~) getValue::$0 ← (word) getValue::index#1 & (number) $7f @@ -182,6 +186,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -201,6 +207,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [14] return to:@return + +(word()) getValue((word) getValue::index) getValue: scope:[getValue] from main::@1 [15] (byte~) getValue::$0 ← (word) getValue::index#0 & (byte) $7f [16] (byte~) getValue::$4 ← (byte~) getValue::$0 << (byte) 1 diff --git a/src/test/ref/array-length-symbolic-min.cfg b/src/test/ref/array-length-symbolic-min.cfg index f72574004..310c6c19f 100644 --- a/src/test/ref/array-length-symbolic-min.cfg +++ b/src/test/ref/array-length-symbolic-min.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/array-length-symbolic-min.log b/src/test/ref/array-length-symbolic-min.log index a31d5f3ea..6edb48dda 100644 --- a/src/test/ref/array-length-symbolic-min.log +++ b/src/test/ref/array-length-symbolic-min.log @@ -6,6 +6,8 @@ CONTROL FLOW GRAPH SSA (byte) SZ#0 ← (number) $f (byte[SZ#0]) items#0 ← { fill( SZ#0, 0) } to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::cur_item#0 ← (byte[SZ#0]) items#0 (byte) main::sub#0 ← (byte) 0 @@ -113,6 +115,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/array-length-symbolic.cfg b/src/test/ref/array-length-symbolic.cfg index f1c03482a..fad6d23b2 100644 --- a/src/test/ref/array-length-symbolic.cfg +++ b/src/test/ref/array-length-symbolic.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/array-length-symbolic.log b/src/test/ref/array-length-symbolic.log index 5a55ab3b5..39eb31e00 100644 --- a/src/test/ref/array-length-symbolic.log +++ b/src/test/ref/array-length-symbolic.log @@ -9,6 +9,8 @@ CONTROL FLOW GRAPH SSA (byte~) $0 ← (byte) ITEM_COUNT#0 * (byte) ITEM_SIZE#0 (byte[$0]) items#0 ← { (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0 } to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::cur_item#0 ← (byte[$0]) items#0 (number~) main::$0 ← (byte) ITEM_COUNT#0 - (number) 1 @@ -224,6 +226,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/arrays-init-kasm-0.cfg b/src/test/ref/arrays-init-kasm-0.cfg index ff25739c2..2e6df9919 100644 --- a/src/test/ref/arrays-init-kasm-0.cfg +++ b/src/test/ref/arrays-init-kasm-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← *((const byte[$100]) SINTAB#0) to:main::@return diff --git a/src/test/ref/arrays-init-kasm-0.log b/src/test/ref/arrays-init-kasm-0.log index 8669258b5..47e48164e 100644 --- a/src/test/ref/arrays-init-kasm-0.log +++ b/src/test/ref/arrays-init-kasm-0.log @@ -6,6 +6,8 @@ CONTROL FLOW GRAPH SSA }} (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 *((byte*) SCREEN#0 + (number) 0) ← *((byte[$100]) SINTAB#0 + (number) 0) to:main::@return @@ -74,6 +76,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← *((const byte[$100]) SINTAB#0) to:main::@return diff --git a/src/test/ref/arrays-init-short.cfg b/src/test/ref/arrays-init-short.cfg index 7e96c0af1..2c9604435 100644 --- a/src/test/ref/arrays-init-short.cfg +++ b/src/test/ref/arrays-init-short.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/arrays-init-short.log b/src/test/ref/arrays-init-short.log index e12e9bbf1..c87e81da9 100644 --- a/src/test/ref/arrays-init-short.log +++ b/src/test/ref/arrays-init-short.log @@ -14,6 +14,8 @@ CONTROL FLOW GRAPH SSA (byte[$10]) msg2#0 ← { (byte) 'c', (byte) 'm', (byte) 'l' } (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (number) 0 to:main::@1 @@ -164,6 +166,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/arrays-init.cfg b/src/test/ref/arrays-init.cfg index c1db3669d..e68c36f7a 100644 --- a/src/test/ref/arrays-init.cfg +++ b/src/test/ref/arrays-init.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte[3]) b#0) ← (byte) 'c' [5] *((const byte*) SCREEN#0) ← *((const byte[3]) b#0) diff --git a/src/test/ref/arrays-init.log b/src/test/ref/arrays-init.log index cc7b2a0a9..62347e4ca 100644 --- a/src/test/ref/arrays-init.log +++ b/src/test/ref/arrays-init.log @@ -7,6 +7,8 @@ CONTROL FLOW GRAPH SSA (byte[]) d#0 ← (const string) $0 (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 *((byte[3]) b#0 + (number) 0) ← (byte) 'c' *((byte*) SCREEN#0) ← *((byte[3]) b#0 + (number) 0) @@ -117,6 +119,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte[3]) b#0) ← (byte) 'c' [5] *((const byte*) SCREEN#0) ← *((const byte[3]) b#0) diff --git a/src/test/ref/asm-culling-jmp.cfg b/src/test/ref/asm-culling-jmp.cfg index 4762e874b..927f68895 100644 --- a/src/test/ref/asm-culling-jmp.cfg +++ b/src/test/ref/asm-culling-jmp.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { jmpqwe .byte0,25,51,76,102,128,153,179,204,230 qwe: lda#50 } [5] *((byte*) 1024) ← (byte) 'c' diff --git a/src/test/ref/asm-culling-jmp.log b/src/test/ref/asm-culling-jmp.log index 20d375507..cfb369f8b 100644 --- a/src/test/ref/asm-culling-jmp.log +++ b/src/test/ref/asm-culling-jmp.log @@ -2,6 +2,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 asm { jmpqwe .byte0,25,51,76,102,128,153,179,204,230 qwe: lda#50 } (byte*~) main::$0 ← ((byte*)) (number) $400 @@ -58,6 +60,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { jmpqwe .byte0,25,51,76,102,128,153,179,204,230 qwe: lda#50 } [5] *((byte*) 1024) ← (byte) 'c' diff --git a/src/test/ref/asm-mnemonic-names.cfg b/src/test/ref/asm-mnemonic-names.cfg index db89b010e..862493991 100644 --- a/src/test/ref/asm-mnemonic-names.cfg +++ b/src/test/ref/asm-mnemonic-names.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) lda#0) ← (const byte) main::jmp#0 [5] call bne @@ -17,6 +19,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [7] return to:@return + +(void()) bne((byte) bne::jsr) bne: scope:[bne] from main [8] *((const byte*) lda#0+(byte) 1) ← (const byte) main::jmp#0 to:bne::@return diff --git a/src/test/ref/asm-mnemonic-names.log b/src/test/ref/asm-mnemonic-names.log index 4f3f1a13c..510dbfe48 100644 --- a/src/test/ref/asm-mnemonic-names.log +++ b/src/test/ref/asm-mnemonic-names.log @@ -5,6 +5,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) lda#0 ← ((byte*)) (number) $400 to:@2 + +(void()) main() main: scope:[main] from @2 (byte) main::jmp#0 ← (number) 1 *((byte*) lda#0) ← (byte) main::jmp#0 @@ -17,6 +19,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 return to:@return + +(void()) bne((byte) bne::jsr) bne: scope:[bne] from main (byte) bne::jsr#1 ← phi( main/(byte) bne::jsr#0 ) *((byte*) lda#0 + (number) 1) ← (byte) bne::jsr#1 @@ -99,6 +103,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) lda#0) ← (const byte) main::jmp#0 [5] call bne @@ -109,6 +115,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [7] return to:@return + +(void()) bne((byte) bne::jsr) bne: scope:[bne] from main [8] *((const byte*) lda#0+(byte) 1) ← (const byte) main::jmp#0 to:bne::@return diff --git a/src/test/ref/asm-uses-0.cfg b/src/test/ref/asm-uses-0.cfg index da4979c60..b3d59d3e6 100644 --- a/src/test/ref/asm-uses-0.cfg +++ b/src/test/ref/asm-uses-0.cfg @@ -7,12 +7,16 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { jsrinit } to:main::@return main::@return: scope:[main] from main [5] return to:@return + +(void()) init() init: scope:[init] from [6] *((const byte*) BGCOL#0) ← (byte) 0 to:init::@return diff --git a/src/test/ref/asm-uses-0.log b/src/test/ref/asm-uses-0.log index 948b12332..512acbad9 100644 --- a/src/test/ref/asm-uses-0.log +++ b/src/test/ref/asm-uses-0.log @@ -3,6 +3,8 @@ Resolved forward reference init to (void()) init() CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @2 asm { jsrinit } to:main::@return @@ -12,6 +14,8 @@ main::@return: scope:[main] from main @1: scope:[] from @begin (byte*) BGCOL#0 ← ((byte*)) (number) $d020 to:@2 + +(void()) init() init: scope:[init] from *((byte*) BGCOL#0) ← (number) 0 to:init::@return @@ -77,12 +81,16 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { jsrinit } to:main::@return main::@return: scope:[main] from main [5] return to:@return + +(void()) init() init: scope:[init] from [6] *((const byte*) BGCOL#0) ← (byte) 0 to:init::@return diff --git a/src/test/ref/assignment-chained.cfg b/src/test/ref/assignment-chained.cfg index 461282a0e..0af5b9ce1 100644 --- a/src/test/ref/assignment-chained.cfg +++ b/src/test/ref/assignment-chained.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::screen#0) ← (byte) 'c' [5] *((const byte*) main::screen#0+(byte) $28) ← (byte) 'c' diff --git a/src/test/ref/assignment-chained.log b/src/test/ref/assignment-chained.log index d6e66862e..e3f9ab90a 100644 --- a/src/test/ref/assignment-chained.log +++ b/src/test/ref/assignment-chained.log @@ -3,6 +3,8 @@ Identified constant variable (byte*) main::screen CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte) main::a#0 ← (byte) 0 @@ -122,6 +124,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::screen#0) ← (byte) 'c' [5] *((const byte*) main::screen#0+(byte) $28) ← (byte) 'c' diff --git a/src/test/ref/assignment-compound.cfg b/src/test/ref/assignment-compound.cfg index f42af0ac5..57ca78e0a 100644 --- a/src/test/ref/assignment-compound.cfg +++ b/src/test/ref/assignment-compound.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call test @@ -54,6 +56,8 @@ main::@10: scope:[main] from main::@9 main::@return: scope:[main] from main::@10 [26] return to:@return + +(void()) test((byte) test::i , (byte) test::a) test: scope:[test] from main main::@1 main::@10 main::@2 main::@3 main::@4 main::@5 main::@6 main::@7 main::@8 main::@9 [27] (byte) test::i#11 ← phi( main/(byte) 0 main::@1/(byte) 1 main::@10/(byte) $a main::@2/(byte) 2 main::@3/(byte) 3 main::@4/(byte) 4 main::@5/(byte) 5 main::@6/(byte) 6 main::@7/(byte) 7 main::@8/(byte) 8 main::@9/(byte) 9 ) [27] (byte) test::a#11 ← phi( main/(byte) 3 main::@1/(byte) 3+(byte) 1 main::@10/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6|(byte) 1&(byte) 1 main::@2/(byte) 3+(byte) 1-(byte) 1 main::@3/(byte) 3+(byte) 1-(byte) 1*(byte) 6 main::@4/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2 main::@5/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2 main::@6/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2 main::@7/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1 main::@8/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6 main::@9/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6|(byte) 1 ) diff --git a/src/test/ref/assignment-compound.log b/src/test/ref/assignment-compound.log index 7232d696a..5faa3d45a 100644 --- a/src/test/ref/assignment-compound.log +++ b/src/test/ref/assignment-compound.log @@ -16,6 +16,8 @@ CONTROL FLOW GRAPH SSA (byte) GREEN#0 ← (number) 5 (byte) RED#0 ← (number) 2 to:@2 + +(void()) main() main: scope:[main] from @2 (byte*) screen2#2 ← phi( @2/(byte*) screen2#13 ) (byte) main::i#0 ← (number) 0 @@ -131,6 +133,8 @@ main::@11: scope:[main] from main::@10 main::@return: scope:[main] from main::@11 return to:@return + +(void()) test((byte) test::i , (byte) test::a) test: scope:[test] from main main::@1 main::@10 main::@2 main::@3 main::@4 main::@5 main::@6 main::@7 main::@8 main::@9 (byte*) screen2#1 ← phi( main/(byte*) screen2#2 main::@1/(byte*) screen2#3 main::@10/(byte*) screen2#4 main::@2/(byte*) screen2#5 main::@3/(byte*) screen2#6 main::@4/(byte*) screen2#7 main::@5/(byte*) screen2#8 main::@6/(byte*) screen2#9 main::@7/(byte*) screen2#10 main::@8/(byte*) screen2#11 main::@9/(byte*) screen2#12 ) (byte) test::i#11 ← phi( main/(byte) test::i#0 main::@1/(byte) test::i#1 main::@10/(byte) test::i#10 main::@2/(byte) test::i#2 main::@3/(byte) test::i#3 main::@4/(byte) test::i#4 main::@5/(byte) test::i#5 main::@6/(byte) test::i#6 main::@7/(byte) test::i#7 main::@8/(byte) test::i#8 main::@9/(byte) test::i#9 ) @@ -653,6 +657,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call test @@ -700,6 +706,8 @@ main::@10: scope:[main] from main::@9 main::@return: scope:[main] from main::@10 [26] return to:@return + +(void()) test((byte) test::i , (byte) test::a) test: scope:[test] from main main::@1 main::@10 main::@2 main::@3 main::@4 main::@5 main::@6 main::@7 main::@8 main::@9 [27] (byte) test::i#11 ← phi( main/(byte) 0 main::@1/(byte) 1 main::@10/(byte) $a main::@2/(byte) 2 main::@3/(byte) 3 main::@4/(byte) 4 main::@5/(byte) 5 main::@6/(byte) 6 main::@7/(byte) 7 main::@8/(byte) 8 main::@9/(byte) 9 ) [27] (byte) test::a#11 ← phi( main/(byte) 3 main::@1/(byte) 3+(byte) 1 main::@10/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6|(byte) 1&(byte) 1 main::@2/(byte) 3+(byte) 1-(byte) 1 main::@3/(byte) 3+(byte) 1-(byte) 1*(byte) 6 main::@4/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2 main::@5/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2 main::@6/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2 main::@7/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1 main::@8/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6 main::@9/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6|(byte) 1 ) diff --git a/src/test/ref/bgblack.cfg b/src/test/ref/bgblack.cfg index 0397c4415..36b1e05ac 100644 --- a/src/test/ref/bgblack.cfg +++ b/src/test/ref/bgblack.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 to:main::@return diff --git a/src/test/ref/bgblack.log b/src/test/ref/bgblack.log index 6958e3a8b..7ecb38ddb 100644 --- a/src/test/ref/bgblack.log +++ b/src/test/ref/bgblack.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA (byte*) BGCOL#0 ← ((byte*)) (number) $d021 (byte) BLACK#0 ← (number) 0 to:@1 + +(void()) main() main: scope:[main] from @1 *((byte*) BGCOL#0) ← (byte) BLACK#0 to:main::@return @@ -66,6 +68,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 to:main::@return diff --git a/src/test/ref/bitmap-circle-2.cfg b/src/test/ref/bitmap-circle-2.cfg index 95dc37bea..36efd223c 100644 --- a/src/test/ref/bitmap-circle-2.cfg +++ b/src/test/ref/bitmap-circle-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call fill @@ -34,6 +36,8 @@ main::@2: scope:[main] from main::@1 main::@6: scope:[main] from main::@2 [16] (signed word) main::i#1 ← (signed word) main::i#2 + (signed byte) 5 to:main::@1 + +(void()) circle((signed word) circle::xc , (signed word) circle::yc , (signed word) circle::r) circle: scope:[circle] from main::@2 [17] (signed word~) circle::$0 ← (signed word) circle::r#0 << (signed byte) 1 [18] (signed word) circle::p#0 ← (signed byte) 3 - (signed word~) circle::$0 @@ -107,6 +111,8 @@ circle::@3: scope:[circle] from circle::@2 [55] (signed word~) circle::$10 ← (signed word) circle::p#3 + (signed word~) circle::$9 [56] (signed word) circle::p#1 ← (signed word~) circle::$10 + (signed byte) 6 to:circle::@4 + +(void()) plot((signed word) plot::x , (signed word) plot::y) plot: scope:[plot] from circle::@10 circle::@11 circle::@12 circle::@4 circle::@6 circle::@7 circle::@8 circle::@9 [57] (signed word) plot::y#8 ← phi( circle::@6/(signed word) plot::y#1 circle::@7/(signed word) plot::y#2 circle::@8/(signed word) plot::y#3 circle::@9/(signed word) plot::y#4 circle::@10/(signed word) plot::y#5 circle::@11/(signed word) plot::y#6 circle::@12/(signed word) plot::y#7 circle::@4/(signed word) plot::y#0 ) [57] (signed word) plot::x#8 ← phi( circle::@6/(signed word) plot::x#1 circle::@7/(signed word) plot::x#2 circle::@8/(signed word) plot::x#3 circle::@9/(signed word) plot::x#4 circle::@10/(signed word) plot::x#5 circle::@11/(signed word) plot::x#6 circle::@12/(signed word) plot::x#7 circle::@4/(signed word) plot::x#0 ) @@ -139,6 +145,8 @@ plot::@1: scope:[plot] from plot::@2 plot::@return: scope:[plot] from plot plot::@1 plot::@2 plot::@3 plot::@4 [75] return to:@return + +(void()) fill((byte*) fill::start , (signed word) fill::size , (byte) fill::val) fill: scope:[fill] from main main::@4 [76] (byte) fill::val#4 ← phi( main/(byte) 0 main::@4/(byte) $16 ) [76] (signed word) fill::size#2 ← phi( main/(signed word)(number) $28*(number) $19*(number) 8 main::@4/(signed word)(number) $28*(number) $19 ) diff --git a/src/test/ref/bitmap-circle-2.log b/src/test/ref/bitmap-circle-2.log index ab1cd28d8..6d3f916d8 100644 --- a/src/test/ref/bitmap-circle-2.log +++ b/src/test/ref/bitmap-circle-2.log @@ -38,6 +38,8 @@ CONTROL FLOW GRAPH SSA (byte*) BITMAP#0 ← ((byte*)) (number) $2000 (byte[]) bitmask#0 ← { (number) $80, (number) $40, (number) $20, (number) $10, (number) 8, (number) 4, (number) 2, (number) 1 } to:@8 + +(void()) main() main: scope:[main] from @8 (byte*) fill::start#0 ← (byte*) BITMAP#0 (signed word) fill::size#0 ← (number) $28*(number) $19*(number) 8 @@ -89,6 +91,8 @@ main::@7: scope:[main] from main::@1 main::@7 main::@return: scope:[main] from main::@7 return to:@return + +(void()) circle((signed word) circle::xc , (signed word) circle::yc , (signed word) circle::r) circle: scope:[circle] from main::@2 (signed word) circle::yc#13 ← phi( main::@2/(signed word) circle::yc#0 ) (signed word) circle::xc#13 ← phi( main::@2/(signed word) circle::xc#0 ) @@ -249,6 +253,8 @@ circle::@18: scope:[circle] from circle::@17 circle::@return: scope:[circle] from circle::@1 return to:@return + +(void()) plot((signed word) plot::x , (signed word) plot::y) plot: scope:[plot] from circle::@11 circle::@12 circle::@13 circle::@14 circle::@15 circle::@16 circle::@17 circle::@5 (signed word) plot::y#8 ← phi( circle::@11/(signed word) plot::y#1 circle::@12/(signed word) plot::y#2 circle::@13/(signed word) plot::y#3 circle::@14/(signed word) plot::y#4 circle::@15/(signed word) plot::y#5 circle::@16/(signed word) plot::y#6 circle::@17/(signed word) plot::y#7 circle::@5/(signed word) plot::y#0 ) (signed word) plot::x#8 ← phi( circle::@11/(signed word) plot::x#1 circle::@12/(signed word) plot::x#2 circle::@13/(signed word) plot::x#3 circle::@14/(signed word) plot::x#4 circle::@15/(signed word) plot::x#5 circle::@16/(signed word) plot::x#6 circle::@17/(signed word) plot::x#7 circle::@5/(signed word) plot::x#0 ) @@ -281,6 +287,8 @@ plot::@1: scope:[plot] from plot plot::@return: scope:[plot] from plot plot::@1 return to:@return + +(void()) fill((byte*) fill::start , (signed word) fill::size , (byte) fill::val) fill: scope:[fill] from main main::@9 (byte) fill::val#4 ← phi( main/(byte) fill::val#0 main::@9/(byte) fill::val#1 ) (signed word) fill::size#2 ← phi( main/(signed word) fill::size#0 main::@9/(signed word) fill::size#1 ) @@ -991,6 +999,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call fill @@ -1018,6 +1028,8 @@ main::@2: scope:[main] from main::@1 main::@6: scope:[main] from main::@2 [16] (signed word) main::i#1 ← (signed word) main::i#2 + (signed byte) 5 to:main::@1 + +(void()) circle((signed word) circle::xc , (signed word) circle::yc , (signed word) circle::r) circle: scope:[circle] from main::@2 [17] (signed word~) circle::$0 ← (signed word) circle::r#0 << (signed byte) 1 [18] (signed word) circle::p#0 ← (signed byte) 3 - (signed word~) circle::$0 @@ -1091,6 +1103,8 @@ circle::@3: scope:[circle] from circle::@2 [55] (signed word~) circle::$10 ← (signed word) circle::p#3 + (signed word~) circle::$9 [56] (signed word) circle::p#1 ← (signed word~) circle::$10 + (signed byte) 6 to:circle::@4 + +(void()) plot((signed word) plot::x , (signed word) plot::y) plot: scope:[plot] from circle::@10 circle::@11 circle::@12 circle::@4 circle::@6 circle::@7 circle::@8 circle::@9 [57] (signed word) plot::y#8 ← phi( circle::@6/(signed word) plot::y#1 circle::@7/(signed word) plot::y#2 circle::@8/(signed word) plot::y#3 circle::@9/(signed word) plot::y#4 circle::@10/(signed word) plot::y#5 circle::@11/(signed word) plot::y#6 circle::@12/(signed word) plot::y#7 circle::@4/(signed word) plot::y#0 ) [57] (signed word) plot::x#8 ← phi( circle::@6/(signed word) plot::x#1 circle::@7/(signed word) plot::x#2 circle::@8/(signed word) plot::x#3 circle::@9/(signed word) plot::x#4 circle::@10/(signed word) plot::x#5 circle::@11/(signed word) plot::x#6 circle::@12/(signed word) plot::x#7 circle::@4/(signed word) plot::x#0 ) @@ -1123,6 +1137,8 @@ plot::@1: scope:[plot] from plot::@2 plot::@return: scope:[plot] from plot plot::@1 plot::@2 plot::@3 plot::@4 [75] return to:@return + +(void()) fill((byte*) fill::start , (signed word) fill::size , (byte) fill::val) fill: scope:[fill] from main main::@4 [76] (byte) fill::val#4 ← phi( main/(byte) 0 main::@4/(byte) $16 ) [76] (signed word) fill::size#2 ← phi( main/(signed word)(number) $28*(number) $19*(number) 8 main::@4/(signed word)(number) $28*(number) $19 ) diff --git a/src/test/ref/bitmap-circle.cfg b/src/test/ref/bitmap-circle.cfg index c60327201..6e47c9211 100644 --- a/src/test/ref/bitmap-circle.cfg +++ b/src/test/ref/bitmap-circle.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call fill @@ -24,6 +26,8 @@ main::@3: scope:[main] from main::@2 main::@1: scope:[main] from main::@1 main::@3 [12] phi() to:main::@1 + +(void()) circle((signed word) circle::xc , (signed word) circle::yc , (signed word) circle::r) circle: scope:[circle] from main::@3 [13] phi() to:circle::@1 @@ -96,6 +100,8 @@ circle::@3: scope:[circle] from circle::@2 [50] (signed word~) circle::$10 ← (signed word) circle::p#3 + (signed word~) circle::$9 [51] (signed word) circle::p#1 ← (signed word~) circle::$10 + (signed byte) 6 to:circle::@4 + +(void()) plot((signed word) plot::x , (signed word) plot::y) plot: scope:[plot] from circle::@10 circle::@11 circle::@12 circle::@4 circle::@6 circle::@7 circle::@8 circle::@9 [52] (signed word) plot::y#8 ← phi( circle::@6/(signed word) plot::y#1 circle::@7/(signed word) plot::y#2 circle::@8/(signed word) plot::y#3 circle::@9/(signed word) plot::y#4 circle::@10/(signed word) plot::y#5 circle::@11/(signed word) plot::y#6 circle::@12/(signed word) plot::y#7 circle::@4/(signed word) plot::y#0 ) [52] (signed word) plot::x#8 ← phi( circle::@6/(signed word) plot::x#1 circle::@7/(signed word) plot::x#2 circle::@8/(signed word) plot::x#3 circle::@9/(signed word) plot::x#4 circle::@10/(signed word) plot::x#5 circle::@11/(signed word) plot::x#6 circle::@12/(signed word) plot::x#7 circle::@4/(signed word) plot::x#0 ) @@ -116,6 +122,8 @@ plot: scope:[plot] from circle::@10 circle::@11 circle::@12 circle::@4 circle:: plot::@return: scope:[plot] from plot [66] return to:@return + +(void()) fill((byte*) fill::start , (signed word) fill::size , (byte) fill::val) fill: scope:[fill] from main main::@2 [67] (byte) fill::val#4 ← phi( main/(byte) 0 main::@2/(byte) $16 ) [67] (signed word) fill::size#2 ← phi( main/(signed word)(number) $28*(number) $19*(number) 8 main::@2/(signed word)(number) $28*(number) $19 ) diff --git a/src/test/ref/bitmap-circle.log b/src/test/ref/bitmap-circle.log index 90c6a11e4..f61af7b4f 100644 --- a/src/test/ref/bitmap-circle.log +++ b/src/test/ref/bitmap-circle.log @@ -32,6 +32,8 @@ CONTROL FLOW GRAPH SSA (byte*) BITMAP#0 ← ((byte*)) (number) $2000 (byte[]) bitmask#0 ← { (number) $80, (number) $40, (number) $20, (number) $10, (number) 8, (number) 4, (number) 2, (number) 1 } to:@8 + +(void()) main() main: scope:[main] from @8 (byte*) fill::start#0 ← (byte*) BITMAP#0 (signed word) fill::size#0 ← (number) $28*(number) $19*(number) 8 @@ -72,6 +74,8 @@ main::@1: scope:[main] from main::@1 main::@5 main::@return: scope:[main] from main::@1 return to:@return + +(void()) circle((signed word) circle::xc , (signed word) circle::yc , (signed word) circle::r) circle: scope:[circle] from main::@4 (signed word) circle::yc#13 ← phi( main::@4/(signed word) circle::yc#0 ) (signed word) circle::xc#13 ← phi( main::@4/(signed word) circle::xc#0 ) @@ -232,6 +236,8 @@ circle::@18: scope:[circle] from circle::@17 circle::@return: scope:[circle] from circle::@1 return to:@return + +(void()) plot((signed word) plot::x , (signed word) plot::y) plot: scope:[plot] from circle::@11 circle::@12 circle::@13 circle::@14 circle::@15 circle::@16 circle::@17 circle::@5 (signed word) plot::y#8 ← phi( circle::@11/(signed word) plot::y#1 circle::@12/(signed word) plot::y#2 circle::@13/(signed word) plot::y#3 circle::@14/(signed word) plot::y#4 circle::@15/(signed word) plot::y#5 circle::@16/(signed word) plot::y#6 circle::@17/(signed word) plot::y#7 circle::@5/(signed word) plot::y#0 ) (signed word) plot::x#8 ← phi( circle::@11/(signed word) plot::x#1 circle::@12/(signed word) plot::x#2 circle::@13/(signed word) plot::x#3 circle::@14/(signed word) plot::x#4 circle::@15/(signed word) plot::x#5 circle::@16/(signed word) plot::x#6 circle::@17/(signed word) plot::x#7 circle::@5/(signed word) plot::x#0 ) @@ -251,6 +257,8 @@ plot: scope:[plot] from circle::@11 circle::@12 circle::@13 circle::@14 circle: plot::@return: scope:[plot] from plot return to:@return + +(void()) fill((byte*) fill::start , (signed word) fill::size , (byte) fill::val) fill: scope:[fill] from main main::@3 (byte) fill::val#4 ← phi( main/(byte) fill::val#0 main::@3/(byte) fill::val#1 ) (signed word) fill::size#2 ← phi( main/(signed word) fill::size#0 main::@3/(signed word) fill::size#1 ) @@ -901,6 +909,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call fill @@ -918,6 +928,8 @@ main::@3: scope:[main] from main::@2 main::@1: scope:[main] from main::@1 main::@3 [12] phi() to:main::@1 + +(void()) circle((signed word) circle::xc , (signed word) circle::yc , (signed word) circle::r) circle: scope:[circle] from main::@3 [13] phi() to:circle::@1 @@ -990,6 +1002,8 @@ circle::@3: scope:[circle] from circle::@2 [50] (signed word~) circle::$10 ← (signed word) circle::p#3 + (signed word~) circle::$9 [51] (signed word) circle::p#1 ← (signed word~) circle::$10 + (signed byte) 6 to:circle::@4 + +(void()) plot((signed word) plot::x , (signed word) plot::y) plot: scope:[plot] from circle::@10 circle::@11 circle::@12 circle::@4 circle::@6 circle::@7 circle::@8 circle::@9 [52] (signed word) plot::y#8 ← phi( circle::@6/(signed word) plot::y#1 circle::@7/(signed word) plot::y#2 circle::@8/(signed word) plot::y#3 circle::@9/(signed word) plot::y#4 circle::@10/(signed word) plot::y#5 circle::@11/(signed word) plot::y#6 circle::@12/(signed word) plot::y#7 circle::@4/(signed word) plot::y#0 ) [52] (signed word) plot::x#8 ← phi( circle::@6/(signed word) plot::x#1 circle::@7/(signed word) plot::x#2 circle::@8/(signed word) plot::x#3 circle::@9/(signed word) plot::x#4 circle::@10/(signed word) plot::x#5 circle::@11/(signed word) plot::x#6 circle::@12/(signed word) plot::x#7 circle::@4/(signed word) plot::x#0 ) @@ -1010,6 +1024,8 @@ plot: scope:[plot] from circle::@10 circle::@11 circle::@12 circle::@4 circle:: plot::@return: scope:[plot] from plot [66] return to:@return + +(void()) fill((byte*) fill::start , (signed word) fill::size , (byte) fill::val) fill: scope:[fill] from main main::@2 [67] (byte) fill::val#4 ← phi( main/(byte) 0 main::@2/(byte) $16 ) [67] (signed word) fill::size#2 ← phi( main/(signed word)(number) $28*(number) $19*(number) 8 main::@2/(signed word)(number) $28*(number) $19 ) diff --git a/src/test/ref/bitmap-line-anim-1.cfg b/src/test/ref/bitmap-line-anim-1.cfg index c1ff0d8cc..7c5ccc5bf 100644 --- a/src/test/ref/bitmap-line-anim-1.cfg +++ b/src/test/ref/bitmap-line-anim-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BORDERCOL#0) ← (byte) 0 [5] *((const byte*) BGCOL#0) ← (byte) 0 @@ -30,6 +32,8 @@ main::@1: scope:[main] from main::@3 main::@4 main::@4: scope:[main] from main::@1 [16] (byte) next#1 ← ++ (byte) next#4 to:main::@1 + +(void()) bitmap_line((byte) bitmap_line::x0 , (byte) bitmap_line::x1 , (byte) bitmap_line::y0 , (byte) bitmap_line::y1) bitmap_line: scope:[bitmap_line] from main::@1 [17] if((const byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 to:bitmap_line::@2 @@ -66,6 +70,8 @@ bitmap_line::@7: scope:[bitmap_line] from bitmap_line::@6 [31] (byte) bitmap_line_xdyi::xd#1 ← (byte) bitmap_line::xd#1 [32] call bitmap_line_xdyi to:bitmap_line::@return + +(void()) bitmap_line_xdyi((byte) bitmap_line_xdyi::x , (byte) bitmap_line_xdyi::y , (byte) bitmap_line_xdyi::x1 , (byte) bitmap_line_xdyi::xd , (byte) bitmap_line_xdyi::yd) bitmap_line_xdyi: scope:[bitmap_line_xdyi] from bitmap_line::@7 [33] phi() to:bitmap_line_xdyi::@1 @@ -95,6 +101,8 @@ bitmap_line_xdyi::@2: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@3 bitmap bitmap_line_xdyi::@return: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@2 [46] return to:@return + +(void()) bitmap_plot((byte) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_line_ydxd::@1 bitmap_line_ydxi::@1 [47] (byte) bitmap_plot::y#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::y#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::y#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::y#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::y#2 ) [47] (byte) bitmap_plot::x#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::x#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::x#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::x#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::x#2 ) @@ -107,6 +115,8 @@ bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot [53] return to:@return + +(void()) bitmap_line_ydxi((byte) bitmap_line_ydxi::y , (byte) bitmap_line_ydxi::x , (byte) bitmap_line_ydxi::y1 , (byte) bitmap_line_ydxi::yd , (byte) bitmap_line_ydxi::xd) bitmap_line_ydxi: scope:[bitmap_line_ydxi] from bitmap_line::@8 [54] (byte) bitmap_line_ydxi::e#0 ← (byte) bitmap_line_ydxi::xd#1 >> (byte) 1 to:bitmap_line_ydxi::@1 @@ -135,6 +145,8 @@ bitmap_line_ydxi::@2: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@3 bitmap bitmap_line_ydxi::@return: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@2 [66] return to:@return + +(void()) bitmap_line_xdyd((byte) bitmap_line_xdyd::x , (byte) bitmap_line_xdyd::y , (byte) bitmap_line_xdyd::x1 , (byte) bitmap_line_xdyd::xd , (byte) bitmap_line_xdyd::yd) bitmap_line_xdyd: scope:[bitmap_line_xdyd] from bitmap_line::@4 [67] phi() to:bitmap_line_xdyd::@1 @@ -163,6 +175,8 @@ bitmap_line_xdyd::@2: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@3 bitmap bitmap_line_xdyd::@return: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@2 [79] return to:@return + +(void()) bitmap_line_ydxd((byte) bitmap_line_ydxd::y , (byte) bitmap_line_ydxd::x , (byte) bitmap_line_ydxd::y1 , (byte) bitmap_line_ydxd::yd , (byte) bitmap_line_ydxd::xd) bitmap_line_ydxd: scope:[bitmap_line_ydxd] from bitmap_line::@5 [80] (byte) bitmap_line_ydxd::e#0 ← (byte) bitmap_line_ydxd::xd#0 >> (byte) 1 to:bitmap_line_ydxd::@1 @@ -191,6 +205,8 @@ bitmap_line_ydxd::@2: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@3 bitmap bitmap_line_ydxd::@return: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@2 [92] return to:@return + +(void()) init_screen() init_screen: scope:[init_screen] from main::@3 [93] phi() to:init_screen::@1 @@ -205,6 +221,8 @@ init_screen::@2: scope:[init_screen] from init_screen::@1 [97] *((byte*) init_screen::c#2) ← (byte) $14 [98] (byte*) init_screen::c#1 ← ++ (byte*) init_screen::c#2 to:init_screen::@1 + +(void()) bitmap_clear() bitmap_clear: scope:[bitmap_clear] from main::@2 [99] (word) bitmap_clear::bitmap#0 ← *((const byte[$100]) bitmap_plot_xhi#0) w= *((const byte[$100]) bitmap_plot_xlo#0) [100] (byte*~) bitmap_clear::bitmap#5 ← (byte*)(word) bitmap_clear::bitmap#0 @@ -228,6 +246,8 @@ bitmap_clear::@3: scope:[bitmap_clear] from bitmap_clear::@2 bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@3 [109] return to:@return + +(void()) bitmap_init((byte*) bitmap_init::bitmap) bitmap_init: scope:[bitmap_init] from main [110] phi() to:bitmap_init::@1 diff --git a/src/test/ref/bitmap-line-anim-1.log b/src/test/ref/bitmap-line-anim-1.log index d207449db..466ae8632 100644 --- a/src/test/ref/bitmap-line-anim-1.log +++ b/src/test/ref/bitmap-line-anim-1.log @@ -53,6 +53,8 @@ CONTROL FLOW GRAPH SSA (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } to:@12 + +(void()) bitmap_init((byte*) bitmap_init::bitmap) bitmap_init: scope:[bitmap_init] from main (byte*) bitmap_init::bitmap#2 ← phi( main/(byte*) bitmap_init::bitmap#0 ) (byte) bitmap_init::bits#0 ← (number) $80 @@ -120,6 +122,8 @@ bitmap_init::@7: scope:[bitmap_init] from bitmap_init::@5 bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@6 return to:@return + +(void()) bitmap_clear() bitmap_clear: scope:[bitmap_clear] from main::@3 (byte*~) bitmap_clear::$0 ← ((byte*)) { *((byte[$100]) bitmap_plot_xhi#0 + (number) 0), *((byte[$100]) bitmap_plot_xlo#0 + (number) 0) } (byte*) bitmap_clear::bitmap#0 ← (byte*~) bitmap_clear::$0 @@ -150,6 +154,8 @@ bitmap_clear::@3: scope:[bitmap_clear] from bitmap_clear::@2 bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@3 return to:@return + +(void()) bitmap_plot((byte) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_line_ydxd::@1 bitmap_line_ydxi::@1 (byte) bitmap_plot::y#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::y#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::y#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::y#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::y#2 ) (byte) bitmap_plot::x#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::x#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::x#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::x#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::x#2 ) @@ -163,6 +169,8 @@ bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot return to:@return + +(void()) bitmap_line((byte) bitmap_line::x0 , (byte) bitmap_line::x1 , (byte) bitmap_line::y0 , (byte) bitmap_line::y1) bitmap_line: scope:[bitmap_line] from main::@1 (byte) bitmap_line::y1#13 ← phi( main::@1/(byte) bitmap_line::y1#0 ) (byte) bitmap_line::y0#13 ← phi( main::@1/(byte) bitmap_line::y0#0 ) @@ -360,6 +368,8 @@ bitmap_line::@36: scope:[bitmap_line] from bitmap_line::@27 bitmap_line::@return: scope:[bitmap_line] from bitmap_line::@29 bitmap_line::@30 bitmap_line::@31 bitmap_line::@32 bitmap_line::@33 bitmap_line::@34 bitmap_line::@35 bitmap_line::@36 return to:@return + +(void()) bitmap_line_xdyi((byte) bitmap_line_xdyi::x , (byte) bitmap_line_xdyi::y , (byte) bitmap_line_xdyi::x1 , (byte) bitmap_line_xdyi::xd , (byte) bitmap_line_xdyi::yd) bitmap_line_xdyi: scope:[bitmap_line_xdyi] from bitmap_line::@11 bitmap_line::@25 (byte) bitmap_line_xdyi::x1#6 ← phi( bitmap_line::@11/(byte) bitmap_line_xdyi::x1#0 bitmap_line::@25/(byte) bitmap_line_xdyi::x1#1 ) (byte) bitmap_line_xdyi::xd#5 ← phi( bitmap_line::@11/(byte) bitmap_line_xdyi::xd#0 bitmap_line::@25/(byte) bitmap_line_xdyi::xd#1 ) @@ -419,6 +429,8 @@ bitmap_line_xdyi::@3: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@5 bitmap_line_xdyi::@return: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@2 return to:@return + +(void()) bitmap_line_xdyd((byte) bitmap_line_xdyd::x , (byte) bitmap_line_xdyd::y , (byte) bitmap_line_xdyd::x1 , (byte) bitmap_line_xdyd::xd , (byte) bitmap_line_xdyd::yd) bitmap_line_xdyd: scope:[bitmap_line_xdyd] from bitmap_line::@15 bitmap_line::@21 (byte) bitmap_line_xdyd::x1#6 ← phi( bitmap_line::@15/(byte) bitmap_line_xdyd::x1#0 bitmap_line::@21/(byte) bitmap_line_xdyd::x1#1 ) (byte) bitmap_line_xdyd::xd#5 ← phi( bitmap_line::@15/(byte) bitmap_line_xdyd::xd#0 bitmap_line::@21/(byte) bitmap_line_xdyd::xd#1 ) @@ -478,6 +490,8 @@ bitmap_line_xdyd::@3: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@5 bitmap_line_xdyd::@return: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@2 return to:@return + +(void()) bitmap_line_ydxi((byte) bitmap_line_ydxi::y , (byte) bitmap_line_ydxi::x , (byte) bitmap_line_ydxi::y1 , (byte) bitmap_line_ydxi::yd , (byte) bitmap_line_ydxi::xd) bitmap_line_ydxi: scope:[bitmap_line_ydxi] from bitmap_line::@27 bitmap_line::@5 (byte) bitmap_line_ydxi::y1#6 ← phi( bitmap_line::@27/(byte) bitmap_line_ydxi::y1#1 bitmap_line::@5/(byte) bitmap_line_ydxi::y1#0 ) (byte) bitmap_line_ydxi::yd#5 ← phi( bitmap_line::@27/(byte) bitmap_line_ydxi::yd#1 bitmap_line::@5/(byte) bitmap_line_ydxi::yd#0 ) @@ -537,6 +551,8 @@ bitmap_line_ydxi::@3: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@5 bitmap_line_ydxi::@return: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@2 return to:@return + +(void()) bitmap_line_ydxd((byte) bitmap_line_ydxd::y , (byte) bitmap_line_ydxd::x , (byte) bitmap_line_ydxd::y1 , (byte) bitmap_line_ydxd::yd , (byte) bitmap_line_ydxd::xd) bitmap_line_ydxd: scope:[bitmap_line_ydxd] from bitmap_line::@17 bitmap_line::@8 (byte) bitmap_line_ydxd::y1#6 ← phi( bitmap_line::@17/(byte) bitmap_line_ydxd::y1#0 bitmap_line::@8/(byte) bitmap_line_ydxd::y1#1 ) (byte) bitmap_line_ydxd::yd#5 ← phi( bitmap_line::@17/(byte) bitmap_line_ydxd::yd#0 bitmap_line::@8/(byte) bitmap_line_ydxd::yd#1 ) @@ -602,6 +618,8 @@ bitmap_line_ydxd::@return: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@2 (byte*) BITMAP#0 ← ((byte*)) (number) $2000 (byte) next#0 ← (number) 0 to:@14 + +(void()) main() main: scope:[main] from @14 (byte) next#12 ← phi( @14/(byte) next#9 ) *((byte*) BORDERCOL#0) ← (number) 0 @@ -651,6 +669,8 @@ main::@return: scope:[main] from main::@6 (byte) next#2 ← (byte) next#6 return to:@return + +(void()) init_screen() init_screen: scope:[init_screen] from main::@4 (byte*) init_screen::c#0 ← (byte*) SCREEN#0 to:init_screen::@1 @@ -2015,6 +2035,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BORDERCOL#0) ← (byte) 0 [5] *((const byte*) BGCOL#0) ← (byte) 0 @@ -2038,6 +2060,8 @@ main::@1: scope:[main] from main::@3 main::@4 main::@4: scope:[main] from main::@1 [16] (byte) next#1 ← ++ (byte) next#4 to:main::@1 + +(void()) bitmap_line((byte) bitmap_line::x0 , (byte) bitmap_line::x1 , (byte) bitmap_line::y0 , (byte) bitmap_line::y1) bitmap_line: scope:[bitmap_line] from main::@1 [17] if((const byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 to:bitmap_line::@2 @@ -2074,6 +2098,8 @@ bitmap_line::@7: scope:[bitmap_line] from bitmap_line::@6 [31] (byte) bitmap_line_xdyi::xd#1 ← (byte) bitmap_line::xd#1 [32] call bitmap_line_xdyi to:bitmap_line::@return + +(void()) bitmap_line_xdyi((byte) bitmap_line_xdyi::x , (byte) bitmap_line_xdyi::y , (byte) bitmap_line_xdyi::x1 , (byte) bitmap_line_xdyi::xd , (byte) bitmap_line_xdyi::yd) bitmap_line_xdyi: scope:[bitmap_line_xdyi] from bitmap_line::@7 [33] phi() to:bitmap_line_xdyi::@1 @@ -2103,6 +2129,8 @@ bitmap_line_xdyi::@2: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@3 bitmap bitmap_line_xdyi::@return: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@2 [46] return to:@return + +(void()) bitmap_plot((byte) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_line_ydxd::@1 bitmap_line_ydxi::@1 [47] (byte) bitmap_plot::y#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::y#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::y#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::y#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::y#2 ) [47] (byte) bitmap_plot::x#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::x#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::x#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::x#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::x#2 ) @@ -2115,6 +2143,8 @@ bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot [53] return to:@return + +(void()) bitmap_line_ydxi((byte) bitmap_line_ydxi::y , (byte) bitmap_line_ydxi::x , (byte) bitmap_line_ydxi::y1 , (byte) bitmap_line_ydxi::yd , (byte) bitmap_line_ydxi::xd) bitmap_line_ydxi: scope:[bitmap_line_ydxi] from bitmap_line::@8 [54] (byte) bitmap_line_ydxi::e#0 ← (byte) bitmap_line_ydxi::xd#1 >> (byte) 1 to:bitmap_line_ydxi::@1 @@ -2143,6 +2173,8 @@ bitmap_line_ydxi::@2: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@3 bitmap bitmap_line_ydxi::@return: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@2 [66] return to:@return + +(void()) bitmap_line_xdyd((byte) bitmap_line_xdyd::x , (byte) bitmap_line_xdyd::y , (byte) bitmap_line_xdyd::x1 , (byte) bitmap_line_xdyd::xd , (byte) bitmap_line_xdyd::yd) bitmap_line_xdyd: scope:[bitmap_line_xdyd] from bitmap_line::@4 [67] phi() to:bitmap_line_xdyd::@1 @@ -2171,6 +2203,8 @@ bitmap_line_xdyd::@2: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@3 bitmap bitmap_line_xdyd::@return: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@2 [79] return to:@return + +(void()) bitmap_line_ydxd((byte) bitmap_line_ydxd::y , (byte) bitmap_line_ydxd::x , (byte) bitmap_line_ydxd::y1 , (byte) bitmap_line_ydxd::yd , (byte) bitmap_line_ydxd::xd) bitmap_line_ydxd: scope:[bitmap_line_ydxd] from bitmap_line::@5 [80] (byte) bitmap_line_ydxd::e#0 ← (byte) bitmap_line_ydxd::xd#0 >> (byte) 1 to:bitmap_line_ydxd::@1 @@ -2199,6 +2233,8 @@ bitmap_line_ydxd::@2: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@3 bitmap bitmap_line_ydxd::@return: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@2 [92] return to:@return + +(void()) init_screen() init_screen: scope:[init_screen] from main::@3 [93] phi() to:init_screen::@1 @@ -2213,6 +2249,8 @@ init_screen::@2: scope:[init_screen] from init_screen::@1 [97] *((byte*) init_screen::c#2) ← (byte) $14 [98] (byte*) init_screen::c#1 ← ++ (byte*) init_screen::c#2 to:init_screen::@1 + +(void()) bitmap_clear() bitmap_clear: scope:[bitmap_clear] from main::@2 [99] (word) bitmap_clear::bitmap#0 ← *((const byte[$100]) bitmap_plot_xhi#0) w= *((const byte[$100]) bitmap_plot_xlo#0) [100] (byte*~) bitmap_clear::bitmap#5 ← (byte*)(word) bitmap_clear::bitmap#0 @@ -2236,6 +2274,8 @@ bitmap_clear::@3: scope:[bitmap_clear] from bitmap_clear::@2 bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@3 [109] return to:@return + +(void()) bitmap_init((byte*) bitmap_init::bitmap) bitmap_init: scope:[bitmap_init] from main [110] phi() to:bitmap_init::@1 diff --git a/src/test/ref/bitmap-line-anim-2.cfg b/src/test/ref/bitmap-line-anim-2.cfg index 6daf4bd4a..ba87fd833 100644 --- a/src/test/ref/bitmap-line-anim-2.cfg +++ b/src/test/ref/bitmap-line-anim-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BORDERCOL#0) ← (byte) 0 [5] *((const byte*) BGCOL#0) ← (byte) 0 @@ -33,6 +35,8 @@ main::@5: scope:[main] from main::@4 main::@2: scope:[main] from main::@4 main::@5 [17] (word) next#3 ← phi( main::@4/(byte) 0 main::@5/(word) next#1 ) to:main::@1 + +(void()) bitmap_line((word) bitmap_line::x1 , (word) bitmap_line::y1 , (word) bitmap_line::x2 , (word) bitmap_line::y2) bitmap_line: scope:[bitmap_line] from main::@1 [18] (word) abs_u16::w#0 ← (word) bitmap_line::x2#0 [19] call abs_u16 @@ -128,6 +132,8 @@ bitmap_line::@4: scope:[bitmap_line] from bitmap_line::@18 [64] phi() [65] call bitmap_plot to:bitmap_line::@return + +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from bitmap_line::@3 bitmap_line::@4 bitmap_line::@6 bitmap_line::@9 [66] (word) bitmap_plot::x#4 ← phi( bitmap_line::@9/(word) bitmap_plot::x#3 bitmap_line::@3/(word) bitmap_plot::x#2 bitmap_line::@4/(const word) bitmap_line::x1#0 bitmap_line::@6/(word) bitmap_plot::x#1 ) [66] (byte) bitmap_plot::y#4 ← phi( bitmap_line::@9/(byte) bitmap_plot::y#3 bitmap_line::@3/(byte) bitmap_plot::y#2 bitmap_line::@4/(byte) 0 bitmap_line::@6/(byte) bitmap_plot::y#1 ) @@ -140,6 +146,8 @@ bitmap_plot: scope:[bitmap_plot] from bitmap_line::@3 bitmap_line::@4 bitmap_li bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot [72] return to:@return + +(word()) sgn_u16((word) sgn_u16::w) sgn_u16: scope:[sgn_u16] from bitmap_line::@1 bitmap_line::@14 [73] (word) sgn_u16::w#2 ← phi( bitmap_line::@1/(word) sgn_u16::w#0 bitmap_line::@14/(const word) bitmap_line::y2#0 ) [74] (byte~) sgn_u16::$0 ← > (word) sgn_u16::w#2 @@ -153,6 +161,8 @@ sgn_u16::@return: scope:[sgn_u16] from sgn_u16 sgn_u16::@1 [78] (word) sgn_u16::return#4 ← phi( sgn_u16::@1/(byte) -1 sgn_u16/(byte) 1 ) [79] return to:@return + +(word()) abs_u16((word) abs_u16::w) abs_u16: scope:[abs_u16] from bitmap_line bitmap_line::@12 [80] (word) abs_u16::w#2 ← phi( bitmap_line/(word) abs_u16::w#0 bitmap_line::@12/(const word) bitmap_line::y2#0 ) [81] (byte~) abs_u16::$0 ← > (word) abs_u16::w#2 @@ -166,6 +176,8 @@ abs_u16::@return: scope:[abs_u16] from abs_u16 abs_u16::@1 [85] (word) abs_u16::return#4 ← phi( abs_u16::@1/(word) abs_u16::return#2 abs_u16/(word) abs_u16::w#2 ) [86] return to:@return + +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) bitmap_clear: scope:[bitmap_clear] from main::@3 [87] phi() [88] call memset @@ -177,6 +189,8 @@ bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 [91] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [92] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) [92] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) @@ -198,6 +212,8 @@ memset::@3: scope:[memset] from memset::@2 [99] *((byte*) memset::dst#2) ← (byte) memset::c#4 [100] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) bitmap_init: scope:[bitmap_init] from main [101] phi() to:bitmap_init::@1 diff --git a/src/test/ref/bitmap-line-anim-2.log b/src/test/ref/bitmap-line-anim-2.log index 1bfdcb9d6..14f1c1eed 100644 --- a/src/test/ref/bitmap-line-anim-2.log +++ b/src/test/ref/bitmap-line-anim-2.log @@ -46,6 +46,8 @@ CONTROL FLOW GRAPH SSA (byte) WHITE#0 ← (number) 1 (byte) PURPLE#0 ← (number) 4 to:@8 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from bitmap_clear bitmap_clear::@1 (byte) memset::c#5 ← phi( bitmap_clear/(byte) memset::c#0 bitmap_clear::@1/(byte) memset::c#1 ) (void*) memset::str#4 ← phi( bitmap_clear/(void*) memset::str#0 bitmap_clear::@1/(void*) memset::str#1 ) @@ -95,6 +97,8 @@ memset::@return: scope:[memset] from memset::@1 (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } to:@14 + +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) bitmap_init: scope:[bitmap_init] from main (byte*) bitmap_init::screen#1 ← phi( main/(byte*) bitmap_init::screen#0 ) (byte*) bitmap_init::gfx#1 ← phi( main/(byte*) bitmap_init::gfx#0 ) @@ -179,6 +183,8 @@ bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@6 (byte*) bitmap_screen#2 ← (byte*) bitmap_screen#6 return to:@return + +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) bitmap_clear: scope:[bitmap_clear] from main::@5 (byte*) bitmap_gfx#12 ← phi( main::@5/(byte*) bitmap_gfx#3 ) (byte*) bitmap_screen#7 ← phi( main::@5/(byte*) bitmap_screen#3 ) @@ -206,6 +212,8 @@ bitmap_clear::@2: scope:[bitmap_clear] from bitmap_clear::@1 bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@2 return to:@return + +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from bitmap_line::@12 bitmap_line::@3 bitmap_line::@4 bitmap_line::@7 (word) bitmap_plot::x#4 ← phi( bitmap_line::@12/(word) bitmap_plot::x#3 bitmap_line::@3/(word) bitmap_plot::x#2 bitmap_line::@4/(word) bitmap_plot::x#0 bitmap_line::@7/(word) bitmap_plot::x#1 ) (byte) bitmap_plot::y#4 ← phi( bitmap_line::@12/(byte) bitmap_plot::y#3 bitmap_line::@3/(byte) bitmap_plot::y#2 bitmap_line::@4/(byte) bitmap_plot::y#0 bitmap_line::@7/(byte) bitmap_plot::y#1 ) @@ -219,6 +227,8 @@ bitmap_plot: scope:[bitmap_plot] from bitmap_line::@12 bitmap_line::@3 bitmap_l bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot return to:@return + +(void()) bitmap_line((word) bitmap_line::x1 , (word) bitmap_line::y1 , (word) bitmap_line::x2 , (word) bitmap_line::y2) bitmap_line: scope:[bitmap_line] from main::@1 (word) bitmap_line::y2#4 ← phi( main::@1/(word) bitmap_line::y2#0 ) (word) bitmap_line::x2#1 ← phi( main::@1/(word) bitmap_line::x2#0 ) @@ -458,6 +468,8 @@ bitmap_line::@14: scope:[bitmap_line] from bitmap_line::@23 (word) bitmap_line::y#2 ← (word) bitmap_line::y#9 + (word) bitmap_line::sy#2 (word) bitmap_line::e1#2 ← (word) bitmap_line::e1#4 - (word) bitmap_line::dx#6 to:bitmap_line::@13 + +(word()) abs_u16((word) abs_u16::w) abs_u16: scope:[abs_u16] from bitmap_line bitmap_line::@16 (word) abs_u16::w#2 ← phi( bitmap_line/(word) abs_u16::w#0 bitmap_line::@16/(word) abs_u16::w#1 ) (byte~) abs_u16::$0 ← > (word) abs_u16::w#2 @@ -479,6 +491,8 @@ abs_u16::@return: scope:[abs_u16] from abs_u16::@1 abs_u16::@3 (word) abs_u16::return#4 ← (word) abs_u16::return#7 return to:@return + +(word()) sgn_u16((word) sgn_u16::w) sgn_u16: scope:[sgn_u16] from bitmap_line::@1 bitmap_line::@18 (word) sgn_u16::w#2 ← phi( bitmap_line::@1/(word) sgn_u16::w#0 bitmap_line::@18/(word) sgn_u16::w#1 ) (byte~) sgn_u16::$0 ← > (word) sgn_u16::w#2 @@ -504,6 +518,8 @@ sgn_u16::@return: scope:[sgn_u16] from sgn_u16::@1 sgn_u16::@3 (byte*) BITMAP#0 ← ((byte*)) (number) $2000 (word) next#0 ← (number) 0 to:@15 + +(void()) main() main: scope:[main] from @15 (word) next#13 ← phi( @15/(word) next#11 ) (byte*) bitmap_screen#12 ← phi( @15/(byte*) bitmap_screen#14 ) @@ -1818,6 +1834,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BORDERCOL#0) ← (byte) 0 [5] *((const byte*) BGCOL#0) ← (byte) 0 @@ -1844,6 +1862,8 @@ main::@5: scope:[main] from main::@4 main::@2: scope:[main] from main::@4 main::@5 [17] (word) next#3 ← phi( main::@4/(byte) 0 main::@5/(word) next#1 ) to:main::@1 + +(void()) bitmap_line((word) bitmap_line::x1 , (word) bitmap_line::y1 , (word) bitmap_line::x2 , (word) bitmap_line::y2) bitmap_line: scope:[bitmap_line] from main::@1 [18] (word) abs_u16::w#0 ← (word) bitmap_line::x2#0 [19] call abs_u16 @@ -1939,6 +1959,8 @@ bitmap_line::@4: scope:[bitmap_line] from bitmap_line::@18 [64] phi() [65] call bitmap_plot to:bitmap_line::@return + +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from bitmap_line::@3 bitmap_line::@4 bitmap_line::@6 bitmap_line::@9 [66] (word) bitmap_plot::x#4 ← phi( bitmap_line::@9/(word) bitmap_plot::x#3 bitmap_line::@3/(word) bitmap_plot::x#2 bitmap_line::@4/(const word) bitmap_line::x1#0 bitmap_line::@6/(word) bitmap_plot::x#1 ) [66] (byte) bitmap_plot::y#4 ← phi( bitmap_line::@9/(byte) bitmap_plot::y#3 bitmap_line::@3/(byte) bitmap_plot::y#2 bitmap_line::@4/(byte) 0 bitmap_line::@6/(byte) bitmap_plot::y#1 ) @@ -1951,6 +1973,8 @@ bitmap_plot: scope:[bitmap_plot] from bitmap_line::@3 bitmap_line::@4 bitmap_li bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot [72] return to:@return + +(word()) sgn_u16((word) sgn_u16::w) sgn_u16: scope:[sgn_u16] from bitmap_line::@1 bitmap_line::@14 [73] (word) sgn_u16::w#2 ← phi( bitmap_line::@1/(word) sgn_u16::w#0 bitmap_line::@14/(const word) bitmap_line::y2#0 ) [74] (byte~) sgn_u16::$0 ← > (word) sgn_u16::w#2 @@ -1964,6 +1988,8 @@ sgn_u16::@return: scope:[sgn_u16] from sgn_u16 sgn_u16::@1 [78] (word) sgn_u16::return#4 ← phi( sgn_u16::@1/(byte) -1 sgn_u16/(byte) 1 ) [79] return to:@return + +(word()) abs_u16((word) abs_u16::w) abs_u16: scope:[abs_u16] from bitmap_line bitmap_line::@12 [80] (word) abs_u16::w#2 ← phi( bitmap_line/(word) abs_u16::w#0 bitmap_line::@12/(const word) bitmap_line::y2#0 ) [81] (byte~) abs_u16::$0 ← > (word) abs_u16::w#2 @@ -1977,6 +2003,8 @@ abs_u16::@return: scope:[abs_u16] from abs_u16 abs_u16::@1 [85] (word) abs_u16::return#4 ← phi( abs_u16::@1/(word) abs_u16::return#2 abs_u16/(word) abs_u16::w#2 ) [86] return to:@return + +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) bitmap_clear: scope:[bitmap_clear] from main::@3 [87] phi() [88] call memset @@ -1988,6 +2016,8 @@ bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 [91] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [92] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) [92] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) @@ -2009,6 +2039,8 @@ memset::@3: scope:[memset] from memset::@2 [99] *((byte*) memset::dst#2) ← (byte) memset::c#4 [100] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) bitmap_init: scope:[bitmap_init] from main [101] phi() to:bitmap_init::@1 diff --git a/src/test/ref/bitmap-plot-0.cfg b/src/test/ref/bitmap-plot-0.cfg index d9e682c49..0681877c2 100644 --- a/src/test/ref/bitmap-plot-0.cfg +++ b/src/test/ref/bitmap-plot-0.cfg @@ -10,6 +10,8 @@ to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 [5] phi() [6] call bitmap_init @@ -64,6 +66,8 @@ main::@4: scope:[main] from main::@12 main::@6 [26] (byte) main::vy#8 ← phi( main::@12/(byte) main::vy#2 main::@6/(byte) main::vy#1 ) [27] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) to:main::@1 + +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from main::@2 [28] (word) bitmap_plot::plotter#0 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) [29] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#0 & (word) $fff8 @@ -74,6 +78,8 @@ bitmap_plot: scope:[bitmap_plot] from main::@2 bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot [33] return to:@return + +(void()) init_irq() init_irq: scope:[init_irq] from main::@7 asm { sei } [35] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -88,6 +94,8 @@ init_irq: scope:[init_irq] from main::@7 init_irq::@return: scope:[init_irq] from init_irq [43] return to:@return + +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) bitmap_clear: scope:[bitmap_clear] from main::@8 [44] phi() [45] call memset @@ -99,6 +107,8 @@ bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 [48] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [49] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) [49] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) @@ -120,6 +130,8 @@ memset::@3: scope:[memset] from memset::@2 [56] *((byte*) memset::dst#2) ← (byte) memset::c#4 [57] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) bitmap_init: scope:[bitmap_init] from main [58] phi() to:bitmap_init::@1 @@ -160,6 +172,8 @@ bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 [79] return to:@return + +interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from [80] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [81] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 diff --git a/src/test/ref/bitmap-plot-0.log b/src/test/ref/bitmap-plot-0.log index 6d00bf6b7..bd0b6037d 100644 --- a/src/test/ref/bitmap-plot-0.log +++ b/src/test/ref/bitmap-plot-0.log @@ -58,6 +58,8 @@ CONTROL FLOW GRAPH SSA (byte) BLACK#0 ← (number) 0 (byte) WHITE#0 ← (number) 1 to:@8 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from bitmap_clear bitmap_clear::@1 (byte) memset::c#5 ← phi( bitmap_clear/(byte) memset::c#0 bitmap_clear::@1/(byte) memset::c#1 ) (void*) memset::str#4 ← phi( bitmap_clear/(void*) memset::str#0 bitmap_clear::@1/(void*) memset::str#1 ) @@ -107,6 +109,8 @@ memset::@return: scope:[memset] from memset::@1 (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } to:@14 + +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) bitmap_init: scope:[bitmap_init] from main (byte*) bitmap_init::screen#1 ← phi( main/(byte*) bitmap_init::screen#0 ) (byte*) bitmap_init::gfx#1 ← phi( main/(byte*) bitmap_init::gfx#0 ) @@ -191,6 +195,8 @@ bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@6 (byte*) bitmap_screen#2 ← (byte*) bitmap_screen#6 return to:@return + +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) bitmap_clear: scope:[bitmap_clear] from main::@12 (byte*) bitmap_gfx#12 ← phi( main::@12/(byte*) bitmap_gfx#3 ) (byte*) bitmap_screen#7 ← phi( main::@12/(byte*) bitmap_screen#3 ) @@ -218,6 +224,8 @@ bitmap_clear::@2: scope:[bitmap_clear] from bitmap_clear::@1 bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@2 return to:@return + +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from main::@2 (word) bitmap_plot::x#1 ← phi( main::@2/(word) bitmap_plot::x#0 ) (byte) bitmap_plot::y#1 ← phi( main::@2/(byte) bitmap_plot::y#0 ) @@ -238,6 +246,8 @@ bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte[$100]) plots_per_frame#0 ← { fill( $100, 0) } to:@15 + +(void()) main() main: scope:[main] from @17 (byte) frame_cnt#21 ← phi( @17/(byte) frame_cnt#9 ) (byte*) bitmap_screen#12 ← phi( @17/(byte*) bitmap_screen#14 ) @@ -405,6 +415,8 @@ main::@return: scope:[main] from main::@1 (byte*) bitmap_gfx#20 ← phi( @14/(byte*) bitmap_gfx#25 ) (byte) frame_cnt#0 ← (number) 1 to:@17 + +(void()) init_irq() init_irq: scope:[init_irq] from main::@11 asm { sei } *((byte*) PROCPORT_DDR#0) ← (byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -420,6 +432,8 @@ init_irq: scope:[init_irq] from main::@11 init_irq::@return: scope:[init_irq] from init_irq return to:@return + +interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from (byte) frame_cnt#4 ← phi( @17/(byte) frame_cnt#9 ) *((byte*) BGCOL#0) ← (byte) WHITE#0 @@ -1464,6 +1478,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 [5] phi() [6] call bitmap_init @@ -1518,6 +1534,8 @@ main::@4: scope:[main] from main::@12 main::@6 [26] (byte) main::vy#8 ← phi( main::@12/(byte) main::vy#2 main::@6/(byte) main::vy#1 ) [27] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) to:main::@1 + +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from main::@2 [28] (word) bitmap_plot::plotter#0 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) [29] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#0 & (word) $fff8 @@ -1528,6 +1546,8 @@ bitmap_plot: scope:[bitmap_plot] from main::@2 bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot [33] return to:@return + +(void()) init_irq() init_irq: scope:[init_irq] from main::@7 asm { sei } [35] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -1542,6 +1562,8 @@ init_irq: scope:[init_irq] from main::@7 init_irq::@return: scope:[init_irq] from init_irq [43] return to:@return + +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) bitmap_clear: scope:[bitmap_clear] from main::@8 [44] phi() [45] call memset @@ -1553,6 +1575,8 @@ bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 [48] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [49] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) [49] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) @@ -1574,6 +1598,8 @@ memset::@3: scope:[memset] from memset::@2 [56] *((byte*) memset::dst#2) ← (byte) memset::c#4 [57] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) bitmap_init: scope:[bitmap_init] from main [58] phi() to:bitmap_init::@1 @@ -1614,6 +1640,8 @@ bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 [79] return to:@return + +interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from [80] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [81] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 diff --git a/src/test/ref/bitmap-plot-1.cfg b/src/test/ref/bitmap-plot-1.cfg index de3f5e3b0..00d8a7830 100644 --- a/src/test/ref/bitmap-plot-1.cfg +++ b/src/test/ref/bitmap-plot-1.cfg @@ -10,6 +10,8 @@ to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 [5] phi() [6] call sin16s_gen2 @@ -84,6 +86,8 @@ main::@4: scope:[main] from main::@13 main::@3 [46] (word) main::idx_y#10 ← phi( main::@13/(word) main::idx_y#1 main::@3/(byte) 0 ) [47] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) to:main::@1 + +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from main::@10 [48] (word) bitmap_plot::plotter#0 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) [49] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#0 & (word) $fff8 @@ -94,6 +98,8 @@ bitmap_plot: scope:[bitmap_plot] from main::@10 bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot [53] return to:@return + +(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) mul16s: scope:[mul16s] from main::@2 main::@9 sin16s_gen2::@4 [54] (signed word) mul16s::b#3 ← phi( main::@9/(signed word) mul16s::b#2 main::@2/(signed word) mul16s::b#1 sin16s_gen2::@4/(const signed word) sin16s_gen2::ampl#0 ) [54] (signed word) mul16s::a#3 ← phi( main::@9/(signed byte) $64 main::@2/(signed word) $a0 sin16s_gen2::@4/(signed word) mul16s::a#0 ) @@ -127,6 +133,8 @@ mul16s::@2: scope:[mul16s] from mul16s::@1 mul16s::@4 mul16s::@return: scope:[mul16s] from mul16s::@2 [71] return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mul16s mulu16_sel [72] (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mulu16_sel/(word) mul16u::a#2 ) [72] (dword) mul16u::mb#0 ← phi( mul16s/(word) mul16u::b#0 mulu16_sel/(word) mul16u::b#1 ) @@ -152,6 +160,8 @@ mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4 [80] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 [81] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 to:mul16u::@1 + +(void()) init_irq() init_irq: scope:[init_irq] from main::@5 asm { sei } [83] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -166,6 +176,8 @@ init_irq: scope:[init_irq] from main::@5 init_irq::@return: scope:[init_irq] from init_irq [91] return to:@return + +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) bitmap_clear: scope:[bitmap_clear] from main::@7 [92] phi() [93] call memset @@ -177,6 +189,8 @@ bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 [96] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [97] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) [97] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) @@ -198,6 +212,8 @@ memset::@3: scope:[memset] from memset::@2 [104] *((byte*) memset::dst#2) ← (byte) memset::c#4 [105] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) bitmap_init: scope:[bitmap_init] from main::@6 [106] phi() to:bitmap_init::@1 @@ -238,6 +254,8 @@ bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 [127] return to:@return + +(void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max) sin16s_gen2: scope:[sin16s_gen2] from main [128] phi() [129] call div32u16u @@ -273,6 +291,8 @@ sin16s_gen2::@5: scope:[sin16s_gen2] from sin16s_gen2::@4 [145] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [146] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 to:sin16s_gen2::@1 + +(signed word()) sin16s((dword) sin16s::x) sin16s: scope:[sin16s] from sin16s_gen2::@2 [147] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 to:sin16s::@4 @@ -342,6 +362,8 @@ sin16s::@return: scope:[sin16s] from sin16s::@3 sin16s::@12: scope:[sin16s] from sin16s::@11 [186] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 to:sin16s::@3 + +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 [187] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) [187] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) @@ -359,6 +381,8 @@ mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 [195] return to:@return + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from sin16s_gen2 [196] phi() [197] call divr16u @@ -377,6 +401,8 @@ div32u16u::@2: scope:[div32u16u] from div32u16u::@1 div32u16u::@return: scope:[div32u16u] from div32u16u::@2 [205] return to:@return + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div32u16u div32u16u::@1 [206] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) [206] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) @@ -416,6 +442,8 @@ divr16u::@6: scope:[divr16u] from divr16u::@3 divr16u::@return: scope:[divr16u] from divr16u::@6 [223] return to:@return + +interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from [224] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [225] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 diff --git a/src/test/ref/bitmap-plot-1.log b/src/test/ref/bitmap-plot-1.log index ad10fb151..c71ec5357 100644 --- a/src/test/ref/bitmap-plot-1.log +++ b/src/test/ref/bitmap-plot-1.log @@ -96,6 +96,8 @@ CONTROL FLOW GRAPH SSA @6: scope:[] from @begin (word) rem16u#0 ← (number) 0 to:@17 + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div32u16u div32u16u::@2 (word) divr16u::divisor#6 ← phi( div32u16u/(word) divr16u::divisor#0 div32u16u::@2/(word) divr16u::divisor#1 ) (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@2/(word) divr16u::dividend#2 ) @@ -173,6 +175,8 @@ divr16u::@return: scope:[divr16u] from divr16u::@6 (word) rem16u#2 ← (word) rem16u#11 return to:@return + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from sin16s_gen2 (word) rem16u#20 ← phi( sin16s_gen2/(word) rem16u#21 ) (word) div32u16u::divisor#1 ← phi( sin16s_gen2/(word) div32u16u::divisor#0 ) @@ -216,6 +220,8 @@ div32u16u::@return: scope:[div32u16u] from div32u16u::@3 (word) rem16u#5 ← (word) rem16u#14 return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mul16s mulu16_sel (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mulu16_sel/(word) mul16u::a#2 ) (word) mul16u::b#2 ← phi( mul16s/(word) mul16u::b#0 mulu16_sel/(word) mul16u::b#1 ) @@ -263,6 +269,8 @@ mul16u::@return: scope:[mul16u] from mul16u::@3 (dword) mul16u::return#1 ← (dword) mul16u::return#4 return to:@return + +(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) mul16s: scope:[mul16s] from main::@16 main::@2 sin16s_gen2::@8 (signed word) mul16s::b#3 ← phi( main::@16/(signed word) mul16s::b#2 main::@2/(signed word) mul16s::b#1 sin16s_gen2::@8/(signed word) mul16s::b#0 ) (signed word) mul16s::a#3 ← phi( main::@16/(signed word) mul16s::a#2 main::@2/(signed word) mul16s::a#1 sin16s_gen2::@8/(signed word) mul16s::a#0 ) @@ -326,6 +334,8 @@ mul16s::@return: scope:[mul16s] from mul16s::@2 (dword) PI_u4f28#0 ← (number) $3243f6a9 (dword) PI_HALF_u4f28#0 ← (number) $1921fb54 to:@28 + +(void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max) sin16s_gen2: scope:[sin16s_gen2] from main (signed word*) sin16s_gen2::sintab#7 ← phi( main/(signed word*) sin16s_gen2::sintab#1 ) (word) rem16u#21 ← phi( main/(word) rem16u#23 ) @@ -421,6 +431,8 @@ sin16s_gen2::@return: scope:[sin16s_gen2] from sin16s_gen2::@1 (word) rem16u#7 ← (word) rem16u#16 return to:@return + +(signed word()) sin16s((dword) sin16s::x) sin16s: scope:[sin16s] from sin16s_gen2::@2 (dword) sin16s::x#3 ← phi( sin16s_gen2::@2/(dword) sin16s::x#0 ) (byte) sin16s::isUpper#0 ← (number) 0 @@ -542,6 +554,8 @@ sin16s::@return: scope:[sin16s] from sin16s::@3 (signed word) sin16s::return#2 ← (signed word) sin16s::return#4 return to:@return + +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@11 sin16s::@2 sin16s::@8 sin16s::@9 (byte) mulu16_sel::select#6 ← phi( sin16s::@10/(byte) mulu16_sel::select#3 sin16s::@11/(byte) mulu16_sel::select#4 sin16s::@2/(byte) mulu16_sel::select#0 sin16s::@8/(byte) mulu16_sel::select#1 sin16s::@9/(byte) mulu16_sel::select#2 ) (word) mulu16_sel::v2#5 ← phi( sin16s::@10/(word) mulu16_sel::v2#3 sin16s::@11/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@8/(word) mulu16_sel::v2#1 sin16s::@9/(word) mulu16_sel::v2#2 ) @@ -564,6 +578,8 @@ mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@2 (word) mulu16_sel::return#6 ← (word) mulu16_sel::return#12 return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from bitmap_clear bitmap_clear::@1 (byte) memset::c#5 ← phi( bitmap_clear/(byte) memset::c#0 bitmap_clear::@1/(byte) memset::c#1 ) (void*) memset::str#4 ← phi( bitmap_clear/(void*) memset::str#0 bitmap_clear::@1/(void*) memset::str#1 ) @@ -614,6 +630,8 @@ memset::@return: scope:[memset] from memset::@1 (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } to:@34 + +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) bitmap_init: scope:[bitmap_init] from main::@12 (byte*) bitmap_init::screen#1 ← phi( main::@12/(byte*) bitmap_init::screen#0 ) (byte*) bitmap_init::gfx#1 ← phi( main::@12/(byte*) bitmap_init::gfx#0 ) @@ -698,6 +716,8 @@ bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@6 (byte*) bitmap_screen#2 ← (byte*) bitmap_screen#6 return to:@return + +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) bitmap_clear: scope:[bitmap_clear] from main::@13 (byte*) bitmap_gfx#12 ← phi( main::@13/(byte*) bitmap_gfx#3 ) (byte*) bitmap_screen#7 ← phi( main::@13/(byte*) bitmap_screen#3 ) @@ -725,6 +745,8 @@ bitmap_clear::@2: scope:[bitmap_clear] from bitmap_clear::@1 bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@2 return to:@return + +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from main::@17 (word) bitmap_plot::x#1 ← phi( main::@17/(word) bitmap_plot::x#0 ) (byte) bitmap_plot::y#1 ← phi( main::@17/(byte) bitmap_plot::y#0 ) @@ -747,6 +769,8 @@ bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot (byte[$100]) plots_per_frame#0 ← { fill( $100, 0) } (signed word[$200]) SINUS#0 ← { fill( $200, 0) } to:@35 + +(void()) main() main: scope:[main] from @37 (byte) frame_cnt#24 ← phi( @37/(byte) frame_cnt#9 ) (byte*) bitmap_screen#17 ← phi( @37/(byte*) bitmap_screen#14 ) @@ -965,6 +989,8 @@ main::@return: scope:[main] from main::@1 (word) rem16u#29 ← phi( @34/(word) rem16u#34 ) (byte) frame_cnt#0 ← (number) 1 to:@37 + +(void()) init_irq() init_irq: scope:[init_irq] from main::@11 asm { sei } *((byte*) PROCPORT_DDR#0) ← (byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -980,6 +1006,8 @@ init_irq: scope:[init_irq] from main::@11 init_irq::@return: scope:[init_irq] from init_irq return to:@return + +interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from (byte) frame_cnt#4 ← phi( @37/(byte) frame_cnt#9 ) *((byte*) BGCOL#0) ← (byte) WHITE#0 @@ -3044,6 +3072,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 [5] phi() [6] call sin16s_gen2 @@ -3118,6 +3148,8 @@ main::@4: scope:[main] from main::@13 main::@3 [46] (word) main::idx_y#10 ← phi( main::@13/(word) main::idx_y#1 main::@3/(byte) 0 ) [47] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) to:main::@1 + +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from main::@10 [48] (word) bitmap_plot::plotter#0 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) [49] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#0 & (word) $fff8 @@ -3128,6 +3160,8 @@ bitmap_plot: scope:[bitmap_plot] from main::@10 bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot [53] return to:@return + +(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) mul16s: scope:[mul16s] from main::@2 main::@9 sin16s_gen2::@4 [54] (signed word) mul16s::b#3 ← phi( main::@9/(signed word) mul16s::b#2 main::@2/(signed word) mul16s::b#1 sin16s_gen2::@4/(const signed word) sin16s_gen2::ampl#0 ) [54] (signed word) mul16s::a#3 ← phi( main::@9/(signed byte) $64 main::@2/(signed word) $a0 sin16s_gen2::@4/(signed word) mul16s::a#0 ) @@ -3161,6 +3195,8 @@ mul16s::@2: scope:[mul16s] from mul16s::@1 mul16s::@4 mul16s::@return: scope:[mul16s] from mul16s::@2 [71] return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mul16s mulu16_sel [72] (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mulu16_sel/(word) mul16u::a#2 ) [72] (dword) mul16u::mb#0 ← phi( mul16s/(word) mul16u::b#0 mulu16_sel/(word) mul16u::b#1 ) @@ -3186,6 +3222,8 @@ mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4 [80] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 [81] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 to:mul16u::@1 + +(void()) init_irq() init_irq: scope:[init_irq] from main::@5 asm { sei } [83] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -3200,6 +3238,8 @@ init_irq: scope:[init_irq] from main::@5 init_irq::@return: scope:[init_irq] from init_irq [91] return to:@return + +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) bitmap_clear: scope:[bitmap_clear] from main::@7 [92] phi() [93] call memset @@ -3211,6 +3251,8 @@ bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 [96] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [97] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) [97] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) @@ -3232,6 +3274,8 @@ memset::@3: scope:[memset] from memset::@2 [104] *((byte*) memset::dst#2) ← (byte) memset::c#4 [105] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) bitmap_init: scope:[bitmap_init] from main::@6 [106] phi() to:bitmap_init::@1 @@ -3272,6 +3316,8 @@ bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 [127] return to:@return + +(void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max) sin16s_gen2: scope:[sin16s_gen2] from main [128] phi() [129] call div32u16u @@ -3307,6 +3353,8 @@ sin16s_gen2::@5: scope:[sin16s_gen2] from sin16s_gen2::@4 [145] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [146] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 to:sin16s_gen2::@1 + +(signed word()) sin16s((dword) sin16s::x) sin16s: scope:[sin16s] from sin16s_gen2::@2 [147] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 to:sin16s::@4 @@ -3376,6 +3424,8 @@ sin16s::@return: scope:[sin16s] from sin16s::@3 sin16s::@12: scope:[sin16s] from sin16s::@11 [186] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 to:sin16s::@3 + +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 [187] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) [187] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) @@ -3393,6 +3443,8 @@ mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 [195] return to:@return + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from sin16s_gen2 [196] phi() [197] call divr16u @@ -3411,6 +3463,8 @@ div32u16u::@2: scope:[div32u16u] from div32u16u::@1 div32u16u::@return: scope:[div32u16u] from div32u16u::@2 [205] return to:@return + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div32u16u div32u16u::@1 [206] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) [206] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) @@ -3450,6 +3504,8 @@ divr16u::@6: scope:[divr16u] from divr16u::@3 divr16u::@return: scope:[divr16u] from divr16u::@6 [223] return to:@return + +interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from [224] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [225] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 diff --git a/src/test/ref/bitmap-plot-2.cfg b/src/test/ref/bitmap-plot-2.cfg index 1bc8dcfd4..0ac920042 100644 --- a/src/test/ref/bitmap-plot-2.cfg +++ b/src/test/ref/bitmap-plot-2.cfg @@ -10,6 +10,8 @@ to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 [5] phi() [6] call sin16s_gen2 @@ -103,6 +105,8 @@ main::@5: scope:[main] from main::@15 main::@4 main::@6 main::@7: scope:[main] from main::@5 main::@7 [56] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) to:main::@7 + +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from main::@13 [57] (word) bitmap_plot::plotter#0 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) [58] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#0 & (word) $fff8 @@ -113,6 +117,8 @@ bitmap_plot: scope:[bitmap_plot] from main::@13 bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot [62] return to:@return + +(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) mul16s: scope:[mul16s] from main::@12 main::@2 sin16s_gen2::@4 [63] (signed word) mul16s::b#3 ← phi( main::@2/(signed word) mul16s::b#1 main::@12/(signed word) mul16s::b#2 sin16s_gen2::@4/(const signed word) sin16s_gen2::ampl#0 ) [63] (signed word) mul16s::a#3 ← phi( main::@2/(signed word) mul16s::a#1 main::@12/(signed word) mul16s::a#2 sin16s_gen2::@4/(signed word) mul16s::a#0 ) @@ -146,6 +152,8 @@ mul16s::@2: scope:[mul16s] from mul16s::@1 mul16s::@4 mul16s::@return: scope:[mul16s] from mul16s::@2 [80] return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mul16s mulu16_sel [81] (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mulu16_sel/(word) mul16u::a#2 ) [81] (dword) mul16u::mb#0 ← phi( mul16s/(word) mul16u::b#0 mulu16_sel/(word) mul16u::b#1 ) @@ -171,6 +179,8 @@ mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4 [89] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 [90] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 to:mul16u::@1 + +(void()) init_irq() init_irq: scope:[init_irq] from main::@8 asm { sei } [92] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -185,6 +195,8 @@ init_irq: scope:[init_irq] from main::@8 init_irq::@return: scope:[init_irq] from init_irq [100] return to:@return + +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) bitmap_clear: scope:[bitmap_clear] from main::@10 [101] phi() [102] call memset @@ -196,6 +208,8 @@ bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 [105] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [106] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) [106] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) @@ -217,6 +231,8 @@ memset::@3: scope:[memset] from memset::@2 [113] *((byte*) memset::dst#2) ← (byte) memset::c#4 [114] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) bitmap_init: scope:[bitmap_init] from main::@9 [115] phi() to:bitmap_init::@1 @@ -257,6 +273,8 @@ bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 [136] return to:@return + +(void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max) sin16s_gen2: scope:[sin16s_gen2] from main [137] phi() [138] call div32u16u @@ -292,6 +310,8 @@ sin16s_gen2::@5: scope:[sin16s_gen2] from sin16s_gen2::@4 [154] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [155] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 to:sin16s_gen2::@1 + +(signed word()) sin16s((dword) sin16s::x) sin16s: scope:[sin16s] from sin16s_gen2::@2 [156] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 to:sin16s::@4 @@ -361,6 +381,8 @@ sin16s::@return: scope:[sin16s] from sin16s::@3 sin16s::@12: scope:[sin16s] from sin16s::@11 [195] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 to:sin16s::@3 + +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 [196] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) [196] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) @@ -378,6 +400,8 @@ mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 [204] return to:@return + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from sin16s_gen2 [205] phi() [206] call divr16u @@ -396,6 +420,8 @@ div32u16u::@2: scope:[div32u16u] from div32u16u::@1 div32u16u::@return: scope:[div32u16u] from div32u16u::@2 [214] return to:@return + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div32u16u div32u16u::@1 [215] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) [215] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) @@ -435,6 +461,8 @@ divr16u::@6: scope:[divr16u] from divr16u::@3 divr16u::@return: scope:[divr16u] from divr16u::@6 [232] return to:@return + +interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from [233] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [234] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 diff --git a/src/test/ref/bitmap-plot-2.log b/src/test/ref/bitmap-plot-2.log index 500ad6144..10d6a9e35 100644 --- a/src/test/ref/bitmap-plot-2.log +++ b/src/test/ref/bitmap-plot-2.log @@ -105,6 +105,8 @@ CONTROL FLOW GRAPH SSA @6: scope:[] from @begin (word) rem16u#0 ← (number) 0 to:@17 + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div32u16u div32u16u::@2 (word) divr16u::divisor#6 ← phi( div32u16u/(word) divr16u::divisor#0 div32u16u::@2/(word) divr16u::divisor#1 ) (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@2/(word) divr16u::dividend#2 ) @@ -182,6 +184,8 @@ divr16u::@return: scope:[divr16u] from divr16u::@6 (word) rem16u#2 ← (word) rem16u#11 return to:@return + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from sin16s_gen2 (word) rem16u#20 ← phi( sin16s_gen2/(word) rem16u#21 ) (word) div32u16u::divisor#1 ← phi( sin16s_gen2/(word) div32u16u::divisor#0 ) @@ -225,6 +229,8 @@ div32u16u::@return: scope:[div32u16u] from div32u16u::@3 (word) rem16u#5 ← (word) rem16u#14 return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mul16s mulu16_sel (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mulu16_sel/(word) mul16u::a#2 ) (word) mul16u::b#2 ← phi( mul16s/(word) mul16u::b#0 mulu16_sel/(word) mul16u::b#1 ) @@ -272,6 +278,8 @@ mul16u::@return: scope:[mul16u] from mul16u::@3 (dword) mul16u::return#1 ← (dword) mul16u::return#4 return to:@return + +(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) mul16s: scope:[mul16s] from main::@2 main::@28 sin16s_gen2::@8 (signed word) mul16s::b#3 ← phi( main::@2/(signed word) mul16s::b#1 main::@28/(signed word) mul16s::b#2 sin16s_gen2::@8/(signed word) mul16s::b#0 ) (signed word) mul16s::a#3 ← phi( main::@2/(signed word) mul16s::a#1 main::@28/(signed word) mul16s::a#2 sin16s_gen2::@8/(signed word) mul16s::a#0 ) @@ -335,6 +343,8 @@ mul16s::@return: scope:[mul16s] from mul16s::@2 (dword) PI_u4f28#0 ← (number) $3243f6a9 (dword) PI_HALF_u4f28#0 ← (number) $1921fb54 to:@28 + +(void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max) sin16s_gen2: scope:[sin16s_gen2] from main (signed word*) sin16s_gen2::sintab#7 ← phi( main/(signed word*) sin16s_gen2::sintab#1 ) (word) rem16u#21 ← phi( main/(word) rem16u#23 ) @@ -430,6 +440,8 @@ sin16s_gen2::@return: scope:[sin16s_gen2] from sin16s_gen2::@1 (word) rem16u#7 ← (word) rem16u#16 return to:@return + +(signed word()) sin16s((dword) sin16s::x) sin16s: scope:[sin16s] from sin16s_gen2::@2 (dword) sin16s::x#3 ← phi( sin16s_gen2::@2/(dword) sin16s::x#0 ) (byte) sin16s::isUpper#0 ← (number) 0 @@ -551,6 +563,8 @@ sin16s::@return: scope:[sin16s] from sin16s::@3 (signed word) sin16s::return#2 ← (signed word) sin16s::return#4 return to:@return + +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@11 sin16s::@2 sin16s::@8 sin16s::@9 (byte) mulu16_sel::select#6 ← phi( sin16s::@10/(byte) mulu16_sel::select#3 sin16s::@11/(byte) mulu16_sel::select#4 sin16s::@2/(byte) mulu16_sel::select#0 sin16s::@8/(byte) mulu16_sel::select#1 sin16s::@9/(byte) mulu16_sel::select#2 ) (word) mulu16_sel::v2#5 ← phi( sin16s::@10/(word) mulu16_sel::v2#3 sin16s::@11/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@8/(word) mulu16_sel::v2#1 sin16s::@9/(word) mulu16_sel::v2#2 ) @@ -573,6 +587,8 @@ mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@2 (word) mulu16_sel::return#6 ← (word) mulu16_sel::return#12 return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from bitmap_clear bitmap_clear::@1 (byte) memset::c#5 ← phi( bitmap_clear/(byte) memset::c#0 bitmap_clear::@1/(byte) memset::c#1 ) (void*) memset::str#4 ← phi( bitmap_clear/(void*) memset::str#0 bitmap_clear::@1/(void*) memset::str#1 ) @@ -623,6 +639,8 @@ memset::@return: scope:[memset] from memset::@1 (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } to:@34 + +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) bitmap_init: scope:[bitmap_init] from main::@24 (byte*) bitmap_init::screen#1 ← phi( main::@24/(byte*) bitmap_init::screen#0 ) (byte*) bitmap_init::gfx#1 ← phi( main::@24/(byte*) bitmap_init::gfx#0 ) @@ -707,6 +725,8 @@ bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@6 (byte*) bitmap_screen#2 ← (byte*) bitmap_screen#6 return to:@return + +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) bitmap_clear: scope:[bitmap_clear] from main::@25 (byte*) bitmap_gfx#12 ← phi( main::@25/(byte*) bitmap_gfx#3 ) (byte*) bitmap_screen#7 ← phi( main::@25/(byte*) bitmap_screen#3 ) @@ -734,6 +754,8 @@ bitmap_clear::@2: scope:[bitmap_clear] from bitmap_clear::@1 bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@2 return to:@return + +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from main::@29 (word) bitmap_plot::x#1 ← phi( main::@29/(word) bitmap_plot::x#0 ) (byte) bitmap_plot::y#1 ← phi( main::@29/(byte) bitmap_plot::y#0 ) @@ -756,6 +778,8 @@ bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot (byte[$100]) plots_per_frame#0 ← { fill( $100, 0) } (signed word[$200]) SINUS#0 ← { fill( $200, 0) } to:@35 + +(void()) main() main: scope:[main] from @37 (byte) frame_cnt#26 ← phi( @37/(byte) frame_cnt#8 ) (byte*) bitmap_screen#17 ← phi( @37/(byte*) bitmap_screen#14 ) @@ -1038,6 +1062,8 @@ main::@return: scope:[main] from main::@17 (word) rem16u#30 ← phi( @34/(word) rem16u#35 ) (byte) frame_cnt#0 ← (number) 1 to:@37 + +(void()) init_irq() init_irq: scope:[init_irq] from main::@23 asm { sei } *((byte*) PROCPORT_DDR#0) ← (byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -1053,6 +1079,8 @@ init_irq: scope:[init_irq] from main::@23 init_irq::@return: scope:[init_irq] from init_irq return to:@return + +interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from (byte) frame_cnt#4 ← phi( @37/(byte) frame_cnt#8 ) *((byte*) BGCOL#0) ← (byte) WHITE#0 @@ -3244,6 +3272,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 [5] phi() [6] call sin16s_gen2 @@ -3337,6 +3367,8 @@ main::@5: scope:[main] from main::@15 main::@4 main::@6 main::@7: scope:[main] from main::@5 main::@7 [56] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) to:main::@7 + +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from main::@13 [57] (word) bitmap_plot::plotter#0 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) [58] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#0 & (word) $fff8 @@ -3347,6 +3379,8 @@ bitmap_plot: scope:[bitmap_plot] from main::@13 bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot [62] return to:@return + +(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) mul16s: scope:[mul16s] from main::@12 main::@2 sin16s_gen2::@4 [63] (signed word) mul16s::b#3 ← phi( main::@2/(signed word) mul16s::b#1 main::@12/(signed word) mul16s::b#2 sin16s_gen2::@4/(const signed word) sin16s_gen2::ampl#0 ) [63] (signed word) mul16s::a#3 ← phi( main::@2/(signed word) mul16s::a#1 main::@12/(signed word) mul16s::a#2 sin16s_gen2::@4/(signed word) mul16s::a#0 ) @@ -3380,6 +3414,8 @@ mul16s::@2: scope:[mul16s] from mul16s::@1 mul16s::@4 mul16s::@return: scope:[mul16s] from mul16s::@2 [80] return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mul16s mulu16_sel [81] (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mulu16_sel/(word) mul16u::a#2 ) [81] (dword) mul16u::mb#0 ← phi( mul16s/(word) mul16u::b#0 mulu16_sel/(word) mul16u::b#1 ) @@ -3405,6 +3441,8 @@ mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4 [89] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 [90] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 to:mul16u::@1 + +(void()) init_irq() init_irq: scope:[init_irq] from main::@8 asm { sei } [92] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -3419,6 +3457,8 @@ init_irq: scope:[init_irq] from main::@8 init_irq::@return: scope:[init_irq] from init_irq [100] return to:@return + +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) bitmap_clear: scope:[bitmap_clear] from main::@10 [101] phi() [102] call memset @@ -3430,6 +3470,8 @@ bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 [105] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [106] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) [106] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) @@ -3451,6 +3493,8 @@ memset::@3: scope:[memset] from memset::@2 [113] *((byte*) memset::dst#2) ← (byte) memset::c#4 [114] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) bitmap_init: scope:[bitmap_init] from main::@9 [115] phi() to:bitmap_init::@1 @@ -3491,6 +3535,8 @@ bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 [136] return to:@return + +(void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max) sin16s_gen2: scope:[sin16s_gen2] from main [137] phi() [138] call div32u16u @@ -3526,6 +3572,8 @@ sin16s_gen2::@5: scope:[sin16s_gen2] from sin16s_gen2::@4 [154] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [155] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 to:sin16s_gen2::@1 + +(signed word()) sin16s((dword) sin16s::x) sin16s: scope:[sin16s] from sin16s_gen2::@2 [156] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 to:sin16s::@4 @@ -3595,6 +3643,8 @@ sin16s::@return: scope:[sin16s] from sin16s::@3 sin16s::@12: scope:[sin16s] from sin16s::@11 [195] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 to:sin16s::@3 + +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 [196] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) [196] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) @@ -3612,6 +3662,8 @@ mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 [204] return to:@return + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from sin16s_gen2 [205] phi() [206] call divr16u @@ -3630,6 +3682,8 @@ div32u16u::@2: scope:[div32u16u] from div32u16u::@1 div32u16u::@return: scope:[div32u16u] from div32u16u::@2 [214] return to:@return + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div32u16u div32u16u::@1 [215] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) [215] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) @@ -3669,6 +3723,8 @@ divr16u::@6: scope:[divr16u] from divr16u::@3 divr16u::@return: scope:[divr16u] from divr16u::@6 [232] return to:@return + +interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from [233] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [234] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 diff --git a/src/test/ref/bitmap-plot-3.cfg b/src/test/ref/bitmap-plot-3.cfg index f9e29082c..761d5b2a0 100644 --- a/src/test/ref/bitmap-plot-3.cfg +++ b/src/test/ref/bitmap-plot-3.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call bitmap_init @@ -45,6 +47,8 @@ main::@7: scope:[main] from main::@2 [21] (byte) main::a#1 ← (byte) main::a#2 + (byte) $20 [22] (byte) main::i#1 ← ++ (byte) main::i#2 to:main::@1 + +(void()) bitmap_line((word) bitmap_line::x1 , (word) bitmap_line::y1 , (word) bitmap_line::x2 , (word) bitmap_line::y2) bitmap_line: scope:[bitmap_line] from main::@2 [23] (word) abs_u16::w#0 ← (word) bitmap_line::x2#0 - (word) bitmap_line::x1#0 [24] call abs_u16 @@ -143,6 +147,8 @@ bitmap_line::@4: scope:[bitmap_line] from bitmap_line::@18 [72] (word) bitmap_plot::x#0 ← (word) bitmap_line::x1#0 [73] call bitmap_plot to:bitmap_line::@return + +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from bitmap_line::@3 bitmap_line::@4 bitmap_line::@6 bitmap_line::@9 [74] (word) bitmap_plot::x#4 ← phi( bitmap_line::@9/(word) bitmap_plot::x#3 bitmap_line::@3/(word) bitmap_plot::x#2 bitmap_line::@4/(word) bitmap_plot::x#0 bitmap_line::@6/(word) bitmap_plot::x#1 ) [74] (byte) bitmap_plot::y#4 ← phi( bitmap_line::@9/(byte) bitmap_plot::y#3 bitmap_line::@3/(byte) bitmap_plot::y#2 bitmap_line::@4/(byte) bitmap_plot::y#0 bitmap_line::@6/(byte) bitmap_plot::y#1 ) @@ -155,6 +161,8 @@ bitmap_plot: scope:[bitmap_plot] from bitmap_line::@3 bitmap_line::@4 bitmap_li bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot [80] return to:@return + +(word()) sgn_u16((word) sgn_u16::w) sgn_u16: scope:[sgn_u16] from bitmap_line::@1 bitmap_line::@14 [81] (word) sgn_u16::w#2 ← phi( bitmap_line::@1/(word) sgn_u16::w#0 bitmap_line::@14/(word) sgn_u16::w#1 ) [82] (byte~) sgn_u16::$0 ← > (word) sgn_u16::w#2 @@ -168,6 +176,8 @@ sgn_u16::@return: scope:[sgn_u16] from sgn_u16 sgn_u16::@1 [86] (word) sgn_u16::return#4 ← phi( sgn_u16::@1/(byte) -1 sgn_u16/(byte) 1 ) [87] return to:@return + +(word()) abs_u16((word) abs_u16::w) abs_u16: scope:[abs_u16] from bitmap_line bitmap_line::@12 [88] (word) abs_u16::w#2 ← phi( bitmap_line/(word) abs_u16::w#0 bitmap_line::@12/(word) abs_u16::w#1 ) [89] (byte~) abs_u16::$0 ← > (word) abs_u16::w#2 @@ -181,6 +191,8 @@ abs_u16::@return: scope:[abs_u16] from abs_u16 abs_u16::@1 [93] (word) abs_u16::return#4 ← phi( abs_u16::@1/(word) abs_u16::return#2 abs_u16/(word) abs_u16::w#2 ) [94] return to:@return + +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) bitmap_clear: scope:[bitmap_clear] from main::@5 [95] phi() [96] call memset @@ -192,6 +204,8 @@ bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 [99] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [100] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) [100] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) @@ -213,6 +227,8 @@ memset::@3: scope:[memset] from memset::@2 [107] *((byte*) memset::dst#2) ← (byte) memset::c#4 [108] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) bitmap_init: scope:[bitmap_init] from main [109] phi() to:bitmap_init::@1 diff --git a/src/test/ref/bitmap-plot-3.log b/src/test/ref/bitmap-plot-3.log index f9819fc07..f703114fa 100644 --- a/src/test/ref/bitmap-plot-3.log +++ b/src/test/ref/bitmap-plot-3.log @@ -98,6 +98,8 @@ CONTROL FLOW GRAPH SSA (byte) BLACK#0 ← (number) 0 (byte) WHITE#0 ← (number) 1 to:@8 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from bitmap_clear bitmap_clear::@1 (byte) memset::c#5 ← phi( bitmap_clear/(byte) memset::c#0 bitmap_clear::@1/(byte) memset::c#1 ) (void*) memset::str#4 ← phi( bitmap_clear/(void*) memset::str#0 bitmap_clear::@1/(void*) memset::str#1 ) @@ -147,6 +149,8 @@ memset::@return: scope:[memset] from memset::@1 (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } to:@46 + +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) bitmap_init: scope:[bitmap_init] from main (byte*) bitmap_init::screen#1 ← phi( main/(byte*) bitmap_init::screen#0 ) (byte*) bitmap_init::gfx#1 ← phi( main/(byte*) bitmap_init::gfx#0 ) @@ -231,6 +235,8 @@ bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@6 (byte*) bitmap_screen#2 ← (byte*) bitmap_screen#6 return to:@return + +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) bitmap_clear: scope:[bitmap_clear] from main::@14 (byte*) bitmap_gfx#12 ← phi( main::@14/(byte*) bitmap_gfx#3 ) (byte*) bitmap_screen#7 ← phi( main::@14/(byte*) bitmap_screen#3 ) @@ -258,6 +264,8 @@ bitmap_clear::@2: scope:[bitmap_clear] from bitmap_clear::@1 bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@2 return to:@return + +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from bitmap_line::@12 bitmap_line::@3 bitmap_line::@4 bitmap_line::@7 (word) bitmap_plot::x#4 ← phi( bitmap_line::@12/(word) bitmap_plot::x#3 bitmap_line::@3/(word) bitmap_plot::x#2 bitmap_line::@4/(word) bitmap_plot::x#0 bitmap_line::@7/(word) bitmap_plot::x#1 ) (byte) bitmap_plot::y#4 ← phi( bitmap_line::@12/(byte) bitmap_plot::y#3 bitmap_line::@3/(byte) bitmap_plot::y#2 bitmap_line::@4/(byte) bitmap_plot::y#0 bitmap_line::@7/(byte) bitmap_plot::y#1 ) @@ -271,6 +279,8 @@ bitmap_plot: scope:[bitmap_plot] from bitmap_line::@12 bitmap_line::@3 bitmap_l bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot return to:@return + +(void()) bitmap_line((word) bitmap_line::x1 , (word) bitmap_line::y1 , (word) bitmap_line::x2 , (word) bitmap_line::y2) bitmap_line: scope:[bitmap_line] from main::@2 (word) bitmap_line::y2#4 ← phi( main::@2/(word) bitmap_line::y2#0 ) (word) bitmap_line::x2#1 ← phi( main::@2/(word) bitmap_line::x2#0 ) @@ -510,6 +520,8 @@ bitmap_line::@14: scope:[bitmap_line] from bitmap_line::@23 (word) bitmap_line::y#2 ← (word) bitmap_line::y#9 + (word) bitmap_line::sy#2 (word) bitmap_line::e1#2 ← (word) bitmap_line::e1#4 - (word) bitmap_line::dx#6 to:bitmap_line::@13 + +(word()) abs_u16((word) abs_u16::w) abs_u16: scope:[abs_u16] from bitmap_line bitmap_line::@16 (word) abs_u16::w#2 ← phi( bitmap_line/(word) abs_u16::w#0 bitmap_line::@16/(word) abs_u16::w#1 ) (byte~) abs_u16::$0 ← > (word) abs_u16::w#2 @@ -531,6 +543,8 @@ abs_u16::@return: scope:[abs_u16] from abs_u16::@1 abs_u16::@3 (word) abs_u16::return#4 ← (word) abs_u16::return#7 return to:@return + +(word()) sgn_u16((word) sgn_u16::w) sgn_u16: scope:[sgn_u16] from bitmap_line::@1 bitmap_line::@18 (word) sgn_u16::w#2 ← phi( bitmap_line::@1/(word) sgn_u16::w#0 bitmap_line::@18/(word) sgn_u16::w#1 ) (byte~) sgn_u16::$0 ← > (word) sgn_u16::w#2 @@ -558,6 +572,8 @@ sgn_u16::@return: scope:[sgn_u16] from sgn_u16::@1 sgn_u16::@3 (byte*~) $0 ← (byte[$180]) SINTAB#0 + (number) $40 (byte*) COSTAB#0 ← (byte*~) $0 to:@47 + +(void()) main() main: scope:[main] from @47 (byte*) COSTAB#9 ← phi( @47/(byte*) COSTAB#10 ) (byte*) bitmap_screen#12 ← phi( @47/(byte*) bitmap_screen#14 ) @@ -1986,6 +2002,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call bitmap_init @@ -2024,6 +2042,8 @@ main::@7: scope:[main] from main::@2 [21] (byte) main::a#1 ← (byte) main::a#2 + (byte) $20 [22] (byte) main::i#1 ← ++ (byte) main::i#2 to:main::@1 + +(void()) bitmap_line((word) bitmap_line::x1 , (word) bitmap_line::y1 , (word) bitmap_line::x2 , (word) bitmap_line::y2) bitmap_line: scope:[bitmap_line] from main::@2 [23] (word) abs_u16::w#0 ← (word) bitmap_line::x2#0 - (word) bitmap_line::x1#0 [24] call abs_u16 @@ -2122,6 +2142,8 @@ bitmap_line::@4: scope:[bitmap_line] from bitmap_line::@18 [72] (word) bitmap_plot::x#0 ← (word) bitmap_line::x1#0 [73] call bitmap_plot to:bitmap_line::@return + +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from bitmap_line::@3 bitmap_line::@4 bitmap_line::@6 bitmap_line::@9 [74] (word) bitmap_plot::x#4 ← phi( bitmap_line::@9/(word) bitmap_plot::x#3 bitmap_line::@3/(word) bitmap_plot::x#2 bitmap_line::@4/(word) bitmap_plot::x#0 bitmap_line::@6/(word) bitmap_plot::x#1 ) [74] (byte) bitmap_plot::y#4 ← phi( bitmap_line::@9/(byte) bitmap_plot::y#3 bitmap_line::@3/(byte) bitmap_plot::y#2 bitmap_line::@4/(byte) bitmap_plot::y#0 bitmap_line::@6/(byte) bitmap_plot::y#1 ) @@ -2134,6 +2156,8 @@ bitmap_plot: scope:[bitmap_plot] from bitmap_line::@3 bitmap_line::@4 bitmap_li bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot [80] return to:@return + +(word()) sgn_u16((word) sgn_u16::w) sgn_u16: scope:[sgn_u16] from bitmap_line::@1 bitmap_line::@14 [81] (word) sgn_u16::w#2 ← phi( bitmap_line::@1/(word) sgn_u16::w#0 bitmap_line::@14/(word) sgn_u16::w#1 ) [82] (byte~) sgn_u16::$0 ← > (word) sgn_u16::w#2 @@ -2147,6 +2171,8 @@ sgn_u16::@return: scope:[sgn_u16] from sgn_u16 sgn_u16::@1 [86] (word) sgn_u16::return#4 ← phi( sgn_u16::@1/(byte) -1 sgn_u16/(byte) 1 ) [87] return to:@return + +(word()) abs_u16((word) abs_u16::w) abs_u16: scope:[abs_u16] from bitmap_line bitmap_line::@12 [88] (word) abs_u16::w#2 ← phi( bitmap_line/(word) abs_u16::w#0 bitmap_line::@12/(word) abs_u16::w#1 ) [89] (byte~) abs_u16::$0 ← > (word) abs_u16::w#2 @@ -2160,6 +2186,8 @@ abs_u16::@return: scope:[abs_u16] from abs_u16 abs_u16::@1 [93] (word) abs_u16::return#4 ← phi( abs_u16::@1/(word) abs_u16::return#2 abs_u16/(word) abs_u16::w#2 ) [94] return to:@return + +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) bitmap_clear: scope:[bitmap_clear] from main::@5 [95] phi() [96] call memset @@ -2171,6 +2199,8 @@ bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 [99] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [100] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) [100] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) @@ -2192,6 +2222,8 @@ memset::@3: scope:[memset] from memset::@2 [107] *((byte*) memset::dst#2) ← (byte) memset::c#4 [108] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) bitmap_init: scope:[bitmap_init] from main [109] phi() to:bitmap_init::@1 diff --git a/src/test/ref/bitmap-plotter.cfg b/src/test/ref/bitmap-plotter.cfg index f0b27a3f3..eef8320cf 100644 --- a/src/test/ref/bitmap-plotter.cfg +++ b/src/test/ref/bitmap-plotter.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BGCOL#0) ← (byte) 0 [5] *((const byte*) FGCOL#0) ← (byte) 0 @@ -28,6 +30,8 @@ main::@2: scope:[main] from main::@1 main::@4: scope:[main] from main::@2 [14] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) to:main::@1 + +(void()) plots() plots: scope:[plots] from main::@2 [15] phi() to:plots::@1 @@ -46,6 +50,8 @@ plots::@2: scope:[plots] from plots::@1 plots::@3: scope:[plots] from plots::@2 [22] (byte) plots::i#1 ← ++ (byte) plots::i#2 to:plots::@1 + +(void()) plot((byte) plot::x , (byte) plot::y) plot: scope:[plot] from plots::@2 [23] (byte~) plot::$6 ← *((const byte[$100]) plot_xhi#0 + (byte) plot::x#0) [24] (byte*) plot::plotter_x#1 ← (byte*) 0 hi= (byte~) plot::$6 @@ -62,6 +68,8 @@ plot: scope:[plot] from plots::@2 plot::@return: scope:[plot] from plot [34] return to:@return + +(void()) init_plot_tables() init_plot_tables: scope:[init_plot_tables] from main::@3 [35] phi() to:init_plot_tables::@1 @@ -105,6 +113,8 @@ init_plot_tables::@4: scope:[init_plot_tables] from init_plot_tables::@3 init_p init_plot_tables::@return: scope:[init_plot_tables] from init_plot_tables::@4 [59] return to:@return + +(void()) init_screen() init_screen: scope:[init_screen] from main [60] phi() to:init_screen::@1 diff --git a/src/test/ref/bitmap-plotter.log b/src/test/ref/bitmap-plotter.log index 3e3db734c..02e5a2e4f 100644 --- a/src/test/ref/bitmap-plotter.log +++ b/src/test/ref/bitmap-plotter.log @@ -44,6 +44,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte*) BITMAP#0 ← ((byte*)) (number) $2000 to:@1 + +(void()) main() main: scope:[main] from @5 *((byte*) BGCOL#0) ← (number) 0 *((byte*) FGCOL#0) ← (number) 0 @@ -85,6 +87,8 @@ main::@return: scope:[main] from main::@7 (byte[]) plots_y#0 ← { (number) $a, (number) $28, (number) $3c, (number) $50, (number) $6e, (number) $50, (number) $3c, (number) $28 } (byte) plots_cnt#0 ← (number) 8 to:@2 + +(void()) plots() plots: scope:[plots] from main::@3 (byte) plots::i#0 ← (number) 0 to:plots::@1 @@ -113,6 +117,8 @@ plots::@return: scope:[plots] from plots::@1 (byte[$100]) plot_yhi#0 ← { fill( $100, 0) } (byte[$100]) plot_bit#0 ← { fill( $100, 0) } to:@5 + +(void()) plot((byte) plot::x , (byte) plot::y) plot: scope:[plot] from plots::@2 (byte) plot::y#1 ← phi( plots::@2/(byte) plot::y#0 ) (byte) plot::x#1 ← phi( plots::@2/(byte) plot::x#0 ) @@ -134,6 +140,8 @@ plot: scope:[plot] from plots::@2 plot::@return: scope:[plot] from plot return to:@return + +(void()) init_plot_tables() init_plot_tables: scope:[init_plot_tables] from main::@5 (byte) init_plot_tables::bits#0 ← (number) $80 (byte) init_plot_tables::x#0 ← (byte) 0 @@ -197,6 +205,8 @@ init_plot_tables::@7: scope:[init_plot_tables] from init_plot_tables::@5 init_plot_tables::@return: scope:[init_plot_tables] from init_plot_tables::@6 return to:@return + +(void()) init_screen() init_screen: scope:[init_screen] from main (byte*) init_screen::b#0 ← (byte*) BITMAP#0 to:init_screen::@1 @@ -780,6 +790,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BGCOL#0) ← (byte) 0 [5] *((const byte*) FGCOL#0) ← (byte) 0 @@ -801,6 +813,8 @@ main::@2: scope:[main] from main::@1 main::@4: scope:[main] from main::@2 [14] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) to:main::@1 + +(void()) plots() plots: scope:[plots] from main::@2 [15] phi() to:plots::@1 @@ -819,6 +833,8 @@ plots::@2: scope:[plots] from plots::@1 plots::@3: scope:[plots] from plots::@2 [22] (byte) plots::i#1 ← ++ (byte) plots::i#2 to:plots::@1 + +(void()) plot((byte) plot::x , (byte) plot::y) plot: scope:[plot] from plots::@2 [23] (byte~) plot::$6 ← *((const byte[$100]) plot_xhi#0 + (byte) plot::x#0) [24] (byte*) plot::plotter_x#1 ← (byte*) 0 hi= (byte~) plot::$6 @@ -835,6 +851,8 @@ plot: scope:[plot] from plots::@2 plot::@return: scope:[plot] from plot [34] return to:@return + +(void()) init_plot_tables() init_plot_tables: scope:[init_plot_tables] from main::@3 [35] phi() to:init_plot_tables::@1 @@ -878,6 +896,8 @@ init_plot_tables::@4: scope:[init_plot_tables] from init_plot_tables::@3 init_p init_plot_tables::@return: scope:[init_plot_tables] from init_plot_tables::@4 [59] return to:@return + +(void()) init_screen() init_screen: scope:[init_screen] from main [60] phi() to:init_screen::@1 diff --git a/src/test/ref/bitwise-not.cfg b/src/test/ref/bitwise-not.cfg index 462a3c50f..63df5391f 100644 --- a/src/test/ref/bitwise-not.cfg +++ b/src/test/ref/bitwise-not.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← ~(byte) 1 to:main::@1 diff --git a/src/test/ref/bitwise-not.log b/src/test/ref/bitwise-not.log index fdbd270ed..1067c2725 100644 --- a/src/test/ref/bitwise-not.log +++ b/src/test/ref/bitwise-not.log @@ -4,6 +4,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 *((byte*) main::SCREEN#0) ← ~(byte) 1 @@ -91,6 +93,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← ~(byte) 1 to:main::@1 diff --git a/src/test/ref/bool-const.cfg b/src/test/ref/bool-const.cfg index c0b684928..953c73e8f 100644 --- a/src/test/ref/bool-const.cfg +++ b/src/test/ref/bool-const.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call bool_const_if @@ -22,6 +24,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [10] return to:@return + +(void()) bool_const_inline() bool_const_inline: scope:[bool_const_inline] from main::@2 [11] phi() to:bool_const_inline::@1 @@ -31,6 +35,8 @@ bool_const_inline::@1: scope:[bool_const_inline] from bool_const_inline bool_const_inline::@return: scope:[bool_const_inline] from bool_const_inline::@1 [13] return to:@return + +(void()) bool_const_vars() bool_const_vars: scope:[bool_const_vars] from main::@1 [14] phi() to:bool_const_vars::@1 @@ -40,6 +46,8 @@ bool_const_vars::@1: scope:[bool_const_vars] from bool_const_vars bool_const_vars::@return: scope:[bool_const_vars] from bool_const_vars::@1 [16] return to:@return + +(void()) bool_const_if() bool_const_if: scope:[bool_const_if] from main [17] phi() to:bool_const_if::@1 diff --git a/src/test/ref/bool-const.log b/src/test/ref/bool-const.log index 08a74b914..630fe2e91 100644 --- a/src/test/ref/bool-const.log +++ b/src/test/ref/bool-const.log @@ -15,6 +15,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@4 + +(void()) main() main: scope:[main] from @4 call bool_const_if to:main::@1 @@ -29,6 +31,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 return to:@return + +(void()) bool_const_if() bool_const_if: scope:[bool_const_if] from main (bool) bool_const_if::b#0 ← true if((bool) bool_const_if::b#0) goto bool_const_if::@1 @@ -42,6 +46,8 @@ bool_const_if::@3: scope:[bool_const_if] from bool_const_if bool_const_if::@return: scope:[bool_const_if] from bool_const_if::@1 bool_const_if::@3 return to:@return + +(void()) bool_const_vars() bool_const_vars: scope:[bool_const_vars] from main::@1 (byte) bool_const_vars::a#0 ← (number) $e (bool~) bool_const_vars::$0 ← (byte) bool_const_vars::a#0 == (number) $f @@ -68,6 +74,8 @@ bool_const_vars::@3: scope:[bool_const_vars] from bool_const_vars bool_const_vars::@return: scope:[bool_const_vars] from bool_const_vars::@1 bool_const_vars::@3 return to:@return + +(void()) bool_const_inline() bool_const_inline: scope:[bool_const_inline] from main::@2 (byte) bool_const_inline::a#0 ← (number) $17 (bool~) bool_const_inline::$0 ← (byte) bool_const_inline::a#0 != (number) $2c @@ -318,6 +326,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call bool_const_if @@ -333,6 +343,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [10] return to:@return + +(void()) bool_const_inline() bool_const_inline: scope:[bool_const_inline] from main::@2 [11] phi() to:bool_const_inline::@1 @@ -342,6 +354,8 @@ bool_const_inline::@1: scope:[bool_const_inline] from bool_const_inline bool_const_inline::@return: scope:[bool_const_inline] from bool_const_inline::@1 [13] return to:@return + +(void()) bool_const_vars() bool_const_vars: scope:[bool_const_vars] from main::@1 [14] phi() to:bool_const_vars::@1 @@ -351,6 +365,8 @@ bool_const_vars::@1: scope:[bool_const_vars] from bool_const_vars bool_const_vars::@return: scope:[bool_const_vars] from bool_const_vars::@1 [16] return to:@return + +(void()) bool_const_if() bool_const_if: scope:[bool_const_if] from main [17] phi() to:bool_const_if::@1 diff --git a/src/test/ref/bool-function.cfg b/src/test/ref/bool-function.cfg index 54a0afd48..f696308b8 100644 --- a/src/test/ref/bool-function.cfg +++ b/src/test/ref/bool-function.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -35,6 +37,8 @@ main::@return: scope:[main] from main::@3 main::@2: scope:[main] from main::@5 [17] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte) '*' to:main::@3 + +(bool()) isSet((byte) isSet::i , (bool) isSet::b) isSet: scope:[isSet] from main::@1 [18] (byte~) isSet::$0 ← (byte) isSet::i#0 & (byte) 8 [19] (bool~) isSet::$1 ← (byte~) isSet::$0 != (byte) 0 diff --git a/src/test/ref/bool-function.log b/src/test/ref/bool-function.log index ebbf85eb8..2f4347125 100644 --- a/src/test/ref/bool-function.log +++ b/src/test/ref/bool-function.log @@ -7,6 +7,8 @@ Culled Empty Block (label) isSet::@1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @2 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -43,6 +45,8 @@ main::@3: scope:[main] from main::@2 main::@4 main::@return: scope:[main] from main::@3 return to:@return + +(bool()) isSet((byte) isSet::i , (bool) isSet::b) isSet: scope:[isSet] from main::@1 (bool) isSet::b#1 ← phi( main::@1/(bool) isSet::b#0 ) (byte) isSet::i#1 ← phi( main::@1/(byte) isSet::i#0 ) @@ -187,6 +191,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -215,6 +221,8 @@ main::@return: scope:[main] from main::@3 main::@2: scope:[main] from main::@5 [17] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte) '*' to:main::@3 + +(bool()) isSet((byte) isSet::i , (bool) isSet::b) isSet: scope:[isSet] from main::@1 [18] (byte~) isSet::$0 ← (byte) isSet::i#0 & (byte) 8 [19] (bool~) isSet::$1 ← (byte~) isSet::$0 != (byte) 0 diff --git a/src/test/ref/bool-ifs-min.cfg b/src/test/ref/bool-ifs-min.cfg index a3fd52baf..f313d2f01 100644 --- a/src/test/ref/bool-ifs-min.cfg +++ b/src/test/ref/bool-ifs-min.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/bool-ifs-min.log b/src/test/ref/bool-ifs-min.log index 71be77c38..bd58f5b30 100644 --- a/src/test/ref/bool-ifs-min.log +++ b/src/test/ref/bool-ifs-min.log @@ -3,6 +3,8 @@ Culled Empty Block (label) main::@4 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -137,6 +139,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/bool-nullpointer-exception.cfg b/src/test/ref/bool-nullpointer-exception.cfg index 3bc534b50..9b3904459 100644 --- a/src/test/ref/bool-nullpointer-exception.cfg +++ b/src/test/ref/bool-nullpointer-exception.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/bool-nullpointer-exception.log b/src/test/ref/bool-nullpointer-exception.log index b3e5f84a1..26df9348d 100644 --- a/src/test/ref/bool-nullpointer-exception.log +++ b/src/test/ref/bool-nullpointer-exception.log @@ -12,6 +12,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (bool) framedone#0 ← true to:@1 + +(void()) main() main: scope:[main] from @1 (bool) framedone#9 ← phi( @1/(bool) framedone#8 ) to:main::@1 @@ -116,6 +118,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/bool-pointer.cfg b/src/test/ref/bool-pointer.cfg index 1a43fb6d8..070135a43 100644 --- a/src/test/ref/bool-pointer.cfg +++ b/src/test/ref/bool-pointer.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((bool*) 1024) ← true [5] *((bool*) 1024+(byte) 1) ← false diff --git a/src/test/ref/bool-pointer.log b/src/test/ref/bool-pointer.log index 38b05ec07..793a607b0 100644 --- a/src/test/ref/bool-pointer.log +++ b/src/test/ref/bool-pointer.log @@ -3,6 +3,8 @@ Culled Empty Block (label) main::@1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (bool*) main::bscreen#0 ← ((bool*)) (number) $400 *((bool*) main::bscreen#0 + (number) 0) ← true @@ -111,6 +113,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((bool*) 1024) ← true [5] *((bool*) 1024+(byte) 1) ← false diff --git a/src/test/ref/bool-vars.cfg b/src/test/ref/bool-vars.cfg index 402c02d77..c3088c0c2 100644 --- a/src/test/ref/bool-vars.cfg +++ b/src/test/ref/bool-vars.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call bool_and @@ -26,6 +28,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [12] return to:@return + +(void()) bool_complex() bool_complex: scope:[bool_complex] from main::@3 [13] phi() to:bool_complex::@1 @@ -58,6 +62,8 @@ bool_complex::@return: scope:[bool_complex] from bool_complex::@3 bool_complex::@4: scope:[bool_complex] from bool_complex::@5 bool_complex::@7 [26] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) ' ' to:bool_complex::@3 + +(void()) bool_not() bool_not: scope:[bool_not] from main::@2 [27] phi() to:bool_not::@1 @@ -82,6 +88,8 @@ bool_not::@return: scope:[bool_not] from bool_not::@3 bool_not::@4: scope:[bool_not] from bool_not::@1 bool_not::@5 [36] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) ' ' to:bool_not::@3 + +(void()) bool_or() bool_or: scope:[bool_or] from main::@1 [37] phi() to:bool_or::@1 @@ -106,6 +114,8 @@ bool_or::@return: scope:[bool_or] from bool_or::@3 bool_or::@2: scope:[bool_or] from bool_or::@1 bool_or::@5 [46] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) '*' to:bool_or::@3 + +(void()) bool_and() bool_and: scope:[bool_and] from main [47] phi() to:bool_and::@1 diff --git a/src/test/ref/bool-vars.log b/src/test/ref/bool-vars.log index d2fab5780..7f37c0ac0 100644 --- a/src/test/ref/bool-vars.log +++ b/src/test/ref/bool-vars.log @@ -14,6 +14,8 @@ Culled Empty Block (label) bool_complex::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@5 + +(void()) main() main: scope:[main] from @5 call bool_and to:main::@1 @@ -31,6 +33,8 @@ main::@4: scope:[main] from main::@3 main::@return: scope:[main] from main::@4 return to:@return + +(void()) bool_and() bool_and: scope:[bool_and] from main (byte*) bool_and::screen#0 ← ((byte*)) (number) $400 (byte) bool_and::i#0 ← (byte) 0 @@ -63,6 +67,8 @@ bool_and::@3: scope:[bool_and] from bool_and::@2 bool_and::@4 bool_and::@return: scope:[bool_and] from bool_and::@3 return to:@return + +(void()) bool_or() bool_or: scope:[bool_or] from main::@1 (byte*) bool_or::screen#0 ← ((byte*)) (number) $428 (byte) bool_or::i#0 ← (byte) 0 @@ -95,6 +101,8 @@ bool_or::@3: scope:[bool_or] from bool_or::@2 bool_or::@4 bool_or::@return: scope:[bool_or] from bool_or::@3 return to:@return + +(void()) bool_not() bool_not: scope:[bool_not] from main::@2 (byte*) bool_not::screen#0 ← ((byte*)) (number) $450 (byte) bool_not::i#0 ← (byte) 0 @@ -128,6 +136,8 @@ bool_not::@3: scope:[bool_not] from bool_not::@2 bool_not::@4 bool_not::@return: scope:[bool_not] from bool_not::@3 return to:@return + +(void()) bool_complex() bool_complex: scope:[bool_complex] from main::@3 (byte*) bool_complex::screen#0 ← ((byte*)) (number) $478 (byte) bool_complex::i#0 ← (byte) 0 @@ -501,6 +511,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call bool_and @@ -520,6 +532,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [12] return to:@return + +(void()) bool_complex() bool_complex: scope:[bool_complex] from main::@3 [13] phi() to:bool_complex::@1 @@ -552,6 +566,8 @@ bool_complex::@return: scope:[bool_complex] from bool_complex::@3 bool_complex::@4: scope:[bool_complex] from bool_complex::@5 bool_complex::@7 [26] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) ' ' to:bool_complex::@3 + +(void()) bool_not() bool_not: scope:[bool_not] from main::@2 [27] phi() to:bool_not::@1 @@ -576,6 +592,8 @@ bool_not::@return: scope:[bool_not] from bool_not::@3 bool_not::@4: scope:[bool_not] from bool_not::@1 bool_not::@5 [36] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) ' ' to:bool_not::@3 + +(void()) bool_or() bool_or: scope:[bool_or] from main::@1 [37] phi() to:bool_or::@1 @@ -600,6 +618,8 @@ bool_or::@return: scope:[bool_or] from bool_or::@3 bool_or::@2: scope:[bool_or] from bool_or::@1 bool_or::@5 [46] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) '*' to:bool_or::@3 + +(void()) bool_and() bool_and: scope:[bool_and] from main [47] phi() to:bool_and::@1 diff --git a/src/test/ref/bresenham.cfg b/src/test/ref/bresenham.cfg index d4a98095a..9ff3893d3 100644 --- a/src/test/ref/bresenham.cfg +++ b/src/test/ref/bresenham.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/bresenham.log b/src/test/ref/bresenham.log index 57c1f9486..c581d1e3d 100644 --- a/src/test/ref/bresenham.log +++ b/src/test/ref/bresenham.log @@ -10,6 +10,8 @@ CONTROL FLOW GRAPH SSA (byte) STAR#0 ← (number) $51 (byte[$28*$19]) SCREEN#0 ← ((byte[$28*$19])) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::x0#0 ← (number) 4 (byte) main::y0#0 ← (number) 4 @@ -316,6 +318,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/bresenhamarr.cfg b/src/test/ref/bresenhamarr.cfg index 0925f70a7..bb36ac73d 100644 --- a/src/test/ref/bresenhamarr.cfg +++ b/src/test/ref/bresenhamarr.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/bresenhamarr.log b/src/test/ref/bresenhamarr.log index 2fee66b84..3e34b16ac 100644 --- a/src/test/ref/bresenhamarr.log +++ b/src/test/ref/bresenhamarr.log @@ -8,6 +8,8 @@ Culled Empty Block (label) main::@4 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::STAR#0 ← (number) $51 (byte[$28*$19]) main::screen#0 ← ((byte[$28*$19])) (number) $400 @@ -322,6 +324,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/c-types.cfg b/src/test/ref/c-types.cfg index 279969969..8840c6291 100644 --- a/src/test/ref/c-types.cfg +++ b/src/test/ref/c-types.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -30,6 +32,8 @@ main::@4: scope:[main] from main::@3 main::@return: scope:[main] from main::@4 [14] return to:@return + +(void()) testLong() testLong: scope:[testLong] from main::@4 [15] (byte*~) print_char_cursor#162 ← (byte*) print_line_cursor#1 [16] call print_str @@ -61,6 +65,8 @@ testLong::@6: scope:[testLong] from testLong::@5 testLong::@return: scope:[testLong] from testLong::@6 [29] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from testChar::@6 testInt::@6 testLong::@6 testShort::@6 [30] (byte*) print_line_cursor#39 ← phi( testChar::@6/(byte*) 1024 testInt::@6/(byte*) print_line_cursor#1 testLong::@6/(byte*) print_line_cursor#1 testShort::@6/(byte*) print_line_cursor#1 ) to:print_ln::@1 @@ -72,6 +78,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [34] return to:@return + +(void()) print_sdword((signed dword) print_sdword::dw) print_sdword: scope:[print_sdword] from testLong::@3 testLong::@5 [35] (signed dword) print_sdword::dw#3 ← phi( testLong::@3/(const signed dword) testLong::n#0 testLong::@5/(const signed dword) testLong::s#0 ) [36] if((signed dword) print_sdword::dw#3<(signed byte) 0) goto print_sdword::@1 @@ -95,6 +103,8 @@ print_sdword::@1: scope:[print_sdword] from print_sdword print_sdword::@4: scope:[print_sdword] from print_sdword::@1 [45] (signed dword) print_sdword::dw#0 ← - (signed dword) print_sdword::dw#3 to:print_sdword::@2 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sdword::@1 print_sdword::@3 print_sword::@1 print_sword::@3 testChar::@2 testChar::@4 testInt::@2 testInt::@4 testLong::@2 testLong::@4 testShort::@2 testShort::@4 [46] (byte*) print_char_cursor#94 ← phi( print_byte/(byte*) print_char_cursor#149 print_byte::@1/(byte*) print_char_cursor#26 print_sbyte::@1/(byte*) print_char_cursor#26 print_sdword::@1/(byte*) print_char_cursor#26 print_sdword::@3/(byte*) print_char_cursor#26 print_sword::@1/(byte*) print_char_cursor#26 print_sword::@3/(byte*) print_char_cursor#26 testChar::@2/(byte*) print_char_cursor#26 testChar::@4/(byte*) print_char_cursor#26 testInt::@2/(byte*) print_char_cursor#26 testInt::@4/(byte*) print_char_cursor#26 testLong::@2/(byte*) print_char_cursor#26 testLong::@4/(byte*) print_char_cursor#26 testShort::@2/(byte*) print_char_cursor#26 testShort::@4/(byte*) print_char_cursor#26 ) [46] (byte) print_char::ch#16 ← phi( print_byte/(byte) print_char::ch#6 print_byte::@1/(byte) print_char::ch#7 print_sbyte::@1/(byte) '-' print_sdword::@1/(byte) '-' print_sdword::@3/(byte) ' ' print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' testChar::@2/(byte) ' ' testChar::@4/(byte) ' ' testInt::@2/(byte) ' ' testInt::@4/(byte) ' ' testLong::@2/(byte) ' ' testLong::@4/(byte) ' ' testShort::@2/(byte) ' ' testShort::@4/(byte) ' ' ) @@ -104,6 +114,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 p print_char::@return: scope:[print_char] from print_char [49] return to:@return + +(void()) print_dword((dword) print_dword::dw) print_dword: scope:[print_dword] from print_sdword::@2 testLong::@1 [50] (byte*) print_char_cursor#145 ← phi( print_sdword::@2/(byte*) print_char_cursor#26 testLong::@1/(byte*) print_char_cursor#136 ) [50] (dword) print_dword::dw#2 ← phi( print_sdword::@2/(dword) print_dword::dw#0 testLong::@1/(const dword) testLong::u#0 ) @@ -117,6 +129,8 @@ print_dword::@1: scope:[print_dword] from print_dword print_dword::@return: scope:[print_dword] from print_dword::@1 [55] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_dword print_dword::@1 print_sword::@2 testInt::@1 testShort::@1 [56] (byte*) print_char_cursor#144 ← phi( print_dword/(byte*) print_char_cursor#145 print_dword::@1/(byte*) print_char_cursor#26 print_sword::@2/(byte*) print_char_cursor#26 testInt::@1/(byte*) print_char_cursor#136 testShort::@1/(byte*) print_char_cursor#136 ) [56] (word) print_word::w#5 ← phi( print_dword/(word) print_word::w#1 print_dword::@1/(word) print_word::w#2 print_sword::@2/(word) print_word::w#0 testInt::@1/(const word) testInt::u#0 testShort::@1/(const word) testShort::u#0 ) @@ -130,6 +144,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [61] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_sbyte::@2 print_word print_word::@1 testChar::@1 testChar::@3 [62] (byte*) print_char_cursor#149 ← phi( print_sbyte::@2/(byte*) print_char_cursor#26 print_word/(byte*) print_char_cursor#144 print_word::@1/(byte*) print_char_cursor#26 testChar::@1/(byte*) print_char_cursor#136 testChar::@3/(byte*) print_char_cursor#26 ) [62] (byte) print_byte::b#5 ← phi( print_sbyte::@2/(byte)(const signed byte) print_sbyte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 testChar::@1/(const byte) testChar::u#0 testChar::@3/(const byte) testChar::n#0 ) @@ -145,6 +161,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [69] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from testChar testInt testLong testShort [70] (byte*) print_char_cursor#156 ← phi( testChar/(byte*) 1024 testInt/(byte*~) print_char_cursor#161 testLong/(byte*~) print_char_cursor#162 testShort/(byte*~) print_char_cursor#163 ) [70] (byte*) print_str::str#7 ← phi( testChar/(const string) testChar::str testInt/(const string) testInt::str testLong/(const string) testLong::str testShort/(const string) testShort::str ) @@ -162,6 +180,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [75] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#136 [76] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#5 to:print_str::@1 + +(void()) testInt() testInt: scope:[testInt] from main::@3 [77] (byte*~) print_char_cursor#161 ← (byte*) print_line_cursor#1 [78] call print_str @@ -193,6 +213,8 @@ testInt::@6: scope:[testInt] from testInt::@5 testInt::@return: scope:[testInt] from testInt::@6 [91] return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from testInt::@3 testInt::@5 testShort::@3 testShort::@5 [92] (signed word) print_sword::w#10 ← phi( testInt::@3/(const signed word) testInt::n#0 testInt::@5/(const signed word) testInt::s#0 testShort::@3/(const signed word) testShort::n#0 testShort::@5/(const signed word) testShort::s#0 ) [93] if((signed word) print_sword::w#10<(signed byte) 0) goto print_sword::@1 @@ -216,6 +238,8 @@ print_sword::@1: scope:[print_sword] from print_sword print_sword::@4: scope:[print_sword] from print_sword::@1 [102] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#10 to:print_sword::@2 + +(void()) testShort() testShort: scope:[testShort] from main::@2 [103] (byte*~) print_char_cursor#163 ← (byte*) print_line_cursor#1 [104] call print_str @@ -247,6 +271,8 @@ testShort::@6: scope:[testShort] from testShort::@5 testShort::@return: scope:[testShort] from testShort::@6 [117] return to:@return + +(void()) testChar() testChar: scope:[testChar] from main::@1 [118] phi() [119] call print_str @@ -278,6 +304,8 @@ testChar::@6: scope:[testChar] from testChar::@5 testChar::@return: scope:[testChar] from testChar::@6 [132] return to:@return + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from testChar::@5 [133] phi() to:print_sbyte::@1 @@ -292,6 +320,8 @@ print_sbyte::@2: scope:[print_sbyte] from print_sbyte::@1 print_sbyte::@return: scope:[print_sbyte] from print_sbyte::@2 [138] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main [139] phi() [140] call memset @@ -299,6 +329,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [141] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [142] phi() to:memset::@1 diff --git a/src/test/ref/c-types.log b/src/test/ref/c-types.log index a49bb883f..66ca15abc 100644 --- a/src/test/ref/c-types.log +++ b/src/test/ref/c-types.log @@ -76,6 +76,8 @@ Culled Empty Block (label) @40 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@12 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -123,6 +125,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@29 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from testChar testInt testLong testShort (byte*) print_char_cursor#156 ← phi( testChar/(byte*) print_char_cursor#151 testInt/(byte*) print_char_cursor#153 testLong/(byte*) print_char_cursor#154 testShort/(byte*) print_char_cursor#152 ) (byte*) print_str::str#7 ← phi( testChar/(byte*) print_str::str#1 testInt/(byte*) print_str::str#3 testLong/(byte*) print_str::str#4 testShort/(byte*) print_str::str#2 ) @@ -145,6 +149,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#70 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from testChar::@6 testInt::@6 testLong::@6 testShort::@6 (byte*) print_char_cursor#137 ← phi( testChar::@6/(byte*) print_char_cursor#41 testInt::@6/(byte*) print_char_cursor#57 testLong::@6/(byte*) print_char_cursor#65 testShort::@6/(byte*) print_char_cursor#49 ) (byte*) print_line_cursor#39 ← phi( testChar::@6/(byte*) print_line_cursor#41 testInt::@6/(byte*) print_line_cursor#43 testLong::@6/(byte*) print_line_cursor#44 testShort::@6/(byte*) print_line_cursor#42 ) @@ -168,6 +174,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#72 return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from testInt::@3 testInt::@5 testShort::@3 testShort::@5 (byte*) print_char_cursor#157 ← phi( testInt::@3/(byte*) print_char_cursor#54 testInt::@5/(byte*) print_char_cursor#56 testShort::@3/(byte*) print_char_cursor#46 testShort::@5/(byte*) print_char_cursor#48 ) (signed word) print_sword::w#5 ← phi( testInt::@3/(signed word) print_sword::w#3 testInt::@5/(signed word) print_sword::w#4 testShort::@3/(signed word) print_sword::w#1 testShort::@5/(signed word) print_sword::w#2 ) @@ -214,6 +222,8 @@ print_sword::@return: scope:[print_sword] from print_sword::@7 (byte*) print_char_cursor#8 ← (byte*) print_char_cursor#76 return to:@return + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from testChar::@5 (byte*) print_char_cursor#158 ← phi( testChar::@5/(byte*) print_char_cursor#40 ) (signed byte) print_sbyte::b#2 ← phi( testChar::@5/(signed byte) print_sbyte::b#1 ) @@ -260,6 +270,8 @@ print_sbyte::@return: scope:[print_sbyte] from print_sbyte::@7 (byte*) print_char_cursor#12 ← (byte*) print_char_cursor#80 return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_dword print_dword::@1 print_sword::@2 testInt::@1 testShort::@1 (byte*) print_char_cursor#144 ← phi( print_dword/(byte*) print_char_cursor#145 print_dword::@1/(byte*) print_char_cursor#16 print_sword::@2/(byte*) print_char_cursor#140 testInt::@1/(byte*) print_char_cursor#52 testShort::@1/(byte*) print_char_cursor#44 ) (word) print_word::w#5 ← phi( print_dword/(word) print_word::w#1 print_dword::@1/(word) print_word::w#2 print_sword::@2/(word) print_word::w#0 testInt::@1/(word) print_word::w#4 testShort::@1/(word) print_word::w#3 ) @@ -284,6 +296,8 @@ print_word::@return: scope:[print_word] from print_word::@2 (byte*) print_char_cursor#15 ← (byte*) print_char_cursor#83 return to:@return + +(void()) print_dword((dword) print_dword::dw) print_dword: scope:[print_dword] from print_sdword::@2 testLong::@1 (byte*) print_char_cursor#145 ← phi( print_sdword::@2/(byte*) print_char_cursor#148 testLong::@1/(byte*) print_char_cursor#60 ) (dword) print_dword::dw#2 ← phi( print_sdword::@2/(dword) print_dword::dw#0 testLong::@1/(dword) print_dword::dw#1 ) @@ -308,6 +322,8 @@ print_dword::@return: scope:[print_dword] from print_dword::@2 (byte*) print_char_cursor#18 ← (byte*) print_char_cursor#86 return to:@return + +(void()) print_sdword((signed dword) print_sdword::dw) print_sdword: scope:[print_sdword] from testLong::@3 testLong::@5 (byte*) print_char_cursor#159 ← phi( testLong::@3/(byte*) print_char_cursor#62 testLong::@5/(byte*) print_char_cursor#64 ) (signed dword) print_sdword::dw#3 ← phi( testLong::@3/(signed dword) print_sdword::dw#1 testLong::@5/(signed dword) print_sdword::dw#2 ) @@ -360,6 +376,8 @@ print_sdword::@return: scope:[print_sdword] from print_sdword::@7 (byte*) print_line_cursor#50 ← phi( @12/(byte*) print_line_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $0 to:@41 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_sbyte::@2 print_word print_word::@1 testChar::@1 testChar::@3 (byte*) print_char_cursor#149 ← phi( print_sbyte::@2/(byte*) print_char_cursor#143 print_word/(byte*) print_char_cursor#144 print_word::@1/(byte*) print_char_cursor#13 testChar::@1/(byte*) print_char_cursor#36 testChar::@3/(byte*) print_char_cursor#38 ) (byte) print_byte::b#5 ← phi( print_sbyte::@2/(byte) print_byte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 testChar::@1/(byte) print_byte::b#3 testChar::@3/(byte) print_byte::b#4 ) @@ -384,6 +402,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#25 ← (byte*) print_char_cursor#93 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sbyte::@3 print_sdword::@1 print_sdword::@3 print_sword::@1 print_sword::@3 testChar::@2 testChar::@4 testInt::@2 testInt::@4 testLong::@2 testLong::@4 testShort::@2 testShort::@4 (byte*) print_char_cursor#94 ← phi( print_byte/(byte*) print_char_cursor#149 print_byte::@1/(byte*) print_char_cursor#23 print_sbyte::@1/(byte*) print_char_cursor#141 print_sbyte::@3/(byte*) print_char_cursor#142 print_sdword::@1/(byte*) print_char_cursor#146 print_sdword::@3/(byte*) print_char_cursor#147 print_sword::@1/(byte*) print_char_cursor#138 print_sword::@3/(byte*) print_char_cursor#139 testChar::@2/(byte*) print_char_cursor#37 testChar::@4/(byte*) print_char_cursor#39 testInt::@2/(byte*) print_char_cursor#53 testInt::@4/(byte*) print_char_cursor#55 testLong::@2/(byte*) print_char_cursor#61 testLong::@4/(byte*) print_char_cursor#63 testShort::@2/(byte*) print_char_cursor#45 testShort::@4/(byte*) print_char_cursor#47 ) (byte) print_char::ch#16 ← phi( print_byte/(byte) print_char::ch#6 print_byte::@1/(byte) print_char::ch#7 print_sbyte::@1/(byte) print_char::ch#2 print_sbyte::@3/(byte) print_char::ch#3 print_sdword::@1/(byte) print_char::ch#4 print_sdword::@3/(byte) print_char::ch#5 print_sword::@1/(byte) print_char::ch#0 print_sword::@3/(byte) print_char::ch#1 testChar::@2/(byte) print_char::ch#8 testChar::@4/(byte) print_char::ch#9 testInt::@2/(byte) print_char::ch#12 testInt::@4/(byte) print_char::ch#13 testLong::@2/(byte) print_char::ch#14 testLong::@4/(byte) print_char::ch#15 testShort::@2/(byte) print_char::ch#10 testShort::@4/(byte) print_char::ch#11 ) @@ -395,6 +415,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#27 ← (byte*) print_char_cursor#95 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main (byte*) print_screen#1 ← phi( main/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -415,6 +437,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte*) print_char_cursor#29 ← (byte*) print_char_cursor#96 return to:@return + +(void()) main() main: scope:[main] from @41 (byte*) print_char_cursor#150 ← phi( @41/(byte*) print_char_cursor#155 ) (byte*) print_line_cursor#40 ← phi( @41/(byte*) print_line_cursor#45 ) @@ -462,6 +486,8 @@ main::@return: scope:[main] from main::@5 (byte*) print_char_cursor#35 ← (byte*) print_char_cursor#102 return to:@return + +(void()) testChar() testChar: scope:[testChar] from main::@1 (byte*) print_line_cursor#67 ← phi( main::@1/(byte*) print_line_cursor#5 ) (byte*) print_char_cursor#151 ← phi( main::@1/(byte*) print_char_cursor#30 ) @@ -525,6 +551,8 @@ testChar::@return: scope:[testChar] from testChar::@7 (byte*) print_line_cursor#12 ← (byte*) print_line_cursor#31 return to:@return + +(void()) testShort() testShort: scope:[testShort] from main::@2 (byte*) print_line_cursor#68 ← phi( main::@2/(byte*) print_line_cursor#6 ) (byte*) print_char_cursor#152 ← phi( main::@2/(byte*) print_char_cursor#31 ) @@ -588,6 +616,8 @@ testShort::@return: scope:[testShort] from testShort::@7 (byte*) print_line_cursor#14 ← (byte*) print_line_cursor#33 return to:@return + +(void()) testInt() testInt: scope:[testInt] from main::@3 (byte*) print_line_cursor#69 ← phi( main::@3/(byte*) print_line_cursor#7 ) (byte*) print_char_cursor#153 ← phi( main::@3/(byte*) print_char_cursor#32 ) @@ -651,6 +681,8 @@ testInt::@return: scope:[testInt] from testInt::@7 (byte*) print_line_cursor#16 ← (byte*) print_line_cursor#35 return to:@return + +(void()) testLong() testLong: scope:[testLong] from main::@4 (byte*) print_line_cursor#70 ← phi( main::@4/(byte*) print_line_cursor#8 ) (byte*) print_char_cursor#154 ← phi( main::@4/(byte*) print_char_cursor#33 ) @@ -1867,6 +1899,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -1890,6 +1924,8 @@ main::@4: scope:[main] from main::@3 main::@return: scope:[main] from main::@4 [14] return to:@return + +(void()) testLong() testLong: scope:[testLong] from main::@4 [15] (byte*~) print_char_cursor#162 ← (byte*) print_line_cursor#1 [16] call print_str @@ -1921,6 +1957,8 @@ testLong::@6: scope:[testLong] from testLong::@5 testLong::@return: scope:[testLong] from testLong::@6 [29] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from testChar::@6 testInt::@6 testLong::@6 testShort::@6 [30] (byte*) print_line_cursor#39 ← phi( testChar::@6/(byte*) 1024 testInt::@6/(byte*) print_line_cursor#1 testLong::@6/(byte*) print_line_cursor#1 testShort::@6/(byte*) print_line_cursor#1 ) to:print_ln::@1 @@ -1932,6 +1970,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [34] return to:@return + +(void()) print_sdword((signed dword) print_sdword::dw) print_sdword: scope:[print_sdword] from testLong::@3 testLong::@5 [35] (signed dword) print_sdword::dw#3 ← phi( testLong::@3/(const signed dword) testLong::n#0 testLong::@5/(const signed dword) testLong::s#0 ) [36] if((signed dword) print_sdword::dw#3<(signed byte) 0) goto print_sdword::@1 @@ -1955,6 +1995,8 @@ print_sdword::@1: scope:[print_sdword] from print_sdword print_sdword::@4: scope:[print_sdword] from print_sdword::@1 [45] (signed dword) print_sdword::dw#0 ← - (signed dword) print_sdword::dw#3 to:print_sdword::@2 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sdword::@1 print_sdword::@3 print_sword::@1 print_sword::@3 testChar::@2 testChar::@4 testInt::@2 testInt::@4 testLong::@2 testLong::@4 testShort::@2 testShort::@4 [46] (byte*) print_char_cursor#94 ← phi( print_byte/(byte*) print_char_cursor#149 print_byte::@1/(byte*) print_char_cursor#26 print_sbyte::@1/(byte*) print_char_cursor#26 print_sdword::@1/(byte*) print_char_cursor#26 print_sdword::@3/(byte*) print_char_cursor#26 print_sword::@1/(byte*) print_char_cursor#26 print_sword::@3/(byte*) print_char_cursor#26 testChar::@2/(byte*) print_char_cursor#26 testChar::@4/(byte*) print_char_cursor#26 testInt::@2/(byte*) print_char_cursor#26 testInt::@4/(byte*) print_char_cursor#26 testLong::@2/(byte*) print_char_cursor#26 testLong::@4/(byte*) print_char_cursor#26 testShort::@2/(byte*) print_char_cursor#26 testShort::@4/(byte*) print_char_cursor#26 ) [46] (byte) print_char::ch#16 ← phi( print_byte/(byte) print_char::ch#6 print_byte::@1/(byte) print_char::ch#7 print_sbyte::@1/(byte) '-' print_sdword::@1/(byte) '-' print_sdword::@3/(byte) ' ' print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' testChar::@2/(byte) ' ' testChar::@4/(byte) ' ' testInt::@2/(byte) ' ' testInt::@4/(byte) ' ' testLong::@2/(byte) ' ' testLong::@4/(byte) ' ' testShort::@2/(byte) ' ' testShort::@4/(byte) ' ' ) @@ -1964,6 +2006,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 p print_char::@return: scope:[print_char] from print_char [49] return to:@return + +(void()) print_dword((dword) print_dword::dw) print_dword: scope:[print_dword] from print_sdword::@2 testLong::@1 [50] (byte*) print_char_cursor#145 ← phi( print_sdword::@2/(byte*) print_char_cursor#26 testLong::@1/(byte*) print_char_cursor#136 ) [50] (dword) print_dword::dw#2 ← phi( print_sdword::@2/(dword) print_dword::dw#0 testLong::@1/(const dword) testLong::u#0 ) @@ -1977,6 +2021,8 @@ print_dword::@1: scope:[print_dword] from print_dword print_dword::@return: scope:[print_dword] from print_dword::@1 [55] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_dword print_dword::@1 print_sword::@2 testInt::@1 testShort::@1 [56] (byte*) print_char_cursor#144 ← phi( print_dword/(byte*) print_char_cursor#145 print_dword::@1/(byte*) print_char_cursor#26 print_sword::@2/(byte*) print_char_cursor#26 testInt::@1/(byte*) print_char_cursor#136 testShort::@1/(byte*) print_char_cursor#136 ) [56] (word) print_word::w#5 ← phi( print_dword/(word) print_word::w#1 print_dword::@1/(word) print_word::w#2 print_sword::@2/(word) print_word::w#0 testInt::@1/(const word) testInt::u#0 testShort::@1/(const word) testShort::u#0 ) @@ -1990,6 +2036,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [61] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_sbyte::@2 print_word print_word::@1 testChar::@1 testChar::@3 [62] (byte*) print_char_cursor#149 ← phi( print_sbyte::@2/(byte*) print_char_cursor#26 print_word/(byte*) print_char_cursor#144 print_word::@1/(byte*) print_char_cursor#26 testChar::@1/(byte*) print_char_cursor#136 testChar::@3/(byte*) print_char_cursor#26 ) [62] (byte) print_byte::b#5 ← phi( print_sbyte::@2/(byte)(const signed byte) print_sbyte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 testChar::@1/(const byte) testChar::u#0 testChar::@3/(const byte) testChar::n#0 ) @@ -2005,6 +2053,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [69] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from testChar testInt testLong testShort [70] (byte*) print_char_cursor#156 ← phi( testChar/(byte*) 1024 testInt/(byte*~) print_char_cursor#161 testLong/(byte*~) print_char_cursor#162 testShort/(byte*~) print_char_cursor#163 ) [70] (byte*) print_str::str#7 ← phi( testChar/(const string) testChar::str testInt/(const string) testInt::str testLong/(const string) testLong::str testShort/(const string) testShort::str ) @@ -2022,6 +2072,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [75] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#136 [76] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#5 to:print_str::@1 + +(void()) testInt() testInt: scope:[testInt] from main::@3 [77] (byte*~) print_char_cursor#161 ← (byte*) print_line_cursor#1 [78] call print_str @@ -2053,6 +2105,8 @@ testInt::@6: scope:[testInt] from testInt::@5 testInt::@return: scope:[testInt] from testInt::@6 [91] return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from testInt::@3 testInt::@5 testShort::@3 testShort::@5 [92] (signed word) print_sword::w#10 ← phi( testInt::@3/(const signed word) testInt::n#0 testInt::@5/(const signed word) testInt::s#0 testShort::@3/(const signed word) testShort::n#0 testShort::@5/(const signed word) testShort::s#0 ) [93] if((signed word) print_sword::w#10<(signed byte) 0) goto print_sword::@1 @@ -2076,6 +2130,8 @@ print_sword::@1: scope:[print_sword] from print_sword print_sword::@4: scope:[print_sword] from print_sword::@1 [102] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#10 to:print_sword::@2 + +(void()) testShort() testShort: scope:[testShort] from main::@2 [103] (byte*~) print_char_cursor#163 ← (byte*) print_line_cursor#1 [104] call print_str @@ -2107,6 +2163,8 @@ testShort::@6: scope:[testShort] from testShort::@5 testShort::@return: scope:[testShort] from testShort::@6 [117] return to:@return + +(void()) testChar() testChar: scope:[testChar] from main::@1 [118] phi() [119] call print_str @@ -2138,6 +2196,8 @@ testChar::@6: scope:[testChar] from testChar::@5 testChar::@return: scope:[testChar] from testChar::@6 [132] return to:@return + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from testChar::@5 [133] phi() to:print_sbyte::@1 @@ -2152,6 +2212,8 @@ print_sbyte::@2: scope:[print_sbyte] from print_sbyte::@1 print_sbyte::@return: scope:[print_sbyte] from print_sbyte::@2 [138] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main [139] phi() [140] call memset @@ -2159,6 +2221,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [141] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [142] phi() to:memset::@1 diff --git a/src/test/ref/c64dtv-8bppcharstretch.cfg b/src/test/ref/c64dtv-8bppcharstretch.cfg index 5d2d49567..b949c2fec 100644 --- a/src/test/ref/c64dtv-8bppcharstretch.cfg +++ b/src/test/ref/c64dtv-8bppcharstretch.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -61,6 +63,8 @@ main::@5: scope:[main] from main::@4 main::@5 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } [43] if((byte) main::rst#1!=(byte) $f2) goto main::@5 to:main::@2 + +(void()) gfx_init() gfx_init: scope:[gfx_init] from main [44] phi() [45] call gfx_init_screen0 @@ -72,6 +76,8 @@ gfx_init::@1: scope:[gfx_init] from gfx_init gfx_init::@return: scope:[gfx_init] from gfx_init::@1 [48] return to:@return + +(void()) gfx_init_plane_charset8() gfx_init_plane_charset8: scope:[gfx_init_plane_charset8] from gfx_init::@1 [49] phi() [50] call dtvSetCpuBankSegment1 @@ -128,6 +134,8 @@ gfx_init_plane_charset8::@8: scope:[gfx_init_plane_charset8] from gfx_init_plan gfx_init_plane_charset8::@return: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@8 [73] return to:@return + +(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_charset8 gfx_init_plane_charset8::@8 [74] (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 ← phi( gfx_init_plane_charset8/(const byte) gfx_init_plane_charset8::gfxbCpuBank#0 gfx_init_plane_charset8::@8/(byte)(number) $4000/(number) $4000 ) [75] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 @@ -136,6 +144,8 @@ dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_charse dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1 [77] return to:@return + +(void()) gfx_init_screen0() gfx_init_screen0: scope:[gfx_init_screen0] from gfx_init [78] phi() to:gfx_init_screen0::@1 diff --git a/src/test/ref/c64dtv-8bppcharstretch.log b/src/test/ref/c64dtv-8bppcharstretch.log index 403ad0bc6..78b84cdf9 100644 --- a/src/test/ref/c64dtv-8bppcharstretch.log +++ b/src/test/ref/c64dtv-8bppcharstretch.log @@ -62,6 +62,8 @@ CONTROL FLOW GRAPH SSA (byte*) DTV_PLANEB_MODULO_LO#0 ← ((byte*)) (number) $d047 (byte*) DTV_PLANEB_MODULO_HI#0 ← ((byte*)) (number) $d048 to:@5 + +(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_charset8 gfx_init_plane_charset8::@8 (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 ← phi( gfx_init_plane_charset8/(byte) dtvSetCpuBankSegment1::cpuBankIdx#0 gfx_init_plane_charset8::@8/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ) (byte*) dtvSetCpuBankSegment1::cpuBank#0 ← ((byte*)) (number) $ff @@ -75,6 +77,8 @@ dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBan (byte*) SCREEN#0 ← ((byte*)) (number) $7c00 (byte*) CHARSET8#0 ← ((byte*)) (number) $8000 to:@9 + +(void()) main() main: scope:[main] from @9 asm { sei } *((byte*) PROCPORT_DDR#0) ← (byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -170,6 +174,8 @@ main::@12: scope:[main] from main::@12 main::@8 main::@return: scope:[main] from main::@3 return to:@return + +(void()) gfx_init() gfx_init: scope:[gfx_init] from main call gfx_init_screen0 to:gfx_init::@1 @@ -181,6 +187,8 @@ gfx_init::@2: scope:[gfx_init] from gfx_init::@1 gfx_init::@return: scope:[gfx_init] from gfx_init::@2 return to:@return + +(void()) gfx_init_screen0() gfx_init_screen0: scope:[gfx_init_screen0] from gfx_init (byte*) gfx_init_screen0::ch#0 ← (byte*) SCREEN#0 (byte) gfx_init_screen0::cy#0 ← (byte) 0 @@ -214,6 +222,8 @@ gfx_init_screen0::@3: scope:[gfx_init_screen0] from gfx_init_screen0::@2 gfx_init_screen0::@return: scope:[gfx_init_screen0] from gfx_init_screen0::@3 return to:@return + +(void()) gfx_init_plane_charset8() gfx_init_plane_charset8: scope:[gfx_init_plane_charset8] from gfx_init::@1 (byte*~) gfx_init_plane_charset8::$0 ← (byte*) CHARSET8#0 / (number) $4000 (byte~) gfx_init_plane_charset8::$1 ← ((byte)) (byte*~) gfx_init_plane_charset8::$0 @@ -1272,6 +1282,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -1326,6 +1338,8 @@ main::@5: scope:[main] from main::@4 main::@5 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } [43] if((byte) main::rst#1!=(byte) $f2) goto main::@5 to:main::@2 + +(void()) gfx_init() gfx_init: scope:[gfx_init] from main [44] phi() [45] call gfx_init_screen0 @@ -1337,6 +1351,8 @@ gfx_init::@1: scope:[gfx_init] from gfx_init gfx_init::@return: scope:[gfx_init] from gfx_init::@1 [48] return to:@return + +(void()) gfx_init_plane_charset8() gfx_init_plane_charset8: scope:[gfx_init_plane_charset8] from gfx_init::@1 [49] phi() [50] call dtvSetCpuBankSegment1 @@ -1393,6 +1409,8 @@ gfx_init_plane_charset8::@8: scope:[gfx_init_plane_charset8] from gfx_init_plan gfx_init_plane_charset8::@return: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@8 [73] return to:@return + +(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_charset8 gfx_init_plane_charset8::@8 [74] (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 ← phi( gfx_init_plane_charset8/(const byte) gfx_init_plane_charset8::gfxbCpuBank#0 gfx_init_plane_charset8::@8/(byte)(number) $4000/(number) $4000 ) [75] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 @@ -1401,6 +1419,8 @@ dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_charse dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1 [77] return to:@return + +(void()) gfx_init_screen0() gfx_init_screen0: scope:[gfx_init_screen0] from gfx_init [78] phi() to:gfx_init_screen0::@1 diff --git a/src/test/ref/c64dtv-8bppchunkystretch.cfg b/src/test/ref/c64dtv-8bppchunkystretch.cfg index 4b8a215e6..7bc46063e 100644 --- a/src/test/ref/c64dtv-8bppchunkystretch.cfg +++ b/src/test/ref/c64dtv-8bppchunkystretch.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -55,6 +57,8 @@ main::@5: scope:[main] from main::@4 main::@5 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } [37] if((byte) main::rst#1!=(byte) $f2) goto main::@5 to:main::@2 + +(void()) gfx_init_chunky() gfx_init_chunky: scope:[gfx_init_chunky] from main [38] phi() [39] call dtvSetCpuBankSegment1 @@ -98,6 +102,8 @@ gfx_init_chunky::@6: scope:[gfx_init_chunky] from gfx_init_chunky::@5 gfx_init_chunky::@return: scope:[gfx_init_chunky] from gfx_init_chunky::@6 [57] return to:@return + +(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_chunky gfx_init_chunky::@4 gfx_init_chunky::@6 [58] (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 ← phi( gfx_init_chunky/(byte)(const byte*) CHUNKY#0/(word) $4000 gfx_init_chunky::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_chunky::@6/(byte)(number) $4000/(number) $4000 ) [59] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 diff --git a/src/test/ref/c64dtv-8bppchunkystretch.log b/src/test/ref/c64dtv-8bppchunkystretch.log index e0a53a4fa..1bba2873d 100644 --- a/src/test/ref/c64dtv-8bppchunkystretch.log +++ b/src/test/ref/c64dtv-8bppchunkystretch.log @@ -52,6 +52,8 @@ CONTROL FLOW GRAPH SSA (byte*) DTV_PLANEB_MODULO_LO#0 ← ((byte*)) (number) $d047 (byte*) DTV_PLANEB_MODULO_HI#0 ← ((byte*)) (number) $d048 to:@5 + +(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_chunky gfx_init_chunky::@4 gfx_init_chunky::@6 (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 ← phi( gfx_init_chunky/(byte) dtvSetCpuBankSegment1::cpuBankIdx#0 gfx_init_chunky::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_chunky::@6/(byte) dtvSetCpuBankSegment1::cpuBankIdx#2 ) (byte*) dtvSetCpuBankSegment1::cpuBank#0 ← ((byte*)) (number) $ff @@ -64,6 +66,8 @@ dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBan @5: scope:[] from @4 (byte*) CHUNKY#0 ← ((byte*)) (number) $8000 to:@7 + +(void()) main() main: scope:[main] from @7 asm { sei } *((byte*) PROCPORT_DDR#0) ← (byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -152,6 +156,8 @@ main::@12: scope:[main] from main::@12 main::@8 main::@return: scope:[main] from main::@3 return to:@return + +(void()) gfx_init_chunky() gfx_init_chunky: scope:[gfx_init_chunky] from main (byte*~) gfx_init_chunky::$0 ← (byte*) CHUNKY#0 / (number) $4000 (byte~) gfx_init_chunky::$1 ← ((byte)) (byte*~) gfx_init_chunky::$0 @@ -925,6 +931,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -973,6 +981,8 @@ main::@5: scope:[main] from main::@4 main::@5 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } [37] if((byte) main::rst#1!=(byte) $f2) goto main::@5 to:main::@2 + +(void()) gfx_init_chunky() gfx_init_chunky: scope:[gfx_init_chunky] from main [38] phi() [39] call dtvSetCpuBankSegment1 @@ -1016,6 +1026,8 @@ gfx_init_chunky::@6: scope:[gfx_init_chunky] from gfx_init_chunky::@5 gfx_init_chunky::@return: scope:[gfx_init_chunky] from gfx_init_chunky::@6 [57] return to:@return + +(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_chunky gfx_init_chunky::@4 gfx_init_chunky::@6 [58] (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 ← phi( gfx_init_chunky/(byte)(const byte*) CHUNKY#0/(word) $4000 gfx_init_chunky::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_chunky::@6/(byte)(number) $4000/(number) $4000 ) [59] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 diff --git a/src/test/ref/c64dtv-blitter-box.cfg b/src/test/ref/c64dtv-blitter-box.cfg index e52b098ef..5da1c96e8 100644 --- a/src/test/ref/c64dtv-blitter-box.cfg +++ b/src/test/ref/c64dtv-blitter-box.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [5] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_CLEAR_IRQ#0 diff --git a/src/test/ref/c64dtv-blitter-box.log b/src/test/ref/c64dtv-blitter-box.log index 4483c47d8..7a6aca82b 100644 --- a/src/test/ref/c64dtv-blitter-box.log +++ b/src/test/ref/c64dtv-blitter-box.log @@ -57,6 +57,8 @@ CONTROL FLOW GRAPH SSA (byte[]) SRCA#0 ← (const string) $0 (byte[]) SRCB#0 ← { (number) $80 } to:@6 + +(void()) main() main: scope:[main] from @6 *((byte*) DTV_FEATURE#0) ← (byte) DTV_FEATURE_ENABLE#0 *((byte*) DTV_BLITTER_CONTROL2#0) ← (byte) DTV_BLIT_CLEAR_IRQ#0 @@ -543,6 +545,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [5] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_CLEAR_IRQ#0 diff --git a/src/test/ref/c64dtv-blittermin.cfg b/src/test/ref/c64dtv-blittermin.cfg index 0e31b38c3..942042c32 100644 --- a/src/test/ref/c64dtv-blittermin.cfg +++ b/src/test/ref/c64dtv-blittermin.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [5] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_CLEAR_IRQ#0 diff --git a/src/test/ref/c64dtv-blittermin.log b/src/test/ref/c64dtv-blittermin.log index be03e7fbf..f32ad6aca 100644 --- a/src/test/ref/c64dtv-blittermin.log +++ b/src/test/ref/c64dtv-blittermin.log @@ -59,6 +59,8 @@ CONTROL FLOW GRAPH SSA (byte) SRCA_LEN#0 ← (number) 9 (byte[]) SRCB#0 ← { (number) $80 } to:@6 + +(void()) main() main: scope:[main] from @6 *((byte*) DTV_FEATURE#0) ← (byte) DTV_FEATURE_ENABLE#0 *((byte*) DTV_BLITTER_CONTROL2#0) ← (byte) DTV_BLIT_CLEAR_IRQ#0 @@ -572,6 +574,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [5] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_CLEAR_IRQ#0 diff --git a/src/test/ref/c64dtv-color.cfg b/src/test/ref/c64dtv-color.cfg index a2bfb0825..39c3d8312 100644 --- a/src/test/ref/c64dtv-color.cfg +++ b/src/test/ref/c64dtv-color.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 diff --git a/src/test/ref/c64dtv-color.log b/src/test/ref/c64dtv-color.log index fd6e2e57f..7344a4a77 100644 --- a/src/test/ref/c64dtv-color.log +++ b/src/test/ref/c64dtv-color.log @@ -30,6 +30,8 @@ CONTROL FLOW GRAPH SSA (byte) DTV_BADLINE_OFF#0 ← (number) $20 (byte*) DTV_PALETTE#0 ← ((byte*)) (number) $d200 to:@6 + +(void()) main() main: scope:[main] from @6 asm { sei } *((byte*) DTV_FEATURE#0) ← (byte) DTV_FEATURE_ENABLE#0 @@ -273,6 +275,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 diff --git a/src/test/ref/c64dtv-gfxexplorer.cfg b/src/test/ref/c64dtv-gfxexplorer.cfg index 096152723..144fdb079 100644 --- a/src/test/ref/c64dtv-gfxexplorer.cfg +++ b/src/test/ref/c64dtv-gfxexplorer.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -31,6 +33,8 @@ main::@4: scope:[main] from main::@2 [14] phi() [15] call gfx_mode to:main::@1 + +(void()) gfx_mode() gfx_mode: scope:[gfx_mode] from main::@4 [16] if(*((const byte[]) form_fields_val#0+(byte) 5)==(byte) 0) goto gfx_mode::@1 to:gfx_mode::@10 @@ -241,6 +245,8 @@ gfx_mode::@24: scope:[gfx_mode] from gfx_mode::@22 gfx_mode::@24 [150] (byte) gfx_mode::i#1 ← ++ (byte) gfx_mode::i#2 [151] if((byte) gfx_mode::i#1!=(byte) $10) goto gfx_mode::@24 to:gfx_mode::@25 + +(byte()) keyboard_event_get() keyboard_event_get: scope:[keyboard_event_get] from form_control::@19 gfx_mode::@32 [152] if((byte) keyboard_events_size#100==(byte) 0) goto keyboard_event_get::@return to:keyboard_event_get::@1 @@ -253,6 +259,8 @@ keyboard_event_get::@return: scope:[keyboard_event_get] from keyboard_event_get [155] (byte) keyboard_event_get::return#2 ← phi( keyboard_event_get/(byte) $ff keyboard_event_get::@1/(byte) keyboard_event_get::return#1 ) [156] return to:@return + +(void()) keyboard_event_scan() keyboard_event_scan: scope:[keyboard_event_scan] from form_control::@3 gfx_mode::@26 [157] (byte) keyboard_events_size#99 ← phi( form_control::@3/(byte) keyboard_events_size#47 gfx_mode::@26/(byte) keyboard_events_size#24 ) to:keyboard_event_scan::@7 @@ -362,6 +370,8 @@ keyboard_event_scan::@11: scope:[keyboard_event_scan] from keyboard_event_scan: [209] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#18) ← (byte~) keyboard_event_scan::$23 [210] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#18 to:keyboard_event_scan::@10 + +(byte()) keyboard_event_pressed((byte) keyboard_event_pressed::keycode) keyboard_event_pressed: scope:[keyboard_event_pressed] from keyboard_event_scan::@1 keyboard_event_scan::@17 keyboard_event_scan::@2 keyboard_event_scan::@3 [211] (byte) keyboard_event_pressed::keycode#4 ← phi( keyboard_event_scan::@1/(const byte) KEY_RSHIFT#0 keyboard_event_scan::@2/(const byte) KEY_CTRL#0 keyboard_event_scan::@17/(const byte) KEY_LSHIFT#0 keyboard_event_scan::@3/(const byte) KEY_COMMODORE#0 ) [212] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#4 >> (byte) 3 @@ -372,6 +382,8 @@ keyboard_event_pressed: scope:[keyboard_event_pressed] from keyboard_event_scan keyboard_event_pressed::@return: scope:[keyboard_event_pressed] from keyboard_event_pressed [216] return to:@return + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_event_scan::@7 [217] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [218] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) @@ -379,6 +391,8 @@ keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_event_scan::@7 keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read [219] return to:@return + +(byte*()) get_vic_screen((byte) get_vic_screen::idx) get_vic_screen: scope:[get_vic_screen] from gfx_mode::@28 gfx_mode::@30 [220] (byte) get_vic_screen::idx#2 ← phi( gfx_mode::@28/(byte) get_vic_screen::idx#0 gfx_mode::@30/(byte) get_vic_screen::idx#1 ) [221] if((byte) get_vic_screen::idx#2==(byte) 0) goto get_vic_screen::@return @@ -402,6 +416,8 @@ get_vic_screen::@return: scope:[get_vic_screen] from get_vic_screen get_vic_scr [227] (byte*) get_vic_screen::return#5 ← phi( get_vic_screen/(const byte*) VIC_SCREEN0#0 get_vic_screen::@5/(const byte*) VIC_SCREEN4#0 get_vic_screen::@2/(const byte*) VIC_SCREEN1#0 get_vic_screen::@3/(const byte*) VIC_SCREEN2#0 get_vic_screen::@4/(const byte*) VIC_SCREEN3#0 get_vic_screen::@1/(const byte*) VIC_SCREEN0#0 ) [228] return to:@return + +(byte*()) get_vic_charset((byte) get_vic_charset::idx) get_vic_charset: scope:[get_vic_charset] from gfx_mode::@29 [229] if((byte) get_vic_charset::idx#0==(byte) 0) goto get_vic_charset::@return to:get_vic_charset::@2 @@ -415,6 +431,8 @@ get_vic_charset::@return: scope:[get_vic_charset] from get_vic_charset get_vic_ [232] (byte*) get_vic_charset::return#2 ← phi( get_vic_charset/(const byte*) VIC_CHARSET_ROM#0 get_vic_charset::@1/(const byte*) VIC_CHARSET_ROM#0 get_vic_charset::@2/(const byte*) VIC_BITMAP#0 ) [233] return to:@return + +(dword()) get_plane((byte) get_plane::idx) get_plane: scope:[get_plane] from gfx_mode::@27 gfx_mode::@9 [234] (byte) get_plane::idx#10 ← phi( gfx_mode::@27/(byte) get_plane::idx#1 gfx_mode::@9/(byte) get_plane::idx#0 ) [235] if((byte) get_plane::idx#10==(byte) 0) goto get_plane::@return @@ -465,6 +483,8 @@ get_plane::@return: scope:[get_plane] from get_plane get_plane::@1 get_plane::@ [250] (dword) get_plane::return#14 ← phi( get_plane/(dword)(const byte*) VIC_SCREEN0#0 get_plane::@10/(const dword) PLANE_HORISONTAL2#0 get_plane::@11/(const dword) PLANE_VERTICAL2#0 get_plane::@12/(const dword) PLANE_CHARSET8#0 get_plane::@13/(const dword) PLANE_BLANK#0 get_plane::@2/(dword)(const byte*) VIC_SCREEN1#0 get_plane::@1/(dword)(const byte*) VIC_SCREEN0#0 get_plane::@3/(dword)(const byte*) VIC_SCREEN2#0 get_plane::@4/(dword)(const byte*) VIC_SCREEN3#0 get_plane::@14/(const dword) PLANE_FULL#0 get_plane::@5/(dword)(const byte*) VIC_BITMAP#0 get_plane::@6/(dword)(const byte*) VIC_CHARSET_ROM#0 get_plane::@7/(const dword) PLANE_8BPP_CHUNKY#0 get_plane::@8/(const dword) PLANE_HORISONTAL#0 get_plane::@9/(const dword) PLANE_VERTICAL#0 ) [251] return to:@return + +(void()) form_mode() form_mode: scope:[form_mode] from main::@2 [252] phi() [253] call print_set_screen @@ -562,6 +582,8 @@ form_mode::@19: scope:[form_mode] from form_mode::@18 [302] (byte) render_preset_name::idx#1 ← *((const byte[]) form_fields_val#0) [303] call render_preset_name to:form_mode::@3 + +(void()) render_preset_name((byte) render_preset_name::idx) render_preset_name: scope:[render_preset_name] from form_mode::@15 form_mode::@19 [304] (byte) render_preset_name::idx#10 ← phi( form_mode::@15/(byte) render_preset_name::idx#0 form_mode::@19/(byte) render_preset_name::idx#1 ) [305] if((byte) render_preset_name::idx#10==(byte) 0) goto render_preset_name::@2 @@ -607,6 +629,8 @@ render_preset_name::@2: scope:[render_preset_name] from render_preset_name rend render_preset_name::@return: scope:[render_preset_name] from render_preset_name::@2 [320] return to:@return + +(void()) print_str_at((byte*) print_str_at::str , (byte*) print_str_at::at) print_str_at: scope:[print_str_at] from render_preset_name::@2 [321] phi() to:print_str_at::@1 @@ -623,6 +647,8 @@ print_str_at::@2: scope:[print_str_at] from print_str_at::@1 [326] (byte*) print_str_at::at#0 ← ++ (byte*) print_str_at::at#2 [327] (byte*) print_str_at::str#0 ← ++ (byte*) print_str_at::str#2 to:print_str_at::@1 + +(void()) form_render_values() form_render_values: scope:[form_render_values] from form_mode::@14 form_mode::@18 [328] phi() to:form_render_values::@1 @@ -641,6 +667,8 @@ form_render_values::@3: scope:[form_render_values] from form_render_values::@2 [334] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← *((const byte[]) print_hextab#0 + *((const byte[]) form_fields_val#0 + (byte) form_render_values::idx#2)) [335] (byte) form_render_values::idx#1 ← ++ (byte) form_render_values::idx#2 to:form_render_values::@1 + +(byte*()) form_field_ptr((byte) form_field_ptr::field_idx) form_field_ptr: scope:[form_field_ptr] from form_control form_render_values::@2 [336] (byte) form_field_ptr::field_idx#2 ← phi( form_control/(byte) form_field_ptr::field_idx#1 form_render_values::@2/(byte) form_field_ptr::field_idx#0 ) [337] (byte) form_field_ptr::y#0 ← *((const byte[]) form_fields_y#0 + (byte) form_field_ptr::field_idx#2) @@ -650,6 +678,8 @@ form_field_ptr: scope:[form_field_ptr] from form_control form_render_values::@2 form_field_ptr::@return: scope:[form_field_ptr] from form_field_ptr [340] return to:@return + +(void()) apply_preset((byte) apply_preset::idx) apply_preset: scope:[apply_preset] from form_mode::@7 [341] if((byte) apply_preset::idx#0==(byte) 0) goto apply_preset::@2 to:apply_preset::@3 @@ -700,6 +730,8 @@ apply_preset::@14: scope:[apply_preset] from apply_preset::@13 [357] *((const byte[]) form_fields_val#0 + (byte) apply_preset::i#2) ← *((byte*) apply_preset::preset#15 + (byte) apply_preset::i#2) [358] (byte) apply_preset::i#1 ← ++ (byte) apply_preset::i#2 to:apply_preset::@13 + +(byte()) form_control() form_control: scope:[form_control] from form_mode::@5 [359] (byte) form_field_ptr::field_idx#1 ← (byte) form_field_idx#28 [360] call form_field_ptr @@ -795,6 +827,8 @@ form_control::@2: scope:[form_control] from form_control::@1 [400] (byte~) form_control::$14 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) | (byte) $80 [401] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← (byte~) form_control::$14 to:form_control::@3 + +(void()) form_set_screen((byte*) form_set_screen::screen) form_set_screen: scope:[form_set_screen] from form_mode::@13 [402] phi() to:form_set_screen::@1 @@ -812,6 +846,8 @@ form_set_screen::@1: scope:[form_set_screen] from form_set_screen form_set_scre form_set_screen::@return: scope:[form_set_screen] from form_set_screen::@1 [411] return to:@return + +(void()) print_str_lines((byte*) print_str_lines::str) print_str_lines: scope:[print_str_lines] from form_mode::@12 form_mode::@9 [412] (byte*) print_str_lines::str#5 ← phi( form_mode::@9/(const byte[]) FORM_COLS#0 form_mode::@12/(const byte[]) FORM_TEXT#0 ) [413] (byte*~) print_char_cursor#73 ← (byte*) print_set_screen::screen#2 @@ -847,6 +883,8 @@ print_str_lines::@5: scope:[print_str_lines] from print_str_lines::@3 print_str_lines::@6: scope:[print_str_lines] from print_str_lines::@5 [427] (byte*~) print_char_cursor#74 ← (byte*) print_line_cursor#22 to:print_str_lines::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from print_str_lines::@5 [428] phi() to:print_ln::@1 @@ -858,6 +896,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [432] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from form_mode::@11 form_mode::@8 [433] (void*) memset::str#0 ← (void*)(byte*) print_set_screen::screen#2 [434] call memset @@ -865,6 +905,8 @@ print_cls: scope:[print_cls] from form_mode::@11 form_mode::@8 print_cls::@return: scope:[print_cls] from print_cls [435] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [436] phi() to:memset::@1 @@ -883,12 +925,16 @@ memset::@3: scope:[memset] from memset::@2 [442] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [443] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) print_set_screen((byte*) print_set_screen::screen) print_set_screen: scope:[print_set_screen] from form_mode form_mode::@10 [444] (byte*) print_set_screen::screen#2 ← phi( form_mode/(const byte*) COLS#0 form_mode::@10/(const byte*) FORM_SCREEN#0 ) to:print_set_screen::@return print_set_screen::@return: scope:[print_set_screen] from print_set_screen [445] return to:@return + +(void()) gfx_init() gfx_init: scope:[gfx_init] from main::@3 [446] phi() [447] call gfx_init_screen0 @@ -952,6 +998,8 @@ gfx_init::@14: scope:[gfx_init] from gfx_init::@13 gfx_init::@return: scope:[gfx_init] from gfx_init::@14 [476] return to:@return + +(void()) gfx_init_plane_full() gfx_init_plane_full: scope:[gfx_init_plane_full] from gfx_init::@14 [477] phi() [478] call gfx_init_plane_fill @@ -959,6 +1007,8 @@ gfx_init_plane_full: scope:[gfx_init_plane_full] from gfx_init::@14 gfx_init_plane_full::@return: scope:[gfx_init_plane_full] from gfx_init_plane_full [479] return to:@return + +(void()) gfx_init_plane_fill((dword) gfx_init_plane_fill::plane_addr , (byte) gfx_init_plane_fill::fill) gfx_init_plane_fill: scope:[gfx_init_plane_fill] from gfx_init_plane_blank gfx_init_plane_full gfx_init_plane_vertical2 [480] (byte) gfx_init_plane_fill::fill#6 ← phi( gfx_init_plane_blank/(byte) 0 gfx_init_plane_full/(byte) $ff gfx_init_plane_vertical2/(byte) $1b ) [480] (dword) gfx_init_plane_fill::plane_addr#3 ← phi( gfx_init_plane_blank/(const dword) PLANE_BLANK#0 gfx_init_plane_full/(const dword) PLANE_FULL#0 gfx_init_plane_vertical2/(const dword) PLANE_VERTICAL2#0 ) @@ -997,6 +1047,8 @@ gfx_init_plane_fill::@4: scope:[gfx_init_plane_fill] from gfx_init_plane_fill:: gfx_init_plane_fill::@return: scope:[gfx_init_plane_fill] from gfx_init_plane_fill::@4 [500] return to:@return + +(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_8bppchunky gfx_init_plane_8bppchunky::@4 gfx_init_plane_8bppchunky::@6 gfx_init_plane_charset8 gfx_init_plane_charset8::@8 gfx_init_plane_fill gfx_init_plane_fill::@4 gfx_init_plane_horisontal gfx_init_plane_horisontal2 gfx_init_plane_horisontal2::@4 gfx_init_plane_horisontal::@7 gfx_init_plane_vertical gfx_init_plane_vertical::@4 [501] (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 ← phi( gfx_init_plane_8bppchunky/(byte)(const dword) PLANE_8BPP_CHUNKY#0/(word) $4000 gfx_init_plane_8bppchunky::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_plane_8bppchunky::@6/(byte)(number) $4000/(number) $4000 gfx_init_plane_charset8/(const byte) gfx_init_plane_charset8::gfxbCpuBank#0 gfx_init_plane_charset8::@8/(byte)(number) $4000/(number) $4000 gfx_init_plane_fill/(byte) dtvSetCpuBankSegment1::cpuBankIdx#11 gfx_init_plane_fill::@4/(byte)(number) $4000/(number) $4000 gfx_init_plane_horisontal/(const byte) gfx_init_plane_horisontal::gfxbCpuBank#0 gfx_init_plane_horisontal2/(const byte) gfx_init_plane_horisontal2::gfxbCpuBank#0 gfx_init_plane_horisontal2::@4/(byte)(number) $4000/(number) $4000 gfx_init_plane_horisontal::@7/(byte)(number) $4000/(number) $4000 gfx_init_plane_vertical/(const byte) gfx_init_plane_vertical::gfxbCpuBank#0 gfx_init_plane_vertical::@4/(byte)(number) $4000/(number) $4000 ) [502] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 @@ -1005,6 +1057,8 @@ dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_8bppch dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1 [504] return to:@return + +(void()) gfx_init_plane_blank() gfx_init_plane_blank: scope:[gfx_init_plane_blank] from gfx_init::@13 [505] phi() [506] call gfx_init_plane_fill @@ -1012,6 +1066,8 @@ gfx_init_plane_blank: scope:[gfx_init_plane_blank] from gfx_init::@13 gfx_init_plane_blank::@return: scope:[gfx_init_plane_blank] from gfx_init_plane_blank [507] return to:@return + +(void()) gfx_init_plane_vertical2() gfx_init_plane_vertical2: scope:[gfx_init_plane_vertical2] from gfx_init::@12 [508] phi() [509] call gfx_init_plane_fill @@ -1019,6 +1075,8 @@ gfx_init_plane_vertical2: scope:[gfx_init_plane_vertical2] from gfx_init::@12 gfx_init_plane_vertical2::@return: scope:[gfx_init_plane_vertical2] from gfx_init_plane_vertical2 [510] return to:@return + +(void()) gfx_init_plane_horisontal2() gfx_init_plane_horisontal2: scope:[gfx_init_plane_horisontal2] from gfx_init::@11 [511] phi() [512] call dtvSetCpuBankSegment1 @@ -1048,6 +1106,8 @@ gfx_init_plane_horisontal2::@4: scope:[gfx_init_plane_horisontal2] from gfx_ini gfx_init_plane_horisontal2::@return: scope:[gfx_init_plane_horisontal2] from gfx_init_plane_horisontal2::@4 [525] return to:@return + +(void()) gfx_init_plane_vertical() gfx_init_plane_vertical: scope:[gfx_init_plane_vertical] from gfx_init::@10 [526] phi() [527] call dtvSetCpuBankSegment1 @@ -1075,6 +1135,8 @@ gfx_init_plane_vertical::@4: scope:[gfx_init_plane_vertical] from gfx_init_plan gfx_init_plane_vertical::@return: scope:[gfx_init_plane_vertical] from gfx_init_plane_vertical::@4 [538] return to:@return + +(void()) gfx_init_plane_horisontal() gfx_init_plane_horisontal: scope:[gfx_init_plane_horisontal] from gfx_init::@9 [539] phi() [540] call dtvSetCpuBankSegment1 @@ -1113,6 +1175,8 @@ gfx_init_plane_horisontal::@3: scope:[gfx_init_plane_horisontal] from gfx_init_ [555] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) 0 [556] (byte*) gfx_init_plane_horisontal::gfxa#1 ← ++ (byte*) gfx_init_plane_horisontal::gfxa#3 to:gfx_init_plane_horisontal::@4 + +(void()) gfx_init_plane_charset8() gfx_init_plane_charset8: scope:[gfx_init_plane_charset8] from gfx_init::@8 [557] phi() [558] call dtvSetCpuBankSegment1 @@ -1169,6 +1233,8 @@ gfx_init_plane_charset8::@8: scope:[gfx_init_plane_charset8] from gfx_init_plan gfx_init_plane_charset8::@return: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@8 [581] return to:@return + +(void()) gfx_init_plane_8bppchunky() gfx_init_plane_8bppchunky: scope:[gfx_init_plane_8bppchunky] from gfx_init::@7 [582] phi() [583] call dtvSetCpuBankSegment1 @@ -1212,6 +1278,8 @@ gfx_init_plane_8bppchunky::@6: scope:[gfx_init_plane_8bppchunky] from gfx_init_ gfx_init_plane_8bppchunky::@return: scope:[gfx_init_plane_8bppchunky] from gfx_init_plane_8bppchunky::@6 [601] return to:@return + +(void()) gfx_init_vic_bitmap() gfx_init_vic_bitmap: scope:[gfx_init_vic_bitmap] from gfx_init::@6 [602] phi() [603] call bitmap_init @@ -1237,6 +1305,8 @@ gfx_init_vic_bitmap::@2: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap:: gfx_init_vic_bitmap::@4: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap::@2 [614] (byte) gfx_init_vic_bitmap::l#1 ← ++ (byte) gfx_init_vic_bitmap::l#2 to:gfx_init_vic_bitmap::@1 + +(void()) bitmap_line((byte) bitmap_line::x0 , (byte) bitmap_line::x1 , (byte) bitmap_line::y0 , (byte) bitmap_line::y1) bitmap_line: scope:[bitmap_line] from gfx_init_vic_bitmap::@2 [615] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 to:bitmap_line::@2 @@ -1331,6 +1401,8 @@ bitmap_line::@13: scope:[bitmap_line] from bitmap_line::@11 [675] (byte) bitmap_line_xdyi::yd#1 ← (byte) bitmap_line::yd#11 [676] call bitmap_line_xdyi to:bitmap_line::@return + +(void()) bitmap_line_xdyi((byte) bitmap_line_xdyi::x , (byte) bitmap_line_xdyi::y , (byte) bitmap_line_xdyi::x1 , (byte) bitmap_line_xdyi::xd , (byte) bitmap_line_xdyi::yd) bitmap_line_xdyi: scope:[bitmap_line_xdyi] from bitmap_line::@13 bitmap_line::@8 [677] (byte) bitmap_line_xdyi::x1#6 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::x1#0 bitmap_line::@13/(byte) bitmap_line_xdyi::x1#1 ) [677] (byte) bitmap_line_xdyi::xd#5 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::xd#0 bitmap_line::@13/(byte) bitmap_line_xdyi::xd#1 ) @@ -1365,6 +1437,8 @@ bitmap_line_xdyi::@2: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@3 bitmap bitmap_line_xdyi::@return: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@2 [691] return to:@return + +(void()) bitmap_plot((byte) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_line_ydxd::@1 bitmap_line_ydxi::@1 [692] (byte) bitmap_plot::y#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::y#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::y#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::y#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::y#2 ) [692] (byte) bitmap_plot::x#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::x#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::x#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::x#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::x#2 ) @@ -1377,6 +1451,8 @@ bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot [698] return to:@return + +(void()) bitmap_line_ydxi((byte) bitmap_line_ydxi::y , (byte) bitmap_line_ydxi::x , (byte) bitmap_line_ydxi::y1 , (byte) bitmap_line_ydxi::yd , (byte) bitmap_line_ydxi::xd) bitmap_line_ydxi: scope:[bitmap_line_ydxi] from bitmap_line::@14 bitmap_line::@4 [699] (byte) bitmap_line_ydxi::y1#6 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::y1#1 bitmap_line::@4/(byte) bitmap_line_ydxi::y1#0 ) [699] (byte) bitmap_line_ydxi::yd#5 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::yd#1 bitmap_line::@4/(byte) bitmap_line_ydxi::yd#0 ) @@ -1411,6 +1487,8 @@ bitmap_line_ydxi::@2: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@3 bitmap bitmap_line_ydxi::@return: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@2 [713] return to:@return + +(void()) bitmap_line_xdyd((byte) bitmap_line_xdyd::x , (byte) bitmap_line_xdyd::y , (byte) bitmap_line_xdyd::x1 , (byte) bitmap_line_xdyd::xd , (byte) bitmap_line_xdyd::yd) bitmap_line_xdyd: scope:[bitmap_line_xdyd] from bitmap_line::@12 bitmap_line::@9 [714] (byte) bitmap_line_xdyd::x1#6 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::x1#0 bitmap_line::@12/(byte) bitmap_line_xdyd::x1#1 ) [714] (byte) bitmap_line_xdyd::xd#5 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::xd#0 bitmap_line::@12/(byte) bitmap_line_xdyd::xd#1 ) @@ -1445,6 +1523,8 @@ bitmap_line_xdyd::@2: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@3 bitmap bitmap_line_xdyd::@return: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@2 [728] return to:@return + +(void()) bitmap_line_ydxd((byte) bitmap_line_ydxd::y , (byte) bitmap_line_ydxd::x , (byte) bitmap_line_ydxd::y1 , (byte) bitmap_line_ydxd::yd , (byte) bitmap_line_ydxd::xd) bitmap_line_ydxd: scope:[bitmap_line_ydxd] from bitmap_line::@10 bitmap_line::@6 [729] (byte) bitmap_line_ydxd::y1#6 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::y1#0 bitmap_line::@6/(byte) bitmap_line_ydxd::y1#1 ) [729] (byte) bitmap_line_ydxd::yd#5 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::yd#0 bitmap_line::@6/(byte) bitmap_line_ydxd::yd#1 ) @@ -1479,6 +1559,8 @@ bitmap_line_ydxd::@2: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@3 bitmap bitmap_line_ydxd::@return: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@2 [743] return to:@return + +(void()) bitmap_clear() bitmap_clear: scope:[bitmap_clear] from gfx_init_vic_bitmap::@3 [744] (word) bitmap_clear::bitmap#0 ← *((const byte[$100]) bitmap_plot_xhi#0) w= *((const byte[$100]) bitmap_plot_xlo#0) [745] (byte*~) bitmap_clear::bitmap#5 ← (byte*)(word) bitmap_clear::bitmap#0 @@ -1502,6 +1584,8 @@ bitmap_clear::@3: scope:[bitmap_clear] from bitmap_clear::@2 bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@3 [754] return to:@return + +(void()) bitmap_init((byte*) bitmap_init::bitmap) bitmap_init: scope:[bitmap_init] from gfx_init_vic_bitmap [755] phi() to:bitmap_init::@1 @@ -1545,6 +1629,8 @@ bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 [779] return to:@return + +(void()) gfx_init_charset() gfx_init_charset: scope:[gfx_init_charset] from gfx_init::@5 [780] *((const byte*) PROCPORT#0) ← (byte) $32 to:gfx_init_charset::@1 @@ -1573,6 +1659,8 @@ gfx_init_charset::@4: scope:[gfx_init_charset] from gfx_init_charset::@3 gfx_init_charset::@return: scope:[gfx_init_charset] from gfx_init_charset::@4 [791] return to:@return + +(void()) gfx_init_screen4() gfx_init_screen4: scope:[gfx_init_screen4] from gfx_init::@4 [792] phi() to:gfx_init_screen4::@1 @@ -1595,6 +1683,8 @@ gfx_init_screen4::@3: scope:[gfx_init_screen4] from gfx_init_screen4::@2 gfx_init_screen4::@return: scope:[gfx_init_screen4] from gfx_init_screen4::@3 [801] return to:@return + +(void()) gfx_init_screen3() gfx_init_screen3: scope:[gfx_init_screen3] from gfx_init::@3 [802] phi() to:gfx_init_screen3::@1 @@ -1621,6 +1711,8 @@ gfx_init_screen3::@3: scope:[gfx_init_screen3] from gfx_init_screen3::@2 gfx_init_screen3::@return: scope:[gfx_init_screen3] from gfx_init_screen3::@3 [815] return to:@return + +(void()) gfx_init_screen2() gfx_init_screen2: scope:[gfx_init_screen2] from gfx_init::@2 [816] phi() to:gfx_init_screen2::@1 @@ -1648,6 +1740,8 @@ gfx_init_screen2::@3: scope:[gfx_init_screen2] from gfx_init_screen2::@2 gfx_init_screen2::@return: scope:[gfx_init_screen2] from gfx_init_screen2::@3 [830] return to:@return + +(void()) gfx_init_screen1() gfx_init_screen1: scope:[gfx_init_screen1] from gfx_init::@1 [831] phi() to:gfx_init_screen1::@1 @@ -1672,6 +1766,8 @@ gfx_init_screen1::@3: scope:[gfx_init_screen1] from gfx_init_screen1::@2 gfx_init_screen1::@return: scope:[gfx_init_screen1] from gfx_init_screen1::@3 [842] return to:@return + +(void()) gfx_init_screen0() gfx_init_screen0: scope:[gfx_init_screen0] from gfx_init [843] phi() to:gfx_init_screen0::@1 @@ -1698,6 +1794,8 @@ gfx_init_screen0::@3: scope:[gfx_init_screen0] from gfx_init_screen0::@2 gfx_init_screen0::@return: scope:[gfx_init_screen0] from gfx_init_screen0::@3 [856] return to:@return + +(void()) keyboard_init() keyboard_init: scope:[keyboard_init] from main [857] *((const byte*) CIA1_PORT_A_DDR#0) ← (byte) $ff [858] *((const byte*) CIA1_PORT_B_DDR#0) ← (byte) 0 diff --git a/src/test/ref/c64dtv-gfxexplorer.log b/src/test/ref/c64dtv-gfxexplorer.log index 8ffd3bfdc..293332bc3 100644 --- a/src/test/ref/c64dtv-gfxexplorer.log +++ b/src/test/ref/c64dtv-gfxexplorer.log @@ -362,6 +362,8 @@ CONTROL FLOW GRAPH SSA (dword) DTV_COLOR_BANK_DEFAULT#0 ← (number) $1d800 (byte*) DTV_GRAPHICS_VIC_BANK#0 ← ((byte*)) (number) $d03d to:@17 + +(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_8bppchunky gfx_init_plane_8bppchunky::@4 gfx_init_plane_8bppchunky::@6 gfx_init_plane_charset8 gfx_init_plane_charset8::@8 gfx_init_plane_fill gfx_init_plane_fill::@4 gfx_init_plane_horisontal gfx_init_plane_horisontal2 gfx_init_plane_horisontal2::@4 gfx_init_plane_horisontal::@8 gfx_init_plane_vertical gfx_init_plane_vertical::@4 (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 ← phi( gfx_init_plane_8bppchunky/(byte) dtvSetCpuBankSegment1::cpuBankIdx#0 gfx_init_plane_8bppchunky::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_plane_8bppchunky::@6/(byte) dtvSetCpuBankSegment1::cpuBankIdx#2 gfx_init_plane_charset8/(byte) dtvSetCpuBankSegment1::cpuBankIdx#9 gfx_init_plane_charset8::@8/(byte) dtvSetCpuBankSegment1::cpuBankIdx#10 gfx_init_plane_fill/(byte) dtvSetCpuBankSegment1::cpuBankIdx#11 gfx_init_plane_fill::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#12 gfx_init_plane_horisontal/(byte) dtvSetCpuBankSegment1::cpuBankIdx#3 gfx_init_plane_horisontal2/(byte) dtvSetCpuBankSegment1::cpuBankIdx#5 gfx_init_plane_horisontal2::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#6 gfx_init_plane_horisontal::@8/(byte) dtvSetCpuBankSegment1::cpuBankIdx#4 gfx_init_plane_vertical/(byte) dtvSetCpuBankSegment1::cpuBankIdx#7 gfx_init_plane_vertical::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#8 ) (byte*) dtvSetCpuBankSegment1::cpuBank#0 ← ((byte*)) (number) $ff @@ -371,6 +373,8 @@ dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_8bppch dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1 return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -418,6 +422,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@34 + +(void()) print_str_lines((byte*) print_str_lines::str) print_str_lines: scope:[print_str_lines] from form_mode::@22 form_mode::@25 (byte*) print_line_cursor#45 ← phi( form_mode::@22/(byte*) print_line_cursor#12 form_mode::@25/(byte*) print_line_cursor#15 ) (byte*) print_char_cursor#47 ← phi( form_mode::@22/(byte*) print_char_cursor#13 form_mode::@25/(byte*) print_char_cursor#16 ) @@ -476,6 +482,8 @@ print_str_lines::@return: scope:[print_str_lines] from print_str_lines::@1 (byte*) print_line_cursor#2 ← (byte*) print_line_cursor#20 return to:@return + +(void()) print_str_at((byte*) print_str_at::str , (byte*) print_str_at::at) print_str_at: scope:[print_str_at] from render_preset_name::@22 (byte*) print_str_at::at#4 ← phi( render_preset_name::@22/(byte*) print_str_at::at#1 ) (byte*) print_str_at::str#4 ← phi( render_preset_name::@22/(byte*) print_str_at::str#1 ) @@ -496,6 +504,8 @@ print_str_at::@2: scope:[print_str_at] from print_str_at::@1 print_str_at::@return: scope:[print_str_at] from print_str_at::@1 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from print_str_lines::@7 (byte*) print_char_cursor#40 ← phi( print_str_lines::@7/(byte*) print_char_cursor#38 ) (byte*) print_line_cursor#38 ← phi( print_str_lines::@7/(byte*) print_line_cursor#36 ) @@ -525,6 +535,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_screen#51 ← phi( @17/(byte*) print_screen#0 ) (byte[]) print_hextab#0 ← (const string) $38 to:@41 + +(void()) print_cls() print_cls: scope:[print_cls] from form_mode::@21 form_mode::@24 (byte*) print_screen#9 ← phi( form_mode::@21/(byte*) print_screen#5 form_mode::@24/(byte*) print_screen#6 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#9 @@ -545,6 +557,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte*) print_char_cursor#7 ← (byte*) print_char_cursor#25 return to:@return + +(void()) print_set_screen((byte*) print_set_screen::screen) print_set_screen: scope:[print_set_screen] from form_mode form_mode::@23 (byte*) print_set_screen::screen#2 ← phi( form_mode/(byte*) print_set_screen::screen#0 form_mode::@23/(byte*) print_set_screen::screen#1 ) (byte*) print_screen#1 ← (byte*) print_set_screen::screen#2 @@ -574,6 +588,8 @@ print_set_screen::@return: scope:[print_set_screen] from print_set_screen (byte[8]) keyboard_matrix_row_bitmask#0 ← { (number) $fe, (number) $fd, (number) $fb, (number) $f7, (number) $ef, (number) $df, (number) $bf, (number) $7f } (byte[8]) keyboard_matrix_col_bitmask#0 ← { (number) 1, (number) 2, (number) 4, (number) 8, (number) $10, (number) $20, (number) $40, (number) $80 } to:@45 + +(void()) keyboard_init() keyboard_init: scope:[keyboard_init] from main *((byte*) CIA1_PORT_A_DDR#0) ← (number) $ff *((byte*) CIA1_PORT_B_DDR#0) ← (number) 0 @@ -581,6 +597,8 @@ keyboard_init: scope:[keyboard_init] from main keyboard_init::@return: scope:[keyboard_init] from keyboard_init return to:@return + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_event_scan::@8 (byte) keyboard_matrix_read::rowid#1 ← phi( keyboard_event_scan::@8/(byte) keyboard_matrix_read::rowid#0 ) *((byte*) CIA1_PORT_A#0) ← *((byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#1) @@ -608,6 +626,8 @@ keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matri (byte) KEY_MODIFIER_SHIFT#0 ← (byte~) $0 (byte[8]) keyboard_scan_values#0 ← { fill( 8, 0) } to:@48 + +(void()) keyboard_event_scan() keyboard_event_scan: scope:[keyboard_event_scan] from form_control::@3 gfx_mode::@36 (byte) keyboard_events_size#99 ← phi( form_control::@3/(byte) keyboard_events_size#48 gfx_mode::@36/(byte) keyboard_events_size#44 ) (byte) keyboard_event_scan::keycode#0 ← (number) 0 @@ -818,6 +838,8 @@ keyboard_event_scan::@return: scope:[keyboard_event_scan] from keyboard_event_s (byte) keyboard_modifiers#6 ← (byte) keyboard_modifiers#21 return to:@return + +(byte()) keyboard_event_pressed((byte) keyboard_event_pressed::keycode) keyboard_event_pressed: scope:[keyboard_event_pressed] from keyboard_event_scan::@1 keyboard_event_scan::@2 keyboard_event_scan::@23 keyboard_event_scan::@3 (byte) keyboard_event_pressed::keycode#4 ← phi( keyboard_event_scan::@1/(byte) keyboard_event_pressed::keycode#1 keyboard_event_scan::@2/(byte) keyboard_event_pressed::keycode#2 keyboard_event_scan::@23/(byte) keyboard_event_pressed::keycode#0 keyboard_event_scan::@3/(byte) keyboard_event_pressed::keycode#3 ) (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#4 >> (number) 3 @@ -831,6 +853,8 @@ keyboard_event_pressed::@return: scope:[keyboard_event_pressed] from keyboard_e (byte) keyboard_event_pressed::return#5 ← (byte) keyboard_event_pressed::return#10 return to:@return + +(byte()) keyboard_event_get() keyboard_event_get: scope:[keyboard_event_get] from form_control::@34 gfx_mode::@51 (byte) keyboard_events_size#22 ← phi( form_control::@34/(byte) keyboard_events_size#14 gfx_mode::@51/(byte) keyboard_events_size#9 ) (bool~) keyboard_event_get::$0 ← (byte) keyboard_events_size#22 == (number) 0 @@ -864,6 +888,8 @@ keyboard_event_get::@return: scope:[keyboard_event_get] from keyboard_event_get (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } to:@57 + +(void()) bitmap_init((byte*) bitmap_init::bitmap) bitmap_init: scope:[bitmap_init] from gfx_init_vic_bitmap (byte*) bitmap_init::bitmap#2 ← phi( gfx_init_vic_bitmap/(byte*) bitmap_init::bitmap#0 ) (byte) bitmap_init::bits#0 ← (number) $80 @@ -931,6 +957,8 @@ bitmap_init::@7: scope:[bitmap_init] from bitmap_init::@5 bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@6 return to:@return + +(void()) bitmap_clear() bitmap_clear: scope:[bitmap_clear] from gfx_init_vic_bitmap::@7 (byte*~) bitmap_clear::$0 ← ((byte*)) { *((byte[$100]) bitmap_plot_xhi#0 + (number) 0), *((byte[$100]) bitmap_plot_xlo#0 + (number) 0) } (byte*) bitmap_clear::bitmap#0 ← (byte*~) bitmap_clear::$0 @@ -961,6 +989,8 @@ bitmap_clear::@3: scope:[bitmap_clear] from bitmap_clear::@2 bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@3 return to:@return + +(void()) bitmap_plot((byte) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_line_ydxd::@1 bitmap_line_ydxi::@1 (byte) bitmap_plot::y#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::y#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::y#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::y#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::y#2 ) (byte) bitmap_plot::x#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::x#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::x#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::x#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::x#2 ) @@ -974,6 +1004,8 @@ bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot return to:@return + +(void()) bitmap_line((byte) bitmap_line::x0 , (byte) bitmap_line::x1 , (byte) bitmap_line::y0 , (byte) bitmap_line::y1) bitmap_line: scope:[bitmap_line] from gfx_init_vic_bitmap::@2 (byte) bitmap_line::y1#13 ← phi( gfx_init_vic_bitmap::@2/(byte) bitmap_line::y1#0 ) (byte) bitmap_line::y0#13 ← phi( gfx_init_vic_bitmap::@2/(byte) bitmap_line::y0#0 ) @@ -1171,6 +1203,8 @@ bitmap_line::@36: scope:[bitmap_line] from bitmap_line::@27 bitmap_line::@return: scope:[bitmap_line] from bitmap_line::@29 bitmap_line::@30 bitmap_line::@31 bitmap_line::@32 bitmap_line::@33 bitmap_line::@34 bitmap_line::@35 bitmap_line::@36 return to:@return + +(void()) bitmap_line_xdyi((byte) bitmap_line_xdyi::x , (byte) bitmap_line_xdyi::y , (byte) bitmap_line_xdyi::x1 , (byte) bitmap_line_xdyi::xd , (byte) bitmap_line_xdyi::yd) bitmap_line_xdyi: scope:[bitmap_line_xdyi] from bitmap_line::@11 bitmap_line::@25 (byte) bitmap_line_xdyi::x1#6 ← phi( bitmap_line::@11/(byte) bitmap_line_xdyi::x1#0 bitmap_line::@25/(byte) bitmap_line_xdyi::x1#1 ) (byte) bitmap_line_xdyi::xd#5 ← phi( bitmap_line::@11/(byte) bitmap_line_xdyi::xd#0 bitmap_line::@25/(byte) bitmap_line_xdyi::xd#1 ) @@ -1230,6 +1264,8 @@ bitmap_line_xdyi::@3: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@5 bitmap_line_xdyi::@return: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@2 return to:@return + +(void()) bitmap_line_xdyd((byte) bitmap_line_xdyd::x , (byte) bitmap_line_xdyd::y , (byte) bitmap_line_xdyd::x1 , (byte) bitmap_line_xdyd::xd , (byte) bitmap_line_xdyd::yd) bitmap_line_xdyd: scope:[bitmap_line_xdyd] from bitmap_line::@15 bitmap_line::@21 (byte) bitmap_line_xdyd::x1#6 ← phi( bitmap_line::@15/(byte) bitmap_line_xdyd::x1#0 bitmap_line::@21/(byte) bitmap_line_xdyd::x1#1 ) (byte) bitmap_line_xdyd::xd#5 ← phi( bitmap_line::@15/(byte) bitmap_line_xdyd::xd#0 bitmap_line::@21/(byte) bitmap_line_xdyd::xd#1 ) @@ -1289,6 +1325,8 @@ bitmap_line_xdyd::@3: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@5 bitmap_line_xdyd::@return: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@2 return to:@return + +(void()) bitmap_line_ydxi((byte) bitmap_line_ydxi::y , (byte) bitmap_line_ydxi::x , (byte) bitmap_line_ydxi::y1 , (byte) bitmap_line_ydxi::yd , (byte) bitmap_line_ydxi::xd) bitmap_line_ydxi: scope:[bitmap_line_ydxi] from bitmap_line::@27 bitmap_line::@5 (byte) bitmap_line_ydxi::y1#6 ← phi( bitmap_line::@27/(byte) bitmap_line_ydxi::y1#1 bitmap_line::@5/(byte) bitmap_line_ydxi::y1#0 ) (byte) bitmap_line_ydxi::yd#5 ← phi( bitmap_line::@27/(byte) bitmap_line_ydxi::yd#1 bitmap_line::@5/(byte) bitmap_line_ydxi::yd#0 ) @@ -1348,6 +1386,8 @@ bitmap_line_ydxi::@3: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@5 bitmap_line_ydxi::@return: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@2 return to:@return + +(void()) bitmap_line_ydxd((byte) bitmap_line_ydxd::y , (byte) bitmap_line_ydxd::x , (byte) bitmap_line_ydxd::y1 , (byte) bitmap_line_ydxd::yd , (byte) bitmap_line_ydxd::xd) bitmap_line_ydxd: scope:[bitmap_line_ydxd] from bitmap_line::@17 bitmap_line::@8 (byte) bitmap_line_ydxd::y1#6 ← phi( bitmap_line::@17/(byte) bitmap_line_ydxd::y1#0 bitmap_line::@8/(byte) bitmap_line_ydxd::y1#1 ) (byte) bitmap_line_ydxd::yd#5 ← phi( bitmap_line::@17/(byte) bitmap_line_ydxd::yd#0 bitmap_line::@8/(byte) bitmap_line_ydxd::yd#1 ) @@ -1408,6 +1448,8 @@ bitmap_line_ydxd::@3: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@5 bitmap_line_ydxd::@return: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@2 return to:@return + +(void()) main() main: scope:[main] from @85 (byte) form_field_idx#48 ← phi( @85/(byte) form_field_idx#34 ) (byte) keyboard_modifiers#83 ← phi( @85/(byte) keyboard_modifiers#52 ) @@ -1528,6 +1570,8 @@ main::@return: scope:[main] from main::@1 (dword) PLANE_FULL#0 ← (number) $3a000 (dword) PLANE_CHARSET8#0 ← (number) $3c000 to:@60 + +(dword()) get_plane((byte) get_plane::idx) get_plane: scope:[get_plane] from gfx_mode::@46 gfx_mode::@9 (byte) get_plane::idx#2 ← phi( gfx_mode::@46/(byte) get_plane::idx#1 gfx_mode::@9/(byte) get_plane::idx#0 ) (bool~) get_plane::$0 ← (byte) get_plane::idx#2 == (number) 0 @@ -1664,6 +1708,8 @@ get_plane::@27: scope:[get_plane] from get_plane::@40 (dword~) get_plane::$15 ← ((dword)) (byte*) VIC_SCREEN0#0 (dword) get_plane::return#15 ← (dword~) get_plane::$15 to:get_plane::@return + +(byte*()) get_vic_screen((byte) get_vic_screen::idx) get_vic_screen: scope:[get_vic_screen] from gfx_mode::@47 gfx_mode::@49 (byte) get_vic_screen::idx#2 ← phi( gfx_mode::@47/(byte) get_vic_screen::idx#0 gfx_mode::@49/(byte) get_vic_screen::idx#1 ) (bool~) get_vic_screen::$0 ← (byte) get_vic_screen::idx#2 == (number) 0 @@ -1713,6 +1759,8 @@ get_vic_screen::@return: scope:[get_vic_screen] from get_vic_screen::@1 get_vic get_vic_screen::@9: scope:[get_vic_screen] from get_vic_screen::@13 (byte*) get_vic_screen::return#6 ← (byte*) VIC_SCREEN0#0 to:get_vic_screen::@return + +(byte*()) get_vic_charset((byte) get_vic_charset::idx) get_vic_charset: scope:[get_vic_charset] from gfx_mode::@48 (byte) get_vic_charset::idx#1 ← phi( gfx_mode::@48/(byte) get_vic_charset::idx#0 ) (bool~) get_vic_charset::$0 ← (byte) get_vic_charset::idx#1 == (number) 0 @@ -1765,6 +1813,8 @@ get_vic_charset::@3: scope:[get_vic_charset] from get_vic_charset::@4 (byte[]) preset_sixsfred2#0 ← { (number) 9, (number) 1, (number) 1, (number) 1, (number) 0, (number) 1, (number) 0, (number) 0, (number) 0, (number) 0, (number) 9, (number) 0, (number) 0, (number) 0, (number) 1, (number) 0, (number) 0, (number) $a, (number) 0, (number) 0, (number) 0, (number) 1, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 1, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0 } (byte[]) preset_8bpppixelcell#0 ← { (number) $a, (number) 0, (number) 1, (number) 1, (number) 1, (number) 1, (number) 0, (number) 1, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 1, (number) 0, (number) 0, (number) $b, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 1, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0, (number) 0 } to:@62 + +(void()) apply_preset((byte) apply_preset::idx) apply_preset: scope:[apply_preset] from form_mode::@18 (byte) apply_preset::idx#1 ← phi( form_mode::@18/(byte) apply_preset::idx#0 ) (byte*) apply_preset::preset#0 ← (byte*) 0 @@ -1876,6 +1926,8 @@ apply_preset::@46: scope:[apply_preset] from apply_preset::@45 apply_preset::@return: scope:[apply_preset] from apply_preset::@45 return to:@return + +(void()) render_preset_name((byte) render_preset_name::idx) render_preset_name: scope:[render_preset_name] from form_mode::@28 form_mode::@32 (byte) render_preset_name::idx#2 ← phi( form_mode::@28/(byte) render_preset_name::idx#0 form_mode::@32/(byte) render_preset_name::idx#1 ) (byte*) render_preset_name::name#0 ← (byte*) 0 @@ -2060,6 +2112,8 @@ render_preset_name::@return: scope:[render_preset_name] from render_preset_name (byte*~) $36 ← (byte[]) form_fields_val#0 + (number) $23 (byte*) form_vic_bg3_lo#0 ← (byte*~) $36 to:@81 + +(void()) gfx_mode() gfx_mode: scope:[gfx_mode] from main::@9 (byte) keyboard_modifiers#128 ← phi( main::@9/(byte) keyboard_modifiers#7 ) (byte) keyboard_events_size#147 ← phi( main::@9/(byte) keyboard_events_size#6 ) @@ -2436,6 +2490,8 @@ gfx_mode::@return: scope:[gfx_mode] from gfx_mode::@31 gfx_mode::@52 (byte) keyboard_modifiers#11 ← (byte) keyboard_modifiers#26 return to:@return + +(void()) gfx_init() gfx_init: scope:[gfx_init] from main::@7 call gfx_init_screen0 to:gfx_init::@1 @@ -2486,6 +2542,8 @@ gfx_init::@15: scope:[gfx_init] from gfx_init::@14 gfx_init::@return: scope:[gfx_init] from gfx_init::@15 return to:@return + +(void()) gfx_init_charset() gfx_init_charset: scope:[gfx_init_charset] from gfx_init::@5 *((byte*) PROCPORT#0) ← (number) $32 (byte*) gfx_init_charset::chargen#0 ← (byte*) CHARGEN#0 @@ -2524,6 +2582,8 @@ gfx_init_charset::@4: scope:[gfx_init_charset] from gfx_init_charset::@3 gfx_init_charset::@return: scope:[gfx_init_charset] from gfx_init_charset::@4 return to:@return + +(void()) gfx_init_screen0() gfx_init_screen0: scope:[gfx_init_screen0] from gfx_init (byte*) gfx_init_screen0::ch#0 ← (byte*) VIC_SCREEN0#0 (byte) gfx_init_screen0::cy#0 ← (byte) 0 @@ -2557,6 +2617,8 @@ gfx_init_screen0::@3: scope:[gfx_init_screen0] from gfx_init_screen0::@2 gfx_init_screen0::@return: scope:[gfx_init_screen0] from gfx_init_screen0::@3 return to:@return + +(void()) gfx_init_screen1() gfx_init_screen1: scope:[gfx_init_screen1] from gfx_init::@1 (byte*) gfx_init_screen1::ch#0 ← (byte*) VIC_SCREEN1#0 (byte) gfx_init_screen1::cy#0 ← (byte) 0 @@ -2588,6 +2650,8 @@ gfx_init_screen1::@3: scope:[gfx_init_screen1] from gfx_init_screen1::@2 gfx_init_screen1::@return: scope:[gfx_init_screen1] from gfx_init_screen1::@3 return to:@return + +(void()) gfx_init_screen2() gfx_init_screen2: scope:[gfx_init_screen2] from gfx_init::@2 (byte*) gfx_init_screen2::ch#0 ← (byte*) VIC_SCREEN2#0 (byte) gfx_init_screen2::cy#0 ← (byte) 0 @@ -2624,6 +2688,8 @@ gfx_init_screen2::@3: scope:[gfx_init_screen2] from gfx_init_screen2::@2 gfx_init_screen2::@return: scope:[gfx_init_screen2] from gfx_init_screen2::@3 return to:@return + +(void()) gfx_init_screen3() gfx_init_screen3: scope:[gfx_init_screen3] from gfx_init::@3 (byte*) gfx_init_screen3::ch#0 ← (byte*) VIC_SCREEN3#0 (byte) gfx_init_screen3::cy#0 ← (byte) 0 @@ -2657,6 +2723,8 @@ gfx_init_screen3::@3: scope:[gfx_init_screen3] from gfx_init_screen3::@2 gfx_init_screen3::@return: scope:[gfx_init_screen3] from gfx_init_screen3::@3 return to:@return + +(void()) gfx_init_screen4() gfx_init_screen4: scope:[gfx_init_screen4] from gfx_init::@4 (byte*) gfx_init_screen4::ch#0 ← (byte*) VIC_SCREEN4#0 (byte) gfx_init_screen4::cy#0 ← (byte) 0 @@ -2686,6 +2754,8 @@ gfx_init_screen4::@3: scope:[gfx_init_screen4] from gfx_init_screen4::@2 gfx_init_screen4::@return: scope:[gfx_init_screen4] from gfx_init_screen4::@3 return to:@return + +(void()) gfx_init_vic_bitmap() gfx_init_vic_bitmap: scope:[gfx_init_vic_bitmap] from gfx_init::@6 (byte*) bitmap_init::bitmap#0 ← (byte*) VIC_BITMAP#0 call bitmap_init @@ -2721,6 +2791,8 @@ gfx_init_vic_bitmap::@9: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap:: gfx_init_vic_bitmap::@return: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap::@1 return to:@return + +(void()) gfx_init_plane_8bppchunky() gfx_init_plane_8bppchunky: scope:[gfx_init_plane_8bppchunky] from gfx_init::@7 (number~) gfx_init_plane_8bppchunky::$0 ← (dword) PLANE_8BPP_CHUNKY#0 / (number) $4000 (byte~) gfx_init_plane_8bppchunky::$1 ← ((byte)) (number~) gfx_init_plane_8bppchunky::$0 @@ -2795,6 +2867,8 @@ gfx_init_plane_8bppchunky::@9: scope:[gfx_init_plane_8bppchunky] from gfx_init_ gfx_init_plane_8bppchunky::@return: scope:[gfx_init_plane_8bppchunky] from gfx_init_plane_8bppchunky::@9 return to:@return + +(void()) gfx_init_plane_horisontal() gfx_init_plane_horisontal: scope:[gfx_init_plane_horisontal] from gfx_init::@9 (number~) gfx_init_plane_horisontal::$0 ← (dword) PLANE_HORISONTAL#0 / (number) $4000 (byte~) gfx_init_plane_horisontal::$1 ← ((byte)) (number~) gfx_init_plane_horisontal::$0 @@ -2862,6 +2936,8 @@ gfx_init_plane_horisontal::@10: scope:[gfx_init_plane_horisontal] from gfx_init gfx_init_plane_horisontal::@return: scope:[gfx_init_plane_horisontal] from gfx_init_plane_horisontal::@10 return to:@return + +(void()) gfx_init_plane_horisontal2() gfx_init_plane_horisontal2: scope:[gfx_init_plane_horisontal2] from gfx_init::@11 (number~) gfx_init_plane_horisontal2::$0 ← (dword) PLANE_HORISONTAL2#0 / (number) $4000 (byte~) gfx_init_plane_horisontal2::$1 ← ((byte)) (number~) gfx_init_plane_horisontal2::$0 @@ -2913,6 +2989,8 @@ gfx_init_plane_horisontal2::@6: scope:[gfx_init_plane_horisontal2] from gfx_ini gfx_init_plane_horisontal2::@return: scope:[gfx_init_plane_horisontal2] from gfx_init_plane_horisontal2::@6 return to:@return + +(void()) gfx_init_plane_vertical() gfx_init_plane_vertical: scope:[gfx_init_plane_vertical] from gfx_init::@10 (number~) gfx_init_plane_vertical::$0 ← (dword) PLANE_VERTICAL#0 / (number) $4000 (byte~) gfx_init_plane_vertical::$1 ← ((byte)) (number~) gfx_init_plane_vertical::$0 @@ -2960,6 +3038,8 @@ gfx_init_plane_vertical::@6: scope:[gfx_init_plane_vertical] from gfx_init_plan gfx_init_plane_vertical::@return: scope:[gfx_init_plane_vertical] from gfx_init_plane_vertical::@6 return to:@return + +(void()) gfx_init_plane_charset8() gfx_init_plane_charset8: scope:[gfx_init_plane_charset8] from gfx_init::@8 (number~) gfx_init_plane_charset8::$0 ← (dword) PLANE_CHARSET8#0 / (number) $4000 (byte~) gfx_init_plane_charset8::$1 ← ((byte)) (number~) gfx_init_plane_charset8::$0 @@ -3067,6 +3147,8 @@ gfx_init_plane_charset8::@10: scope:[gfx_init_plane_charset8] from gfx_init_pla gfx_init_plane_charset8::@return: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@10 return to:@return + +(void()) gfx_init_plane_vertical2() gfx_init_plane_vertical2: scope:[gfx_init_plane_vertical2] from gfx_init::@12 (dword) gfx_init_plane_fill::plane_addr#0 ← (dword) PLANE_VERTICAL2#0 (byte) gfx_init_plane_fill::fill#0 ← (number) $1b @@ -3077,6 +3159,8 @@ gfx_init_plane_vertical2::@1: scope:[gfx_init_plane_vertical2] from gfx_init_pl gfx_init_plane_vertical2::@return: scope:[gfx_init_plane_vertical2] from gfx_init_plane_vertical2::@1 return to:@return + +(void()) gfx_init_plane_blank() gfx_init_plane_blank: scope:[gfx_init_plane_blank] from gfx_init::@13 (dword) gfx_init_plane_fill::plane_addr#1 ← (dword) PLANE_BLANK#0 (byte) gfx_init_plane_fill::fill#1 ← (number) 0 @@ -3087,6 +3171,8 @@ gfx_init_plane_blank::@1: scope:[gfx_init_plane_blank] from gfx_init_plane_blan gfx_init_plane_blank::@return: scope:[gfx_init_plane_blank] from gfx_init_plane_blank::@1 return to:@return + +(void()) gfx_init_plane_full() gfx_init_plane_full: scope:[gfx_init_plane_full] from gfx_init::@14 (dword) gfx_init_plane_fill::plane_addr#2 ← (dword) PLANE_FULL#0 (byte) gfx_init_plane_fill::fill#2 ← (number) $ff @@ -3097,6 +3183,8 @@ gfx_init_plane_full::@1: scope:[gfx_init_plane_full] from gfx_init_plane_full gfx_init_plane_full::@return: scope:[gfx_init_plane_full] from gfx_init_plane_full::@1 return to:@return + +(void()) gfx_init_plane_fill((dword) gfx_init_plane_fill::plane_addr , (byte) gfx_init_plane_fill::fill) gfx_init_plane_fill: scope:[gfx_init_plane_fill] from gfx_init_plane_blank gfx_init_plane_full gfx_init_plane_vertical2 (byte) gfx_init_plane_fill::fill#7 ← phi( gfx_init_plane_blank/(byte) gfx_init_plane_fill::fill#1 gfx_init_plane_full/(byte) gfx_init_plane_fill::fill#2 gfx_init_plane_vertical2/(byte) gfx_init_plane_fill::fill#0 ) (dword) gfx_init_plane_fill::plane_addr#3 ← phi( gfx_init_plane_blank/(dword) gfx_init_plane_fill::plane_addr#1 gfx_init_plane_full/(dword) gfx_init_plane_fill::plane_addr#2 gfx_init_plane_vertical2/(dword) gfx_init_plane_fill::plane_addr#0 ) @@ -3153,6 +3241,8 @@ gfx_init_plane_fill::@6: scope:[gfx_init_plane_fill] from gfx_init_plane_fill:: gfx_init_plane_fill::@return: scope:[gfx_init_plane_fill] from gfx_init_plane_fill::@6 return to:@return + +(void()) form_mode() form_mode: scope:[form_mode] from main::@2 (byte) form_field_idx#66 ← phi( main::@2/(byte) form_field_idx#25 ) (byte) keyboard_modifiers#111 ← phi( main::@2/(byte) keyboard_modifiers#38 ) @@ -3477,6 +3567,8 @@ form_mode::@33: scope:[form_mode] from form_mode::@32 (number~) $37 ← (signed byte) FORM_CURSOR_BLINK#0 / (number) 2 (signed byte) form_cursor_count#4 ← (number~) $37 to:@85 + +(void()) form_set_screen((byte*) form_set_screen::screen) form_set_screen: scope:[form_set_screen] from form_mode::@26 (byte*) form_set_screen::screen#1 ← phi( form_mode::@26/(byte*) form_set_screen::screen#0 ) (byte*) form_set_screen::line#0 ← (byte*) form_set_screen::screen#1 @@ -3498,6 +3590,8 @@ form_set_screen::@1: scope:[form_set_screen] from form_set_screen form_set_scre form_set_screen::@return: scope:[form_set_screen] from form_set_screen::@1 return to:@return + +(byte*()) form_field_ptr((byte) form_field_ptr::field_idx) form_field_ptr: scope:[form_field_ptr] from form_control form_render_values::@2 (byte) form_field_ptr::field_idx#2 ← phi( form_control/(byte) form_field_ptr::field_idx#1 form_render_values::@2/(byte) form_field_ptr::field_idx#0 ) (byte) form_field_ptr::y#0 ← *((byte[]) form_fields_y#0 + (byte) form_field_ptr::field_idx#2) @@ -3513,6 +3607,8 @@ form_field_ptr::@return: scope:[form_field_ptr] from form_field_ptr (byte*) form_field_ptr::return#1 ← (byte*) form_field_ptr::return#4 return to:@return + +(void()) form_render_values() form_render_values: scope:[form_render_values] from form_mode::@27 form_mode::@31 (byte) form_render_values::idx#0 ← (number) 0 to:form_render_values::@1 @@ -3538,6 +3634,8 @@ form_render_values::@7: scope:[form_render_values] from form_render_values::@2 form_render_values::@return: scope:[form_render_values] from form_render_values::@1 return to:@return + +(byte()) form_control() form_control: scope:[form_control] from form_mode::@8 (byte) keyboard_modifiers#94 ← phi( form_mode::@8/(byte) keyboard_modifiers#43 ) (byte) keyboard_events_size#107 ← phi( form_mode::@8/(byte) keyboard_events_size#46 ) @@ -11828,6 +11926,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -11852,6 +11952,8 @@ main::@4: scope:[main] from main::@2 [14] phi() [15] call gfx_mode to:main::@1 + +(void()) gfx_mode() gfx_mode: scope:[gfx_mode] from main::@4 [16] if(*((const byte[]) form_fields_val#0+(byte) 5)==(byte) 0) goto gfx_mode::@1 to:gfx_mode::@10 @@ -12062,6 +12164,8 @@ gfx_mode::@24: scope:[gfx_mode] from gfx_mode::@22 gfx_mode::@24 [150] (byte) gfx_mode::i#1 ← ++ (byte) gfx_mode::i#2 [151] if((byte) gfx_mode::i#1!=(byte) $10) goto gfx_mode::@24 to:gfx_mode::@25 + +(byte()) keyboard_event_get() keyboard_event_get: scope:[keyboard_event_get] from form_control::@19 gfx_mode::@32 [152] if((byte) keyboard_events_size#100==(byte) 0) goto keyboard_event_get::@return to:keyboard_event_get::@1 @@ -12074,6 +12178,8 @@ keyboard_event_get::@return: scope:[keyboard_event_get] from keyboard_event_get [155] (byte) keyboard_event_get::return#2 ← phi( keyboard_event_get/(byte) $ff keyboard_event_get::@1/(byte) keyboard_event_get::return#1 ) [156] return to:@return + +(void()) keyboard_event_scan() keyboard_event_scan: scope:[keyboard_event_scan] from form_control::@3 gfx_mode::@26 [157] (byte) keyboard_events_size#99 ← phi( form_control::@3/(byte) keyboard_events_size#47 gfx_mode::@26/(byte) keyboard_events_size#24 ) to:keyboard_event_scan::@7 @@ -12183,6 +12289,8 @@ keyboard_event_scan::@11: scope:[keyboard_event_scan] from keyboard_event_scan: [209] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#18) ← (byte~) keyboard_event_scan::$23 [210] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#18 to:keyboard_event_scan::@10 + +(byte()) keyboard_event_pressed((byte) keyboard_event_pressed::keycode) keyboard_event_pressed: scope:[keyboard_event_pressed] from keyboard_event_scan::@1 keyboard_event_scan::@17 keyboard_event_scan::@2 keyboard_event_scan::@3 [211] (byte) keyboard_event_pressed::keycode#4 ← phi( keyboard_event_scan::@1/(const byte) KEY_RSHIFT#0 keyboard_event_scan::@2/(const byte) KEY_CTRL#0 keyboard_event_scan::@17/(const byte) KEY_LSHIFT#0 keyboard_event_scan::@3/(const byte) KEY_COMMODORE#0 ) [212] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#4 >> (byte) 3 @@ -12193,6 +12301,8 @@ keyboard_event_pressed: scope:[keyboard_event_pressed] from keyboard_event_scan keyboard_event_pressed::@return: scope:[keyboard_event_pressed] from keyboard_event_pressed [216] return to:@return + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_event_scan::@7 [217] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [218] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) @@ -12200,6 +12310,8 @@ keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_event_scan::@7 keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read [219] return to:@return + +(byte*()) get_vic_screen((byte) get_vic_screen::idx) get_vic_screen: scope:[get_vic_screen] from gfx_mode::@28 gfx_mode::@30 [220] (byte) get_vic_screen::idx#2 ← phi( gfx_mode::@28/(byte) get_vic_screen::idx#0 gfx_mode::@30/(byte) get_vic_screen::idx#1 ) [221] if((byte) get_vic_screen::idx#2==(byte) 0) goto get_vic_screen::@return @@ -12223,6 +12335,8 @@ get_vic_screen::@return: scope:[get_vic_screen] from get_vic_screen get_vic_scr [227] (byte*) get_vic_screen::return#5 ← phi( get_vic_screen/(const byte*) VIC_SCREEN0#0 get_vic_screen::@5/(const byte*) VIC_SCREEN4#0 get_vic_screen::@2/(const byte*) VIC_SCREEN1#0 get_vic_screen::@3/(const byte*) VIC_SCREEN2#0 get_vic_screen::@4/(const byte*) VIC_SCREEN3#0 get_vic_screen::@1/(const byte*) VIC_SCREEN0#0 ) [228] return to:@return + +(byte*()) get_vic_charset((byte) get_vic_charset::idx) get_vic_charset: scope:[get_vic_charset] from gfx_mode::@29 [229] if((byte) get_vic_charset::idx#0==(byte) 0) goto get_vic_charset::@return to:get_vic_charset::@2 @@ -12236,6 +12350,8 @@ get_vic_charset::@return: scope:[get_vic_charset] from get_vic_charset get_vic_ [232] (byte*) get_vic_charset::return#2 ← phi( get_vic_charset/(const byte*) VIC_CHARSET_ROM#0 get_vic_charset::@1/(const byte*) VIC_CHARSET_ROM#0 get_vic_charset::@2/(const byte*) VIC_BITMAP#0 ) [233] return to:@return + +(dword()) get_plane((byte) get_plane::idx) get_plane: scope:[get_plane] from gfx_mode::@27 gfx_mode::@9 [234] (byte) get_plane::idx#10 ← phi( gfx_mode::@27/(byte) get_plane::idx#1 gfx_mode::@9/(byte) get_plane::idx#0 ) [235] if((byte) get_plane::idx#10==(byte) 0) goto get_plane::@return @@ -12286,6 +12402,8 @@ get_plane::@return: scope:[get_plane] from get_plane get_plane::@1 get_plane::@ [250] (dword) get_plane::return#14 ← phi( get_plane/(dword)(const byte*) VIC_SCREEN0#0 get_plane::@10/(const dword) PLANE_HORISONTAL2#0 get_plane::@11/(const dword) PLANE_VERTICAL2#0 get_plane::@12/(const dword) PLANE_CHARSET8#0 get_plane::@13/(const dword) PLANE_BLANK#0 get_plane::@2/(dword)(const byte*) VIC_SCREEN1#0 get_plane::@1/(dword)(const byte*) VIC_SCREEN0#0 get_plane::@3/(dword)(const byte*) VIC_SCREEN2#0 get_plane::@4/(dword)(const byte*) VIC_SCREEN3#0 get_plane::@14/(const dword) PLANE_FULL#0 get_plane::@5/(dword)(const byte*) VIC_BITMAP#0 get_plane::@6/(dword)(const byte*) VIC_CHARSET_ROM#0 get_plane::@7/(const dword) PLANE_8BPP_CHUNKY#0 get_plane::@8/(const dword) PLANE_HORISONTAL#0 get_plane::@9/(const dword) PLANE_VERTICAL#0 ) [251] return to:@return + +(void()) form_mode() form_mode: scope:[form_mode] from main::@2 [252] phi() [253] call print_set_screen @@ -12383,6 +12501,8 @@ form_mode::@19: scope:[form_mode] from form_mode::@18 [302] (byte) render_preset_name::idx#1 ← *((const byte[]) form_fields_val#0) [303] call render_preset_name to:form_mode::@3 + +(void()) render_preset_name((byte) render_preset_name::idx) render_preset_name: scope:[render_preset_name] from form_mode::@15 form_mode::@19 [304] (byte) render_preset_name::idx#10 ← phi( form_mode::@15/(byte) render_preset_name::idx#0 form_mode::@19/(byte) render_preset_name::idx#1 ) [305] if((byte) render_preset_name::idx#10==(byte) 0) goto render_preset_name::@2 @@ -12428,6 +12548,8 @@ render_preset_name::@2: scope:[render_preset_name] from render_preset_name rend render_preset_name::@return: scope:[render_preset_name] from render_preset_name::@2 [320] return to:@return + +(void()) print_str_at((byte*) print_str_at::str , (byte*) print_str_at::at) print_str_at: scope:[print_str_at] from render_preset_name::@2 [321] phi() to:print_str_at::@1 @@ -12444,6 +12566,8 @@ print_str_at::@2: scope:[print_str_at] from print_str_at::@1 [326] (byte*) print_str_at::at#0 ← ++ (byte*) print_str_at::at#2 [327] (byte*) print_str_at::str#0 ← ++ (byte*) print_str_at::str#2 to:print_str_at::@1 + +(void()) form_render_values() form_render_values: scope:[form_render_values] from form_mode::@14 form_mode::@18 [328] phi() to:form_render_values::@1 @@ -12462,6 +12586,8 @@ form_render_values::@3: scope:[form_render_values] from form_render_values::@2 [334] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← *((const byte[]) print_hextab#0 + *((const byte[]) form_fields_val#0 + (byte) form_render_values::idx#2)) [335] (byte) form_render_values::idx#1 ← ++ (byte) form_render_values::idx#2 to:form_render_values::@1 + +(byte*()) form_field_ptr((byte) form_field_ptr::field_idx) form_field_ptr: scope:[form_field_ptr] from form_control form_render_values::@2 [336] (byte) form_field_ptr::field_idx#2 ← phi( form_control/(byte) form_field_ptr::field_idx#1 form_render_values::@2/(byte) form_field_ptr::field_idx#0 ) [337] (byte) form_field_ptr::y#0 ← *((const byte[]) form_fields_y#0 + (byte) form_field_ptr::field_idx#2) @@ -12471,6 +12597,8 @@ form_field_ptr: scope:[form_field_ptr] from form_control form_render_values::@2 form_field_ptr::@return: scope:[form_field_ptr] from form_field_ptr [340] return to:@return + +(void()) apply_preset((byte) apply_preset::idx) apply_preset: scope:[apply_preset] from form_mode::@7 [341] if((byte) apply_preset::idx#0==(byte) 0) goto apply_preset::@2 to:apply_preset::@3 @@ -12521,6 +12649,8 @@ apply_preset::@14: scope:[apply_preset] from apply_preset::@13 [357] *((const byte[]) form_fields_val#0 + (byte) apply_preset::i#2) ← *((byte*) apply_preset::preset#15 + (byte) apply_preset::i#2) [358] (byte) apply_preset::i#1 ← ++ (byte) apply_preset::i#2 to:apply_preset::@13 + +(byte()) form_control() form_control: scope:[form_control] from form_mode::@5 [359] (byte) form_field_ptr::field_idx#1 ← (byte) form_field_idx#28 [360] call form_field_ptr @@ -12616,6 +12746,8 @@ form_control::@2: scope:[form_control] from form_control::@1 [400] (byte~) form_control::$14 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) | (byte) $80 [401] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← (byte~) form_control::$14 to:form_control::@3 + +(void()) form_set_screen((byte*) form_set_screen::screen) form_set_screen: scope:[form_set_screen] from form_mode::@13 [402] phi() to:form_set_screen::@1 @@ -12633,6 +12765,8 @@ form_set_screen::@1: scope:[form_set_screen] from form_set_screen form_set_scre form_set_screen::@return: scope:[form_set_screen] from form_set_screen::@1 [411] return to:@return + +(void()) print_str_lines((byte*) print_str_lines::str) print_str_lines: scope:[print_str_lines] from form_mode::@12 form_mode::@9 [412] (byte*) print_str_lines::str#5 ← phi( form_mode::@9/(const byte[]) FORM_COLS#0 form_mode::@12/(const byte[]) FORM_TEXT#0 ) [413] (byte*~) print_char_cursor#73 ← (byte*) print_set_screen::screen#2 @@ -12668,6 +12802,8 @@ print_str_lines::@5: scope:[print_str_lines] from print_str_lines::@3 print_str_lines::@6: scope:[print_str_lines] from print_str_lines::@5 [427] (byte*~) print_char_cursor#74 ← (byte*) print_line_cursor#22 to:print_str_lines::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from print_str_lines::@5 [428] phi() to:print_ln::@1 @@ -12679,6 +12815,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [432] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from form_mode::@11 form_mode::@8 [433] (void*) memset::str#0 ← (void*)(byte*) print_set_screen::screen#2 [434] call memset @@ -12686,6 +12824,8 @@ print_cls: scope:[print_cls] from form_mode::@11 form_mode::@8 print_cls::@return: scope:[print_cls] from print_cls [435] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [436] phi() to:memset::@1 @@ -12704,12 +12844,16 @@ memset::@3: scope:[memset] from memset::@2 [442] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [443] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) print_set_screen((byte*) print_set_screen::screen) print_set_screen: scope:[print_set_screen] from form_mode form_mode::@10 [444] (byte*) print_set_screen::screen#2 ← phi( form_mode/(const byte*) COLS#0 form_mode::@10/(const byte*) FORM_SCREEN#0 ) to:print_set_screen::@return print_set_screen::@return: scope:[print_set_screen] from print_set_screen [445] return to:@return + +(void()) gfx_init() gfx_init: scope:[gfx_init] from main::@3 [446] phi() [447] call gfx_init_screen0 @@ -12773,6 +12917,8 @@ gfx_init::@14: scope:[gfx_init] from gfx_init::@13 gfx_init::@return: scope:[gfx_init] from gfx_init::@14 [476] return to:@return + +(void()) gfx_init_plane_full() gfx_init_plane_full: scope:[gfx_init_plane_full] from gfx_init::@14 [477] phi() [478] call gfx_init_plane_fill @@ -12780,6 +12926,8 @@ gfx_init_plane_full: scope:[gfx_init_plane_full] from gfx_init::@14 gfx_init_plane_full::@return: scope:[gfx_init_plane_full] from gfx_init_plane_full [479] return to:@return + +(void()) gfx_init_plane_fill((dword) gfx_init_plane_fill::plane_addr , (byte) gfx_init_plane_fill::fill) gfx_init_plane_fill: scope:[gfx_init_plane_fill] from gfx_init_plane_blank gfx_init_plane_full gfx_init_plane_vertical2 [480] (byte) gfx_init_plane_fill::fill#6 ← phi( gfx_init_plane_blank/(byte) 0 gfx_init_plane_full/(byte) $ff gfx_init_plane_vertical2/(byte) $1b ) [480] (dword) gfx_init_plane_fill::plane_addr#3 ← phi( gfx_init_plane_blank/(const dword) PLANE_BLANK#0 gfx_init_plane_full/(const dword) PLANE_FULL#0 gfx_init_plane_vertical2/(const dword) PLANE_VERTICAL2#0 ) @@ -12818,6 +12966,8 @@ gfx_init_plane_fill::@4: scope:[gfx_init_plane_fill] from gfx_init_plane_fill:: gfx_init_plane_fill::@return: scope:[gfx_init_plane_fill] from gfx_init_plane_fill::@4 [500] return to:@return + +(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_8bppchunky gfx_init_plane_8bppchunky::@4 gfx_init_plane_8bppchunky::@6 gfx_init_plane_charset8 gfx_init_plane_charset8::@8 gfx_init_plane_fill gfx_init_plane_fill::@4 gfx_init_plane_horisontal gfx_init_plane_horisontal2 gfx_init_plane_horisontal2::@4 gfx_init_plane_horisontal::@7 gfx_init_plane_vertical gfx_init_plane_vertical::@4 [501] (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 ← phi( gfx_init_plane_8bppchunky/(byte)(const dword) PLANE_8BPP_CHUNKY#0/(word) $4000 gfx_init_plane_8bppchunky::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_plane_8bppchunky::@6/(byte)(number) $4000/(number) $4000 gfx_init_plane_charset8/(const byte) gfx_init_plane_charset8::gfxbCpuBank#0 gfx_init_plane_charset8::@8/(byte)(number) $4000/(number) $4000 gfx_init_plane_fill/(byte) dtvSetCpuBankSegment1::cpuBankIdx#11 gfx_init_plane_fill::@4/(byte)(number) $4000/(number) $4000 gfx_init_plane_horisontal/(const byte) gfx_init_plane_horisontal::gfxbCpuBank#0 gfx_init_plane_horisontal2/(const byte) gfx_init_plane_horisontal2::gfxbCpuBank#0 gfx_init_plane_horisontal2::@4/(byte)(number) $4000/(number) $4000 gfx_init_plane_horisontal::@7/(byte)(number) $4000/(number) $4000 gfx_init_plane_vertical/(const byte) gfx_init_plane_vertical::gfxbCpuBank#0 gfx_init_plane_vertical::@4/(byte)(number) $4000/(number) $4000 ) [502] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 @@ -12826,6 +12976,8 @@ dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_8bppch dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1 [504] return to:@return + +(void()) gfx_init_plane_blank() gfx_init_plane_blank: scope:[gfx_init_plane_blank] from gfx_init::@13 [505] phi() [506] call gfx_init_plane_fill @@ -12833,6 +12985,8 @@ gfx_init_plane_blank: scope:[gfx_init_plane_blank] from gfx_init::@13 gfx_init_plane_blank::@return: scope:[gfx_init_plane_blank] from gfx_init_plane_blank [507] return to:@return + +(void()) gfx_init_plane_vertical2() gfx_init_plane_vertical2: scope:[gfx_init_plane_vertical2] from gfx_init::@12 [508] phi() [509] call gfx_init_plane_fill @@ -12840,6 +12994,8 @@ gfx_init_plane_vertical2: scope:[gfx_init_plane_vertical2] from gfx_init::@12 gfx_init_plane_vertical2::@return: scope:[gfx_init_plane_vertical2] from gfx_init_plane_vertical2 [510] return to:@return + +(void()) gfx_init_plane_horisontal2() gfx_init_plane_horisontal2: scope:[gfx_init_plane_horisontal2] from gfx_init::@11 [511] phi() [512] call dtvSetCpuBankSegment1 @@ -12869,6 +13025,8 @@ gfx_init_plane_horisontal2::@4: scope:[gfx_init_plane_horisontal2] from gfx_ini gfx_init_plane_horisontal2::@return: scope:[gfx_init_plane_horisontal2] from gfx_init_plane_horisontal2::@4 [525] return to:@return + +(void()) gfx_init_plane_vertical() gfx_init_plane_vertical: scope:[gfx_init_plane_vertical] from gfx_init::@10 [526] phi() [527] call dtvSetCpuBankSegment1 @@ -12896,6 +13054,8 @@ gfx_init_plane_vertical::@4: scope:[gfx_init_plane_vertical] from gfx_init_plan gfx_init_plane_vertical::@return: scope:[gfx_init_plane_vertical] from gfx_init_plane_vertical::@4 [538] return to:@return + +(void()) gfx_init_plane_horisontal() gfx_init_plane_horisontal: scope:[gfx_init_plane_horisontal] from gfx_init::@9 [539] phi() [540] call dtvSetCpuBankSegment1 @@ -12934,6 +13094,8 @@ gfx_init_plane_horisontal::@3: scope:[gfx_init_plane_horisontal] from gfx_init_ [555] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) 0 [556] (byte*) gfx_init_plane_horisontal::gfxa#1 ← ++ (byte*) gfx_init_plane_horisontal::gfxa#3 to:gfx_init_plane_horisontal::@4 + +(void()) gfx_init_plane_charset8() gfx_init_plane_charset8: scope:[gfx_init_plane_charset8] from gfx_init::@8 [557] phi() [558] call dtvSetCpuBankSegment1 @@ -12990,6 +13152,8 @@ gfx_init_plane_charset8::@8: scope:[gfx_init_plane_charset8] from gfx_init_plan gfx_init_plane_charset8::@return: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@8 [581] return to:@return + +(void()) gfx_init_plane_8bppchunky() gfx_init_plane_8bppchunky: scope:[gfx_init_plane_8bppchunky] from gfx_init::@7 [582] phi() [583] call dtvSetCpuBankSegment1 @@ -13033,6 +13197,8 @@ gfx_init_plane_8bppchunky::@6: scope:[gfx_init_plane_8bppchunky] from gfx_init_ gfx_init_plane_8bppchunky::@return: scope:[gfx_init_plane_8bppchunky] from gfx_init_plane_8bppchunky::@6 [601] return to:@return + +(void()) gfx_init_vic_bitmap() gfx_init_vic_bitmap: scope:[gfx_init_vic_bitmap] from gfx_init::@6 [602] phi() [603] call bitmap_init @@ -13058,6 +13224,8 @@ gfx_init_vic_bitmap::@2: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap:: gfx_init_vic_bitmap::@4: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap::@2 [614] (byte) gfx_init_vic_bitmap::l#1 ← ++ (byte) gfx_init_vic_bitmap::l#2 to:gfx_init_vic_bitmap::@1 + +(void()) bitmap_line((byte) bitmap_line::x0 , (byte) bitmap_line::x1 , (byte) bitmap_line::y0 , (byte) bitmap_line::y1) bitmap_line: scope:[bitmap_line] from gfx_init_vic_bitmap::@2 [615] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 to:bitmap_line::@2 @@ -13152,6 +13320,8 @@ bitmap_line::@13: scope:[bitmap_line] from bitmap_line::@11 [675] (byte) bitmap_line_xdyi::yd#1 ← (byte) bitmap_line::yd#11 [676] call bitmap_line_xdyi to:bitmap_line::@return + +(void()) bitmap_line_xdyi((byte) bitmap_line_xdyi::x , (byte) bitmap_line_xdyi::y , (byte) bitmap_line_xdyi::x1 , (byte) bitmap_line_xdyi::xd , (byte) bitmap_line_xdyi::yd) bitmap_line_xdyi: scope:[bitmap_line_xdyi] from bitmap_line::@13 bitmap_line::@8 [677] (byte) bitmap_line_xdyi::x1#6 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::x1#0 bitmap_line::@13/(byte) bitmap_line_xdyi::x1#1 ) [677] (byte) bitmap_line_xdyi::xd#5 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::xd#0 bitmap_line::@13/(byte) bitmap_line_xdyi::xd#1 ) @@ -13186,6 +13356,8 @@ bitmap_line_xdyi::@2: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@3 bitmap bitmap_line_xdyi::@return: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@2 [691] return to:@return + +(void()) bitmap_plot((byte) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_line_ydxd::@1 bitmap_line_ydxi::@1 [692] (byte) bitmap_plot::y#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::y#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::y#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::y#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::y#2 ) [692] (byte) bitmap_plot::x#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::x#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::x#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::x#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::x#2 ) @@ -13198,6 +13370,8 @@ bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot [698] return to:@return + +(void()) bitmap_line_ydxi((byte) bitmap_line_ydxi::y , (byte) bitmap_line_ydxi::x , (byte) bitmap_line_ydxi::y1 , (byte) bitmap_line_ydxi::yd , (byte) bitmap_line_ydxi::xd) bitmap_line_ydxi: scope:[bitmap_line_ydxi] from bitmap_line::@14 bitmap_line::@4 [699] (byte) bitmap_line_ydxi::y1#6 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::y1#1 bitmap_line::@4/(byte) bitmap_line_ydxi::y1#0 ) [699] (byte) bitmap_line_ydxi::yd#5 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::yd#1 bitmap_line::@4/(byte) bitmap_line_ydxi::yd#0 ) @@ -13232,6 +13406,8 @@ bitmap_line_ydxi::@2: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@3 bitmap bitmap_line_ydxi::@return: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@2 [713] return to:@return + +(void()) bitmap_line_xdyd((byte) bitmap_line_xdyd::x , (byte) bitmap_line_xdyd::y , (byte) bitmap_line_xdyd::x1 , (byte) bitmap_line_xdyd::xd , (byte) bitmap_line_xdyd::yd) bitmap_line_xdyd: scope:[bitmap_line_xdyd] from bitmap_line::@12 bitmap_line::@9 [714] (byte) bitmap_line_xdyd::x1#6 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::x1#0 bitmap_line::@12/(byte) bitmap_line_xdyd::x1#1 ) [714] (byte) bitmap_line_xdyd::xd#5 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::xd#0 bitmap_line::@12/(byte) bitmap_line_xdyd::xd#1 ) @@ -13266,6 +13442,8 @@ bitmap_line_xdyd::@2: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@3 bitmap bitmap_line_xdyd::@return: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@2 [728] return to:@return + +(void()) bitmap_line_ydxd((byte) bitmap_line_ydxd::y , (byte) bitmap_line_ydxd::x , (byte) bitmap_line_ydxd::y1 , (byte) bitmap_line_ydxd::yd , (byte) bitmap_line_ydxd::xd) bitmap_line_ydxd: scope:[bitmap_line_ydxd] from bitmap_line::@10 bitmap_line::@6 [729] (byte) bitmap_line_ydxd::y1#6 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::y1#0 bitmap_line::@6/(byte) bitmap_line_ydxd::y1#1 ) [729] (byte) bitmap_line_ydxd::yd#5 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::yd#0 bitmap_line::@6/(byte) bitmap_line_ydxd::yd#1 ) @@ -13300,6 +13478,8 @@ bitmap_line_ydxd::@2: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@3 bitmap bitmap_line_ydxd::@return: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@2 [743] return to:@return + +(void()) bitmap_clear() bitmap_clear: scope:[bitmap_clear] from gfx_init_vic_bitmap::@3 [744] (word) bitmap_clear::bitmap#0 ← *((const byte[$100]) bitmap_plot_xhi#0) w= *((const byte[$100]) bitmap_plot_xlo#0) [745] (byte*~) bitmap_clear::bitmap#5 ← (byte*)(word) bitmap_clear::bitmap#0 @@ -13323,6 +13503,8 @@ bitmap_clear::@3: scope:[bitmap_clear] from bitmap_clear::@2 bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@3 [754] return to:@return + +(void()) bitmap_init((byte*) bitmap_init::bitmap) bitmap_init: scope:[bitmap_init] from gfx_init_vic_bitmap [755] phi() to:bitmap_init::@1 @@ -13366,6 +13548,8 @@ bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 [779] return to:@return + +(void()) gfx_init_charset() gfx_init_charset: scope:[gfx_init_charset] from gfx_init::@5 [780] *((const byte*) PROCPORT#0) ← (byte) $32 to:gfx_init_charset::@1 @@ -13394,6 +13578,8 @@ gfx_init_charset::@4: scope:[gfx_init_charset] from gfx_init_charset::@3 gfx_init_charset::@return: scope:[gfx_init_charset] from gfx_init_charset::@4 [791] return to:@return + +(void()) gfx_init_screen4() gfx_init_screen4: scope:[gfx_init_screen4] from gfx_init::@4 [792] phi() to:gfx_init_screen4::@1 @@ -13416,6 +13602,8 @@ gfx_init_screen4::@3: scope:[gfx_init_screen4] from gfx_init_screen4::@2 gfx_init_screen4::@return: scope:[gfx_init_screen4] from gfx_init_screen4::@3 [801] return to:@return + +(void()) gfx_init_screen3() gfx_init_screen3: scope:[gfx_init_screen3] from gfx_init::@3 [802] phi() to:gfx_init_screen3::@1 @@ -13442,6 +13630,8 @@ gfx_init_screen3::@3: scope:[gfx_init_screen3] from gfx_init_screen3::@2 gfx_init_screen3::@return: scope:[gfx_init_screen3] from gfx_init_screen3::@3 [815] return to:@return + +(void()) gfx_init_screen2() gfx_init_screen2: scope:[gfx_init_screen2] from gfx_init::@2 [816] phi() to:gfx_init_screen2::@1 @@ -13469,6 +13659,8 @@ gfx_init_screen2::@3: scope:[gfx_init_screen2] from gfx_init_screen2::@2 gfx_init_screen2::@return: scope:[gfx_init_screen2] from gfx_init_screen2::@3 [830] return to:@return + +(void()) gfx_init_screen1() gfx_init_screen1: scope:[gfx_init_screen1] from gfx_init::@1 [831] phi() to:gfx_init_screen1::@1 @@ -13493,6 +13685,8 @@ gfx_init_screen1::@3: scope:[gfx_init_screen1] from gfx_init_screen1::@2 gfx_init_screen1::@return: scope:[gfx_init_screen1] from gfx_init_screen1::@3 [842] return to:@return + +(void()) gfx_init_screen0() gfx_init_screen0: scope:[gfx_init_screen0] from gfx_init [843] phi() to:gfx_init_screen0::@1 @@ -13519,6 +13713,8 @@ gfx_init_screen0::@3: scope:[gfx_init_screen0] from gfx_init_screen0::@2 gfx_init_screen0::@return: scope:[gfx_init_screen0] from gfx_init_screen0::@3 [856] return to:@return + +(void()) keyboard_init() keyboard_init: scope:[keyboard_init] from main [857] *((const byte*) CIA1_PORT_A_DDR#0) ← (byte) $ff [858] *((const byte*) CIA1_PORT_B_DDR#0) ← (byte) 0 diff --git a/src/test/ref/c64dtv-gfxmodes.cfg b/src/test/ref/c64dtv-gfxmodes.cfg index 859d1163c..63af04769 100644 --- a/src/test/ref/c64dtv-gfxmodes.cfg +++ b/src/test/ref/c64dtv-gfxmodes.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -17,6 +19,8 @@ main::@1: scope:[main] from main main::@1 [8] phi() [9] call menu to:main::@1 + +(void()) menu() menu: scope:[menu] from main::@1 [10] *((const byte*) DTV_GRAPHICS_VIC_BANK#0) ← (byte) 0 [11] *((const byte*) DTV_COLOR_BANK_LO#0) ← <(word)(const dword) DTV_COLOR_BANK_DEFAULT#0/(word) $400 @@ -214,6 +218,8 @@ menu::@3: scope:[menu] from menu::@2 [117] *((byte*) menu::c#2) ← (const byte) LIGHT_GREEN#0 [118] (byte*) menu::c#1 ← ++ (byte*) menu::c#2 to:menu::@2 + +(void()) mode_8bppchunkybmm() mode_8bppchunkybmm: scope:[mode_8bppchunkybmm] from menu::@28 [119] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_COLORRAM_OFF#0 [120] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_ECM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 @@ -279,6 +285,8 @@ mode_8bppchunkybmm::@10: scope:[mode_8bppchunkybmm] from mode_8bppchunkybmm::@8 mode_8bppchunkybmm::@return: scope:[mode_8bppchunkybmm] from mode_8bppchunkybmm::@10 [154] return to:@return + +(void()) mode_ctrl() mode_ctrl: scope:[mode_ctrl] from mode_8bppchunkybmm::@10 mode_8bpppixelcell::@13 mode_ecmchar::@6 mode_hicolecmchar::@6 mode_hicolmcchar::@6 mode_hicolstdchar::@6 mode_mcchar::@6 mode_sixsfred2::@12 mode_sixsfred::@12 mode_stdbitmap::@9 mode_stdchar::@6 mode_twoplanebitmap::@15 [155] (byte) dtv_control#144 ← phi( mode_8bppchunkybmm::@10/(const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_COLORRAM_OFF#0 mode_8bpppixelcell::@13/(const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0 mode_ecmchar::@6/(byte) 0 mode_hicolecmchar::@6/(const byte) DTV_HIGHCOLOR#0 mode_hicolmcchar::@6/(const byte) DTV_HIGHCOLOR#0 mode_hicolstdchar::@6/(const byte) DTV_HIGHCOLOR#0 mode_mcchar::@6/(byte) 0 mode_sixsfred2::@12/(const byte) DTV_LINEAR#0 mode_sixsfred::@12/(const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0 mode_stdbitmap::@9/(byte) 0 mode_stdchar::@6/(byte) 0 mode_twoplanebitmap::@15/(const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0 ) to:mode_ctrl::@1 @@ -393,6 +401,8 @@ mode_ctrl::@18: scope:[mode_ctrl] from mode_ctrl::@11 [209] *((const byte*) DTV_CONTROL#0) ← (byte) mode_ctrl::ctrl#14 [210] *((const byte*) BORDERCOL#0) ← (byte) mode_ctrl::ctrl#14 to:mode_ctrl::@1 + +(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key) keyboard_key_pressed: scope:[keyboard_key_pressed] from menu::@10 menu::@11 menu::@12 menu::@13 menu::@14 menu::@15 menu::@16 menu::@5 menu::@6 menu::@7 menu::@8 menu::@9 mode_ctrl::@10 mode_ctrl::@3 mode_ctrl::@4 mode_ctrl::@5 mode_ctrl::@6 mode_ctrl::@7 mode_ctrl::@8 mode_ctrl::@9 [211] (byte) keyboard_key_pressed::key#20 ← phi( menu::@5/(const byte) KEY_1#0 menu::@6/(const byte) KEY_2#0 menu::@7/(const byte) KEY_3#0 menu::@8/(const byte) KEY_4#0 menu::@9/(const byte) KEY_6#0 menu::@10/(const byte) KEY_7#0 menu::@11/(const byte) KEY_8#0 menu::@12/(const byte) KEY_A#0 menu::@13/(const byte) KEY_B#0 menu::@14/(const byte) KEY_C#0 menu::@15/(const byte) KEY_D#0 menu::@16/(const byte) KEY_E#0 mode_ctrl::@4/(const byte) KEY_L#0 mode_ctrl::@5/(const byte) KEY_H#0 mode_ctrl::@6/(const byte) KEY_O#0 mode_ctrl::@7/(const byte) KEY_B#0 mode_ctrl::@8/(const byte) KEY_U#0 mode_ctrl::@9/(const byte) KEY_C#0 mode_ctrl::@10/(const byte) KEY_0#0 mode_ctrl::@3/(const byte) KEY_SPACE#0 ) [212] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#20 & (byte) 7 @@ -408,6 +418,8 @@ keyboard_key_pressed::@1: scope:[keyboard_key_pressed] from keyboard_key_presse keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@1 [219] return to:@return + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed [220] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [221] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) @@ -415,6 +427,8 @@ keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read [222] return to:@return + +(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from mode_8bppchunkybmm::@2 mode_8bppchunkybmm::@6 mode_8bppchunkybmm::@8 [223] (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 ← phi( mode_8bppchunkybmm::@2/(byte)(const dword) mode_8bppchunkybmm::PLANEB#0/(word) $4000 mode_8bppchunkybmm::@6/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 mode_8bppchunkybmm::@8/(byte)(number) $4000/(number) $4000 ) [224] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 @@ -423,6 +437,8 @@ dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from mode_8bppchunkybmm::@ dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1 [226] return to:@return + +(void()) mode_8bpppixelcell() mode_8bpppixelcell: scope:[mode_8bpppixelcell] from menu::@27 [227] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0 [228] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_ECM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 @@ -519,6 +535,8 @@ mode_8bpppixelcell::@13: scope:[mode_8bpppixelcell] from mode_8bpppixelcell::@1 mode_8bpppixelcell::@return: scope:[mode_8bpppixelcell] from mode_8bpppixelcell::@13 [281] return to:@return + +(void()) mode_sixsfred() mode_sixsfred: scope:[mode_sixsfred] from menu::@26 [282] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0 [283] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_ECM#0|(const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 @@ -606,6 +624,8 @@ mode_sixsfred::@12: scope:[mode_sixsfred] from mode_sixsfred::@11 mode_sixsfred::@return: scope:[mode_sixsfred] from mode_sixsfred::@12 [334] return to:@return + +(void()) mode_twoplanebitmap() mode_twoplanebitmap: scope:[mode_twoplanebitmap] from menu::@25 [335] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0 [336] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_ECM#0|(const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 @@ -706,6 +726,8 @@ mode_twoplanebitmap::@8: scope:[mode_twoplanebitmap] from mode_twoplanebitmap:: [393] *((byte*) mode_twoplanebitmap::gfxa#3) ← (byte) 0 [394] (byte*) mode_twoplanebitmap::gfxa#1 ← ++ (byte*) mode_twoplanebitmap::gfxa#3 to:mode_twoplanebitmap::@9 + +(void()) mode_sixsfred2() mode_sixsfred2: scope:[mode_sixsfred2] from menu::@24 [395] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_LINEAR#0 [396] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_ECM#0|(const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 @@ -795,6 +817,8 @@ mode_sixsfred2::@12: scope:[mode_sixsfred2] from mode_sixsfred2::@11 mode_sixsfred2::@return: scope:[mode_sixsfred2] from mode_sixsfred2::@12 [449] return to:@return + +(void()) mode_hicolmcchar() mode_hicolmcchar: scope:[mode_hicolmcchar] from menu::@23 [450] *((const byte*) DTV_GRAPHICS_VIC_BANK#0) ← (byte) 0 [451] *((const byte*) DTV_COLOR_BANK_LO#0) ← <(word)(const byte*) mode_hicolmcchar::COLORS#0/(word) $400 @@ -849,6 +873,8 @@ mode_hicolmcchar::@6: scope:[mode_hicolmcchar] from mode_hicolmcchar::@5 mode_hicolmcchar::@return: scope:[mode_hicolmcchar] from mode_hicolmcchar::@6 [483] return to:@return + +(void()) mode_hicolecmchar() mode_hicolecmchar: scope:[mode_hicolecmchar] from menu::@22 [484] *((const byte*) DTV_GRAPHICS_VIC_BANK#0) ← (byte) 0 [485] *((const byte*) DTV_COLOR_BANK_LO#0) ← <(word)(const byte*) mode_hicolecmchar::COLORS#0/(word) $400 @@ -904,6 +930,8 @@ mode_hicolecmchar::@6: scope:[mode_hicolecmchar] from mode_hicolecmchar::@5 mode_hicolecmchar::@return: scope:[mode_hicolecmchar] from mode_hicolecmchar::@6 [518] return to:@return + +(void()) mode_hicolstdchar() mode_hicolstdchar: scope:[mode_hicolstdchar] from menu::@21 [519] *((const byte*) DTV_GRAPHICS_VIC_BANK#0) ← (byte) 0 [520] *((const byte*) DTV_COLOR_BANK_LO#0) ← <(word)(const byte*) mode_hicolstdchar::COLORS#0/(word) $400 @@ -956,6 +984,8 @@ mode_hicolstdchar::@6: scope:[mode_hicolstdchar] from mode_hicolstdchar::@5 mode_hicolstdchar::@return: scope:[mode_hicolstdchar] from mode_hicolstdchar::@6 [550] return to:@return + +(void()) mode_stdbitmap() mode_stdbitmap: scope:[mode_stdbitmap] from menu::@20 [551] *((const byte*) DTV_GRAPHICS_VIC_BANK#0) ← (byte) 0 [552] *((const byte*) DTV_CONTROL#0) ← (byte) 0 @@ -1025,6 +1055,8 @@ mode_stdbitmap::@8: scope:[mode_stdbitmap] from mode_stdbitmap::@7 mode_stdbitmap::@11: scope:[mode_stdbitmap] from mode_stdbitmap::@8 [591] (byte) mode_stdbitmap::l#1 ← ++ (byte) mode_stdbitmap::l#2 to:mode_stdbitmap::@7 + +(void()) bitmap_line((byte) bitmap_line::x0 , (byte) bitmap_line::x1 , (byte) bitmap_line::y0 , (byte) bitmap_line::y1) bitmap_line: scope:[bitmap_line] from mode_stdbitmap::@8 [592] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 to:bitmap_line::@2 @@ -1119,6 +1151,8 @@ bitmap_line::@13: scope:[bitmap_line] from bitmap_line::@11 [652] (byte) bitmap_line_xdyi::yd#1 ← (byte) bitmap_line::yd#11 [653] call bitmap_line_xdyi to:bitmap_line::@return + +(void()) bitmap_line_xdyi((byte) bitmap_line_xdyi::x , (byte) bitmap_line_xdyi::y , (byte) bitmap_line_xdyi::x1 , (byte) bitmap_line_xdyi::xd , (byte) bitmap_line_xdyi::yd) bitmap_line_xdyi: scope:[bitmap_line_xdyi] from bitmap_line::@13 bitmap_line::@8 [654] (byte) bitmap_line_xdyi::x1#6 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::x1#0 bitmap_line::@13/(byte) bitmap_line_xdyi::x1#1 ) [654] (byte) bitmap_line_xdyi::xd#5 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::xd#0 bitmap_line::@13/(byte) bitmap_line_xdyi::xd#1 ) @@ -1153,6 +1187,8 @@ bitmap_line_xdyi::@2: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@3 bitmap bitmap_line_xdyi::@return: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@2 [668] return to:@return + +(void()) bitmap_plot((byte) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_line_ydxd::@1 bitmap_line_ydxi::@1 [669] (byte) bitmap_plot::y#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::y#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::y#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::y#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::y#2 ) [669] (byte) bitmap_plot::x#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::x#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::x#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::x#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::x#2 ) @@ -1165,6 +1201,8 @@ bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot [675] return to:@return + +(void()) bitmap_line_ydxi((byte) bitmap_line_ydxi::y , (byte) bitmap_line_ydxi::x , (byte) bitmap_line_ydxi::y1 , (byte) bitmap_line_ydxi::yd , (byte) bitmap_line_ydxi::xd) bitmap_line_ydxi: scope:[bitmap_line_ydxi] from bitmap_line::@14 bitmap_line::@4 [676] (byte) bitmap_line_ydxi::y1#6 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::y1#1 bitmap_line::@4/(byte) bitmap_line_ydxi::y1#0 ) [676] (byte) bitmap_line_ydxi::yd#5 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::yd#1 bitmap_line::@4/(byte) bitmap_line_ydxi::yd#0 ) @@ -1199,6 +1237,8 @@ bitmap_line_ydxi::@2: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@3 bitmap bitmap_line_ydxi::@return: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@2 [690] return to:@return + +(void()) bitmap_line_xdyd((byte) bitmap_line_xdyd::x , (byte) bitmap_line_xdyd::y , (byte) bitmap_line_xdyd::x1 , (byte) bitmap_line_xdyd::xd , (byte) bitmap_line_xdyd::yd) bitmap_line_xdyd: scope:[bitmap_line_xdyd] from bitmap_line::@12 bitmap_line::@9 [691] (byte) bitmap_line_xdyd::x1#6 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::x1#0 bitmap_line::@12/(byte) bitmap_line_xdyd::x1#1 ) [691] (byte) bitmap_line_xdyd::xd#5 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::xd#0 bitmap_line::@12/(byte) bitmap_line_xdyd::xd#1 ) @@ -1233,6 +1273,8 @@ bitmap_line_xdyd::@2: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@3 bitmap bitmap_line_xdyd::@return: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@2 [705] return to:@return + +(void()) bitmap_line_ydxd((byte) bitmap_line_ydxd::y , (byte) bitmap_line_ydxd::x , (byte) bitmap_line_ydxd::y1 , (byte) bitmap_line_ydxd::yd , (byte) bitmap_line_ydxd::xd) bitmap_line_ydxd: scope:[bitmap_line_ydxd] from bitmap_line::@10 bitmap_line::@6 [706] (byte) bitmap_line_ydxd::y1#6 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::y1#0 bitmap_line::@6/(byte) bitmap_line_ydxd::y1#1 ) [706] (byte) bitmap_line_ydxd::yd#5 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::yd#0 bitmap_line::@6/(byte) bitmap_line_ydxd::yd#1 ) @@ -1267,6 +1309,8 @@ bitmap_line_ydxd::@2: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@3 bitmap bitmap_line_ydxd::@return: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@2 [720] return to:@return + +(void()) bitmap_clear() bitmap_clear: scope:[bitmap_clear] from mode_stdbitmap::@10 [721] (word) bitmap_clear::bitmap#0 ← *((const byte[$100]) bitmap_plot_xhi#0) w= *((const byte[$100]) bitmap_plot_xlo#0) [722] (byte*~) bitmap_clear::bitmap#5 ← (byte*)(word) bitmap_clear::bitmap#0 @@ -1290,6 +1334,8 @@ bitmap_clear::@3: scope:[bitmap_clear] from bitmap_clear::@2 bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@3 [731] return to:@return + +(void()) bitmap_init((byte*) bitmap_init::bitmap) bitmap_init: scope:[bitmap_init] from mode_stdbitmap::@6 [732] phi() to:bitmap_init::@1 @@ -1333,6 +1379,8 @@ bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 [756] return to:@return + +(void()) mode_mcchar() mode_mcchar: scope:[mode_mcchar] from menu::@19 [757] *((const byte*) DTV_GRAPHICS_VIC_BANK#0) ← (byte) 0 [758] *((const byte*) DTV_COLOR_BANK_LO#0) ← <(word)(const dword) DTV_COLOR_BANK_DEFAULT#0/(word) $400 @@ -1389,6 +1437,8 @@ mode_mcchar::@6: scope:[mode_mcchar] from mode_mcchar::@5 mode_mcchar::@return: scope:[mode_mcchar] from mode_mcchar::@6 [792] return to:@return + +(void()) mode_ecmchar() mode_ecmchar: scope:[mode_ecmchar] from menu::@18 [793] *((const byte*) DTV_GRAPHICS_VIC_BANK#0) ← (byte) 0 [794] *((const byte*) DTV_COLOR_BANK_LO#0) ← <(word)(const dword) DTV_COLOR_BANK_DEFAULT#0/(word) $400 @@ -1446,6 +1496,8 @@ mode_ecmchar::@6: scope:[mode_ecmchar] from mode_ecmchar::@5 mode_ecmchar::@return: scope:[mode_ecmchar] from mode_ecmchar::@6 [829] return to:@return + +(void()) mode_stdchar() mode_stdchar: scope:[mode_stdchar] from menu::@17 [830] *((const byte*) DTV_GRAPHICS_VIC_BANK#0) ← (byte) 0 [831] *((const byte*) DTV_COLOR_BANK_LO#0) ← <(word)(const dword) DTV_COLOR_BANK_DEFAULT#0/(word) $400 @@ -1500,6 +1552,8 @@ mode_stdchar::@6: scope:[mode_stdchar] from mode_stdchar::@5 mode_stdchar::@return: scope:[mode_stdchar] from mode_stdchar::@6 [863] return to:@return + +(void()) print_str_lines((byte*) print_str_lines::str) print_str_lines: scope:[print_str_lines] from menu::@30 [864] phi() to:print_str_lines::@1 @@ -1534,6 +1588,8 @@ print_str_lines::@5: scope:[print_str_lines] from print_str_lines::@3 print_str_lines::@6: scope:[print_str_lines] from print_str_lines::@5 [878] (byte*~) print_char_cursor#100 ← (byte*) print_line_cursor#19 to:print_str_lines::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from print_str_lines::@5 [879] phi() to:print_ln::@1 @@ -1545,6 +1601,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [883] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from menu::@29 [884] phi() [885] call memset @@ -1552,6 +1610,8 @@ print_cls: scope:[print_cls] from menu::@29 print_cls::@return: scope:[print_cls] from print_cls [886] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [887] phi() to:memset::@1 @@ -1566,6 +1626,8 @@ memset::@2: scope:[memset] from memset::@1 [891] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [892] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) print_set_screen((byte*) print_set_screen::screen) print_set_screen: scope:[print_set_screen] from menu::@4 [893] phi() to:print_set_screen::@return diff --git a/src/test/ref/c64dtv-gfxmodes.log b/src/test/ref/c64dtv-gfxmodes.log index 30c01db72..ad576f34d 100644 --- a/src/test/ref/c64dtv-gfxmodes.log +++ b/src/test/ref/c64dtv-gfxmodes.log @@ -214,6 +214,8 @@ CONTROL FLOW GRAPH SSA (dword) DTV_COLOR_BANK_DEFAULT#0 ← (number) $1d800 (byte*) DTV_GRAPHICS_VIC_BANK#0 ← ((byte*)) (number) $d03d to:@17 + +(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from mode_8bppchunkybmm::@2 mode_8bppchunkybmm::@6 mode_8bppchunkybmm::@8 (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 ← phi( mode_8bppchunkybmm::@2/(byte) dtvSetCpuBankSegment1::cpuBankIdx#0 mode_8bppchunkybmm::@6/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 mode_8bppchunkybmm::@8/(byte) dtvSetCpuBankSegment1::cpuBankIdx#2 ) (byte*) dtvSetCpuBankSegment1::cpuBank#0 ← ((byte*)) (number) $ff @@ -223,6 +225,8 @@ dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from mode_8bppchunkybmm::@ dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1 return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -270,6 +274,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@41 + +(void()) print_str_lines((byte*) print_str_lines::str) print_str_lines: scope:[print_str_lines] from menu::@52 (byte*) print_line_cursor#50 ← phi( menu::@52/(byte*) print_line_cursor#12 ) (byte*) print_char_cursor#52 ← phi( menu::@52/(byte*) print_char_cursor#13 ) @@ -328,6 +334,8 @@ print_str_lines::@return: scope:[print_str_lines] from print_str_lines::@1 (byte*) print_line_cursor#2 ← (byte*) print_line_cursor#17 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from print_str_lines::@7 (byte*) print_char_cursor#34 ← phi( print_str_lines::@7/(byte*) print_char_cursor#32 ) (byte*) print_line_cursor#32 ← phi( print_str_lines::@7/(byte*) print_line_cursor#30 ) @@ -351,6 +359,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_char_cursor#5 ← (byte*) print_char_cursor#21 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from menu::@51 (byte*) print_screen#8 ← phi( menu::@51/(byte*) print_screen#5 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#8 @@ -371,6 +381,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte*) print_char_cursor#7 ← (byte*) print_char_cursor#22 return to:@return + +(void()) print_set_screen((byte*) print_set_screen::screen) print_set_screen: scope:[print_set_screen] from menu::@5 (byte*) print_set_screen::screen#1 ← phi( menu::@5/(byte*) print_set_screen::screen#0 ) (byte*) print_screen#1 ← (byte*) print_set_screen::screen#1 @@ -411,6 +423,8 @@ print_set_screen::@return: scope:[print_set_screen] from print_set_screen (byte[8]) keyboard_matrix_row_bitmask#0 ← { (number) $fe, (number) $fd, (number) $fb, (number) $f7, (number) $ef, (number) $df, (number) $bf, (number) $7f } (byte[8]) keyboard_matrix_col_bitmask#0 ← { (number) 1, (number) 2, (number) 4, (number) 8, (number) $10, (number) $20, (number) $40, (number) $80 } to:@48 + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed (byte) keyboard_matrix_read::rowid#1 ← phi( keyboard_key_pressed/(byte) keyboard_matrix_read::rowid#0 ) *((byte*) CIA1_PORT_A#0) ← *((byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#1) @@ -423,6 +437,8 @@ keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matri (byte) keyboard_matrix_read::return#1 ← (byte) keyboard_matrix_read::return#3 return to:@return + +(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key) keyboard_key_pressed: scope:[keyboard_key_pressed] from menu::@10 menu::@12 menu::@13 menu::@14 menu::@15 menu::@16 menu::@17 menu::@18 menu::@19 menu::@20 menu::@21 menu::@22 mode_ctrl::@12 mode_ctrl::@13 mode_ctrl::@14 mode_ctrl::@15 mode_ctrl::@16 mode_ctrl::@17 mode_ctrl::@18 mode_ctrl::@6 (byte) keyboard_key_pressed::key#20 ← phi( menu::@10/(byte) keyboard_key_pressed::key#0 menu::@12/(byte) keyboard_key_pressed::key#1 menu::@13/(byte) keyboard_key_pressed::key#2 menu::@14/(byte) keyboard_key_pressed::key#3 menu::@15/(byte) keyboard_key_pressed::key#4 menu::@16/(byte) keyboard_key_pressed::key#5 menu::@17/(byte) keyboard_key_pressed::key#6 menu::@18/(byte) keyboard_key_pressed::key#7 menu::@19/(byte) keyboard_key_pressed::key#8 menu::@20/(byte) keyboard_key_pressed::key#9 menu::@21/(byte) keyboard_key_pressed::key#10 menu::@22/(byte) keyboard_key_pressed::key#11 mode_ctrl::@12/(byte) keyboard_key_pressed::key#13 mode_ctrl::@13/(byte) keyboard_key_pressed::key#14 mode_ctrl::@14/(byte) keyboard_key_pressed::key#15 mode_ctrl::@15/(byte) keyboard_key_pressed::key#16 mode_ctrl::@16/(byte) keyboard_key_pressed::key#17 mode_ctrl::@17/(byte) keyboard_key_pressed::key#18 mode_ctrl::@18/(byte) keyboard_key_pressed::key#19 mode_ctrl::@6/(byte) keyboard_key_pressed::key#12 ) (number~) keyboard_key_pressed::$0 ← (byte) keyboard_key_pressed::key#20 & (number) 7 @@ -455,6 +471,8 @@ keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_p (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } to:@57 + +(void()) bitmap_init((byte*) bitmap_init::bitmap) bitmap_init: scope:[bitmap_init] from mode_stdbitmap::@6 (byte*) bitmap_init::bitmap#2 ← phi( mode_stdbitmap::@6/(byte*) bitmap_init::bitmap#0 ) (byte) bitmap_init::bits#0 ← (number) $80 @@ -522,6 +540,8 @@ bitmap_init::@7: scope:[bitmap_init] from bitmap_init::@5 bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@6 return to:@return + +(void()) bitmap_clear() bitmap_clear: scope:[bitmap_clear] from mode_stdbitmap::@13 (byte*~) bitmap_clear::$0 ← ((byte*)) { *((byte[$100]) bitmap_plot_xhi#0 + (number) 0), *((byte[$100]) bitmap_plot_xlo#0 + (number) 0) } (byte*) bitmap_clear::bitmap#0 ← (byte*~) bitmap_clear::$0 @@ -552,6 +572,8 @@ bitmap_clear::@3: scope:[bitmap_clear] from bitmap_clear::@2 bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@3 return to:@return + +(void()) bitmap_plot((byte) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_line_ydxd::@1 bitmap_line_ydxi::@1 (byte) bitmap_plot::y#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::y#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::y#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::y#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::y#2 ) (byte) bitmap_plot::x#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::x#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::x#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::x#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::x#2 ) @@ -565,6 +587,8 @@ bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot return to:@return + +(void()) bitmap_line((byte) bitmap_line::x0 , (byte) bitmap_line::x1 , (byte) bitmap_line::y0 , (byte) bitmap_line::y1) bitmap_line: scope:[bitmap_line] from mode_stdbitmap::@8 (byte) bitmap_line::y1#13 ← phi( mode_stdbitmap::@8/(byte) bitmap_line::y1#0 ) (byte) bitmap_line::y0#13 ← phi( mode_stdbitmap::@8/(byte) bitmap_line::y0#0 ) @@ -762,6 +786,8 @@ bitmap_line::@36: scope:[bitmap_line] from bitmap_line::@27 bitmap_line::@return: scope:[bitmap_line] from bitmap_line::@29 bitmap_line::@30 bitmap_line::@31 bitmap_line::@32 bitmap_line::@33 bitmap_line::@34 bitmap_line::@35 bitmap_line::@36 return to:@return + +(void()) bitmap_line_xdyi((byte) bitmap_line_xdyi::x , (byte) bitmap_line_xdyi::y , (byte) bitmap_line_xdyi::x1 , (byte) bitmap_line_xdyi::xd , (byte) bitmap_line_xdyi::yd) bitmap_line_xdyi: scope:[bitmap_line_xdyi] from bitmap_line::@11 bitmap_line::@25 (byte) bitmap_line_xdyi::x1#6 ← phi( bitmap_line::@11/(byte) bitmap_line_xdyi::x1#0 bitmap_line::@25/(byte) bitmap_line_xdyi::x1#1 ) (byte) bitmap_line_xdyi::xd#5 ← phi( bitmap_line::@11/(byte) bitmap_line_xdyi::xd#0 bitmap_line::@25/(byte) bitmap_line_xdyi::xd#1 ) @@ -821,6 +847,8 @@ bitmap_line_xdyi::@3: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@5 bitmap_line_xdyi::@return: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@2 return to:@return + +(void()) bitmap_line_xdyd((byte) bitmap_line_xdyd::x , (byte) bitmap_line_xdyd::y , (byte) bitmap_line_xdyd::x1 , (byte) bitmap_line_xdyd::xd , (byte) bitmap_line_xdyd::yd) bitmap_line_xdyd: scope:[bitmap_line_xdyd] from bitmap_line::@15 bitmap_line::@21 (byte) bitmap_line_xdyd::x1#6 ← phi( bitmap_line::@15/(byte) bitmap_line_xdyd::x1#0 bitmap_line::@21/(byte) bitmap_line_xdyd::x1#1 ) (byte) bitmap_line_xdyd::xd#5 ← phi( bitmap_line::@15/(byte) bitmap_line_xdyd::xd#0 bitmap_line::@21/(byte) bitmap_line_xdyd::xd#1 ) @@ -880,6 +908,8 @@ bitmap_line_xdyd::@3: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@5 bitmap_line_xdyd::@return: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@2 return to:@return + +(void()) bitmap_line_ydxi((byte) bitmap_line_ydxi::y , (byte) bitmap_line_ydxi::x , (byte) bitmap_line_ydxi::y1 , (byte) bitmap_line_ydxi::yd , (byte) bitmap_line_ydxi::xd) bitmap_line_ydxi: scope:[bitmap_line_ydxi] from bitmap_line::@27 bitmap_line::@5 (byte) bitmap_line_ydxi::y1#6 ← phi( bitmap_line::@27/(byte) bitmap_line_ydxi::y1#1 bitmap_line::@5/(byte) bitmap_line_ydxi::y1#0 ) (byte) bitmap_line_ydxi::yd#5 ← phi( bitmap_line::@27/(byte) bitmap_line_ydxi::yd#1 bitmap_line::@5/(byte) bitmap_line_ydxi::yd#0 ) @@ -939,6 +969,8 @@ bitmap_line_ydxi::@3: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@5 bitmap_line_ydxi::@return: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@2 return to:@return + +(void()) bitmap_line_ydxd((byte) bitmap_line_ydxd::y , (byte) bitmap_line_ydxd::x , (byte) bitmap_line_ydxd::y1 , (byte) bitmap_line_ydxd::yd , (byte) bitmap_line_ydxd::xd) bitmap_line_ydxd: scope:[bitmap_line_ydxd] from bitmap_line::@17 bitmap_line::@8 (byte) bitmap_line_ydxd::y1#6 ← phi( bitmap_line::@17/(byte) bitmap_line_ydxd::y1#0 bitmap_line::@8/(byte) bitmap_line_ydxd::y1#1 ) (byte) bitmap_line_ydxd::yd#5 ← phi( bitmap_line::@17/(byte) bitmap_line_ydxd::yd#0 bitmap_line::@8/(byte) bitmap_line_ydxd::yd#1 ) @@ -999,6 +1031,8 @@ bitmap_line_ydxd::@3: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@5 bitmap_line_ydxd::@return: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@2 return to:@return + +(void()) main() main: scope:[main] from @71 (byte) dtv_control#130 ← phi( @71/(byte) dtv_control#129 ) (byte*) print_char_cursor#54 ← phi( @71/(byte*) print_char_cursor#51 ) @@ -1050,6 +1084,8 @@ main::@return: scope:[main] from main::@1 (byte*) print_screen#65 ← phi( @48/(byte*) print_screen#66 ) (byte[]) MENU_TEXT#0 ← (const string) $1 to:@58 + +(void()) menu() menu: scope:[menu] from main::@2 (byte) dtv_control#254 ← phi( main::@2/(byte) dtv_control#98 ) (byte*) print_char_cursor#99 ← phi( main::@2/(byte*) print_char_cursor#35 ) @@ -1598,6 +1634,8 @@ menu::@77: scope:[menu] from menu::@48 (byte*) print_screen#49 ← phi( @57/(byte*) print_screen#65 ) (byte) dtv_control#15 ← (number) 0 to:@71 + +(void()) mode_ctrl() mode_ctrl: scope:[mode_ctrl] from mode_8bppchunkybmm::@11 mode_8bpppixelcell::@14 mode_ecmchar::@6 mode_hicolecmchar::@6 mode_hicolmcchar::@6 mode_hicolstdchar::@6 mode_mcchar::@6 mode_sixsfred2::@14 mode_sixsfred::@14 mode_stdbitmap::@9 mode_stdchar::@6 mode_twoplanebitmap::@18 (byte) dtv_control#144 ← phi( mode_8bppchunkybmm::@11/(byte) dtv_control#128 mode_8bpppixelcell::@14/(byte) dtv_control#127 mode_ecmchar::@6/(byte) dtv_control#118 mode_hicolecmchar::@6/(byte) dtv_control#122 mode_hicolmcchar::@6/(byte) dtv_control#123 mode_hicolstdchar::@6/(byte) dtv_control#121 mode_mcchar::@6/(byte) dtv_control#119 mode_sixsfred2::@14/(byte) dtv_control#126 mode_sixsfred::@14/(byte) dtv_control#125 mode_stdbitmap::@9/(byte) dtv_control#120 mode_stdchar::@6/(byte) dtv_control#117 mode_twoplanebitmap::@18/(byte) dtv_control#124 ) to:mode_ctrl::@1 @@ -1794,6 +1832,8 @@ mode_ctrl::@30: scope:[mode_ctrl] from mode_ctrl::@19 *((byte*) DTV_CONTROL#0) ← (byte) mode_ctrl::ctrl#15 *((byte*) BORDERCOL#0) ← (byte) mode_ctrl::ctrl#15 to:mode_ctrl::@1 + +(void()) mode_stdchar() mode_stdchar: scope:[mode_stdchar] from menu::@26 (byte*) mode_stdchar::SCREEN#0 ← ((byte*)) (number) $8000 (byte*) mode_stdchar::CHARSET#0 ← ((byte*)) (number) $9000 @@ -1898,6 +1938,8 @@ mode_stdchar::@return: scope:[mode_stdchar] from mode_stdchar::@7 (byte) dtv_control#20 ← (byte) dtv_control#74 return to:@return + +(void()) mode_ecmchar() mode_ecmchar: scope:[mode_ecmchar] from menu::@28 (byte*) mode_ecmchar::SCREEN#0 ← ((byte*)) (number) $8000 (byte*) mode_ecmchar::CHARSET#0 ← ((byte*)) (number) $9000 @@ -2006,6 +2048,8 @@ mode_ecmchar::@return: scope:[mode_ecmchar] from mode_ecmchar::@7 (byte) dtv_control#23 ← (byte) dtv_control#76 return to:@return + +(void()) mode_mcchar() mode_mcchar: scope:[mode_mcchar] from menu::@30 (byte*) mode_mcchar::SCREEN#0 ← ((byte*)) (number) $8000 (byte*) mode_mcchar::CHARSET#0 ← ((byte*)) (number) $9000 @@ -2113,6 +2157,8 @@ mode_mcchar::@return: scope:[mode_mcchar] from mode_mcchar::@7 (byte) dtv_control#26 ← (byte) dtv_control#78 return to:@return + +(void()) mode_stdbitmap() mode_stdbitmap: scope:[mode_stdbitmap] from menu::@32 (byte*) mode_stdbitmap::SCREEN#0 ← ((byte*)) (number) $4000 (byte*) mode_stdbitmap::BITMAP#0 ← ((byte*)) (number) $6000 @@ -2242,6 +2288,8 @@ mode_stdbitmap::@return: scope:[mode_stdbitmap] from mode_stdbitmap::@16 (byte) dtv_control#29 ← (byte) dtv_control#80 return to:@return + +(void()) mode_hicolstdchar() mode_hicolstdchar: scope:[mode_hicolstdchar] from menu::@34 (byte*) mode_hicolstdchar::SCREEN#0 ← ((byte*)) (number) $8000 (byte*) mode_hicolstdchar::CHARSET#0 ← ((byte*)) (number) $9000 @@ -2345,6 +2393,8 @@ mode_hicolstdchar::@return: scope:[mode_hicolstdchar] from mode_hicolstdchar::@ (byte) dtv_control#32 ← (byte) dtv_control#82 return to:@return + +(void()) mode_hicolecmchar() mode_hicolecmchar: scope:[mode_hicolecmchar] from menu::@36 (byte*) mode_hicolecmchar::SCREEN#0 ← ((byte*)) (number) $8000 (byte*) mode_hicolecmchar::CHARSET#0 ← ((byte*)) (number) $9000 @@ -2452,6 +2502,8 @@ mode_hicolecmchar::@return: scope:[mode_hicolecmchar] from mode_hicolecmchar::@ (byte) dtv_control#35 ← (byte) dtv_control#84 return to:@return + +(void()) mode_hicolmcchar() mode_hicolmcchar: scope:[mode_hicolmcchar] from menu::@38 (byte*) mode_hicolmcchar::SCREEN#0 ← ((byte*)) (number) $8000 (byte*) mode_hicolmcchar::CHARSET#0 ← ((byte*)) (number) $9000 @@ -2558,6 +2610,8 @@ mode_hicolmcchar::@return: scope:[mode_hicolmcchar] from mode_hicolmcchar::@7 (byte) dtv_control#38 ← (byte) dtv_control#86 return to:@return + +(void()) mode_twoplanebitmap() mode_twoplanebitmap: scope:[mode_twoplanebitmap] from menu::@42 (byte*) mode_twoplanebitmap::PLANEA#0 ← ((byte*)) (number) $4000 (byte*) mode_twoplanebitmap::PLANEB#0 ← ((byte*)) (number) $6000 @@ -2737,6 +2791,8 @@ mode_twoplanebitmap::@return: scope:[mode_twoplanebitmap] from mode_twoplanebit (byte) dtv_control#41 ← (byte) dtv_control#88 return to:@return + +(void()) mode_sixsfred() mode_sixsfred: scope:[mode_sixsfred] from menu::@44 (byte*) mode_sixsfred::PLANEA#0 ← ((byte*)) (number) $4000 (byte*) mode_sixsfred::PLANEB#0 ← ((byte*)) (number) $6000 @@ -2894,6 +2950,8 @@ mode_sixsfred::@return: scope:[mode_sixsfred] from mode_sixsfred::@15 (byte) dtv_control#44 ← (byte) dtv_control#90 return to:@return + +(void()) mode_sixsfred2() mode_sixsfred2: scope:[mode_sixsfred2] from menu::@40 (byte*) mode_sixsfred2::PLANEA#0 ← ((byte*)) (number) $4000 (byte*) mode_sixsfred2::PLANEB#0 ← ((byte*)) (number) $6000 @@ -3051,6 +3109,8 @@ mode_sixsfred2::@return: scope:[mode_sixsfred2] from mode_sixsfred2::@15 (byte) dtv_control#47 ← (byte) dtv_control#92 return to:@return + +(void()) mode_8bpppixelcell() mode_8bpppixelcell: scope:[mode_8bpppixelcell] from menu::@46 (byte*) mode_8bpppixelcell::PLANEA#0 ← ((byte*)) (number) $3c00 (byte*) mode_8bpppixelcell::PLANEB#0 ← ((byte*)) (number) $4000 @@ -3235,6 +3295,8 @@ mode_8bpppixelcell::@return: scope:[mode_8bpppixelcell] from mode_8bpppixelcell (byte) dtv_control#50 ← (byte) dtv_control#94 return to:@return + +(void()) mode_8bppchunkybmm() mode_8bppchunkybmm: scope:[mode_8bppchunkybmm] from menu::@48 (dword) mode_8bppchunkybmm::PLANEB#0 ← (number) $20000 (byte~) mode_8bppchunkybmm::$0 ← (byte) DTV_HIGHCOLOR#0 | (byte) DTV_LINEAR#0 @@ -10954,6 +11016,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -10964,6 +11028,8 @@ main::@1: scope:[main] from main main::@1 [8] phi() [9] call menu to:main::@1 + +(void()) menu() menu: scope:[menu] from main::@1 [10] *((const byte*) DTV_GRAPHICS_VIC_BANK#0) ← (byte) 0 [11] *((const byte*) DTV_COLOR_BANK_LO#0) ← <(word)(const dword) DTV_COLOR_BANK_DEFAULT#0/(word) $400 @@ -11161,6 +11227,8 @@ menu::@3: scope:[menu] from menu::@2 [117] *((byte*) menu::c#2) ← (const byte) LIGHT_GREEN#0 [118] (byte*) menu::c#1 ← ++ (byte*) menu::c#2 to:menu::@2 + +(void()) mode_8bppchunkybmm() mode_8bppchunkybmm: scope:[mode_8bppchunkybmm] from menu::@28 [119] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_COLORRAM_OFF#0 [120] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_ECM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 @@ -11226,6 +11294,8 @@ mode_8bppchunkybmm::@10: scope:[mode_8bppchunkybmm] from mode_8bppchunkybmm::@8 mode_8bppchunkybmm::@return: scope:[mode_8bppchunkybmm] from mode_8bppchunkybmm::@10 [154] return to:@return + +(void()) mode_ctrl() mode_ctrl: scope:[mode_ctrl] from mode_8bppchunkybmm::@10 mode_8bpppixelcell::@13 mode_ecmchar::@6 mode_hicolecmchar::@6 mode_hicolmcchar::@6 mode_hicolstdchar::@6 mode_mcchar::@6 mode_sixsfred2::@12 mode_sixsfred::@12 mode_stdbitmap::@9 mode_stdchar::@6 mode_twoplanebitmap::@15 [155] (byte) dtv_control#144 ← phi( mode_8bppchunkybmm::@10/(const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_COLORRAM_OFF#0 mode_8bpppixelcell::@13/(const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0 mode_ecmchar::@6/(byte) 0 mode_hicolecmchar::@6/(const byte) DTV_HIGHCOLOR#0 mode_hicolmcchar::@6/(const byte) DTV_HIGHCOLOR#0 mode_hicolstdchar::@6/(const byte) DTV_HIGHCOLOR#0 mode_mcchar::@6/(byte) 0 mode_sixsfred2::@12/(const byte) DTV_LINEAR#0 mode_sixsfred::@12/(const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0 mode_stdbitmap::@9/(byte) 0 mode_stdchar::@6/(byte) 0 mode_twoplanebitmap::@15/(const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0 ) to:mode_ctrl::@1 @@ -11340,6 +11410,8 @@ mode_ctrl::@18: scope:[mode_ctrl] from mode_ctrl::@11 [209] *((const byte*) DTV_CONTROL#0) ← (byte) mode_ctrl::ctrl#14 [210] *((const byte*) BORDERCOL#0) ← (byte) mode_ctrl::ctrl#14 to:mode_ctrl::@1 + +(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key) keyboard_key_pressed: scope:[keyboard_key_pressed] from menu::@10 menu::@11 menu::@12 menu::@13 menu::@14 menu::@15 menu::@16 menu::@5 menu::@6 menu::@7 menu::@8 menu::@9 mode_ctrl::@10 mode_ctrl::@3 mode_ctrl::@4 mode_ctrl::@5 mode_ctrl::@6 mode_ctrl::@7 mode_ctrl::@8 mode_ctrl::@9 [211] (byte) keyboard_key_pressed::key#20 ← phi( menu::@5/(const byte) KEY_1#0 menu::@6/(const byte) KEY_2#0 menu::@7/(const byte) KEY_3#0 menu::@8/(const byte) KEY_4#0 menu::@9/(const byte) KEY_6#0 menu::@10/(const byte) KEY_7#0 menu::@11/(const byte) KEY_8#0 menu::@12/(const byte) KEY_A#0 menu::@13/(const byte) KEY_B#0 menu::@14/(const byte) KEY_C#0 menu::@15/(const byte) KEY_D#0 menu::@16/(const byte) KEY_E#0 mode_ctrl::@4/(const byte) KEY_L#0 mode_ctrl::@5/(const byte) KEY_H#0 mode_ctrl::@6/(const byte) KEY_O#0 mode_ctrl::@7/(const byte) KEY_B#0 mode_ctrl::@8/(const byte) KEY_U#0 mode_ctrl::@9/(const byte) KEY_C#0 mode_ctrl::@10/(const byte) KEY_0#0 mode_ctrl::@3/(const byte) KEY_SPACE#0 ) [212] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#20 & (byte) 7 @@ -11355,6 +11427,8 @@ keyboard_key_pressed::@1: scope:[keyboard_key_pressed] from keyboard_key_presse keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@1 [219] return to:@return + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed [220] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [221] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) @@ -11362,6 +11436,8 @@ keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read [222] return to:@return + +(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from mode_8bppchunkybmm::@2 mode_8bppchunkybmm::@6 mode_8bppchunkybmm::@8 [223] (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 ← phi( mode_8bppchunkybmm::@2/(byte)(const dword) mode_8bppchunkybmm::PLANEB#0/(word) $4000 mode_8bppchunkybmm::@6/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 mode_8bppchunkybmm::@8/(byte)(number) $4000/(number) $4000 ) [224] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 @@ -11370,6 +11446,8 @@ dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from mode_8bppchunkybmm::@ dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1 [226] return to:@return + +(void()) mode_8bpppixelcell() mode_8bpppixelcell: scope:[mode_8bpppixelcell] from menu::@27 [227] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0 [228] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_ECM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 @@ -11466,6 +11544,8 @@ mode_8bpppixelcell::@13: scope:[mode_8bpppixelcell] from mode_8bpppixelcell::@1 mode_8bpppixelcell::@return: scope:[mode_8bpppixelcell] from mode_8bpppixelcell::@13 [281] return to:@return + +(void()) mode_sixsfred() mode_sixsfred: scope:[mode_sixsfred] from menu::@26 [282] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0 [283] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_ECM#0|(const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 @@ -11553,6 +11633,8 @@ mode_sixsfred::@12: scope:[mode_sixsfred] from mode_sixsfred::@11 mode_sixsfred::@return: scope:[mode_sixsfred] from mode_sixsfred::@12 [334] return to:@return + +(void()) mode_twoplanebitmap() mode_twoplanebitmap: scope:[mode_twoplanebitmap] from menu::@25 [335] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0 [336] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_ECM#0|(const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 @@ -11653,6 +11735,8 @@ mode_twoplanebitmap::@8: scope:[mode_twoplanebitmap] from mode_twoplanebitmap:: [393] *((byte*) mode_twoplanebitmap::gfxa#3) ← (byte) 0 [394] (byte*) mode_twoplanebitmap::gfxa#1 ← ++ (byte*) mode_twoplanebitmap::gfxa#3 to:mode_twoplanebitmap::@9 + +(void()) mode_sixsfred2() mode_sixsfred2: scope:[mode_sixsfred2] from menu::@24 [395] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_LINEAR#0 [396] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_ECM#0|(const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 @@ -11742,6 +11826,8 @@ mode_sixsfred2::@12: scope:[mode_sixsfred2] from mode_sixsfred2::@11 mode_sixsfred2::@return: scope:[mode_sixsfred2] from mode_sixsfred2::@12 [449] return to:@return + +(void()) mode_hicolmcchar() mode_hicolmcchar: scope:[mode_hicolmcchar] from menu::@23 [450] *((const byte*) DTV_GRAPHICS_VIC_BANK#0) ← (byte) 0 [451] *((const byte*) DTV_COLOR_BANK_LO#0) ← <(word)(const byte*) mode_hicolmcchar::COLORS#0/(word) $400 @@ -11796,6 +11882,8 @@ mode_hicolmcchar::@6: scope:[mode_hicolmcchar] from mode_hicolmcchar::@5 mode_hicolmcchar::@return: scope:[mode_hicolmcchar] from mode_hicolmcchar::@6 [483] return to:@return + +(void()) mode_hicolecmchar() mode_hicolecmchar: scope:[mode_hicolecmchar] from menu::@22 [484] *((const byte*) DTV_GRAPHICS_VIC_BANK#0) ← (byte) 0 [485] *((const byte*) DTV_COLOR_BANK_LO#0) ← <(word)(const byte*) mode_hicolecmchar::COLORS#0/(word) $400 @@ -11851,6 +11939,8 @@ mode_hicolecmchar::@6: scope:[mode_hicolecmchar] from mode_hicolecmchar::@5 mode_hicolecmchar::@return: scope:[mode_hicolecmchar] from mode_hicolecmchar::@6 [518] return to:@return + +(void()) mode_hicolstdchar() mode_hicolstdchar: scope:[mode_hicolstdchar] from menu::@21 [519] *((const byte*) DTV_GRAPHICS_VIC_BANK#0) ← (byte) 0 [520] *((const byte*) DTV_COLOR_BANK_LO#0) ← <(word)(const byte*) mode_hicolstdchar::COLORS#0/(word) $400 @@ -11903,6 +11993,8 @@ mode_hicolstdchar::@6: scope:[mode_hicolstdchar] from mode_hicolstdchar::@5 mode_hicolstdchar::@return: scope:[mode_hicolstdchar] from mode_hicolstdchar::@6 [550] return to:@return + +(void()) mode_stdbitmap() mode_stdbitmap: scope:[mode_stdbitmap] from menu::@20 [551] *((const byte*) DTV_GRAPHICS_VIC_BANK#0) ← (byte) 0 [552] *((const byte*) DTV_CONTROL#0) ← (byte) 0 @@ -11972,6 +12064,8 @@ mode_stdbitmap::@8: scope:[mode_stdbitmap] from mode_stdbitmap::@7 mode_stdbitmap::@11: scope:[mode_stdbitmap] from mode_stdbitmap::@8 [591] (byte) mode_stdbitmap::l#1 ← ++ (byte) mode_stdbitmap::l#2 to:mode_stdbitmap::@7 + +(void()) bitmap_line((byte) bitmap_line::x0 , (byte) bitmap_line::x1 , (byte) bitmap_line::y0 , (byte) bitmap_line::y1) bitmap_line: scope:[bitmap_line] from mode_stdbitmap::@8 [592] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 to:bitmap_line::@2 @@ -12066,6 +12160,8 @@ bitmap_line::@13: scope:[bitmap_line] from bitmap_line::@11 [652] (byte) bitmap_line_xdyi::yd#1 ← (byte) bitmap_line::yd#11 [653] call bitmap_line_xdyi to:bitmap_line::@return + +(void()) bitmap_line_xdyi((byte) bitmap_line_xdyi::x , (byte) bitmap_line_xdyi::y , (byte) bitmap_line_xdyi::x1 , (byte) bitmap_line_xdyi::xd , (byte) bitmap_line_xdyi::yd) bitmap_line_xdyi: scope:[bitmap_line_xdyi] from bitmap_line::@13 bitmap_line::@8 [654] (byte) bitmap_line_xdyi::x1#6 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::x1#0 bitmap_line::@13/(byte) bitmap_line_xdyi::x1#1 ) [654] (byte) bitmap_line_xdyi::xd#5 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::xd#0 bitmap_line::@13/(byte) bitmap_line_xdyi::xd#1 ) @@ -12100,6 +12196,8 @@ bitmap_line_xdyi::@2: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@3 bitmap bitmap_line_xdyi::@return: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@2 [668] return to:@return + +(void()) bitmap_plot((byte) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_line_ydxd::@1 bitmap_line_ydxi::@1 [669] (byte) bitmap_plot::y#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::y#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::y#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::y#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::y#2 ) [669] (byte) bitmap_plot::x#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::x#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::x#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::x#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::x#2 ) @@ -12112,6 +12210,8 @@ bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot [675] return to:@return + +(void()) bitmap_line_ydxi((byte) bitmap_line_ydxi::y , (byte) bitmap_line_ydxi::x , (byte) bitmap_line_ydxi::y1 , (byte) bitmap_line_ydxi::yd , (byte) bitmap_line_ydxi::xd) bitmap_line_ydxi: scope:[bitmap_line_ydxi] from bitmap_line::@14 bitmap_line::@4 [676] (byte) bitmap_line_ydxi::y1#6 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::y1#1 bitmap_line::@4/(byte) bitmap_line_ydxi::y1#0 ) [676] (byte) bitmap_line_ydxi::yd#5 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::yd#1 bitmap_line::@4/(byte) bitmap_line_ydxi::yd#0 ) @@ -12146,6 +12246,8 @@ bitmap_line_ydxi::@2: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@3 bitmap bitmap_line_ydxi::@return: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@2 [690] return to:@return + +(void()) bitmap_line_xdyd((byte) bitmap_line_xdyd::x , (byte) bitmap_line_xdyd::y , (byte) bitmap_line_xdyd::x1 , (byte) bitmap_line_xdyd::xd , (byte) bitmap_line_xdyd::yd) bitmap_line_xdyd: scope:[bitmap_line_xdyd] from bitmap_line::@12 bitmap_line::@9 [691] (byte) bitmap_line_xdyd::x1#6 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::x1#0 bitmap_line::@12/(byte) bitmap_line_xdyd::x1#1 ) [691] (byte) bitmap_line_xdyd::xd#5 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::xd#0 bitmap_line::@12/(byte) bitmap_line_xdyd::xd#1 ) @@ -12180,6 +12282,8 @@ bitmap_line_xdyd::@2: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@3 bitmap bitmap_line_xdyd::@return: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@2 [705] return to:@return + +(void()) bitmap_line_ydxd((byte) bitmap_line_ydxd::y , (byte) bitmap_line_ydxd::x , (byte) bitmap_line_ydxd::y1 , (byte) bitmap_line_ydxd::yd , (byte) bitmap_line_ydxd::xd) bitmap_line_ydxd: scope:[bitmap_line_ydxd] from bitmap_line::@10 bitmap_line::@6 [706] (byte) bitmap_line_ydxd::y1#6 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::y1#0 bitmap_line::@6/(byte) bitmap_line_ydxd::y1#1 ) [706] (byte) bitmap_line_ydxd::yd#5 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::yd#0 bitmap_line::@6/(byte) bitmap_line_ydxd::yd#1 ) @@ -12214,6 +12318,8 @@ bitmap_line_ydxd::@2: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@3 bitmap bitmap_line_ydxd::@return: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@2 [720] return to:@return + +(void()) bitmap_clear() bitmap_clear: scope:[bitmap_clear] from mode_stdbitmap::@10 [721] (word) bitmap_clear::bitmap#0 ← *((const byte[$100]) bitmap_plot_xhi#0) w= *((const byte[$100]) bitmap_plot_xlo#0) [722] (byte*~) bitmap_clear::bitmap#5 ← (byte*)(word) bitmap_clear::bitmap#0 @@ -12237,6 +12343,8 @@ bitmap_clear::@3: scope:[bitmap_clear] from bitmap_clear::@2 bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@3 [731] return to:@return + +(void()) bitmap_init((byte*) bitmap_init::bitmap) bitmap_init: scope:[bitmap_init] from mode_stdbitmap::@6 [732] phi() to:bitmap_init::@1 @@ -12280,6 +12388,8 @@ bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 [756] return to:@return + +(void()) mode_mcchar() mode_mcchar: scope:[mode_mcchar] from menu::@19 [757] *((const byte*) DTV_GRAPHICS_VIC_BANK#0) ← (byte) 0 [758] *((const byte*) DTV_COLOR_BANK_LO#0) ← <(word)(const dword) DTV_COLOR_BANK_DEFAULT#0/(word) $400 @@ -12336,6 +12446,8 @@ mode_mcchar::@6: scope:[mode_mcchar] from mode_mcchar::@5 mode_mcchar::@return: scope:[mode_mcchar] from mode_mcchar::@6 [792] return to:@return + +(void()) mode_ecmchar() mode_ecmchar: scope:[mode_ecmchar] from menu::@18 [793] *((const byte*) DTV_GRAPHICS_VIC_BANK#0) ← (byte) 0 [794] *((const byte*) DTV_COLOR_BANK_LO#0) ← <(word)(const dword) DTV_COLOR_BANK_DEFAULT#0/(word) $400 @@ -12393,6 +12505,8 @@ mode_ecmchar::@6: scope:[mode_ecmchar] from mode_ecmchar::@5 mode_ecmchar::@return: scope:[mode_ecmchar] from mode_ecmchar::@6 [829] return to:@return + +(void()) mode_stdchar() mode_stdchar: scope:[mode_stdchar] from menu::@17 [830] *((const byte*) DTV_GRAPHICS_VIC_BANK#0) ← (byte) 0 [831] *((const byte*) DTV_COLOR_BANK_LO#0) ← <(word)(const dword) DTV_COLOR_BANK_DEFAULT#0/(word) $400 @@ -12447,6 +12561,8 @@ mode_stdchar::@6: scope:[mode_stdchar] from mode_stdchar::@5 mode_stdchar::@return: scope:[mode_stdchar] from mode_stdchar::@6 [863] return to:@return + +(void()) print_str_lines((byte*) print_str_lines::str) print_str_lines: scope:[print_str_lines] from menu::@30 [864] phi() to:print_str_lines::@1 @@ -12481,6 +12597,8 @@ print_str_lines::@5: scope:[print_str_lines] from print_str_lines::@3 print_str_lines::@6: scope:[print_str_lines] from print_str_lines::@5 [878] (byte*~) print_char_cursor#100 ← (byte*) print_line_cursor#19 to:print_str_lines::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from print_str_lines::@5 [879] phi() to:print_ln::@1 @@ -12492,6 +12610,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [883] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from menu::@29 [884] phi() [885] call memset @@ -12499,6 +12619,8 @@ print_cls: scope:[print_cls] from menu::@29 print_cls::@return: scope:[print_cls] from print_cls [886] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [887] phi() to:memset::@1 @@ -12513,6 +12635,8 @@ memset::@2: scope:[memset] from memset::@1 [891] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [892] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) print_set_screen((byte*) print_set_screen::screen) print_set_screen: scope:[print_set_screen] from menu::@4 [893] phi() to:print_set_screen::@return diff --git a/src/test/ref/call-parameter-autocast.cfg b/src/test/ref/call-parameter-autocast.cfg index ad6fb6392..a68e9a288 100644 --- a/src/test/ref/call-parameter-autocast.cfg +++ b/src/test/ref/call-parameter-autocast.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print @@ -22,6 +24,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [10] return to:@return + +(void()) print((word) print::w) print: scope:[print] from main main::@1 main::@2 [11] (word) print::w#3 ← phi( main/(word) $1234 main::@1/(const word) main::w#0 main::@2/(byte) $12*(word) $100+(byte) $34 ) [11] (byte) idx#12 ← phi( main/(byte) 0 main::@1/(byte) idx#13 main::@2/(byte) idx#13 ) diff --git a/src/test/ref/call-parameter-autocast.log b/src/test/ref/call-parameter-autocast.log index f390ba516..0cddc31a4 100644 --- a/src/test/ref/call-parameter-autocast.log +++ b/src/test/ref/call-parameter-autocast.log @@ -4,6 +4,8 @@ Identified constant variable (word) main::w CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @2 (byte) idx#15 ← phi( @2/(byte) idx#16 ) (word) main::w#0 ← (number) $1234 @@ -35,6 +37,8 @@ main::@return: scope:[main] from main::@3 (word*) SCREEN#0 ← ((word*)) (number) $400 (byte) idx#4 ← (number) 0 to:@2 + +(void()) print((word) print::w) print: scope:[print] from main main::@1 main::@2 (word) print::w#3 ← phi( main/(word) print::w#0 main::@1/(word) print::w#1 main::@2/(word) print::w#2 ) (byte) idx#12 ← phi( main/(byte) idx#15 main::@1/(byte) idx#0 main::@2/(byte) idx#1 ) @@ -208,6 +212,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print @@ -223,6 +229,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [10] return to:@return + +(void()) print((word) print::w) print: scope:[print] from main main::@1 main::@2 [11] (word) print::w#3 ← phi( main/(word) $1234 main::@1/(const word) main::w#0 main::@2/(byte) $12*(word) $100+(byte) $34 ) [11] (byte) idx#12 ← phi( main/(byte) 0 main::@1/(byte) idx#13 main::@2/(byte) idx#13 ) diff --git a/src/test/ref/callconstparam.cfg b/src/test/ref/callconstparam.cfg index 55dad07e4..df7b4cb27 100644 --- a/src/test/ref/callconstparam.cfg +++ b/src/test/ref/callconstparam.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call line @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) line((byte) line::x0 , (byte) line::x1) line: scope:[line] from main main::@1 [9] (byte*) screen#16 ← phi( main/(byte*) 1024 main::@1/(byte*) screen#10 ) [9] (byte) line::x1#3 ← phi( main/(byte) 2 main::@1/(byte) 5 ) diff --git a/src/test/ref/callconstparam.log b/src/test/ref/callconstparam.log index ea059b7b5..ce9f0a468 100644 --- a/src/test/ref/callconstparam.log +++ b/src/test/ref/callconstparam.log @@ -8,6 +8,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) screen#0 ← ((byte*)) (number) $400 to:@2 + +(void()) main() main: scope:[main] from @2 (byte*) screen#13 ← phi( @2/(byte*) screen#15 ) (byte) line::x0#0 ← (number) 1 @@ -30,6 +32,8 @@ main::@return: scope:[main] from main::@2 (byte*) screen#3 ← (byte*) screen#9 return to:@return + +(void()) line((byte) line::x0 , (byte) line::x1) line: scope:[line] from main main::@1 (byte*) screen#16 ← phi( main/(byte*) screen#13 main::@1/(byte*) screen#1 ) (byte) line::x1#3 ← phi( main/(byte) line::x1#0 main::@1/(byte) line::x1#1 ) @@ -206,6 +210,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call line @@ -217,6 +223,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) line((byte) line::x0 , (byte) line::x1) line: scope:[line] from main main::@1 [9] (byte*) screen#16 ← phi( main/(byte*) 1024 main::@1/(byte*) screen#10 ) [9] (byte) line::x1#3 ← phi( main/(byte) 2 main::@1/(byte) 5 ) diff --git a/src/test/ref/cast-deref.cfg b/src/test/ref/cast-deref.cfg index 8c0445ce5..2c85642ae 100644 --- a/src/test/ref/cast-deref.cfg +++ b/src/test/ref/cast-deref.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/cast-deref.log b/src/test/ref/cast-deref.log index 3e7e9c63f..2b65e56fe 100644 --- a/src/test/ref/cast-deref.log +++ b/src/test/ref/cast-deref.log @@ -4,6 +4,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (signed byte[]) main::sbs#0 ← { (number) -1, (number) -2, (number) -3, (number) -4 } (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 @@ -107,6 +109,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/cast-not-needed-2.cfg b/src/test/ref/cast-not-needed-2.cfg index 1f3282767..f9d7183e9 100644 --- a/src/test/ref/cast-not-needed-2.cfg +++ b/src/test/ref/cast-not-needed-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::getScreen1 diff --git a/src/test/ref/cast-not-needed-2.log b/src/test/ref/cast-not-needed-2.log index 756bbd3d9..7d675046b 100644 --- a/src/test/ref/cast-not-needed-2.log +++ b/src/test/ref/cast-not-needed-2.log @@ -12,6 +12,8 @@ CONTROL FLOW GRAPH SSA (byte*~) $1 ← ((byte*)) (number) $1400 (byte*[]) screens#0 ← { (byte*~) $0, (byte*~) $1 } to:@3 + +(void()) main() main: scope:[main] from @3 (byte*) main::screen#0 ← (byte*) 0 (byte) main::getScreen1_id#0 ← (number) 0 @@ -186,6 +188,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::getScreen1 diff --git a/src/test/ref/cast-not-needed-3.cfg b/src/test/ref/cast-not-needed-3.cfg index 02c782256..90cd706dd 100644 --- a/src/test/ref/cast-not-needed-3.cfg +++ b/src/test/ref/cast-not-needed-3.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::getScreen1 diff --git a/src/test/ref/cast-not-needed-3.log b/src/test/ref/cast-not-needed-3.log index 8fb55bea8..e6c55af47 100644 --- a/src/test/ref/cast-not-needed-3.log +++ b/src/test/ref/cast-not-needed-3.log @@ -13,6 +13,8 @@ CONTROL FLOW GRAPH SSA (byte*~) $1 ← ((byte*)) (number) $1400 (byte*[]) screens#0 ← { (byte*~) $0, (byte*~) $1 } to:@3 + +(void()) main() main: scope:[main] from @3 (byte*) main::DSP#0 ← ((byte*)) (number) $400 (byte) main::getScreen1_id#0 ← (number) 0 @@ -186,6 +188,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::getScreen1 diff --git a/src/test/ref/cast-not-needed.cfg b/src/test/ref/cast-not-needed.cfg index 6d82f4e87..6e1fbb155 100644 --- a/src/test/ref/cast-not-needed.cfg +++ b/src/test/ref/cast-not-needed.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::sprite_ptr#0) ← (byte)(const byte*) sprite#0/(byte) $40 to:main::@return diff --git a/src/test/ref/cast-not-needed.log b/src/test/ref/cast-not-needed.log index 6a2fae365..8de31acb1 100644 --- a/src/test/ref/cast-not-needed.log +++ b/src/test/ref/cast-not-needed.log @@ -6,6 +6,8 @@ CONTROL FLOW GRAPH SSA (byte*) sprite#0 ← ((byte*)) (number) $5000 (byte*) SCREEN#0 ← ((byte*)) (number) $4400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte*~) main::$0 ← (byte*) SCREEN#0 + (number) $378 (byte*) main::sprite_ptr#0 ← (byte*~) main::$0 @@ -102,6 +104,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::sprite_ptr#0) ← (byte)(const byte*) sprite#0/(byte) $40 to:main::@return diff --git a/src/test/ref/cast-precedence-problem.cfg b/src/test/ref/cast-precedence-problem.cfg index 3719fb97a..2d79ce406 100644 --- a/src/test/ref/cast-precedence-problem.cfg +++ b/src/test/ref/cast-precedence-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::midw#0 [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::midb#0 diff --git a/src/test/ref/cast-precedence-problem.log b/src/test/ref/cast-precedence-problem.log index e121db21e..064e0cf24 100644 --- a/src/test/ref/cast-precedence-problem.log +++ b/src/test/ref/cast-precedence-problem.log @@ -8,6 +8,8 @@ Culled Empty Block (label) main::@4 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::min#0 ← (number) $a @@ -202,6 +204,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::midw#0 [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::midb#0 diff --git a/src/test/ref/casting.cfg b/src/test/ref/casting.cfg index d92da185d..b0804e0ba 100644 --- a/src/test/ref/casting.cfg +++ b/src/test/ref/casting.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -26,6 +28,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [14] return to:@return + +(void()) w() w: scope:[w] from main::@2 [15] phi() to:w::@1 diff --git a/src/test/ref/casting.log b/src/test/ref/casting.log index 36f892b52..6c6a494dd 100644 --- a/src/test/ref/casting.log +++ b/src/test/ref/casting.log @@ -14,6 +14,8 @@ CONTROL FLOW GRAPH SSA (byte*~) $2 ← (byte*) SCREEN#0 + (number) $28*(number) 9 (byte*) SCREEN4#0 ← (byte*~) $2 to:@2 + +(void()) main() main: scope:[main] from @2 (byte*) SCREEN4#5 ← phi( @2/(byte*) SCREEN4#6 ) (byte*) SCREEN3#5 ← phi( @2/(byte*) SCREEN3#6 ) @@ -47,6 +49,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 return to:@return + +(void()) w() w: scope:[w] from main::@2 (byte*) SCREEN4#2 ← phi( main::@2/(byte*) SCREEN4#3 ) (byte*) SCREEN3#2 ← phi( main::@2/(byte*) SCREEN3#3 ) @@ -285,6 +289,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -304,6 +310,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [14] return to:@return + +(void()) w() w: scope:[w] from main::@2 [15] phi() to:w::@1 diff --git a/src/test/ref/chargen.cfg b/src/test/ref/chargen.cfg index 1931d9742..5db827c89 100644 --- a/src/test/ref/chargen.cfg +++ b/src/test/ref/chargen.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT#0) ← (byte) $32 diff --git a/src/test/ref/chargen.log b/src/test/ref/chargen.log index bff4f4ea6..fc0182127 100644 --- a/src/test/ref/chargen.log +++ b/src/test/ref/chargen.log @@ -8,6 +8,8 @@ CONTROL FLOW GRAPH SSA (byte*) CHARGEN#0 ← ((byte*)) (number) $d000 (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 asm { sei } (byte*~) main::$0 ← (byte*) CHARGEN#0 + (number) 8 @@ -293,6 +295,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT#0) ← (byte) $32 diff --git a/src/test/ref/chessboard.cfg b/src/test/ref/chessboard.cfg index 014aa0662..cd7e9cd46 100644 --- a/src/test/ref/chessboard.cfg +++ b/src/test/ref/chessboard.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/chessboard.log b/src/test/ref/chessboard.log index 935f47331..27221f2ed 100644 --- a/src/test/ref/chessboard.log +++ b/src/test/ref/chessboard.log @@ -3,6 +3,8 @@ Culled Empty Block (label) main::@4 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte*) main::colors#0 ← ((byte*)) (number) $d800 @@ -215,6 +217,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/cia-timer-cyclecount.cfg b/src/test/ref/cia-timer-cyclecount.cfg index 509745bf5..278b98244 100644 --- a/src/test/ref/cia-timer-cyclecount.cfg +++ b/src/test/ref/cia-timer-cyclecount.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -25,6 +27,8 @@ main::@3: scope:[main] from main::@2 [12] (dword) print_dword_at::dw#0 ← (dword) main::cyclecount#0 [13] call print_dword_at to:main::@1 + +(void()) print_dword_at((dword) print_dword_at::dw , (byte*) print_dword_at::at) print_dword_at: scope:[print_dword_at] from main::@3 [14] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0 [15] call print_word_at @@ -36,6 +40,8 @@ print_dword_at::@1: scope:[print_dword_at] from print_dword_at print_dword_at::@return: scope:[print_dword_at] from print_dword_at::@1 [18] return to:@return + +(void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at) print_word_at: scope:[print_word_at] from print_dword_at print_dword_at::@1 [19] (byte*) print_word_at::at#2 ← phi( print_dword_at/(const byte*) SCREEN#0 print_dword_at::@1/(const byte*) SCREEN#0+(byte) 4 ) [19] (word) print_word_at::w#2 ← phi( print_dword_at/(word) print_word_at::w#0 print_dword_at::@1/(word) print_word_at::w#1 ) @@ -51,6 +57,8 @@ print_word_at::@1: scope:[print_word_at] from print_word_at print_word_at::@return: scope:[print_word_at] from print_word_at::@1 [26] return to:@return + +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) print_byte_at: scope:[print_byte_at] from print_word_at print_word_at::@1 [27] (byte*) print_byte_at::at#2 ← phi( print_word_at/(byte*) print_byte_at::at#0 print_word_at::@1/(byte*) print_byte_at::at#1 ) [27] (byte) print_byte_at::b#2 ← phi( print_word_at/(byte) print_byte_at::b#0 print_word_at::@1/(byte) print_byte_at::b#1 ) @@ -68,6 +76,8 @@ print_byte_at::@1: scope:[print_byte_at] from print_byte_at print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@1 [36] return to:@return + +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 [37] (byte*) print_char_at::at#2 ← phi( print_byte_at/(byte*) print_char_at::at#0 print_byte_at::@1/(byte*) print_char_at::at#1 ) [37] (byte) print_char_at::ch#2 ← phi( print_byte_at/(byte) print_char_at::ch#0 print_byte_at::@1/(byte) print_char_at::ch#1 ) @@ -76,12 +86,16 @@ print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print_char_at::@return: scope:[print_char_at] from print_char_at [39] return to:@return + +(dword()) clock() clock: scope:[clock] from main::@2 [40] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) to:clock::@return clock::@return: scope:[clock] from clock [41] return to:@return + +(void()) clock_start() clock_start: scope:[clock_start] from main::@1 [42] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [43] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 diff --git a/src/test/ref/cia-timer-cyclecount.log b/src/test/ref/cia-timer-cyclecount.log index 186d061bf..51bf34737 100644 --- a/src/test/ref/cia-timer-cyclecount.log +++ b/src/test/ref/cia-timer-cyclecount.log @@ -70,6 +70,8 @@ CONTROL FLOW GRAPH SSA @4: scope:[] from @begin (dword) CLOCKS_PER_INIT#0 ← (number) $12 to:@35 + +(dword()) clock() clock: scope:[clock] from main::@7 (number~) clock::$0 ← (number) $ffffffff - *((dword*) CIA2_TIMER_AB#0) (dword) clock::return#0 ← (number~) clock::$0 @@ -79,6 +81,8 @@ clock::@return: scope:[clock] from clock (dword) clock::return#1 ← (dword) clock::return#3 return to:@return + +(void()) clock_start() clock_start: scope:[clock_start] from main::@2 (byte~) clock_start::$0 ← (byte) CIA_TIMER_CONTROL_STOP#0 | (byte) CIA_TIMER_CONTROL_CONTINUOUS#0 (byte~) clock_start::$1 ← (byte~) clock_start::$0 | (byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES#0 @@ -97,6 +101,8 @@ clock_start: scope:[clock_start] from main::@2 clock_start::@return: scope:[clock_start] from clock_start return to:@return + +(void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at) print_word_at: scope:[print_word_at] from print_dword_at print_dword_at::@1 (byte*) print_word_at::at#2 ← phi( print_dword_at/(byte*) print_word_at::at#0 print_dword_at::@1/(byte*) print_word_at::at#1 ) (word) print_word_at::w#2 ← phi( print_dword_at/(word) print_word_at::w#0 print_dword_at::@1/(word) print_word_at::w#1 ) @@ -119,6 +125,8 @@ print_word_at::@2: scope:[print_word_at] from print_word_at::@1 print_word_at::@return: scope:[print_word_at] from print_word_at::@2 return to:@return + +(void()) print_dword_at((dword) print_dword_at::dw , (byte*) print_dword_at::at) print_dword_at: scope:[print_dword_at] from main::@8 (byte*) print_dword_at::at#1 ← phi( main::@8/(byte*) print_dword_at::at#0 ) (dword) print_dword_at::dw#1 ← phi( main::@8/(dword) print_dword_at::dw#0 ) @@ -144,6 +152,8 @@ print_dword_at::@return: scope:[print_dword_at] from print_dword_at::@2 @35: scope:[] from @4 (byte[]) print_hextab#0 ← (const string) $1 to:@42 + +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) print_byte_at: scope:[print_byte_at] from print_word_at print_word_at::@1 (byte*) print_byte_at::at#2 ← phi( print_word_at/(byte*) print_byte_at::at#0 print_word_at::@1/(byte*) print_byte_at::at#1 ) (byte) print_byte_at::b#2 ← phi( print_word_at/(byte) print_byte_at::b#0 print_word_at::@1/(byte) print_byte_at::b#1 ) @@ -166,6 +176,8 @@ print_byte_at::@2: scope:[print_byte_at] from print_byte_at::@1 print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@2 return to:@return + +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 (byte*) print_char_at::at#2 ← phi( print_byte_at/(byte*) print_char_at::at#0 print_byte_at::@1/(byte*) print_char_at::at#1 ) (byte) print_char_at::ch#2 ← phi( print_byte_at/(byte) print_char_at::ch#0 print_byte_at::@1/(byte) print_char_at::ch#1 ) @@ -177,6 +189,8 @@ print_char_at::@return: scope:[print_char_at] from print_char_at @42: scope:[] from @35 (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@43 + +(void()) main() main: scope:[main] from @43 to:main::@1 main::@1: scope:[main] from main main::@9 @@ -538,6 +552,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -556,6 +572,8 @@ main::@3: scope:[main] from main::@2 [12] (dword) print_dword_at::dw#0 ← (dword) main::cyclecount#0 [13] call print_dword_at to:main::@1 + +(void()) print_dword_at((dword) print_dword_at::dw , (byte*) print_dword_at::at) print_dword_at: scope:[print_dword_at] from main::@3 [14] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0 [15] call print_word_at @@ -567,6 +585,8 @@ print_dword_at::@1: scope:[print_dword_at] from print_dword_at print_dword_at::@return: scope:[print_dword_at] from print_dword_at::@1 [18] return to:@return + +(void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at) print_word_at: scope:[print_word_at] from print_dword_at print_dword_at::@1 [19] (byte*) print_word_at::at#2 ← phi( print_dword_at/(const byte*) SCREEN#0 print_dword_at::@1/(const byte*) SCREEN#0+(byte) 4 ) [19] (word) print_word_at::w#2 ← phi( print_dword_at/(word) print_word_at::w#0 print_dword_at::@1/(word) print_word_at::w#1 ) @@ -582,6 +602,8 @@ print_word_at::@1: scope:[print_word_at] from print_word_at print_word_at::@return: scope:[print_word_at] from print_word_at::@1 [26] return to:@return + +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) print_byte_at: scope:[print_byte_at] from print_word_at print_word_at::@1 [27] (byte*) print_byte_at::at#2 ← phi( print_word_at/(byte*) print_byte_at::at#0 print_word_at::@1/(byte*) print_byte_at::at#1 ) [27] (byte) print_byte_at::b#2 ← phi( print_word_at/(byte) print_byte_at::b#0 print_word_at::@1/(byte) print_byte_at::b#1 ) @@ -599,6 +621,8 @@ print_byte_at::@1: scope:[print_byte_at] from print_byte_at print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@1 [36] return to:@return + +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 [37] (byte*) print_char_at::at#2 ← phi( print_byte_at/(byte*) print_char_at::at#0 print_byte_at::@1/(byte*) print_char_at::at#1 ) [37] (byte) print_char_at::ch#2 ← phi( print_byte_at/(byte) print_char_at::ch#0 print_byte_at::@1/(byte) print_char_at::ch#1 ) @@ -607,12 +631,16 @@ print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print_char_at::@return: scope:[print_char_at] from print_char_at [39] return to:@return + +(dword()) clock() clock: scope:[clock] from main::@2 [40] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) to:clock::@return clock::@return: scope:[clock] from clock [41] return to:@return + +(void()) clock_start() clock_start: scope:[clock_start] from main::@1 [42] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [43] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 diff --git a/src/test/ref/cia-timer-simple.cfg b/src/test/ref/cia-timer-simple.cfg index 885a5fffd..7fa1bb008 100644 --- a/src/test/ref/cia-timer-simple.cfg +++ b/src/test/ref/cia-timer-simple.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call clock_start @@ -20,6 +22,8 @@ main::@2: scope:[main] from main::@1 [9] (dword) print_dword_at::dw#0 ← (dword) clock::return#2 [10] call print_dword_at to:main::@1 + +(void()) print_dword_at((dword) print_dword_at::dw , (byte*) print_dword_at::at) print_dword_at: scope:[print_dword_at] from main::@2 [11] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0 [12] call print_word_at @@ -31,6 +35,8 @@ print_dword_at::@1: scope:[print_dword_at] from print_dword_at print_dword_at::@return: scope:[print_dword_at] from print_dword_at::@1 [15] return to:@return + +(void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at) print_word_at: scope:[print_word_at] from print_dword_at print_dword_at::@1 [16] (byte*) print_word_at::at#2 ← phi( print_dword_at/(const byte*) SCREEN#0 print_dword_at::@1/(const byte*) SCREEN#0+(byte) 4 ) [16] (word) print_word_at::w#2 ← phi( print_dword_at/(word) print_word_at::w#0 print_dword_at::@1/(word) print_word_at::w#1 ) @@ -46,6 +52,8 @@ print_word_at::@1: scope:[print_word_at] from print_word_at print_word_at::@return: scope:[print_word_at] from print_word_at::@1 [23] return to:@return + +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) print_byte_at: scope:[print_byte_at] from print_word_at print_word_at::@1 [24] (byte*) print_byte_at::at#2 ← phi( print_word_at/(byte*) print_byte_at::at#0 print_word_at::@1/(byte*) print_byte_at::at#1 ) [24] (byte) print_byte_at::b#2 ← phi( print_word_at/(byte) print_byte_at::b#0 print_word_at::@1/(byte) print_byte_at::b#1 ) @@ -63,6 +71,8 @@ print_byte_at::@1: scope:[print_byte_at] from print_byte_at print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@1 [33] return to:@return + +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 [34] (byte*) print_char_at::at#2 ← phi( print_byte_at/(byte*) print_char_at::at#0 print_byte_at::@1/(byte*) print_char_at::at#1 ) [34] (byte) print_char_at::ch#2 ← phi( print_byte_at/(byte) print_char_at::ch#0 print_byte_at::@1/(byte) print_char_at::ch#1 ) @@ -71,12 +81,16 @@ print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print_char_at::@return: scope:[print_char_at] from print_char_at [36] return to:@return + +(dword()) clock() clock: scope:[clock] from main::@1 [37] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) to:clock::@return clock::@return: scope:[clock] from clock [38] return to:@return + +(void()) clock_start() clock_start: scope:[clock_start] from main [39] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [40] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 diff --git a/src/test/ref/cia-timer-simple.log b/src/test/ref/cia-timer-simple.log index 858386316..b30931c88 100644 --- a/src/test/ref/cia-timer-simple.log +++ b/src/test/ref/cia-timer-simple.log @@ -68,6 +68,8 @@ CONTROL FLOW GRAPH SSA (byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES#0 ← (number) 0 (byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 ← (number) $40 to:@35 + +(dword()) clock() clock: scope:[clock] from main::@2 (number~) clock::$0 ← (number) $ffffffff - *((dword*) CIA2_TIMER_AB#0) (dword) clock::return#0 ← (number~) clock::$0 @@ -77,6 +79,8 @@ clock::@return: scope:[clock] from clock (dword) clock::return#1 ← (dword) clock::return#3 return to:@return + +(void()) clock_start() clock_start: scope:[clock_start] from main (byte~) clock_start::$0 ← (byte) CIA_TIMER_CONTROL_STOP#0 | (byte) CIA_TIMER_CONTROL_CONTINUOUS#0 (byte~) clock_start::$1 ← (byte~) clock_start::$0 | (byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES#0 @@ -95,6 +99,8 @@ clock_start: scope:[clock_start] from main clock_start::@return: scope:[clock_start] from clock_start return to:@return + +(void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at) print_word_at: scope:[print_word_at] from print_dword_at print_dword_at::@1 (byte*) print_word_at::at#2 ← phi( print_dword_at/(byte*) print_word_at::at#0 print_dword_at::@1/(byte*) print_word_at::at#1 ) (word) print_word_at::w#2 ← phi( print_dword_at/(word) print_word_at::w#0 print_dword_at::@1/(word) print_word_at::w#1 ) @@ -117,6 +123,8 @@ print_word_at::@2: scope:[print_word_at] from print_word_at::@1 print_word_at::@return: scope:[print_word_at] from print_word_at::@2 return to:@return + +(void()) print_dword_at((dword) print_dword_at::dw , (byte*) print_dword_at::at) print_dword_at: scope:[print_dword_at] from main::@8 (byte*) print_dword_at::at#1 ← phi( main::@8/(byte*) print_dword_at::at#0 ) (dword) print_dword_at::dw#1 ← phi( main::@8/(dword) print_dword_at::dw#0 ) @@ -142,6 +150,8 @@ print_dword_at::@return: scope:[print_dword_at] from print_dword_at::@2 @35: scope:[] from @begin (byte[]) print_hextab#0 ← (const string) $1 to:@42 + +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) print_byte_at: scope:[print_byte_at] from print_word_at print_word_at::@1 (byte*) print_byte_at::at#2 ← phi( print_word_at/(byte*) print_byte_at::at#0 print_word_at::@1/(byte*) print_byte_at::at#1 ) (byte) print_byte_at::b#2 ← phi( print_word_at/(byte) print_byte_at::b#0 print_word_at::@1/(byte) print_byte_at::b#1 ) @@ -164,6 +174,8 @@ print_byte_at::@2: scope:[print_byte_at] from print_byte_at::@1 print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@2 return to:@return + +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 (byte*) print_char_at::at#2 ← phi( print_byte_at/(byte*) print_char_at::at#0 print_byte_at::@1/(byte*) print_char_at::at#1 ) (byte) print_char_at::ch#2 ← phi( print_byte_at/(byte) print_char_at::ch#0 print_byte_at::@1/(byte) print_char_at::ch#1 ) @@ -175,6 +187,8 @@ print_char_at::@return: scope:[print_char_at] from print_char_at @42: scope:[] from @35 (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@43 + +(void()) main() main: scope:[main] from @43 call clock_start to:main::@7 @@ -521,6 +535,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call clock_start @@ -534,6 +550,8 @@ main::@2: scope:[main] from main::@1 [9] (dword) print_dword_at::dw#0 ← (dword) clock::return#2 [10] call print_dword_at to:main::@1 + +(void()) print_dword_at((dword) print_dword_at::dw , (byte*) print_dword_at::at) print_dword_at: scope:[print_dword_at] from main::@2 [11] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0 [12] call print_word_at @@ -545,6 +563,8 @@ print_dword_at::@1: scope:[print_dword_at] from print_dword_at print_dword_at::@return: scope:[print_dword_at] from print_dword_at::@1 [15] return to:@return + +(void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at) print_word_at: scope:[print_word_at] from print_dword_at print_dword_at::@1 [16] (byte*) print_word_at::at#2 ← phi( print_dword_at/(const byte*) SCREEN#0 print_dword_at::@1/(const byte*) SCREEN#0+(byte) 4 ) [16] (word) print_word_at::w#2 ← phi( print_dword_at/(word) print_word_at::w#0 print_dword_at::@1/(word) print_word_at::w#1 ) @@ -560,6 +580,8 @@ print_word_at::@1: scope:[print_word_at] from print_word_at print_word_at::@return: scope:[print_word_at] from print_word_at::@1 [23] return to:@return + +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) print_byte_at: scope:[print_byte_at] from print_word_at print_word_at::@1 [24] (byte*) print_byte_at::at#2 ← phi( print_word_at/(byte*) print_byte_at::at#0 print_word_at::@1/(byte*) print_byte_at::at#1 ) [24] (byte) print_byte_at::b#2 ← phi( print_word_at/(byte) print_byte_at::b#0 print_word_at::@1/(byte) print_byte_at::b#1 ) @@ -577,6 +599,8 @@ print_byte_at::@1: scope:[print_byte_at] from print_byte_at print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@1 [33] return to:@return + +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 [34] (byte*) print_char_at::at#2 ← phi( print_byte_at/(byte*) print_char_at::at#0 print_byte_at::@1/(byte*) print_char_at::at#1 ) [34] (byte) print_char_at::ch#2 ← phi( print_byte_at/(byte) print_char_at::ch#0 print_byte_at::@1/(byte) print_char_at::ch#1 ) @@ -585,12 +609,16 @@ print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print_char_at::@return: scope:[print_char_at] from print_char_at [36] return to:@return + +(dword()) clock() clock: scope:[clock] from main::@1 [37] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) to:clock::@return clock::@return: scope:[clock] from clock [38] return to:@return + +(void()) clock_start() clock_start: scope:[clock_start] from main [39] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [40] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 diff --git a/src/test/ref/clobber-a-problem.cfg b/src/test/ref/clobber-a-problem.cfg index 8fbffe9a1..1de519e7a 100644 --- a/src/test/ref/clobber-a-problem.cfg +++ b/src/test/ref/clobber-a-problem.cfg @@ -10,12 +10,16 @@ to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 [5] *((const void()**) KERNEL_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() to:main::@return main::@return: scope:[main] from main [6] return to:@return + +interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from [7] *((const byte*) BORDERCOL#0) ← (const byte) DARK_GREY#0 [8] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 diff --git a/src/test/ref/clobber-a-problem.log b/src/test/ref/clobber-a-problem.log index 354113d01..134b5a94b 100644 --- a/src/test/ref/clobber-a-problem.log +++ b/src/test/ref/clobber-a-problem.log @@ -12,6 +12,8 @@ CONTROL FLOW GRAPH SSA (byte) BLACK#0 ← (number) 0 (void()**) KERNEL_IRQ#0 ← ((void()**)) (number) $314 to:@1 + +(void()) main() main: scope:[main] from @2 (void()*~) main::$0 ← & interrupt(HARDWARE_CLOBBER)(void()) irq() *((void()**) KERNEL_IRQ#0) ← (void()*~) main::$0 @@ -22,6 +24,8 @@ main::@return: scope:[main] from main @1: scope:[] from @begin (byte) irq_raster_next#0 ← (number) 0 to:@2 + +interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from (byte) irq_raster_next#3 ← phi( @2/(byte) irq_raster_next#5 ) *((byte*) BORDERCOL#0) ← (byte) DARK_GREY#0 @@ -188,12 +192,16 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 [5] *((const void()**) KERNEL_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() to:main::@return main::@return: scope:[main] from main [6] return to:@return + +interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from [7] *((const byte*) BORDERCOL#0) ← (const byte) DARK_GREY#0 [8] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15 diff --git a/src/test/ref/coalesce-assignment.cfg b/src/test/ref/coalesce-assignment.cfg index f397ee9d2..123f95e7c 100644 --- a/src/test/ref/coalesce-assignment.cfg +++ b/src/test/ref/coalesce-assignment.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/coalesce-assignment.log b/src/test/ref/coalesce-assignment.log index 30fa03785..708095f68 100644 --- a/src/test/ref/coalesce-assignment.log +++ b/src/test/ref/coalesce-assignment.log @@ -3,6 +3,8 @@ Culled Empty Block (label) main::@4 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::idx#0 ← (number) 0 @@ -174,6 +176,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/code-after-return-1.cfg b/src/test/ref/code-after-return-1.cfg index 4bd9013c1..fdb6c42d0 100644 --- a/src/test/ref/code-after-return-1.cfg +++ b/src/test/ref/code-after-return-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (const byte) b#0 to:main::@return diff --git a/src/test/ref/code-after-return-1.log b/src/test/ref/code-after-return-1.log index e9256aff5..cf2a6e7fa 100644 --- a/src/test/ref/code-after-return-1.log +++ b/src/test/ref/code-after-return-1.log @@ -5,6 +5,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte) b#0 ← (number) 0 to:@2 + +(void()) main() main: scope:[main] from @2 (byte) b#6 ← phi( @2/(byte) b#12 ) *((byte*) SCREEN#0 + (number) 0) ← (byte) b#6 @@ -23,6 +25,8 @@ main::@2: scope:[main] from main::@1 (byte) b#2 ← (byte) b#8 *((byte*) SCREEN#0 + (number) 1) ← (byte) b#2 to:main::@return + +(void()) bb() bb: scope:[bb] from main::@1 (byte) b#9 ← phi( main::@1/(byte) b#13 ) (byte) b#3 ← ++ (byte) b#9 @@ -138,6 +142,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (const byte) b#0 to:main::@return diff --git a/src/test/ref/code-after-return.cfg b/src/test/ref/code-after-return.cfg index 2ad1a6c23..a9f98ce37 100644 --- a/src/test/ref/code-after-return.cfg +++ b/src/test/ref/code-after-return.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) 'a' to:main::@return diff --git a/src/test/ref/code-after-return.log b/src/test/ref/code-after-return.log index 3c339c903..e8db6befa 100644 --- a/src/test/ref/code-after-return.log +++ b/src/test/ref/code-after-return.log @@ -3,6 +3,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 *((byte*) SCREEN#0 + (number) 0) ← (byte) 'a' to:main::@return @@ -72,6 +74,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) 'a' to:main::@return diff --git a/src/test/ref/comma-decl-for.cfg b/src/test/ref/comma-decl-for.cfg index ebbac675e..dfa0601de 100644 --- a/src/test/ref/comma-decl-for.cfg +++ b/src/test/ref/comma-decl-for.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/comma-decl-for.log b/src/test/ref/comma-decl-for.log index 4ddb91ee0..c0263562b 100644 --- a/src/test/ref/comma-decl-for.log +++ b/src/test/ref/comma-decl-for.log @@ -6,6 +6,8 @@ Culled Empty Block (label) main::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -108,6 +110,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/comma-decl.cfg b/src/test/ref/comma-decl.cfg index 8db80a2a2..e8b97fa91 100644 --- a/src/test/ref/comma-decl.cfg +++ b/src/test/ref/comma-decl.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::b#0 [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::c#0 diff --git a/src/test/ref/comma-decl.log b/src/test/ref/comma-decl.log index 16b4dd58f..70a1384f7 100644 --- a/src/test/ref/comma-decl.log +++ b/src/test/ref/comma-decl.log @@ -3,6 +3,8 @@ Identified constant variable (byte) main::b CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::b#0 ← (byte) 'c' @@ -110,6 +112,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::b#0 [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::c#0 diff --git a/src/test/ref/comma-expr-1.cfg b/src/test/ref/comma-expr-1.cfg index 4bf42d2ef..ed2972ca2 100644 --- a/src/test/ref/comma-expr-1.cfg +++ b/src/test/ref/comma-expr-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::c#0 to:main::@return diff --git a/src/test/ref/comma-expr-1.log b/src/test/ref/comma-expr-1.log index ee7ee579a..82de58a92 100644 --- a/src/test/ref/comma-expr-1.log +++ b/src/test/ref/comma-expr-1.log @@ -3,6 +3,8 @@ Identified constant variable (byte) main::b CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::b#0 ← (number) 3 @@ -88,6 +90,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::c#0 to:main::@return diff --git a/src/test/ref/comma-expr-2.cfg b/src/test/ref/comma-expr-2.cfg index c74f72134..cc1c5536f 100644 --- a/src/test/ref/comma-expr-2.cfg +++ b/src/test/ref/comma-expr-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::c#1 to:main::@return diff --git a/src/test/ref/comma-expr-2.log b/src/test/ref/comma-expr-2.log index 9488750f6..6616798b1 100644 --- a/src/test/ref/comma-expr-2.log +++ b/src/test/ref/comma-expr-2.log @@ -2,6 +2,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::c#0 ← (byte) 0 @@ -76,6 +78,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::c#1 to:main::@return diff --git a/src/test/ref/comma-expr-for.cfg b/src/test/ref/comma-expr-for.cfg index ebbac675e..dfa0601de 100644 --- a/src/test/ref/comma-expr-for.cfg +++ b/src/test/ref/comma-expr-for.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/comma-expr-for.log b/src/test/ref/comma-expr-for.log index e7c089ed4..8abbcee7b 100644 --- a/src/test/ref/comma-expr-for.log +++ b/src/test/ref/comma-expr-for.log @@ -6,6 +6,8 @@ Culled Empty Block (label) main::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::j#0 ← (byte) 'g' @@ -112,6 +114,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/comparison-rewriting-pointer.cfg b/src/test/ref/comparison-rewriting-pointer.cfg index 1f21962aa..379730c08 100644 --- a/src/test/ref/comparison-rewriting-pointer.cfg +++ b/src/test/ref/comparison-rewriting-pointer.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/comparison-rewriting-pointer.log b/src/test/ref/comparison-rewriting-pointer.log index fa419aa1c..4492c12e6 100644 --- a/src/test/ref/comparison-rewriting-pointer.log +++ b/src/test/ref/comparison-rewriting-pointer.log @@ -9,6 +9,8 @@ Culled Empty Block (label) main::@12 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte*) main::sc#0 ← (byte*) main::screen#0 @@ -159,6 +161,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/comparison-rewriting.cfg b/src/test/ref/comparison-rewriting.cfg index 9b8700952..35aeac451 100644 --- a/src/test/ref/comparison-rewriting.cfg +++ b/src/test/ref/comparison-rewriting.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/comparison-rewriting.log b/src/test/ref/comparison-rewriting.log index b7f904345..000e28aba 100644 --- a/src/test/ref/comparison-rewriting.log +++ b/src/test/ref/comparison-rewriting.log @@ -9,6 +9,8 @@ Culled Empty Block (label) main::@24 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte*~) main::$0 ← (byte*) main::screen#0 + (number) $3e8 @@ -410,6 +412,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/complex-conditional-problem.cfg b/src/test/ref/complex-conditional-problem.cfg index e4ff1a3bd..28d291911 100644 --- a/src/test/ref/complex-conditional-problem.cfg +++ b/src/test/ref/complex-conditional-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/complex-conditional-problem.log b/src/test/ref/complex-conditional-problem.log index 6599f7462..02f9b4b45 100644 --- a/src/test/ref/complex-conditional-problem.log +++ b/src/test/ref/complex-conditional-problem.log @@ -8,6 +8,8 @@ CONTROL FLOW GRAPH SSA (byte*) RASTER#0 ← ((byte*)) (number) $d012 (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 to:main::@1 main::@1: scope:[main] from main main::@4 @@ -145,6 +147,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/complex/ataritempest/ataritempest.cfg b/src/test/ref/complex/ataritempest/ataritempest.cfg index 78a4b0daf..f598f76b8 100644 --- a/src/test/ref/complex/ataritempest/ataritempest.cfg +++ b/src/test/ref/complex/ataritempest/ataritempest.cfg @@ -7,18 +7,24 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) to:main::@return main::@return: scope:[main] from main [5] return to:@return + +interrupt(HARDWARE_ALL)(void()) nmiHandler() nmiHandler: scope:[nmiHandler] from [6] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) to:nmiHandler::@return nmiHandler::@return: scope:[nmiHandler] from nmiHandler [7] return to:@return + +(void()) entryPoint() entryPoint: scope:[entryPoint] from [8] phi() to:entryPoint::@1 diff --git a/src/test/ref/complex/ataritempest/ataritempest.log b/src/test/ref/complex/ataritempest/ataritempest.log index 8a6d0c9f0..d66e8ca6b 100644 --- a/src/test/ref/complex/ataritempest/ataritempest.log +++ b/src/test/ref/complex/ataritempest/ataritempest.log @@ -9,6 +9,8 @@ CONTROL FLOW GRAPH SSA (byte[]) MESSAGE#0 ← (const string) $2 (byte[$32]) SCREEN#0 ← { fill( $32, 0) } to:@3 + +(void()) entryPoint() entryPoint: scope:[entryPoint] from (byte) entryPoint::i#0 ← (byte) 0 to:entryPoint::@1 @@ -22,12 +24,16 @@ entryPoint::@1: scope:[entryPoint] from entryPoint entryPoint::@1 entryPoint::@return: scope:[entryPoint] from entryPoint::@1 return to:@return + +interrupt(HARDWARE_ALL)(void()) nmiHandler() nmiHandler: scope:[nmiHandler] from *((byte*) BGCOL#0) ← ++ *((byte*) BGCOL#0) to:nmiHandler::@return nmiHandler::@return: scope:[nmiHandler] from nmiHandler return to:@return + +(void()) main() main: scope:[main] from @3 *((byte*) BGCOL#0) ← ++ *((byte*) BGCOL#0) to:main::@return @@ -138,18 +144,24 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) to:main::@return main::@return: scope:[main] from main [5] return to:@return + +interrupt(HARDWARE_ALL)(void()) nmiHandler() nmiHandler: scope:[nmiHandler] from [6] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) to:nmiHandler::@return nmiHandler::@return: scope:[nmiHandler] from nmiHandler [7] return to:@return + +(void()) entryPoint() entryPoint: scope:[entryPoint] from [8] phi() to:entryPoint::@1 diff --git a/src/test/ref/complex/clearscreen/clearscreen.cfg b/src/test/ref/complex/clearscreen/clearscreen.cfg index 6b6b9edd0..8ded381e2 100644 --- a/src/test/ref/complex/clearscreen/clearscreen.cfg +++ b/src/test/ref/complex/clearscreen/clearscreen.cfg @@ -18,6 +18,8 @@ to:@end @end: scope:[] from @2 [8] phi() + +(void()) main() main: scope:[main] from @2 [9] (byte*) init_angle_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 [10] call init_angle_screen @@ -86,6 +88,8 @@ main::@2: scope:[main] from main::@1 [50] (byte*) main::src#1 ← ++ (byte*) main::src#2 [51] (byte*) main::dst#1 ← ++ (byte*) main::dst#2 to:main::@1 + +(void()) startProcessing((byte) startProcessing::center_x , (byte) startProcessing::center_y , (byte) startProcessing::center_dist) startProcessing: scope:[startProcessing] from main::@6 [52] phi() to:startProcessing::@1 @@ -176,6 +180,8 @@ startProcessing::@3: scope:[startProcessing] from startProcessing::@2 startProcessing::@9: scope:[startProcessing] from startProcessing::@3 [117] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6 to:startProcessing::@4 + +(struct ProcessingChar()) getCharToProcess() getCharToProcess: scope:[getCharToProcess] from main::@5 [118] (byte*) getCharToProcess::screen_line#0 ← (byte*)(void*) SCREEN_COPY#0 [119] (byte*) getCharToProcess::dist_line#0 ← (byte*)(void*) SCREEN_DIST#0 @@ -242,6 +248,8 @@ getCharToProcess::@12: scope:[getCharToProcess] from getCharToProcess::@4 getCharToProcess::@11: scope:[getCharToProcess] from getCharToProcess::@2 [145] (byte~) getCharToProcess::return_dist#5 ← (byte) getCharToProcess::closest_dist#2 to:getCharToProcess::@3 + +(void()) setupRasterIrq((word) setupRasterIrq::raster , (void()*) setupRasterIrq::irqRoutine) setupRasterIrq: scope:[setupRasterIrq] from main::@10 asm { sei } [147] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -260,6 +268,8 @@ setupRasterIrq::@2: scope:[setupRasterIrq] from setupRasterIrq::@1 setupRasterIrq::@return: scope:[setupRasterIrq] from setupRasterIrq::@2 [155] return to:@return + +(void()) initSprites() initSprites: scope:[initSprites] from main::@4 [156] phi() to:initSprites::@1 @@ -285,6 +295,8 @@ initSprites::@2: scope:[initSprites] from initSprites::@1 [167] *((byte*) initSprites::sp#2) ← (byte) 0 [168] (byte*) initSprites::sp#1 ← ++ (byte*) initSprites::sp#2 to:initSprites::@1 + +(void()) init_angle_screen((byte*) init_angle_screen::screen) init_angle_screen: scope:[init_angle_screen] from main [169] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [170] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c @@ -333,6 +345,8 @@ init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@3 [198] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 [199] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 to:init_angle_screen::@2 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from init_angle_screen::@3 [200] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 to:atan2_16::@2 @@ -430,6 +444,8 @@ atan2_16::@4: scope:[atan2_16] from atan2_16::@3 atan2_16::@1: scope:[atan2_16] from atan2_16 [242] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from @1 @3 [243] (byte*) heap_head#5 ← phi( @1/(const byte*) HEAP_TOP#0 @3/(byte*) heap_head#1 ) [244] (byte*) malloc::mem#0 ← (byte*) heap_head#5 - (word) $3e8 @@ -438,6 +454,8 @@ malloc: scope:[malloc] from @1 @3 malloc::@return: scope:[malloc] from malloc [246] return to:@return + +interrupt(HARDWARE_ALL)(void()) irqBottom() irqBottom: scope:[irqBottom] from [247] phi() to:irqBottom::@1 @@ -453,6 +471,8 @@ irqBottom::@2: scope:[irqBottom] from irqBottom::@1 irqBottom::@return: scope:[irqBottom] from irqBottom::@2 [253] return to:@return + +(void()) processChars() processChars: scope:[processChars] from irqBottom::@1 [254] phi() to:processChars::@1 @@ -537,6 +557,8 @@ processChars::@6: scope:[processChars] from processChars::@12 processChars::@13 processChars::@4: scope:[processChars] from processChars::@3 [304] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 to:processChars::@5 + +interrupt(HARDWARE_ALL)(void()) irqTop() irqTop: scope:[irqTop] from [305] phi() to:irqTop::@1 diff --git a/src/test/ref/complex/clearscreen/clearscreen.log b/src/test/ref/complex/clearscreen/clearscreen.log index abbd03cc3..771e24fbb 100644 --- a/src/test/ref/complex/clearscreen/clearscreen.log +++ b/src/test/ref/complex/clearscreen/clearscreen.log @@ -191,6 +191,8 @@ CONTROL FLOW GRAPH SSA (byte*) HEAP_TOP#0 ← ((byte*)) (number) $a000 (byte*) heap_head#0 ← (byte*) HEAP_TOP#0 to:@15 + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from @26 @37 (word) malloc::size#2 ← phi( @26/(word) malloc::size#0 @37/(word) malloc::size#1 ) (byte*) heap_head#5 ← phi( @26/(byte*) heap_head#9 @37/(byte*) heap_head#3 ) @@ -213,6 +215,8 @@ malloc::@return: scope:[malloc] from malloc .word 256*2*256*atan(1/pow(2,i))/PI/2 }} to:@22 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from init_angle_screen::@3 (signed word) atan2_16::x#9 ← phi( init_angle_screen::@3/(signed word) atan2_16::x#0 ) (signed word) atan2_16::y#1 ← phi( init_angle_screen::@3/(signed word) atan2_16::y#0 ) @@ -497,6 +501,8 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 (byte) NOT_FOUND#0 ← (number) $ff (struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 ← { fill( NUM_PROCESSING#0, 0) } to:@29 + +(void()) main() main: scope:[main] from @36 (byte*) SCREEN_COPY#4 ← phi( @36/(byte*) SCREEN_COPY#7 ) (byte*) SCREEN_DIST#1 ← phi( @36/(byte*) SCREEN_DIST#3 ) @@ -629,6 +635,8 @@ main::@15: scope:[main] from main::@11 main::@15 main::@return: scope:[main] from main::@15 return to:@return + +(struct ProcessingChar()) getCharToProcess() getCharToProcess: scope:[getCharToProcess] from main::@9 (byte*) SCREEN_DIST#2 ← phi( main::@9/(byte*) SCREEN_DIST#4 ) (byte*) SCREEN_COPY#2 ← phi( main::@9/(byte*) SCREEN_COPY#5 ) @@ -753,6 +761,8 @@ getCharToProcess::@return: scope:[getCharToProcess] from getCharToProcess::@1 (struct ProcessingChar) getCharToProcess::return#1 ← struct-unwound {(byte) getCharToProcess::return_x#2, (byte) getCharToProcess::return_y#2, (byte) getCharToProcess::return_dist#2} return to:@return + +(void()) startProcessing((byte) startProcessing::center_x , (byte) startProcessing::center_y , (byte) startProcessing::center_dist) startProcessing: scope:[startProcessing] from main::@10 (byte) startProcessing::center_x#9 ← phi( main::@10/(byte) startProcessing::center_x#0 ) (byte) startProcessing::center_y#9 ← phi( main::@10/(byte) startProcessing::center_y#0 ) @@ -906,6 +916,8 @@ startProcessing::@return: scope:[startProcessing] from startProcessing::@10 (word~) $11 ← (word~) $10 << (number) 4 (word) YPOS_BOTTOMMOST#0 ← (word~) $11 to:@34 + +(void()) processChars() processChars: scope:[processChars] from irqBottom::@1 (byte) processChars::numActive#0 ← (number) 0 (number~) processChars::$1 ← (byte) NUM_PROCESSING#0 - (number) 1 @@ -1080,6 +1092,8 @@ processChars::@16: scope:[processChars] from processChars::@15 processChars::@return: scope:[processChars] from processChars::@15 processChars::@16 return to:@return + +(void()) init_angle_screen((byte*) init_angle_screen::screen) init_angle_screen: scope:[init_angle_screen] from main (byte*) init_angle_screen::screen#1 ← phi( main/(byte*) init_angle_screen::screen#0 ) (byte*~) init_angle_screen::$0 ← (byte*) init_angle_screen::screen#1 + (number) $28*(number) $c @@ -1159,6 +1173,8 @@ init_angle_screen::@4: scope:[init_angle_screen] from init_angle_screen::@2 init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@4 return to:@return + +(void()) initSprites() initSprites: scope:[initSprites] from main::@8 (byte*) initSprites::sp#0 ← (byte*) SPRITE_DATA#0 to:initSprites::@1 @@ -1192,6 +1208,8 @@ initSprites::@8: scope:[initSprites] from initSprites::@7 initSprites::@return: scope:[initSprites] from initSprites::@8 return to:@return + +(void()) setupRasterIrq((word) setupRasterIrq::raster , (void()*) setupRasterIrq::irqRoutine) setupRasterIrq: scope:[setupRasterIrq] from main::@18 (void()*) setupRasterIrq::irqRoutine#4 ← phi( main::@18/(void()*) setupRasterIrq::irqRoutine#0 ) (word) setupRasterIrq::raster#1 ← phi( main::@18/(word) setupRasterIrq::raster#0 ) @@ -1229,6 +1247,8 @@ setupRasterIrq::@return: scope:[setupRasterIrq] from setupRasterIrq::@2 (byte*) SCREEN_DIST#10 ← phi( @29/(byte*) SCREEN_DIST#13 ) (byte) RASTER_IRQ_TOP#0 ← (number) $30 to:@35 + +interrupt(HARDWARE_ALL)(void()) irqTop() irqTop: scope:[irqTop] from (bool~) irqTop::$0 ← ! (bool) DEBUG#0 if((bool~) irqTop::$0) goto irqTop::@1 @@ -1271,6 +1291,8 @@ irqTop::@return: scope:[irqTop] from irqTop::@1 (byte*) SCREEN_DIST#7 ← phi( @34/(byte*) SCREEN_DIST#10 ) (byte) RASTER_IRQ_MIDDLE#0 ← (number) $ff to:@36 + +interrupt(HARDWARE_ALL)(void()) irqBottom() irqBottom: scope:[irqBottom] from (bool~) irqBottom::$0 ← ! (bool) DEBUG#0 if((bool~) irqBottom::$0) goto irqBottom::@1 @@ -3935,6 +3957,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @2 [8] phi() + +(void()) main() main: scope:[main] from @2 [9] (byte*) init_angle_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 [10] call init_angle_screen @@ -4003,6 +4027,8 @@ main::@2: scope:[main] from main::@1 [50] (byte*) main::src#1 ← ++ (byte*) main::src#2 [51] (byte*) main::dst#1 ← ++ (byte*) main::dst#2 to:main::@1 + +(void()) startProcessing((byte) startProcessing::center_x , (byte) startProcessing::center_y , (byte) startProcessing::center_dist) startProcessing: scope:[startProcessing] from main::@6 [52] phi() to:startProcessing::@1 @@ -4093,6 +4119,8 @@ startProcessing::@3: scope:[startProcessing] from startProcessing::@2 startProcessing::@9: scope:[startProcessing] from startProcessing::@3 [117] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6 to:startProcessing::@4 + +(struct ProcessingChar()) getCharToProcess() getCharToProcess: scope:[getCharToProcess] from main::@5 [118] (byte*) getCharToProcess::screen_line#0 ← (byte*)(void*) SCREEN_COPY#0 [119] (byte*) getCharToProcess::dist_line#0 ← (byte*)(void*) SCREEN_DIST#0 @@ -4159,6 +4187,8 @@ getCharToProcess::@12: scope:[getCharToProcess] from getCharToProcess::@4 getCharToProcess::@11: scope:[getCharToProcess] from getCharToProcess::@2 [145] (byte~) getCharToProcess::return_dist#5 ← (byte) getCharToProcess::closest_dist#2 to:getCharToProcess::@3 + +(void()) setupRasterIrq((word) setupRasterIrq::raster , (void()*) setupRasterIrq::irqRoutine) setupRasterIrq: scope:[setupRasterIrq] from main::@10 asm { sei } [147] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -4177,6 +4207,8 @@ setupRasterIrq::@2: scope:[setupRasterIrq] from setupRasterIrq::@1 setupRasterIrq::@return: scope:[setupRasterIrq] from setupRasterIrq::@2 [155] return to:@return + +(void()) initSprites() initSprites: scope:[initSprites] from main::@4 [156] phi() to:initSprites::@1 @@ -4202,6 +4234,8 @@ initSprites::@2: scope:[initSprites] from initSprites::@1 [167] *((byte*) initSprites::sp#2) ← (byte) 0 [168] (byte*) initSprites::sp#1 ← ++ (byte*) initSprites::sp#2 to:initSprites::@1 + +(void()) init_angle_screen((byte*) init_angle_screen::screen) init_angle_screen: scope:[init_angle_screen] from main [169] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [170] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c @@ -4250,6 +4284,8 @@ init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@3 [198] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 [199] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 to:init_angle_screen::@2 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from init_angle_screen::@3 [200] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 to:atan2_16::@2 @@ -4347,6 +4383,8 @@ atan2_16::@4: scope:[atan2_16] from atan2_16::@3 atan2_16::@1: scope:[atan2_16] from atan2_16 [242] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from @1 @3 [243] (byte*) heap_head#5 ← phi( @1/(const byte*) HEAP_TOP#0 @3/(byte*) heap_head#1 ) [244] (byte*) malloc::mem#0 ← (byte*) heap_head#5 - (word) $3e8 @@ -4355,6 +4393,8 @@ malloc: scope:[malloc] from @1 @3 malloc::@return: scope:[malloc] from malloc [246] return to:@return + +interrupt(HARDWARE_ALL)(void()) irqBottom() irqBottom: scope:[irqBottom] from [247] phi() to:irqBottom::@1 @@ -4370,6 +4410,8 @@ irqBottom::@2: scope:[irqBottom] from irqBottom::@1 irqBottom::@return: scope:[irqBottom] from irqBottom::@2 [253] return to:@return + +(void()) processChars() processChars: scope:[processChars] from irqBottom::@1 [254] phi() to:processChars::@1 @@ -4454,6 +4496,8 @@ processChars::@6: scope:[processChars] from processChars::@12 processChars::@13 processChars::@4: scope:[processChars] from processChars::@3 [304] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 to:processChars::@5 + +interrupt(HARDWARE_ALL)(void()) irqTop() irqTop: scope:[irqTop] from [305] phi() to:irqTop::@1 diff --git a/src/test/ref/complex/medusa/medusa.cfg b/src/test/ref/complex/medusa/medusa.cfg index b506b219b..449a57ef9 100644 --- a/src/test/ref/complex/medusa/medusa.cfg +++ b/src/test/ref/complex/medusa/medusa.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [5] call memcpy @@ -18,6 +20,8 @@ main::@2: scope:[main] from main main::@1: scope:[main] from main::@1 main::@2 [8] *((const byte*) SCREEN#0+(word) $3e7) ← *((const byte*) SCREEN#0+(word) $3e7) ^ (byte) $e to:main::@1 + +(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num) memcpy: scope:[memcpy] from main main::@2 [9] (void*) memcpy::destination#2 ← phi( main/(void*)(const byte*) SCREEN#0 main::@2/(void*)(const byte*) COLS#0 ) [9] (void*) memcpy::source#2 ← phi( main/(void*)(const byte[$3e8]) MEDUSA_SCREEN#0 main::@2/(void*)(const byte[]) MEDUSA_COLORS#0 ) diff --git a/src/test/ref/complex/medusa/medusa.log b/src/test/ref/complex/medusa/medusa.log index 6ec283109..c07c0a6ff 100644 --- a/src/test/ref/complex/medusa/medusa.log +++ b/src/test/ref/complex/medusa/medusa.log @@ -23,6 +23,8 @@ CONTROL FLOW GRAPH SSA (byte*) COLS#0 ← ((byte*)) (number) $d800 (byte) BLACK#0 ← (number) 0 to:@8 + +(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num) memcpy: scope:[memcpy] from main main::@7 (word) memcpy::num#2 ← phi( main/(word) memcpy::num#0 main::@7/(word) memcpy::num#1 ) (void*) memcpy::destination#2 ← phi( main/(void*) memcpy::destination#0 main::@7/(void*) memcpy::destination#1 ) @@ -68,6 +70,8 @@ memcpy::@return: scope:[memcpy] from memcpy::@3 }} (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@9 + +(void()) main() main: scope:[main] from @9 *((byte*) BGCOL#0) ← (byte) BLACK#0 (void*) memcpy::destination#0 ← (void*)(byte*) SCREEN#0 @@ -306,6 +310,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [5] call memcpy @@ -317,6 +323,8 @@ main::@2: scope:[main] from main main::@1: scope:[main] from main::@1 main::@2 [8] *((const byte*) SCREEN#0+(word) $3e7) ← *((const byte*) SCREEN#0+(word) $3e7) ^ (byte) $e to:main::@1 + +(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num) memcpy: scope:[memcpy] from main main::@2 [9] (void*) memcpy::destination#2 ← phi( main/(void*)(const byte*) SCREEN#0 main::@2/(void*)(const byte*) COLS#0 ) [9] (void*) memcpy::source#2 ← phi( main/(void*)(const byte[$3e8]) MEDUSA_SCREEN#0 main::@2/(void*)(const byte[]) MEDUSA_COLORS#0 ) diff --git a/src/test/ref/complex/splines/truetype-splines.cfg b/src/test/ref/complex/splines/truetype-splines.cfg index 6cade0cc3..5deb8d9f9 100644 --- a/src/test/ref/complex/splines/truetype-splines.cfg +++ b/src/test/ref/complex/splines/truetype-splines.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call mulf_init @@ -60,6 +62,8 @@ main::@5: scope:[main] from main::@4 main::@6: scope:[main] from main::@5 [26] (byte) main::angle#1 ← (byte) main::angle#2 + (byte) 9 to:main::@1 + +(void()) show_letter((byte) show_letter::angle) show_letter: scope:[show_letter] from main::@10 [27] phi() to:show_letter::@1 @@ -142,6 +146,8 @@ show_letter::@8: scope:[show_letter] from show_letter::@2 [83] phi() [84] call bitmap_plot_spline_8seg to:show_letter::@3 + +(void()) bitmap_plot_spline_8seg() bitmap_plot_spline_8seg: scope:[bitmap_plot_spline_8seg] from show_letter::@8 [85] (signed word) bitmap_plot_spline_8seg::current_x#0 ← *((signed word*)(const struct SplineVector16[9]) SPLINE_8SEG#0) [86] (signed word) bitmap_plot_spline_8seg::current_y#0 ← *((signed word*)(const struct SplineVector16[9]) SPLINE_8SEG#0+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y) @@ -167,6 +173,8 @@ bitmap_plot_spline_8seg::@2: scope:[bitmap_plot_spline_8seg] from bitmap_plot_s bitmap_plot_spline_8seg::@return: scope:[bitmap_plot_spline_8seg] from bitmap_plot_spline_8seg::@2 [99] return to:@return + +(void()) bitmap_line((word) bitmap_line::x1 , (word) bitmap_line::y1 , (word) bitmap_line::x2 , (word) bitmap_line::y2) bitmap_line: scope:[bitmap_line] from bitmap_plot_spline_8seg::@1 show_letter::@5 [100] (word) bitmap_line::y2#11 ← phi( bitmap_plot_spline_8seg::@1/(word~) bitmap_line::y2#13 show_letter::@5/(word) bitmap_line::y2#0 ) [100] (word) bitmap_line::x2#10 ← phi( bitmap_plot_spline_8seg::@1/(word~) bitmap_line::x2#13 show_letter::@5/(word) bitmap_line::x2#0 ) @@ -269,6 +277,8 @@ bitmap_line::@4: scope:[bitmap_line] from bitmap_line::@18 [150] (word) bitmap_plot::x#0 ← (word) bitmap_line::x#0 [151] call bitmap_plot to:bitmap_line::@return + +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from bitmap_line::@3 bitmap_line::@4 bitmap_line::@6 bitmap_line::@9 [152] (word) bitmap_plot::x#4 ← phi( bitmap_line::@9/(word) bitmap_plot::x#3 bitmap_line::@3/(word) bitmap_plot::x#2 bitmap_line::@4/(word) bitmap_plot::x#0 bitmap_line::@6/(word) bitmap_plot::x#1 ) [152] (byte) bitmap_plot::y#4 ← phi( bitmap_line::@9/(byte) bitmap_plot::y#3 bitmap_line::@3/(byte) bitmap_plot::y#2 bitmap_line::@4/(byte) bitmap_plot::y#0 bitmap_line::@6/(byte) bitmap_plot::y#1 ) @@ -281,6 +291,8 @@ bitmap_plot: scope:[bitmap_plot] from bitmap_line::@3 bitmap_line::@4 bitmap_li bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot [158] return to:@return + +(word()) sgn_u16((word) sgn_u16::w) sgn_u16: scope:[sgn_u16] from bitmap_line::@1 bitmap_line::@14 [159] (word) sgn_u16::w#2 ← phi( bitmap_line::@1/(word) sgn_u16::w#0 bitmap_line::@14/(word) sgn_u16::w#1 ) [160] (byte~) sgn_u16::$0 ← > (word) sgn_u16::w#2 @@ -294,6 +306,8 @@ sgn_u16::@return: scope:[sgn_u16] from sgn_u16 sgn_u16::@1 [164] (word) sgn_u16::return#4 ← phi( sgn_u16::@1/(byte) -1 sgn_u16/(byte) 1 ) [165] return to:@return + +(word()) abs_u16((word) abs_u16::w) abs_u16: scope:[abs_u16] from bitmap_line bitmap_line::@12 [166] (word) abs_u16::w#2 ← phi( bitmap_line/(word) abs_u16::w#0 bitmap_line::@12/(word) abs_u16::w#1 ) [167] (byte~) abs_u16::$0 ← > (word) abs_u16::w#2 @@ -307,6 +321,8 @@ abs_u16::@return: scope:[abs_u16] from abs_u16 abs_u16::@1 [171] (word) abs_u16::return#4 ← phi( abs_u16::@1/(word) abs_u16::return#2 abs_u16/(word) abs_u16::w#2 ) [172] return to:@return + +(void()) spline_8segB((signed word) spline_8segB::p0_x , (signed word) spline_8segB::p0_y , (signed word) spline_8segB::p1_x , (signed word) spline_8segB::p1_y , (signed word) spline_8segB::p2_x , (signed word) spline_8segB::p2_y) spline_8segB: scope:[spline_8segB] from show_letter::@2 [173] (signed word~) spline_8segB::$0 ← (signed word) spline_8segB::p1_x#0 << (byte) 1 [174] (signed word~) spline_8segB::$1 ← (signed word) spline_8segB::p2_x#0 - (signed word~) spline_8segB::$0 @@ -358,6 +374,8 @@ spline_8segB::@2: scope:[spline_8segB] from spline_8segB::@1 spline_8segB::@return: scope:[spline_8segB] from spline_8segB::@2 [211] return to:@return + +(struct SplineVector16()) rotate((signed word) rotate::vector_x , (signed word) rotate::vector_y , (byte) rotate::angle) rotate: scope:[rotate] from show_letter::@1 show_letter::@6 [212] (signed word) rotate::vector_y#2 ← phi( show_letter::@1/(signed word) rotate::vector_y#0 show_letter::@6/(signed word) rotate::vector_y#1 ) [212] (signed word) rotate::vector_x#2 ← phi( show_letter::@1/(signed word) rotate::vector_x#0 show_letter::@6/(signed word) rotate::vector_x#1 ) @@ -410,6 +428,8 @@ rotate::@4: scope:[rotate] from rotate::@3 rotate::@return: scope:[rotate] from rotate::@4 [249] return to:@return + +(signed dword()) mulf16s((signed word) mulf16s::a , (signed word) mulf16s::b) mulf16s: scope:[mulf16s] from rotate rotate::@1 rotate::@2 rotate::@3 [250] (signed word) mulf16s::b#4 ← phi( rotate/(signed word) mulf16s::b#0 rotate::@1/(signed word) mulf16s::b#1 rotate::@2/(signed word) mulf16s::b#2 rotate::@3/(signed word) mulf16s::b#3 ) [250] (signed word) mulf16s::a#4 ← phi( rotate/(signed word) mulf16s::a#0 rotate::@1/(signed word) mulf16s::a#1 rotate::@2/(signed word) mulf16s::a#2 rotate::@3/(signed word) mulf16s::a#3 ) @@ -443,6 +463,8 @@ mulf16s::@2: scope:[mulf16s] from mulf16s::@1 mulf16s::@4 mulf16s::@return: scope:[mulf16s] from mulf16s::@2 [267] return to:@return + +(dword()) mulf16u((word) mulf16u::a , (word) mulf16u::b) mulf16u: scope:[mulf16u] from mulf16s [268] *((const word*) mulf16u::memA#0) ← (word) mulf16u::a#0 [269] *((const word*) mulf16u::memB#0) ← (word) mulf16u::b#0 @@ -452,6 +474,8 @@ mulf16u: scope:[mulf16u] from mulf16s mulf16u::@return: scope:[mulf16u] from mulf16u [272] return to:@return + +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) bitmap_clear: scope:[bitmap_clear] from main::@2 main::@9 [273] phi() [274] call memset @@ -463,6 +487,8 @@ bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 [277] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [278] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) [278] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) BITMAP_SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP_GRAPHICS#0 ) @@ -484,6 +510,8 @@ memset::@3: scope:[memset] from memset::@2 [285] *((byte*) memset::dst#2) ← (byte) memset::c#4 [286] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) bitmap_init: scope:[bitmap_init] from main::@8 [287] phi() to:bitmap_init::@1 @@ -524,6 +552,8 @@ bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 [308] return to:@return + +(void()) mulf_init() mulf_init: scope:[mulf_init] from main [309] phi() to:mulf_init::@1 diff --git a/src/test/ref/complex/splines/truetype-splines.log b/src/test/ref/complex/splines/truetype-splines.log index dca3f8a6b..3f4e5631e 100644 --- a/src/test/ref/complex/splines/truetype-splines.log +++ b/src/test/ref/complex/splines/truetype-splines.log @@ -489,6 +489,8 @@ CONTROL FLOW GRAPH SSA @1: scope:[] from @begin (struct SplineVector16[9]) SPLINE_8SEG#0 ← { fill( 9, 0) } to:@7 + +(void()) spline_8segB((signed word) spline_8segB::p0_x , (signed word) spline_8segB::p0_y , (signed word) spline_8segB::p1_x , (signed word) spline_8segB::p1_y , (signed word) spline_8segB::p2_x , (signed word) spline_8segB::p2_y) spline_8segB: scope:[spline_8segB] from show_letter::@3 (signed word) spline_8segB::p0_y#1 ← phi( show_letter::@3/(signed word) spline_8segB::p0_y#0 ) (signed word) spline_8segB::p2_y#1 ← phi( show_letter::@3/(signed word) spline_8segB::p2_y#0 ) @@ -571,6 +573,8 @@ spline_8segB::@2: scope:[spline_8segB] from spline_8segB::@1 spline_8segB::@return: scope:[spline_8segB] from spline_8segB::@2 return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from bitmap_clear bitmap_clear::@1 (byte) memset::c#5 ← phi( bitmap_clear/(byte) memset::c#0 bitmap_clear::@1/(byte) memset::c#1 ) (void*) memset::str#4 ← phi( bitmap_clear/(void*) memset::str#0 bitmap_clear::@1/(void*) memset::str#1 ) @@ -620,6 +624,8 @@ memset::@return: scope:[memset] from memset::@1 (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } to:@13 + +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) bitmap_init: scope:[bitmap_init] from main::@21 (byte*) bitmap_init::screen#1 ← phi( main::@21/(byte*) bitmap_init::screen#0 ) (byte*) bitmap_init::gfx#1 ← phi( main::@21/(byte*) bitmap_init::gfx#0 ) @@ -704,6 +710,8 @@ bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@6 (byte*) bitmap_screen#2 ← (byte*) bitmap_screen#6 return to:@return + +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) bitmap_clear: scope:[bitmap_clear] from main::@2 main::@22 (byte*) bitmap_gfx#12 ← phi( main::@2/(byte*) bitmap_gfx#18 main::@22/(byte*) bitmap_gfx#3 ) (byte*) bitmap_screen#7 ← phi( main::@2/(byte*) bitmap_screen#12 main::@22/(byte*) bitmap_screen#3 ) @@ -731,6 +739,8 @@ bitmap_clear::@2: scope:[bitmap_clear] from bitmap_clear::@1 bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@2 return to:@return + +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from bitmap_line::@12 bitmap_line::@3 bitmap_line::@4 bitmap_line::@7 (word) bitmap_plot::x#4 ← phi( bitmap_line::@12/(word) bitmap_plot::x#3 bitmap_line::@3/(word) bitmap_plot::x#2 bitmap_line::@4/(word) bitmap_plot::x#0 bitmap_line::@7/(word) bitmap_plot::x#1 ) (byte) bitmap_plot::y#4 ← phi( bitmap_line::@12/(byte) bitmap_plot::y#3 bitmap_line::@3/(byte) bitmap_plot::y#2 bitmap_line::@4/(byte) bitmap_plot::y#0 bitmap_line::@7/(byte) bitmap_plot::y#1 ) @@ -744,6 +754,8 @@ bitmap_plot: scope:[bitmap_plot] from bitmap_line::@12 bitmap_line::@3 bitmap_l bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot return to:@return + +(void()) bitmap_line((word) bitmap_line::x1 , (word) bitmap_line::y1 , (word) bitmap_line::x2 , (word) bitmap_line::y2) bitmap_line: scope:[bitmap_line] from bitmap_plot_spline_8seg::@1 show_letter::@7 (word) bitmap_line::y2#5 ← phi( bitmap_plot_spline_8seg::@1/(word) bitmap_line::y2#1 show_letter::@7/(word) bitmap_line::y2#0 ) (word) bitmap_line::x2#2 ← phi( bitmap_plot_spline_8seg::@1/(word) bitmap_line::x2#1 show_letter::@7/(word) bitmap_line::x2#0 ) @@ -983,6 +995,8 @@ bitmap_line::@14: scope:[bitmap_line] from bitmap_line::@23 (word) bitmap_line::y#2 ← (word) bitmap_line::y#9 + (word) bitmap_line::sy#2 (word) bitmap_line::e1#2 ← (word) bitmap_line::e1#4 - (word) bitmap_line::dx#6 to:bitmap_line::@13 + +(word()) abs_u16((word) abs_u16::w) abs_u16: scope:[abs_u16] from bitmap_line bitmap_line::@16 (word) abs_u16::w#2 ← phi( bitmap_line/(word) abs_u16::w#0 bitmap_line::@16/(word) abs_u16::w#1 ) (byte~) abs_u16::$0 ← > (word) abs_u16::w#2 @@ -1004,6 +1018,8 @@ abs_u16::@return: scope:[abs_u16] from abs_u16::@1 abs_u16::@3 (word) abs_u16::return#4 ← (word) abs_u16::return#7 return to:@return + +(word()) sgn_u16((word) sgn_u16::w) sgn_u16: scope:[sgn_u16] from bitmap_line::@1 bitmap_line::@18 (word) sgn_u16::w#2 ← phi( bitmap_line::@1/(word) sgn_u16::w#0 bitmap_line::@18/(word) sgn_u16::w#1 ) (byte~) sgn_u16::$0 ← > (word) sgn_u16::w#2 @@ -1044,6 +1060,8 @@ sgn_u16::@return: scope:[sgn_u16] from sgn_u16::@1 sgn_u16::@3 (byte[$200]) mulf_sqr2_lo#0 ← { fill( $200, 0) } (byte[$200]) mulf_sqr2_hi#0 ← { fill( $200, 0) } to:@60 + +(void()) mulf_init() mulf_init: scope:[mulf_init] from main (word) mulf_init::sqr#0 ← (number) 0 (byte) mulf_init::x_2#0 ← (number) 0 @@ -1153,6 +1171,8 @@ mulf_init::@15: scope:[mulf_init] from mulf_init::@10 mulf_init::@return: scope:[mulf_init] from mulf_init::@11 return to:@return + +(dword()) mulf16u((word) mulf16u::a , (word) mulf16u::b) mulf16u: scope:[mulf16u] from mulf16s (word) mulf16u::b#1 ← phi( mulf16s/(word) mulf16u::b#0 ) (word) mulf16u::a#1 ← phi( mulf16s/(word) mulf16u::a#0 ) @@ -1169,6 +1189,8 @@ mulf16u::@return: scope:[mulf16u] from mulf16u (dword) mulf16u::return#1 ← (dword) mulf16u::return#3 return to:@return + +(signed dword()) mulf16s((signed word) mulf16s::a , (signed word) mulf16s::b) mulf16s: scope:[mulf16s] from rotate rotate::@2 rotate::@3 rotate::@4 (signed word) mulf16s::b#4 ← phi( rotate/(signed word) mulf16s::b#0 rotate::@2/(signed word) mulf16s::b#1 rotate::@3/(signed word) mulf16s::b#2 rotate::@4/(signed word) mulf16s::b#3 ) (signed word) mulf16s::a#4 ← phi( rotate/(signed word) mulf16s::a#0 rotate::@2/(signed word) mulf16s::a#1 rotate::@3/(signed word) mulf16s::a#2 rotate::@4/(signed word) mulf16s::a#3 ) @@ -1234,6 +1256,8 @@ mulf16s::@return: scope:[mulf16s] from mulf16s::@2 (byte*) BITMAP_GRAPHICS#0 ← ((byte*)) (number) $6000 (struct Segment[$16]) letter_c#0 ← { { (const byte) MOVE_TO, { (number) $6c, (number) $92 }, { (number) 0, (number) 0 } }, { (const byte) SPLINE_TO, { (number) $59, (number) $b6 }, { (number) $67, (number) $a9 } }, { (const byte) SPLINE_TO, { (number) $3b, (number) $c3 }, { (number) $4b, (number) $c3 } }, { (const byte) SPLINE_TO, { (number) $17, (number) $b2 }, { (number) $26, (number) $c3 } }, { (const byte) SPLINE_TO, { (number) 9, (number) $84 }, { (number) 9, (number) $a1 } }, { (const byte) SPLINE_TO, { (number) $19, (number) $57 }, { (number) 9, (number) $68 } }, { (const byte) SPLINE_TO, { (number) $41, (number) $45 }, { (number) $2a, (number) $45 } }, { (const byte) SPLINE_TO, { (number) $5d, (number) $4f }, { (number) $52, (number) $45 } }, { (const byte) SPLINE_TO, { (number) $69, (number) $62 }, { (number) $69, (number) $58 } }, { (const byte) SPLINE_TO, { (number) $66, (number) $6a }, { (number) $69, (number) $67 } }, { (const byte) SPLINE_TO, { (number) $5d, (number) $6d }, { (number) $62, (number) $6d } }, { (const byte) SPLINE_TO, { (number) $51, (number) $68 }, { (number) $55, (number) $6d } }, { (const byte) SPLINE_TO, { (number) $4e, (number) $5d }, { (number) $4f, (number) $65 } }, { (const byte) SPLINE_TO, { (number) $49, (number) $52 }, { (number) $4e, (number) $56 } }, { (const byte) SPLINE_TO, { (number) $3d, (number) $4e }, { (number) $45, (number) $4e } }, { (const byte) SPLINE_TO, { (number) $28, (number) $58 }, { (number) $30, (number) $4e } }, { (const byte) SPLINE_TO, { (number) $1d, (number) $79 }, { (number) $1d, (number) $64 } }, { (const byte) SPLINE_TO, { (number) $28, (number) $9e }, { (number) $1d, (number) $8e } }, { (const byte) SPLINE_TO, { (number) $44, (number) $ae }, { (number) $32, (number) $ae } }, { (const byte) SPLINE_TO, { (number) $5b, (number) $a6 }, { (number) $50, (number) $ae } }, { (const byte) SPLINE_TO, { (number) $68, (number) $90 }, { (number) $62, (number) $a0 } }, { (const byte) LINE_TO, { (number) $6c, (number) $92 }, { (number) 0, (number) 0 } } } to:@63 + +(void()) main() main: scope:[main] from @64 (signed byte*) COS#33 ← phi( @64/(signed byte*) COS#34 ) (byte*) bitmap_screen#18 ← phi( @64/(byte*) bitmap_screen#15 ) @@ -1426,6 +1450,8 @@ main::@return: scope:[main] from main::@13 (byte*) bitmap_screen#4 ← (byte*) bitmap_screen#9 return to:@return + +(void()) show_letter((byte) show_letter::angle) show_letter: scope:[show_letter] from main::@24 (signed byte*) COS#4 ← phi( main::@24/(signed byte*) COS#6 ) (byte) show_letter::angle#3 ← phi( main::@24/(byte) show_letter::angle#0 ) @@ -1617,6 +1643,8 @@ show_letter::@5: scope:[show_letter] from show_letter::@14 show_letter::@15 sho show_letter::@return: scope:[show_letter] from show_letter::@5 return to:@return + +(void()) bitmap_plot_spline_8seg() bitmap_plot_spline_8seg: scope:[bitmap_plot_spline_8seg] from show_letter::@13 (number~) bitmap_plot_spline_8seg::$6 ← (number) 0 * (const byte) SIZEOF_STRUCT_SPLINEVECTOR16 (signed word*) bitmap_plot_spline_8seg::$10 ← (signed word*)(struct SplineVector16[9]) SPLINE_8SEG#0 + (const byte) OFFSET_STRUCT_SPLINEVECTOR16_X @@ -1666,6 +1694,8 @@ bitmap_plot_spline_8seg::@return: scope:[bitmap_plot_spline_8seg] from bitmap_p (signed byte*~) $1 ← (signed byte[$140]) SIN#0 + (number) $40 (signed byte*) COS#0 ← (signed byte*~) $1 to:@64 + +(struct SplineVector16()) rotate((signed word) rotate::vector_x , (signed word) rotate::vector_y , (byte) rotate::angle) rotate: scope:[rotate] from show_letter::@1 show_letter::@11 (signed word) rotate::vector_y#4 ← phi( show_letter::@1/(signed word) rotate::vector_y#0 show_letter::@11/(signed word) rotate::vector_y#1 ) (signed word) rotate::vector_x#2 ← phi( show_letter::@1/(signed word) rotate::vector_x#0 show_letter::@11/(signed word) rotate::vector_x#1 ) @@ -4711,6 +4741,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call mulf_init @@ -4764,6 +4796,8 @@ main::@5: scope:[main] from main::@4 main::@6: scope:[main] from main::@5 [26] (byte) main::angle#1 ← (byte) main::angle#2 + (byte) 9 to:main::@1 + +(void()) show_letter((byte) show_letter::angle) show_letter: scope:[show_letter] from main::@10 [27] phi() to:show_letter::@1 @@ -4846,6 +4880,8 @@ show_letter::@8: scope:[show_letter] from show_letter::@2 [83] phi() [84] call bitmap_plot_spline_8seg to:show_letter::@3 + +(void()) bitmap_plot_spline_8seg() bitmap_plot_spline_8seg: scope:[bitmap_plot_spline_8seg] from show_letter::@8 [85] (signed word) bitmap_plot_spline_8seg::current_x#0 ← *((signed word*)(const struct SplineVector16[9]) SPLINE_8SEG#0) [86] (signed word) bitmap_plot_spline_8seg::current_y#0 ← *((signed word*)(const struct SplineVector16[9]) SPLINE_8SEG#0+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y) @@ -4871,6 +4907,8 @@ bitmap_plot_spline_8seg::@2: scope:[bitmap_plot_spline_8seg] from bitmap_plot_s bitmap_plot_spline_8seg::@return: scope:[bitmap_plot_spline_8seg] from bitmap_plot_spline_8seg::@2 [99] return to:@return + +(void()) bitmap_line((word) bitmap_line::x1 , (word) bitmap_line::y1 , (word) bitmap_line::x2 , (word) bitmap_line::y2) bitmap_line: scope:[bitmap_line] from bitmap_plot_spline_8seg::@1 show_letter::@5 [100] (word) bitmap_line::y2#11 ← phi( bitmap_plot_spline_8seg::@1/(word~) bitmap_line::y2#13 show_letter::@5/(word) bitmap_line::y2#0 ) [100] (word) bitmap_line::x2#10 ← phi( bitmap_plot_spline_8seg::@1/(word~) bitmap_line::x2#13 show_letter::@5/(word) bitmap_line::x2#0 ) @@ -4973,6 +5011,8 @@ bitmap_line::@4: scope:[bitmap_line] from bitmap_line::@18 [150] (word) bitmap_plot::x#0 ← (word) bitmap_line::x#0 [151] call bitmap_plot to:bitmap_line::@return + +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from bitmap_line::@3 bitmap_line::@4 bitmap_line::@6 bitmap_line::@9 [152] (word) bitmap_plot::x#4 ← phi( bitmap_line::@9/(word) bitmap_plot::x#3 bitmap_line::@3/(word) bitmap_plot::x#2 bitmap_line::@4/(word) bitmap_plot::x#0 bitmap_line::@6/(word) bitmap_plot::x#1 ) [152] (byte) bitmap_plot::y#4 ← phi( bitmap_line::@9/(byte) bitmap_plot::y#3 bitmap_line::@3/(byte) bitmap_plot::y#2 bitmap_line::@4/(byte) bitmap_plot::y#0 bitmap_line::@6/(byte) bitmap_plot::y#1 ) @@ -4985,6 +5025,8 @@ bitmap_plot: scope:[bitmap_plot] from bitmap_line::@3 bitmap_line::@4 bitmap_li bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot [158] return to:@return + +(word()) sgn_u16((word) sgn_u16::w) sgn_u16: scope:[sgn_u16] from bitmap_line::@1 bitmap_line::@14 [159] (word) sgn_u16::w#2 ← phi( bitmap_line::@1/(word) sgn_u16::w#0 bitmap_line::@14/(word) sgn_u16::w#1 ) [160] (byte~) sgn_u16::$0 ← > (word) sgn_u16::w#2 @@ -4998,6 +5040,8 @@ sgn_u16::@return: scope:[sgn_u16] from sgn_u16 sgn_u16::@1 [164] (word) sgn_u16::return#4 ← phi( sgn_u16::@1/(byte) -1 sgn_u16/(byte) 1 ) [165] return to:@return + +(word()) abs_u16((word) abs_u16::w) abs_u16: scope:[abs_u16] from bitmap_line bitmap_line::@12 [166] (word) abs_u16::w#2 ← phi( bitmap_line/(word) abs_u16::w#0 bitmap_line::@12/(word) abs_u16::w#1 ) [167] (byte~) abs_u16::$0 ← > (word) abs_u16::w#2 @@ -5011,6 +5055,8 @@ abs_u16::@return: scope:[abs_u16] from abs_u16 abs_u16::@1 [171] (word) abs_u16::return#4 ← phi( abs_u16::@1/(word) abs_u16::return#2 abs_u16/(word) abs_u16::w#2 ) [172] return to:@return + +(void()) spline_8segB((signed word) spline_8segB::p0_x , (signed word) spline_8segB::p0_y , (signed word) spline_8segB::p1_x , (signed word) spline_8segB::p1_y , (signed word) spline_8segB::p2_x , (signed word) spline_8segB::p2_y) spline_8segB: scope:[spline_8segB] from show_letter::@2 [173] (signed word~) spline_8segB::$0 ← (signed word) spline_8segB::p1_x#0 << (byte) 1 [174] (signed word~) spline_8segB::$1 ← (signed word) spline_8segB::p2_x#0 - (signed word~) spline_8segB::$0 @@ -5062,6 +5108,8 @@ spline_8segB::@2: scope:[spline_8segB] from spline_8segB::@1 spline_8segB::@return: scope:[spline_8segB] from spline_8segB::@2 [211] return to:@return + +(struct SplineVector16()) rotate((signed word) rotate::vector_x , (signed word) rotate::vector_y , (byte) rotate::angle) rotate: scope:[rotate] from show_letter::@1 show_letter::@6 [212] (signed word) rotate::vector_y#2 ← phi( show_letter::@1/(signed word) rotate::vector_y#0 show_letter::@6/(signed word) rotate::vector_y#1 ) [212] (signed word) rotate::vector_x#2 ← phi( show_letter::@1/(signed word) rotate::vector_x#0 show_letter::@6/(signed word) rotate::vector_x#1 ) @@ -5114,6 +5162,8 @@ rotate::@4: scope:[rotate] from rotate::@3 rotate::@return: scope:[rotate] from rotate::@4 [249] return to:@return + +(signed dword()) mulf16s((signed word) mulf16s::a , (signed word) mulf16s::b) mulf16s: scope:[mulf16s] from rotate rotate::@1 rotate::@2 rotate::@3 [250] (signed word) mulf16s::b#4 ← phi( rotate/(signed word) mulf16s::b#0 rotate::@1/(signed word) mulf16s::b#1 rotate::@2/(signed word) mulf16s::b#2 rotate::@3/(signed word) mulf16s::b#3 ) [250] (signed word) mulf16s::a#4 ← phi( rotate/(signed word) mulf16s::a#0 rotate::@1/(signed word) mulf16s::a#1 rotate::@2/(signed word) mulf16s::a#2 rotate::@3/(signed word) mulf16s::a#3 ) @@ -5147,6 +5197,8 @@ mulf16s::@2: scope:[mulf16s] from mulf16s::@1 mulf16s::@4 mulf16s::@return: scope:[mulf16s] from mulf16s::@2 [267] return to:@return + +(dword()) mulf16u((word) mulf16u::a , (word) mulf16u::b) mulf16u: scope:[mulf16u] from mulf16s [268] *((const word*) mulf16u::memA#0) ← (word) mulf16u::a#0 [269] *((const word*) mulf16u::memB#0) ← (word) mulf16u::b#0 @@ -5156,6 +5208,8 @@ mulf16u: scope:[mulf16u] from mulf16s mulf16u::@return: scope:[mulf16u] from mulf16u [272] return to:@return + +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) bitmap_clear: scope:[bitmap_clear] from main::@2 main::@9 [273] phi() [274] call memset @@ -5167,6 +5221,8 @@ bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 [277] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [278] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) [278] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) BITMAP_SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP_GRAPHICS#0 ) @@ -5188,6 +5244,8 @@ memset::@3: scope:[memset] from memset::@2 [285] *((byte*) memset::dst#2) ← (byte) memset::c#4 [286] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) bitmap_init: scope:[bitmap_init] from main::@8 [287] phi() to:bitmap_init::@1 @@ -5228,6 +5286,8 @@ bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 [308] return to:@return + +(void()) mulf_init() mulf_init: scope:[mulf_init] from main [309] phi() to:mulf_init::@1 diff --git a/src/test/ref/complex/tetris/test-sprites.cfg b/src/test/ref/complex/tetris/test-sprites.cfg index ed0c612d0..a87c225b0 100644 --- a/src/test/ref/complex/tetris/test-sprites.cfg +++ b/src/test/ref/complex/tetris/test-sprites.cfg @@ -40,6 +40,8 @@ toSpritePtr1: scope:[] from @2 to:@end @end: scope:[] from @4 [11] phi() + +(void()) main() main: scope:[main] from @4 [12] phi() to:main::vicSelectGfxBank1 @@ -93,6 +95,8 @@ main::@6: scope:[main] from main::@2 main::@return: scope:[main] from main::@6 [36] return to:@return + +(void()) loop() loop: scope:[loop] from main::@6 [37] phi() to:loop::@1 @@ -117,6 +121,8 @@ loop::@4: scope:[loop] from loop::@3 loop::@4 loop::@5: scope:[loop] from loop::@4 [47] (byte) sin_idx#3 ← ++ (byte) sin_idx#10 to:loop::@1 + +(void()) sprites_irq_init() sprites_irq_init: scope:[sprites_irq_init] from main::@2 asm { sei } [49] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 @@ -133,6 +139,8 @@ sprites_irq_init: scope:[sprites_irq_init] from main::@2 sprites_irq_init::@return: scope:[sprites_irq_init] from sprites_irq_init [59] return to:@return + +(void()) sprites_init() sprites_init: scope:[sprites_init] from main::@3 [60] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f [61] *((const byte*) SPRITES_MC#0) ← (byte) 0 @@ -152,6 +160,8 @@ sprites_init::@1: scope:[sprites_init] from sprites_init sprites_init::@1 sprites_init::@return: scope:[sprites_init] from sprites_init::@1 [71] return to:@return + +interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() sprites_irq: scope:[sprites_irq] from asm { cld } [73] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0 diff --git a/src/test/ref/complex/tetris/test-sprites.log b/src/test/ref/complex/tetris/test-sprites.log index 6a1d303c7..b55dbb5a7 100644 --- a/src/test/ref/complex/tetris/test-sprites.log +++ b/src/test/ref/complex/tetris/test-sprites.log @@ -92,6 +92,8 @@ CONTROL FLOW GRAPH SSA } }} to:@5 + +(void()) sprites_init() sprites_init: scope:[sprites_init] from main::@4 *((byte*) SPRITES_ENABLE#0) ← (number) $f *((byte*) SPRITES_MC#0) ← (number) 0 @@ -153,6 +155,8 @@ toSpritePtr1_@return: scope:[] from toSpritePtr1 (byte) irq_sprite_ptr#0 ← (number~) $6 (byte) irq_cnt#0 ← (number) 0 to:@7 + +(void()) sprites_irq_init() sprites_irq_init: scope:[sprites_irq_init] from main::@2 asm { sei } *((byte*) IRQ_STATUS#0) ← (byte) IRQ_RASTER#0 @@ -170,6 +174,8 @@ sprites_irq_init: scope:[sprites_irq_init] from main::@2 sprites_irq_init::@return: scope:[sprites_irq_init] from sprites_irq_init return to:@return + +interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() sprites_irq: scope:[sprites_irq] from (byte) irq_cnt#15 ← phi( @9/(byte) irq_cnt#17 ) (byte) render_screen_showing#3 ← phi( @9/(byte) render_screen_showing#4 ) @@ -332,6 +338,8 @@ sprites_irq::@return: scope:[sprites_irq] from sprites_irq::@6 }} (byte) sin_idx#0 ← (number) 0 to:@9 + +(void()) main() main: scope:[main] from @9 (byte) sin_idx#32 ← phi( @9/(byte) sin_idx#16 ) (byte*) main::vicSelectGfxBank1_gfx#0 ← (byte*) PLAYFIELD_SCREEN_1#0 @@ -464,6 +472,8 @@ main::@return: scope:[main] from main::@8 (byte) sin_idx#2 ← (byte) sin_idx#7 return to:@return + +(void()) loop() loop: scope:[loop] from main::@7 (byte) sin_idx#18 ← phi( main::@7/(byte) sin_idx#12 ) to:loop::@1 @@ -1726,6 +1736,8 @@ toSpritePtr1: scope:[] from @2 to:@end @end: scope:[] from @4 [11] phi() + +(void()) main() main: scope:[main] from @4 [12] phi() to:main::vicSelectGfxBank1 @@ -1779,6 +1791,8 @@ main::@6: scope:[main] from main::@2 main::@return: scope:[main] from main::@6 [36] return to:@return + +(void()) loop() loop: scope:[loop] from main::@6 [37] phi() to:loop::@1 @@ -1803,6 +1817,8 @@ loop::@4: scope:[loop] from loop::@3 loop::@4 loop::@5: scope:[loop] from loop::@4 [47] (byte) sin_idx#3 ← ++ (byte) sin_idx#10 to:loop::@1 + +(void()) sprites_irq_init() sprites_irq_init: scope:[sprites_irq_init] from main::@2 asm { sei } [49] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 @@ -1819,6 +1835,8 @@ sprites_irq_init: scope:[sprites_irq_init] from main::@2 sprites_irq_init::@return: scope:[sprites_irq_init] from sprites_irq_init [59] return to:@return + +(void()) sprites_init() sprites_init: scope:[sprites_init] from main::@3 [60] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f [61] *((const byte*) SPRITES_MC#0) ← (byte) 0 @@ -1838,6 +1856,8 @@ sprites_init::@1: scope:[sprites_init] from sprites_init sprites_init::@1 sprites_init::@return: scope:[sprites_init] from sprites_init::@1 [71] return to:@return + +interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() sprites_irq: scope:[sprites_irq] from asm { cld } [73] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0 diff --git a/src/test/ref/complex/tetris/tetris.cfg b/src/test/ref/complex/tetris/tetris.cfg index 11d8e9801..a64050f2f 100644 --- a/src/test/ref/complex/tetris/tetris.cfg +++ b/src/test/ref/complex/tetris/tetris.cfg @@ -53,6 +53,8 @@ toSpritePtr1: scope:[] from @3 to:@end @end: scope:[] from @4 [14] phi() + +(void()) main() main: scope:[main] from @4 [15] phi() [16] call sid_rnd_init @@ -179,6 +181,8 @@ main::@25: scope:[main] from main::@24 [70] phi() [71] call render_screen_swap to:main::@1 + +(void()) render_screen_swap() render_screen_swap: scope:[render_screen_swap] from main::@25 [72] (byte) render_screen_render#11 ← (byte) render_screen_render#18 ^ (byte) $20 [73] (byte) render_screen_show#13 ← (byte) render_screen_show#16 ^ (byte) $20 @@ -186,6 +190,8 @@ render_screen_swap: scope:[render_screen_swap] from main::@25 render_screen_swap::@return: scope:[render_screen_swap] from render_screen_swap [74] return to:@return + +(void()) render_score() render_score: scope:[render_score] from main::@24 [75] if((byte) render_screen_render#18==(byte) 0) goto render_score::@1 to:render_score::@2 @@ -226,6 +232,8 @@ render_score::@7: scope:[render_score] from render_score::@6 render_score::@return: scope:[render_score] from render_score::@7 [96] return to:@return + +(void()) render_bcd((byte*) render_bcd::screen , (word) render_bcd::offset , (byte) render_bcd::bcd , (byte) render_bcd::only_low) render_bcd: scope:[render_bcd] from render_score::@2 render_score::@3 render_score::@4 render_score::@5 render_score::@6 render_score::@7 [97] (byte) render_bcd::bcd#6 ← phi( render_score::@2/(byte) render_bcd::bcd#0 render_score::@3/(byte) render_bcd::bcd#1 render_score::@4/(byte) render_bcd::bcd#2 render_score::@5/(byte) render_bcd::bcd#3 render_score::@6/(byte) render_bcd::bcd#4 render_score::@7/(byte) render_bcd::bcd#5 ) [97] (byte) render_bcd::only_low#6 ← phi( render_score::@2/(byte) 0 render_score::@3/(byte) 0 render_score::@4/(byte) 0 render_score::@5/(byte) 1 render_score::@6/(byte) 0 render_score::@7/(byte) 0 ) @@ -249,6 +257,8 @@ render_bcd::@1: scope:[render_bcd] from render_bcd render_bcd::@2 render_bcd::@return: scope:[render_bcd] from render_bcd::@1 [108] return to:@return + +(void()) render_next() render_next: scope:[render_next] from main::@16 main::@23 [109] (byte) next_piece_idx#12 ← phi( main::@16/(byte~) next_piece_idx#77 main::@23/(byte~) next_piece_idx#78 ) [109] (byte) render_screen_render#15 ← phi( main::@16/(byte) $20 main::@23/(byte~) render_screen_render#66 ) @@ -295,6 +305,8 @@ render_next::@return: scope:[render_next] from render_next::@8 render_next::@5: scope:[render_next] from render_next::@4 [129] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 to:render_next::@6 + +(void()) render_moving() render_moving: scope:[render_moving] from main::@15 main::@22 [130] (byte) current_piece_char#68 ← phi( main::@15/(byte~) current_piece_char#100 main::@22/(byte~) current_piece_char#101 ) [130] (byte*) current_piece_gfx#64 ← phi( main::@15/(byte*~) current_piece_gfx#112 main::@22/(byte*~) current_piece_gfx#113 ) @@ -343,6 +355,8 @@ render_moving::@5: scope:[render_moving] from render_moving::@4 render_moving:: [150] (byte) render_moving::c#1 ← ++ (byte) render_moving::c#2 [151] if((byte) render_moving::c#1!=(byte) 4) goto render_moving::@4 to:render_moving::@3 + +(void()) render_playfield() render_playfield: scope:[render_playfield] from main::@14 main::@7 [152] (byte) render_screen_render#22 ← phi( main::@7/(byte~) render_screen_render#64 main::@14/(byte) $20 ) to:render_playfield::@1 @@ -370,6 +384,8 @@ render_playfield::@3: scope:[render_playfield] from render_playfield::@2 render_playfield::@return: scope:[render_playfield] from render_playfield::@3 [165] return to:@return + +(byte()) play_movement((byte) play_movement::key_event) play_movement: scope:[play_movement] from main::@4 [166] (byte) play_move_down::key_event#0 ← (byte) play_movement::key_event#0 [167] call play_move_down @@ -402,6 +418,8 @@ play_movement::@4: scope:[play_movement] from play_movement::@3 [181] (byte~) play_movement::$4 ← (byte) play_move_rotate::return#0 [182] (byte) play_movement::return#0 ← (byte) play_movement::render#2 + (byte~) play_movement::$4 to:play_movement::@return + +(byte()) play_move_rotate((byte) play_move_rotate::key_event) play_move_rotate: scope:[play_move_rotate] from play_movement::@3 [183] if((byte) play_move_rotate::key_event#0==(const byte) KEY_Z#0) goto play_move_rotate::@1 to:play_move_rotate::@4 @@ -439,6 +457,8 @@ play_move_rotate::@1: scope:[play_move_rotate] from play_move_rotate [200] (byte~) play_move_rotate::$7 ← (byte) current_orientation#20 - (byte) $10 [201] (byte) play_move_rotate::orientation#1 ← (byte~) play_move_rotate::$7 & (byte) $3f to:play_move_rotate::@3 + +(byte()) play_collision((byte) play_collision::xpos , (byte) play_collision::ypos , (byte) play_collision::orientation) play_collision: scope:[play_collision] from play_move_down::@8 play_move_leftright::@1 play_move_leftright::@3 play_move_rotate::@3 play_spawn_current [202] (byte) play_collision::xpos#6 ← phi( play_move_down::@8/(byte) play_collision::xpos#0 play_move_leftright::@1/(byte) play_collision::xpos#1 play_move_leftright::@3/(byte) play_collision::xpos#2 play_move_rotate::@3/(byte) play_collision::xpos#3 play_spawn_current/(byte) play_collision::xpos#4 ) [202] (byte) play_collision::yp#0 ← phi( play_move_down::@8/(byte) play_collision::ypos#0 play_move_leftright::@1/(byte) play_collision::ypos#1 play_move_leftright::@3/(byte) play_collision::ypos#2 play_move_rotate::@3/(byte) play_collision::ypos#3 play_spawn_current/(byte) play_collision::ypos#4 ) @@ -494,6 +514,8 @@ play_collision::@9: scope:[play_collision] from play_collision::@8 play_collision::@10: scope:[play_collision] from play_collision::@3 [225] (byte~) play_collision::i#12 ← (byte) play_collision::i#1 to:play_collision::@2 + +(byte()) play_move_leftright((byte) play_move_leftright::key_event) play_move_leftright: scope:[play_move_leftright] from play_movement::@1 [226] if((byte) play_move_leftright::key_event#0==(const byte) KEY_COMMA#0) goto play_move_leftright::@1 to:play_move_leftright::@2 @@ -535,6 +557,8 @@ play_move_leftright::@6: scope:[play_move_leftright] from play_move_leftright:: play_move_leftright::@5: scope:[play_move_leftright] from play_move_leftright::@6 [247] (byte) current_xpos#8 ← -- (byte) current_xpos#22 to:play_move_leftright::@return + +(byte()) play_move_down((byte) play_move_down::key_event) play_move_down: scope:[play_move_down] from play_movement [248] (byte) current_movedown_counter#12 ← ++ (byte) current_movedown_counter#16 [249] if((byte) play_move_down::key_event#0!=(const byte) KEY_SPACE#0) goto play_move_down::@1 @@ -638,6 +662,8 @@ play_move_down::@return: scope:[play_move_down] from play_move_down::@11 play_m play_move_down::@10: scope:[play_move_down] from play_move_down::@13 [286] (byte) current_ypos#3 ← ++ (byte) current_ypos#11 to:play_move_down::@11 + +(void()) play_spawn_current() play_spawn_current: scope:[play_spawn_current] from main::@12 main::@13 play_move_down::@16 [287] (byte) game_over#65 ← phi( main::@12/(byte) 0 main::@13/(byte) game_over#52 play_move_down::@16/(byte) game_over#10 ) [287] (byte) next_piece_idx#17 ← phi( main::@12/(byte) 0 main::@13/(byte) play_spawn_current::piece_idx#2 play_move_down::@16/(byte) next_piece_idx#10 ) @@ -675,6 +701,8 @@ play_spawn_current::sid_rnd1: scope:[play_spawn_current] from play_spawn_curren play_spawn_current::@3: scope:[play_spawn_current] from play_spawn_current::sid_rnd1 [306] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 to:play_spawn_current::@2 + +(void()) play_update_score((byte) play_update_score::removed) play_update_score: scope:[play_update_score] from play_move_down::@15 [307] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return to:play_update_score::@1 @@ -703,6 +731,8 @@ play_update_score::@return: scope:[play_update_score] from play_update_score pl [321] (word) lines_bcd#17 ← phi( play_update_score/(word) lines_bcd#19 play_update_score::@1/(word) lines_bcd#29 play_update_score::@2/(word) lines_bcd#29 ) [322] return to:@return + +(void()) play_increase_level() play_increase_level: scope:[play_increase_level] from play_update_score::@2 [323] (byte) level#21 ← ++ (byte) level#10 [324] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 @@ -736,6 +766,8 @@ play_increase_level::@6: scope:[play_increase_level] from play_increase_level:: play_increase_level::@return: scope:[play_increase_level] from play_increase_level::@6 [339] return to:@return + +(byte()) play_remove_lines() play_remove_lines: scope:[play_remove_lines] from play_move_down::@14 [340] phi() to:play_remove_lines::@1 @@ -788,6 +820,8 @@ play_remove_lines::@8: scope:[play_remove_lines] from play_remove_lines::@7 [361] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#6) ← (byte) 0 [362] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6 to:play_remove_lines::@7 + +(void()) play_lock_current() play_lock_current: scope:[play_lock_current] from play_move_down::@9 [363] (byte) play_lock_current::yp#0 ← (byte) current_ypos#11 to:play_lock_current::@1 @@ -828,6 +862,8 @@ play_lock_current::@6: scope:[play_lock_current] from play_lock_current::@5 play_lock_current::@7: scope:[play_lock_current] from play_lock_current::@3 [380] (byte~) play_lock_current::i#9 ← (byte) play_lock_current::i#1 to:play_lock_current::@2 + +(byte()) keyboard_event_pressed((byte) keyboard_event_pressed::keycode) keyboard_event_pressed: scope:[keyboard_event_pressed] from keyboard_event_scan::@1 keyboard_event_scan::@17 keyboard_event_scan::@2 keyboard_event_scan::@3 play_move_down::@1 [381] (byte) keyboard_event_pressed::keycode#5 ← phi( keyboard_event_scan::@1/(const byte) KEY_RSHIFT#0 keyboard_event_scan::@2/(const byte) KEY_CTRL#0 keyboard_event_scan::@17/(const byte) KEY_LSHIFT#0 keyboard_event_scan::@3/(const byte) KEY_COMMODORE#0 play_move_down::@1/(const byte) KEY_SPACE#0 ) [382] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 @@ -838,6 +874,8 @@ keyboard_event_pressed: scope:[keyboard_event_pressed] from keyboard_event_scan keyboard_event_pressed::@return: scope:[keyboard_event_pressed] from keyboard_event_pressed [386] return to:@return + +(byte()) keyboard_event_get() keyboard_event_get: scope:[keyboard_event_get] from main::@19 [387] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return to:keyboard_event_get::@1 @@ -850,6 +888,8 @@ keyboard_event_get::@return: scope:[keyboard_event_get] from keyboard_event_get [390] (byte) keyboard_event_get::return#2 ← phi( keyboard_event_get/(byte) $ff keyboard_event_get::@1/(byte) keyboard_event_get::return#1 ) [391] return to:@return + +(void()) keyboard_event_scan() keyboard_event_scan: scope:[keyboard_event_scan] from main::@18 [392] phi() to:keyboard_event_scan::@7 @@ -958,6 +998,8 @@ keyboard_event_scan::@11: scope:[keyboard_event_scan] from keyboard_event_scan: [443] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 [444] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 to:keyboard_event_scan::@10 + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_event_scan::@7 [445] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [446] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) @@ -965,6 +1007,8 @@ keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_event_scan::@7 keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read [447] return to:@return + +(void()) render_show() render_show: scope:[render_show] from main::@3 [448] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 to:render_show::toD0182 @@ -984,6 +1028,8 @@ render_show::@return: scope:[render_show] from render_show::@1 render_show::toD0181: scope:[render_show] from render_show [456] phi() to:render_show::@1 + +(void()) play_init() play_init: scope:[play_init] from main::@11 [457] phi() to:play_init::@1 @@ -1013,6 +1059,8 @@ play_init::@3: scope:[play_init] from play_init::@2 play_init::@3 play_init::@return: scope:[play_init] from play_init::@3 [473] return to:@return + +(void()) sprites_irq_init() sprites_irq_init: scope:[sprites_irq_init] from main::@10 asm { sei } [475] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 @@ -1029,6 +1077,8 @@ sprites_irq_init: scope:[sprites_irq_init] from main::@10 sprites_irq_init::@return: scope:[sprites_irq_init] from sprites_irq_init [485] return to:@return + +(void()) sprites_init() sprites_init: scope:[sprites_init] from main::@9 [486] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f [487] *((const byte*) SPRITES_MC#0) ← (byte) 0 @@ -1048,6 +1098,8 @@ sprites_init::@1: scope:[sprites_init] from sprites_init sprites_init::@1 sprites_init::@return: scope:[sprites_init] from sprites_init::@1 [497] return to:@return + +(void()) render_init() render_init: scope:[render_init] from main::@8 [498] phi() to:render_init::vicSelectGfxBank1 @@ -1088,6 +1140,8 @@ render_init::@1: scope:[render_init] from render_init::@1 render_init::@3 render_init::@return: scope:[render_init] from render_init::@1 [519] return to:@return + +(void()) render_screen_original((byte*) render_screen_original::screen) render_screen_original: scope:[render_screen_original] from render_init::@2 render_init::@3 [520] (byte*) render_screen_original::screen#9 ← phi( render_init::@2/(const byte*) PLAYFIELD_SCREEN_1#0 render_init::@3/(const byte*) PLAYFIELD_SCREEN_2#0 ) to:render_screen_original::@1 @@ -1142,6 +1196,8 @@ render_screen_original::@5: scope:[render_screen_original] from render_screen_o render_screen_original::@return: scope:[render_screen_original] from render_screen_original::@5 [547] return to:@return + +(void()) sid_rnd_init() sid_rnd_init: scope:[sid_rnd_init] from main [548] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff [549] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 @@ -1149,6 +1205,8 @@ sid_rnd_init: scope:[sid_rnd_init] from main sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init [550] return to:@return + +interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() sprites_irq: scope:[sprites_irq] from asm { cld } [552] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0 diff --git a/src/test/ref/complex/tetris/tetris.log b/src/test/ref/complex/tetris/tetris.log index 9edf83251..514d857e5 100644 --- a/src/test/ref/complex/tetris/tetris.log +++ b/src/test/ref/complex/tetris/tetris.log @@ -217,6 +217,8 @@ CONTROL FLOW GRAPH SSA (byte[8]) keyboard_matrix_row_bitmask#0 ← { (number) $fe, (number) $fd, (number) $fb, (number) $f7, (number) $ef, (number) $df, (number) $bf, (number) $7f } (byte[8]) keyboard_matrix_col_bitmask#0 ← { (number) 1, (number) 2, (number) 4, (number) 8, (number) $10, (number) $20, (number) $40, (number) $80 } to:@8 + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_event_scan::@8 (byte) keyboard_matrix_read::rowid#1 ← phi( keyboard_event_scan::@8/(byte) keyboard_matrix_read::rowid#0 ) *((byte*) CIA1_PORT_A#0) ← *((byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#1) @@ -239,6 +241,8 @@ keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matri (byte) KEY_MODIFIER_COMMODORE#0 ← (number) 8 (byte[8]) keyboard_scan_values#0 ← { fill( 8, 0) } to:@11 + +(void()) keyboard_event_scan() keyboard_event_scan: scope:[keyboard_event_scan] from main::@35 (byte) keyboard_events_size#53 ← phi( main::@35/(byte) keyboard_events_size#26 ) (byte) keyboard_event_scan::keycode#0 ← (number) 0 @@ -449,6 +453,8 @@ keyboard_event_scan::@return: scope:[keyboard_event_scan] from keyboard_event_s (byte) keyboard_modifiers#6 ← (byte) keyboard_modifiers#14 return to:@return + +(byte()) keyboard_event_pressed((byte) keyboard_event_pressed::keycode) keyboard_event_pressed: scope:[keyboard_event_pressed] from keyboard_event_scan::@1 keyboard_event_scan::@2 keyboard_event_scan::@23 keyboard_event_scan::@3 play_move_down::@1 (byte) keyboard_event_pressed::keycode#5 ← phi( keyboard_event_scan::@1/(byte) keyboard_event_pressed::keycode#1 keyboard_event_scan::@2/(byte) keyboard_event_pressed::keycode#2 keyboard_event_scan::@23/(byte) keyboard_event_pressed::keycode#0 keyboard_event_scan::@3/(byte) keyboard_event_pressed::keycode#3 play_move_down::@1/(byte) keyboard_event_pressed::keycode#4 ) (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (number) 3 @@ -462,6 +468,8 @@ keyboard_event_pressed::@return: scope:[keyboard_event_pressed] from keyboard_e (byte) keyboard_event_pressed::return#5 ← (byte) keyboard_event_pressed::return#11 return to:@return + +(byte()) keyboard_event_get() keyboard_event_get: scope:[keyboard_event_get] from main::@36 (byte) keyboard_events_size#14 ← phi( main::@36/(byte) keyboard_events_size#6 ) (bool~) keyboard_event_get::$0 ← (byte) keyboard_events_size#14 == (number) 0 @@ -491,6 +499,8 @@ keyboard_event_get::@return: scope:[keyboard_event_get] from keyboard_event_get (byte) SID_CONTROL_NOISE#0 ← (number) $80 (byte*) SID_VOICE3_OSC#0 ← ((byte*)) (number) $d41b to:@13 + +(void()) sid_rnd_init() sid_rnd_init: scope:[sid_rnd_init] from main *((word*) SID_VOICE3_FREQ#0) ← (number) $ffff *((byte*) SID_VOICE3_CONTROL#0) ← (byte) SID_CONTROL_NOISE#0 @@ -546,6 +556,8 @@ sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init (byte*[PLAYFIELD_LINES#0]) screen_lines_1#0 ← { fill( PLAYFIELD_LINES#0, 0) } (byte*[PLAYFIELD_LINES#0]) screen_lines_2#0 ← { fill( PLAYFIELD_LINES#0, 0) } to:@22 + +(void()) render_init() render_init: scope:[render_init] from main::@25 (byte*) render_init::vicSelectGfxBank1_gfx#0 ← (byte*) PLAYFIELD_CHARSET#0 to:render_init::vicSelectGfxBank1 @@ -623,6 +635,8 @@ render_init::@return: scope:[render_init] from render_init::@2 (byte) render_screen_render#2 ← (byte) render_screen_render#9 return to:@return + +(void()) render_show() render_show: scope:[render_show] from main::@6 (byte) level#84 ← phi( main::@6/(byte) level#90 ) (byte) render_screen_show#10 ← phi( main::@6/(byte) render_screen_show#18 ) @@ -714,6 +728,8 @@ render_show::@return: scope:[render_show] from render_show::@2 (byte) render_screen_showing#2 ← (byte) render_screen_showing#6 return to:@return + +(void()) render_screen_swap() render_screen_swap: scope:[render_screen_swap] from main::@42 (byte) render_screen_show#12 ← phi( main::@42/(byte) render_screen_show#21 ) (byte) render_screen_render#10 ← phi( main::@42/(byte) render_screen_render#20 ) @@ -727,6 +743,8 @@ render_screen_swap::@return: scope:[render_screen_swap] from render_screen_swap (byte) render_screen_show#4 ← (byte) render_screen_show#13 return to:@return + +(void()) render_score() render_score: scope:[render_score] from main::@41 (byte) level_bcd#91 ← phi( main::@41/(byte) level_bcd#76 ) (word) lines_bcd#67 ← phi( main::@41/(word) lines_bcd#66 ) @@ -826,6 +844,8 @@ render_score::@10: scope:[render_score] from render_score::@9 render_score::@return: scope:[render_score] from render_score::@10 return to:@return + +(void()) render_bcd((byte*) render_bcd::screen , (word) render_bcd::offset , (byte) render_bcd::bcd , (byte) render_bcd::only_low) render_bcd: scope:[render_bcd] from render_score::@2 render_score::@5 render_score::@6 render_score::@7 render_score::@8 render_score::@9 (byte) render_bcd::bcd#8 ← phi( render_score::@2/(byte) render_bcd::bcd#0 render_score::@5/(byte) render_bcd::bcd#1 render_score::@6/(byte) render_bcd::bcd#2 render_score::@7/(byte) render_bcd::bcd#3 render_score::@8/(byte) render_bcd::bcd#4 render_score::@9/(byte) render_bcd::bcd#5 ) (byte) render_bcd::only_low#6 ← phi( render_score::@2/(byte) render_bcd::only_low#0 render_score::@5/(byte) render_bcd::only_low#1 render_score::@6/(byte) render_bcd::only_low#2 render_score::@7/(byte) render_bcd::only_low#3 render_score::@8/(byte) render_bcd::only_low#4 render_score::@9/(byte) render_bcd::only_low#5 ) @@ -857,6 +877,8 @@ render_bcd::@2: scope:[render_bcd] from render_bcd render_bcd::@return: scope:[render_bcd] from render_bcd::@1 return to:@return + +(void()) render_screen_original((byte*) render_screen_original::screen) render_screen_original: scope:[render_screen_original] from render_init::@3 render_init::@4 (byte*) render_screen_original::screen#9 ← phi( render_init::@3/(byte*) render_screen_original::screen#0 render_init::@4/(byte*) render_screen_original::screen#1 ) (byte) render_screen_original::SPACE#0 ← (number) 0 @@ -935,6 +957,8 @@ render_screen_original::@7: scope:[render_screen_original] from render_screen_o render_screen_original::@return: scope:[render_screen_original] from render_screen_original::@7 return to:@return + +(void()) render_playfield() render_playfield: scope:[render_playfield] from main::@23 main::@31 (byte) render_screen_render#22 ← phi( main::@23/(byte) render_screen_render#30 main::@31/(byte) render_screen_render#31 ) (number~) render_playfield::$0 ← (byte) PLAYFIELD_COLS#0 * (number) 2 @@ -976,6 +1000,8 @@ render_playfield::@3: scope:[render_playfield] from render_playfield::@2 render_playfield::@return: scope:[render_playfield] from render_playfield::@3 return to:@return + +(void()) render_moving() render_moving: scope:[render_moving] from main::@32 main::@39 (byte) current_piece_char#68 ← phi( main::@32/(byte) current_piece_char#80 main::@39/(byte) current_piece_char#84 ) (byte*) current_piece_gfx#64 ← phi( main::@32/(byte*) current_piece_gfx#81 main::@39/(byte*) current_piece_gfx#82 ) @@ -1083,6 +1109,8 @@ render_moving::@6: scope:[render_moving] from render_moving::@4 render_moving::@return: scope:[render_moving] from render_moving::@3 return to:@return + +(void()) render_next() render_next: scope:[render_next] from main::@33 main::@40 (byte) next_piece_idx#36 ← phi( main::@33/(byte) next_piece_idx#47 main::@40/(byte) next_piece_idx#48 ) (byte) render_screen_render#15 ← phi( main::@33/(byte) render_screen_render#25 main::@40/(byte) render_screen_render#26 ) @@ -1198,6 +1226,8 @@ render_next::@return: scope:[render_next] from render_next::@11 } }} to:@23 + +(void()) sprites_init() sprites_init: scope:[sprites_init] from main::@26 *((byte*) SPRITES_ENABLE#0) ← (number) $f *((byte*) SPRITES_MC#0) ← (number) 0 @@ -1311,6 +1341,8 @@ toSpritePtr1_@return: scope:[] from toSpritePtr1 (byte) irq_sprite_ptr#0 ← (number~) $7 (byte) irq_cnt#0 ← (number) 0 to:@25 + +(void()) sprites_irq_init() sprites_irq_init: scope:[sprites_irq_init] from main::@27 asm { sei } *((byte*) IRQ_STATUS#0) ← (byte) IRQ_RASTER#0 @@ -1328,6 +1360,8 @@ sprites_irq_init: scope:[sprites_irq_init] from main::@27 sprites_irq_init::@return: scope:[sprites_irq_init] from sprites_irq_init return to:@return + +interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() sprites_irq: scope:[sprites_irq] from (byte) irq_cnt#15 ← phi( @37/(byte) irq_cnt#17 ) (byte) render_screen_showing#15 ← phi( @37/(byte) render_screen_showing#14 ) @@ -1525,6 +1559,8 @@ sprites_irq::@return: scope:[sprites_irq] from sprites_irq::@6 (dword[]) SCORE_BASE_BCD#0 ← { (number) 0, (number) $40, (number) $100, (number) $300, (number) $1200 } (dword[5]) score_add_bcd#0 ← { fill( 5, 0) } to:@30 + +(void()) play_init() play_init: scope:[play_init] from main::@28 (byte) level#44 ← phi( main::@28/(byte) level#58 ) (byte) play_init::idx#0 ← (number) 0 @@ -1567,6 +1603,8 @@ play_init::@return: scope:[play_init] from play_init::@3 (byte) current_movedown_slow#2 ← (byte) current_movedown_slow#16 return to:@return + +(byte()) play_movement((byte) play_movement::key_event) play_movement: scope:[play_movement] from main::@11 (byte) next_piece_idx#26 ← phi( main::@11/(byte) next_piece_idx#33 ) (byte) game_over#23 ← phi( main::@11/(byte) game_over#32 ) @@ -1746,6 +1784,8 @@ play_movement::@return: scope:[play_movement] from play_movement::@2 play_movem (byte) next_piece_idx#2 ← (byte) next_piece_idx#14 return to:@return + +(byte()) play_move_down((byte) play_move_down::key_event) play_move_down: scope:[play_move_down] from play_movement (byte) next_piece_idx#73 ← phi( play_movement/(byte) next_piece_idx#26 ) (byte) game_over#79 ← phi( play_movement/(byte) game_over#23 ) @@ -2144,6 +2184,8 @@ play_move_down::@return: scope:[play_move_down] from play_move_down::@15 play_m (byte) next_piece_idx#4 ← (byte) next_piece_idx#16 return to:@return + +(byte()) play_move_leftright((byte) play_move_leftright::key_event) play_move_leftright: scope:[play_move_leftright] from play_movement::@1 (byte*) current_piece#44 ← phi( play_movement::@1/(byte*) current_piece#55 ) (byte) current_orientation#39 ← phi( play_movement::@1/(byte) current_orientation#50 ) @@ -2224,6 +2266,8 @@ play_move_leftright::@9: scope:[play_move_leftright] from play_move_leftright:: (byte) current_xpos#8 ← -- (byte) current_xpos#27 (byte) play_move_leftright::return#4 ← (number) 1 to:play_move_leftright::@return + +(byte()) play_move_rotate((byte) play_move_rotate::key_event) play_move_rotate: scope:[play_move_rotate] from play_movement::@6 (byte*) current_piece_gfx#70 ← phi( play_movement::@6/(byte*) current_piece_gfx#32 ) (byte*) current_piece#60 ← phi( play_movement::@6/(byte*) current_piece#40 ) @@ -2346,6 +2390,8 @@ play_move_rotate::@11: scope:[play_move_rotate] from play_move_rotate::@14 (byte) COLLISION_LEFT#0 ← (number) 4 (byte) COLLISION_RIGHT#0 ← (number) 8 to:@37 + +(byte()) play_collision((byte) play_collision::xpos , (byte) play_collision::ypos , (byte) play_collision::orientation) play_collision: scope:[play_collision] from play_move_down::@9 play_move_leftright::@1 play_move_leftright::@5 play_move_rotate::@4 play_spawn_current (byte) play_collision::xpos#6 ← phi( play_move_down::@9/(byte) play_collision::xpos#0 play_move_leftright::@1/(byte) play_collision::xpos#1 play_move_leftright::@5/(byte) play_collision::xpos#2 play_move_rotate::@4/(byte) play_collision::xpos#3 play_spawn_current/(byte) play_collision::xpos#4 ) (byte) play_collision::ypos#5 ← phi( play_move_down::@9/(byte) play_collision::ypos#0 play_move_leftright::@1/(byte) play_collision::ypos#1 play_move_leftright::@5/(byte) play_collision::ypos#2 play_move_rotate::@4/(byte) play_collision::ypos#3 play_spawn_current/(byte) play_collision::ypos#4 ) @@ -2480,6 +2526,8 @@ play_collision::@17: scope:[play_collision] from play_collision::@3 play_collision::@18: scope:[play_collision] from play_collision::@17 (byte) play_collision::return#9 ← (byte) COLLISION_NONE#0 to:play_collision::@return + +(void()) play_lock_current() play_lock_current: scope:[play_lock_current] from play_move_down::@10 (byte) current_piece_char#59 ← phi( play_move_down::@10/(byte) current_piece_char#75 ) (byte*) current_piece_gfx#54 ← phi( play_move_down::@10/(byte*) current_piece_gfx#73 ) @@ -2558,6 +2606,8 @@ play_lock_current::@5: scope:[play_lock_current] from play_lock_current::@3 play_lock_current::@return: scope:[play_lock_current] from play_lock_current::@5 return to:@return + +(void()) play_spawn_current() play_spawn_current: scope:[play_spawn_current] from main::@29 main::@30 play_move_down::@21 (byte) game_over#74 ← phi( main::@29/(byte) game_over#30 main::@30/(byte) game_over#7 play_move_down::@21/(byte) game_over#26 ) (byte) next_piece_idx#17 ← phi( main::@29/(byte) next_piece_idx#32 main::@30/(byte) next_piece_idx#7 play_move_down::@21/(byte) next_piece_idx#29 ) @@ -2685,6 +2735,8 @@ play_spawn_current::@return: scope:[play_spawn_current] from play_spawn_current (byte) next_piece_idx#6 ← (byte) next_piece_idx#18 return to:@return + +(byte()) play_remove_lines() play_remove_lines: scope:[play_remove_lines] from play_move_down::@19 (byte~) play_remove_lines::$0 ← (byte) PLAYFIELD_LINES#0 * (byte) PLAYFIELD_COLS#0 (number~) play_remove_lines::$1 ← (byte~) play_remove_lines::$0 - (number) 1 @@ -2790,6 +2842,8 @@ play_remove_lines::@return: scope:[play_remove_lines] from play_remove_lines::@ (byte) play_remove_lines::return#2 ← (byte) play_remove_lines::return#4 return to:@return + +(void()) play_update_score((byte) play_update_score::removed) play_update_score: scope:[play_update_score] from play_move_down::@20 (byte) level_bcd#34 ← phi( play_move_down::@20/(byte) level_bcd#30 ) (byte) current_movedown_slow#40 ← phi( play_move_down::@20/(byte) current_movedown_slow#36 ) @@ -2855,6 +2909,8 @@ play_update_score::@return: scope:[play_update_score] from play_update_score pl (byte) level_bcd#6 ← (byte) level_bcd#19 return to:@return + +(void()) play_increase_level() play_increase_level: scope:[play_increase_level] from play_update_score::@3 (byte) level_bcd#48 ← phi( play_update_score::@3/(byte) level_bcd#33 ) (byte) level#20 ← phi( play_update_score::@3/(byte) level#35 ) @@ -2921,6 +2977,8 @@ play_increase_level::@return: scope:[play_increase_level] from play_increase_le (byte) level_bcd#9 ← (byte) level_bcd#22 return to:@return + +(void()) main() main: scope:[main] from @37 (byte) level_bcd#100 ← phi( @37/(byte) level_bcd#41 ) (dword) score_bcd#83 ← phi( @37/(dword) score_bcd#32 ) @@ -11329,6 +11387,8 @@ toSpritePtr1: scope:[] from @3 to:@end @end: scope:[] from @4 [14] phi() + +(void()) main() main: scope:[main] from @4 [15] phi() [16] call sid_rnd_init @@ -11455,6 +11515,8 @@ main::@25: scope:[main] from main::@24 [70] phi() [71] call render_screen_swap to:main::@1 + +(void()) render_screen_swap() render_screen_swap: scope:[render_screen_swap] from main::@25 [72] (byte) render_screen_render#11 ← (byte) render_screen_render#18 ^ (byte) $20 [73] (byte) render_screen_show#13 ← (byte) render_screen_show#16 ^ (byte) $20 @@ -11462,6 +11524,8 @@ render_screen_swap: scope:[render_screen_swap] from main::@25 render_screen_swap::@return: scope:[render_screen_swap] from render_screen_swap [74] return to:@return + +(void()) render_score() render_score: scope:[render_score] from main::@24 [75] if((byte) render_screen_render#18==(byte) 0) goto render_score::@1 to:render_score::@2 @@ -11502,6 +11566,8 @@ render_score::@7: scope:[render_score] from render_score::@6 render_score::@return: scope:[render_score] from render_score::@7 [96] return to:@return + +(void()) render_bcd((byte*) render_bcd::screen , (word) render_bcd::offset , (byte) render_bcd::bcd , (byte) render_bcd::only_low) render_bcd: scope:[render_bcd] from render_score::@2 render_score::@3 render_score::@4 render_score::@5 render_score::@6 render_score::@7 [97] (byte) render_bcd::bcd#6 ← phi( render_score::@2/(byte) render_bcd::bcd#0 render_score::@3/(byte) render_bcd::bcd#1 render_score::@4/(byte) render_bcd::bcd#2 render_score::@5/(byte) render_bcd::bcd#3 render_score::@6/(byte) render_bcd::bcd#4 render_score::@7/(byte) render_bcd::bcd#5 ) [97] (byte) render_bcd::only_low#6 ← phi( render_score::@2/(byte) 0 render_score::@3/(byte) 0 render_score::@4/(byte) 0 render_score::@5/(byte) 1 render_score::@6/(byte) 0 render_score::@7/(byte) 0 ) @@ -11525,6 +11591,8 @@ render_bcd::@1: scope:[render_bcd] from render_bcd render_bcd::@2 render_bcd::@return: scope:[render_bcd] from render_bcd::@1 [108] return to:@return + +(void()) render_next() render_next: scope:[render_next] from main::@16 main::@23 [109] (byte) next_piece_idx#12 ← phi( main::@16/(byte~) next_piece_idx#77 main::@23/(byte~) next_piece_idx#78 ) [109] (byte) render_screen_render#15 ← phi( main::@16/(byte) $20 main::@23/(byte~) render_screen_render#66 ) @@ -11571,6 +11639,8 @@ render_next::@return: scope:[render_next] from render_next::@8 render_next::@5: scope:[render_next] from render_next::@4 [129] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 to:render_next::@6 + +(void()) render_moving() render_moving: scope:[render_moving] from main::@15 main::@22 [130] (byte) current_piece_char#68 ← phi( main::@15/(byte~) current_piece_char#100 main::@22/(byte~) current_piece_char#101 ) [130] (byte*) current_piece_gfx#64 ← phi( main::@15/(byte*~) current_piece_gfx#112 main::@22/(byte*~) current_piece_gfx#113 ) @@ -11619,6 +11689,8 @@ render_moving::@5: scope:[render_moving] from render_moving::@4 render_moving:: [150] (byte) render_moving::c#1 ← ++ (byte) render_moving::c#2 [151] if((byte) render_moving::c#1!=(byte) 4) goto render_moving::@4 to:render_moving::@3 + +(void()) render_playfield() render_playfield: scope:[render_playfield] from main::@14 main::@7 [152] (byte) render_screen_render#22 ← phi( main::@7/(byte~) render_screen_render#64 main::@14/(byte) $20 ) to:render_playfield::@1 @@ -11646,6 +11718,8 @@ render_playfield::@3: scope:[render_playfield] from render_playfield::@2 render_playfield::@return: scope:[render_playfield] from render_playfield::@3 [165] return to:@return + +(byte()) play_movement((byte) play_movement::key_event) play_movement: scope:[play_movement] from main::@4 [166] (byte) play_move_down::key_event#0 ← (byte) play_movement::key_event#0 [167] call play_move_down @@ -11678,6 +11752,8 @@ play_movement::@4: scope:[play_movement] from play_movement::@3 [181] (byte~) play_movement::$4 ← (byte) play_move_rotate::return#0 [182] (byte) play_movement::return#0 ← (byte) play_movement::render#2 + (byte~) play_movement::$4 to:play_movement::@return + +(byte()) play_move_rotate((byte) play_move_rotate::key_event) play_move_rotate: scope:[play_move_rotate] from play_movement::@3 [183] if((byte) play_move_rotate::key_event#0==(const byte) KEY_Z#0) goto play_move_rotate::@1 to:play_move_rotate::@4 @@ -11715,6 +11791,8 @@ play_move_rotate::@1: scope:[play_move_rotate] from play_move_rotate [200] (byte~) play_move_rotate::$7 ← (byte) current_orientation#20 - (byte) $10 [201] (byte) play_move_rotate::orientation#1 ← (byte~) play_move_rotate::$7 & (byte) $3f to:play_move_rotate::@3 + +(byte()) play_collision((byte) play_collision::xpos , (byte) play_collision::ypos , (byte) play_collision::orientation) play_collision: scope:[play_collision] from play_move_down::@8 play_move_leftright::@1 play_move_leftright::@3 play_move_rotate::@3 play_spawn_current [202] (byte) play_collision::xpos#6 ← phi( play_move_down::@8/(byte) play_collision::xpos#0 play_move_leftright::@1/(byte) play_collision::xpos#1 play_move_leftright::@3/(byte) play_collision::xpos#2 play_move_rotate::@3/(byte) play_collision::xpos#3 play_spawn_current/(byte) play_collision::xpos#4 ) [202] (byte) play_collision::yp#0 ← phi( play_move_down::@8/(byte) play_collision::ypos#0 play_move_leftright::@1/(byte) play_collision::ypos#1 play_move_leftright::@3/(byte) play_collision::ypos#2 play_move_rotate::@3/(byte) play_collision::ypos#3 play_spawn_current/(byte) play_collision::ypos#4 ) @@ -11770,6 +11848,8 @@ play_collision::@9: scope:[play_collision] from play_collision::@8 play_collision::@10: scope:[play_collision] from play_collision::@3 [225] (byte~) play_collision::i#12 ← (byte) play_collision::i#1 to:play_collision::@2 + +(byte()) play_move_leftright((byte) play_move_leftright::key_event) play_move_leftright: scope:[play_move_leftright] from play_movement::@1 [226] if((byte) play_move_leftright::key_event#0==(const byte) KEY_COMMA#0) goto play_move_leftright::@1 to:play_move_leftright::@2 @@ -11811,6 +11891,8 @@ play_move_leftright::@6: scope:[play_move_leftright] from play_move_leftright:: play_move_leftright::@5: scope:[play_move_leftright] from play_move_leftright::@6 [247] (byte) current_xpos#8 ← -- (byte) current_xpos#22 to:play_move_leftright::@return + +(byte()) play_move_down((byte) play_move_down::key_event) play_move_down: scope:[play_move_down] from play_movement [248] (byte) current_movedown_counter#12 ← ++ (byte) current_movedown_counter#16 [249] if((byte) play_move_down::key_event#0!=(const byte) KEY_SPACE#0) goto play_move_down::@1 @@ -11914,6 +11996,8 @@ play_move_down::@return: scope:[play_move_down] from play_move_down::@11 play_m play_move_down::@10: scope:[play_move_down] from play_move_down::@13 [286] (byte) current_ypos#3 ← ++ (byte) current_ypos#11 to:play_move_down::@11 + +(void()) play_spawn_current() play_spawn_current: scope:[play_spawn_current] from main::@12 main::@13 play_move_down::@16 [287] (byte) game_over#65 ← phi( main::@12/(byte) 0 main::@13/(byte) game_over#52 play_move_down::@16/(byte) game_over#10 ) [287] (byte) next_piece_idx#17 ← phi( main::@12/(byte) 0 main::@13/(byte) play_spawn_current::piece_idx#2 play_move_down::@16/(byte) next_piece_idx#10 ) @@ -11951,6 +12035,8 @@ play_spawn_current::sid_rnd1: scope:[play_spawn_current] from play_spawn_curren play_spawn_current::@3: scope:[play_spawn_current] from play_spawn_current::sid_rnd1 [306] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 to:play_spawn_current::@2 + +(void()) play_update_score((byte) play_update_score::removed) play_update_score: scope:[play_update_score] from play_move_down::@15 [307] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return to:play_update_score::@1 @@ -11979,6 +12065,8 @@ play_update_score::@return: scope:[play_update_score] from play_update_score pl [321] (word) lines_bcd#17 ← phi( play_update_score/(word) lines_bcd#19 play_update_score::@1/(word) lines_bcd#29 play_update_score::@2/(word) lines_bcd#29 ) [322] return to:@return + +(void()) play_increase_level() play_increase_level: scope:[play_increase_level] from play_update_score::@2 [323] (byte) level#21 ← ++ (byte) level#10 [324] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 @@ -12012,6 +12100,8 @@ play_increase_level::@6: scope:[play_increase_level] from play_increase_level:: play_increase_level::@return: scope:[play_increase_level] from play_increase_level::@6 [339] return to:@return + +(byte()) play_remove_lines() play_remove_lines: scope:[play_remove_lines] from play_move_down::@14 [340] phi() to:play_remove_lines::@1 @@ -12064,6 +12154,8 @@ play_remove_lines::@8: scope:[play_remove_lines] from play_remove_lines::@7 [361] *((const byte[PLAYFIELD_LINES#0*PLAYFIELD_COLS#0]) playfield#0 + (byte) play_remove_lines::w#6) ← (byte) 0 [362] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6 to:play_remove_lines::@7 + +(void()) play_lock_current() play_lock_current: scope:[play_lock_current] from play_move_down::@9 [363] (byte) play_lock_current::yp#0 ← (byte) current_ypos#11 to:play_lock_current::@1 @@ -12104,6 +12196,8 @@ play_lock_current::@6: scope:[play_lock_current] from play_lock_current::@5 play_lock_current::@7: scope:[play_lock_current] from play_lock_current::@3 [380] (byte~) play_lock_current::i#9 ← (byte) play_lock_current::i#1 to:play_lock_current::@2 + +(byte()) keyboard_event_pressed((byte) keyboard_event_pressed::keycode) keyboard_event_pressed: scope:[keyboard_event_pressed] from keyboard_event_scan::@1 keyboard_event_scan::@17 keyboard_event_scan::@2 keyboard_event_scan::@3 play_move_down::@1 [381] (byte) keyboard_event_pressed::keycode#5 ← phi( keyboard_event_scan::@1/(const byte) KEY_RSHIFT#0 keyboard_event_scan::@2/(const byte) KEY_CTRL#0 keyboard_event_scan::@17/(const byte) KEY_LSHIFT#0 keyboard_event_scan::@3/(const byte) KEY_COMMODORE#0 play_move_down::@1/(const byte) KEY_SPACE#0 ) [382] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 @@ -12114,6 +12208,8 @@ keyboard_event_pressed: scope:[keyboard_event_pressed] from keyboard_event_scan keyboard_event_pressed::@return: scope:[keyboard_event_pressed] from keyboard_event_pressed [386] return to:@return + +(byte()) keyboard_event_get() keyboard_event_get: scope:[keyboard_event_get] from main::@19 [387] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return to:keyboard_event_get::@1 @@ -12126,6 +12222,8 @@ keyboard_event_get::@return: scope:[keyboard_event_get] from keyboard_event_get [390] (byte) keyboard_event_get::return#2 ← phi( keyboard_event_get/(byte) $ff keyboard_event_get::@1/(byte) keyboard_event_get::return#1 ) [391] return to:@return + +(void()) keyboard_event_scan() keyboard_event_scan: scope:[keyboard_event_scan] from main::@18 [392] phi() to:keyboard_event_scan::@7 @@ -12234,6 +12332,8 @@ keyboard_event_scan::@11: scope:[keyboard_event_scan] from keyboard_event_scan: [443] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 [444] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 to:keyboard_event_scan::@10 + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_event_scan::@7 [445] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [446] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) @@ -12241,6 +12341,8 @@ keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_event_scan::@7 keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read [447] return to:@return + +(void()) render_show() render_show: scope:[render_show] from main::@3 [448] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 to:render_show::toD0182 @@ -12260,6 +12362,8 @@ render_show::@return: scope:[render_show] from render_show::@1 render_show::toD0181: scope:[render_show] from render_show [456] phi() to:render_show::@1 + +(void()) play_init() play_init: scope:[play_init] from main::@11 [457] phi() to:play_init::@1 @@ -12289,6 +12393,8 @@ play_init::@3: scope:[play_init] from play_init::@2 play_init::@3 play_init::@return: scope:[play_init] from play_init::@3 [473] return to:@return + +(void()) sprites_irq_init() sprites_irq_init: scope:[sprites_irq_init] from main::@10 asm { sei } [475] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 @@ -12305,6 +12411,8 @@ sprites_irq_init: scope:[sprites_irq_init] from main::@10 sprites_irq_init::@return: scope:[sprites_irq_init] from sprites_irq_init [485] return to:@return + +(void()) sprites_init() sprites_init: scope:[sprites_init] from main::@9 [486] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f [487] *((const byte*) SPRITES_MC#0) ← (byte) 0 @@ -12324,6 +12432,8 @@ sprites_init::@1: scope:[sprites_init] from sprites_init sprites_init::@1 sprites_init::@return: scope:[sprites_init] from sprites_init::@1 [497] return to:@return + +(void()) render_init() render_init: scope:[render_init] from main::@8 [498] phi() to:render_init::vicSelectGfxBank1 @@ -12364,6 +12474,8 @@ render_init::@1: scope:[render_init] from render_init::@1 render_init::@3 render_init::@return: scope:[render_init] from render_init::@1 [519] return to:@return + +(void()) render_screen_original((byte*) render_screen_original::screen) render_screen_original: scope:[render_screen_original] from render_init::@2 render_init::@3 [520] (byte*) render_screen_original::screen#9 ← phi( render_init::@2/(const byte*) PLAYFIELD_SCREEN_1#0 render_init::@3/(const byte*) PLAYFIELD_SCREEN_2#0 ) to:render_screen_original::@1 @@ -12418,6 +12530,8 @@ render_screen_original::@5: scope:[render_screen_original] from render_screen_o render_screen_original::@return: scope:[render_screen_original] from render_screen_original::@5 [547] return to:@return + +(void()) sid_rnd_init() sid_rnd_init: scope:[sid_rnd_init] from main [548] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff [549] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 @@ -12425,6 +12539,8 @@ sid_rnd_init: scope:[sid_rnd_init] from main sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init [550] return to:@return + +interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() sprites_irq: scope:[sprites_irq] from asm { cld } [552] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0 diff --git a/src/test/ref/complex/xmega65/xmega65.cfg b/src/test/ref/complex/xmega65/xmega65.cfg index 32c382581..45f5f99db 100644 --- a/src/test/ref/complex/xmega65/xmega65.cfg +++ b/src/test/ref/complex/xmega65/xmega65.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) VIC_MEMORY#0) ← (byte) $14 [5] call memset @@ -37,6 +39,8 @@ main::@2: scope:[main] from main::@1 [15] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 [16] (byte*) main::msg#1 ← ++ (byte*) main::msg#2 to:main::@1 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main main::@6 [17] (byte) memset::c#4 ← phi( main/(byte) ' ' main::@6/(const byte) WHITE#0 ) [17] (void*) memset::str#3 ← phi( main/(void*)(const byte*) SCREEN#0 main::@6/(void*)(const byte*) COLS#0 ) @@ -58,12 +62,16 @@ memset::@3: scope:[memset] from memset::@2 [24] *((byte*) memset::dst#2) ← (byte) memset::c#4 [25] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) syscall2() syscall2: scope:[syscall2] from [26] *((const byte*) SCREEN#0+(byte) $4e) ← (byte) '<' to:syscall2::@return syscall2::@return: scope:[syscall2] from syscall2 [27] return to:@return + +(void()) syscall1() syscall1: scope:[syscall1] from [28] *((const byte*) SCREEN#0+(byte) $4f) ← (byte) '>' to:syscall1::@return diff --git a/src/test/ref/complex/xmega65/xmega65.log b/src/test/ref/complex/xmega65/xmega65.log index c5997a0da..7cab42490 100644 --- a/src/test/ref/complex/xmega65/xmega65.log +++ b/src/test/ref/complex/xmega65/xmega65.log @@ -25,6 +25,8 @@ Culled Empty Block (label) @6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@4 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main main::@17 (byte) memset::c#5 ← phi( main/(byte) memset::c#0 main::@17/(byte) memset::c#1 ) (void*) memset::str#4 ← phi( main/(void*) memset::str#0 main::@17/(void*) memset::str#1 ) @@ -77,6 +79,8 @@ memset::@return: scope:[memset] from memset::@1 (byte) WHITE#0 ← (number) 1 (byte[]) MESSAGE#0 ← (const string) $3 to:@7 + +(void()) main() main: scope:[main] from @7 *((byte*) VIC_MEMORY#0) ← (number) $14 (void*) memset::str#0 ← (void*)(byte*) SCREEN#0 @@ -128,6 +132,8 @@ main::@14: scope:[main] from main::@8 main::@return: scope:[main] from main::@7 return to:@return + +(void()) syscall1() syscall1: scope:[syscall1] from (byte*~) syscall1::$0 ← (byte*) SCREEN#0 + (number) $4f *((byte*~) syscall1::$0) ← (byte) '>' @@ -135,6 +141,8 @@ syscall1: scope:[syscall1] from syscall1::@return: scope:[syscall1] from syscall1 return to:@return + +(void()) syscall2() syscall2: scope:[syscall2] from (byte*~) syscall2::$0 ← (byte*) SCREEN#0 + (number) $4e *((byte*~) syscall2::$0) ← (byte) '<' @@ -492,6 +500,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) VIC_MEMORY#0) ← (byte) $14 [5] call memset @@ -522,6 +532,8 @@ main::@2: scope:[main] from main::@1 [15] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 [16] (byte*) main::msg#1 ← ++ (byte*) main::msg#2 to:main::@1 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main main::@6 [17] (byte) memset::c#4 ← phi( main/(byte) ' ' main::@6/(const byte) WHITE#0 ) [17] (void*) memset::str#3 ← phi( main/(void*)(const byte*) SCREEN#0 main::@6/(void*)(const byte*) COLS#0 ) @@ -543,12 +555,16 @@ memset::@3: scope:[memset] from memset::@2 [24] *((byte*) memset::dst#2) ← (byte) memset::c#4 [25] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) syscall2() syscall2: scope:[syscall2] from [26] *((const byte*) SCREEN#0+(byte) $4e) ← (byte) '<' to:syscall2::@return syscall2::@return: scope:[syscall2] from syscall2 [27] return to:@return + +(void()) syscall1() syscall1: scope:[syscall1] from [28] *((const byte*) SCREEN#0+(byte) $4f) ← (byte) '>' to:syscall1::@return diff --git a/src/test/ref/condition-integer-0.cfg b/src/test/ref/condition-integer-0.cfg index ceede22d2..ce49bfe68 100644 --- a/src/test/ref/condition-integer-0.cfg +++ b/src/test/ref/condition-integer-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@2 diff --git a/src/test/ref/condition-integer-0.log b/src/test/ref/condition-integer-0.log index d89bc5ae6..483d43467 100644 --- a/src/test/ref/condition-integer-0.log +++ b/src/test/ref/condition-integer-0.log @@ -8,6 +8,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::idx#0 ← (number) 0 (bool~) main::$0 ← ! (number) 0!=(number) 0 @@ -302,6 +304,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@2 diff --git a/src/test/ref/condition-integer-1.cfg b/src/test/ref/condition-integer-1.cfg index c5cd311fd..b10cac88f 100644 --- a/src/test/ref/condition-integer-1.cfg +++ b/src/test/ref/condition-integer-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@2 diff --git a/src/test/ref/condition-integer-1.log b/src/test/ref/condition-integer-1.log index 09be3db21..9de0ef04c 100644 --- a/src/test/ref/condition-integer-1.log +++ b/src/test/ref/condition-integer-1.log @@ -8,6 +8,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::idx#0 ← (number) 0 (bool~) main::$0 ← ! !(number) 0!=(number) 0 @@ -304,6 +306,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@2 diff --git a/src/test/ref/condition-integer-2.cfg b/src/test/ref/condition-integer-2.cfg index a1b0339c2..278b70dda 100644 --- a/src/test/ref/condition-integer-2.cfg +++ b/src/test/ref/condition-integer-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/condition-integer-2.log b/src/test/ref/condition-integer-2.log index ee9ec7bdb..2728a4286 100644 --- a/src/test/ref/condition-integer-2.log +++ b/src/test/ref/condition-integer-2.log @@ -14,6 +14,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte) idx#0 ← (number) 0 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) idx#18 ← phi( @1/(byte) idx#17 ) (byte) main::i#0 ← (number) 2 @@ -235,6 +237,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/condition-integer-3.cfg b/src/test/ref/condition-integer-3.cfg index ccd8c8740..579049e84 100644 --- a/src/test/ref/condition-integer-3.cfg +++ b/src/test/ref/condition-integer-3.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/condition-integer-3.log b/src/test/ref/condition-integer-3.log index 112a4be1c..4b09dd753 100644 --- a/src/test/ref/condition-integer-3.log +++ b/src/test/ref/condition-integer-3.log @@ -7,6 +7,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::idx#0 ← (number) 0 (signed byte) main::i#0 ← (signed byte) -2 @@ -162,6 +164,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/condition-integer-4.cfg b/src/test/ref/condition-integer-4.cfg index 3ff3f9e2c..c8518096a 100644 --- a/src/test/ref/condition-integer-4.cfg +++ b/src/test/ref/condition-integer-4.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/condition-integer-4.log b/src/test/ref/condition-integer-4.log index 2a136bf38..ebe2f061b 100644 --- a/src/test/ref/condition-integer-4.log +++ b/src/test/ref/condition-integer-4.log @@ -6,6 +6,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::idx#0 ← (number) 0 (byte) main::i#0 ← (byte) 0 @@ -313,6 +315,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/condition-type-mismatch.cfg b/src/test/ref/condition-type-mismatch.cfg index 3adfeec78..12c37ed2e 100644 --- a/src/test/ref/condition-type-mismatch.cfg +++ b/src/test/ref/condition-type-mismatch.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/condition-type-mismatch.log b/src/test/ref/condition-type-mismatch.log index 857e9c180..1d83fa4ee 100644 --- a/src/test/ref/condition-type-mismatch.log +++ b/src/test/ref/condition-type-mismatch.log @@ -6,6 +6,8 @@ Culled Empty Block (label) main::@1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::b#0 ← (number) $c (bool~) main::$1 ← (number) 0 != (byte) main::b#0 @@ -92,6 +94,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/consolidate-array-index-problem.cfg b/src/test/ref/consolidate-array-index-problem.cfg index 66556e18b..9cda32c9b 100644 --- a/src/test/ref/consolidate-array-index-problem.cfg +++ b/src/test/ref/consolidate-array-index-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/consolidate-array-index-problem.log b/src/test/ref/consolidate-array-index-problem.log index 14a7bef05..814249366 100644 --- a/src/test/ref/consolidate-array-index-problem.log +++ b/src/test/ref/consolidate-array-index-problem.log @@ -6,6 +6,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::BLACK#0 ← (number) 0 (byte*) main::screen#0 ← ((byte*)) (number) $400 @@ -121,6 +123,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/consolidate-constant-problem.cfg b/src/test/ref/consolidate-constant-problem.cfg index beddd8c36..7198f39e0 100644 --- a/src/test/ref/consolidate-constant-problem.cfg +++ b/src/test/ref/consolidate-constant-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/consolidate-constant-problem.log b/src/test/ref/consolidate-constant-problem.log index bfa8e42ed..9d500f2b4 100644 --- a/src/test/ref/consolidate-constant-problem.log +++ b/src/test/ref/consolidate-constant-problem.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) screen#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::j#0 ← (byte) 0 to:main::@1 @@ -201,6 +203,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/const-condition.cfg b/src/test/ref/const-condition.cfg index 9161aa44c..1218b5af7 100644 --- a/src/test/ref/const-condition.cfg +++ b/src/test/ref/const-condition.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/const-condition.log b/src/test/ref/const-condition.log index 5f61beb8d..9d2d5cb79 100644 --- a/src/test/ref/const-condition.log +++ b/src/test/ref/const-condition.log @@ -4,6 +4,8 @@ Culled Empty Block (label) main::@4 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 if((number) 7<(number) 4) goto main::@1 @@ -84,6 +86,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/const-early-identification.cfg b/src/test/ref/const-early-identification.cfg index 3ed516c6b..a65452228 100644 --- a/src/test/ref/const-early-identification.cfg +++ b/src/test/ref/const-early-identification.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) A#0 [5] *((const byte*) SCREEN#0+(byte) 1) ← (const byte) main::B#0 @@ -16,6 +18,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [8] return to:@return + +(void()) sub() sub: scope:[sub] from main [9] *((const byte*) SCREEN#0+(byte) 3) ← (const byte) sub::C#0 [10] (byte) sub::D#0 ← (byte) A#0 + (byte) 1 diff --git a/src/test/ref/const-early-identification.log b/src/test/ref/const-early-identification.log index 336c434fa..349f87315 100644 --- a/src/test/ref/const-early-identification.log +++ b/src/test/ref/const-early-identification.log @@ -9,6 +9,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte) A#0 ← (byte) 'a' to:@2 + +(void()) main() main: scope:[main] from @2 (byte) A#1 ← phi( @2/(byte) A#3 ) *((byte*) SCREEN#0 + (number) 0) ← (byte) A#1 @@ -24,6 +26,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 return to:@return + +(void()) sub() sub: scope:[sub] from main (byte) A#2 ← phi( main/(byte) A#1 ) (byte) sub::C#0 ← (byte) 'c' @@ -144,6 +148,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) A#0 [5] *((const byte*) SCREEN#0+(byte) 1) ← (const byte) main::B#0 @@ -153,6 +159,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [8] return to:@return + +(void()) sub() sub: scope:[sub] from main [9] *((const byte*) SCREEN#0+(byte) 3) ← (const byte) sub::C#0 [10] (byte) sub::D#0 ← (byte) A#0 + (byte) 1 diff --git a/src/test/ref/const-identification.cfg b/src/test/ref/const-identification.cfg index 65cd14162..7f7bb995c 100644 --- a/src/test/ref/const-identification.cfg +++ b/src/test/ref/const-identification.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -21,6 +23,8 @@ main::@2: scope:[main] from main::@1 main::@2 [10] phi() [11] call line to:main::@2 + +(void()) line((byte) line::x0 , (byte) line::x1) line: scope:[line] from main::@2 [12] phi() to:line::@1 @@ -38,6 +42,8 @@ line::@2: scope:[line] from line::@1 line::@3: scope:[line] from line::@2 [18] (byte) line::x#1 ← ++ (byte) line::x#2 to:line::@1 + +(void()) plot((byte) plot::x) plot: scope:[plot] from line::@2 [19] (byte) plot::idx#0 ← *((const byte*) plots#0 + (byte) plot::x#1) [20] (byte~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte) 1 diff --git a/src/test/ref/const-identification.log b/src/test/ref/const-identification.log index 8aad03f02..0e27da602 100644 --- a/src/test/ref/const-identification.log +++ b/src/test/ref/const-identification.log @@ -14,6 +14,8 @@ CONTROL FLOW GRAPH SSA (byte*) plots#0 ← ((byte*)) (number) $1000 (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@3 + +(void()) main() main: scope:[main] from @3 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -36,6 +38,8 @@ main::@5: scope:[main] from main::@3 main::@return: scope:[main] from main::@5 return to:@return + +(void()) line((byte) line::x0 , (byte) line::x1) line: scope:[line] from main::@3 (byte) line::x1#1 ← phi( main::@3/(byte) line::x1#0 ) (byte) line::x0#1 ← phi( main::@3/(byte) line::x0#0 ) @@ -74,6 +78,8 @@ line::@12: scope:[line] from line::@6 line::@return: scope:[line] from line::@11 line::@5 return to:@return + +(void()) plot((byte) plot::x) plot: scope:[plot] from line::@3 line::@6 (byte) plot::x#2 ← phi( line::@3/(byte) plot::x#0 line::@6/(byte) plot::x#1 ) (byte) plot::idx#0 ← *((byte*) plots#0 + (byte) plot::x#2) @@ -267,6 +273,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -281,6 +289,8 @@ main::@2: scope:[main] from main::@1 main::@2 [10] phi() [11] call line to:main::@2 + +(void()) line((byte) line::x0 , (byte) line::x1) line: scope:[line] from main::@2 [12] phi() to:line::@1 @@ -298,6 +308,8 @@ line::@2: scope:[line] from line::@1 line::@3: scope:[line] from line::@2 [18] (byte) line::x#1 ← ++ (byte) line::x#2 to:line::@1 + +(void()) plot((byte) plot::x) plot: scope:[plot] from line::@2 [19] (byte) plot::idx#0 ← *((const byte*) plots#0 + (byte) plot::x#1) [20] (byte~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte) 1 diff --git a/src/test/ref/const-if-problem.cfg b/src/test/ref/const-if-problem.cfg index 0838dbf87..1835cfddc 100644 --- a/src/test/ref/const-if-problem.cfg +++ b/src/test/ref/const-if-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/const-if-problem.log b/src/test/ref/const-if-problem.log index 09386ccf9..acb6321ad 100644 --- a/src/test/ref/const-if-problem.log +++ b/src/test/ref/const-if-problem.log @@ -8,6 +8,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @3 if((number) 1==(number) 1) goto main::@1 to:main::@3 @@ -25,6 +27,8 @@ main::@return: scope:[main] from main::@1 main::@5 @1: scope:[] from @begin (byte) cc#0 ← (byte) 'b' to:@3 + +(void()) doit() doit: scope:[doit] from main::@3 *((byte*) SCREEN#0 + (number) 1) ← (byte) cc#0 call doit2 @@ -34,6 +38,8 @@ doit::@1: scope:[doit] from doit doit::@return: scope:[doit] from doit::@1 return to:@return + +(void()) doit2() doit2: scope:[doit2] from doit *((byte*) SCREEN#0 + (number) 2) ← (byte) cc#0 to:doit2::@return @@ -131,6 +137,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/const-int-cast-problem.cfg b/src/test/ref/const-int-cast-problem.cfg index 8fc115925..e2b24cca2 100644 --- a/src/test/ref/const-int-cast-problem.cfg +++ b/src/test/ref/const-int-cast-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/const-int-cast-problem.log b/src/test/ref/const-int-cast-problem.log index bfc03fe31..0c84ab321 100644 --- a/src/test/ref/const-int-cast-problem.log +++ b/src/test/ref/const-int-cast-problem.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (byte) $79 to:main::@1 @@ -96,6 +98,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/const-mult-div.cfg b/src/test/ref/const-mult-div.cfg index 1149a89cb..8464cc471 100644 --- a/src/test/ref/const-mult-div.cfg +++ b/src/test/ref/const-mult-div.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::screen#0) ← (const byte) main::b#0 to:main::@return diff --git a/src/test/ref/const-mult-div.log b/src/test/ref/const-mult-div.log index 4dbce63d7..608023c32 100644 --- a/src/test/ref/const-mult-div.log +++ b/src/test/ref/const-mult-div.log @@ -4,6 +4,8 @@ Identified constant variable (byte*) main::screen CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::b#0 ← (number) 6*(number) $e/(number) 3+(number) $16%(number) 3 (byte*) main::screen#0 ← ((byte*)) (number) $400 @@ -73,6 +75,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::screen#0) ← (const byte) main::b#0 to:main::@return diff --git a/src/test/ref/const-param.cfg b/src/test/ref/const-param.cfg index 58eb015b9..542dfff3e 100644 --- a/src/test/ref/const-param.cfg +++ b/src/test/ref/const-param.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call sum @@ -31,6 +33,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [17] return to:@return + +(byte()) sum((byte) sum::a , (byte) sum::b) sum: scope:[sum] from main main::@1 main::@2 [18] (byte) sum::b#3 ← phi( main/(byte) 'c' main::@1/(byte) 'm' main::@2/(byte) 'l' ) [19] (byte) sum::return#3 ← (const byte) main::reverse#0 + (byte) sum::b#3 diff --git a/src/test/ref/const-param.log b/src/test/ref/const-param.log index 60571eea8..0cacb2154 100644 --- a/src/test/ref/const-param.log +++ b/src/test/ref/const-param.log @@ -5,6 +5,8 @@ Culled Empty Block (label) sum::@1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @2 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte) main::reverse#0 ← (number) $80 @@ -39,6 +41,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 return to:@return + +(byte()) sum((byte) sum::a , (byte) sum::b) sum: scope:[sum] from main main::@1 main::@2 (byte) sum::b#3 ← phi( main/(byte) sum::b#0 main::@1/(byte) sum::b#1 main::@2/(byte) sum::b#2 ) (byte) sum::a#3 ← phi( main/(byte) sum::a#0 main::@1/(byte) sum::a#1 main::@2/(byte) sum::a#2 ) @@ -180,6 +184,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call sum @@ -204,6 +210,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [17] return to:@return + +(byte()) sum((byte) sum::a , (byte) sum::b) sum: scope:[sum] from main main::@1 main::@2 [18] (byte) sum::b#3 ← phi( main/(byte) 'c' main::@1/(byte) 'm' main::@2/(byte) 'l' ) [19] (byte) sum::return#3 ← (const byte) main::reverse#0 + (byte) sum::b#3 diff --git a/src/test/ref/const-pointer.cfg b/src/test/ref/const-pointer.cfg index 64f335924..56477eb1d 100644 --- a/src/test/ref/const-pointer.cfg +++ b/src/test/ref/const-pointer.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/const-pointer.log b/src/test/ref/const-pointer.log index 156f5c68b..50e6b24c9 100644 --- a/src/test/ref/const-pointer.log +++ b/src/test/ref/const-pointer.log @@ -7,6 +7,8 @@ Culled Empty Block (label) main::@4 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte*) main::NULL#0 ← ((byte*)) (number) 0 @@ -105,6 +107,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/const-signed-promotion.cfg b/src/test/ref/const-signed-promotion.cfg index 0940169f7..145cf2b40 100644 --- a/src/test/ref/const-signed-promotion.cfg +++ b/src/test/ref/const-signed-promotion.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/const-signed-promotion.log b/src/test/ref/const-signed-promotion.log index 62a0115ea..1f32598fd 100644 --- a/src/test/ref/const-signed-promotion.log +++ b/src/test/ref/const-signed-promotion.log @@ -6,6 +6,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (signed word[3]) world#0 ← { fill( 3, 0) } to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -129,6 +131,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/const-word-pointer.cfg b/src/test/ref/const-word-pointer.cfg index cc85486b6..6b236bf3a 100644 --- a/src/test/ref/const-word-pointer.cfg +++ b/src/test/ref/const-word-pointer.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (word) main::w#0 ← (word) $d03 [5] (byte~) main::$1 ← < *((const word*) main::wp#0) diff --git a/src/test/ref/const-word-pointer.log b/src/test/ref/const-word-pointer.log index e3ab78db6..b4ebf6a21 100644 --- a/src/test/ref/const-word-pointer.log +++ b/src/test/ref/const-word-pointer.log @@ -4,6 +4,8 @@ Identified constant variable (byte*) main::screen CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (word) main::w#0 ← (number) $d03 @@ -111,6 +113,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (word) main::w#0 ← (word) $d03 [5] (byte~) main::$1 ← < *((const word*) main::wp#0) diff --git a/src/test/ref/constabsmin.cfg b/src/test/ref/constabsmin.cfg index 4dc608bc3..cbc89c457 100644 --- a/src/test/ref/constabsmin.cfg +++ b/src/test/ref/constabsmin.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) 1 to:main::@return diff --git a/src/test/ref/constabsmin.log b/src/test/ref/constabsmin.log index 3d052a98d..974dc0e54 100644 --- a/src/test/ref/constabsmin.log +++ b/src/test/ref/constabsmin.log @@ -3,6 +3,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 *((byte*) SCREEN#0) ← (number) 1 to:main::@return @@ -62,6 +64,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) 1 to:main::@return diff --git a/src/test/ref/constant-string-concat-0.cfg b/src/test/ref/constant-string-concat-0.cfg index d73e1bde9..3be15aafd 100644 --- a/src/test/ref/constant-string-concat-0.cfg +++ b/src/test/ref/constant-string-concat-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/constant-string-concat-0.log b/src/test/ref/constant-string-concat-0.log index c56058d04..f98f63b4d 100644 --- a/src/test/ref/constant-string-concat-0.log +++ b/src/test/ref/constant-string-concat-0.log @@ -7,6 +7,8 @@ Culled Empty Block (label) main::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte[]) main::msg#0 ← (const string) main::$1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 @@ -105,6 +107,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/constant-string-concat.cfg b/src/test/ref/constant-string-concat.cfg index 7f2a1e6a8..2466d291f 100644 --- a/src/test/ref/constant-string-concat.cfg +++ b/src/test/ref/constant-string-concat.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/constant-string-concat.log b/src/test/ref/constant-string-concat.log index cf774dd70..be2c3a814 100644 --- a/src/test/ref/constant-string-concat.log +++ b/src/test/ref/constant-string-concat.log @@ -4,6 +4,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte[]) main::s#0 ← (const string) main::$1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 @@ -96,6 +98,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/constantmin.cfg b/src/test/ref/constantmin.cfg index 0c120e1bc..0073f01e2 100644 --- a/src/test/ref/constantmin.cfg +++ b/src/test/ref/constantmin.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (const byte) STAR#0 [5] *((const byte*) VIC#0+(byte)(number) $10*(number) 2+(byte) 1) ← (const byte) RED#0 diff --git a/src/test/ref/constantmin.log b/src/test/ref/constantmin.log index 13d8d123e..408c73057 100644 --- a/src/test/ref/constantmin.log +++ b/src/test/ref/constantmin.log @@ -12,6 +12,8 @@ CONTROL FLOW GRAPH SSA (byte*) BGCOL#0 ← (byte*~) $1 (byte) RED#0 ← (number) 2 to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) BGCOL#1 ← phi( @1/(byte*) BGCOL#2 ) *((byte*) SCREEN#0) ← (byte) STAR#0 @@ -155,6 +157,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (const byte) STAR#0 [5] *((const byte*) VIC#0+(byte)(number) $10*(number) 2+(byte) 1) ← (const byte) RED#0 diff --git a/src/test/ref/constants.cfg b/src/test/ref/constants.cfg index 5ac33295a..2c34620c0 100644 --- a/src/test/ref/constants.cfg +++ b/src/test/ref/constants.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -22,6 +24,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [10] return to:@return + +(void()) test_sbytes() test_sbytes: scope:[test_sbytes] from main::@2 [11] phi() [12] call assert_sbyte @@ -45,6 +49,8 @@ test_sbytes::@4: scope:[test_sbytes] from test_sbytes::@3 test_sbytes::@return: scope:[test_sbytes] from test_sbytes::@4 [21] return to:@return + +(void()) assert_sbyte((byte*) assert_sbyte::msg , (signed byte) assert_sbyte::b , (signed byte) assert_sbyte::c) assert_sbyte: scope:[assert_sbyte] from test_sbytes test_sbytes::@1 test_sbytes::@2 test_sbytes::@3 test_sbytes::@4 [22] (signed byte) assert_sbyte::c#5 ← phi( test_sbytes/(signed byte) 0 test_sbytes::@1/(signed byte) 2 test_sbytes::@2/(signed byte) -2 test_sbytes::@3/(signed byte) 2 test_sbytes::@4/(signed byte) 2 ) [22] (signed byte) assert_sbyte::b#5 ← phi( test_sbytes/(const signed byte) test_sbytes::bb#0 test_sbytes::@1/(const signed byte) test_sbytes::bc#0 test_sbytes::@2/(const signed byte) test_sbytes::bd#0 test_sbytes::@3/(const signed byte) test_sbytes::be#0 test_sbytes::@4/(const signed byte) test_sbytes::bf#0 ) @@ -75,6 +81,8 @@ assert_sbyte::@1: scope:[assert_sbyte] from assert_sbyte::@5 [34] *((const byte*) BGCOL#0) ← (const byte) RED#0 [35] call print_str to:assert_sbyte::@2 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from assert_byte assert_byte::@1 assert_byte::@3 assert_byte::@4 assert_sbyte assert_sbyte::@1 assert_sbyte::@3 assert_sbyte::@4 [36] (byte*) print_char_cursor#80 ← phi( assert_byte/(byte*) print_char_cursor#70 assert_byte::@1/(byte*) print_char_cursor#2 assert_byte::@3/(byte*) print_char_cursor#2 assert_byte::@4/(byte*) print_char_cursor#2 assert_sbyte/(byte*~) print_char_cursor#86 assert_sbyte::@1/(byte*) print_char_cursor#2 assert_sbyte::@3/(byte*) print_char_cursor#2 assert_sbyte::@4/(byte*) print_char_cursor#2 ) [36] (byte*) print_str::str#11 ← phi( assert_byte/(byte*) print_str::str#1 assert_byte::@1/(const string) str1 assert_byte::@3/(const string) str2 assert_byte::@4/(const string) str assert_sbyte/(byte*) print_str::str#5 assert_sbyte::@1/(const string) str1 assert_sbyte::@3/(const string) str2 assert_sbyte::@4/(const string) str ) @@ -92,6 +100,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [41] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [42] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#10 to:print_str::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from assert_byte::@2 assert_sbyte::@2 [43] (byte*) print_line_cursor#47 ← phi( assert_byte::@2/(byte*) print_line_cursor#50 assert_sbyte::@2/(byte*) print_line_cursor#1 ) to:print_ln::@1 @@ -103,6 +113,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [47] return to:@return + +(void()) test_bytes() test_bytes: scope:[test_bytes] from main::@1 [48] phi() [49] call assert_byte @@ -118,6 +130,8 @@ test_bytes::@2: scope:[test_bytes] from test_bytes::@1 test_bytes::@return: scope:[test_bytes] from test_bytes::@2 [54] return to:@return + +(void()) assert_byte((byte*) assert_byte::msg , (byte) assert_byte::b , (byte) assert_byte::c) assert_byte: scope:[assert_byte] from test_bytes test_bytes::@1 test_bytes::@2 [55] (byte*) print_line_cursor#50 ← phi( test_bytes/(byte*) 1024 test_bytes::@1/(byte*) print_line_cursor#1 test_bytes::@2/(byte*) print_line_cursor#1 ) [55] (byte) assert_byte::c#3 ← phi( test_bytes/(byte) 0 test_bytes::@1/(byte) 2 test_bytes::@2/(byte) $fe ) @@ -149,6 +163,8 @@ assert_byte::@1: scope:[assert_byte] from assert_byte::@5 [66] *((const byte*) BGCOL#0) ← (const byte) RED#0 [67] call print_str to:assert_byte::@2 + +(void()) print_cls() print_cls: scope:[print_cls] from main [68] phi() [69] call memset @@ -156,6 +172,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [70] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [71] phi() to:memset::@1 diff --git a/src/test/ref/constants.log b/src/test/ref/constants.log index 9f9b47e9f..adeb12b33 100644 --- a/src/test/ref/constants.log +++ b/src/test/ref/constants.log @@ -65,6 +65,8 @@ Culled Empty Block (label) assert_sbyte::@4 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@12 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -112,6 +114,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@36 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from assert_byte assert_byte::@1 assert_byte::@3 assert_byte::@5 assert_sbyte assert_sbyte::@1 assert_sbyte::@3 assert_sbyte::@5 (byte*) print_char_cursor#80 ← phi( assert_byte/(byte*) print_char_cursor#70 assert_byte::@1/(byte*) print_char_cursor#71 assert_byte::@3/(byte*) print_char_cursor#72 assert_byte::@5/(byte*) print_char_cursor#15 assert_sbyte/(byte*) print_char_cursor#75 assert_sbyte::@1/(byte*) print_char_cursor#76 assert_sbyte::@3/(byte*) print_char_cursor#77 assert_sbyte::@5/(byte*) print_char_cursor#27 ) (byte*) print_str::str#11 ← phi( assert_byte/(byte*) print_str::str#1 assert_byte::@1/(byte*) print_str::str#3 assert_byte::@3/(byte*) print_str::str#4 assert_byte::@5/(byte*) print_str::str#2 assert_sbyte/(byte*) print_str::str#5 assert_sbyte::@1/(byte*) print_str::str#7 assert_sbyte::@3/(byte*) print_str::str#8 assert_sbyte::@5/(byte*) print_str::str#6 ) @@ -134,6 +138,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#35 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from assert_byte::@2 assert_sbyte::@2 (byte*) print_char_cursor#67 ← phi( assert_byte::@2/(byte*) print_char_cursor#73 assert_sbyte::@2/(byte*) print_char_cursor#78 ) (byte*) print_line_cursor#47 ← phi( assert_byte::@2/(byte*) print_line_cursor#50 assert_sbyte::@2/(byte*) print_line_cursor#52 ) @@ -157,6 +163,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#37 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main (byte*) print_screen#1 ← phi( main/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -185,6 +193,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte) GREEN#0 ← (number) 5 (byte) RED#0 ← (number) 2 to:@41 + +(void()) main() main: scope:[main] from @41 (byte*) print_char_cursor#68 ← phi( @41/(byte*) print_char_cursor#79 ) (byte*) print_line_cursor#48 ← phi( @41/(byte*) print_line_cursor#53 ) @@ -219,6 +229,8 @@ main::@return: scope:[main] from main::@3 (byte*) print_char_cursor#10 ← (byte*) print_char_cursor#42 return to:@return + +(void()) test_bytes() test_bytes: scope:[test_bytes] from main::@1 (byte*) print_line_cursor#49 ← phi( main::@1/(byte*) print_line_cursor#5 ) (byte*) print_char_cursor#69 ← phi( main::@1/(byte*) print_char_cursor#7 ) @@ -268,6 +280,8 @@ test_bytes::@return: scope:[test_bytes] from test_bytes::@3 (byte*) print_line_cursor#12 ← (byte*) print_line_cursor#35 return to:@return + +(void()) assert_byte((byte*) assert_byte::msg , (byte) assert_byte::b , (byte) assert_byte::c) assert_byte: scope:[assert_byte] from test_bytes test_bytes::@1 test_bytes::@2 (byte*) print_line_cursor#67 ← phi( test_bytes/(byte*) print_line_cursor#49 test_bytes::@1/(byte*) print_line_cursor#9 test_bytes::@2/(byte*) print_line_cursor#10 ) (byte) assert_byte::c#5 ← phi( test_bytes/(byte) assert_byte::c#0 test_bytes::@1/(byte) assert_byte::c#1 test_bytes::@2/(byte) assert_byte::c#2 ) @@ -336,6 +350,8 @@ assert_byte::@return: scope:[assert_byte] from assert_byte::@9 (byte*) print_line_cursor#14 ← (byte*) print_line_cursor#37 return to:@return + +(void()) test_sbytes() test_sbytes: scope:[test_sbytes] from main::@2 (byte*) print_line_cursor#51 ← phi( main::@2/(byte*) print_line_cursor#6 ) (byte*) print_char_cursor#74 ← phi( main::@2/(byte*) print_char_cursor#8 ) @@ -408,6 +424,8 @@ test_sbytes::@return: scope:[test_sbytes] from test_sbytes::@5 (byte*) print_line_cursor#20 ← (byte*) print_line_cursor#43 return to:@return + +(void()) assert_sbyte((byte*) assert_sbyte::msg , (signed byte) assert_sbyte::b , (signed byte) assert_sbyte::c) assert_sbyte: scope:[assert_sbyte] from test_sbytes test_sbytes::@1 test_sbytes::@2 test_sbytes::@3 test_sbytes::@4 (byte*) print_line_cursor#68 ← phi( test_sbytes/(byte*) print_line_cursor#51 test_sbytes::@1/(byte*) print_line_cursor#15 test_sbytes::@2/(byte*) print_line_cursor#16 test_sbytes::@3/(byte*) print_line_cursor#17 test_sbytes::@4/(byte*) print_line_cursor#18 ) (signed byte) assert_sbyte::c#7 ← phi( test_sbytes/(signed byte) assert_sbyte::c#0 test_sbytes::@1/(signed byte) assert_sbyte::c#1 test_sbytes::@2/(signed byte) assert_sbyte::c#2 test_sbytes::@3/(signed byte) assert_sbyte::c#3 test_sbytes::@4/(signed byte) assert_sbyte::c#4 ) @@ -1370,6 +1388,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -1385,6 +1405,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [10] return to:@return + +(void()) test_sbytes() test_sbytes: scope:[test_sbytes] from main::@2 [11] phi() [12] call assert_sbyte @@ -1408,6 +1430,8 @@ test_sbytes::@4: scope:[test_sbytes] from test_sbytes::@3 test_sbytes::@return: scope:[test_sbytes] from test_sbytes::@4 [21] return to:@return + +(void()) assert_sbyte((byte*) assert_sbyte::msg , (signed byte) assert_sbyte::b , (signed byte) assert_sbyte::c) assert_sbyte: scope:[assert_sbyte] from test_sbytes test_sbytes::@1 test_sbytes::@2 test_sbytes::@3 test_sbytes::@4 [22] (signed byte) assert_sbyte::c#5 ← phi( test_sbytes/(signed byte) 0 test_sbytes::@1/(signed byte) 2 test_sbytes::@2/(signed byte) -2 test_sbytes::@3/(signed byte) 2 test_sbytes::@4/(signed byte) 2 ) [22] (signed byte) assert_sbyte::b#5 ← phi( test_sbytes/(const signed byte) test_sbytes::bb#0 test_sbytes::@1/(const signed byte) test_sbytes::bc#0 test_sbytes::@2/(const signed byte) test_sbytes::bd#0 test_sbytes::@3/(const signed byte) test_sbytes::be#0 test_sbytes::@4/(const signed byte) test_sbytes::bf#0 ) @@ -1438,6 +1462,8 @@ assert_sbyte::@1: scope:[assert_sbyte] from assert_sbyte::@5 [34] *((const byte*) BGCOL#0) ← (const byte) RED#0 [35] call print_str to:assert_sbyte::@2 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from assert_byte assert_byte::@1 assert_byte::@3 assert_byte::@4 assert_sbyte assert_sbyte::@1 assert_sbyte::@3 assert_sbyte::@4 [36] (byte*) print_char_cursor#80 ← phi( assert_byte/(byte*) print_char_cursor#70 assert_byte::@1/(byte*) print_char_cursor#2 assert_byte::@3/(byte*) print_char_cursor#2 assert_byte::@4/(byte*) print_char_cursor#2 assert_sbyte/(byte*~) print_char_cursor#86 assert_sbyte::@1/(byte*) print_char_cursor#2 assert_sbyte::@3/(byte*) print_char_cursor#2 assert_sbyte::@4/(byte*) print_char_cursor#2 ) [36] (byte*) print_str::str#11 ← phi( assert_byte/(byte*) print_str::str#1 assert_byte::@1/(const string) str1 assert_byte::@3/(const string) str2 assert_byte::@4/(const string) str assert_sbyte/(byte*) print_str::str#5 assert_sbyte::@1/(const string) str1 assert_sbyte::@3/(const string) str2 assert_sbyte::@4/(const string) str ) @@ -1455,6 +1481,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [41] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [42] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#10 to:print_str::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from assert_byte::@2 assert_sbyte::@2 [43] (byte*) print_line_cursor#47 ← phi( assert_byte::@2/(byte*) print_line_cursor#50 assert_sbyte::@2/(byte*) print_line_cursor#1 ) to:print_ln::@1 @@ -1466,6 +1494,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [47] return to:@return + +(void()) test_bytes() test_bytes: scope:[test_bytes] from main::@1 [48] phi() [49] call assert_byte @@ -1481,6 +1511,8 @@ test_bytes::@2: scope:[test_bytes] from test_bytes::@1 test_bytes::@return: scope:[test_bytes] from test_bytes::@2 [54] return to:@return + +(void()) assert_byte((byte*) assert_byte::msg , (byte) assert_byte::b , (byte) assert_byte::c) assert_byte: scope:[assert_byte] from test_bytes test_bytes::@1 test_bytes::@2 [55] (byte*) print_line_cursor#50 ← phi( test_bytes/(byte*) 1024 test_bytes::@1/(byte*) print_line_cursor#1 test_bytes::@2/(byte*) print_line_cursor#1 ) [55] (byte) assert_byte::c#3 ← phi( test_bytes/(byte) 0 test_bytes::@1/(byte) 2 test_bytes::@2/(byte) $fe ) @@ -1512,6 +1544,8 @@ assert_byte::@1: scope:[assert_byte] from assert_byte::@5 [66] *((const byte*) BGCOL#0) ← (const byte) RED#0 [67] call print_str to:assert_byte::@2 + +(void()) print_cls() print_cls: scope:[print_cls] from main [68] phi() [69] call memset @@ -1519,6 +1553,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [70] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [71] phi() to:memset::@1 diff --git a/src/test/ref/cordic-atan2-16-ref.cfg b/src/test/ref/cordic-atan2-16-ref.cfg index c76681726..6f6c8da8b 100644 --- a/src/test/ref/cordic-atan2-16-ref.cfg +++ b/src/test/ref/cordic-atan2-16-ref.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call init_font_hex @@ -65,6 +67,8 @@ main::@4: scope:[main] from main::@3 main::@5: scope:[main] from main::@4 main::@5 [35] *((const byte*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) ← ++ *((const byte*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) to:main::@5 + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from main::@4 [36] (byte) print_byte::b#0 ← > (word) print_word::w#0 [37] call print_byte @@ -76,6 +80,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [40] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [41] (byte*) print_char_cursor#24 ← phi( print_word/(byte*) 1024 print_word::@1/(byte*) print_char_cursor#19 ) [41] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -91,6 +97,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [48] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 [49] (byte*) print_char_cursor#18 ← phi( print_byte/(byte*) print_char_cursor#24 print_byte::@1/(byte*) print_char_cursor#19 ) [49] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -100,6 +108,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char [52] return to:@return + +(byte()) diff((byte) diff::bb1 , (byte) diff::bb2) diff: scope:[diff] from main::@7 [53] if((byte) diff::bb1#0<(byte) diff::bb2#0) goto diff::@1 to:diff::@2 @@ -115,6 +125,8 @@ diff::@return: scope:[diff] from diff::@3 diff::@1: scope:[diff] from diff [57] (byte~) diff::$4 ← (byte) diff::bb2#0 - (byte) diff::bb1#0 to:diff::@3 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from main::@2 [58] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 to:atan2_16::@2 @@ -212,6 +224,8 @@ atan2_16::@4: scope:[atan2_16] from atan2_16::@3 atan2_16::@1: scope:[atan2_16] from atan2_16 [100] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 + +(void()) init_font_hex((byte*) init_font_hex::charset) init_font_hex: scope:[init_font_hex] from main [101] phi() to:init_font_hex::@1 diff --git a/src/test/ref/cordic-atan2-16-ref.log b/src/test/ref/cordic-atan2-16-ref.log index 07fd82f22..14e112934 100644 --- a/src/test/ref/cordic-atan2-16-ref.log +++ b/src/test/ref/cordic-atan2-16-ref.log @@ -81,6 +81,8 @@ Culled Empty Block (label) diff::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) init_font_hex((byte*) init_font_hex::charset) init_font_hex: scope:[init_font_hex] from main (byte*) init_font_hex::charset#6 ← phi( main/(byte*) init_font_hex::charset#1 ) (byte*) init_font_hex::proto_hi#0 ← (byte[]) FONT_HEX_PROTO#0 @@ -157,6 +159,8 @@ init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 .word 256*2*256*atan(1/pow(2,i))/PI/2 }} to:@3 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from main::@2 (signed word) atan2_16::x#9 ← phi( main::@2/(signed word) atan2_16::x#0 ) (signed word) atan2_16::y#1 ← phi( main::@2/(signed word) atan2_16::y#0 ) @@ -376,6 +380,8 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@36 + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from main::@4 (byte*) print_char_cursor#23 ← phi( main::@4/(byte*) print_char_cursor#25 ) (word) print_word::w#1 ← phi( main::@4/(word) print_word::w#0 ) @@ -404,6 +410,8 @@ print_word::@return: scope:[print_word] from print_word::@2 (byte*) print_char_cursor#31 ← phi( @19/(byte*) print_char_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $0 to:@43 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) print_char_cursor#24 ← phi( print_word/(byte*) print_char_cursor#23 print_word::@1/(byte*) print_char_cursor#1 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -428,6 +436,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#6 ← (byte*) print_char_cursor#17 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 (byte*) print_char_cursor#18 ← phi( print_byte/(byte*) print_char_cursor#24 print_byte::@1/(byte*) print_char_cursor#4 ) (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -448,6 +458,8 @@ print_char::@return: scope:[print_char] from print_char .byte round(256*atan2(y, x)/PI/2) }} to:@45 + +(void()) main() main: scope:[main] from @45 (byte*) print_char_cursor#40 ← phi( @45/(byte*) print_char_cursor#27 ) (byte*) init_font_hex::charset#1 ← (byte*) CHARSET#0 @@ -591,6 +603,8 @@ main::@return: scope:[main] from main::@5 (byte*) print_char_cursor#10 ← (byte*) print_char_cursor#21 return to:@return + +(byte()) diff((byte) diff::bb1 , (byte) diff::bb2) diff: scope:[diff] from main::@13 (byte) diff::bb2#1 ← phi( main::@13/(byte) diff::bb2#0 ) (byte) diff::bb1#1 ← phi( main::@13/(byte) diff::bb1#0 ) @@ -1872,6 +1886,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call init_font_hex @@ -1930,6 +1946,8 @@ main::@4: scope:[main] from main::@3 main::@5: scope:[main] from main::@4 main::@5 [35] *((const byte*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) ← ++ *((const byte*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) to:main::@5 + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from main::@4 [36] (byte) print_byte::b#0 ← > (word) print_word::w#0 [37] call print_byte @@ -1941,6 +1959,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [40] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [41] (byte*) print_char_cursor#24 ← phi( print_word/(byte*) 1024 print_word::@1/(byte*) print_char_cursor#19 ) [41] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -1956,6 +1976,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [48] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 [49] (byte*) print_char_cursor#18 ← phi( print_byte/(byte*) print_char_cursor#24 print_byte::@1/(byte*) print_char_cursor#19 ) [49] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -1965,6 +1987,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char [52] return to:@return + +(byte()) diff((byte) diff::bb1 , (byte) diff::bb2) diff: scope:[diff] from main::@7 [53] if((byte) diff::bb1#0<(byte) diff::bb2#0) goto diff::@1 to:diff::@2 @@ -1980,6 +2004,8 @@ diff::@return: scope:[diff] from diff::@3 diff::@1: scope:[diff] from diff [57] (byte~) diff::$4 ← (byte) diff::bb2#0 - (byte) diff::bb1#0 to:diff::@3 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from main::@2 [58] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 to:atan2_16::@2 @@ -2077,6 +2103,8 @@ atan2_16::@4: scope:[atan2_16] from atan2_16::@3 atan2_16::@1: scope:[atan2_16] from atan2_16 [100] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 + +(void()) init_font_hex((byte*) init_font_hex::charset) init_font_hex: scope:[init_font_hex] from main [101] phi() to:init_font_hex::@1 diff --git a/src/test/ref/cordic-atan2-16.cfg b/src/test/ref/cordic-atan2-16.cfg index 048517ee0..cf186b356 100644 --- a/src/test/ref/cordic-atan2-16.cfg +++ b/src/test/ref/cordic-atan2-16.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call init_font_hex @@ -47,6 +49,8 @@ main::@3: scope:[main] from main::@6 main::@4: scope:[main] from main::@3 main::@4 [25] *((const byte*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) ← ++ *((const byte*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) to:main::@4 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from main::@2 [26] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 to:atan2_16::@2 @@ -144,6 +148,8 @@ atan2_16::@4: scope:[atan2_16] from atan2_16::@3 atan2_16::@1: scope:[atan2_16] from atan2_16 [68] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 + +(void()) init_font_hex((byte*) init_font_hex::charset) init_font_hex: scope:[init_font_hex] from main [69] phi() to:init_font_hex::@1 diff --git a/src/test/ref/cordic-atan2-16.log b/src/test/ref/cordic-atan2-16.log index 92b592c12..f5a433647 100644 --- a/src/test/ref/cordic-atan2-16.log +++ b/src/test/ref/cordic-atan2-16.log @@ -31,6 +31,8 @@ Culled Empty Block (label) main::@10 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) init_font_hex((byte*) init_font_hex::charset) init_font_hex: scope:[init_font_hex] from main (byte*) init_font_hex::charset#6 ← phi( main/(byte*) init_font_hex::charset#1 ) (byte*) init_font_hex::proto_hi#0 ← (byte[]) FONT_HEX_PROTO#0 @@ -107,6 +109,8 @@ init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 .word 256*2*256*atan(1/pow(2,i))/PI/2 }} to:@3 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from main::@2 (signed word) atan2_16::x#9 ← phi( main::@2/(signed word) atan2_16::x#0 ) (signed word) atan2_16::y#1 ← phi( main::@2/(signed word) atan2_16::y#0 ) @@ -325,6 +329,8 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 (byte*) CHARSET#0 ← ((byte*)) (number) $2000 (byte*) SCREEN#0 ← ((byte*)) (number) $2800 to:@8 + +(void()) main() main: scope:[main] from @8 (byte*) init_font_hex::charset#1 ← (byte*) CHARSET#0 call init_font_hex @@ -1439,6 +1445,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call init_font_hex @@ -1479,6 +1487,8 @@ main::@3: scope:[main] from main::@6 main::@4: scope:[main] from main::@3 main::@4 [25] *((const byte*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) ← ++ *((const byte*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) to:main::@4 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from main::@2 [26] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 to:atan2_16::@2 @@ -1576,6 +1586,8 @@ atan2_16::@4: scope:[atan2_16] from atan2_16::@3 atan2_16::@1: scope:[atan2_16] from atan2_16 [68] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 + +(void()) init_font_hex((byte*) init_font_hex::charset) init_font_hex: scope:[init_font_hex] from main [69] phi() to:init_font_hex::@1 diff --git a/src/test/ref/cordic-atan2-clear.cfg b/src/test/ref/cordic-atan2-clear.cfg index 81ed87b9d..4b0a41bed 100644 --- a/src/test/ref/cordic-atan2-clear.cfg +++ b/src/test/ref/cordic-atan2-clear.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call init_font_hex @@ -31,6 +33,8 @@ main::@4: scope:[main] from main::@3 [12] *((byte*) main::clear_char#5) ← (byte) 0 [13] (byte*) main::clear_char#1 ← ++ (byte*) main::clear_char#5 to:main::@1 + +(void()) init_angle_screen((byte*) init_angle_screen::screen) init_angle_screen: scope:[init_angle_screen] from main::@5 [14] phi() to:init_angle_screen::@1 @@ -78,6 +82,8 @@ init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@3 [42] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 [43] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 to:init_angle_screen::@2 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from init_angle_screen::@3 [44] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 to:atan2_16::@2 @@ -175,6 +181,8 @@ atan2_16::@4: scope:[atan2_16] from atan2_16::@3 atan2_16::@1: scope:[atan2_16] from atan2_16 [86] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 + +(void()) init_font_hex((byte*) init_font_hex::charset) init_font_hex: scope:[init_font_hex] from main [87] phi() to:init_font_hex::@1 diff --git a/src/test/ref/cordic-atan2-clear.log b/src/test/ref/cordic-atan2-clear.log index 2c95adcf2..398cd5832 100644 --- a/src/test/ref/cordic-atan2-clear.log +++ b/src/test/ref/cordic-atan2-clear.log @@ -38,6 +38,8 @@ Culled Empty Block (label) init_angle_screen::@8 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) init_font_hex((byte*) init_font_hex::charset) init_font_hex: scope:[init_font_hex] from main (byte*) init_font_hex::charset#6 ← phi( main/(byte*) init_font_hex::charset#1 ) (byte*) init_font_hex::proto_hi#0 ← (byte[]) FONT_HEX_PROTO#0 @@ -114,6 +116,8 @@ init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 .word 256*2*256*atan(1/pow(2,i))/PI/2 }} to:@3 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from init_angle_screen::@3 (signed word) atan2_16::x#9 ← phi( init_angle_screen::@3/(signed word) atan2_16::x#0 ) (signed word) atan2_16::y#1 ← phi( init_angle_screen::@3/(signed word) atan2_16::y#0 ) @@ -332,6 +336,8 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 (byte*) CHARSET#0 ← ((byte*)) (number) $2000 (byte*) SCREEN#0 ← ((byte*)) (number) $2800 to:@9 + +(void()) main() main: scope:[main] from @9 (byte*) init_font_hex::charset#1 ← (byte*) CHARSET#0 call init_font_hex @@ -392,6 +398,8 @@ main::@6: scope:[main] from main::@5 main::@return: scope:[main] from main::@1 return to:@return + +(void()) init_angle_screen((byte*) init_angle_screen::screen) init_angle_screen: scope:[init_angle_screen] from main::@11 (byte*) init_angle_screen::screen#1 ← phi( main::@11/(byte*) init_angle_screen::screen#0 ) (byte*~) init_angle_screen::$0 ← (byte*) init_angle_screen::screen#1 + (number) $28*(number) $c @@ -1594,6 +1602,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call init_font_hex @@ -1618,6 +1628,8 @@ main::@4: scope:[main] from main::@3 [12] *((byte*) main::clear_char#5) ← (byte) 0 [13] (byte*) main::clear_char#1 ← ++ (byte*) main::clear_char#5 to:main::@1 + +(void()) init_angle_screen((byte*) init_angle_screen::screen) init_angle_screen: scope:[init_angle_screen] from main::@5 [14] phi() to:init_angle_screen::@1 @@ -1665,6 +1677,8 @@ init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@3 [42] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 [43] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 to:init_angle_screen::@2 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from init_angle_screen::@3 [44] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 to:atan2_16::@2 @@ -1762,6 +1776,8 @@ atan2_16::@4: scope:[atan2_16] from atan2_16::@3 atan2_16::@1: scope:[atan2_16] from atan2_16 [86] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 + +(void()) init_font_hex((byte*) init_font_hex::charset) init_font_hex: scope:[init_font_hex] from main [87] phi() to:init_font_hex::@1 diff --git a/src/test/ref/cordic-atan2.cfg b/src/test/ref/cordic-atan2.cfg index 055ab3720..80239e6ef 100644 --- a/src/test/ref/cordic-atan2.cfg +++ b/src/test/ref/cordic-atan2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call init_font_hex @@ -43,6 +45,8 @@ main::@3: scope:[main] from main::@6 main::@4: scope:[main] from main::@3 main::@4 [21] *((const byte*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) ← ++ *((const byte*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) to:main::@4 + +(byte()) atan2_8((signed byte) atan2_8::x , (signed byte) atan2_8::y) atan2_8: scope:[atan2_8] from main::@2 [22] if((signed byte) atan2_8::y#0>(signed byte) 0) goto atan2_8::@1 to:atan2_8::@2 @@ -115,6 +119,8 @@ atan2_8::@4: scope:[atan2_8] from atan2_8::@3 atan2_8::@1: scope:[atan2_8] from atan2_8 [52] (signed byte~) atan2_8::yi#11 ← (signed byte) atan2_8::y#0 to:atan2_8::@3 + +(void()) init_font_hex((byte*) init_font_hex::charset) init_font_hex: scope:[init_font_hex] from main [53] phi() to:init_font_hex::@1 diff --git a/src/test/ref/cordic-atan2.log b/src/test/ref/cordic-atan2.log index 9468273b9..058463fa5 100644 --- a/src/test/ref/cordic-atan2.log +++ b/src/test/ref/cordic-atan2.log @@ -28,6 +28,8 @@ Culled Empty Block (label) main::@10 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) init_font_hex((byte*) init_font_hex::charset) init_font_hex: scope:[init_font_hex] from main (byte*) init_font_hex::charset#6 ← phi( main/(byte*) init_font_hex::charset#1 ) (byte*) init_font_hex::proto_hi#0 ← (byte[]) FONT_HEX_PROTO#0 @@ -107,6 +109,8 @@ init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 (byte[CORDIC_ITERATIONS_8#0]) CORDIC_ATAN2_ANGLES_8#0 ← kickasm {{ .fill CORDIC_ITERATIONS_8, 2*256*atan(1/pow(2,i))/PI/2 }} to:@7 + +(byte()) atan2_8((signed byte) atan2_8::x , (signed byte) atan2_8::y) atan2_8: scope:[atan2_8] from main::@2 (signed byte) atan2_8::x#9 ← phi( main::@2/(signed byte) atan2_8::x#0 ) (signed byte) atan2_8::y#1 ← phi( main::@2/(signed byte) atan2_8::y#0 ) @@ -258,6 +262,8 @@ atan2_8::@return: scope:[atan2_8] from atan2_8::@8 (byte*) CHARSET#0 ← ((byte*)) (number) $2000 (byte*) SCREEN#0 ← ((byte*)) (number) $2800 to:@8 + +(void()) main() main: scope:[main] from @8 (byte*) init_font_hex::charset#1 ← (byte*) CHARSET#0 call init_font_hex @@ -1193,6 +1199,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call init_font_hex @@ -1229,6 +1237,8 @@ main::@3: scope:[main] from main::@6 main::@4: scope:[main] from main::@3 main::@4 [21] *((const byte*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) ← ++ *((const byte*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) to:main::@4 + +(byte()) atan2_8((signed byte) atan2_8::x , (signed byte) atan2_8::y) atan2_8: scope:[atan2_8] from main::@2 [22] if((signed byte) atan2_8::y#0>(signed byte) 0) goto atan2_8::@1 to:atan2_8::@2 @@ -1301,6 +1311,8 @@ atan2_8::@4: scope:[atan2_8] from atan2_8::@3 atan2_8::@1: scope:[atan2_8] from atan2_8 [52] (signed byte~) atan2_8::yi#11 ← (signed byte) atan2_8::y#0 to:atan2_8::@3 + +(void()) init_font_hex((byte*) init_font_hex::charset) init_font_hex: scope:[init_font_hex] from main [53] phi() to:init_font_hex::@1 diff --git a/src/test/ref/cpu-6502.cfg b/src/test/ref/cpu-6502.cfg index 1e288221b..e0dbc0e03 100644 --- a/src/test/ref/cpu-6502.cfg +++ b/src/test/ref/cpu-6502.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/cpu-6502.log b/src/test/ref/cpu-6502.log index 7c8aef170..4a43f2e24 100644 --- a/src/test/ref/cpu-6502.log +++ b/src/test/ref/cpu-6502.log @@ -6,6 +6,8 @@ Culled Empty Block (label) main::@8 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte) main::c#0 ← (number) 0 @@ -137,6 +139,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/danny-joystick-problem.cfg b/src/test/ref/danny-joystick-problem.cfg index 6cee99621..733533997 100644 --- a/src/test/ref/danny-joystick-problem.cfg +++ b/src/test/ref/danny-joystick-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) CIA2_PORT_B#0) ← *((const byte*) CIA2_PORT_B#0) & (byte) $7f asm { lda#0 } diff --git a/src/test/ref/danny-joystick-problem.log b/src/test/ref/danny-joystick-problem.log index 59e5ed089..c8651e6c1 100644 --- a/src/test/ref/danny-joystick-problem.log +++ b/src/test/ref/danny-joystick-problem.log @@ -10,6 +10,8 @@ CONTROL FLOW GRAPH SSA @4: scope:[] from @begin (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@5 + +(void()) main() main: scope:[main] from @5 *((byte*) CIA2_PORT_B#0) ← *((byte*) CIA2_PORT_B#0) & (number) $7f asm { lda#0 } @@ -82,6 +84,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) CIA2_PORT_B#0) ← *((const byte*) CIA2_PORT_B#0) & (byte) $7f asm { lda#0 } diff --git a/src/test/ref/deep-nesting.cfg b/src/test/ref/deep-nesting.cfg index c97b46869..a1bb764f3 100644 --- a/src/test/ref/deep-nesting.cfg +++ b/src/test/ref/deep-nesting.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call f1 @@ -17,6 +19,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [7] return to:@return + +(byte()) f1((byte) f1::x) f1: scope:[f1] from main [8] phi() [9] call f2 @@ -24,6 +28,8 @@ f1: scope:[f1] from main f1::@return: scope:[f1] from f1 [10] return to:@return + +(byte()) f2((byte) f2::x) f2: scope:[f2] from f1 [11] phi() [12] call f3 @@ -31,6 +37,8 @@ f2: scope:[f2] from f1 f2::@return: scope:[f2] from f2 [13] return to:@return + +(byte()) f3((byte) f3::x) f3: scope:[f3] from f2 [14] phi() [15] call f4 @@ -38,6 +46,8 @@ f3: scope:[f3] from f2 f3::@return: scope:[f3] from f3 [16] return to:@return + +(byte()) f4((byte) f4::x) f4: scope:[f4] from f3 [17] phi() [18] call f5 @@ -45,6 +55,8 @@ f4: scope:[f4] from f3 f4::@return: scope:[f4] from f4 [19] return to:@return + +(byte()) f5((byte) f5::x) f5: scope:[f5] from f4 [20] phi() [21] call f6 @@ -52,6 +64,8 @@ f5: scope:[f5] from f4 f5::@return: scope:[f5] from f5 [22] return to:@return + +(byte()) f6((byte) f6::x) f6: scope:[f6] from f5 [23] phi() [24] call f7 @@ -59,6 +73,8 @@ f6: scope:[f6] from f5 f6::@return: scope:[f6] from f6 [25] return to:@return + +(byte()) f7((byte) f7::x) f7: scope:[f7] from f6 [26] phi() [27] call f8 @@ -66,6 +82,8 @@ f7: scope:[f7] from f6 f7::@return: scope:[f7] from f7 [28] return to:@return + +(byte()) f8((byte) f8::x) f8: scope:[f8] from f7 [29] phi() [30] call f9 @@ -73,6 +91,8 @@ f8: scope:[f8] from f7 f8::@return: scope:[f8] from f8 [31] return to:@return + +(byte()) f9((byte) f9::x) f9: scope:[f9] from f8 [32] phi() [33] call f10 @@ -80,6 +100,8 @@ f9: scope:[f9] from f8 f9::@return: scope:[f9] from f9 [34] return to:@return + +(byte()) f10((byte) f10::x) f10: scope:[f10] from f9 [35] phi() [36] call f11 @@ -87,6 +109,8 @@ f10: scope:[f10] from f9 f10::@return: scope:[f10] from f10 [37] return to:@return + +(byte()) f11((byte) f11::x) f11: scope:[f11] from f10 [38] phi() [39] call f12 @@ -94,6 +118,8 @@ f11: scope:[f11] from f10 f11::@return: scope:[f11] from f11 [40] return to:@return + +(byte()) f12((byte) f12::x) f12: scope:[f12] from f11 [41] phi() [42] call f13 @@ -101,6 +127,8 @@ f12: scope:[f12] from f11 f12::@return: scope:[f12] from f12 [43] return to:@return + +(byte()) f13((byte) f13::x) f13: scope:[f13] from f12 [44] phi() [45] call f14 @@ -108,6 +136,8 @@ f13: scope:[f13] from f12 f13::@return: scope:[f13] from f13 [46] return to:@return + +(byte()) f14((byte) f14::x) f14: scope:[f14] from f13 [47] phi() [48] call f15 @@ -115,6 +145,8 @@ f14: scope:[f14] from f13 f14::@return: scope:[f14] from f14 [49] return to:@return + +(byte()) f15((byte) f15::x) f15: scope:[f15] from f14 [50] phi() [51] call f16 @@ -122,6 +154,8 @@ f15: scope:[f15] from f14 f15::@return: scope:[f15] from f15 [52] return to:@return + +(byte()) f16((byte) f16::x) f16: scope:[f16] from f15 [53] phi() [54] call f17 @@ -129,6 +163,8 @@ f16: scope:[f16] from f15 f16::@return: scope:[f16] from f16 [55] return to:@return + +(byte()) f17((byte) f17::x) f17: scope:[f17] from f16 [56] phi() [57] call f18 @@ -136,6 +172,8 @@ f17: scope:[f17] from f16 f17::@return: scope:[f17] from f17 [58] return to:@return + +(byte()) f18((byte) f18::x) f18: scope:[f18] from f17 [59] phi() [60] call f19 @@ -143,6 +181,8 @@ f18: scope:[f18] from f17 f18::@return: scope:[f18] from f18 [61] return to:@return + +(byte()) f19((byte) f19::x) f19: scope:[f19] from f18 [62] phi() [63] call f20 @@ -150,6 +190,8 @@ f19: scope:[f19] from f18 f19::@return: scope:[f19] from f19 [64] return to:@return + +(byte()) f20((byte) f20::x) f20: scope:[f20] from f19 [65] phi() [66] call f21 @@ -157,6 +199,8 @@ f20: scope:[f20] from f19 f20::@return: scope:[f20] from f20 [67] return to:@return + +(byte()) f21((byte) f21::x) f21: scope:[f21] from f20 [68] phi() [69] call f22 @@ -164,6 +208,8 @@ f21: scope:[f21] from f20 f21::@return: scope:[f21] from f21 [70] return to:@return + +(byte()) f22((byte) f22::x) f22: scope:[f22] from f21 [71] phi() [72] call f23 @@ -171,6 +217,8 @@ f22: scope:[f22] from f21 f22::@return: scope:[f22] from f22 [73] return to:@return + +(byte()) f23((byte) f23::x) f23: scope:[f23] from f22 [74] phi() [75] call f24 @@ -178,6 +226,8 @@ f23: scope:[f23] from f22 f23::@return: scope:[f23] from f23 [76] return to:@return + +(byte()) f24((byte) f24::x) f24: scope:[f24] from f23 [77] phi() [78] call f25 @@ -185,6 +235,8 @@ f24: scope:[f24] from f23 f24::@return: scope:[f24] from f24 [79] return to:@return + +(byte()) f25((byte) f25::x) f25: scope:[f25] from f24 [80] phi() [81] call f26 @@ -192,6 +244,8 @@ f25: scope:[f25] from f24 f25::@return: scope:[f25] from f25 [82] return to:@return + +(byte()) f26((byte) f26::x) f26: scope:[f26] from f25 [83] phi() [84] call f27 @@ -199,6 +253,8 @@ f26: scope:[f26] from f25 f26::@return: scope:[f26] from f26 [85] return to:@return + +(byte()) f27((byte) f27::x) f27: scope:[f27] from f26 [86] phi() [87] call f28 @@ -206,6 +262,8 @@ f27: scope:[f27] from f26 f27::@return: scope:[f27] from f27 [88] return to:@return + +(byte()) f28((byte) f28::x) f28: scope:[f28] from f27 [89] phi() [90] call f29 @@ -213,6 +271,8 @@ f28: scope:[f28] from f27 f28::@return: scope:[f28] from f28 [91] return to:@return + +(byte()) f29((byte) f29::x) f29: scope:[f29] from f28 [92] phi() [93] call f30 @@ -220,6 +280,8 @@ f29: scope:[f29] from f28 f29::@return: scope:[f29] from f29 [94] return to:@return + +(byte()) f30((byte) f30::x) f30: scope:[f30] from f29 [95] phi() [96] call f31 @@ -227,6 +289,8 @@ f30: scope:[f30] from f29 f30::@return: scope:[f30] from f30 [97] return to:@return + +(byte()) f31((byte) f31::x) f31: scope:[f31] from f30 [98] phi() [99] call f32 @@ -234,6 +298,8 @@ f31: scope:[f31] from f30 f31::@return: scope:[f31] from f31 [100] return to:@return + +(byte()) f32((byte) f32::x) f32: scope:[f32] from f31 [101] phi() [102] call f33 @@ -241,6 +307,8 @@ f32: scope:[f32] from f31 f32::@return: scope:[f32] from f32 [103] return to:@return + +(byte()) f33((byte) f33::x) f33: scope:[f33] from f32 [104] phi() [105] call f34 @@ -248,6 +316,8 @@ f33: scope:[f33] from f32 f33::@return: scope:[f33] from f33 [106] return to:@return + +(byte()) f34((byte) f34::x) f34: scope:[f34] from f33 [107] phi() [108] call f35 @@ -255,6 +325,8 @@ f34: scope:[f34] from f33 f34::@return: scope:[f34] from f34 [109] return to:@return + +(byte()) f35((byte) f35::x) f35: scope:[f35] from f34 [110] phi() [111] call f36 @@ -262,6 +334,8 @@ f35: scope:[f35] from f34 f35::@return: scope:[f35] from f35 [112] return to:@return + +(byte()) f36((byte) f36::x) f36: scope:[f36] from f35 [113] phi() [114] call f37 @@ -269,6 +343,8 @@ f36: scope:[f36] from f35 f36::@return: scope:[f36] from f36 [115] return to:@return + +(byte()) f37((byte) f37::x) f37: scope:[f37] from f36 [116] phi() [117] call f38 @@ -276,6 +352,8 @@ f37: scope:[f37] from f36 f37::@return: scope:[f37] from f37 [118] return to:@return + +(byte()) f38((byte) f38::x) f38: scope:[f38] from f37 [119] phi() [120] call f39 @@ -283,6 +361,8 @@ f38: scope:[f38] from f37 f38::@return: scope:[f38] from f38 [121] return to:@return + +(byte()) f39((byte) f39::x) f39: scope:[f39] from f38 [122] phi() [123] call f40 @@ -290,6 +370,8 @@ f39: scope:[f39] from f38 f39::@return: scope:[f39] from f39 [124] return to:@return + +(byte()) f40((byte) f40::x) f40: scope:[f40] from f39 [125] phi() [126] call f41 @@ -297,6 +379,8 @@ f40: scope:[f40] from f39 f40::@return: scope:[f40] from f40 [127] return to:@return + +(byte()) f41((byte) f41::x) f41: scope:[f41] from f40 [128] phi() [129] call f42 @@ -304,6 +388,8 @@ f41: scope:[f41] from f40 f41::@return: scope:[f41] from f41 [130] return to:@return + +(byte()) f42((byte) f42::x) f42: scope:[f42] from f41 [131] phi() [132] call f43 @@ -311,6 +397,8 @@ f42: scope:[f42] from f41 f42::@return: scope:[f42] from f42 [133] return to:@return + +(byte()) f43((byte) f43::x) f43: scope:[f43] from f42 [134] phi() [135] call f44 @@ -318,6 +406,8 @@ f43: scope:[f43] from f42 f43::@return: scope:[f43] from f43 [136] return to:@return + +(byte()) f44((byte) f44::x) f44: scope:[f44] from f43 [137] phi() [138] call f45 @@ -325,6 +415,8 @@ f44: scope:[f44] from f43 f44::@return: scope:[f44] from f44 [139] return to:@return + +(byte()) f45((byte) f45::x) f45: scope:[f45] from f44 [140] phi() [141] call f46 @@ -332,6 +424,8 @@ f45: scope:[f45] from f44 f45::@return: scope:[f45] from f45 [142] return to:@return + +(byte()) f46((byte) f46::x) f46: scope:[f46] from f45 [143] phi() [144] call f47 @@ -339,6 +433,8 @@ f46: scope:[f46] from f45 f46::@return: scope:[f46] from f46 [145] return to:@return + +(byte()) f47((byte) f47::x) f47: scope:[f47] from f46 [146] phi() [147] call f48 @@ -346,6 +442,8 @@ f47: scope:[f47] from f46 f47::@return: scope:[f47] from f47 [148] return to:@return + +(byte()) f48((byte) f48::x) f48: scope:[f48] from f47 [149] phi() [150] call f49 @@ -353,6 +451,8 @@ f48: scope:[f48] from f47 f48::@return: scope:[f48] from f48 [151] return to:@return + +(byte()) f49((byte) f49::x) f49: scope:[f49] from f48 [152] phi() [153] call f50 @@ -360,6 +460,8 @@ f49: scope:[f49] from f48 f49::@return: scope:[f49] from f49 [154] return to:@return + +(byte()) f50((byte) f50::x) f50: scope:[f50] from f49 [155] phi() [156] call f51 @@ -367,6 +469,8 @@ f50: scope:[f50] from f49 f50::@return: scope:[f50] from f50 [157] return to:@return + +(byte()) f51((byte) f51::x) f51: scope:[f51] from f50 [158] phi() [159] call f52 @@ -374,6 +478,8 @@ f51: scope:[f51] from f50 f51::@return: scope:[f51] from f51 [160] return to:@return + +(byte()) f52((byte) f52::x) f52: scope:[f52] from f51 [161] phi() [162] call f53 @@ -381,6 +487,8 @@ f52: scope:[f52] from f51 f52::@return: scope:[f52] from f52 [163] return to:@return + +(byte()) f53((byte) f53::x) f53: scope:[f53] from f52 [164] phi() [165] call f54 @@ -388,6 +496,8 @@ f53: scope:[f53] from f52 f53::@return: scope:[f53] from f53 [166] return to:@return + +(byte()) f54((byte) f54::x) f54: scope:[f54] from f53 [167] phi() [168] call f55 @@ -395,6 +505,8 @@ f54: scope:[f54] from f53 f54::@return: scope:[f54] from f54 [169] return to:@return + +(byte()) f55((byte) f55::x) f55: scope:[f55] from f54 [170] phi() [171] call f56 @@ -402,6 +514,8 @@ f55: scope:[f55] from f54 f55::@return: scope:[f55] from f55 [172] return to:@return + +(byte()) f56((byte) f56::x) f56: scope:[f56] from f55 [173] phi() [174] call f57 @@ -409,6 +523,8 @@ f56: scope:[f56] from f55 f56::@return: scope:[f56] from f56 [175] return to:@return + +(byte()) f57((byte) f57::x) f57: scope:[f57] from f56 [176] phi() [177] call f58 @@ -416,6 +532,8 @@ f57: scope:[f57] from f56 f57::@return: scope:[f57] from f57 [178] return to:@return + +(byte()) f58((byte) f58::x) f58: scope:[f58] from f57 [179] phi() [180] call f59 @@ -423,6 +541,8 @@ f58: scope:[f58] from f57 f58::@return: scope:[f58] from f58 [181] return to:@return + +(byte()) f59((byte) f59::x) f59: scope:[f59] from f58 [182] phi() [183] call f60 @@ -430,6 +550,8 @@ f59: scope:[f59] from f58 f59::@return: scope:[f59] from f59 [184] return to:@return + +(byte()) f60((byte) f60::x) f60: scope:[f60] from f59 [185] phi() [186] call f61 @@ -437,6 +559,8 @@ f60: scope:[f60] from f59 f60::@return: scope:[f60] from f60 [187] return to:@return + +(byte()) f61((byte) f61::x) f61: scope:[f61] from f60 [188] phi() [189] call f62 @@ -444,6 +568,8 @@ f61: scope:[f61] from f60 f61::@return: scope:[f61] from f61 [190] return to:@return + +(byte()) f62((byte) f62::x) f62: scope:[f62] from f61 [191] phi() [192] call f63 @@ -451,6 +577,8 @@ f62: scope:[f62] from f61 f62::@return: scope:[f62] from f62 [193] return to:@return + +(byte()) f63((byte) f63::x) f63: scope:[f63] from f62 [194] phi() [195] call f64 @@ -458,6 +586,8 @@ f63: scope:[f63] from f62 f63::@return: scope:[f63] from f63 [196] return to:@return + +(byte()) f64((byte) f64::x) f64: scope:[f64] from f63 [197] phi() [198] call f65 @@ -465,6 +595,8 @@ f64: scope:[f64] from f63 f64::@return: scope:[f64] from f64 [199] return to:@return + +(byte()) f65((byte) f65::x) f65: scope:[f65] from f64 [200] phi() [201] call f66 @@ -472,6 +604,8 @@ f65: scope:[f65] from f64 f65::@return: scope:[f65] from f65 [202] return to:@return + +(byte()) f66((byte) f66::x) f66: scope:[f66] from f65 [203] phi() [204] call f67 @@ -479,6 +613,8 @@ f66: scope:[f66] from f65 f66::@return: scope:[f66] from f66 [205] return to:@return + +(byte()) f67((byte) f67::x) f67: scope:[f67] from f66 [206] phi() [207] call f68 @@ -486,6 +622,8 @@ f67: scope:[f67] from f66 f67::@return: scope:[f67] from f67 [208] return to:@return + +(byte()) f68((byte) f68::x) f68: scope:[f68] from f67 [209] phi() [210] call f69 @@ -493,6 +631,8 @@ f68: scope:[f68] from f67 f68::@return: scope:[f68] from f68 [211] return to:@return + +(byte()) f69((byte) f69::x) f69: scope:[f69] from f68 [212] phi() [213] call f70 @@ -500,6 +640,8 @@ f69: scope:[f69] from f68 f69::@return: scope:[f69] from f69 [214] return to:@return + +(byte()) f70((byte) f70::x) f70: scope:[f70] from f69 [215] phi() [216] call f71 @@ -507,6 +649,8 @@ f70: scope:[f70] from f69 f70::@return: scope:[f70] from f70 [217] return to:@return + +(byte()) f71((byte) f71::x) f71: scope:[f71] from f70 [218] phi() [219] call f72 @@ -514,6 +658,8 @@ f71: scope:[f71] from f70 f71::@return: scope:[f71] from f71 [220] return to:@return + +(byte()) f72((byte) f72::x) f72: scope:[f72] from f71 [221] phi() [222] call f73 @@ -521,6 +667,8 @@ f72: scope:[f72] from f71 f72::@return: scope:[f72] from f72 [223] return to:@return + +(byte()) f73((byte) f73::x) f73: scope:[f73] from f72 [224] phi() [225] call f74 @@ -528,6 +676,8 @@ f73: scope:[f73] from f72 f73::@return: scope:[f73] from f73 [226] return to:@return + +(byte()) f74((byte) f74::x) f74: scope:[f74] from f73 [227] phi() [228] call f75 @@ -535,6 +685,8 @@ f74: scope:[f74] from f73 f74::@return: scope:[f74] from f74 [229] return to:@return + +(byte()) f75((byte) f75::x) f75: scope:[f75] from f74 [230] phi() [231] call f76 @@ -542,6 +694,8 @@ f75: scope:[f75] from f74 f75::@return: scope:[f75] from f75 [232] return to:@return + +(byte()) f76((byte) f76::x) f76: scope:[f76] from f75 [233] phi() [234] call f77 @@ -549,6 +703,8 @@ f76: scope:[f76] from f75 f76::@return: scope:[f76] from f76 [235] return to:@return + +(byte()) f77((byte) f77::x) f77: scope:[f77] from f76 [236] phi() [237] call f78 @@ -556,6 +712,8 @@ f77: scope:[f77] from f76 f77::@return: scope:[f77] from f77 [238] return to:@return + +(byte()) f78((byte) f78::x) f78: scope:[f78] from f77 [239] phi() [240] call f79 @@ -563,6 +721,8 @@ f78: scope:[f78] from f77 f78::@return: scope:[f78] from f78 [241] return to:@return + +(byte()) f79((byte) f79::x) f79: scope:[f79] from f78 [242] phi() [243] call f80 @@ -570,6 +730,8 @@ f79: scope:[f79] from f78 f79::@return: scope:[f79] from f79 [244] return to:@return + +(byte()) f80((byte) f80::x) f80: scope:[f80] from f79 [245] phi() [246] call f81 @@ -577,6 +739,8 @@ f80: scope:[f80] from f79 f80::@return: scope:[f80] from f80 [247] return to:@return + +(byte()) f81((byte) f81::x) f81: scope:[f81] from f80 [248] phi() [249] call f82 @@ -584,6 +748,8 @@ f81: scope:[f81] from f80 f81::@return: scope:[f81] from f81 [250] return to:@return + +(byte()) f82((byte) f82::x) f82: scope:[f82] from f81 [251] phi() [252] call f83 @@ -591,6 +757,8 @@ f82: scope:[f82] from f81 f82::@return: scope:[f82] from f82 [253] return to:@return + +(byte()) f83((byte) f83::x) f83: scope:[f83] from f82 [254] phi() [255] call f84 @@ -598,6 +766,8 @@ f83: scope:[f83] from f82 f83::@return: scope:[f83] from f83 [256] return to:@return + +(byte()) f84((byte) f84::x) f84: scope:[f84] from f83 [257] phi() [258] call f85 @@ -605,6 +775,8 @@ f84: scope:[f84] from f83 f84::@return: scope:[f84] from f84 [259] return to:@return + +(byte()) f85((byte) f85::x) f85: scope:[f85] from f84 [260] phi() [261] call f86 @@ -612,6 +784,8 @@ f85: scope:[f85] from f84 f85::@return: scope:[f85] from f85 [262] return to:@return + +(byte()) f86((byte) f86::x) f86: scope:[f86] from f85 [263] phi() [264] call f87 @@ -619,6 +793,8 @@ f86: scope:[f86] from f85 f86::@return: scope:[f86] from f86 [265] return to:@return + +(byte()) f87((byte) f87::x) f87: scope:[f87] from f86 [266] phi() [267] call f88 @@ -626,6 +802,8 @@ f87: scope:[f87] from f86 f87::@return: scope:[f87] from f87 [268] return to:@return + +(byte()) f88((byte) f88::x) f88: scope:[f88] from f87 [269] phi() [270] call f89 @@ -633,6 +811,8 @@ f88: scope:[f88] from f87 f88::@return: scope:[f88] from f88 [271] return to:@return + +(byte()) f89((byte) f89::x) f89: scope:[f89] from f88 [272] phi() [273] call f90 @@ -640,6 +820,8 @@ f89: scope:[f89] from f88 f89::@return: scope:[f89] from f89 [274] return to:@return + +(byte()) f90((byte) f90::x) f90: scope:[f90] from f89 [275] phi() [276] call f91 @@ -647,6 +829,8 @@ f90: scope:[f90] from f89 f90::@return: scope:[f90] from f90 [277] return to:@return + +(byte()) f91((byte) f91::x) f91: scope:[f91] from f90 [278] phi() [279] call f92 @@ -654,6 +838,8 @@ f91: scope:[f91] from f90 f91::@return: scope:[f91] from f91 [280] return to:@return + +(byte()) f92((byte) f92::x) f92: scope:[f92] from f91 [281] phi() [282] call f93 @@ -661,6 +847,8 @@ f92: scope:[f92] from f91 f92::@return: scope:[f92] from f92 [283] return to:@return + +(byte()) f93((byte) f93::x) f93: scope:[f93] from f92 [284] phi() [285] call f94 @@ -668,6 +856,8 @@ f93: scope:[f93] from f92 f93::@return: scope:[f93] from f93 [286] return to:@return + +(byte()) f94((byte) f94::x) f94: scope:[f94] from f93 [287] phi() [288] call f95 @@ -675,6 +865,8 @@ f94: scope:[f94] from f93 f94::@return: scope:[f94] from f94 [289] return to:@return + +(byte()) f95((byte) f95::x) f95: scope:[f95] from f94 [290] phi() [291] call f96 @@ -682,6 +874,8 @@ f95: scope:[f95] from f94 f95::@return: scope:[f95] from f95 [292] return to:@return + +(byte()) f96((byte) f96::x) f96: scope:[f96] from f95 [293] phi() [294] call f97 @@ -689,6 +883,8 @@ f96: scope:[f96] from f95 f96::@return: scope:[f96] from f96 [295] return to:@return + +(byte()) f97((byte) f97::x) f97: scope:[f97] from f96 [296] phi() [297] call f98 @@ -696,6 +892,8 @@ f97: scope:[f97] from f96 f97::@return: scope:[f97] from f97 [298] return to:@return + +(byte()) f98((byte) f98::x) f98: scope:[f98] from f97 [299] phi() [300] call f99 @@ -703,6 +901,8 @@ f98: scope:[f98] from f97 f98::@return: scope:[f98] from f98 [301] return to:@return + +(byte()) f99((byte) f99::x) f99: scope:[f99] from f98 [302] phi() [303] call f100 @@ -710,6 +910,8 @@ f99: scope:[f99] from f98 f99::@return: scope:[f99] from f99 [304] return to:@return + +(byte()) f100((byte) f100::x) f100: scope:[f100] from f99 [305] phi() to:f100::@return diff --git a/src/test/ref/deep-nesting.log b/src/test/ref/deep-nesting.log index cedf65644..f2d2f1cb2 100644 --- a/src/test/ref/deep-nesting.log +++ b/src/test/ref/deep-nesting.log @@ -203,6 +203,8 @@ Culled Empty Block (label) f100::@1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@101 + +(void()) main() main: scope:[main] from @101 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte) f1::x#0 ← (number) 0 @@ -217,6 +219,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 return to:@return + +(byte()) f1((byte) f1::x) f1: scope:[f1] from main (byte) f1::x#1 ← phi( main/(byte) f1::x#0 ) (byte) f2::x#0 ← (byte) f1::x#1 @@ -234,6 +238,8 @@ f1::@return: scope:[f1] from f1::@2 (byte) f1::return#2 ← (byte) f1::return#4 return to:@return + +(byte()) f2((byte) f2::x) f2: scope:[f2] from f1 (byte) f2::x#1 ← phi( f1/(byte) f2::x#0 ) (byte) f3::x#0 ← (byte) f2::x#1 @@ -251,6 +257,8 @@ f2::@return: scope:[f2] from f2::@2 (byte) f2::return#2 ← (byte) f2::return#4 return to:@return + +(byte()) f3((byte) f3::x) f3: scope:[f3] from f2 (byte) f3::x#1 ← phi( f2/(byte) f3::x#0 ) (byte) f4::x#0 ← (byte) f3::x#1 @@ -268,6 +276,8 @@ f3::@return: scope:[f3] from f3::@2 (byte) f3::return#2 ← (byte) f3::return#4 return to:@return + +(byte()) f4((byte) f4::x) f4: scope:[f4] from f3 (byte) f4::x#1 ← phi( f3/(byte) f4::x#0 ) (byte) f5::x#0 ← (byte) f4::x#1 @@ -285,6 +295,8 @@ f4::@return: scope:[f4] from f4::@2 (byte) f4::return#2 ← (byte) f4::return#4 return to:@return + +(byte()) f5((byte) f5::x) f5: scope:[f5] from f4 (byte) f5::x#1 ← phi( f4/(byte) f5::x#0 ) (byte) f6::x#0 ← (byte) f5::x#1 @@ -302,6 +314,8 @@ f5::@return: scope:[f5] from f5::@2 (byte) f5::return#2 ← (byte) f5::return#4 return to:@return + +(byte()) f6((byte) f6::x) f6: scope:[f6] from f5 (byte) f6::x#1 ← phi( f5/(byte) f6::x#0 ) (byte) f7::x#0 ← (byte) f6::x#1 @@ -319,6 +333,8 @@ f6::@return: scope:[f6] from f6::@2 (byte) f6::return#2 ← (byte) f6::return#4 return to:@return + +(byte()) f7((byte) f7::x) f7: scope:[f7] from f6 (byte) f7::x#1 ← phi( f6/(byte) f7::x#0 ) (byte) f8::x#0 ← (byte) f7::x#1 @@ -336,6 +352,8 @@ f7::@return: scope:[f7] from f7::@2 (byte) f7::return#2 ← (byte) f7::return#4 return to:@return + +(byte()) f8((byte) f8::x) f8: scope:[f8] from f7 (byte) f8::x#1 ← phi( f7/(byte) f8::x#0 ) (byte) f9::x#0 ← (byte) f8::x#1 @@ -353,6 +371,8 @@ f8::@return: scope:[f8] from f8::@2 (byte) f8::return#2 ← (byte) f8::return#4 return to:@return + +(byte()) f9((byte) f9::x) f9: scope:[f9] from f8 (byte) f9::x#1 ← phi( f8/(byte) f9::x#0 ) (byte) f10::x#0 ← (byte) f9::x#1 @@ -370,6 +390,8 @@ f9::@return: scope:[f9] from f9::@2 (byte) f9::return#2 ← (byte) f9::return#4 return to:@return + +(byte()) f10((byte) f10::x) f10: scope:[f10] from f9 (byte) f10::x#1 ← phi( f9/(byte) f10::x#0 ) (byte) f11::x#0 ← (byte) f10::x#1 @@ -387,6 +409,8 @@ f10::@return: scope:[f10] from f10::@2 (byte) f10::return#2 ← (byte) f10::return#4 return to:@return + +(byte()) f11((byte) f11::x) f11: scope:[f11] from f10 (byte) f11::x#1 ← phi( f10/(byte) f11::x#0 ) (byte) f12::x#0 ← (byte) f11::x#1 @@ -404,6 +428,8 @@ f11::@return: scope:[f11] from f11::@2 (byte) f11::return#2 ← (byte) f11::return#4 return to:@return + +(byte()) f12((byte) f12::x) f12: scope:[f12] from f11 (byte) f12::x#1 ← phi( f11/(byte) f12::x#0 ) (byte) f13::x#0 ← (byte) f12::x#1 @@ -421,6 +447,8 @@ f12::@return: scope:[f12] from f12::@2 (byte) f12::return#2 ← (byte) f12::return#4 return to:@return + +(byte()) f13((byte) f13::x) f13: scope:[f13] from f12 (byte) f13::x#1 ← phi( f12/(byte) f13::x#0 ) (byte) f14::x#0 ← (byte) f13::x#1 @@ -438,6 +466,8 @@ f13::@return: scope:[f13] from f13::@2 (byte) f13::return#2 ← (byte) f13::return#4 return to:@return + +(byte()) f14((byte) f14::x) f14: scope:[f14] from f13 (byte) f14::x#1 ← phi( f13/(byte) f14::x#0 ) (byte) f15::x#0 ← (byte) f14::x#1 @@ -455,6 +485,8 @@ f14::@return: scope:[f14] from f14::@2 (byte) f14::return#2 ← (byte) f14::return#4 return to:@return + +(byte()) f15((byte) f15::x) f15: scope:[f15] from f14 (byte) f15::x#1 ← phi( f14/(byte) f15::x#0 ) (byte) f16::x#0 ← (byte) f15::x#1 @@ -472,6 +504,8 @@ f15::@return: scope:[f15] from f15::@2 (byte) f15::return#2 ← (byte) f15::return#4 return to:@return + +(byte()) f16((byte) f16::x) f16: scope:[f16] from f15 (byte) f16::x#1 ← phi( f15/(byte) f16::x#0 ) (byte) f17::x#0 ← (byte) f16::x#1 @@ -489,6 +523,8 @@ f16::@return: scope:[f16] from f16::@2 (byte) f16::return#2 ← (byte) f16::return#4 return to:@return + +(byte()) f17((byte) f17::x) f17: scope:[f17] from f16 (byte) f17::x#1 ← phi( f16/(byte) f17::x#0 ) (byte) f18::x#0 ← (byte) f17::x#1 @@ -506,6 +542,8 @@ f17::@return: scope:[f17] from f17::@2 (byte) f17::return#2 ← (byte) f17::return#4 return to:@return + +(byte()) f18((byte) f18::x) f18: scope:[f18] from f17 (byte) f18::x#1 ← phi( f17/(byte) f18::x#0 ) (byte) f19::x#0 ← (byte) f18::x#1 @@ -523,6 +561,8 @@ f18::@return: scope:[f18] from f18::@2 (byte) f18::return#2 ← (byte) f18::return#4 return to:@return + +(byte()) f19((byte) f19::x) f19: scope:[f19] from f18 (byte) f19::x#1 ← phi( f18/(byte) f19::x#0 ) (byte) f20::x#0 ← (byte) f19::x#1 @@ -540,6 +580,8 @@ f19::@return: scope:[f19] from f19::@2 (byte) f19::return#2 ← (byte) f19::return#4 return to:@return + +(byte()) f20((byte) f20::x) f20: scope:[f20] from f19 (byte) f20::x#1 ← phi( f19/(byte) f20::x#0 ) (byte) f21::x#0 ← (byte) f20::x#1 @@ -557,6 +599,8 @@ f20::@return: scope:[f20] from f20::@2 (byte) f20::return#2 ← (byte) f20::return#4 return to:@return + +(byte()) f21((byte) f21::x) f21: scope:[f21] from f20 (byte) f21::x#1 ← phi( f20/(byte) f21::x#0 ) (byte) f22::x#0 ← (byte) f21::x#1 @@ -574,6 +618,8 @@ f21::@return: scope:[f21] from f21::@2 (byte) f21::return#2 ← (byte) f21::return#4 return to:@return + +(byte()) f22((byte) f22::x) f22: scope:[f22] from f21 (byte) f22::x#1 ← phi( f21/(byte) f22::x#0 ) (byte) f23::x#0 ← (byte) f22::x#1 @@ -591,6 +637,8 @@ f22::@return: scope:[f22] from f22::@2 (byte) f22::return#2 ← (byte) f22::return#4 return to:@return + +(byte()) f23((byte) f23::x) f23: scope:[f23] from f22 (byte) f23::x#1 ← phi( f22/(byte) f23::x#0 ) (byte) f24::x#0 ← (byte) f23::x#1 @@ -608,6 +656,8 @@ f23::@return: scope:[f23] from f23::@2 (byte) f23::return#2 ← (byte) f23::return#4 return to:@return + +(byte()) f24((byte) f24::x) f24: scope:[f24] from f23 (byte) f24::x#1 ← phi( f23/(byte) f24::x#0 ) (byte) f25::x#0 ← (byte) f24::x#1 @@ -625,6 +675,8 @@ f24::@return: scope:[f24] from f24::@2 (byte) f24::return#2 ← (byte) f24::return#4 return to:@return + +(byte()) f25((byte) f25::x) f25: scope:[f25] from f24 (byte) f25::x#1 ← phi( f24/(byte) f25::x#0 ) (byte) f26::x#0 ← (byte) f25::x#1 @@ -642,6 +694,8 @@ f25::@return: scope:[f25] from f25::@2 (byte) f25::return#2 ← (byte) f25::return#4 return to:@return + +(byte()) f26((byte) f26::x) f26: scope:[f26] from f25 (byte) f26::x#1 ← phi( f25/(byte) f26::x#0 ) (byte) f27::x#0 ← (byte) f26::x#1 @@ -659,6 +713,8 @@ f26::@return: scope:[f26] from f26::@2 (byte) f26::return#2 ← (byte) f26::return#4 return to:@return + +(byte()) f27((byte) f27::x) f27: scope:[f27] from f26 (byte) f27::x#1 ← phi( f26/(byte) f27::x#0 ) (byte) f28::x#0 ← (byte) f27::x#1 @@ -676,6 +732,8 @@ f27::@return: scope:[f27] from f27::@2 (byte) f27::return#2 ← (byte) f27::return#4 return to:@return + +(byte()) f28((byte) f28::x) f28: scope:[f28] from f27 (byte) f28::x#1 ← phi( f27/(byte) f28::x#0 ) (byte) f29::x#0 ← (byte) f28::x#1 @@ -693,6 +751,8 @@ f28::@return: scope:[f28] from f28::@2 (byte) f28::return#2 ← (byte) f28::return#4 return to:@return + +(byte()) f29((byte) f29::x) f29: scope:[f29] from f28 (byte) f29::x#1 ← phi( f28/(byte) f29::x#0 ) (byte) f30::x#0 ← (byte) f29::x#1 @@ -710,6 +770,8 @@ f29::@return: scope:[f29] from f29::@2 (byte) f29::return#2 ← (byte) f29::return#4 return to:@return + +(byte()) f30((byte) f30::x) f30: scope:[f30] from f29 (byte) f30::x#1 ← phi( f29/(byte) f30::x#0 ) (byte) f31::x#0 ← (byte) f30::x#1 @@ -727,6 +789,8 @@ f30::@return: scope:[f30] from f30::@2 (byte) f30::return#2 ← (byte) f30::return#4 return to:@return + +(byte()) f31((byte) f31::x) f31: scope:[f31] from f30 (byte) f31::x#1 ← phi( f30/(byte) f31::x#0 ) (byte) f32::x#0 ← (byte) f31::x#1 @@ -744,6 +808,8 @@ f31::@return: scope:[f31] from f31::@2 (byte) f31::return#2 ← (byte) f31::return#4 return to:@return + +(byte()) f32((byte) f32::x) f32: scope:[f32] from f31 (byte) f32::x#1 ← phi( f31/(byte) f32::x#0 ) (byte) f33::x#0 ← (byte) f32::x#1 @@ -761,6 +827,8 @@ f32::@return: scope:[f32] from f32::@2 (byte) f32::return#2 ← (byte) f32::return#4 return to:@return + +(byte()) f33((byte) f33::x) f33: scope:[f33] from f32 (byte) f33::x#1 ← phi( f32/(byte) f33::x#0 ) (byte) f34::x#0 ← (byte) f33::x#1 @@ -778,6 +846,8 @@ f33::@return: scope:[f33] from f33::@2 (byte) f33::return#2 ← (byte) f33::return#4 return to:@return + +(byte()) f34((byte) f34::x) f34: scope:[f34] from f33 (byte) f34::x#1 ← phi( f33/(byte) f34::x#0 ) (byte) f35::x#0 ← (byte) f34::x#1 @@ -795,6 +865,8 @@ f34::@return: scope:[f34] from f34::@2 (byte) f34::return#2 ← (byte) f34::return#4 return to:@return + +(byte()) f35((byte) f35::x) f35: scope:[f35] from f34 (byte) f35::x#1 ← phi( f34/(byte) f35::x#0 ) (byte) f36::x#0 ← (byte) f35::x#1 @@ -812,6 +884,8 @@ f35::@return: scope:[f35] from f35::@2 (byte) f35::return#2 ← (byte) f35::return#4 return to:@return + +(byte()) f36((byte) f36::x) f36: scope:[f36] from f35 (byte) f36::x#1 ← phi( f35/(byte) f36::x#0 ) (byte) f37::x#0 ← (byte) f36::x#1 @@ -829,6 +903,8 @@ f36::@return: scope:[f36] from f36::@2 (byte) f36::return#2 ← (byte) f36::return#4 return to:@return + +(byte()) f37((byte) f37::x) f37: scope:[f37] from f36 (byte) f37::x#1 ← phi( f36/(byte) f37::x#0 ) (byte) f38::x#0 ← (byte) f37::x#1 @@ -846,6 +922,8 @@ f37::@return: scope:[f37] from f37::@2 (byte) f37::return#2 ← (byte) f37::return#4 return to:@return + +(byte()) f38((byte) f38::x) f38: scope:[f38] from f37 (byte) f38::x#1 ← phi( f37/(byte) f38::x#0 ) (byte) f39::x#0 ← (byte) f38::x#1 @@ -863,6 +941,8 @@ f38::@return: scope:[f38] from f38::@2 (byte) f38::return#2 ← (byte) f38::return#4 return to:@return + +(byte()) f39((byte) f39::x) f39: scope:[f39] from f38 (byte) f39::x#1 ← phi( f38/(byte) f39::x#0 ) (byte) f40::x#0 ← (byte) f39::x#1 @@ -880,6 +960,8 @@ f39::@return: scope:[f39] from f39::@2 (byte) f39::return#2 ← (byte) f39::return#4 return to:@return + +(byte()) f40((byte) f40::x) f40: scope:[f40] from f39 (byte) f40::x#1 ← phi( f39/(byte) f40::x#0 ) (byte) f41::x#0 ← (byte) f40::x#1 @@ -897,6 +979,8 @@ f40::@return: scope:[f40] from f40::@2 (byte) f40::return#2 ← (byte) f40::return#4 return to:@return + +(byte()) f41((byte) f41::x) f41: scope:[f41] from f40 (byte) f41::x#1 ← phi( f40/(byte) f41::x#0 ) (byte) f42::x#0 ← (byte) f41::x#1 @@ -914,6 +998,8 @@ f41::@return: scope:[f41] from f41::@2 (byte) f41::return#2 ← (byte) f41::return#4 return to:@return + +(byte()) f42((byte) f42::x) f42: scope:[f42] from f41 (byte) f42::x#1 ← phi( f41/(byte) f42::x#0 ) (byte) f43::x#0 ← (byte) f42::x#1 @@ -931,6 +1017,8 @@ f42::@return: scope:[f42] from f42::@2 (byte) f42::return#2 ← (byte) f42::return#4 return to:@return + +(byte()) f43((byte) f43::x) f43: scope:[f43] from f42 (byte) f43::x#1 ← phi( f42/(byte) f43::x#0 ) (byte) f44::x#0 ← (byte) f43::x#1 @@ -948,6 +1036,8 @@ f43::@return: scope:[f43] from f43::@2 (byte) f43::return#2 ← (byte) f43::return#4 return to:@return + +(byte()) f44((byte) f44::x) f44: scope:[f44] from f43 (byte) f44::x#1 ← phi( f43/(byte) f44::x#0 ) (byte) f45::x#0 ← (byte) f44::x#1 @@ -965,6 +1055,8 @@ f44::@return: scope:[f44] from f44::@2 (byte) f44::return#2 ← (byte) f44::return#4 return to:@return + +(byte()) f45((byte) f45::x) f45: scope:[f45] from f44 (byte) f45::x#1 ← phi( f44/(byte) f45::x#0 ) (byte) f46::x#0 ← (byte) f45::x#1 @@ -982,6 +1074,8 @@ f45::@return: scope:[f45] from f45::@2 (byte) f45::return#2 ← (byte) f45::return#4 return to:@return + +(byte()) f46((byte) f46::x) f46: scope:[f46] from f45 (byte) f46::x#1 ← phi( f45/(byte) f46::x#0 ) (byte) f47::x#0 ← (byte) f46::x#1 @@ -999,6 +1093,8 @@ f46::@return: scope:[f46] from f46::@2 (byte) f46::return#2 ← (byte) f46::return#4 return to:@return + +(byte()) f47((byte) f47::x) f47: scope:[f47] from f46 (byte) f47::x#1 ← phi( f46/(byte) f47::x#0 ) (byte) f48::x#0 ← (byte) f47::x#1 @@ -1016,6 +1112,8 @@ f47::@return: scope:[f47] from f47::@2 (byte) f47::return#2 ← (byte) f47::return#4 return to:@return + +(byte()) f48((byte) f48::x) f48: scope:[f48] from f47 (byte) f48::x#1 ← phi( f47/(byte) f48::x#0 ) (byte) f49::x#0 ← (byte) f48::x#1 @@ -1033,6 +1131,8 @@ f48::@return: scope:[f48] from f48::@2 (byte) f48::return#2 ← (byte) f48::return#4 return to:@return + +(byte()) f49((byte) f49::x) f49: scope:[f49] from f48 (byte) f49::x#1 ← phi( f48/(byte) f49::x#0 ) (byte) f50::x#0 ← (byte) f49::x#1 @@ -1050,6 +1150,8 @@ f49::@return: scope:[f49] from f49::@2 (byte) f49::return#2 ← (byte) f49::return#4 return to:@return + +(byte()) f50((byte) f50::x) f50: scope:[f50] from f49 (byte) f50::x#1 ← phi( f49/(byte) f50::x#0 ) (byte) f51::x#0 ← (byte) f50::x#1 @@ -1067,6 +1169,8 @@ f50::@return: scope:[f50] from f50::@2 (byte) f50::return#2 ← (byte) f50::return#4 return to:@return + +(byte()) f51((byte) f51::x) f51: scope:[f51] from f50 (byte) f51::x#1 ← phi( f50/(byte) f51::x#0 ) (byte) f52::x#0 ← (byte) f51::x#1 @@ -1084,6 +1188,8 @@ f51::@return: scope:[f51] from f51::@2 (byte) f51::return#2 ← (byte) f51::return#4 return to:@return + +(byte()) f52((byte) f52::x) f52: scope:[f52] from f51 (byte) f52::x#1 ← phi( f51/(byte) f52::x#0 ) (byte) f53::x#0 ← (byte) f52::x#1 @@ -1101,6 +1207,8 @@ f52::@return: scope:[f52] from f52::@2 (byte) f52::return#2 ← (byte) f52::return#4 return to:@return + +(byte()) f53((byte) f53::x) f53: scope:[f53] from f52 (byte) f53::x#1 ← phi( f52/(byte) f53::x#0 ) (byte) f54::x#0 ← (byte) f53::x#1 @@ -1118,6 +1226,8 @@ f53::@return: scope:[f53] from f53::@2 (byte) f53::return#2 ← (byte) f53::return#4 return to:@return + +(byte()) f54((byte) f54::x) f54: scope:[f54] from f53 (byte) f54::x#1 ← phi( f53/(byte) f54::x#0 ) (byte) f55::x#0 ← (byte) f54::x#1 @@ -1135,6 +1245,8 @@ f54::@return: scope:[f54] from f54::@2 (byte) f54::return#2 ← (byte) f54::return#4 return to:@return + +(byte()) f55((byte) f55::x) f55: scope:[f55] from f54 (byte) f55::x#1 ← phi( f54/(byte) f55::x#0 ) (byte) f56::x#0 ← (byte) f55::x#1 @@ -1152,6 +1264,8 @@ f55::@return: scope:[f55] from f55::@2 (byte) f55::return#2 ← (byte) f55::return#4 return to:@return + +(byte()) f56((byte) f56::x) f56: scope:[f56] from f55 (byte) f56::x#1 ← phi( f55/(byte) f56::x#0 ) (byte) f57::x#0 ← (byte) f56::x#1 @@ -1169,6 +1283,8 @@ f56::@return: scope:[f56] from f56::@2 (byte) f56::return#2 ← (byte) f56::return#4 return to:@return + +(byte()) f57((byte) f57::x) f57: scope:[f57] from f56 (byte) f57::x#1 ← phi( f56/(byte) f57::x#0 ) (byte) f58::x#0 ← (byte) f57::x#1 @@ -1186,6 +1302,8 @@ f57::@return: scope:[f57] from f57::@2 (byte) f57::return#2 ← (byte) f57::return#4 return to:@return + +(byte()) f58((byte) f58::x) f58: scope:[f58] from f57 (byte) f58::x#1 ← phi( f57/(byte) f58::x#0 ) (byte) f59::x#0 ← (byte) f58::x#1 @@ -1203,6 +1321,8 @@ f58::@return: scope:[f58] from f58::@2 (byte) f58::return#2 ← (byte) f58::return#4 return to:@return + +(byte()) f59((byte) f59::x) f59: scope:[f59] from f58 (byte) f59::x#1 ← phi( f58/(byte) f59::x#0 ) (byte) f60::x#0 ← (byte) f59::x#1 @@ -1220,6 +1340,8 @@ f59::@return: scope:[f59] from f59::@2 (byte) f59::return#2 ← (byte) f59::return#4 return to:@return + +(byte()) f60((byte) f60::x) f60: scope:[f60] from f59 (byte) f60::x#1 ← phi( f59/(byte) f60::x#0 ) (byte) f61::x#0 ← (byte) f60::x#1 @@ -1237,6 +1359,8 @@ f60::@return: scope:[f60] from f60::@2 (byte) f60::return#2 ← (byte) f60::return#4 return to:@return + +(byte()) f61((byte) f61::x) f61: scope:[f61] from f60 (byte) f61::x#1 ← phi( f60/(byte) f61::x#0 ) (byte) f62::x#0 ← (byte) f61::x#1 @@ -1254,6 +1378,8 @@ f61::@return: scope:[f61] from f61::@2 (byte) f61::return#2 ← (byte) f61::return#4 return to:@return + +(byte()) f62((byte) f62::x) f62: scope:[f62] from f61 (byte) f62::x#1 ← phi( f61/(byte) f62::x#0 ) (byte) f63::x#0 ← (byte) f62::x#1 @@ -1271,6 +1397,8 @@ f62::@return: scope:[f62] from f62::@2 (byte) f62::return#2 ← (byte) f62::return#4 return to:@return + +(byte()) f63((byte) f63::x) f63: scope:[f63] from f62 (byte) f63::x#1 ← phi( f62/(byte) f63::x#0 ) (byte) f64::x#0 ← (byte) f63::x#1 @@ -1288,6 +1416,8 @@ f63::@return: scope:[f63] from f63::@2 (byte) f63::return#2 ← (byte) f63::return#4 return to:@return + +(byte()) f64((byte) f64::x) f64: scope:[f64] from f63 (byte) f64::x#1 ← phi( f63/(byte) f64::x#0 ) (byte) f65::x#0 ← (byte) f64::x#1 @@ -1305,6 +1435,8 @@ f64::@return: scope:[f64] from f64::@2 (byte) f64::return#2 ← (byte) f64::return#4 return to:@return + +(byte()) f65((byte) f65::x) f65: scope:[f65] from f64 (byte) f65::x#1 ← phi( f64/(byte) f65::x#0 ) (byte) f66::x#0 ← (byte) f65::x#1 @@ -1322,6 +1454,8 @@ f65::@return: scope:[f65] from f65::@2 (byte) f65::return#2 ← (byte) f65::return#4 return to:@return + +(byte()) f66((byte) f66::x) f66: scope:[f66] from f65 (byte) f66::x#1 ← phi( f65/(byte) f66::x#0 ) (byte) f67::x#0 ← (byte) f66::x#1 @@ -1339,6 +1473,8 @@ f66::@return: scope:[f66] from f66::@2 (byte) f66::return#2 ← (byte) f66::return#4 return to:@return + +(byte()) f67((byte) f67::x) f67: scope:[f67] from f66 (byte) f67::x#1 ← phi( f66/(byte) f67::x#0 ) (byte) f68::x#0 ← (byte) f67::x#1 @@ -1356,6 +1492,8 @@ f67::@return: scope:[f67] from f67::@2 (byte) f67::return#2 ← (byte) f67::return#4 return to:@return + +(byte()) f68((byte) f68::x) f68: scope:[f68] from f67 (byte) f68::x#1 ← phi( f67/(byte) f68::x#0 ) (byte) f69::x#0 ← (byte) f68::x#1 @@ -1373,6 +1511,8 @@ f68::@return: scope:[f68] from f68::@2 (byte) f68::return#2 ← (byte) f68::return#4 return to:@return + +(byte()) f69((byte) f69::x) f69: scope:[f69] from f68 (byte) f69::x#1 ← phi( f68/(byte) f69::x#0 ) (byte) f70::x#0 ← (byte) f69::x#1 @@ -1390,6 +1530,8 @@ f69::@return: scope:[f69] from f69::@2 (byte) f69::return#2 ← (byte) f69::return#4 return to:@return + +(byte()) f70((byte) f70::x) f70: scope:[f70] from f69 (byte) f70::x#1 ← phi( f69/(byte) f70::x#0 ) (byte) f71::x#0 ← (byte) f70::x#1 @@ -1407,6 +1549,8 @@ f70::@return: scope:[f70] from f70::@2 (byte) f70::return#2 ← (byte) f70::return#4 return to:@return + +(byte()) f71((byte) f71::x) f71: scope:[f71] from f70 (byte) f71::x#1 ← phi( f70/(byte) f71::x#0 ) (byte) f72::x#0 ← (byte) f71::x#1 @@ -1424,6 +1568,8 @@ f71::@return: scope:[f71] from f71::@2 (byte) f71::return#2 ← (byte) f71::return#4 return to:@return + +(byte()) f72((byte) f72::x) f72: scope:[f72] from f71 (byte) f72::x#1 ← phi( f71/(byte) f72::x#0 ) (byte) f73::x#0 ← (byte) f72::x#1 @@ -1441,6 +1587,8 @@ f72::@return: scope:[f72] from f72::@2 (byte) f72::return#2 ← (byte) f72::return#4 return to:@return + +(byte()) f73((byte) f73::x) f73: scope:[f73] from f72 (byte) f73::x#1 ← phi( f72/(byte) f73::x#0 ) (byte) f74::x#0 ← (byte) f73::x#1 @@ -1458,6 +1606,8 @@ f73::@return: scope:[f73] from f73::@2 (byte) f73::return#2 ← (byte) f73::return#4 return to:@return + +(byte()) f74((byte) f74::x) f74: scope:[f74] from f73 (byte) f74::x#1 ← phi( f73/(byte) f74::x#0 ) (byte) f75::x#0 ← (byte) f74::x#1 @@ -1475,6 +1625,8 @@ f74::@return: scope:[f74] from f74::@2 (byte) f74::return#2 ← (byte) f74::return#4 return to:@return + +(byte()) f75((byte) f75::x) f75: scope:[f75] from f74 (byte) f75::x#1 ← phi( f74/(byte) f75::x#0 ) (byte) f76::x#0 ← (byte) f75::x#1 @@ -1492,6 +1644,8 @@ f75::@return: scope:[f75] from f75::@2 (byte) f75::return#2 ← (byte) f75::return#4 return to:@return + +(byte()) f76((byte) f76::x) f76: scope:[f76] from f75 (byte) f76::x#1 ← phi( f75/(byte) f76::x#0 ) (byte) f77::x#0 ← (byte) f76::x#1 @@ -1509,6 +1663,8 @@ f76::@return: scope:[f76] from f76::@2 (byte) f76::return#2 ← (byte) f76::return#4 return to:@return + +(byte()) f77((byte) f77::x) f77: scope:[f77] from f76 (byte) f77::x#1 ← phi( f76/(byte) f77::x#0 ) (byte) f78::x#0 ← (byte) f77::x#1 @@ -1526,6 +1682,8 @@ f77::@return: scope:[f77] from f77::@2 (byte) f77::return#2 ← (byte) f77::return#4 return to:@return + +(byte()) f78((byte) f78::x) f78: scope:[f78] from f77 (byte) f78::x#1 ← phi( f77/(byte) f78::x#0 ) (byte) f79::x#0 ← (byte) f78::x#1 @@ -1543,6 +1701,8 @@ f78::@return: scope:[f78] from f78::@2 (byte) f78::return#2 ← (byte) f78::return#4 return to:@return + +(byte()) f79((byte) f79::x) f79: scope:[f79] from f78 (byte) f79::x#1 ← phi( f78/(byte) f79::x#0 ) (byte) f80::x#0 ← (byte) f79::x#1 @@ -1560,6 +1720,8 @@ f79::@return: scope:[f79] from f79::@2 (byte) f79::return#2 ← (byte) f79::return#4 return to:@return + +(byte()) f80((byte) f80::x) f80: scope:[f80] from f79 (byte) f80::x#1 ← phi( f79/(byte) f80::x#0 ) (byte) f81::x#0 ← (byte) f80::x#1 @@ -1577,6 +1739,8 @@ f80::@return: scope:[f80] from f80::@2 (byte) f80::return#2 ← (byte) f80::return#4 return to:@return + +(byte()) f81((byte) f81::x) f81: scope:[f81] from f80 (byte) f81::x#1 ← phi( f80/(byte) f81::x#0 ) (byte) f82::x#0 ← (byte) f81::x#1 @@ -1594,6 +1758,8 @@ f81::@return: scope:[f81] from f81::@2 (byte) f81::return#2 ← (byte) f81::return#4 return to:@return + +(byte()) f82((byte) f82::x) f82: scope:[f82] from f81 (byte) f82::x#1 ← phi( f81/(byte) f82::x#0 ) (byte) f83::x#0 ← (byte) f82::x#1 @@ -1611,6 +1777,8 @@ f82::@return: scope:[f82] from f82::@2 (byte) f82::return#2 ← (byte) f82::return#4 return to:@return + +(byte()) f83((byte) f83::x) f83: scope:[f83] from f82 (byte) f83::x#1 ← phi( f82/(byte) f83::x#0 ) (byte) f84::x#0 ← (byte) f83::x#1 @@ -1628,6 +1796,8 @@ f83::@return: scope:[f83] from f83::@2 (byte) f83::return#2 ← (byte) f83::return#4 return to:@return + +(byte()) f84((byte) f84::x) f84: scope:[f84] from f83 (byte) f84::x#1 ← phi( f83/(byte) f84::x#0 ) (byte) f85::x#0 ← (byte) f84::x#1 @@ -1645,6 +1815,8 @@ f84::@return: scope:[f84] from f84::@2 (byte) f84::return#2 ← (byte) f84::return#4 return to:@return + +(byte()) f85((byte) f85::x) f85: scope:[f85] from f84 (byte) f85::x#1 ← phi( f84/(byte) f85::x#0 ) (byte) f86::x#0 ← (byte) f85::x#1 @@ -1662,6 +1834,8 @@ f85::@return: scope:[f85] from f85::@2 (byte) f85::return#2 ← (byte) f85::return#4 return to:@return + +(byte()) f86((byte) f86::x) f86: scope:[f86] from f85 (byte) f86::x#1 ← phi( f85/(byte) f86::x#0 ) (byte) f87::x#0 ← (byte) f86::x#1 @@ -1679,6 +1853,8 @@ f86::@return: scope:[f86] from f86::@2 (byte) f86::return#2 ← (byte) f86::return#4 return to:@return + +(byte()) f87((byte) f87::x) f87: scope:[f87] from f86 (byte) f87::x#1 ← phi( f86/(byte) f87::x#0 ) (byte) f88::x#0 ← (byte) f87::x#1 @@ -1696,6 +1872,8 @@ f87::@return: scope:[f87] from f87::@2 (byte) f87::return#2 ← (byte) f87::return#4 return to:@return + +(byte()) f88((byte) f88::x) f88: scope:[f88] from f87 (byte) f88::x#1 ← phi( f87/(byte) f88::x#0 ) (byte) f89::x#0 ← (byte) f88::x#1 @@ -1713,6 +1891,8 @@ f88::@return: scope:[f88] from f88::@2 (byte) f88::return#2 ← (byte) f88::return#4 return to:@return + +(byte()) f89((byte) f89::x) f89: scope:[f89] from f88 (byte) f89::x#1 ← phi( f88/(byte) f89::x#0 ) (byte) f90::x#0 ← (byte) f89::x#1 @@ -1730,6 +1910,8 @@ f89::@return: scope:[f89] from f89::@2 (byte) f89::return#2 ← (byte) f89::return#4 return to:@return + +(byte()) f90((byte) f90::x) f90: scope:[f90] from f89 (byte) f90::x#1 ← phi( f89/(byte) f90::x#0 ) (byte) f91::x#0 ← (byte) f90::x#1 @@ -1747,6 +1929,8 @@ f90::@return: scope:[f90] from f90::@2 (byte) f90::return#2 ← (byte) f90::return#4 return to:@return + +(byte()) f91((byte) f91::x) f91: scope:[f91] from f90 (byte) f91::x#1 ← phi( f90/(byte) f91::x#0 ) (byte) f92::x#0 ← (byte) f91::x#1 @@ -1764,6 +1948,8 @@ f91::@return: scope:[f91] from f91::@2 (byte) f91::return#2 ← (byte) f91::return#4 return to:@return + +(byte()) f92((byte) f92::x) f92: scope:[f92] from f91 (byte) f92::x#1 ← phi( f91/(byte) f92::x#0 ) (byte) f93::x#0 ← (byte) f92::x#1 @@ -1781,6 +1967,8 @@ f92::@return: scope:[f92] from f92::@2 (byte) f92::return#2 ← (byte) f92::return#4 return to:@return + +(byte()) f93((byte) f93::x) f93: scope:[f93] from f92 (byte) f93::x#1 ← phi( f92/(byte) f93::x#0 ) (byte) f94::x#0 ← (byte) f93::x#1 @@ -1798,6 +1986,8 @@ f93::@return: scope:[f93] from f93::@2 (byte) f93::return#2 ← (byte) f93::return#4 return to:@return + +(byte()) f94((byte) f94::x) f94: scope:[f94] from f93 (byte) f94::x#1 ← phi( f93/(byte) f94::x#0 ) (byte) f95::x#0 ← (byte) f94::x#1 @@ -1815,6 +2005,8 @@ f94::@return: scope:[f94] from f94::@2 (byte) f94::return#2 ← (byte) f94::return#4 return to:@return + +(byte()) f95((byte) f95::x) f95: scope:[f95] from f94 (byte) f95::x#1 ← phi( f94/(byte) f95::x#0 ) (byte) f96::x#0 ← (byte) f95::x#1 @@ -1832,6 +2024,8 @@ f95::@return: scope:[f95] from f95::@2 (byte) f95::return#2 ← (byte) f95::return#4 return to:@return + +(byte()) f96((byte) f96::x) f96: scope:[f96] from f95 (byte) f96::x#1 ← phi( f95/(byte) f96::x#0 ) (byte) f97::x#0 ← (byte) f96::x#1 @@ -1849,6 +2043,8 @@ f96::@return: scope:[f96] from f96::@2 (byte) f96::return#2 ← (byte) f96::return#4 return to:@return + +(byte()) f97((byte) f97::x) f97: scope:[f97] from f96 (byte) f97::x#1 ← phi( f96/(byte) f97::x#0 ) (byte) f98::x#0 ← (byte) f97::x#1 @@ -1866,6 +2062,8 @@ f97::@return: scope:[f97] from f97::@2 (byte) f97::return#2 ← (byte) f97::return#4 return to:@return + +(byte()) f98((byte) f98::x) f98: scope:[f98] from f97 (byte) f98::x#1 ← phi( f97/(byte) f98::x#0 ) (byte) f99::x#0 ← (byte) f98::x#1 @@ -1883,6 +2081,8 @@ f98::@return: scope:[f98] from f98::@2 (byte) f98::return#2 ← (byte) f98::return#4 return to:@return + +(byte()) f99((byte) f99::x) f99: scope:[f99] from f98 (byte) f99::x#1 ← phi( f98/(byte) f99::x#0 ) (byte) f100::x#0 ← (byte) f99::x#1 @@ -1900,6 +2100,8 @@ f99::@return: scope:[f99] from f99::@2 (byte) f99::return#2 ← (byte) f99::return#4 return to:@return + +(byte()) f100((byte) f100::x) f100: scope:[f100] from f99 (byte) f100::x#1 ← phi( f99/(byte) f100::x#0 ) (byte) f100::return#1 ← (byte) f100::x#1 @@ -6160,6 +6362,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call f1 @@ -6170,6 +6374,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [7] return to:@return + +(byte()) f1((byte) f1::x) f1: scope:[f1] from main [8] phi() [9] call f2 @@ -6177,6 +6383,8 @@ f1: scope:[f1] from main f1::@return: scope:[f1] from f1 [10] return to:@return + +(byte()) f2((byte) f2::x) f2: scope:[f2] from f1 [11] phi() [12] call f3 @@ -6184,6 +6392,8 @@ f2: scope:[f2] from f1 f2::@return: scope:[f2] from f2 [13] return to:@return + +(byte()) f3((byte) f3::x) f3: scope:[f3] from f2 [14] phi() [15] call f4 @@ -6191,6 +6401,8 @@ f3: scope:[f3] from f2 f3::@return: scope:[f3] from f3 [16] return to:@return + +(byte()) f4((byte) f4::x) f4: scope:[f4] from f3 [17] phi() [18] call f5 @@ -6198,6 +6410,8 @@ f4: scope:[f4] from f3 f4::@return: scope:[f4] from f4 [19] return to:@return + +(byte()) f5((byte) f5::x) f5: scope:[f5] from f4 [20] phi() [21] call f6 @@ -6205,6 +6419,8 @@ f5: scope:[f5] from f4 f5::@return: scope:[f5] from f5 [22] return to:@return + +(byte()) f6((byte) f6::x) f6: scope:[f6] from f5 [23] phi() [24] call f7 @@ -6212,6 +6428,8 @@ f6: scope:[f6] from f5 f6::@return: scope:[f6] from f6 [25] return to:@return + +(byte()) f7((byte) f7::x) f7: scope:[f7] from f6 [26] phi() [27] call f8 @@ -6219,6 +6437,8 @@ f7: scope:[f7] from f6 f7::@return: scope:[f7] from f7 [28] return to:@return + +(byte()) f8((byte) f8::x) f8: scope:[f8] from f7 [29] phi() [30] call f9 @@ -6226,6 +6446,8 @@ f8: scope:[f8] from f7 f8::@return: scope:[f8] from f8 [31] return to:@return + +(byte()) f9((byte) f9::x) f9: scope:[f9] from f8 [32] phi() [33] call f10 @@ -6233,6 +6455,8 @@ f9: scope:[f9] from f8 f9::@return: scope:[f9] from f9 [34] return to:@return + +(byte()) f10((byte) f10::x) f10: scope:[f10] from f9 [35] phi() [36] call f11 @@ -6240,6 +6464,8 @@ f10: scope:[f10] from f9 f10::@return: scope:[f10] from f10 [37] return to:@return + +(byte()) f11((byte) f11::x) f11: scope:[f11] from f10 [38] phi() [39] call f12 @@ -6247,6 +6473,8 @@ f11: scope:[f11] from f10 f11::@return: scope:[f11] from f11 [40] return to:@return + +(byte()) f12((byte) f12::x) f12: scope:[f12] from f11 [41] phi() [42] call f13 @@ -6254,6 +6482,8 @@ f12: scope:[f12] from f11 f12::@return: scope:[f12] from f12 [43] return to:@return + +(byte()) f13((byte) f13::x) f13: scope:[f13] from f12 [44] phi() [45] call f14 @@ -6261,6 +6491,8 @@ f13: scope:[f13] from f12 f13::@return: scope:[f13] from f13 [46] return to:@return + +(byte()) f14((byte) f14::x) f14: scope:[f14] from f13 [47] phi() [48] call f15 @@ -6268,6 +6500,8 @@ f14: scope:[f14] from f13 f14::@return: scope:[f14] from f14 [49] return to:@return + +(byte()) f15((byte) f15::x) f15: scope:[f15] from f14 [50] phi() [51] call f16 @@ -6275,6 +6509,8 @@ f15: scope:[f15] from f14 f15::@return: scope:[f15] from f15 [52] return to:@return + +(byte()) f16((byte) f16::x) f16: scope:[f16] from f15 [53] phi() [54] call f17 @@ -6282,6 +6518,8 @@ f16: scope:[f16] from f15 f16::@return: scope:[f16] from f16 [55] return to:@return + +(byte()) f17((byte) f17::x) f17: scope:[f17] from f16 [56] phi() [57] call f18 @@ -6289,6 +6527,8 @@ f17: scope:[f17] from f16 f17::@return: scope:[f17] from f17 [58] return to:@return + +(byte()) f18((byte) f18::x) f18: scope:[f18] from f17 [59] phi() [60] call f19 @@ -6296,6 +6536,8 @@ f18: scope:[f18] from f17 f18::@return: scope:[f18] from f18 [61] return to:@return + +(byte()) f19((byte) f19::x) f19: scope:[f19] from f18 [62] phi() [63] call f20 @@ -6303,6 +6545,8 @@ f19: scope:[f19] from f18 f19::@return: scope:[f19] from f19 [64] return to:@return + +(byte()) f20((byte) f20::x) f20: scope:[f20] from f19 [65] phi() [66] call f21 @@ -6310,6 +6554,8 @@ f20: scope:[f20] from f19 f20::@return: scope:[f20] from f20 [67] return to:@return + +(byte()) f21((byte) f21::x) f21: scope:[f21] from f20 [68] phi() [69] call f22 @@ -6317,6 +6563,8 @@ f21: scope:[f21] from f20 f21::@return: scope:[f21] from f21 [70] return to:@return + +(byte()) f22((byte) f22::x) f22: scope:[f22] from f21 [71] phi() [72] call f23 @@ -6324,6 +6572,8 @@ f22: scope:[f22] from f21 f22::@return: scope:[f22] from f22 [73] return to:@return + +(byte()) f23((byte) f23::x) f23: scope:[f23] from f22 [74] phi() [75] call f24 @@ -6331,6 +6581,8 @@ f23: scope:[f23] from f22 f23::@return: scope:[f23] from f23 [76] return to:@return + +(byte()) f24((byte) f24::x) f24: scope:[f24] from f23 [77] phi() [78] call f25 @@ -6338,6 +6590,8 @@ f24: scope:[f24] from f23 f24::@return: scope:[f24] from f24 [79] return to:@return + +(byte()) f25((byte) f25::x) f25: scope:[f25] from f24 [80] phi() [81] call f26 @@ -6345,6 +6599,8 @@ f25: scope:[f25] from f24 f25::@return: scope:[f25] from f25 [82] return to:@return + +(byte()) f26((byte) f26::x) f26: scope:[f26] from f25 [83] phi() [84] call f27 @@ -6352,6 +6608,8 @@ f26: scope:[f26] from f25 f26::@return: scope:[f26] from f26 [85] return to:@return + +(byte()) f27((byte) f27::x) f27: scope:[f27] from f26 [86] phi() [87] call f28 @@ -6359,6 +6617,8 @@ f27: scope:[f27] from f26 f27::@return: scope:[f27] from f27 [88] return to:@return + +(byte()) f28((byte) f28::x) f28: scope:[f28] from f27 [89] phi() [90] call f29 @@ -6366,6 +6626,8 @@ f28: scope:[f28] from f27 f28::@return: scope:[f28] from f28 [91] return to:@return + +(byte()) f29((byte) f29::x) f29: scope:[f29] from f28 [92] phi() [93] call f30 @@ -6373,6 +6635,8 @@ f29: scope:[f29] from f28 f29::@return: scope:[f29] from f29 [94] return to:@return + +(byte()) f30((byte) f30::x) f30: scope:[f30] from f29 [95] phi() [96] call f31 @@ -6380,6 +6644,8 @@ f30: scope:[f30] from f29 f30::@return: scope:[f30] from f30 [97] return to:@return + +(byte()) f31((byte) f31::x) f31: scope:[f31] from f30 [98] phi() [99] call f32 @@ -6387,6 +6653,8 @@ f31: scope:[f31] from f30 f31::@return: scope:[f31] from f31 [100] return to:@return + +(byte()) f32((byte) f32::x) f32: scope:[f32] from f31 [101] phi() [102] call f33 @@ -6394,6 +6662,8 @@ f32: scope:[f32] from f31 f32::@return: scope:[f32] from f32 [103] return to:@return + +(byte()) f33((byte) f33::x) f33: scope:[f33] from f32 [104] phi() [105] call f34 @@ -6401,6 +6671,8 @@ f33: scope:[f33] from f32 f33::@return: scope:[f33] from f33 [106] return to:@return + +(byte()) f34((byte) f34::x) f34: scope:[f34] from f33 [107] phi() [108] call f35 @@ -6408,6 +6680,8 @@ f34: scope:[f34] from f33 f34::@return: scope:[f34] from f34 [109] return to:@return + +(byte()) f35((byte) f35::x) f35: scope:[f35] from f34 [110] phi() [111] call f36 @@ -6415,6 +6689,8 @@ f35: scope:[f35] from f34 f35::@return: scope:[f35] from f35 [112] return to:@return + +(byte()) f36((byte) f36::x) f36: scope:[f36] from f35 [113] phi() [114] call f37 @@ -6422,6 +6698,8 @@ f36: scope:[f36] from f35 f36::@return: scope:[f36] from f36 [115] return to:@return + +(byte()) f37((byte) f37::x) f37: scope:[f37] from f36 [116] phi() [117] call f38 @@ -6429,6 +6707,8 @@ f37: scope:[f37] from f36 f37::@return: scope:[f37] from f37 [118] return to:@return + +(byte()) f38((byte) f38::x) f38: scope:[f38] from f37 [119] phi() [120] call f39 @@ -6436,6 +6716,8 @@ f38: scope:[f38] from f37 f38::@return: scope:[f38] from f38 [121] return to:@return + +(byte()) f39((byte) f39::x) f39: scope:[f39] from f38 [122] phi() [123] call f40 @@ -6443,6 +6725,8 @@ f39: scope:[f39] from f38 f39::@return: scope:[f39] from f39 [124] return to:@return + +(byte()) f40((byte) f40::x) f40: scope:[f40] from f39 [125] phi() [126] call f41 @@ -6450,6 +6734,8 @@ f40: scope:[f40] from f39 f40::@return: scope:[f40] from f40 [127] return to:@return + +(byte()) f41((byte) f41::x) f41: scope:[f41] from f40 [128] phi() [129] call f42 @@ -6457,6 +6743,8 @@ f41: scope:[f41] from f40 f41::@return: scope:[f41] from f41 [130] return to:@return + +(byte()) f42((byte) f42::x) f42: scope:[f42] from f41 [131] phi() [132] call f43 @@ -6464,6 +6752,8 @@ f42: scope:[f42] from f41 f42::@return: scope:[f42] from f42 [133] return to:@return + +(byte()) f43((byte) f43::x) f43: scope:[f43] from f42 [134] phi() [135] call f44 @@ -6471,6 +6761,8 @@ f43: scope:[f43] from f42 f43::@return: scope:[f43] from f43 [136] return to:@return + +(byte()) f44((byte) f44::x) f44: scope:[f44] from f43 [137] phi() [138] call f45 @@ -6478,6 +6770,8 @@ f44: scope:[f44] from f43 f44::@return: scope:[f44] from f44 [139] return to:@return + +(byte()) f45((byte) f45::x) f45: scope:[f45] from f44 [140] phi() [141] call f46 @@ -6485,6 +6779,8 @@ f45: scope:[f45] from f44 f45::@return: scope:[f45] from f45 [142] return to:@return + +(byte()) f46((byte) f46::x) f46: scope:[f46] from f45 [143] phi() [144] call f47 @@ -6492,6 +6788,8 @@ f46: scope:[f46] from f45 f46::@return: scope:[f46] from f46 [145] return to:@return + +(byte()) f47((byte) f47::x) f47: scope:[f47] from f46 [146] phi() [147] call f48 @@ -6499,6 +6797,8 @@ f47: scope:[f47] from f46 f47::@return: scope:[f47] from f47 [148] return to:@return + +(byte()) f48((byte) f48::x) f48: scope:[f48] from f47 [149] phi() [150] call f49 @@ -6506,6 +6806,8 @@ f48: scope:[f48] from f47 f48::@return: scope:[f48] from f48 [151] return to:@return + +(byte()) f49((byte) f49::x) f49: scope:[f49] from f48 [152] phi() [153] call f50 @@ -6513,6 +6815,8 @@ f49: scope:[f49] from f48 f49::@return: scope:[f49] from f49 [154] return to:@return + +(byte()) f50((byte) f50::x) f50: scope:[f50] from f49 [155] phi() [156] call f51 @@ -6520,6 +6824,8 @@ f50: scope:[f50] from f49 f50::@return: scope:[f50] from f50 [157] return to:@return + +(byte()) f51((byte) f51::x) f51: scope:[f51] from f50 [158] phi() [159] call f52 @@ -6527,6 +6833,8 @@ f51: scope:[f51] from f50 f51::@return: scope:[f51] from f51 [160] return to:@return + +(byte()) f52((byte) f52::x) f52: scope:[f52] from f51 [161] phi() [162] call f53 @@ -6534,6 +6842,8 @@ f52: scope:[f52] from f51 f52::@return: scope:[f52] from f52 [163] return to:@return + +(byte()) f53((byte) f53::x) f53: scope:[f53] from f52 [164] phi() [165] call f54 @@ -6541,6 +6851,8 @@ f53: scope:[f53] from f52 f53::@return: scope:[f53] from f53 [166] return to:@return + +(byte()) f54((byte) f54::x) f54: scope:[f54] from f53 [167] phi() [168] call f55 @@ -6548,6 +6860,8 @@ f54: scope:[f54] from f53 f54::@return: scope:[f54] from f54 [169] return to:@return + +(byte()) f55((byte) f55::x) f55: scope:[f55] from f54 [170] phi() [171] call f56 @@ -6555,6 +6869,8 @@ f55: scope:[f55] from f54 f55::@return: scope:[f55] from f55 [172] return to:@return + +(byte()) f56((byte) f56::x) f56: scope:[f56] from f55 [173] phi() [174] call f57 @@ -6562,6 +6878,8 @@ f56: scope:[f56] from f55 f56::@return: scope:[f56] from f56 [175] return to:@return + +(byte()) f57((byte) f57::x) f57: scope:[f57] from f56 [176] phi() [177] call f58 @@ -6569,6 +6887,8 @@ f57: scope:[f57] from f56 f57::@return: scope:[f57] from f57 [178] return to:@return + +(byte()) f58((byte) f58::x) f58: scope:[f58] from f57 [179] phi() [180] call f59 @@ -6576,6 +6896,8 @@ f58: scope:[f58] from f57 f58::@return: scope:[f58] from f58 [181] return to:@return + +(byte()) f59((byte) f59::x) f59: scope:[f59] from f58 [182] phi() [183] call f60 @@ -6583,6 +6905,8 @@ f59: scope:[f59] from f58 f59::@return: scope:[f59] from f59 [184] return to:@return + +(byte()) f60((byte) f60::x) f60: scope:[f60] from f59 [185] phi() [186] call f61 @@ -6590,6 +6914,8 @@ f60: scope:[f60] from f59 f60::@return: scope:[f60] from f60 [187] return to:@return + +(byte()) f61((byte) f61::x) f61: scope:[f61] from f60 [188] phi() [189] call f62 @@ -6597,6 +6923,8 @@ f61: scope:[f61] from f60 f61::@return: scope:[f61] from f61 [190] return to:@return + +(byte()) f62((byte) f62::x) f62: scope:[f62] from f61 [191] phi() [192] call f63 @@ -6604,6 +6932,8 @@ f62: scope:[f62] from f61 f62::@return: scope:[f62] from f62 [193] return to:@return + +(byte()) f63((byte) f63::x) f63: scope:[f63] from f62 [194] phi() [195] call f64 @@ -6611,6 +6941,8 @@ f63: scope:[f63] from f62 f63::@return: scope:[f63] from f63 [196] return to:@return + +(byte()) f64((byte) f64::x) f64: scope:[f64] from f63 [197] phi() [198] call f65 @@ -6618,6 +6950,8 @@ f64: scope:[f64] from f63 f64::@return: scope:[f64] from f64 [199] return to:@return + +(byte()) f65((byte) f65::x) f65: scope:[f65] from f64 [200] phi() [201] call f66 @@ -6625,6 +6959,8 @@ f65: scope:[f65] from f64 f65::@return: scope:[f65] from f65 [202] return to:@return + +(byte()) f66((byte) f66::x) f66: scope:[f66] from f65 [203] phi() [204] call f67 @@ -6632,6 +6968,8 @@ f66: scope:[f66] from f65 f66::@return: scope:[f66] from f66 [205] return to:@return + +(byte()) f67((byte) f67::x) f67: scope:[f67] from f66 [206] phi() [207] call f68 @@ -6639,6 +6977,8 @@ f67: scope:[f67] from f66 f67::@return: scope:[f67] from f67 [208] return to:@return + +(byte()) f68((byte) f68::x) f68: scope:[f68] from f67 [209] phi() [210] call f69 @@ -6646,6 +6986,8 @@ f68: scope:[f68] from f67 f68::@return: scope:[f68] from f68 [211] return to:@return + +(byte()) f69((byte) f69::x) f69: scope:[f69] from f68 [212] phi() [213] call f70 @@ -6653,6 +6995,8 @@ f69: scope:[f69] from f68 f69::@return: scope:[f69] from f69 [214] return to:@return + +(byte()) f70((byte) f70::x) f70: scope:[f70] from f69 [215] phi() [216] call f71 @@ -6660,6 +7004,8 @@ f70: scope:[f70] from f69 f70::@return: scope:[f70] from f70 [217] return to:@return + +(byte()) f71((byte) f71::x) f71: scope:[f71] from f70 [218] phi() [219] call f72 @@ -6667,6 +7013,8 @@ f71: scope:[f71] from f70 f71::@return: scope:[f71] from f71 [220] return to:@return + +(byte()) f72((byte) f72::x) f72: scope:[f72] from f71 [221] phi() [222] call f73 @@ -6674,6 +7022,8 @@ f72: scope:[f72] from f71 f72::@return: scope:[f72] from f72 [223] return to:@return + +(byte()) f73((byte) f73::x) f73: scope:[f73] from f72 [224] phi() [225] call f74 @@ -6681,6 +7031,8 @@ f73: scope:[f73] from f72 f73::@return: scope:[f73] from f73 [226] return to:@return + +(byte()) f74((byte) f74::x) f74: scope:[f74] from f73 [227] phi() [228] call f75 @@ -6688,6 +7040,8 @@ f74: scope:[f74] from f73 f74::@return: scope:[f74] from f74 [229] return to:@return + +(byte()) f75((byte) f75::x) f75: scope:[f75] from f74 [230] phi() [231] call f76 @@ -6695,6 +7049,8 @@ f75: scope:[f75] from f74 f75::@return: scope:[f75] from f75 [232] return to:@return + +(byte()) f76((byte) f76::x) f76: scope:[f76] from f75 [233] phi() [234] call f77 @@ -6702,6 +7058,8 @@ f76: scope:[f76] from f75 f76::@return: scope:[f76] from f76 [235] return to:@return + +(byte()) f77((byte) f77::x) f77: scope:[f77] from f76 [236] phi() [237] call f78 @@ -6709,6 +7067,8 @@ f77: scope:[f77] from f76 f77::@return: scope:[f77] from f77 [238] return to:@return + +(byte()) f78((byte) f78::x) f78: scope:[f78] from f77 [239] phi() [240] call f79 @@ -6716,6 +7076,8 @@ f78: scope:[f78] from f77 f78::@return: scope:[f78] from f78 [241] return to:@return + +(byte()) f79((byte) f79::x) f79: scope:[f79] from f78 [242] phi() [243] call f80 @@ -6723,6 +7085,8 @@ f79: scope:[f79] from f78 f79::@return: scope:[f79] from f79 [244] return to:@return + +(byte()) f80((byte) f80::x) f80: scope:[f80] from f79 [245] phi() [246] call f81 @@ -6730,6 +7094,8 @@ f80: scope:[f80] from f79 f80::@return: scope:[f80] from f80 [247] return to:@return + +(byte()) f81((byte) f81::x) f81: scope:[f81] from f80 [248] phi() [249] call f82 @@ -6737,6 +7103,8 @@ f81: scope:[f81] from f80 f81::@return: scope:[f81] from f81 [250] return to:@return + +(byte()) f82((byte) f82::x) f82: scope:[f82] from f81 [251] phi() [252] call f83 @@ -6744,6 +7112,8 @@ f82: scope:[f82] from f81 f82::@return: scope:[f82] from f82 [253] return to:@return + +(byte()) f83((byte) f83::x) f83: scope:[f83] from f82 [254] phi() [255] call f84 @@ -6751,6 +7121,8 @@ f83: scope:[f83] from f82 f83::@return: scope:[f83] from f83 [256] return to:@return + +(byte()) f84((byte) f84::x) f84: scope:[f84] from f83 [257] phi() [258] call f85 @@ -6758,6 +7130,8 @@ f84: scope:[f84] from f83 f84::@return: scope:[f84] from f84 [259] return to:@return + +(byte()) f85((byte) f85::x) f85: scope:[f85] from f84 [260] phi() [261] call f86 @@ -6765,6 +7139,8 @@ f85: scope:[f85] from f84 f85::@return: scope:[f85] from f85 [262] return to:@return + +(byte()) f86((byte) f86::x) f86: scope:[f86] from f85 [263] phi() [264] call f87 @@ -6772,6 +7148,8 @@ f86: scope:[f86] from f85 f86::@return: scope:[f86] from f86 [265] return to:@return + +(byte()) f87((byte) f87::x) f87: scope:[f87] from f86 [266] phi() [267] call f88 @@ -6779,6 +7157,8 @@ f87: scope:[f87] from f86 f87::@return: scope:[f87] from f87 [268] return to:@return + +(byte()) f88((byte) f88::x) f88: scope:[f88] from f87 [269] phi() [270] call f89 @@ -6786,6 +7166,8 @@ f88: scope:[f88] from f87 f88::@return: scope:[f88] from f88 [271] return to:@return + +(byte()) f89((byte) f89::x) f89: scope:[f89] from f88 [272] phi() [273] call f90 @@ -6793,6 +7175,8 @@ f89: scope:[f89] from f88 f89::@return: scope:[f89] from f89 [274] return to:@return + +(byte()) f90((byte) f90::x) f90: scope:[f90] from f89 [275] phi() [276] call f91 @@ -6800,6 +7184,8 @@ f90: scope:[f90] from f89 f90::@return: scope:[f90] from f90 [277] return to:@return + +(byte()) f91((byte) f91::x) f91: scope:[f91] from f90 [278] phi() [279] call f92 @@ -6807,6 +7193,8 @@ f91: scope:[f91] from f90 f91::@return: scope:[f91] from f91 [280] return to:@return + +(byte()) f92((byte) f92::x) f92: scope:[f92] from f91 [281] phi() [282] call f93 @@ -6814,6 +7202,8 @@ f92: scope:[f92] from f91 f92::@return: scope:[f92] from f92 [283] return to:@return + +(byte()) f93((byte) f93::x) f93: scope:[f93] from f92 [284] phi() [285] call f94 @@ -6821,6 +7211,8 @@ f93: scope:[f93] from f92 f93::@return: scope:[f93] from f93 [286] return to:@return + +(byte()) f94((byte) f94::x) f94: scope:[f94] from f93 [287] phi() [288] call f95 @@ -6828,6 +7220,8 @@ f94: scope:[f94] from f93 f94::@return: scope:[f94] from f94 [289] return to:@return + +(byte()) f95((byte) f95::x) f95: scope:[f95] from f94 [290] phi() [291] call f96 @@ -6835,6 +7229,8 @@ f95: scope:[f95] from f94 f95::@return: scope:[f95] from f95 [292] return to:@return + +(byte()) f96((byte) f96::x) f96: scope:[f96] from f95 [293] phi() [294] call f97 @@ -6842,6 +7238,8 @@ f96: scope:[f96] from f95 f96::@return: scope:[f96] from f96 [295] return to:@return + +(byte()) f97((byte) f97::x) f97: scope:[f97] from f96 [296] phi() [297] call f98 @@ -6849,6 +7247,8 @@ f97: scope:[f97] from f96 f97::@return: scope:[f97] from f97 [298] return to:@return + +(byte()) f98((byte) f98::x) f98: scope:[f98] from f97 [299] phi() [300] call f99 @@ -6856,6 +7256,8 @@ f98: scope:[f98] from f97 f98::@return: scope:[f98] from f98 [301] return to:@return + +(byte()) f99((byte) f99::x) f99: scope:[f99] from f98 [302] phi() [303] call f100 @@ -6863,6 +7265,8 @@ f99: scope:[f99] from f98 f99::@return: scope:[f99] from f99 [304] return to:@return + +(byte()) f100((byte) f100::x) f100: scope:[f100] from f99 [305] phi() to:f100::@return diff --git a/src/test/ref/default-font.cfg b/src/test/ref/default-font.cfg index 3d1ba2a0f..7e06d3ada 100644 --- a/src/test/ref/default-font.cfg +++ b/src/test/ref/default-font.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call memset @@ -34,6 +36,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [16] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main [17] phi() to:memset::@1 diff --git a/src/test/ref/default-font.log b/src/test/ref/default-font.log index 8b0503f13..71b5f13c3 100644 --- a/src/test/ref/default-font.log +++ b/src/test/ref/default-font.log @@ -13,6 +13,8 @@ Culled Empty Block (label) main::@4 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@4 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main (byte) memset::c#4 ← phi( main/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( main/(void*) memset::str#0 ) @@ -58,6 +60,8 @@ memset::@return: scope:[memset] from memset::@1 @4: scope:[] from @begin (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@5 + +(void()) main() main: scope:[main] from @5 (void*) memset::str#0 ← (void*)(byte*) SCREEN#0 (byte) memset::c#0 ← (byte) ' ' @@ -360,6 +364,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call memset @@ -387,6 +393,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [16] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main [17] phi() to:memset::@1 diff --git a/src/test/ref/deref-to-derefidx-2.cfg b/src/test/ref/deref-to-derefidx-2.cfg index a419e1090..53f542515 100644 --- a/src/test/ref/deref-to-derefidx-2.cfg +++ b/src/test/ref/deref-to-derefidx-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print((byte*) print::m) print: scope:[print] from main main::@1 [9] (byte) screen_idx#10 ← phi( main/(byte) 0 main::@1/(byte) screen_idx#11 ) [9] (byte*) print::m#2 ← phi( main/(const byte[]) msg1#0 main::@1/(const byte[]) msg2#0 ) diff --git a/src/test/ref/deref-to-derefidx-2.log b/src/test/ref/deref-to-derefidx-2.log index 6dae8ca90..5e05e3b15 100644 --- a/src/test/ref/deref-to-derefidx-2.log +++ b/src/test/ref/deref-to-derefidx-2.log @@ -5,6 +5,8 @@ CONTROL FLOW GRAPH SSA (byte[]) msg1#0 ← { (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd' } (byte[]) msg2#0 ← { (byte) '1', (byte) '2', (byte) '3', (byte) '4' } to:@1 + +(void()) main() main: scope:[main] from @2 (byte) screen_idx#13 ← phi( @2/(byte) screen_idx#14 ) (byte*) print::m#0 ← (byte[]) msg1#0 @@ -29,6 +31,8 @@ main::@return: scope:[main] from main::@2 (word*) SCREEN#0 ← ((word*)) (number) $400 (byte) screen_idx#3 ← (number) 0 to:@2 + +(void()) print((byte*) print::m) print: scope:[print] from main main::@1 (byte) screen_idx#10 ← phi( main/(byte) screen_idx#13 main::@1/(byte) screen_idx#0 ) (byte*) print::m#2 ← phi( main/(byte*) print::m#0 main::@1/(byte*) print::m#1 ) @@ -183,6 +187,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print @@ -194,6 +200,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print((byte*) print::m) print: scope:[print] from main main::@1 [9] (byte) screen_idx#10 ← phi( main/(byte) 0 main::@1/(byte) screen_idx#11 ) [9] (byte*) print::m#2 ← phi( main/(const byte[]) msg1#0 main::@1/(const byte[]) msg2#0 ) diff --git a/src/test/ref/deref-to-derefidx.cfg b/src/test/ref/deref-to-derefidx.cfg index f66b20ff2..4df1867a8 100644 --- a/src/test/ref/deref-to-derefidx.cfg +++ b/src/test/ref/deref-to-derefidx.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print((byte*) print::m) print: scope:[print] from main main::@1 [9] (byte) idx#10 ← phi( main/(byte) 0 main::@1/(byte) idx#11 ) [9] (byte*) print::m#2 ← phi( main/(const byte[]) msg1#0 main::@1/(const byte[]) msg2#0 ) diff --git a/src/test/ref/deref-to-derefidx.log b/src/test/ref/deref-to-derefidx.log index 05a691e82..8aee4a6a0 100644 --- a/src/test/ref/deref-to-derefidx.log +++ b/src/test/ref/deref-to-derefidx.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA (byte[]) msg1#0 ← { (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd' } (byte[]) msg2#0 ← { (byte) '1', (byte) '2', (byte) '3', (byte) '4' } to:@1 + +(void()) main() main: scope:[main] from @2 (byte) idx#13 ← phi( @2/(byte) idx#14 ) (byte*) print::m#0 ← (byte[]) msg1#0 @@ -28,6 +30,8 @@ main::@return: scope:[main] from main::@2 (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte) idx#3 ← (number) 0 to:@2 + +(void()) print((byte*) print::m) print: scope:[print] from main main::@1 (byte) idx#10 ← phi( main/(byte) idx#13 main::@1/(byte) idx#0 ) (byte*) print::m#2 ← phi( main/(byte*) print::m#0 main::@1/(byte*) print::m#1 ) @@ -170,6 +174,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print @@ -181,6 +187,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print((byte*) print::m) print: scope:[print] from main main::@1 [9] (byte) idx#10 ← phi( main/(byte) 0 main::@1/(byte) idx#11 ) [9] (byte*) print::m#2 ← phi( main/(const byte[]) msg1#0 main::@1/(const byte[]) msg2#0 ) diff --git a/src/test/ref/derefidx-word-0.cfg b/src/test/ref/derefidx-word-0.cfg index f311efb25..6881755c4 100644 --- a/src/test/ref/derefidx-word-0.cfg +++ b/src/test/ref/derefidx-word-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/derefidx-word-0.log b/src/test/ref/derefidx-word-0.log index 72e1afc79..bb18380da 100644 --- a/src/test/ref/derefidx-word-0.log +++ b/src/test/ref/derefidx-word-0.log @@ -6,6 +6,8 @@ Culled Empty Block (label) main::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (word) main::i#0 ← (number) 0 @@ -103,6 +105,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/derefidx-word-1.cfg b/src/test/ref/derefidx-word-1.cfg index 4938156bb..c60933388 100644 --- a/src/test/ref/derefidx-word-1.cfg +++ b/src/test/ref/derefidx-word-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::screen#0+(word)(number) $28*(number) $a) ← (byte) 'a' to:main::@return diff --git a/src/test/ref/derefidx-word-1.log b/src/test/ref/derefidx-word-1.log index d4060bb2f..1eed9fef9 100644 --- a/src/test/ref/derefidx-word-1.log +++ b/src/test/ref/derefidx-word-1.log @@ -2,6 +2,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 *((byte*) main::screen#0 + (number) $28*(number) $a) ← (byte) 'a' @@ -66,6 +68,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::screen#0+(word)(number) $28*(number) $a) ← (byte) 'a' to:main::@return diff --git a/src/test/ref/derefidx-word-2.cfg b/src/test/ref/derefidx-word-2.cfg index b614bcd66..a4e77603b 100644 --- a/src/test/ref/derefidx-word-2.cfg +++ b/src/test/ref/derefidx-word-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/derefidx-word-2.log b/src/test/ref/derefidx-word-2.log index bde8bb827..1bf7db42c 100644 --- a/src/test/ref/derefidx-word-2.log +++ b/src/test/ref/derefidx-word-2.log @@ -3,6 +3,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -105,6 +107,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/divide-2s.cfg b/src/test/ref/divide-2s.cfg index f5d95e56f..90f384994 100644 --- a/src/test/ref/divide-2s.cfg +++ b/src/test/ref/divide-2s.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/divide-2s.log b/src/test/ref/divide-2s.log index aac53117c..9515c4e0d 100644 --- a/src/test/ref/divide-2s.log +++ b/src/test/ref/divide-2s.log @@ -3,6 +3,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -190,6 +192,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/double-assignment.cfg b/src/test/ref/double-assignment.cfg index 38dddaac5..ee427077f 100644 --- a/src/test/ref/double-assignment.cfg +++ b/src/test/ref/double-assignment.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::screen#0) ← (const byte) main::a#1 [5] *((const byte*) main::screen#0+(byte) 1) ← (const byte) main::a#1 diff --git a/src/test/ref/double-assignment.log b/src/test/ref/double-assignment.log index 9dfb299d8..b5a7cd87e 100644 --- a/src/test/ref/double-assignment.log +++ b/src/test/ref/double-assignment.log @@ -3,6 +3,8 @@ Identified constant variable (byte*) main::screen CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::a#0 ← (byte) 0 (byte) main::b#0 ← (byte) 0 @@ -92,6 +94,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::screen#0) ← (const byte) main::a#1 [5] *((const byte*) main::screen#0+(byte) 1) ← (const byte) main::a#1 diff --git a/src/test/ref/double-import.cfg b/src/test/ref/double-import.cfg index 375c1c239..3fc86c8d0 100644 --- a/src/test/ref/double-import.cfg +++ b/src/test/ref/double-import.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BGCOL#0) ← (const byte) RED#0 to:main::@return diff --git a/src/test/ref/double-import.log b/src/test/ref/double-import.log index f9b2390b1..a1d4020ff 100644 --- a/src/test/ref/double-import.log +++ b/src/test/ref/double-import.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA (byte*) BGCOL#0 ← ((byte*)) (number) $d021 (byte) RED#0 ← (number) 2 to:@1 + +(void()) main() main: scope:[main] from @1 *((byte*) BGCOL#0) ← (byte) RED#0 to:main::@return @@ -66,6 +68,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BGCOL#0) ← (const byte) RED#0 to:main::@return diff --git a/src/test/ref/double-indexing-arrays.cfg b/src/test/ref/double-indexing-arrays.cfg index d973e6f79..ff8b3cec8 100644 --- a/src/test/ref/double-indexing-arrays.cfg +++ b/src/test/ref/double-indexing-arrays.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/double-indexing-arrays.log b/src/test/ref/double-indexing-arrays.log index d87bc51a8..a10cc44a4 100644 --- a/src/test/ref/double-indexing-arrays.log +++ b/src/test/ref/double-indexing-arrays.log @@ -10,6 +10,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte*) COLS#0 ← ((byte*)) (number) $d800 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::x#0 ← (byte) 0 to:main::@1 @@ -294,6 +296,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/duplicate-loop-problem.cfg b/src/test/ref/duplicate-loop-problem.cfg index 28e1b5ff4..eda80e44c 100644 --- a/src/test/ref/duplicate-loop-problem.cfg +++ b/src/test/ref/duplicate-loop-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/duplicate-loop-problem.log b/src/test/ref/duplicate-loop-problem.log index 2e901954c..d1903f03d 100644 --- a/src/test/ref/duplicate-loop-problem.log +++ b/src/test/ref/duplicate-loop-problem.log @@ -6,6 +6,8 @@ CONTROL FLOW GRAPH SSA (byte*) DC00#0 ← ((byte*)) (number) $dc00 (byte) key#0 ← (byte) 0 to:@1 + +(void()) main() main: scope:[main] from @1 to:main::@2 main::@2: scope:[main] from main main::@2 main::@3 @@ -130,6 +132,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/dword.cfg b/src/test/ref/dword.cfg index a0f79e131..1e538b747 100644 --- a/src/test/ref/dword.cfg +++ b/src/test/ref/dword.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/dword.log b/src/test/ref/dword.log index e3009566d..bc6d1c011 100644 --- a/src/test/ref/dword.log +++ b/src/test/ref/dword.log @@ -4,6 +4,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (dword) main::a#0 ← (number) $ee6b2800 (byte) main::i#0 ← (byte) 0 @@ -114,6 +116,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/emptyblock-error.cfg b/src/test/ref/emptyblock-error.cfg index 7b7aec11b..2c52d4a0c 100644 --- a/src/test/ref/emptyblock-error.cfg +++ b/src/test/ref/emptyblock-error.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -14,6 +16,8 @@ main::@1: scope:[main] from main main::@1 [5] phi() [6] call menu to:main::@1 + +(void()) menu() menu: scope:[menu] from main::@1 [7] phi() to:menu::@1 @@ -24,6 +28,8 @@ menu::@1: scope:[menu] from menu menu::@return: scope:[menu] from menu::@1 [10] return to:@return + +(void()) mode() mode: scope:[mode] from menu::@1 [11] phi() to:mode::@1 diff --git a/src/test/ref/emptyblock-error.log b/src/test/ref/emptyblock-error.log index 9fc5e4b99..c72e3d95b 100644 --- a/src/test/ref/emptyblock-error.log +++ b/src/test/ref/emptyblock-error.log @@ -18,6 +18,8 @@ Culled Empty Block (label) mode::@8 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @3 to:main::@1 main::@1: scope:[main] from main main::@7 @@ -31,6 +33,8 @@ main::@7: scope:[main] from main::@2 main::@return: scope:[main] from main::@1 return to:@return + +(void()) menu() menu: scope:[menu] from main::@2 to:menu::@1 menu::@1: scope:[menu] from menu @@ -47,6 +51,8 @@ menu::@return: scope:[menu] from menu::@1 menu::@8 @2: scope:[] from @begin (byte*) B#0 ← ((byte*)) (number) $1000 to:@3 + +(void()) mode() mode: scope:[mode] from menu::@2 to:mode::@1 mode::@1: scope:[mode] from mode mode::@2 mode::@7 @@ -172,6 +178,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -179,6 +187,8 @@ main::@1: scope:[main] from main main::@1 [5] phi() [6] call menu to:main::@1 + +(void()) menu() menu: scope:[menu] from main::@1 [7] phi() to:menu::@1 @@ -189,6 +199,8 @@ menu::@1: scope:[menu] from menu menu::@return: scope:[menu] from menu::@1 [10] return to:@return + +(void()) mode() mode: scope:[mode] from menu::@1 [11] phi() to:mode::@1 diff --git a/src/test/ref/encoding-literal-char.cfg b/src/test/ref/encoding-literal-char.cfg index fac2a01c3..e10a342fc 100644 --- a/src/test/ref/encoding-literal-char.cfg +++ b/src/test/ref/encoding-literal-char.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) screen#0) ← (const byte) cpm#0 [5] *((const byte*) screen#0+(byte) 1) ← (const byte) ccpu#0 diff --git a/src/test/ref/encoding-literal-char.log b/src/test/ref/encoding-literal-char.log index c4a87841a..a6e30f4d3 100644 --- a/src/test/ref/encoding-literal-char.log +++ b/src/test/ref/encoding-literal-char.log @@ -11,6 +11,8 @@ CONTROL FLOW GRAPH SSA (byte[]) ssu#0 ← (const string) $3 (byte*) screen#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::idx#0 ← (number) 0 *((byte*) screen#0 + (byte) main::idx#0) ← (byte) cpm#0 @@ -212,6 +214,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) screen#0) ← (const byte) cpm#0 [5] *((const byte*) screen#0+(byte) 1) ← (const byte) ccpu#0 diff --git a/src/test/ref/enum-0.cfg b/src/test/ref/enum-0.cfg index 901e125d3..6762f1a81 100644 --- a/src/test/ref/enum-0.cfg +++ b/src/test/ref/enum-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) ON to:main::@return diff --git a/src/test/ref/enum-0.log b/src/test/ref/enum-0.log index 2313e5884..47818e547 100644 --- a/src/test/ref/enum-0.log +++ b/src/test/ref/enum-0.log @@ -3,6 +3,8 @@ Identified constant variable (byte) main::state CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::state#0 ← (const byte) ON (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 @@ -66,6 +68,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) ON to:main::@return diff --git a/src/test/ref/enum-1.cfg b/src/test/ref/enum-1.cfg index 95fa1e6ad..9a3a5787f 100644 --- a/src/test/ref/enum-1.cfg +++ b/src/test/ref/enum-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) BROKEN to:main::@return diff --git a/src/test/ref/enum-1.log b/src/test/ref/enum-1.log index c06a9972c..41683b0b8 100644 --- a/src/test/ref/enum-1.log +++ b/src/test/ref/enum-1.log @@ -3,6 +3,8 @@ Identified constant variable (byte) main::state CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::state#0 ← (const byte) BROKEN (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 @@ -67,6 +69,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) BROKEN to:main::@return diff --git a/src/test/ref/enum-2.cfg b/src/test/ref/enum-2.cfg index ee78f0e4c..52cf67ed1 100644 --- a/src/test/ref/enum-2.cfg +++ b/src/test/ref/enum-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) B to:main::@return diff --git a/src/test/ref/enum-2.log b/src/test/ref/enum-2.log index 2f703580c..b519cc594 100644 --- a/src/test/ref/enum-2.log +++ b/src/test/ref/enum-2.log @@ -3,6 +3,8 @@ Identified constant variable (byte) main::letter CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::letter#0 ← (const byte) B (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 @@ -67,6 +69,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) B to:main::@return diff --git a/src/test/ref/enum-3.cfg b/src/test/ref/enum-3.cfg index 95fa1e6ad..9a3a5787f 100644 --- a/src/test/ref/enum-3.cfg +++ b/src/test/ref/enum-3.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) BROKEN to:main::@return diff --git a/src/test/ref/enum-3.log b/src/test/ref/enum-3.log index 2b3ab880f..72a4d47f4 100644 --- a/src/test/ref/enum-3.log +++ b/src/test/ref/enum-3.log @@ -3,6 +3,8 @@ Identified constant variable (byte) main::state CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::state#0 ← (const byte) BROKEN (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 @@ -69,6 +71,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) BROKEN to:main::@return diff --git a/src/test/ref/enum-4.cfg b/src/test/ref/enum-4.cfg index 0ad160dc6..0f16d3de7 100644 --- a/src/test/ref/enum-4.cfg +++ b/src/test/ref/enum-4.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::ON to:main::@return diff --git a/src/test/ref/enum-4.log b/src/test/ref/enum-4.log index 6766cd4cb..7bbc5446d 100644 --- a/src/test/ref/enum-4.log +++ b/src/test/ref/enum-4.log @@ -3,6 +3,8 @@ Identified constant variable (byte) main::state CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::state#0 ← (const byte) main::ON (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 @@ -64,6 +66,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::ON to:main::@return diff --git a/src/test/ref/enum-5.cfg b/src/test/ref/enum-5.cfg index a599ba244..c0fbde52e 100644 --- a/src/test/ref/enum-5.cfg +++ b/src/test/ref/enum-5.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::ON [5] call test @@ -14,6 +16,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [6] return to:@return + +(void()) test() test: scope:[test] from main [7] *((const byte*) test::SCREEN#0) ← (const byte) test::ON to:test::@return diff --git a/src/test/ref/enum-5.log b/src/test/ref/enum-5.log index e27502f7a..fd6bd3ade 100644 --- a/src/test/ref/enum-5.log +++ b/src/test/ref/enum-5.log @@ -5,6 +5,8 @@ Culled Empty Block (label) @1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @2 (byte) main::state#0 ← (const byte) main::ON (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 @@ -16,6 +18,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 return to:@return + +(void()) test() test: scope:[test] from main (byte) test::state#0 ← (const byte) test::ON (byte*) test::SCREEN#0 ← ((byte*)) (number) $428 @@ -94,6 +98,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::ON [5] call test @@ -101,6 +107,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [6] return to:@return + +(void()) test() test: scope:[test] from main [7] *((const byte*) test::SCREEN#0) ← (const byte) test::ON to:test::@return diff --git a/src/test/ref/enum-6.cfg b/src/test/ref/enum-6.cfg index e2a95e3e0..feb5b6422 100644 --- a/src/test/ref/enum-6.cfg +++ b/src/test/ref/enum-6.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::ON [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::OFF diff --git a/src/test/ref/enum-6.log b/src/test/ref/enum-6.log index c2fba75c6..85c199558 100644 --- a/src/test/ref/enum-6.log +++ b/src/test/ref/enum-6.log @@ -2,6 +2,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::state#0 ← (const byte) main::ON (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 @@ -81,6 +83,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::ON [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::OFF diff --git a/src/test/ref/enum-7.cfg b/src/test/ref/enum-7.cfg index ee2bf5042..2cda4caf4 100644 --- a/src/test/ref/enum-7.cfg +++ b/src/test/ref/enum-7.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) RED [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::button_size#0 diff --git a/src/test/ref/enum-7.log b/src/test/ref/enum-7.log index 0d547df6e..3f4f03e75 100644 --- a/src/test/ref/enum-7.log +++ b/src/test/ref/enum-7.log @@ -11,6 +11,8 @@ Identified constant variable (byte) main::button_size CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::button_color#0 ← (const byte) RED (byte) main::button_size#0 ← (number) $18 @@ -97,6 +99,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) RED [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::button_size#0 diff --git a/src/test/ref/enum-8.cfg b/src/test/ref/enum-8.cfg index ee2bf5042..2cda4caf4 100644 --- a/src/test/ref/enum-8.cfg +++ b/src/test/ref/enum-8.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) RED [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::button_size#0 diff --git a/src/test/ref/enum-8.log b/src/test/ref/enum-8.log index 0e62f8e50..74fb9d426 100644 --- a/src/test/ref/enum-8.log +++ b/src/test/ref/enum-8.log @@ -11,6 +11,8 @@ Identified constant variable (byte) main::button_size CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::button_color#0 ← (const byte) RED (byte) main::button_size#0 ← (number) $18 @@ -99,6 +101,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) RED [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::button_size#0 diff --git a/src/test/ref/euclid-3.cfg b/src/test/ref/euclid-3.cfg index 4b86cb8ca..82aea19e1 100644 --- a/src/test/ref/euclid-3.cfg +++ b/src/test/ref/euclid-3.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -38,6 +40,8 @@ main::@6: scope:[main] from main::@5 main::@return: scope:[main] from main::@6 [18] return to:@return + +(void()) print_euclid((byte) print_euclid::a , (byte) print_euclid::b) print_euclid: scope:[print_euclid] from main::@1 main::@2 main::@3 main::@4 main::@5 main::@6 [19] (byte*) print_line_cursor#33 ← phi( main::@1/(byte*) 1024 main::@2/(byte*) print_line_cursor#1 main::@3/(byte*) print_line_cursor#1 main::@4/(byte*) print_line_cursor#1 main::@5/(byte*) print_line_cursor#1 main::@6/(byte*) print_line_cursor#1 ) [19] (byte) print_euclid::b#10 ← phi( main::@1/(byte) 2 main::@2/(byte) $45 main::@3/(byte) $37 main::@4/(byte) 3 main::@5/(byte) $1a main::@6/(byte) $bb ) @@ -75,6 +79,8 @@ print_euclid::@6: scope:[print_euclid] from print_euclid::@5 print_euclid::@return: scope:[print_euclid] from print_euclid::@6 [36] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from print_euclid::@6 [37] phi() to:print_ln::@1 @@ -86,6 +92,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [41] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_euclid print_euclid::@2 print_euclid::@5 [42] (byte*) print_char_cursor#51 ← phi( print_euclid/(byte*) print_char_cursor#53 print_euclid::@2/(byte*) print_char_cursor#32 print_euclid::@5/(byte*) print_char_cursor#32 ) [42] (byte) print_byte::b#3 ← phi( print_euclid/(byte) print_byte::b#0 print_euclid::@2/(byte) print_byte::b#1 print_euclid::@5/(byte) print_byte::b#2 ) @@ -101,6 +109,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [49] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_euclid::@1 print_euclid::@3 [50] (byte*) print_char_cursor#31 ← phi( print_byte/(byte*) print_char_cursor#51 print_byte::@1/(byte*) print_char_cursor#32 print_euclid::@1/(byte*) print_char_cursor#32 print_euclid::@3/(byte*) print_char_cursor#32 ) [50] (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 print_euclid::@1/(byte) ' ' print_euclid::@3/(byte) ' ' ) @@ -110,6 +120,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_euclid::@1 print_char::@return: scope:[print_char] from print_char [53] return to:@return + +(byte()) euclid((byte) euclid::a , (byte) euclid::b) euclid: scope:[euclid] from print_euclid::@4 [54] phi() to:euclid::@1 @@ -130,6 +142,8 @@ euclid::@4: scope:[euclid] from euclid::@2 euclid::@3: scope:[euclid] from euclid::@2 [60] (byte) euclid::a#1 ← (byte) euclid::a#2 - (byte) euclid::b#2 to:euclid::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main [61] phi() [62] call memset @@ -137,6 +151,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [63] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [64] phi() to:memset::@1 diff --git a/src/test/ref/euclid-3.log b/src/test/ref/euclid-3.log index 627470d8c..5b9de4292 100644 --- a/src/test/ref/euclid-3.log +++ b/src/test/ref/euclid-3.log @@ -61,6 +61,8 @@ Culled Empty Block (label) euclid::@11 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@12 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -108,6 +110,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@29 + +(void()) print_ln() print_ln: scope:[print_ln] from print_euclid::@6 (byte*) print_char_cursor#50 ← phi( print_euclid::@6/(byte*) print_char_cursor#22 ) (byte*) print_line_cursor#31 ← phi( print_euclid::@6/(byte*) print_line_cursor#33 ) @@ -137,6 +141,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_line_cursor#36 ← phi( @12/(byte*) print_line_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $0 to:@39 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_euclid print_euclid::@2 print_euclid::@5 (byte*) print_char_cursor#51 ← phi( print_euclid/(byte*) print_char_cursor#53 print_euclid::@2/(byte*) print_char_cursor#19 print_euclid::@5/(byte*) print_char_cursor#54 ) (byte) print_byte::b#3 ← phi( print_euclid/(byte) print_byte::b#0 print_euclid::@2/(byte) print_byte::b#1 print_euclid::@5/(byte) print_byte::b#2 ) @@ -161,6 +167,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#5 ← (byte*) print_char_cursor#30 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_euclid::@1 print_euclid::@3 (byte*) print_char_cursor#31 ← phi( print_byte/(byte*) print_char_cursor#51 print_byte::@1/(byte*) print_char_cursor#3 print_euclid::@1/(byte*) print_char_cursor#18 print_euclid::@3/(byte*) print_char_cursor#20 ) (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 print_euclid::@1/(byte) print_char::ch#2 print_euclid::@3/(byte) print_char::ch#3 ) @@ -172,6 +180,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#7 ← (byte*) print_char_cursor#32 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main (byte*) print_screen#1 ← phi( main/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -192,6 +202,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte*) print_char_cursor#9 ← (byte*) print_char_cursor#33 return to:@return + +(void()) main() main: scope:[main] from @39 (byte*) print_char_cursor#52 ← phi( @39/(byte*) print_char_cursor#55 ) (byte*) print_line_cursor#32 ← phi( @39/(byte*) print_line_cursor#34 ) @@ -265,6 +277,8 @@ main::@return: scope:[main] from main::@7 (byte*) print_char_cursor#17 ← (byte*) print_char_cursor#41 return to:@return + +(void()) print_euclid((byte) print_euclid::a , (byte) print_euclid::b) print_euclid: scope:[print_euclid] from main::@1 main::@2 main::@3 main::@4 main::@5 main::@6 (byte*) print_line_cursor#41 ← phi( main::@1/(byte*) print_line_cursor#5 main::@2/(byte*) print_line_cursor#6 main::@3/(byte*) print_line_cursor#7 main::@4/(byte*) print_line_cursor#8 main::@5/(byte*) print_line_cursor#9 main::@6/(byte*) print_line_cursor#10 ) (byte) print_euclid::b#10 ← phi( main::@1/(byte) print_euclid::b#0 main::@2/(byte) print_euclid::b#1 main::@3/(byte) print_euclid::b#2 main::@4/(byte) print_euclid::b#3 main::@5/(byte) print_euclid::b#4 main::@6/(byte) print_euclid::b#5 ) @@ -338,6 +352,8 @@ print_euclid::@return: scope:[print_euclid] from print_euclid::@7 (byte*) print_line_cursor#14 ← (byte*) print_line_cursor#29 return to:@return + +(byte()) euclid((byte) euclid::a , (byte) euclid::b) euclid: scope:[euclid] from print_euclid::@4 (byte) euclid::b#6 ← phi( print_euclid::@4/(byte) euclid::b#0 ) (byte) euclid::a#7 ← phi( print_euclid::@4/(byte) euclid::a#0 ) @@ -1006,6 +1022,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -1037,6 +1055,8 @@ main::@6: scope:[main] from main::@5 main::@return: scope:[main] from main::@6 [18] return to:@return + +(void()) print_euclid((byte) print_euclid::a , (byte) print_euclid::b) print_euclid: scope:[print_euclid] from main::@1 main::@2 main::@3 main::@4 main::@5 main::@6 [19] (byte*) print_line_cursor#33 ← phi( main::@1/(byte*) 1024 main::@2/(byte*) print_line_cursor#1 main::@3/(byte*) print_line_cursor#1 main::@4/(byte*) print_line_cursor#1 main::@5/(byte*) print_line_cursor#1 main::@6/(byte*) print_line_cursor#1 ) [19] (byte) print_euclid::b#10 ← phi( main::@1/(byte) 2 main::@2/(byte) $45 main::@3/(byte) $37 main::@4/(byte) 3 main::@5/(byte) $1a main::@6/(byte) $bb ) @@ -1074,6 +1094,8 @@ print_euclid::@6: scope:[print_euclid] from print_euclid::@5 print_euclid::@return: scope:[print_euclid] from print_euclid::@6 [36] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from print_euclid::@6 [37] phi() to:print_ln::@1 @@ -1085,6 +1107,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [41] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_euclid print_euclid::@2 print_euclid::@5 [42] (byte*) print_char_cursor#51 ← phi( print_euclid/(byte*) print_char_cursor#53 print_euclid::@2/(byte*) print_char_cursor#32 print_euclid::@5/(byte*) print_char_cursor#32 ) [42] (byte) print_byte::b#3 ← phi( print_euclid/(byte) print_byte::b#0 print_euclid::@2/(byte) print_byte::b#1 print_euclid::@5/(byte) print_byte::b#2 ) @@ -1100,6 +1124,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [49] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_euclid::@1 print_euclid::@3 [50] (byte*) print_char_cursor#31 ← phi( print_byte/(byte*) print_char_cursor#51 print_byte::@1/(byte*) print_char_cursor#32 print_euclid::@1/(byte*) print_char_cursor#32 print_euclid::@3/(byte*) print_char_cursor#32 ) [50] (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 print_euclid::@1/(byte) ' ' print_euclid::@3/(byte) ' ' ) @@ -1109,6 +1135,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_euclid::@1 print_char::@return: scope:[print_char] from print_char [53] return to:@return + +(byte()) euclid((byte) euclid::a , (byte) euclid::b) euclid: scope:[euclid] from print_euclid::@4 [54] phi() to:euclid::@1 @@ -1129,6 +1157,8 @@ euclid::@4: scope:[euclid] from euclid::@2 euclid::@3: scope:[euclid] from euclid::@2 [60] (byte) euclid::a#1 ← (byte) euclid::a#2 - (byte) euclid::b#2 to:euclid::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main [61] phi() [62] call memset @@ -1136,6 +1166,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [63] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [64] phi() to:memset::@1 diff --git a/src/test/ref/euclid-problem-2.cfg b/src/test/ref/euclid-problem-2.cfg index 52582cdbe..cdcd73528 100644 --- a/src/test/ref/euclid-problem-2.cfg +++ b/src/test/ref/euclid-problem-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call euclid @@ -37,6 +39,8 @@ main::@4: scope:[main] from main::@3 main::@return: scope:[main] from main::@4 [21] return to:@return + +(byte()) euclid((byte) euclid::a , (byte) euclid::b) euclid: scope:[euclid] from main main::@1 main::@2 main::@3 [22] (byte) euclid::b#9 ← phi( main/(byte) 2 main::@1/(byte) $45 main::@2/(byte) $9b main::@3/(byte) 3 ) [22] (byte) euclid::a#10 ← phi( main/(byte) $80 main::@1/(byte) $a9 main::@2/(byte) $ff main::@3/(byte) $63 ) diff --git a/src/test/ref/euclid-problem-2.log b/src/test/ref/euclid-problem-2.log index 8391ff3bd..54184c2d3 100644 --- a/src/test/ref/euclid-problem-2.log +++ b/src/test/ref/euclid-problem-2.log @@ -11,6 +11,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte) idx#0 ← (number) 0 to:@2 + +(void()) main() main: scope:[main] from @2 (byte) idx#13 ← phi( @2/(byte) idx#14 ) (byte) euclid::a#0 ← (number) $80 @@ -63,6 +65,8 @@ main::@return: scope:[main] from main::@4 (byte) idx#5 ← (byte) idx#11 return to:@return + +(byte()) euclid((byte) euclid::a , (byte) euclid::b) euclid: scope:[euclid] from main main::@1 main::@2 main::@3 (byte) euclid::b#9 ← phi( main/(byte) euclid::b#0 main::@1/(byte) euclid::b#1 main::@2/(byte) euclid::b#2 main::@3/(byte) euclid::b#3 ) (byte) euclid::a#10 ← phi( main/(byte) euclid::a#0 main::@1/(byte) euclid::a#1 main::@2/(byte) euclid::a#2 main::@3/(byte) euclid::a#3 ) @@ -355,6 +359,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call euclid @@ -385,6 +391,8 @@ main::@4: scope:[main] from main::@3 main::@return: scope:[main] from main::@4 [21] return to:@return + +(byte()) euclid((byte) euclid::a , (byte) euclid::b) euclid: scope:[euclid] from main main::@1 main::@2 main::@3 [22] (byte) euclid::b#9 ← phi( main/(byte) 2 main::@1/(byte) $45 main::@2/(byte) $9b main::@3/(byte) 3 ) [22] (byte) euclid::a#10 ← phi( main/(byte) $80 main::@1/(byte) $a9 main::@2/(byte) $ff main::@3/(byte) $63 ) diff --git a/src/test/ref/euclid-problem.cfg b/src/test/ref/euclid-problem.cfg index 3a48bae1c..c74dca6ea 100644 --- a/src/test/ref/euclid-problem.cfg +++ b/src/test/ref/euclid-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/euclid-problem.log b/src/test/ref/euclid-problem.log index c216ef46e..804182c9c 100644 --- a/src/test/ref/euclid-problem.log +++ b/src/test/ref/euclid-problem.log @@ -9,6 +9,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::a#0 ← (number) $80 (byte) main::b#0 ← (number) 2 @@ -147,6 +149,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/examples/3d/3d.cfg b/src/test/ref/examples/3d/3d.cfg index 5a99dc5ff..cd0a8f4a6 100644 --- a/src/test/ref/examples/3d/3d.cfg +++ b/src/test/ref/examples/3d/3d.cfg @@ -11,6 +11,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] call sprites_init @@ -27,6 +29,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [11] return to:@return + +(void()) anim() anim: scope:[anim] from main::@2 [12] phi() to:anim::@1 @@ -85,6 +89,8 @@ anim::@10: scope:[anim] from anim::@7 [45] (signed byte) sx#3 ← (signed byte) sx#10 + (signed byte) 2 [46] (signed byte) sy#3 ← (signed byte) sy#10 - (signed byte) 3 to:anim::@1 + +(void()) debug_print() debug_print: scope:[debug_print] from anim::@7 [47] (signed byte) debug_print::print_sbyte_pos1_sb#0 ← (signed byte) sx#10 to:debug_print::print_sbyte_pos1 @@ -206,6 +212,8 @@ debug_print::@17: scope:[debug_print] from debug_print::@16 debug_print::@return: scope:[debug_print] from debug_print::@17 [104] return to:@return + +(void()) print_sbyte_at((signed byte) print_sbyte_at::b , (byte*) print_sbyte_at::at) print_sbyte_at: scope:[print_sbyte_at] from debug_print::@1 debug_print::@12 debug_print::@13 debug_print::@14 debug_print::@15 debug_print::@16 debug_print::print_sbyte_pos1 debug_print::print_sbyte_pos10 debug_print::print_sbyte_pos11 debug_print::print_sbyte_pos12 debug_print::print_sbyte_pos2 debug_print::print_sbyte_pos3 debug_print::print_sbyte_pos4 debug_print::print_sbyte_pos5 debug_print::print_sbyte_pos6 debug_print::print_sbyte_pos7 debug_print::print_sbyte_pos8 debug_print::print_sbyte_pos9 debug_print_init::@1 debug_print_init::@16 debug_print_init::@17 [105] (byte*) print_sbyte_at::at#21 ← phi( debug_print::@1/(byte*) print_sbyte_at::at#15 debug_print::@12/(byte*) print_sbyte_at::at#16 debug_print::@13/(byte*) print_sbyte_at::at#17 debug_print::@14/(byte*) print_sbyte_at::at#18 debug_print::@15/(byte*) print_sbyte_at::at#19 debug_print::@16/(byte*) print_sbyte_at::at#20 debug_print::print_sbyte_pos1/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos1_col#0 debug_print::print_sbyte_pos10/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos10_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos10_col#0 debug_print::print_sbyte_pos11/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos11_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos11_col#0 debug_print::print_sbyte_pos12/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos12_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos12_col#0 debug_print::print_sbyte_pos2/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos2_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos2_col#0 debug_print::print_sbyte_pos3/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos3_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos3_col#0 debug_print::print_sbyte_pos4/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos4_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos4_col#0 debug_print::print_sbyte_pos5/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos5_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos5_col#0 debug_print::print_sbyte_pos6/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos6_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos6_col#0 debug_print::print_sbyte_pos7/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos7_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos7_col#0 debug_print::print_sbyte_pos8/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos8_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos8_col#0 debug_print::print_sbyte_pos9/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos9_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos9_col#0 debug_print_init::@1/(byte*) print_sbyte_at::at#0 debug_print_init::@16/(byte*) print_sbyte_at::at#1 debug_print_init::@17/(byte*) print_sbyte_at::at#2 ) [105] (signed byte) print_sbyte_at::b#22 ← phi( debug_print::@1/(signed byte) print_sbyte_at::b#16 debug_print::@12/(signed byte) print_sbyte_at::b#17 debug_print::@13/(signed byte) print_sbyte_at::b#18 debug_print::@14/(signed byte) print_sbyte_at::b#19 debug_print::@15/(signed byte) print_sbyte_at::b#20 debug_print::@16/(signed byte) print_sbyte_at::b#21 debug_print::print_sbyte_pos1/(signed byte) print_sbyte_at::b#4 debug_print::print_sbyte_pos10/(signed byte) print_sbyte_at::b#13 debug_print::print_sbyte_pos11/(signed byte) print_sbyte_at::b#14 debug_print::print_sbyte_pos12/(signed byte) print_sbyte_at::b#15 debug_print::print_sbyte_pos2/(signed byte) print_sbyte_at::b#5 debug_print::print_sbyte_pos3/(const signed byte) sz#0 debug_print::print_sbyte_pos4/(signed byte) print_sbyte_at::b#7 debug_print::print_sbyte_pos5/(signed byte) print_sbyte_at::b#8 debug_print::print_sbyte_pos6/(signed byte) print_sbyte_at::b#9 debug_print::print_sbyte_pos7/(signed byte) print_sbyte_at::b#10 debug_print::print_sbyte_pos8/(signed byte) print_sbyte_at::b#11 debug_print::print_sbyte_pos9/(signed byte) print_sbyte_at::b#12 debug_print_init::@1/(signed byte) print_sbyte_at::b#1 debug_print_init::@16/(signed byte) print_sbyte_at::b#2 debug_print_init::@17/(signed byte) print_sbyte_at::b#3 ) @@ -231,6 +239,8 @@ print_sbyte_at::@1: scope:[print_sbyte_at] from print_sbyte_at print_sbyte_at::@4: scope:[print_sbyte_at] from print_sbyte_at::@1 [116] (signed byte) print_sbyte_at::b#0 ← - (signed byte) print_sbyte_at::b#22 to:print_sbyte_at::@2 + +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print_sbyte_at::@1 print_sbyte_at::@3 [117] (byte*) print_char_at::at#4 ← phi( print_byte_at/(byte*) print_char_at::at#2 print_byte_at::@1/(byte*) print_char_at::at#3 print_sbyte_at::@1/(byte*) print_char_at::at#0 print_sbyte_at::@3/(byte*) print_char_at::at#1 ) [117] (byte) print_char_at::ch#4 ← phi( print_byte_at/(byte) print_char_at::ch#2 print_byte_at::@1/(byte) print_char_at::ch#3 print_sbyte_at::@1/(byte) '-' print_sbyte_at::@3/(byte) ' ' ) @@ -239,6 +249,8 @@ print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print print_char_at::@return: scope:[print_char_at] from print_char_at [119] return to:@return + +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) print_byte_at: scope:[print_byte_at] from print_sbyte_at::@2 [120] (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#0 >> (byte) 4 [121] (byte) print_char_at::ch#2 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$0) @@ -254,6 +266,8 @@ print_byte_at::@1: scope:[print_byte_at] from print_byte_at print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@1 [128] return to:@return + +(void()) rotate_matrix((signed byte) rotate_matrix::x , (signed byte) rotate_matrix::y , (signed byte) rotate_matrix::z) rotate_matrix: scope:[rotate_matrix] from anim::@6 [129] *((const signed byte*) xr#0) ← (signed byte) rotate_matrix::x#0 [130] *((const signed byte*) yr#0) ← (signed byte) rotate_matrix::y#0 @@ -263,12 +277,16 @@ rotate_matrix: scope:[rotate_matrix] from anim::@6 rotate_matrix::@return: scope:[rotate_matrix] from rotate_matrix [133] return to:@return + +(void()) store_matrix() store_matrix: scope:[store_matrix] from anim::@8 asm { ldarotation_matrix+0 starotate_matrix.A1+1 eor#$ff starotate_matrix.A2+1 ldarotation_matrix+1 starotate_matrix.B1+1 eor#$ff starotate_matrix.B2+1 ldarotation_matrix+2 starotate_matrix.C1+1 eor#$ff starotate_matrix.C2+1 ldarotation_matrix+3 starotate_matrix.D1+1 eor#$ff starotate_matrix.D2+1 ldarotation_matrix+4 starotate_matrix.E1+1 eor#$ff starotate_matrix.E2+1 ldarotation_matrix+5 starotate_matrix.F1+1 eor#$ff starotate_matrix.F2+1 ldarotation_matrix+6 starotate_matrix.G1+1 eor#$ff starotate_matrix.G2+1 ldarotation_matrix+7 starotate_matrix.H1+1 eor#$ff starotate_matrix.H2+1 ldarotation_matrix+8 starotate_matrix.I1+1 eor#$ff starotate_matrix.I2+1 } to:store_matrix::@return store_matrix::@return: scope:[store_matrix] from store_matrix [135] return to:@return + +(void()) calculate_matrix((signed byte) calculate_matrix::sx , (signed byte) calculate_matrix::sy , (signed byte) calculate_matrix::sz) calculate_matrix: scope:[calculate_matrix] from anim::@5 [136] (signed byte) calculate_matrix::t1#0 ← (signed byte) calculate_matrix::sy#0 [137] (signed byte) calculate_matrix::t2#0 ← (signed byte) calculate_matrix::sy#0 @@ -318,6 +336,8 @@ calculate_matrix: scope:[calculate_matrix] from anim::@5 calculate_matrix::@return: scope:[calculate_matrix] from calculate_matrix [180] return to:@return + +(void()) debug_print_init() debug_print_init: scope:[debug_print_init] from main::@1 [181] phi() [182] call print_cls @@ -419,6 +439,8 @@ debug_print_init::@3: scope:[debug_print_init] from debug_print_init::@2 debug_print_init::@return: scope:[debug_print_init] from debug_print_init::@3 [242] return to:@return + +(void()) print_str_at((byte*) print_str_at::str , (byte*) print_str_at::at) print_str_at: scope:[print_str_at] from debug_print_init::@10 debug_print_init::@11 debug_print_init::@12 debug_print_init::@13 debug_print_init::@14 debug_print_init::@15 debug_print_init::@4 debug_print_init::@5 debug_print_init::@6 debug_print_init::@7 debug_print_init::@8 debug_print_init::@9 [243] (byte*) print_str_at::at#15 ← phi( debug_print_init::@9/(const byte*) SCREEN#0+(word)(number) $28*(number) $12 debug_print_init::@10/(const byte*) SCREEN#0+(word)(number) $28*(number) $13 debug_print_init::@11/(const byte*) SCREEN#0+(word)(number) $28*(number) $14 debug_print_init::@12/(const byte*) SCREEN#0+(word)(number) $28*(number) $15 debug_print_init::@13/(const byte*) SCREEN#0+(word)(number) $28*(number) $16 debug_print_init::@14/(const byte*) SCREEN#0+(word)(number) $28*(number) $17 debug_print_init::@15/(const byte*) SCREEN#0+(word)(number) $28*(number) $18 debug_print_init::@4/(const byte*) SCREEN#0+(byte) $22 debug_print_init::@5/(const byte*) SCREEN#0+(byte)(number) $28*(number) 1+(byte) $22 debug_print_init::@6/(const byte*) SCREEN#0+(byte)(number) $28*(number) 2+(byte) $22 debug_print_init::@7/(const byte*) SCREEN#0+(word)(number) $28*(number) $10 debug_print_init::@8/(const byte*) SCREEN#0+(word)(number) $28*(number) $11 ) [243] (byte*) print_str_at::str#15 ← phi( debug_print_init::@9/(const string) debug_print_init::str5 debug_print_init::@10/(const string) debug_print_init::str6 debug_print_init::@11/(const string) debug_print_init::str7 debug_print_init::@12/(const string) debug_print_init::str8 debug_print_init::@13/(const string) debug_print_init::str9 debug_print_init::@14/(const string) debug_print_init::str10 debug_print_init::@15/(const string) debug_print_init::str11 debug_print_init::@4/(const string) debug_print_init::str debug_print_init::@5/(const string) debug_print_init::str1 debug_print_init::@6/(const string) debug_print_init::str2 debug_print_init::@7/(const string) debug_print_init::str3 debug_print_init::@8/(const string) debug_print_init::str4 ) @@ -436,6 +458,8 @@ print_str_at::@2: scope:[print_str_at] from print_str_at::@1 [248] (byte*) print_str_at::at#0 ← ++ (byte*) print_str_at::at#13 [249] (byte*) print_str_at::str#0 ← ++ (byte*) print_str_at::str#13 to:print_str_at::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from debug_print_init [250] phi() [251] call memset @@ -443,6 +467,8 @@ print_cls: scope:[print_cls] from debug_print_init print_cls::@return: scope:[print_cls] from print_cls [252] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [253] phi() to:memset::@1 @@ -457,6 +483,8 @@ memset::@2: scope:[memset] from memset::@1 [257] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [258] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) sprites_init() sprites_init: scope:[sprites_init] from main [259] *((const byte*) SPRITES_ENABLE#0) ← (byte) $ff to:sprites_init::@1 diff --git a/src/test/ref/examples/3d/3d.log b/src/test/ref/examples/3d/3d.log index 7d0d026e7..bd0555c26 100644 --- a/src/test/ref/examples/3d/3d.log +++ b/src/test/ref/examples/3d/3d.log @@ -228,6 +228,8 @@ CONTROL FLOW GRAPH SSA (byte) LIGHT_BLUE#0 ← (number) $e (byte) LIGHT_GREY#0 ← (number) $f to:@16 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -273,6 +275,8 @@ memset::@return: scope:[memset] from memset::@1 @16: scope:[] from @begin (byte*) print_screen#0 ← ((byte*)) (number) $400 to:@33 + +(void()) print_str_at((byte*) print_str_at::str , (byte*) print_str_at::at) print_str_at: scope:[print_str_at] from debug_print_init::@10 debug_print_init::@11 debug_print_init::@12 debug_print_init::@13 debug_print_init::@14 debug_print_init::@15 debug_print_init::@16 debug_print_init::@5 debug_print_init::@6 debug_print_init::@7 debug_print_init::@8 debug_print_init::@9 (byte*) print_str_at::at#15 ← phi( debug_print_init::@10/(byte*) print_str_at::at#6 debug_print_init::@11/(byte*) print_str_at::at#7 debug_print_init::@12/(byte*) print_str_at::at#8 debug_print_init::@13/(byte*) print_str_at::at#9 debug_print_init::@14/(byte*) print_str_at::at#10 debug_print_init::@15/(byte*) print_str_at::at#11 debug_print_init::@16/(byte*) print_str_at::at#12 debug_print_init::@5/(byte*) print_str_at::at#1 debug_print_init::@6/(byte*) print_str_at::at#2 debug_print_init::@7/(byte*) print_str_at::at#3 debug_print_init::@8/(byte*) print_str_at::at#4 debug_print_init::@9/(byte*) print_str_at::at#5 ) (byte*) print_str_at::str#15 ← phi( debug_print_init::@10/(byte*) print_str_at::str#6 debug_print_init::@11/(byte*) print_str_at::str#7 debug_print_init::@12/(byte*) print_str_at::str#8 debug_print_init::@13/(byte*) print_str_at::str#9 debug_print_init::@14/(byte*) print_str_at::str#10 debug_print_init::@15/(byte*) print_str_at::str#11 debug_print_init::@16/(byte*) print_str_at::str#12 debug_print_init::@5/(byte*) print_str_at::str#1 debug_print_init::@6/(byte*) print_str_at::str#2 debug_print_init::@7/(byte*) print_str_at::str#3 debug_print_init::@8/(byte*) print_str_at::str#4 debug_print_init::@9/(byte*) print_str_at::str#5 ) @@ -293,6 +297,8 @@ print_str_at::@2: scope:[print_str_at] from print_str_at::@1 print_str_at::@return: scope:[print_str_at] from print_str_at::@1 return to:@return + +(void()) print_sbyte_at((signed byte) print_sbyte_at::b , (byte*) print_sbyte_at::at) print_sbyte_at: scope:[print_sbyte_at] from debug_print::@1 debug_print::@27 debug_print::@28 debug_print::@29 debug_print::@30 debug_print::@31 debug_print::print_sbyte_pos1 debug_print::print_sbyte_pos10 debug_print::print_sbyte_pos11 debug_print::print_sbyte_pos12 debug_print::print_sbyte_pos2 debug_print::print_sbyte_pos3 debug_print::print_sbyte_pos4 debug_print::print_sbyte_pos5 debug_print::print_sbyte_pos6 debug_print::print_sbyte_pos7 debug_print::print_sbyte_pos8 debug_print::print_sbyte_pos9 debug_print_init::@1 debug_print_init::@18 debug_print_init::@19 (byte*) print_sbyte_at::at#24 ← phi( debug_print::@1/(byte*) print_sbyte_at::at#15 debug_print::@27/(byte*) print_sbyte_at::at#16 debug_print::@28/(byte*) print_sbyte_at::at#17 debug_print::@29/(byte*) print_sbyte_at::at#18 debug_print::@30/(byte*) print_sbyte_at::at#19 debug_print::@31/(byte*) print_sbyte_at::at#20 debug_print::print_sbyte_pos1/(byte*) print_sbyte_at::at#3 debug_print::print_sbyte_pos10/(byte*) print_sbyte_at::at#12 debug_print::print_sbyte_pos11/(byte*) print_sbyte_at::at#13 debug_print::print_sbyte_pos12/(byte*) print_sbyte_at::at#14 debug_print::print_sbyte_pos2/(byte*) print_sbyte_at::at#4 debug_print::print_sbyte_pos3/(byte*) print_sbyte_at::at#5 debug_print::print_sbyte_pos4/(byte*) print_sbyte_at::at#6 debug_print::print_sbyte_pos5/(byte*) print_sbyte_at::at#7 debug_print::print_sbyte_pos6/(byte*) print_sbyte_at::at#8 debug_print::print_sbyte_pos7/(byte*) print_sbyte_at::at#9 debug_print::print_sbyte_pos8/(byte*) print_sbyte_at::at#10 debug_print::print_sbyte_pos9/(byte*) print_sbyte_at::at#11 debug_print_init::@1/(byte*) print_sbyte_at::at#0 debug_print_init::@18/(byte*) print_sbyte_at::at#1 debug_print_init::@19/(byte*) print_sbyte_at::at#2 ) (signed byte) print_sbyte_at::b#22 ← phi( debug_print::@1/(signed byte) print_sbyte_at::b#16 debug_print::@27/(signed byte) print_sbyte_at::b#17 debug_print::@28/(signed byte) print_sbyte_at::b#18 debug_print::@29/(signed byte) print_sbyte_at::b#19 debug_print::@30/(signed byte) print_sbyte_at::b#20 debug_print::@31/(signed byte) print_sbyte_at::b#21 debug_print::print_sbyte_pos1/(signed byte) print_sbyte_at::b#4 debug_print::print_sbyte_pos10/(signed byte) print_sbyte_at::b#13 debug_print::print_sbyte_pos11/(signed byte) print_sbyte_at::b#14 debug_print::print_sbyte_pos12/(signed byte) print_sbyte_at::b#15 debug_print::print_sbyte_pos2/(signed byte) print_sbyte_at::b#5 debug_print::print_sbyte_pos3/(signed byte) print_sbyte_at::b#6 debug_print::print_sbyte_pos4/(signed byte) print_sbyte_at::b#7 debug_print::print_sbyte_pos5/(signed byte) print_sbyte_at::b#8 debug_print::print_sbyte_pos6/(signed byte) print_sbyte_at::b#9 debug_print::print_sbyte_pos7/(signed byte) print_sbyte_at::b#10 debug_print::print_sbyte_pos8/(signed byte) print_sbyte_at::b#11 debug_print::print_sbyte_pos9/(signed byte) print_sbyte_at::b#12 debug_print_init::@1/(signed byte) print_sbyte_at::b#1 debug_print_init::@18/(signed byte) print_sbyte_at::b#2 debug_print_init::@19/(signed byte) print_sbyte_at::b#3 ) @@ -341,6 +347,8 @@ print_sbyte_at::@return: scope:[print_sbyte_at] from print_sbyte_at::@7 (byte*) print_screen#50 ← phi( @16/(byte*) print_screen#0 ) (byte[]) print_hextab#0 ← (const string) $6 to:@40 + +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) print_byte_at: scope:[print_byte_at] from print_sbyte_at::@2 (byte*) print_byte_at::at#1 ← phi( print_sbyte_at::@2/(byte*) print_byte_at::at#0 ) (byte) print_byte_at::b#1 ← phi( print_sbyte_at::@2/(byte) print_byte_at::b#0 ) @@ -363,6 +371,8 @@ print_byte_at::@2: scope:[print_byte_at] from print_byte_at::@1 print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@2 return to:@return + +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print_sbyte_at::@1 print_sbyte_at::@3 (byte*) print_char_at::at#4 ← phi( print_byte_at/(byte*) print_char_at::at#2 print_byte_at::@1/(byte*) print_char_at::at#3 print_sbyte_at::@1/(byte*) print_char_at::at#0 print_sbyte_at::@3/(byte*) print_char_at::at#1 ) (byte) print_char_at::ch#4 ← phi( print_byte_at/(byte) print_char_at::ch#2 print_byte_at::@1/(byte) print_char_at::ch#3 print_sbyte_at::@1/(byte) print_char_at::ch#0 print_sbyte_at::@3/(byte) print_char_at::ch#1 ) @@ -371,6 +381,8 @@ print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print print_char_at::@return: scope:[print_char_at] from print_char_at return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from debug_print_init (byte*) print_screen#1 ← phi( debug_print_init/(byte*) print_screen#14 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -396,6 +408,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (word*) psp2#0 ← ((word*)) (number) $f8 (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@41 + +(void()) main() main: scope:[main] from @50 (signed byte*) COSQ#13 ← phi( @50/(signed byte*) COSQ#0 ) (signed byte*) COSH#13 ← phi( @50/(signed byte*) COSH#0 ) @@ -453,6 +467,8 @@ main::@return: scope:[main] from main::@3 (signed byte) sy#2 ← (number) 0 (signed byte) sz#0 ← (number) 0 to:@45 + +(void()) anim() anim: scope:[anim] from main::@2 (byte*) print_screen#55 ← phi( main::@2/(byte*) print_screen#57 ) (signed byte*) COSQ#7 ← phi( main::@2/(signed byte*) COSQ#9 ) @@ -587,6 +603,8 @@ anim::@return: scope:[anim] from anim::@1 (signed byte) sy#4 ← (signed byte) sy#10 return to:@return + +(void()) debug_print_init() debug_print_init: scope:[debug_print_init] from main::@1 (byte*) print_screen#14 ← phi( main::@1/(byte*) print_screen#27 ) call print_cls @@ -776,6 +794,8 @@ debug_print_init::@3: scope:[debug_print_init] from debug_print_init::@2 debug_print_init::@return: scope:[debug_print_init] from debug_print_init::@3 return to:@return + +(void()) debug_print() debug_print: scope:[debug_print] from anim::@23 (signed byte) sy#28 ← phi( anim::@23/(signed byte) sy#15 ) (byte*) print_screen#15 ← phi( anim::@23/(byte*) print_screen#28 ) @@ -1110,6 +1130,8 @@ debug_print::@32: scope:[debug_print] from debug_print::@31 debug_print::@return: scope:[debug_print] from debug_print::@32 return to:@return + +(void()) sprites_init() sprites_init: scope:[sprites_init] from main (byte*) sprites_init::SCREEN#0 ← ((byte*)) (number) $400 *((byte*) SPRITES_ENABLE#0) ← (number) $ff @@ -1137,6 +1159,8 @@ sprites_init::@return: scope:[sprites_init] from sprites_init::@1 (signed byte) sx#22 ← phi( @41/(signed byte) sx#2 ) (signed byte[9]) rotation_matrix#0 ← { fill( 9, 0) } to:@50 + +(void()) calculate_matrix((signed byte) calculate_matrix::sx , (signed byte) calculate_matrix::sy , (signed byte) calculate_matrix::sz) calculate_matrix: scope:[calculate_matrix] from anim::@18 (signed byte*) COSQ#1 ← phi( anim::@18/(signed byte*) COSQ#2 ) (signed byte*) COSH#1 ← phi( anim::@18/(signed byte*) COSH#2 ) @@ -1201,12 +1225,16 @@ calculate_matrix: scope:[calculate_matrix] from anim::@18 calculate_matrix::@return: scope:[calculate_matrix] from calculate_matrix return to:@return + +(void()) store_matrix() store_matrix: scope:[store_matrix] from anim::@27 asm { ldarotation_matrix+0 starotate_matrix.A1+1 eor#$ff starotate_matrix.A2+1 ldarotation_matrix+1 starotate_matrix.B1+1 eor#$ff starotate_matrix.B2+1 ldarotation_matrix+2 starotate_matrix.C1+1 eor#$ff starotate_matrix.C2+1 ldarotation_matrix+3 starotate_matrix.D1+1 eor#$ff starotate_matrix.D2+1 ldarotation_matrix+4 starotate_matrix.E1+1 eor#$ff starotate_matrix.E2+1 ldarotation_matrix+5 starotate_matrix.F1+1 eor#$ff starotate_matrix.F2+1 ldarotation_matrix+6 starotate_matrix.G1+1 eor#$ff starotate_matrix.G2+1 ldarotation_matrix+7 starotate_matrix.H1+1 eor#$ff starotate_matrix.H2+1 ldarotation_matrix+8 starotate_matrix.I1+1 eor#$ff starotate_matrix.I2+1 } to:store_matrix::@return store_matrix::@return: scope:[store_matrix] from store_matrix return to:@return + +(void()) rotate_matrix((signed byte) rotate_matrix::x , (signed byte) rotate_matrix::y , (signed byte) rotate_matrix::z) rotate_matrix: scope:[rotate_matrix] from anim::@22 (signed byte) rotate_matrix::z#1 ← phi( anim::@22/(signed byte) rotate_matrix::z#0 ) (signed byte) rotate_matrix::y#1 ← phi( anim::@22/(signed byte) rotate_matrix::y#0 ) @@ -3715,6 +3743,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] call sprites_init @@ -3731,6 +3761,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [11] return to:@return + +(void()) anim() anim: scope:[anim] from main::@2 [12] phi() to:anim::@1 @@ -3789,6 +3821,8 @@ anim::@10: scope:[anim] from anim::@7 [45] (signed byte) sx#3 ← (signed byte) sx#10 + (signed byte) 2 [46] (signed byte) sy#3 ← (signed byte) sy#10 - (signed byte) 3 to:anim::@1 + +(void()) debug_print() debug_print: scope:[debug_print] from anim::@7 [47] (signed byte) debug_print::print_sbyte_pos1_sb#0 ← (signed byte) sx#10 to:debug_print::print_sbyte_pos1 @@ -3910,6 +3944,8 @@ debug_print::@17: scope:[debug_print] from debug_print::@16 debug_print::@return: scope:[debug_print] from debug_print::@17 [104] return to:@return + +(void()) print_sbyte_at((signed byte) print_sbyte_at::b , (byte*) print_sbyte_at::at) print_sbyte_at: scope:[print_sbyte_at] from debug_print::@1 debug_print::@12 debug_print::@13 debug_print::@14 debug_print::@15 debug_print::@16 debug_print::print_sbyte_pos1 debug_print::print_sbyte_pos10 debug_print::print_sbyte_pos11 debug_print::print_sbyte_pos12 debug_print::print_sbyte_pos2 debug_print::print_sbyte_pos3 debug_print::print_sbyte_pos4 debug_print::print_sbyte_pos5 debug_print::print_sbyte_pos6 debug_print::print_sbyte_pos7 debug_print::print_sbyte_pos8 debug_print::print_sbyte_pos9 debug_print_init::@1 debug_print_init::@16 debug_print_init::@17 [105] (byte*) print_sbyte_at::at#21 ← phi( debug_print::@1/(byte*) print_sbyte_at::at#15 debug_print::@12/(byte*) print_sbyte_at::at#16 debug_print::@13/(byte*) print_sbyte_at::at#17 debug_print::@14/(byte*) print_sbyte_at::at#18 debug_print::@15/(byte*) print_sbyte_at::at#19 debug_print::@16/(byte*) print_sbyte_at::at#20 debug_print::print_sbyte_pos1/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos1_col#0 debug_print::print_sbyte_pos10/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos10_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos10_col#0 debug_print::print_sbyte_pos11/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos11_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos11_col#0 debug_print::print_sbyte_pos12/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos12_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos12_col#0 debug_print::print_sbyte_pos2/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos2_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos2_col#0 debug_print::print_sbyte_pos3/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos3_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos3_col#0 debug_print::print_sbyte_pos4/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos4_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos4_col#0 debug_print::print_sbyte_pos5/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos5_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos5_col#0 debug_print::print_sbyte_pos6/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos6_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos6_col#0 debug_print::print_sbyte_pos7/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos7_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos7_col#0 debug_print::print_sbyte_pos8/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos8_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos8_col#0 debug_print::print_sbyte_pos9/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos9_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos9_col#0 debug_print_init::@1/(byte*) print_sbyte_at::at#0 debug_print_init::@16/(byte*) print_sbyte_at::at#1 debug_print_init::@17/(byte*) print_sbyte_at::at#2 ) [105] (signed byte) print_sbyte_at::b#22 ← phi( debug_print::@1/(signed byte) print_sbyte_at::b#16 debug_print::@12/(signed byte) print_sbyte_at::b#17 debug_print::@13/(signed byte) print_sbyte_at::b#18 debug_print::@14/(signed byte) print_sbyte_at::b#19 debug_print::@15/(signed byte) print_sbyte_at::b#20 debug_print::@16/(signed byte) print_sbyte_at::b#21 debug_print::print_sbyte_pos1/(signed byte) print_sbyte_at::b#4 debug_print::print_sbyte_pos10/(signed byte) print_sbyte_at::b#13 debug_print::print_sbyte_pos11/(signed byte) print_sbyte_at::b#14 debug_print::print_sbyte_pos12/(signed byte) print_sbyte_at::b#15 debug_print::print_sbyte_pos2/(signed byte) print_sbyte_at::b#5 debug_print::print_sbyte_pos3/(const signed byte) sz#0 debug_print::print_sbyte_pos4/(signed byte) print_sbyte_at::b#7 debug_print::print_sbyte_pos5/(signed byte) print_sbyte_at::b#8 debug_print::print_sbyte_pos6/(signed byte) print_sbyte_at::b#9 debug_print::print_sbyte_pos7/(signed byte) print_sbyte_at::b#10 debug_print::print_sbyte_pos8/(signed byte) print_sbyte_at::b#11 debug_print::print_sbyte_pos9/(signed byte) print_sbyte_at::b#12 debug_print_init::@1/(signed byte) print_sbyte_at::b#1 debug_print_init::@16/(signed byte) print_sbyte_at::b#2 debug_print_init::@17/(signed byte) print_sbyte_at::b#3 ) @@ -3935,6 +3971,8 @@ print_sbyte_at::@1: scope:[print_sbyte_at] from print_sbyte_at print_sbyte_at::@4: scope:[print_sbyte_at] from print_sbyte_at::@1 [116] (signed byte) print_sbyte_at::b#0 ← - (signed byte) print_sbyte_at::b#22 to:print_sbyte_at::@2 + +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print_sbyte_at::@1 print_sbyte_at::@3 [117] (byte*) print_char_at::at#4 ← phi( print_byte_at/(byte*) print_char_at::at#2 print_byte_at::@1/(byte*) print_char_at::at#3 print_sbyte_at::@1/(byte*) print_char_at::at#0 print_sbyte_at::@3/(byte*) print_char_at::at#1 ) [117] (byte) print_char_at::ch#4 ← phi( print_byte_at/(byte) print_char_at::ch#2 print_byte_at::@1/(byte) print_char_at::ch#3 print_sbyte_at::@1/(byte) '-' print_sbyte_at::@3/(byte) ' ' ) @@ -3943,6 +3981,8 @@ print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print print_char_at::@return: scope:[print_char_at] from print_char_at [119] return to:@return + +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) print_byte_at: scope:[print_byte_at] from print_sbyte_at::@2 [120] (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#0 >> (byte) 4 [121] (byte) print_char_at::ch#2 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$0) @@ -3958,6 +3998,8 @@ print_byte_at::@1: scope:[print_byte_at] from print_byte_at print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@1 [128] return to:@return + +(void()) rotate_matrix((signed byte) rotate_matrix::x , (signed byte) rotate_matrix::y , (signed byte) rotate_matrix::z) rotate_matrix: scope:[rotate_matrix] from anim::@6 [129] *((const signed byte*) xr#0) ← (signed byte) rotate_matrix::x#0 [130] *((const signed byte*) yr#0) ← (signed byte) rotate_matrix::y#0 @@ -3967,12 +4009,16 @@ rotate_matrix: scope:[rotate_matrix] from anim::@6 rotate_matrix::@return: scope:[rotate_matrix] from rotate_matrix [133] return to:@return + +(void()) store_matrix() store_matrix: scope:[store_matrix] from anim::@8 asm { ldarotation_matrix+0 starotate_matrix.A1+1 eor#$ff starotate_matrix.A2+1 ldarotation_matrix+1 starotate_matrix.B1+1 eor#$ff starotate_matrix.B2+1 ldarotation_matrix+2 starotate_matrix.C1+1 eor#$ff starotate_matrix.C2+1 ldarotation_matrix+3 starotate_matrix.D1+1 eor#$ff starotate_matrix.D2+1 ldarotation_matrix+4 starotate_matrix.E1+1 eor#$ff starotate_matrix.E2+1 ldarotation_matrix+5 starotate_matrix.F1+1 eor#$ff starotate_matrix.F2+1 ldarotation_matrix+6 starotate_matrix.G1+1 eor#$ff starotate_matrix.G2+1 ldarotation_matrix+7 starotate_matrix.H1+1 eor#$ff starotate_matrix.H2+1 ldarotation_matrix+8 starotate_matrix.I1+1 eor#$ff starotate_matrix.I2+1 } to:store_matrix::@return store_matrix::@return: scope:[store_matrix] from store_matrix [135] return to:@return + +(void()) calculate_matrix((signed byte) calculate_matrix::sx , (signed byte) calculate_matrix::sy , (signed byte) calculate_matrix::sz) calculate_matrix: scope:[calculate_matrix] from anim::@5 [136] (signed byte) calculate_matrix::t1#0 ← (signed byte) calculate_matrix::sy#0 [137] (signed byte) calculate_matrix::t2#0 ← (signed byte) calculate_matrix::sy#0 @@ -4022,6 +4068,8 @@ calculate_matrix: scope:[calculate_matrix] from anim::@5 calculate_matrix::@return: scope:[calculate_matrix] from calculate_matrix [180] return to:@return + +(void()) debug_print_init() debug_print_init: scope:[debug_print_init] from main::@1 [181] phi() [182] call print_cls @@ -4123,6 +4171,8 @@ debug_print_init::@3: scope:[debug_print_init] from debug_print_init::@2 debug_print_init::@return: scope:[debug_print_init] from debug_print_init::@3 [242] return to:@return + +(void()) print_str_at((byte*) print_str_at::str , (byte*) print_str_at::at) print_str_at: scope:[print_str_at] from debug_print_init::@10 debug_print_init::@11 debug_print_init::@12 debug_print_init::@13 debug_print_init::@14 debug_print_init::@15 debug_print_init::@4 debug_print_init::@5 debug_print_init::@6 debug_print_init::@7 debug_print_init::@8 debug_print_init::@9 [243] (byte*) print_str_at::at#15 ← phi( debug_print_init::@9/(const byte*) SCREEN#0+(word)(number) $28*(number) $12 debug_print_init::@10/(const byte*) SCREEN#0+(word)(number) $28*(number) $13 debug_print_init::@11/(const byte*) SCREEN#0+(word)(number) $28*(number) $14 debug_print_init::@12/(const byte*) SCREEN#0+(word)(number) $28*(number) $15 debug_print_init::@13/(const byte*) SCREEN#0+(word)(number) $28*(number) $16 debug_print_init::@14/(const byte*) SCREEN#0+(word)(number) $28*(number) $17 debug_print_init::@15/(const byte*) SCREEN#0+(word)(number) $28*(number) $18 debug_print_init::@4/(const byte*) SCREEN#0+(byte) $22 debug_print_init::@5/(const byte*) SCREEN#0+(byte)(number) $28*(number) 1+(byte) $22 debug_print_init::@6/(const byte*) SCREEN#0+(byte)(number) $28*(number) 2+(byte) $22 debug_print_init::@7/(const byte*) SCREEN#0+(word)(number) $28*(number) $10 debug_print_init::@8/(const byte*) SCREEN#0+(word)(number) $28*(number) $11 ) [243] (byte*) print_str_at::str#15 ← phi( debug_print_init::@9/(const string) debug_print_init::str5 debug_print_init::@10/(const string) debug_print_init::str6 debug_print_init::@11/(const string) debug_print_init::str7 debug_print_init::@12/(const string) debug_print_init::str8 debug_print_init::@13/(const string) debug_print_init::str9 debug_print_init::@14/(const string) debug_print_init::str10 debug_print_init::@15/(const string) debug_print_init::str11 debug_print_init::@4/(const string) debug_print_init::str debug_print_init::@5/(const string) debug_print_init::str1 debug_print_init::@6/(const string) debug_print_init::str2 debug_print_init::@7/(const string) debug_print_init::str3 debug_print_init::@8/(const string) debug_print_init::str4 ) @@ -4140,6 +4190,8 @@ print_str_at::@2: scope:[print_str_at] from print_str_at::@1 [248] (byte*) print_str_at::at#0 ← ++ (byte*) print_str_at::at#13 [249] (byte*) print_str_at::str#0 ← ++ (byte*) print_str_at::str#13 to:print_str_at::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from debug_print_init [250] phi() [251] call memset @@ -4147,6 +4199,8 @@ print_cls: scope:[print_cls] from debug_print_init print_cls::@return: scope:[print_cls] from print_cls [252] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [253] phi() to:memset::@1 @@ -4161,6 +4215,8 @@ memset::@2: scope:[memset] from memset::@1 [257] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [258] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) sprites_init() sprites_init: scope:[sprites_init] from main [259] *((const byte*) SPRITES_ENABLE#0) ← (byte) $ff to:sprites_init::@1 diff --git a/src/test/ref/examples/3d/perspective.cfg b/src/test/ref/examples/3d/perspective.cfg index 70f5bf5f1..15f24bccd 100644 --- a/src/test/ref/examples/3d/perspective.cfg +++ b/src/test/ref/examples/3d/perspective.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] call mulf_init @@ -23,6 +25,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [11] return to:@return + +(void()) do_perspective((signed byte) do_perspective::x , (signed byte) do_perspective::y , (signed byte) do_perspective::z) do_perspective: scope:[do_perspective] from main::@2 [12] phi() [13] call print_str @@ -78,6 +82,8 @@ do_perspective::@12: scope:[do_perspective] from do_perspective::@11 do_perspective::@return: scope:[do_perspective] from do_perspective::@12 [38] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from do_perspective::@12 [39] phi() to:print_ln::@1 @@ -89,6 +95,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [43] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from do_perspective do_perspective::@11 do_perspective::@2 do_perspective::@4 do_perspective::@6 do_perspective::@9 [44] (byte*) print_char_cursor#74 ← phi( do_perspective/(byte*) 1024 do_perspective::@11/(byte*) print_char_cursor#12 do_perspective::@2/(byte*) print_char_cursor#12 do_perspective::@4/(byte*) print_char_cursor#12 do_perspective::@6/(byte*) print_char_cursor#12 do_perspective::@9/(byte*) print_char_cursor#12 ) [44] (byte*) print_str::str#9 ← phi( do_perspective/(const string) do_perspective::str do_perspective::@11/(const string) do_perspective::str5 do_perspective::@2/(const string) do_perspective::str1 do_perspective::@4/(const string) do_perspective::str1 do_perspective::@6/(const string) do_perspective::str3 do_perspective::@9/(const string) do_perspective::str1 ) @@ -106,6 +114,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [49] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [50] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#7 to:print_str::@1 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from do_perspective::@10 do_perspective::@8 print_sbyte::@2 [51] (byte*) print_char_cursor#69 ← phi( do_perspective::@10/(byte*) print_char_cursor#2 do_perspective::@8/(byte*) print_char_cursor#2 print_sbyte::@2/(byte*) print_char_cursor#12 ) [51] (byte) print_byte::b#3 ← phi( do_perspective::@10/(byte~) print_byte::b#5 do_perspective::@8/(byte~) print_byte::b#6 print_sbyte::@2/(byte) print_byte::b#0 ) @@ -121,6 +131,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [58] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sbyte::@3 [59] (byte*) print_char_cursor#44 ← phi( print_byte/(byte*) print_char_cursor#69 print_byte::@1/(byte*) print_char_cursor#12 print_sbyte::@1/(byte*) print_char_cursor#2 print_sbyte::@3/(byte*) print_char_cursor#2 ) [59] (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sbyte::@1/(byte) '-' print_sbyte::@3/(byte) ' ' ) @@ -130,6 +142,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 p print_char::@return: scope:[print_char] from print_char [62] return to:@return + +(void()) perspective((signed byte) perspective::x , (signed byte) perspective::y , (signed byte) perspective::z) perspective: scope:[perspective] from do_perspective::@7 [63] *((const signed byte*) xr#0) ← (const signed byte) do_perspective::x#0 [64] *((const signed byte*) yr#0) ← (const signed byte) do_perspective::y#0 @@ -139,6 +153,8 @@ perspective: scope:[perspective] from do_perspective::@7 perspective::@return: scope:[perspective] from perspective [67] return to:@return + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from do_perspective::@1 do_perspective::@3 do_perspective::@5 [68] (signed byte) print_sbyte::b#4 ← phi( do_perspective::@1/(const signed byte) do_perspective::x#0 do_perspective::@3/(const signed byte) do_perspective::y#0 do_perspective::@5/(const signed byte) do_perspective::z#0 ) [69] if((signed byte) print_sbyte::b#4<(signed byte) 0) goto print_sbyte::@1 @@ -162,6 +178,8 @@ print_sbyte::@1: scope:[print_sbyte] from print_sbyte print_sbyte::@4: scope:[print_sbyte] from print_sbyte::@1 [78] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#4 to:print_sbyte::@2 + +(void()) print_cls() print_cls: scope:[print_cls] from main::@1 [79] phi() [80] call memset @@ -169,6 +187,8 @@ print_cls: scope:[print_cls] from main::@1 print_cls::@return: scope:[print_cls] from print_cls [81] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [82] phi() to:memset::@1 @@ -183,6 +203,8 @@ memset::@2: scope:[memset] from memset::@1 [86] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [87] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) mulf_init() mulf_init: scope:[mulf_init] from main [88] phi() to:mulf_init::@1 diff --git a/src/test/ref/examples/3d/perspective.log b/src/test/ref/examples/3d/perspective.log index c94784865..7c7f2b574 100644 --- a/src/test/ref/examples/3d/perspective.log +++ b/src/test/ref/examples/3d/perspective.log @@ -73,6 +73,8 @@ Culled Empty Block (label) mulf_init::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@16 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -120,6 +122,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@33 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from do_perspective do_perspective::@11 do_perspective::@2 do_perspective::@4 do_perspective::@6 do_perspective::@9 (byte*) print_char_cursor#74 ← phi( do_perspective/(byte*) print_char_cursor#71 do_perspective::@11/(byte*) print_char_cursor#28 do_perspective::@2/(byte*) print_char_cursor#20 do_perspective::@4/(byte*) print_char_cursor#22 do_perspective::@6/(byte*) print_char_cursor#24 do_perspective::@9/(byte*) print_char_cursor#26 ) (byte*) print_str::str#9 ← phi( do_perspective/(byte*) print_str::str#1 do_perspective::@11/(byte*) print_str::str#6 do_perspective::@2/(byte*) print_str::str#2 do_perspective::@4/(byte*) print_str::str#3 do_perspective::@6/(byte*) print_str::str#4 do_perspective::@9/(byte*) print_str::str#5 ) @@ -142,6 +146,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#34 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from do_perspective::@12 (byte*) print_char_cursor#65 ← phi( do_perspective::@12/(byte*) print_char_cursor#29 ) (byte*) print_line_cursor#21 ← phi( do_perspective::@12/(byte*) print_line_cursor#23 ) @@ -165,6 +171,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#36 return to:@return + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from do_perspective::@1 do_perspective::@3 do_perspective::@5 (byte*) print_char_cursor#75 ← phi( do_perspective::@1/(byte*) print_char_cursor#19 do_perspective::@3/(byte*) print_char_cursor#21 do_perspective::@5/(byte*) print_char_cursor#23 ) (signed byte) print_sbyte::b#4 ← phi( do_perspective::@1/(signed byte) print_sbyte::b#1 do_perspective::@3/(signed byte) print_sbyte::b#2 do_perspective::@5/(signed byte) print_sbyte::b#3 ) @@ -217,6 +225,8 @@ print_sbyte::@return: scope:[print_sbyte] from print_sbyte::@7 (byte*) print_line_cursor#30 ← phi( @16/(byte*) print_line_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $0 to:@40 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from do_perspective::@10 do_perspective::@8 print_sbyte::@2 (byte*) print_char_cursor#69 ← phi( do_perspective::@10/(byte*) print_char_cursor#27 do_perspective::@8/(byte*) print_char_cursor#72 print_sbyte::@2/(byte*) print_char_cursor#68 ) (byte) print_byte::b#3 ← phi( do_perspective::@10/(byte) print_byte::b#2 do_perspective::@8/(byte) print_byte::b#1 print_sbyte::@2/(byte) print_byte::b#0 ) @@ -241,6 +251,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#11 ← (byte*) print_char_cursor#43 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sbyte::@3 (byte*) print_char_cursor#44 ← phi( print_byte/(byte*) print_char_cursor#69 print_byte::@1/(byte*) print_char_cursor#9 print_sbyte::@1/(byte*) print_char_cursor#66 print_sbyte::@3/(byte*) print_char_cursor#67 ) (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sbyte::@1/(byte) print_char::ch#0 print_sbyte::@3/(byte) print_char::ch#1 ) @@ -252,6 +264,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#13 ← (byte*) print_char_cursor#45 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main::@1 (byte*) print_screen#1 ← phi( main::@1/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -282,6 +296,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (word*) psp1#0 ← ((word*)) (number) $f3 (word*) psp2#0 ← ((word*)) (number) $f5 to:@43 + +(void()) main() main: scope:[main] from @44 (byte*) print_char_cursor#76 ← phi( @44/(byte*) print_char_cursor#73 ) (byte*) print_line_cursor#25 ← phi( @44/(byte*) print_line_cursor#24 ) @@ -322,6 +338,8 @@ main::@return: scope:[main] from main::@3 (byte*) print_char_cursor#18 ← (byte*) print_char_cursor#49 return to:@return + +(void()) do_perspective((signed byte) do_perspective::x , (signed byte) do_perspective::y , (signed byte) do_perspective::z) do_perspective: scope:[do_perspective] from main::@2 (byte*) print_line_cursor#40 ← phi( main::@2/(byte*) print_line_cursor#5 ) (signed byte) do_perspective::z#8 ← phi( main::@2/(signed byte) do_perspective::z#0 ) @@ -451,6 +469,8 @@ do_perspective::@return: scope:[do_perspective] from do_perspective::@13 (byte*) print_line_cursor#9 ← (byte*) print_line_cursor#19 return to:@return + +(void()) perspective((signed byte) perspective::x , (signed byte) perspective::y , (signed byte) perspective::z) perspective: scope:[perspective] from do_perspective::@7 (signed byte) perspective::z#1 ← phi( do_perspective::@7/(signed byte) perspective::z#0 ) (signed byte) perspective::y#1 ← phi( do_perspective::@7/(signed byte) perspective::y#0 ) @@ -470,6 +490,8 @@ perspective::@return: scope:[perspective] from perspective (byte[$200]) mulf_sqr1#0 ← { fill( $200, 0) } (byte[$200]) mulf_sqr2#0 ← { fill( $200, 0) } to:@44 + +(void()) mulf_init() mulf_init: scope:[mulf_init] from main (signed word) mulf_init::sqr#0 ← (number) 0 (signed word) mulf_init::add#0 ← (number) 1 @@ -1388,6 +1410,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] call mulf_init @@ -1404,6 +1428,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [11] return to:@return + +(void()) do_perspective((signed byte) do_perspective::x , (signed byte) do_perspective::y , (signed byte) do_perspective::z) do_perspective: scope:[do_perspective] from main::@2 [12] phi() [13] call print_str @@ -1459,6 +1485,8 @@ do_perspective::@12: scope:[do_perspective] from do_perspective::@11 do_perspective::@return: scope:[do_perspective] from do_perspective::@12 [38] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from do_perspective::@12 [39] phi() to:print_ln::@1 @@ -1470,6 +1498,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [43] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from do_perspective do_perspective::@11 do_perspective::@2 do_perspective::@4 do_perspective::@6 do_perspective::@9 [44] (byte*) print_char_cursor#74 ← phi( do_perspective/(byte*) 1024 do_perspective::@11/(byte*) print_char_cursor#12 do_perspective::@2/(byte*) print_char_cursor#12 do_perspective::@4/(byte*) print_char_cursor#12 do_perspective::@6/(byte*) print_char_cursor#12 do_perspective::@9/(byte*) print_char_cursor#12 ) [44] (byte*) print_str::str#9 ← phi( do_perspective/(const string) do_perspective::str do_perspective::@11/(const string) do_perspective::str5 do_perspective::@2/(const string) do_perspective::str1 do_perspective::@4/(const string) do_perspective::str1 do_perspective::@6/(const string) do_perspective::str3 do_perspective::@9/(const string) do_perspective::str1 ) @@ -1487,6 +1517,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [49] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [50] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#7 to:print_str::@1 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from do_perspective::@10 do_perspective::@8 print_sbyte::@2 [51] (byte*) print_char_cursor#69 ← phi( do_perspective::@10/(byte*) print_char_cursor#2 do_perspective::@8/(byte*) print_char_cursor#2 print_sbyte::@2/(byte*) print_char_cursor#12 ) [51] (byte) print_byte::b#3 ← phi( do_perspective::@10/(byte~) print_byte::b#5 do_perspective::@8/(byte~) print_byte::b#6 print_sbyte::@2/(byte) print_byte::b#0 ) @@ -1502,6 +1534,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [58] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sbyte::@3 [59] (byte*) print_char_cursor#44 ← phi( print_byte/(byte*) print_char_cursor#69 print_byte::@1/(byte*) print_char_cursor#12 print_sbyte::@1/(byte*) print_char_cursor#2 print_sbyte::@3/(byte*) print_char_cursor#2 ) [59] (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sbyte::@1/(byte) '-' print_sbyte::@3/(byte) ' ' ) @@ -1511,6 +1545,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 p print_char::@return: scope:[print_char] from print_char [62] return to:@return + +(void()) perspective((signed byte) perspective::x , (signed byte) perspective::y , (signed byte) perspective::z) perspective: scope:[perspective] from do_perspective::@7 [63] *((const signed byte*) xr#0) ← (const signed byte) do_perspective::x#0 [64] *((const signed byte*) yr#0) ← (const signed byte) do_perspective::y#0 @@ -1520,6 +1556,8 @@ perspective: scope:[perspective] from do_perspective::@7 perspective::@return: scope:[perspective] from perspective [67] return to:@return + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from do_perspective::@1 do_perspective::@3 do_perspective::@5 [68] (signed byte) print_sbyte::b#4 ← phi( do_perspective::@1/(const signed byte) do_perspective::x#0 do_perspective::@3/(const signed byte) do_perspective::y#0 do_perspective::@5/(const signed byte) do_perspective::z#0 ) [69] if((signed byte) print_sbyte::b#4<(signed byte) 0) goto print_sbyte::@1 @@ -1543,6 +1581,8 @@ print_sbyte::@1: scope:[print_sbyte] from print_sbyte print_sbyte::@4: scope:[print_sbyte] from print_sbyte::@1 [78] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#4 to:print_sbyte::@2 + +(void()) print_cls() print_cls: scope:[print_cls] from main::@1 [79] phi() [80] call memset @@ -1550,6 +1590,8 @@ print_cls: scope:[print_cls] from main::@1 print_cls::@return: scope:[print_cls] from print_cls [81] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [82] phi() to:memset::@1 @@ -1564,6 +1606,8 @@ memset::@2: scope:[memset] from memset::@1 [86] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [87] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) mulf_init() mulf_init: scope:[mulf_init] from main [88] phi() to:mulf_init::@1 diff --git a/src/test/ref/examples/bresenham/bitmap-bresenham.cfg b/src/test/ref/examples/bresenham/bitmap-bresenham.cfg index ad7a250b5..11fd2eb21 100644 --- a/src/test/ref/examples/bresenham/bitmap-bresenham.cfg +++ b/src/test/ref/examples/bresenham/bitmap-bresenham.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BORDERCOL#0) ← (byte) 0 [5] *((const byte*) BGCOL#0) ← (byte) 0 @@ -26,6 +28,8 @@ main::@1: scope:[main] from main::@1 main::@3 [13] phi() [14] call lines to:main::@1 + +(void()) lines() lines: scope:[lines] from main::@1 [15] phi() to:lines::@1 @@ -46,6 +50,8 @@ lines::@2: scope:[lines] from lines::@1 lines::@3: scope:[lines] from lines::@2 [24] (byte) lines::l#1 ← ++ (byte) lines::l#2 to:lines::@1 + +(void()) bitmap_line((byte) bitmap_line::x0 , (byte) bitmap_line::x1 , (byte) bitmap_line::y0 , (byte) bitmap_line::y1) bitmap_line: scope:[bitmap_line] from lines::@2 [25] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 to:bitmap_line::@2 @@ -140,6 +146,8 @@ bitmap_line::@13: scope:[bitmap_line] from bitmap_line::@11 [85] (byte) bitmap_line_xdyi::yd#1 ← (byte) bitmap_line::yd#11 [86] call bitmap_line_xdyi to:bitmap_line::@return + +(void()) bitmap_line_xdyi((byte) bitmap_line_xdyi::x , (byte) bitmap_line_xdyi::y , (byte) bitmap_line_xdyi::x1 , (byte) bitmap_line_xdyi::xd , (byte) bitmap_line_xdyi::yd) bitmap_line_xdyi: scope:[bitmap_line_xdyi] from bitmap_line::@13 bitmap_line::@8 [87] (byte) bitmap_line_xdyi::x1#6 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::x1#0 bitmap_line::@13/(byte) bitmap_line_xdyi::x1#1 ) [87] (byte) bitmap_line_xdyi::xd#5 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::xd#0 bitmap_line::@13/(byte) bitmap_line_xdyi::xd#1 ) @@ -174,6 +182,8 @@ bitmap_line_xdyi::@2: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@3 bitmap bitmap_line_xdyi::@return: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@2 [101] return to:@return + +(void()) bitmap_plot((byte) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_line_ydxd::@1 bitmap_line_ydxi::@1 [102] (byte) bitmap_plot::y#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::y#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::y#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::y#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::y#2 ) [102] (byte) bitmap_plot::x#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::x#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::x#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::x#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::x#2 ) @@ -186,6 +196,8 @@ bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot [108] return to:@return + +(void()) bitmap_line_ydxi((byte) bitmap_line_ydxi::y , (byte) bitmap_line_ydxi::x , (byte) bitmap_line_ydxi::y1 , (byte) bitmap_line_ydxi::yd , (byte) bitmap_line_ydxi::xd) bitmap_line_ydxi: scope:[bitmap_line_ydxi] from bitmap_line::@14 bitmap_line::@4 [109] (byte) bitmap_line_ydxi::y1#6 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::y1#1 bitmap_line::@4/(byte) bitmap_line_ydxi::y1#0 ) [109] (byte) bitmap_line_ydxi::yd#5 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::yd#1 bitmap_line::@4/(byte) bitmap_line_ydxi::yd#0 ) @@ -220,6 +232,8 @@ bitmap_line_ydxi::@2: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@3 bitmap bitmap_line_ydxi::@return: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@2 [123] return to:@return + +(void()) bitmap_line_xdyd((byte) bitmap_line_xdyd::x , (byte) bitmap_line_xdyd::y , (byte) bitmap_line_xdyd::x1 , (byte) bitmap_line_xdyd::xd , (byte) bitmap_line_xdyd::yd) bitmap_line_xdyd: scope:[bitmap_line_xdyd] from bitmap_line::@12 bitmap_line::@9 [124] (byte) bitmap_line_xdyd::x1#6 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::x1#0 bitmap_line::@12/(byte) bitmap_line_xdyd::x1#1 ) [124] (byte) bitmap_line_xdyd::xd#5 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::xd#0 bitmap_line::@12/(byte) bitmap_line_xdyd::xd#1 ) @@ -254,6 +268,8 @@ bitmap_line_xdyd::@2: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@3 bitmap bitmap_line_xdyd::@return: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@2 [138] return to:@return + +(void()) bitmap_line_ydxd((byte) bitmap_line_ydxd::y , (byte) bitmap_line_ydxd::x , (byte) bitmap_line_ydxd::y1 , (byte) bitmap_line_ydxd::yd , (byte) bitmap_line_ydxd::xd) bitmap_line_ydxd: scope:[bitmap_line_ydxd] from bitmap_line::@10 bitmap_line::@6 [139] (byte) bitmap_line_ydxd::y1#6 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::y1#0 bitmap_line::@6/(byte) bitmap_line_ydxd::y1#1 ) [139] (byte) bitmap_line_ydxd::yd#5 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::yd#0 bitmap_line::@6/(byte) bitmap_line_ydxd::yd#1 ) @@ -288,6 +304,8 @@ bitmap_line_ydxd::@2: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@3 bitmap bitmap_line_ydxd::@return: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@2 [153] return to:@return + +(void()) init_screen() init_screen: scope:[init_screen] from main::@3 [154] phi() to:init_screen::@1 @@ -302,6 +320,8 @@ init_screen::@2: scope:[init_screen] from init_screen::@1 [158] *((byte*) init_screen::c#2) ← (byte) $14 [159] (byte*) init_screen::c#1 ← ++ (byte*) init_screen::c#2 to:init_screen::@1 + +(void()) bitmap_clear() bitmap_clear: scope:[bitmap_clear] from main::@2 [160] (word) bitmap_clear::bitmap#0 ← *((const byte[$100]) bitmap_plot_xhi#0) w= *((const byte[$100]) bitmap_plot_xlo#0) [161] (byte*~) bitmap_clear::bitmap#5 ← (byte*)(word) bitmap_clear::bitmap#0 @@ -325,6 +345,8 @@ bitmap_clear::@3: scope:[bitmap_clear] from bitmap_clear::@2 bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@3 [170] return to:@return + +(void()) bitmap_init((byte*) bitmap_init::bitmap) bitmap_init: scope:[bitmap_init] from main [171] phi() to:bitmap_init::@1 diff --git a/src/test/ref/examples/bresenham/bitmap-bresenham.log b/src/test/ref/examples/bresenham/bitmap-bresenham.log index ac6b14a18..779227f04 100644 --- a/src/test/ref/examples/bresenham/bitmap-bresenham.log +++ b/src/test/ref/examples/bresenham/bitmap-bresenham.log @@ -59,6 +59,8 @@ CONTROL FLOW GRAPH SSA (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } to:@12 + +(void()) bitmap_init((byte*) bitmap_init::bitmap) bitmap_init: scope:[bitmap_init] from main (byte*) bitmap_init::bitmap#2 ← phi( main/(byte*) bitmap_init::bitmap#0 ) (byte) bitmap_init::bits#0 ← (number) $80 @@ -126,6 +128,8 @@ bitmap_init::@7: scope:[bitmap_init] from bitmap_init::@5 bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@6 return to:@return + +(void()) bitmap_clear() bitmap_clear: scope:[bitmap_clear] from main::@3 (byte*~) bitmap_clear::$0 ← ((byte*)) { *((byte[$100]) bitmap_plot_xhi#0 + (number) 0), *((byte[$100]) bitmap_plot_xlo#0 + (number) 0) } (byte*) bitmap_clear::bitmap#0 ← (byte*~) bitmap_clear::$0 @@ -156,6 +160,8 @@ bitmap_clear::@3: scope:[bitmap_clear] from bitmap_clear::@2 bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@3 return to:@return + +(void()) bitmap_plot((byte) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_line_ydxd::@1 bitmap_line_ydxi::@1 (byte) bitmap_plot::y#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::y#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::y#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::y#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::y#2 ) (byte) bitmap_plot::x#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::x#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::x#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::x#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::x#2 ) @@ -169,6 +175,8 @@ bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot return to:@return + +(void()) bitmap_line((byte) bitmap_line::x0 , (byte) bitmap_line::x1 , (byte) bitmap_line::y0 , (byte) bitmap_line::y1) bitmap_line: scope:[bitmap_line] from lines::@2 (byte) bitmap_line::y1#13 ← phi( lines::@2/(byte) bitmap_line::y1#0 ) (byte) bitmap_line::y0#13 ← phi( lines::@2/(byte) bitmap_line::y0#0 ) @@ -366,6 +374,8 @@ bitmap_line::@36: scope:[bitmap_line] from bitmap_line::@27 bitmap_line::@return: scope:[bitmap_line] from bitmap_line::@29 bitmap_line::@30 bitmap_line::@31 bitmap_line::@32 bitmap_line::@33 bitmap_line::@34 bitmap_line::@35 bitmap_line::@36 return to:@return + +(void()) bitmap_line_xdyi((byte) bitmap_line_xdyi::x , (byte) bitmap_line_xdyi::y , (byte) bitmap_line_xdyi::x1 , (byte) bitmap_line_xdyi::xd , (byte) bitmap_line_xdyi::yd) bitmap_line_xdyi: scope:[bitmap_line_xdyi] from bitmap_line::@11 bitmap_line::@25 (byte) bitmap_line_xdyi::x1#6 ← phi( bitmap_line::@11/(byte) bitmap_line_xdyi::x1#0 bitmap_line::@25/(byte) bitmap_line_xdyi::x1#1 ) (byte) bitmap_line_xdyi::xd#5 ← phi( bitmap_line::@11/(byte) bitmap_line_xdyi::xd#0 bitmap_line::@25/(byte) bitmap_line_xdyi::xd#1 ) @@ -425,6 +435,8 @@ bitmap_line_xdyi::@3: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@5 bitmap_line_xdyi::@return: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@2 return to:@return + +(void()) bitmap_line_xdyd((byte) bitmap_line_xdyd::x , (byte) bitmap_line_xdyd::y , (byte) bitmap_line_xdyd::x1 , (byte) bitmap_line_xdyd::xd , (byte) bitmap_line_xdyd::yd) bitmap_line_xdyd: scope:[bitmap_line_xdyd] from bitmap_line::@15 bitmap_line::@21 (byte) bitmap_line_xdyd::x1#6 ← phi( bitmap_line::@15/(byte) bitmap_line_xdyd::x1#0 bitmap_line::@21/(byte) bitmap_line_xdyd::x1#1 ) (byte) bitmap_line_xdyd::xd#5 ← phi( bitmap_line::@15/(byte) bitmap_line_xdyd::xd#0 bitmap_line::@21/(byte) bitmap_line_xdyd::xd#1 ) @@ -484,6 +496,8 @@ bitmap_line_xdyd::@3: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@5 bitmap_line_xdyd::@return: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@2 return to:@return + +(void()) bitmap_line_ydxi((byte) bitmap_line_ydxi::y , (byte) bitmap_line_ydxi::x , (byte) bitmap_line_ydxi::y1 , (byte) bitmap_line_ydxi::yd , (byte) bitmap_line_ydxi::xd) bitmap_line_ydxi: scope:[bitmap_line_ydxi] from bitmap_line::@27 bitmap_line::@5 (byte) bitmap_line_ydxi::y1#6 ← phi( bitmap_line::@27/(byte) bitmap_line_ydxi::y1#1 bitmap_line::@5/(byte) bitmap_line_ydxi::y1#0 ) (byte) bitmap_line_ydxi::yd#5 ← phi( bitmap_line::@27/(byte) bitmap_line_ydxi::yd#1 bitmap_line::@5/(byte) bitmap_line_ydxi::yd#0 ) @@ -543,6 +557,8 @@ bitmap_line_ydxi::@3: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@5 bitmap_line_ydxi::@return: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@2 return to:@return + +(void()) bitmap_line_ydxd((byte) bitmap_line_ydxd::y , (byte) bitmap_line_ydxd::x , (byte) bitmap_line_ydxd::y1 , (byte) bitmap_line_ydxd::yd , (byte) bitmap_line_ydxd::xd) bitmap_line_ydxd: scope:[bitmap_line_ydxd] from bitmap_line::@17 bitmap_line::@8 (byte) bitmap_line_ydxd::y1#6 ← phi( bitmap_line::@17/(byte) bitmap_line_ydxd::y1#0 bitmap_line::@8/(byte) bitmap_line_ydxd::y1#1 ) (byte) bitmap_line_ydxd::yd#5 ← phi( bitmap_line::@17/(byte) bitmap_line_ydxd::yd#0 bitmap_line::@8/(byte) bitmap_line_ydxd::yd#1 ) @@ -610,6 +626,8 @@ bitmap_line_ydxd::@return: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@2 (byte[]) lines_y#0 ← { (number) $a, (number) $28, (number) $3c, (number) $50, (number) $6e, (number) $50, (number) $3c, (number) $28, (number) $a } (byte) lines_cnt#0 ← (number) 8 to:@15 + +(void()) main() main: scope:[main] from @15 *((byte*) BORDERCOL#0) ← (number) 0 *((byte*) BGCOL#0) ← (number) 0 @@ -646,6 +664,8 @@ main::@6: scope:[main] from main::@1 main::@return: scope:[main] from main::@6 return to:@return + +(void()) lines() lines: scope:[lines] from main::@1 (byte) lines::l#0 ← (number) 0 to:lines::@1 @@ -671,6 +691,8 @@ lines::@7: scope:[lines] from lines::@2 lines::@return: scope:[lines] from lines::@1 return to:@return + +(void()) init_screen() init_screen: scope:[init_screen] from main::@4 (byte*) init_screen::c#0 ← (byte*) SCREEN#0 to:init_screen::@1 @@ -1982,6 +2004,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BORDERCOL#0) ← (byte) 0 [5] *((const byte*) BGCOL#0) ← (byte) 0 @@ -2001,6 +2025,8 @@ main::@1: scope:[main] from main::@1 main::@3 [13] phi() [14] call lines to:main::@1 + +(void()) lines() lines: scope:[lines] from main::@1 [15] phi() to:lines::@1 @@ -2021,6 +2047,8 @@ lines::@2: scope:[lines] from lines::@1 lines::@3: scope:[lines] from lines::@2 [24] (byte) lines::l#1 ← ++ (byte) lines::l#2 to:lines::@1 + +(void()) bitmap_line((byte) bitmap_line::x0 , (byte) bitmap_line::x1 , (byte) bitmap_line::y0 , (byte) bitmap_line::y1) bitmap_line: scope:[bitmap_line] from lines::@2 [25] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 to:bitmap_line::@2 @@ -2115,6 +2143,8 @@ bitmap_line::@13: scope:[bitmap_line] from bitmap_line::@11 [85] (byte) bitmap_line_xdyi::yd#1 ← (byte) bitmap_line::yd#11 [86] call bitmap_line_xdyi to:bitmap_line::@return + +(void()) bitmap_line_xdyi((byte) bitmap_line_xdyi::x , (byte) bitmap_line_xdyi::y , (byte) bitmap_line_xdyi::x1 , (byte) bitmap_line_xdyi::xd , (byte) bitmap_line_xdyi::yd) bitmap_line_xdyi: scope:[bitmap_line_xdyi] from bitmap_line::@13 bitmap_line::@8 [87] (byte) bitmap_line_xdyi::x1#6 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::x1#0 bitmap_line::@13/(byte) bitmap_line_xdyi::x1#1 ) [87] (byte) bitmap_line_xdyi::xd#5 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::xd#0 bitmap_line::@13/(byte) bitmap_line_xdyi::xd#1 ) @@ -2149,6 +2179,8 @@ bitmap_line_xdyi::@2: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@3 bitmap bitmap_line_xdyi::@return: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@2 [101] return to:@return + +(void()) bitmap_plot((byte) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_line_ydxd::@1 bitmap_line_ydxi::@1 [102] (byte) bitmap_plot::y#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::y#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::y#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::y#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::y#2 ) [102] (byte) bitmap_plot::x#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::x#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::x#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::x#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::x#2 ) @@ -2161,6 +2193,8 @@ bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot [108] return to:@return + +(void()) bitmap_line_ydxi((byte) bitmap_line_ydxi::y , (byte) bitmap_line_ydxi::x , (byte) bitmap_line_ydxi::y1 , (byte) bitmap_line_ydxi::yd , (byte) bitmap_line_ydxi::xd) bitmap_line_ydxi: scope:[bitmap_line_ydxi] from bitmap_line::@14 bitmap_line::@4 [109] (byte) bitmap_line_ydxi::y1#6 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::y1#1 bitmap_line::@4/(byte) bitmap_line_ydxi::y1#0 ) [109] (byte) bitmap_line_ydxi::yd#5 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::yd#1 bitmap_line::@4/(byte) bitmap_line_ydxi::yd#0 ) @@ -2195,6 +2229,8 @@ bitmap_line_ydxi::@2: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@3 bitmap bitmap_line_ydxi::@return: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@2 [123] return to:@return + +(void()) bitmap_line_xdyd((byte) bitmap_line_xdyd::x , (byte) bitmap_line_xdyd::y , (byte) bitmap_line_xdyd::x1 , (byte) bitmap_line_xdyd::xd , (byte) bitmap_line_xdyd::yd) bitmap_line_xdyd: scope:[bitmap_line_xdyd] from bitmap_line::@12 bitmap_line::@9 [124] (byte) bitmap_line_xdyd::x1#6 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::x1#0 bitmap_line::@12/(byte) bitmap_line_xdyd::x1#1 ) [124] (byte) bitmap_line_xdyd::xd#5 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::xd#0 bitmap_line::@12/(byte) bitmap_line_xdyd::xd#1 ) @@ -2229,6 +2265,8 @@ bitmap_line_xdyd::@2: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@3 bitmap bitmap_line_xdyd::@return: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@2 [138] return to:@return + +(void()) bitmap_line_ydxd((byte) bitmap_line_ydxd::y , (byte) bitmap_line_ydxd::x , (byte) bitmap_line_ydxd::y1 , (byte) bitmap_line_ydxd::yd , (byte) bitmap_line_ydxd::xd) bitmap_line_ydxd: scope:[bitmap_line_ydxd] from bitmap_line::@10 bitmap_line::@6 [139] (byte) bitmap_line_ydxd::y1#6 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::y1#0 bitmap_line::@6/(byte) bitmap_line_ydxd::y1#1 ) [139] (byte) bitmap_line_ydxd::yd#5 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::yd#0 bitmap_line::@6/(byte) bitmap_line_ydxd::yd#1 ) @@ -2263,6 +2301,8 @@ bitmap_line_ydxd::@2: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@3 bitmap bitmap_line_ydxd::@return: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@2 [153] return to:@return + +(void()) init_screen() init_screen: scope:[init_screen] from main::@3 [154] phi() to:init_screen::@1 @@ -2277,6 +2317,8 @@ init_screen::@2: scope:[init_screen] from init_screen::@1 [158] *((byte*) init_screen::c#2) ← (byte) $14 [159] (byte*) init_screen::c#1 ← ++ (byte*) init_screen::c#2 to:init_screen::@1 + +(void()) bitmap_clear() bitmap_clear: scope:[bitmap_clear] from main::@2 [160] (word) bitmap_clear::bitmap#0 ← *((const byte[$100]) bitmap_plot_xhi#0) w= *((const byte[$100]) bitmap_plot_xlo#0) [161] (byte*~) bitmap_clear::bitmap#5 ← (byte*)(word) bitmap_clear::bitmap#0 @@ -2300,6 +2342,8 @@ bitmap_clear::@3: scope:[bitmap_clear] from bitmap_clear::@2 bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@3 [170] return to:@return + +(void()) bitmap_init((byte*) bitmap_init::bitmap) bitmap_init: scope:[bitmap_init] from main [171] phi() to:bitmap_init::@1 diff --git a/src/test/ref/examples/chargen/chargen-analysis.cfg b/src/test/ref/examples/chargen/chargen-analysis.cfg index 36028904e..7c754ce25 100644 --- a/src/test/ref/examples/chargen/chargen-analysis.cfg +++ b/src/test/ref/examples/chargen/chargen-analysis.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -138,6 +140,8 @@ main::@2: scope:[main] from main::@1 [69] *((byte*) main::sc#2) ← (byte) ' ' [70] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 to:main::@1 + +(void()) plot_chargen((byte) plot_chargen::pos , (byte) plot_chargen::ch , (byte) plot_chargen::shift) plot_chargen: scope:[plot_chargen] from main::@16 main::@4 [71] (byte) plot_chargen::pos#2 ← phi( main::@16/(byte) plot_chargen::pos#1 main::@4/(byte) plot_chargen::pos#0 ) [71] (byte) plot_chargen::shift#2 ← phi( main::@16/(byte) plot_chargen::shift#1 main::@4/(byte) 0 ) @@ -197,6 +201,8 @@ plot_chargen::@8: scope:[plot_chargen] from plot_chargen::@7 plot_chargen::@return: scope:[plot_chargen] from plot_chargen::@8 [102] return to:@return + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from plot_chargen::@1 [103] phi() to:mul8u::@1 @@ -221,6 +227,8 @@ mul8u::@3: scope:[mul8u] from mul8u::@2 mul8u::@4 [111] (byte) mul8u::a#0 ← (byte) mul8u::a#2 >> (byte) 1 [112] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 to:mul8u::@1 + +(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key) keyboard_key_pressed: scope:[keyboard_key_pressed] from main::@15 main::@5 main::@6 main::@7 main::@8 main::@9 [113] (byte) keyboard_key_pressed::key#6 ← phi( main::@6/(const byte) KEY_F3#0 main::@7/(const byte) KEY_F5#0 main::@8/(const byte) KEY_F7#0 main::@9/(const byte) KEY_LSHIFT#0 main::@15/(byte) keyboard_key_pressed::key#5 main::@5/(const byte) KEY_F1#0 ) [114] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#6 & (byte) 7 @@ -236,6 +244,8 @@ keyboard_key_pressed::@1: scope:[keyboard_key_pressed] from keyboard_key_presse keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@1 [121] return to:@return + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed [122] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [123] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) @@ -243,12 +253,16 @@ keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read [124] return to:@return + +(byte()) keyboard_get_keycode((byte) keyboard_get_keycode::ch) keyboard_get_keycode: scope:[keyboard_get_keycode] from main::@12 [125] (byte) keyboard_get_keycode::return#0 ← *((const byte[]) keyboard_char_keycodes#0 + (byte) keyboard_get_keycode::ch#0) to:keyboard_get_keycode::@return keyboard_get_keycode::@return: scope:[keyboard_get_keycode] from keyboard_get_keycode [126] return to:@return + +(void()) print_str_at((byte*) print_str_at::str , (byte*) print_str_at::at) print_str_at: scope:[print_str_at] from main::@17 main::@18 main::@19 main::@3 [127] (byte*) print_str_at::at#7 ← phi( main::@17/(const byte*) SCREEN#0+(byte) 1+(byte) $a main::@3/(const byte*) SCREEN#0+(byte) 1 main::@18/(const byte*) SCREEN#0+(byte) 1+(byte) $14 main::@19/(const byte*) SCREEN#0+(byte) 1+(byte) $1e ) [127] (byte*) print_str_at::str#7 ← phi( main::@17/(const string) main::str1 main::@3/(const string) main::str main::@18/(const string) main::str2 main::@19/(const string) main::str3 ) diff --git a/src/test/ref/examples/chargen/chargen-analysis.log b/src/test/ref/examples/chargen/chargen-analysis.log index 2d0b97664..d21f151f3 100644 --- a/src/test/ref/examples/chargen/chargen-analysis.log +++ b/src/test/ref/examples/chargen/chargen-analysis.log @@ -41,6 +41,8 @@ CONTROL FLOW GRAPH SSA (byte*) CIA1_PORT_A#0 ← ((byte*)) (number) $dc00 (byte*) CIA1_PORT_B#0 ← ((byte*)) (number) $dc01 to:@9 + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from plot_chargen::@1 (byte) mul8u::a#5 ← phi( plot_chargen::@1/(byte) mul8u::a#1 ) (byte) mul8u::b#1 ← phi( plot_chargen::@1/(byte) mul8u::b#0 ) @@ -148,6 +150,8 @@ mul8u::@return: scope:[mul8u] from mul8u::@3 (byte[8]) keyboard_matrix_row_bitmask#0 ← { (number) $fe, (number) $fd, (number) $fb, (number) $f7, (number) $ef, (number) $df, (number) $bf, (number) $7f } (byte[8]) keyboard_matrix_col_bitmask#0 ← { (number) 1, (number) 2, (number) 4, (number) 8, (number) $10, (number) $20, (number) $40, (number) $80 } to:@16 + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed (byte) keyboard_matrix_read::rowid#1 ← phi( keyboard_key_pressed/(byte) keyboard_matrix_read::rowid#0 ) *((byte*) CIA1_PORT_A#0) ← *((byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#1) @@ -160,6 +164,8 @@ keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matri (byte) keyboard_matrix_read::return#1 ← (byte) keyboard_matrix_read::return#3 return to:@return + +(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key) keyboard_key_pressed: scope:[keyboard_key_pressed] from main::@10 main::@11 main::@12 main::@13 main::@19 main::@9 (byte) keyboard_key_pressed::key#6 ← phi( main::@10/(byte) keyboard_key_pressed::key#1 main::@11/(byte) keyboard_key_pressed::key#2 main::@12/(byte) keyboard_key_pressed::key#3 main::@13/(byte) keyboard_key_pressed::key#4 main::@19/(byte) keyboard_key_pressed::key#5 main::@9/(byte) keyboard_key_pressed::key#0 ) (number~) keyboard_key_pressed::$0 ← (byte) keyboard_key_pressed::key#6 & (number) 7 @@ -182,6 +188,8 @@ keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_p (byte) keyboard_key_pressed::return#1 ← (byte) keyboard_key_pressed::return#8 return to:@return + +(byte()) keyboard_get_keycode((byte) keyboard_get_keycode::ch) keyboard_get_keycode: scope:[keyboard_get_keycode] from main::@16 (byte) keyboard_get_keycode::ch#1 ← phi( main::@16/(byte) keyboard_get_keycode::ch#0 ) (byte) keyboard_get_keycode::return#0 ← *((byte[]) keyboard_char_keycodes#0 + (byte) keyboard_get_keycode::ch#1) @@ -194,6 +202,8 @@ keyboard_get_keycode::@return: scope:[keyboard_get_keycode] from keyboard_get_k @16: scope:[] from @9 (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@19 + +(void()) main() main: scope:[main] from @19 (byte*) main::sc#0 ← (byte*) SCREEN#0 to:main::@1 @@ -425,6 +435,8 @@ main::@21: scope:[main] from main::@18 main::@return: scope:[main] from main::@21 return to:@return + +(void()) print_str_at((byte*) print_str_at::str , (byte*) print_str_at::at) print_str_at: scope:[print_str_at] from main::@29 main::@3 main::@30 main::@31 (byte*) print_str_at::at#7 ← phi( main::@29/(byte*) print_str_at::at#1 main::@3/(byte*) print_str_at::at#0 main::@30/(byte*) print_str_at::at#2 main::@31/(byte*) print_str_at::at#3 ) (byte*) print_str_at::str#7 ← phi( main::@29/(byte*) print_str_at::str#1 main::@3/(byte*) print_str_at::str#0 main::@30/(byte*) print_str_at::str#2 main::@31/(byte*) print_str_at::str#3 ) @@ -445,6 +457,8 @@ print_str_at::@2: scope:[print_str_at] from print_str_at::@1 print_str_at::@return: scope:[print_str_at] from print_str_at::@1 return to:@return + +(void()) plot_chargen((byte) plot_chargen::pos , (byte) plot_chargen::ch , (byte) plot_chargen::shift) plot_chargen: scope:[plot_chargen] from main::@20 main::@7 (byte) plot_chargen::pos#3 ← phi( main::@20/(byte) plot_chargen::pos#1 main::@7/(byte) plot_chargen::pos#0 ) (byte) plot_chargen::shift#2 ← phi( main::@20/(byte) plot_chargen::shift#1 main::@7/(byte) plot_chargen::shift#0 ) @@ -1964,6 +1978,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -2095,6 +2111,8 @@ main::@2: scope:[main] from main::@1 [69] *((byte*) main::sc#2) ← (byte) ' ' [70] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 to:main::@1 + +(void()) plot_chargen((byte) plot_chargen::pos , (byte) plot_chargen::ch , (byte) plot_chargen::shift) plot_chargen: scope:[plot_chargen] from main::@16 main::@4 [71] (byte) plot_chargen::pos#2 ← phi( main::@16/(byte) plot_chargen::pos#1 main::@4/(byte) plot_chargen::pos#0 ) [71] (byte) plot_chargen::shift#2 ← phi( main::@16/(byte) plot_chargen::shift#1 main::@4/(byte) 0 ) @@ -2154,6 +2172,8 @@ plot_chargen::@8: scope:[plot_chargen] from plot_chargen::@7 plot_chargen::@return: scope:[plot_chargen] from plot_chargen::@8 [102] return to:@return + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from plot_chargen::@1 [103] phi() to:mul8u::@1 @@ -2178,6 +2198,8 @@ mul8u::@3: scope:[mul8u] from mul8u::@2 mul8u::@4 [111] (byte) mul8u::a#0 ← (byte) mul8u::a#2 >> (byte) 1 [112] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 to:mul8u::@1 + +(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key) keyboard_key_pressed: scope:[keyboard_key_pressed] from main::@15 main::@5 main::@6 main::@7 main::@8 main::@9 [113] (byte) keyboard_key_pressed::key#6 ← phi( main::@6/(const byte) KEY_F3#0 main::@7/(const byte) KEY_F5#0 main::@8/(const byte) KEY_F7#0 main::@9/(const byte) KEY_LSHIFT#0 main::@15/(byte) keyboard_key_pressed::key#5 main::@5/(const byte) KEY_F1#0 ) [114] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#6 & (byte) 7 @@ -2193,6 +2215,8 @@ keyboard_key_pressed::@1: scope:[keyboard_key_pressed] from keyboard_key_presse keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@1 [121] return to:@return + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed [122] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [123] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) @@ -2200,12 +2224,16 @@ keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read [124] return to:@return + +(byte()) keyboard_get_keycode((byte) keyboard_get_keycode::ch) keyboard_get_keycode: scope:[keyboard_get_keycode] from main::@12 [125] (byte) keyboard_get_keycode::return#0 ← *((const byte[]) keyboard_char_keycodes#0 + (byte) keyboard_get_keycode::ch#0) to:keyboard_get_keycode::@return keyboard_get_keycode::@return: scope:[keyboard_get_keycode] from keyboard_get_keycode [126] return to:@return + +(void()) print_str_at((byte*) print_str_at::str , (byte*) print_str_at::at) print_str_at: scope:[print_str_at] from main::@17 main::@18 main::@19 main::@3 [127] (byte*) print_str_at::at#7 ← phi( main::@17/(const byte*) SCREEN#0+(byte) 1+(byte) $a main::@3/(const byte*) SCREEN#0+(byte) 1 main::@18/(const byte*) SCREEN#0+(byte) 1+(byte) $14 main::@19/(const byte*) SCREEN#0+(byte) 1+(byte) $1e ) [127] (byte*) print_str_at::str#7 ← phi( main::@17/(const string) main::str1 main::@3/(const string) main::str main::@18/(const string) main::str2 main::@19/(const string) main::str3 ) diff --git a/src/test/ref/examples/fastmultiply/fastmultiply8.cfg b/src/test/ref/examples/fastmultiply/fastmultiply8.cfg index 823c38209..7ccdac39f 100644 --- a/src/test/ref/examples/fastmultiply/fastmultiply8.cfg +++ b/src/test/ref/examples/fastmultiply/fastmultiply8.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call init_screen @@ -60,6 +62,8 @@ main::@4: scope:[main] from main::@8 main::@return: scope:[main] from main::@4 [33] return to:@return + +(void()) print_sbyte_at((signed byte) print_sbyte_at::b , (byte*) print_sbyte_at::at) print_sbyte_at: scope:[print_sbyte_at] from main::@1 main::@2 main::@7 [34] (byte*) print_sbyte_at::at#3 ← phi( main::@1/(byte*) print_sbyte_at::at#0 main::@7/(byte*) print_sbyte_at::at#2 main::@2/(byte*) print_sbyte_at::at#1 ) [34] (signed byte) print_sbyte_at::b#4 ← phi( main::@1/(signed byte) print_sbyte_at::b#1 main::@7/(signed byte) print_sbyte_at::b#3 main::@2/(signed byte) print_sbyte_at::b#2 ) @@ -85,6 +89,8 @@ print_sbyte_at::@1: scope:[print_sbyte_at] from print_sbyte_at print_sbyte_at::@4: scope:[print_sbyte_at] from print_sbyte_at::@1 [45] (signed byte) print_sbyte_at::b#0 ← - (signed byte) print_sbyte_at::b#4 to:print_sbyte_at::@2 + +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print_sbyte_at::@1 print_sbyte_at::@3 [46] (byte*) print_char_at::at#4 ← phi( print_byte_at/(byte*) print_char_at::at#2 print_byte_at::@1/(byte*) print_char_at::at#3 print_sbyte_at::@1/(byte*) print_char_at::at#0 print_sbyte_at::@3/(byte*) print_char_at::at#1 ) [46] (byte) print_char_at::ch#4 ← phi( print_byte_at/(byte) print_char_at::ch#2 print_byte_at::@1/(byte) print_char_at::ch#3 print_sbyte_at::@1/(byte) '-' print_sbyte_at::@3/(byte) ' ' ) @@ -93,6 +99,8 @@ print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print print_char_at::@return: scope:[print_char_at] from print_char_at [48] return to:@return + +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) print_byte_at: scope:[print_byte_at] from print_sbyte_at::@2 [49] (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#0 >> (byte) 4 [50] (byte) print_char_at::ch#2 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$0) @@ -108,6 +116,8 @@ print_byte_at::@1: scope:[print_byte_at] from print_byte_at print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@1 [57] return to:@return + +(signed byte()) fmul8((signed byte) fmul8::a , (signed byte) fmul8::b) fmul8: scope:[fmul8] from main::@3 [58] *((const signed byte*) ap#0) ← (signed byte) fmul8::a#0 [59] *((const signed byte*) bp#0) ← (signed byte) fmul8::b#0 @@ -117,6 +127,8 @@ fmul8: scope:[fmul8] from main::@3 fmul8::@return: scope:[fmul8] from fmul8 [62] return to:@return + +(void()) init_screen() init_screen: scope:[init_screen] from main [63] phi() [64] call print_cls @@ -141,6 +153,8 @@ init_screen::@2: scope:[init_screen] from init_screen::@1 init_screen::@2 init_screen::@return: scope:[init_screen] from init_screen::@2 [77] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from init_screen [78] phi() [79] call memset @@ -148,6 +162,8 @@ print_cls: scope:[print_cls] from init_screen print_cls::@return: scope:[print_cls] from print_cls [80] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [81] phi() to:memset::@1 diff --git a/src/test/ref/examples/fastmultiply/fastmultiply8.log b/src/test/ref/examples/fastmultiply/fastmultiply8.log index 151f8a9c8..c0691e07f 100644 --- a/src/test/ref/examples/fastmultiply/fastmultiply8.log +++ b/src/test/ref/examples/fastmultiply/fastmultiply8.log @@ -63,6 +63,8 @@ Culled Empty Block (label) fmul8::@1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@12 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -108,6 +110,8 @@ memset::@return: scope:[memset] from memset::@1 @12: scope:[] from @begin (byte*) print_screen#0 ← ((byte*)) (number) $400 to:@29 + +(void()) print_sbyte_at((signed byte) print_sbyte_at::b , (byte*) print_sbyte_at::at) print_sbyte_at: scope:[print_sbyte_at] from main::@1 main::@10 main::@3 (byte*) print_sbyte_at::at#6 ← phi( main::@1/(byte*) print_sbyte_at::at#0 main::@10/(byte*) print_sbyte_at::at#2 main::@3/(byte*) print_sbyte_at::at#1 ) (signed byte) print_sbyte_at::b#4 ← phi( main::@1/(signed byte) print_sbyte_at::b#1 main::@10/(signed byte) print_sbyte_at::b#3 main::@3/(signed byte) print_sbyte_at::b#2 ) @@ -156,6 +160,8 @@ print_sbyte_at::@return: scope:[print_sbyte_at] from print_sbyte_at::@7 (byte*) print_screen#7 ← phi( @12/(byte*) print_screen#0 ) (byte[]) print_hextab#0 ← (const string) $0 to:@36 + +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) print_byte_at: scope:[print_byte_at] from print_sbyte_at::@2 (byte*) print_byte_at::at#1 ← phi( print_sbyte_at::@2/(byte*) print_byte_at::at#0 ) (byte) print_byte_at::b#1 ← phi( print_sbyte_at::@2/(byte) print_byte_at::b#0 ) @@ -178,6 +184,8 @@ print_byte_at::@2: scope:[print_byte_at] from print_byte_at::@1 print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@2 return to:@return + +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print_sbyte_at::@1 print_sbyte_at::@3 (byte*) print_char_at::at#4 ← phi( print_byte_at/(byte*) print_char_at::at#2 print_byte_at::@1/(byte*) print_char_at::at#3 print_sbyte_at::@1/(byte*) print_char_at::at#0 print_sbyte_at::@3/(byte*) print_char_at::at#1 ) (byte) print_char_at::ch#4 ← phi( print_byte_at/(byte) print_char_at::ch#2 print_byte_at::@1/(byte) print_char_at::ch#3 print_sbyte_at::@1/(byte) print_char_at::ch#0 print_sbyte_at::@3/(byte) print_char_at::ch#1 ) @@ -186,6 +194,8 @@ print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print print_char_at::@return: scope:[print_char_at] from print_char_at return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from init_screen (byte*) print_screen#1 ← phi( init_screen/(byte*) print_screen#2 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -203,6 +213,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte*) print_screen#6 ← phi( @29/(byte*) print_screen#7 ) (signed byte[]) vals#0 ← { (number) -$5f, (number) -$40, (number) -$20, (number) -$10, (number) 0, (number) $10, (number) $20, (number) $40, (number) $5f } to:@38 + +(void()) main() main: scope:[main] from @39 (byte*) print_screen#3 ← phi( @39/(byte*) print_screen#4 ) call init_screen @@ -291,6 +303,8 @@ main::@5: scope:[main] from main::@11 main::@return: scope:[main] from main::@5 return to:@return + +(void()) init_screen() init_screen: scope:[init_screen] from main (byte*) print_screen#2 ← phi( main/(byte*) print_screen#3 ) call print_cls @@ -333,6 +347,8 @@ init_screen::@return: scope:[init_screen] from init_screen::@3 (signed byte*) bp#0 ← ((signed byte*)) (number) $fe (signed byte*) cp#0 ← ((signed byte*)) (number) $ff to:@39 + +(signed byte()) fmul8((signed byte) fmul8::a , (signed byte) fmul8::b) fmul8: scope:[fmul8] from main::@4 (signed byte) fmul8::b#1 ← phi( main::@4/(signed byte) fmul8::b#0 ) (signed byte) fmul8::a#1 ← phi( main::@4/(signed byte) fmul8::a#0 ) @@ -982,6 +998,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call init_screen @@ -1035,6 +1053,8 @@ main::@4: scope:[main] from main::@8 main::@return: scope:[main] from main::@4 [33] return to:@return + +(void()) print_sbyte_at((signed byte) print_sbyte_at::b , (byte*) print_sbyte_at::at) print_sbyte_at: scope:[print_sbyte_at] from main::@1 main::@2 main::@7 [34] (byte*) print_sbyte_at::at#3 ← phi( main::@1/(byte*) print_sbyte_at::at#0 main::@7/(byte*) print_sbyte_at::at#2 main::@2/(byte*) print_sbyte_at::at#1 ) [34] (signed byte) print_sbyte_at::b#4 ← phi( main::@1/(signed byte) print_sbyte_at::b#1 main::@7/(signed byte) print_sbyte_at::b#3 main::@2/(signed byte) print_sbyte_at::b#2 ) @@ -1060,6 +1080,8 @@ print_sbyte_at::@1: scope:[print_sbyte_at] from print_sbyte_at print_sbyte_at::@4: scope:[print_sbyte_at] from print_sbyte_at::@1 [45] (signed byte) print_sbyte_at::b#0 ← - (signed byte) print_sbyte_at::b#4 to:print_sbyte_at::@2 + +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print_sbyte_at::@1 print_sbyte_at::@3 [46] (byte*) print_char_at::at#4 ← phi( print_byte_at/(byte*) print_char_at::at#2 print_byte_at::@1/(byte*) print_char_at::at#3 print_sbyte_at::@1/(byte*) print_char_at::at#0 print_sbyte_at::@3/(byte*) print_char_at::at#1 ) [46] (byte) print_char_at::ch#4 ← phi( print_byte_at/(byte) print_char_at::ch#2 print_byte_at::@1/(byte) print_char_at::ch#3 print_sbyte_at::@1/(byte) '-' print_sbyte_at::@3/(byte) ' ' ) @@ -1068,6 +1090,8 @@ print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print print_char_at::@return: scope:[print_char_at] from print_char_at [48] return to:@return + +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) print_byte_at: scope:[print_byte_at] from print_sbyte_at::@2 [49] (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#0 >> (byte) 4 [50] (byte) print_char_at::ch#2 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$0) @@ -1083,6 +1107,8 @@ print_byte_at::@1: scope:[print_byte_at] from print_byte_at print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@1 [57] return to:@return + +(signed byte()) fmul8((signed byte) fmul8::a , (signed byte) fmul8::b) fmul8: scope:[fmul8] from main::@3 [58] *((const signed byte*) ap#0) ← (signed byte) fmul8::a#0 [59] *((const signed byte*) bp#0) ← (signed byte) fmul8::b#0 @@ -1092,6 +1118,8 @@ fmul8: scope:[fmul8] from main::@3 fmul8::@return: scope:[fmul8] from fmul8 [62] return to:@return + +(void()) init_screen() init_screen: scope:[init_screen] from main [63] phi() [64] call print_cls @@ -1116,6 +1144,8 @@ init_screen::@2: scope:[init_screen] from init_screen::@1 init_screen::@2 init_screen::@return: scope:[init_screen] from init_screen::@2 [77] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from init_screen [78] phi() [79] call memset @@ -1123,6 +1153,8 @@ print_cls: scope:[print_cls] from init_screen print_cls::@return: scope:[print_cls] from print_cls [80] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [81] phi() to:memset::@1 diff --git a/src/test/ref/examples/fire/fire.cfg b/src/test/ref/examples/fire/fire.cfg index 955330f43..6ae5ca6ad 100644 --- a/src/test/ref/examples/fire/fire.cfg +++ b/src/test/ref/examples/fire/fire.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 @@ -50,6 +52,8 @@ main::toD0182: scope:[main] from main::@2 main::@3: scope:[main] from main::toD0182 [24] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 to:main::@1 + +(void()) fire((byte*) fire::screenbase) fire: scope:[fire] from main::@1 main::@2 [25] (byte*) fire::screen#0 ← phi( main::@1/(const byte*) SCREEN1#0 main::@2/(const byte*) SCREEN2#0 ) [26] (byte*~) fire::screen#11 ← (byte*) fire::screen#0 @@ -101,12 +105,16 @@ fire::@4: scope:[fire] from fire::@2 fire::@5 [52] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#4 [53] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#4 to:fire::@1 + +(byte()) sid_rnd() sid_rnd: scope:[sid_rnd] from fire::@7 [54] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) to:sid_rnd::@return sid_rnd::@return: scope:[sid_rnd] from sid_rnd [55] return to:@return + +(void()) makecharset((byte*) makecharset::charset) makecharset: scope:[makecharset] from main::@8 [56] phi() to:makecharset::@1 @@ -171,6 +179,8 @@ makecharset::@2: scope:[makecharset] from makecharset::@1 [86] *((byte*) makecharset::font#2) ← (byte) 0 [87] (byte*) makecharset::font#1 ← ++ (byte*) makecharset::font#2 to:makecharset::@1 + +(void()) sid_rnd_init() sid_rnd_init: scope:[sid_rnd_init] from main::@7 [88] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff [89] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 @@ -178,6 +188,8 @@ sid_rnd_init: scope:[sid_rnd_init] from main::@7 sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init [90] return to:@return + +(void()) fillscreen((byte*) fillscreen::screen , (byte) fillscreen::fill) fillscreen: scope:[fillscreen] from main main::@4 main::@5 main::@6 [91] (byte*) fillscreen::screen#6 ← phi( main/(const byte*) BUFFER#0 main::@5/(const byte*) SCREEN2#0 main::@6/(const byte*) COLS#0 main::@4/(const byte*) SCREEN1#0 ) [91] (byte) fillscreen::fill#5 ← phi( main/(byte) 0 main::@5/(byte) 0 main::@6/(const byte) YELLOW#0 main::@4/(byte) 0 ) diff --git a/src/test/ref/examples/fire/fire.log b/src/test/ref/examples/fire/fire.log index 049758af1..bdb50a3da 100644 --- a/src/test/ref/examples/fire/fire.log +++ b/src/test/ref/examples/fire/fire.log @@ -59,6 +59,8 @@ CONTROL FLOW GRAPH SSA (byte) SID_CONTROL_NOISE#0 ← (number) $80 (byte*) SID_VOICE3_OSC#0 ← ((byte*)) (number) $d41b to:@6 + +(void()) sid_rnd_init() sid_rnd_init: scope:[sid_rnd_init] from main::@12 *((word*) SID_VOICE3_FREQ#0) ← (number) $ffff *((byte*) SID_VOICE3_CONTROL#0) ← (byte) SID_CONTROL_NOISE#0 @@ -66,6 +68,8 @@ sid_rnd_init: scope:[sid_rnd_init] from main::@12 sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init return to:@return + +(byte()) sid_rnd() sid_rnd: scope:[sid_rnd] from fire::@10 (byte) sid_rnd::return#0 ← *((byte*) SID_VOICE3_OSC#0) to:sid_rnd::@return @@ -80,6 +84,8 @@ sid_rnd::@return: scope:[sid_rnd] from sid_rnd (byte*) BUFFER#0 ← ((byte*)) (number) $4000 (byte*) CHARSET#0 ← ((byte*)) (number) $3000 to:@10 + +(void()) main() main: scope:[main] from @10 asm { sei } *((byte*) BORDERCOL#0) ← (byte) BLACK#0 @@ -178,6 +184,8 @@ main::@8: scope:[main] from main::toD0182_@return main::@return: scope:[main] from main::@1 return to:@return + +(void()) fire((byte*) fire::screenbase) fire: scope:[fire] from main::@2 main::@7 (byte*) fire::screenbase#2 ← phi( main::@2/(byte*) fire::screenbase#0 main::@7/(byte*) fire::screenbase#1 ) (byte*) fire::screen#0 ← (byte*) fire::screenbase#2 @@ -256,6 +264,8 @@ fire::@15: scope:[fire] from fire::@10 fire::@return: scope:[fire] from fire::@9 return to:@return + +(void()) makecharset((byte*) makecharset::charset) makecharset: scope:[makecharset] from main::@13 (byte*) makecharset::charset#1 ← phi( main::@13/(byte*) makecharset::charset#0 ) (byte[8]) makecharset::bittab#0 ← { (number) 1, (number) 2, (number) 4, (number) 8, (number) $10, (number) $20, (number) $40, (number) $80 } @@ -390,6 +400,8 @@ makecharset::@25: scope:[makecharset] from makecharset::@20 makecharset::@return: scope:[makecharset] from makecharset::@13 return to:@return + +(void()) fillscreen((byte*) fillscreen::screen , (byte) fillscreen::fill) fillscreen: scope:[fillscreen] from main main::@10 main::@11 main::@9 (byte*) fillscreen::screen#6 ← phi( main/(byte*) fillscreen::screen#0 main::@10/(byte*) fillscreen::screen#2 main::@11/(byte*) fillscreen::screen#3 main::@9/(byte*) fillscreen::screen#1 ) (byte) fillscreen::fill#5 ← phi( main/(byte) fillscreen::fill#0 main::@10/(byte) fillscreen::fill#2 main::@11/(byte) fillscreen::fill#3 main::@9/(byte) fillscreen::fill#1 ) @@ -1345,6 +1357,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 @@ -1388,6 +1402,8 @@ main::toD0182: scope:[main] from main::@2 main::@3: scope:[main] from main::toD0182 [24] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 to:main::@1 + +(void()) fire((byte*) fire::screenbase) fire: scope:[fire] from main::@1 main::@2 [25] (byte*) fire::screen#0 ← phi( main::@1/(const byte*) SCREEN1#0 main::@2/(const byte*) SCREEN2#0 ) [26] (byte*~) fire::screen#11 ← (byte*) fire::screen#0 @@ -1439,12 +1455,16 @@ fire::@4: scope:[fire] from fire::@2 fire::@5 [52] (byte*) fire::screen#2 ← ++ (byte*) fire::screen#4 [53] (byte*) fire::buffer#2 ← ++ (byte*) fire::buffer#4 to:fire::@1 + +(byte()) sid_rnd() sid_rnd: scope:[sid_rnd] from fire::@7 [54] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) to:sid_rnd::@return sid_rnd::@return: scope:[sid_rnd] from sid_rnd [55] return to:@return + +(void()) makecharset((byte*) makecharset::charset) makecharset: scope:[makecharset] from main::@8 [56] phi() to:makecharset::@1 @@ -1509,6 +1529,8 @@ makecharset::@2: scope:[makecharset] from makecharset::@1 [86] *((byte*) makecharset::font#2) ← (byte) 0 [87] (byte*) makecharset::font#1 ← ++ (byte*) makecharset::font#2 to:makecharset::@1 + +(void()) sid_rnd_init() sid_rnd_init: scope:[sid_rnd_init] from main::@7 [88] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff [89] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 @@ -1516,6 +1538,8 @@ sid_rnd_init: scope:[sid_rnd_init] from main::@7 sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init [90] return to:@return + +(void()) fillscreen((byte*) fillscreen::screen , (byte) fillscreen::fill) fillscreen: scope:[fillscreen] from main main::@4 main::@5 main::@6 [91] (byte*) fillscreen::screen#6 ← phi( main/(const byte*) BUFFER#0 main::@5/(const byte*) SCREEN2#0 main::@6/(const byte*) COLS#0 main::@4/(const byte*) SCREEN1#0 ) [91] (byte) fillscreen::fill#5 ← phi( main/(byte) 0 main::@5/(byte) 0 main::@6/(const byte) YELLOW#0 main::@4/(byte) 0 ) diff --git a/src/test/ref/examples/helloworld/helloworld.cfg b/src/test/ref/examples/helloworld/helloworld.cfg index a327aad75..cece9fe7d 100644 --- a/src/test/ref/examples/helloworld/helloworld.cfg +++ b/src/test/ref/examples/helloworld/helloworld.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_str @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from main::@1 [9] phi() to:print_ln::@1 @@ -29,6 +33,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [13] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main [14] phi() to:print_str::@1 diff --git a/src/test/ref/examples/helloworld/helloworld.log b/src/test/ref/examples/helloworld/helloworld.log index 735b9dd8c..3f2ad2d1e 100644 --- a/src/test/ref/examples/helloworld/helloworld.log +++ b/src/test/ref/examples/helloworld/helloworld.log @@ -58,6 +58,8 @@ CONTROL FLOW GRAPH SSA (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@37 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main (byte*) print_char_cursor#21 ← phi( main/(byte*) print_char_cursor#19 ) (byte*) print_str::str#4 ← phi( main/(byte*) print_str::str#1 ) @@ -80,6 +82,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#10 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from main::@1 (byte*) print_char_cursor#18 ← phi( main::@1/(byte*) print_char_cursor#5 ) (byte*) print_line_cursor#12 ← phi( main::@1/(byte*) print_line_cursor#13 ) @@ -103,6 +107,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#12 return to:@return + +(void()) main() main: scope:[main] from @37 (byte*) print_line_cursor#15 ← phi( @37/(byte*) print_line_cursor#14 ) (byte*) print_char_cursor#19 ← phi( @37/(byte*) print_char_cursor#20 ) @@ -308,6 +314,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_str @@ -319,6 +327,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from main::@1 [9] phi() to:print_ln::@1 @@ -330,6 +340,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [13] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main [14] phi() to:print_str::@1 diff --git a/src/test/ref/examples/irq/irq-hyperscreen.cfg b/src/test/ref/examples/irq/irq-hyperscreen.cfg index 37ae4c0bb..c94931f72 100644 --- a/src/test/ref/examples/irq/irq-hyperscreen.cfg +++ b/src/test/ref/examples/irq/irq-hyperscreen.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) GHOST_BYTE#0) ← (byte) 0 asm { sei } @@ -20,6 +22,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [12] return to:@return + +interrupt(KERNEL_KEYBOARD)(void()) irq_bottom_2() irq_bottom_2: scope:[irq_bottom_2] from [13] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 [14] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (const byte) VIC_RSEL#0 @@ -31,6 +35,8 @@ irq_bottom_2: scope:[irq_bottom_2] from irq_bottom_2::@return: scope:[irq_bottom_2] from irq_bottom_2 [19] return to:@return + +interrupt(KERNEL_MIN)(void()) irq_bottom_1() irq_bottom_1: scope:[irq_bottom_1] from [20] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 [21] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $ff^(const byte) VIC_RSEL#0 diff --git a/src/test/ref/examples/irq/irq-hyperscreen.log b/src/test/ref/examples/irq/irq-hyperscreen.log index 1252e3ebf..4cebf2ee3 100644 --- a/src/test/ref/examples/irq/irq-hyperscreen.log +++ b/src/test/ref/examples/irq/irq-hyperscreen.log @@ -25,6 +25,8 @@ CONTROL FLOW GRAPH SSA @4: scope:[] from @begin (byte*) GHOST_BYTE#0 ← ((byte*)) (number) $3fff to:@7 + +(void()) main() main: scope:[main] from @7 *((byte*) GHOST_BYTE#0) ← (number) 0 asm { sei } @@ -39,6 +41,8 @@ main: scope:[main] from @7 main::@return: scope:[main] from main return to:@return + +interrupt(KERNEL_MIN)(void()) irq_bottom_1() irq_bottom_1: scope:[irq_bottom_1] from *((byte*) BORDERCOL#0) ← (byte) WHITE#0 (number~) irq_bottom_1::$0 ← (number) $ff ^ (byte) VIC_RSEL#0 @@ -52,6 +56,8 @@ irq_bottom_1: scope:[irq_bottom_1] from irq_bottom_1::@return: scope:[irq_bottom_1] from irq_bottom_1 return to:@return + +interrupt(KERNEL_KEYBOARD)(void()) irq_bottom_2() irq_bottom_2: scope:[irq_bottom_2] from *((byte*) BORDERCOL#0) ← (byte) WHITE#0 *((byte*) VIC_CONTROL#0) ← *((byte*) VIC_CONTROL#0) | (byte) VIC_RSEL#0 @@ -235,6 +241,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) GHOST_BYTE#0) ← (byte) 0 asm { sei } @@ -248,6 +256,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [12] return to:@return + +interrupt(KERNEL_KEYBOARD)(void()) irq_bottom_2() irq_bottom_2: scope:[irq_bottom_2] from [13] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 [14] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (const byte) VIC_RSEL#0 @@ -259,6 +269,8 @@ irq_bottom_2: scope:[irq_bottom_2] from irq_bottom_2::@return: scope:[irq_bottom_2] from irq_bottom_2 [19] return to:@return + +interrupt(KERNEL_MIN)(void()) irq_bottom_1() irq_bottom_1: scope:[irq_bottom_1] from [20] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 [21] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $ff^(const byte) VIC_RSEL#0 diff --git a/src/test/ref/examples/linking/linking.cfg b/src/test/ref/examples/linking/linking.cfg index 7565f53c5..0335c8c3d 100644 --- a/src/test/ref/examples/linking/linking.cfg +++ b/src/test/ref/examples/linking/linking.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -23,6 +25,8 @@ main::@2: scope:[main] from main::@1 main::@3 main::@3: scope:[main] from main::@2 [11] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) to:main::@2 + +(void()) fillscreen((byte) fillscreen::c) fillscreen: scope:[fillscreen] from main::@2 [12] phi() to:fillscreen::@1 diff --git a/src/test/ref/examples/linking/linking.log b/src/test/ref/examples/linking/linking.log index fd3facfe1..33b67fb87 100644 --- a/src/test/ref/examples/linking/linking.log +++ b/src/test/ref/examples/linking/linking.log @@ -17,6 +17,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) BGCOL#0 ← ((byte*)) (number) $d021 to:@1 + +(void()) main() main: scope:[main] from @2 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -43,6 +45,8 @@ main::@return: scope:[main] from main::@3 @1: scope:[] from @begin (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@2 + +(void()) fillscreen((byte) fillscreen::c) fillscreen: scope:[fillscreen] from main::@4 (byte) fillscreen::c#3 ← phi( main::@4/(byte) fillscreen::c#0 ) (byte) fillscreen::i#0 ← (number) 0 @@ -222,6 +226,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -238,6 +244,8 @@ main::@2: scope:[main] from main::@1 main::@3 main::@3: scope:[main] from main::@2 [11] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) to:main::@2 + +(void()) fillscreen((byte) fillscreen::c) fillscreen: scope:[fillscreen] from main::@2 [12] phi() to:fillscreen::@1 diff --git a/src/test/ref/examples/multiplexer/simple-multiplexer.cfg b/src/test/ref/examples/multiplexer/simple-multiplexer.cfg index d3ae360e0..19375989f 100644 --- a/src/test/ref/examples/multiplexer/simple-multiplexer.cfg +++ b/src/test/ref/examples/multiplexer/simple-multiplexer.cfg @@ -14,6 +14,8 @@ to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 asm { sei } [6] call init @@ -25,6 +27,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [9] return to:@return + +(void()) loop() loop: scope:[loop] from main::@1 [10] phi() to:loop::@1 @@ -83,6 +87,8 @@ loop::@12: scope:[loop] from loop::@9 loop::@10: scope:[loop] from loop::@12 [34] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 to:loop::@1 + +(void()) plexShowSprite() plexShowSprite: scope:[plexShowSprite] from loop::@9 [35] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#42 << (byte) 1 [36] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte[PLEX_COUNT#0]) PLEX_YPOS#0 + *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plex_show_idx#42)) @@ -124,6 +130,8 @@ plexShowSprite::@return: scope:[plexShowSprite] from plexShowSprite::@2 plexSho plexShowSprite::@1: scope:[plexShowSprite] from plexShowSprite::@4 [59] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) plex_sprite_msb#42 to:plexShowSprite::@2 + +(void()) plexSort() plexSort: scope:[plexSort] from loop::@5 [60] phi() to:plexSort::@1 @@ -165,6 +173,8 @@ plexSort::plexFreePrepare1_@1: scope:[plexSort] from plexSort::plexFreePrepare1 plexSort::@return: scope:[plexSort] from plexSort::plexFreePrepare1_@1 [80] return to:@return + +(void()) init() init: scope:[init] from main [81] *((const byte*) D011#0) ← (const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [82] call plexInit @@ -191,6 +201,8 @@ init::@3: scope:[init] from init::@2 init::@3 init::@return: scope:[init] from init::@3 [95] return to:@return + +(void()) plexInit((byte*) plexInit::screen) plexInit: scope:[plexInit] from init [96] phi() to:plexInit::plexSetScreen1 diff --git a/src/test/ref/examples/multiplexer/simple-multiplexer.log b/src/test/ref/examples/multiplexer/simple-multiplexer.log index 37735d74e..fcac08112 100644 --- a/src/test/ref/examples/multiplexer/simple-multiplexer.log +++ b/src/test/ref/examples/multiplexer/simple-multiplexer.log @@ -73,6 +73,8 @@ CONTROL FLOW GRAPH SSA (byte) plex_sprite_idx#0 ← (number) 0 (byte) plex_sprite_msb#0 ← (number) 1 to:@9 + +(void()) plexInit((byte*) plexInit::screen) plexInit: scope:[plexInit] from init (byte*) plexInit::screen#1 ← phi( init/(byte*) plexInit::screen#0 ) (byte*) plexInit::plexSetScreen1_screen#0 ← (byte*) plexInit::screen#1 @@ -100,6 +102,8 @@ plexInit::@return: scope:[plexInit] from plexInit::@1 (byte*) PLEX_SCREEN_PTR#2 ← (byte*) PLEX_SCREEN_PTR#8 return to:@return + +(void()) plexSort() plexSort: scope:[plexSort] from loop::@11 (number~) plexSort::$1 ← (byte) PLEX_COUNT#0 - (number) 2 (byte) plexSort::m#0 ← (byte) 0 @@ -183,6 +187,8 @@ plexSort::@return: scope:[plexSort] from plexSort::plexFreePrepare1_@2 (byte) plex_free_next#1 ← (byte) plex_free_next#11 return to:@return + +(void()) plexShowSprite() plexShowSprite: scope:[plexShowSprite] from loop::@21 (byte) plex_sprite_msb#39 ← phi( loop::@21/(byte) plex_sprite_msb#27 ) (byte*) PLEX_SCREEN_PTR#23 ← phi( loop::@21/(byte*) PLEX_SCREEN_PTR#26 ) @@ -300,6 +306,8 @@ plexShowSprite::@return: scope:[plexShowSprite] from plexShowSprite::@2 plexSho .byte pic.getSinglecolorByte(x,y) }} to:@15 + +(void()) main() main: scope:[main] from @15 (byte) plex_free_next#32 ← phi( @15/(byte) plex_free_next#29 ) (byte) plex_sprite_msb#32 ← phi( @15/(byte) plex_sprite_msb#29 ) @@ -342,6 +350,8 @@ main::@return: scope:[main] from main::@2 (byte) plex_free_next#6 ← (byte) plex_free_next#15 return to:@return + +(void()) init() init: scope:[init] from main (byte*) PLEX_SCREEN_PTR#19 ← phi( main/(byte*) PLEX_SCREEN_PTR#17 ) (byte~) init::$0 ← (byte) VIC_DEN#0 | (byte) VIC_RSEL#0 @@ -389,6 +399,8 @@ init::@return: scope:[init] from init::@3 (byte*) PLEX_SCREEN_PTR#6 ← (byte*) PLEX_SCREEN_PTR#13 return to:@return + +(void()) loop() loop: scope:[loop] from main::@1 (byte*) PLEX_SCREEN_PTR#43 ← phi( main::@1/(byte*) PLEX_SCREEN_PTR#3 ) (byte) plex_free_next#33 ← phi( main::@1/(byte) plex_free_next#24 ) @@ -1858,6 +1870,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 asm { sei } [6] call init @@ -1869,6 +1883,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [9] return to:@return + +(void()) loop() loop: scope:[loop] from main::@1 [10] phi() to:loop::@1 @@ -1927,6 +1943,8 @@ loop::@12: scope:[loop] from loop::@9 loop::@10: scope:[loop] from loop::@12 [34] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 to:loop::@1 + +(void()) plexShowSprite() plexShowSprite: scope:[plexShowSprite] from loop::@9 [35] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#42 << (byte) 1 [36] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte[PLEX_COUNT#0]) PLEX_YPOS#0 + *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plex_show_idx#42)) @@ -1968,6 +1986,8 @@ plexShowSprite::@return: scope:[plexShowSprite] from plexShowSprite::@2 plexSho plexShowSprite::@1: scope:[plexShowSprite] from plexShowSprite::@4 [59] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) plex_sprite_msb#42 to:plexShowSprite::@2 + +(void()) plexSort() plexSort: scope:[plexSort] from loop::@5 [60] phi() to:plexSort::@1 @@ -2009,6 +2029,8 @@ plexSort::plexFreePrepare1_@1: scope:[plexSort] from plexSort::plexFreePrepare1 plexSort::@return: scope:[plexSort] from plexSort::plexFreePrepare1_@1 [80] return to:@return + +(void()) init() init: scope:[init] from main [81] *((const byte*) D011#0) ← (const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [82] call plexInit @@ -2035,6 +2057,8 @@ init::@3: scope:[init] from init::@2 init::@3 init::@return: scope:[init] from init::@3 [95] return to:@return + +(void()) plexInit((byte*) plexInit::screen) plexInit: scope:[plexInit] from init [96] phi() to:plexInit::plexSetScreen1 diff --git a/src/test/ref/examples/music/music.cfg b/src/test/ref/examples/music/music.cfg index 5c9911001..077eb36ba 100644 --- a/src/test/ref/examples/music/music.cfg +++ b/src/test/ref/examples/music/music.cfg @@ -13,6 +13,8 @@ to:@end @end: scope:[] from @2 [5] phi() + +(void()) main() main: scope:[main] from @2 asm { jsrmusic.init } to:main::@1 diff --git a/src/test/ref/examples/music/music.log b/src/test/ref/examples/music/music.log index a9bdeb02e..a5f8434e3 100644 --- a/src/test/ref/examples/music/music.log +++ b/src/test/ref/examples/music/music.log @@ -17,6 +17,8 @@ CONTROL FLOW GRAPH SSA kickasm(location (byte*) MUSIC#0) {{ .fill music.size, music.getData(i) }} to:@5 + +(void()) main() main: scope:[main] from @5 asm { jsrmusic.init } to:main::@2 @@ -115,6 +117,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @2 [5] phi() + +(void()) main() main: scope:[main] from @2 asm { jsrmusic.init } to:main::@1 diff --git a/src/test/ref/examples/music/music_irq.cfg b/src/test/ref/examples/music/music_irq.cfg index 3cc22359f..9cd723a96 100644 --- a/src/test/ref/examples/music/music_irq.cfg +++ b/src/test/ref/examples/music/music_irq.cfg @@ -13,6 +13,8 @@ to:@end @end: scope:[] from @2 [5] phi() + +(void()) main() main: scope:[main] from @2 asm { sei jsrmusic.init } [7] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 @@ -25,6 +27,8 @@ main: scope:[main] from @2 main::@return: scope:[main] from main [13] return to:@return + +interrupt(KERNEL_KEYBOARD)(void()) irq_play() irq_play: scope:[irq_play] from [14] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) asm { jsrmusic.play } diff --git a/src/test/ref/examples/music/music_irq.log b/src/test/ref/examples/music/music_irq.log index 78c4515bf..31d4c4769 100644 --- a/src/test/ref/examples/music/music_irq.log +++ b/src/test/ref/examples/music/music_irq.log @@ -24,6 +24,8 @@ CONTROL FLOW GRAPH SSA kickasm(location (byte*) MUSIC#0) {{ .fill music.size, music.getData(i) }} to:@6 + +(void()) main() main: scope:[main] from @6 asm { sei jsrmusic.init } *((byte*) CIA1_INTERRUPT#0) ← (byte) CIA_INTERRUPT_CLEAR#0 @@ -37,6 +39,8 @@ main: scope:[main] from @6 main::@return: scope:[main] from main return to:@return + +interrupt(KERNEL_KEYBOARD)(void()) irq_play() irq_play: scope:[irq_play] from *((byte*) BORDERCOL#0) ← ++ *((byte*) BORDERCOL#0) asm { jsrmusic.play } @@ -168,6 +172,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @2 [5] phi() + +(void()) main() main: scope:[main] from @2 asm { sei jsrmusic.init } [7] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 @@ -180,6 +186,8 @@ main: scope:[main] from @2 main::@return: scope:[main] from main [13] return to:@return + +interrupt(KERNEL_KEYBOARD)(void()) irq_play() irq_play: scope:[irq_play] from [14] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) asm { jsrmusic.play } diff --git a/src/test/ref/examples/nmisamples/nmisamples.cfg b/src/test/ref/examples/nmisamples/nmisamples.cfg index 39c231315..7b5df93cc 100644 --- a/src/test/ref/examples/nmisamples/nmisamples.cfg +++ b/src/test/ref/examples/nmisamples/nmisamples.cfg @@ -10,6 +10,8 @@ to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 asm { lda#$ff sta$d406 sta$d40d sta$d414 lda#$49 sta$d404 sta$d40b sta$d412 } asm { sei } @@ -23,6 +25,8 @@ main: scope:[main] from @2 main::@return: scope:[main] from main [13] return to:@return + +interrupt(HARDWARE_ALL)(void()) nmi2() nmi2: scope:[nmi2] from [14] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) asm { ldaCIA2_INTERRUPT } @@ -43,6 +47,8 @@ nmi2::@1: scope:[nmi2] from nmi2 nmi2::@2 nmi2::@return: scope:[nmi2] from nmi2::@1 [25] return to:@return + +interrupt(HARDWARE_ALL)(void()) nmi() nmi: scope:[nmi] from [26] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) asm { ldaCIA2_INTERRUPT } diff --git a/src/test/ref/examples/nmisamples/nmisamples.log b/src/test/ref/examples/nmisamples/nmisamples.log index 4d7f66860..dd0df760d 100644 --- a/src/test/ref/examples/nmisamples/nmisamples.log +++ b/src/test/ref/examples/nmisamples/nmisamples.log @@ -22,6 +22,8 @@ CONTROL FLOW GRAPH SSA (byte[SAMPLE_SIZE#0]) SAMPLE#0 ← kickasm {{ .import binary "moments_sample.bin" }} (byte*) sample#0 ← (byte[SAMPLE_SIZE#0]) SAMPLE#0 to:@7 + +(void()) main() main: scope:[main] from @7 asm { lda#$ff sta$d406 sta$d40d sta$d414 lda#$49 sta$d404 sta$d40b sta$d412 } asm { sei } @@ -36,6 +38,8 @@ main: scope:[main] from @7 main::@return: scope:[main] from main return to:@return + +interrupt(HARDWARE_ALL)(void()) nmi() nmi: scope:[nmi] from (byte*) sample#4 ← phi( @7/(byte*) sample#7 ) *((byte*) BORDERCOL#0) ← ++ *((byte*) BORDERCOL#0) @@ -49,6 +53,8 @@ nmi: scope:[nmi] from nmi::@return: scope:[nmi] from nmi return to:@return + +interrupt(HARDWARE_ALL)(void()) nmi2() nmi2: scope:[nmi2] from (byte*) sample#5 ← phi( @7/(byte*) sample#7 ) *((byte*) BORDERCOL#0) ← ++ *((byte*) BORDERCOL#0) @@ -261,6 +267,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 asm { lda#$ff sta$d406 sta$d40d sta$d414 lda#$49 sta$d404 sta$d40b sta$d412 } asm { sei } @@ -274,6 +282,8 @@ main: scope:[main] from @2 main::@return: scope:[main] from main [13] return to:@return + +interrupt(HARDWARE_ALL)(void()) nmi2() nmi2: scope:[nmi2] from [14] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) asm { ldaCIA2_INTERRUPT } @@ -294,6 +304,8 @@ nmi2::@1: scope:[nmi2] from nmi2 nmi2::@2 nmi2::@return: scope:[nmi2] from nmi2::@1 [25] return to:@return + +interrupt(HARDWARE_ALL)(void()) nmi() nmi: scope:[nmi] from [26] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) asm { ldaCIA2_INTERRUPT } diff --git a/src/test/ref/examples/plasma/plasma-unroll.cfg b/src/test/ref/examples/plasma/plasma-unroll.cfg index 1af469af3..5d8d363ee 100644 --- a/src/test/ref/examples/plasma/plasma-unroll.cfg +++ b/src/test/ref/examples/plasma/plasma-unroll.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) BORDERCOL#0) ← (const byte) BLUE#0 @@ -38,6 +40,8 @@ main::@4: scope:[main] from main::@3 [16] phi() [17] call doplasma to:main::@3 + +(void()) doplasma((byte*) doplasma::screen) doplasma: scope:[doplasma] from main::@4 [18] (byte) doplasma::c1a#0 ← (byte) c1A#1 [19] (byte) doplasma::c1b#0 ← (byte) c1B#1 @@ -194,6 +198,8 @@ doplasma::@2: scope:[doplasma] from doplasma::@1 [95] (byte) doplasma::i#1 ← ++ (byte) doplasma::i#2 [96] (byte~) doplasma::yprev#4 ← (byte) doplasma::yval#0 to:doplasma::@1 + +(void()) makecharset((byte*) makecharset::charset) makecharset: scope:[makecharset] from main::@2 [97] phi() [98] call sid_rnd_init @@ -259,12 +265,16 @@ makecharset::@8: scope:[makecharset] from makecharset::@13 makecharset::@9 [128] (byte) makecharset::b#6 ← phi( makecharset::@9/(byte) makecharset::b#1 makecharset::@13/(byte) makecharset::b#2 ) [129] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2 to:makecharset::@5 + +(byte()) sid_rnd() sid_rnd: scope:[sid_rnd] from makecharset::@6 [130] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) to:sid_rnd::@return sid_rnd::@return: scope:[sid_rnd] from sid_rnd [131] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from makecharset::@10 [132] *((byte*) print_char_cursor#18) ← (const byte) print_char::ch#0 [133] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#18 @@ -272,6 +282,8 @@ print_char: scope:[print_char] from makecharset::@10 print_char::@return: scope:[print_char] from print_char [134] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from makecharset::@12 [135] phi() [136] call memset @@ -279,6 +291,8 @@ print_cls: scope:[print_cls] from makecharset::@12 print_cls::@return: scope:[print_cls] from print_cls [137] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [138] phi() to:memset::@1 @@ -293,6 +307,8 @@ memset::@2: scope:[memset] from memset::@1 [142] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [143] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) sid_rnd_init() sid_rnd_init: scope:[sid_rnd_init] from makecharset [144] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff [145] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 diff --git a/src/test/ref/examples/plasma/plasma-unroll.log b/src/test/ref/examples/plasma/plasma-unroll.log index b443f6fba..c7264420c 100644 --- a/src/test/ref/examples/plasma/plasma-unroll.log +++ b/src/test/ref/examples/plasma/plasma-unroll.log @@ -96,6 +96,8 @@ CONTROL FLOW GRAPH SSA (byte) BLACK#0 ← (number) 0 (byte) BLUE#0 ← (number) 6 to:@16 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -143,6 +145,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@40 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from makecharset::@18 (byte*) print_char_cursor#11 ← phi( makecharset::@18/(byte*) print_char_cursor#20 ) (byte) print_char::ch#1 ← phi( makecharset::@18/(byte) print_char::ch#0 ) @@ -154,6 +158,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#12 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from makecharset::@23 (byte*) print_screen#1 ← phi( makecharset::@23/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -183,6 +189,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte) SID_CONTROL_NOISE#0 ← (number) $80 (byte*) SID_VOICE3_OSC#0 ← ((byte*)) (number) $d41b to:@42 + +(void()) sid_rnd_init() sid_rnd_init: scope:[sid_rnd_init] from makecharset *((word*) SID_VOICE3_FREQ#0) ← (number) $ffff *((byte*) SID_VOICE3_CONTROL#0) ← (byte) SID_CONTROL_NOISE#0 @@ -190,6 +198,8 @@ sid_rnd_init: scope:[sid_rnd_init] from makecharset sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init return to:@return + +(byte()) sid_rnd() sid_rnd: scope:[sid_rnd] from makecharset::@8 (byte) sid_rnd::return#0 ← *((byte*) SID_VOICE3_OSC#0) to:sid_rnd::@return @@ -208,6 +218,8 @@ sid_rnd::@return: scope:[sid_rnd] from sid_rnd .byte round(127.5+127.5*sin(toRadians(360*i/256))) }} to:@43 + +(void()) main() main: scope:[main] from @45 (byte) c2B#31 ← phi( @45/(byte) c2B#17 ) (byte) c2A#31 ← phi( @45/(byte) c2A#17 ) @@ -355,6 +367,8 @@ main::@return: scope:[main] from main::@3 (byte) c2A#2 ← (number) 0 (byte) c2B#2 ← (number) 0 to:@45 + +(void()) doplasma((byte*) doplasma::screen) doplasma: scope:[doplasma] from main::@4 (byte*) doplasma::screen#11 ← phi( main::@4/(byte*) doplasma::screen#0 ) (byte) c2B#19 ← phi( main::@4/(byte) c2B#12 ) @@ -516,6 +530,8 @@ doplasma::@return: scope:[doplasma] from doplasma::@13 (byte) c2B#4 ← (byte) c2B#10 return to:@return + +(void()) makecharset((byte*) makecharset::charset) makecharset: scope:[makecharset] from main::@2 (byte*) makecharset::charset#16 ← phi( main::@2/(byte*) makecharset::charset#0 ) (byte*) print_char_cursor#29 ← phi( main::@2/(byte*) print_char_cursor#21 ) @@ -2743,6 +2759,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) BORDERCOL#0) ← (const byte) BLUE#0 @@ -2774,6 +2792,8 @@ main::@4: scope:[main] from main::@3 [16] phi() [17] call doplasma to:main::@3 + +(void()) doplasma((byte*) doplasma::screen) doplasma: scope:[doplasma] from main::@4 [18] (byte) doplasma::c1a#0 ← (byte) c1A#1 [19] (byte) doplasma::c1b#0 ← (byte) c1B#1 @@ -2930,6 +2950,8 @@ doplasma::@2: scope:[doplasma] from doplasma::@1 [95] (byte) doplasma::i#1 ← ++ (byte) doplasma::i#2 [96] (byte~) doplasma::yprev#4 ← (byte) doplasma::yval#0 to:doplasma::@1 + +(void()) makecharset((byte*) makecharset::charset) makecharset: scope:[makecharset] from main::@2 [97] phi() [98] call sid_rnd_init @@ -2995,12 +3017,16 @@ makecharset::@8: scope:[makecharset] from makecharset::@13 makecharset::@9 [128] (byte) makecharset::b#6 ← phi( makecharset::@9/(byte) makecharset::b#1 makecharset::@13/(byte) makecharset::b#2 ) [129] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2 to:makecharset::@5 + +(byte()) sid_rnd() sid_rnd: scope:[sid_rnd] from makecharset::@6 [130] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) to:sid_rnd::@return sid_rnd::@return: scope:[sid_rnd] from sid_rnd [131] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from makecharset::@10 [132] *((byte*) print_char_cursor#18) ← (const byte) print_char::ch#0 [133] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#18 @@ -3008,6 +3034,8 @@ print_char: scope:[print_char] from makecharset::@10 print_char::@return: scope:[print_char] from print_char [134] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from makecharset::@12 [135] phi() [136] call memset @@ -3015,6 +3043,8 @@ print_cls: scope:[print_cls] from makecharset::@12 print_cls::@return: scope:[print_cls] from print_cls [137] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [138] phi() to:memset::@1 @@ -3029,6 +3059,8 @@ memset::@2: scope:[memset] from memset::@1 [142] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [143] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) sid_rnd_init() sid_rnd_init: scope:[sid_rnd_init] from makecharset [144] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff [145] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 diff --git a/src/test/ref/examples/plasma/plasma.cfg b/src/test/ref/examples/plasma/plasma.cfg index 087a575be..cfe562841 100644 --- a/src/test/ref/examples/plasma/plasma.cfg +++ b/src/test/ref/examples/plasma/plasma.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) BORDERCOL#0) ← (const byte) BLUE#0 @@ -45,6 +47,8 @@ main::toD0182: scope:[main] from main::@5 main::@6: scope:[main] from main::toD0182 [20] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 to:main::@3 + +(void()) doplasma((byte*) doplasma::screen) doplasma: scope:[doplasma] from main::@4 main::@5 [21] (byte*) doplasma::screen#13 ← phi( main::@4/(const byte*) SCREEN1#0 main::@5/(const byte*) SCREEN2#0 ) [21] (byte) c2B#24 ← phi( main::@4/(byte) c2B#14 main::@5/(byte) c2B#4 ) @@ -111,6 +115,8 @@ doplasma::@2: scope:[doplasma] from doplasma::@1 [52] (byte) doplasma::c1b#1 ← (byte) doplasma::c1b#2 + (byte) 9 [53] (byte) doplasma::i#1 ← ++ (byte) doplasma::i#2 to:doplasma::@1 + +(void()) makecharset((byte*) makecharset::charset) makecharset: scope:[makecharset] from main::@2 [54] phi() [55] call sid_rnd_init @@ -176,12 +182,16 @@ makecharset::@8: scope:[makecharset] from makecharset::@13 makecharset::@9 [85] (byte) makecharset::b#6 ← phi( makecharset::@9/(byte) makecharset::b#1 makecharset::@13/(byte) makecharset::b#2 ) [86] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2 to:makecharset::@5 + +(byte()) sid_rnd() sid_rnd: scope:[sid_rnd] from makecharset::@6 [87] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) to:sid_rnd::@return sid_rnd::@return: scope:[sid_rnd] from sid_rnd [88] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from makecharset::@10 [89] *((byte*) print_char_cursor#18) ← (const byte) print_char::ch#0 [90] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#18 @@ -189,6 +199,8 @@ print_char: scope:[print_char] from makecharset::@10 print_char::@return: scope:[print_char] from print_char [91] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from makecharset::@12 [92] phi() [93] call memset @@ -196,6 +208,8 @@ print_cls: scope:[print_cls] from makecharset::@12 print_cls::@return: scope:[print_cls] from print_cls [94] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [95] phi() to:memset::@1 @@ -210,6 +224,8 @@ memset::@2: scope:[memset] from memset::@1 [99] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [100] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) sid_rnd_init() sid_rnd_init: scope:[sid_rnd_init] from makecharset [101] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff [102] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 diff --git a/src/test/ref/examples/plasma/plasma.log b/src/test/ref/examples/plasma/plasma.log index 7fe600aef..f422b168c 100644 --- a/src/test/ref/examples/plasma/plasma.log +++ b/src/test/ref/examples/plasma/plasma.log @@ -98,6 +98,8 @@ CONTROL FLOW GRAPH SSA (byte) BLACK#0 ← (number) 0 (byte) BLUE#0 ← (number) 6 to:@16 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -145,6 +147,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@40 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from makecharset::@18 (byte*) print_char_cursor#11 ← phi( makecharset::@18/(byte*) print_char_cursor#20 ) (byte) print_char::ch#1 ← phi( makecharset::@18/(byte) print_char::ch#0 ) @@ -156,6 +160,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#12 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from makecharset::@23 (byte*) print_screen#1 ← phi( makecharset::@23/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -185,6 +191,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte) SID_CONTROL_NOISE#0 ← (number) $80 (byte*) SID_VOICE3_OSC#0 ← ((byte*)) (number) $d41b to:@42 + +(void()) sid_rnd_init() sid_rnd_init: scope:[sid_rnd_init] from makecharset *((word*) SID_VOICE3_FREQ#0) ← (number) $ffff *((byte*) SID_VOICE3_CONTROL#0) ← (byte) SID_CONTROL_NOISE#0 @@ -192,6 +200,8 @@ sid_rnd_init: scope:[sid_rnd_init] from makecharset sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init return to:@return + +(byte()) sid_rnd() sid_rnd: scope:[sid_rnd] from makecharset::@8 (byte) sid_rnd::return#0 ← *((byte*) SID_VOICE3_OSC#0) to:sid_rnd::@return @@ -211,6 +221,8 @@ sid_rnd::@return: scope:[sid_rnd] from sid_rnd .byte round(127.5+127.5*sin(2*PI*i/256)) }} to:@43 + +(void()) main() main: scope:[main] from @45 (byte*) print_screen#7 ← phi( @45/(byte*) print_screen#8 ) (byte) c2B#36 ← phi( @45/(byte) c2B#20 ) @@ -415,6 +427,8 @@ main::@return: scope:[main] from main::@3 (byte) c2A#3 ← (number) 0 (byte) c2B#3 ← (number) 0 to:@45 + +(void()) doplasma((byte*) doplasma::screen) doplasma: scope:[doplasma] from main::@4 main::@9 (byte*) doplasma::screen#13 ← phi( main::@4/(byte*) doplasma::screen#0 main::@9/(byte*) doplasma::screen#1 ) (byte) c2B#24 ← phi( main::@4/(byte) c2B#14 main::@9/(byte) c2B#15 ) @@ -566,6 +580,8 @@ doplasma::@return: scope:[doplasma] from doplasma::@13 (byte) c2B#5 ← (byte) c2B#12 return to:@return + +(void()) makecharset((byte*) makecharset::charset) makecharset: scope:[makecharset] from main::@2 (byte*) makecharset::charset#16 ← phi( main::@2/(byte*) makecharset::charset#0 ) (byte*) print_char_cursor#28 ← phi( main::@2/(byte*) print_char_cursor#21 ) @@ -2185,6 +2201,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) BORDERCOL#0) ← (const byte) BLUE#0 @@ -2223,6 +2241,8 @@ main::toD0182: scope:[main] from main::@5 main::@6: scope:[main] from main::toD0182 [20] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 to:main::@3 + +(void()) doplasma((byte*) doplasma::screen) doplasma: scope:[doplasma] from main::@4 main::@5 [21] (byte*) doplasma::screen#13 ← phi( main::@4/(const byte*) SCREEN1#0 main::@5/(const byte*) SCREEN2#0 ) [21] (byte) c2B#24 ← phi( main::@4/(byte) c2B#14 main::@5/(byte) c2B#4 ) @@ -2289,6 +2309,8 @@ doplasma::@2: scope:[doplasma] from doplasma::@1 [52] (byte) doplasma::c1b#1 ← (byte) doplasma::c1b#2 + (byte) 9 [53] (byte) doplasma::i#1 ← ++ (byte) doplasma::i#2 to:doplasma::@1 + +(void()) makecharset((byte*) makecharset::charset) makecharset: scope:[makecharset] from main::@2 [54] phi() [55] call sid_rnd_init @@ -2354,12 +2376,16 @@ makecharset::@8: scope:[makecharset] from makecharset::@13 makecharset::@9 [85] (byte) makecharset::b#6 ← phi( makecharset::@9/(byte) makecharset::b#1 makecharset::@13/(byte) makecharset::b#2 ) [86] (byte) makecharset::ii#1 ← ++ (byte) makecharset::ii#2 to:makecharset::@5 + +(byte()) sid_rnd() sid_rnd: scope:[sid_rnd] from makecharset::@6 [87] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) to:sid_rnd::@return sid_rnd::@return: scope:[sid_rnd] from sid_rnd [88] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from makecharset::@10 [89] *((byte*) print_char_cursor#18) ← (const byte) print_char::ch#0 [90] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#18 @@ -2367,6 +2393,8 @@ print_char: scope:[print_char] from makecharset::@10 print_char::@return: scope:[print_char] from print_char [91] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from makecharset::@12 [92] phi() [93] call memset @@ -2374,6 +2402,8 @@ print_cls: scope:[print_cls] from makecharset::@12 print_cls::@return: scope:[print_cls] from print_cls [94] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [95] phi() to:memset::@1 @@ -2388,6 +2418,8 @@ memset::@2: scope:[memset] from memset::@1 [99] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [100] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) sid_rnd_init() sid_rnd_init: scope:[sid_rnd_init] from makecharset [101] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff [102] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 diff --git a/src/test/ref/examples/rasterbars/raster-bars.cfg b/src/test/ref/examples/rasterbars/raster-bars.cfg index 75ffb2c7a..64b3bd887 100644 --- a/src/test/ref/examples/rasterbars/raster-bars.cfg +++ b/src/test/ref/examples/rasterbars/raster-bars.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } to:main::@1 @@ -20,6 +22,8 @@ main::@3: scope:[main] from main::@2 [7] phi() [8] call raster to:main::@1 + +(void()) raster() raster: scope:[raster] from main::@3 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } [10] (byte) raster::col#0 ← *((const byte[]) rastercols#0) diff --git a/src/test/ref/examples/rasterbars/raster-bars.log b/src/test/ref/examples/rasterbars/raster-bars.log index 2929c7877..0da270df7 100644 --- a/src/test/ref/examples/rasterbars/raster-bars.log +++ b/src/test/ref/examples/rasterbars/raster-bars.log @@ -14,6 +14,8 @@ CONTROL FLOW GRAPH SSA (byte*) BORDERCOL#0 ← ((byte*)) (number) $d020 (byte*) BGCOL#0 ← ((byte*)) (number) $d021 to:@5 + +(void()) main() main: scope:[main] from @6 asm { sei } to:main::@2 @@ -37,6 +39,8 @@ main::@return: scope:[main] from main::@7 @5: scope:[] from @begin (byte[]) rastercols#0 ← { (number) $b, (number) 0, (number) $b, (number) $b, (number) $c, (number) $b, (number) $c, (number) $c, (number) $f, (number) $c, (number) $f, (number) $f, (number) 1, (number) $f, (number) 1, (number) 1, (number) $f, (number) 1, (number) $f, (number) $f, (number) $c, (number) $f, (number) $c, (number) $c, (number) $b, (number) $c, (number) $b, (number) $b, (number) 0, (number) $b, (number) 0, (number) $ff } to:@6 + +(void()) raster() raster: scope:[raster] from main::@5 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } (byte) raster::i#0 ← (number) 0 @@ -216,6 +220,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } to:main::@1 @@ -229,6 +235,8 @@ main::@3: scope:[main] from main::@2 [7] phi() [8] call raster to:main::@1 + +(void()) raster() raster: scope:[raster] from main::@3 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } [10] (byte) raster::col#0 ← *((const byte[]) rastercols#0) diff --git a/src/test/ref/examples/rotate/rotate.cfg b/src/test/ref/examples/rotate/rotate.cfg index 70edfa303..5318f79cd 100644 --- a/src/test/ref/examples/rotate/rotate.cfg +++ b/src/test/ref/examples/rotate/rotate.cfg @@ -11,6 +11,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] call init @@ -22,6 +24,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) anim() anim: scope:[anim] from main::@1 [9] phi() to:anim::@1 @@ -113,6 +117,8 @@ anim::@14: scope:[anim] from anim::@7 anim::@15: scope:[anim] from anim::@14 [62] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 to:anim::@1 + +(void()) print_dword_at((dword) print_dword_at::dw , (byte*) print_dword_at::at) print_dword_at: scope:[print_dword_at] from anim::@14 [63] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0 [64] call print_word_at @@ -124,6 +130,8 @@ print_dword_at::@1: scope:[print_dword_at] from print_dword_at print_dword_at::@return: scope:[print_dword_at] from print_dword_at::@1 [67] return to:@return + +(void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at) print_word_at: scope:[print_word_at] from print_dword_at print_dword_at::@1 [68] (byte*) print_word_at::at#2 ← phi( print_dword_at/(const byte*) SCREEN#0 print_dword_at::@1/(const byte*) SCREEN#0+(byte) 4 ) [68] (word) print_word_at::w#2 ← phi( print_dword_at/(word) print_word_at::w#0 print_dword_at::@1/(word) print_word_at::w#1 ) @@ -139,6 +147,8 @@ print_word_at::@1: scope:[print_word_at] from print_word_at print_word_at::@return: scope:[print_word_at] from print_word_at::@1 [75] return to:@return + +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) print_byte_at: scope:[print_byte_at] from print_word_at print_word_at::@1 [76] (byte*) print_byte_at::at#2 ← phi( print_word_at/(byte*) print_byte_at::at#0 print_word_at::@1/(byte*) print_byte_at::at#1 ) [76] (byte) print_byte_at::b#2 ← phi( print_word_at/(byte) print_byte_at::b#0 print_word_at::@1/(byte) print_byte_at::b#1 ) @@ -156,6 +166,8 @@ print_byte_at::@1: scope:[print_byte_at] from print_byte_at print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@1 [85] return to:@return + +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 [86] (byte*) print_char_at::at#2 ← phi( print_byte_at/(byte*) print_char_at::at#0 print_byte_at::@1/(byte*) print_char_at::at#1 ) [86] (byte) print_char_at::ch#2 ← phi( print_byte_at/(byte) print_char_at::ch#0 print_byte_at::@1/(byte) print_char_at::ch#1 ) @@ -164,12 +176,16 @@ print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print_char_at::@return: scope:[print_char_at] from print_char_at [88] return to:@return + +(dword()) clock() clock: scope:[clock] from anim::@7 [89] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) to:clock::@return clock::@return: scope:[clock] from clock [90] return to:@return + +(signed word()) mulf8s_prepared((signed byte) mulf8s_prepared::b) mulf8s_prepared: scope:[mulf8s_prepared] from anim::@10 anim::@12 anim::@8 anim::@9 [91] (signed byte) mulf8s_prepared::b#4 ← phi( anim::@8/(signed byte) mulf8s_prepared::b#0 anim::@9/(signed byte) mulf8s_prepared::b#2 anim::@10/(signed byte) mulf8s_prepared::b#1 anim::@12/(signed byte) mulf8s_prepared::b#3 ) [92] (byte) mulf8u_prepared::b#0 ← (byte)(signed byte) mulf8s_prepared::b#4 @@ -200,6 +216,8 @@ mulf8s_prepared::@2: scope:[mulf8s_prepared] from mulf8s_prepared::@1 mulf8s_pr mulf8s_prepared::@return: scope:[mulf8s_prepared] from mulf8s_prepared::@2 [106] return to:@return + +(word()) mulf8u_prepared((byte) mulf8u_prepared::b) mulf8u_prepared: scope:[mulf8u_prepared] from mulf8s_prepared [107] *((const byte*) mulf8u_prepared::memB#0) ← (byte) mulf8u_prepared::b#0 asm { ldxmemB sec sm1: ldamulf_sqr1_lo,x sm2: sbcmulf_sqr2_lo,x staresL sm3: ldamulf_sqr1_hi,x sm4: sbcmulf_sqr2_hi,x stamemB } @@ -208,6 +226,8 @@ mulf8u_prepared: scope:[mulf8u_prepared] from mulf8s_prepared mulf8u_prepared::@return: scope:[mulf8u_prepared] from mulf8u_prepared [110] return to:@return + +(void()) mulf8u_prepare((byte) mulf8u_prepare::a) mulf8u_prepare: scope:[mulf8u_prepare] from anim::mulf8s_prepare1 anim::mulf8s_prepare2 [111] (byte) mulf8u_prepare::a#2 ← phi( anim::mulf8s_prepare1/(byte~) mulf8u_prepare::a#3 anim::mulf8s_prepare2/(byte~) mulf8u_prepare::a#4 ) [112] *((const byte*) mulf8u_prepare::memA#0) ← (byte) mulf8u_prepare::a#2 @@ -216,6 +236,8 @@ mulf8u_prepare: scope:[mulf8u_prepare] from anim::mulf8s_prepare1 anim::mulf8s_ mulf8u_prepare::@return: scope:[mulf8u_prepare] from mulf8u_prepare [114] return to:@return + +(void()) clock_start() clock_start: scope:[clock_start] from anim::@3 [115] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [116] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 @@ -226,6 +248,8 @@ clock_start: scope:[clock_start] from anim::@3 clock_start::@return: scope:[clock_start] from clock_start [120] return to:@return + +(void()) init() init: scope:[init] from main [121] phi() [122] call mulf_init @@ -243,6 +267,8 @@ init::@1: scope:[init] from init::@1 init::@2 init::@return: scope:[init] from init::@1 [129] return to:@return + +(void()) mulf_init() mulf_init: scope:[mulf_init] from init [130] phi() to:mulf_init::@1 diff --git a/src/test/ref/examples/rotate/rotate.log b/src/test/ref/examples/rotate/rotate.log index 292cc7b3f..84182ac61 100644 --- a/src/test/ref/examples/rotate/rotate.log +++ b/src/test/ref/examples/rotate/rotate.log @@ -113,6 +113,8 @@ CONTROL FLOW GRAPH SSA (byte[$200]) mulf_sqr2_lo#0 ← { fill( $200, 0) } (byte[$200]) mulf_sqr2_hi#0 ← { fill( $200, 0) } to:@13 + +(void()) mulf_init() mulf_init: scope:[mulf_init] from init (word) mulf_init::sqr#0 ← (number) 0 (byte) mulf_init::x_2#0 ← (number) 0 @@ -222,6 +224,8 @@ mulf_init::@15: scope:[mulf_init] from mulf_init::@10 mulf_init::@return: scope:[mulf_init] from mulf_init::@11 return to:@return + +(void()) mulf8u_prepare((byte) mulf8u_prepare::a) mulf8u_prepare: scope:[mulf8u_prepare] from anim::mulf8s_prepare1 anim::mulf8s_prepare2 (byte) mulf8u_prepare::a#2 ← phi( anim::mulf8s_prepare1/(byte) mulf8u_prepare::a#0 anim::mulf8s_prepare2/(byte) mulf8u_prepare::a#1 ) (byte*) mulf8u_prepare::memA#0 ← ((byte*)) (number) $fd @@ -231,6 +235,8 @@ mulf8u_prepare: scope:[mulf8u_prepare] from anim::mulf8s_prepare1 anim::mulf8s_ mulf8u_prepare::@return: scope:[mulf8u_prepare] from mulf8u_prepare return to:@return + +(word()) mulf8u_prepared((byte) mulf8u_prepared::b) mulf8u_prepared: scope:[mulf8u_prepared] from mulf8s_prepared (byte) mulf8u_prepared::b#1 ← phi( mulf8s_prepared/(byte) mulf8u_prepared::b#0 ) (byte*) mulf8u_prepared::resL#0 ← ((byte*)) (number) $fe @@ -244,6 +250,8 @@ mulf8u_prepared::@return: scope:[mulf8u_prepared] from mulf8u_prepared (word) mulf8u_prepared::return#1 ← (word) mulf8u_prepared::return#3 return to:@return + +(signed word()) mulf8s_prepared((signed byte) mulf8s_prepared::b) mulf8s_prepared: scope:[mulf8s_prepared] from anim::@17 anim::@18 anim::@21 anim::@24 (signed byte) mulf8s_prepared::b#4 ← phi( anim::@17/(signed byte) mulf8s_prepared::b#0 anim::@18/(signed byte) mulf8s_prepared::b#2 anim::@21/(signed byte) mulf8s_prepared::b#1 anim::@24/(signed byte) mulf8s_prepared::b#3 ) (signed byte*) mulf8s_prepared::memA#0 ← ((signed byte*)) (number) $fd @@ -298,6 +306,8 @@ mulf8s_prepared::@return: scope:[mulf8s_prepared] from mulf8s_prepared::@2 @13: scope:[] from @4 (dword) CLOCKS_PER_INIT#0 ← (number) $12 to:@44 + +(dword()) clock() clock: scope:[clock] from anim::@13 (number~) clock::$0 ← (number) $ffffffff - *((dword*) CIA2_TIMER_AB#0) (dword) clock::return#0 ← (number~) clock::$0 @@ -307,6 +317,8 @@ clock::@return: scope:[clock] from clock (dword) clock::return#1 ← (dword) clock::return#3 return to:@return + +(void()) clock_start() clock_start: scope:[clock_start] from anim::@6 (byte~) clock_start::$0 ← (byte) CIA_TIMER_CONTROL_STOP#0 | (byte) CIA_TIMER_CONTROL_CONTINUOUS#0 (byte~) clock_start::$1 ← (byte~) clock_start::$0 | (byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES#0 @@ -325,6 +337,8 @@ clock_start: scope:[clock_start] from anim::@6 clock_start::@return: scope:[clock_start] from clock_start return to:@return + +(void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at) print_word_at: scope:[print_word_at] from print_dword_at print_dword_at::@1 (byte*) print_word_at::at#2 ← phi( print_dword_at/(byte*) print_word_at::at#0 print_dword_at::@1/(byte*) print_word_at::at#1 ) (word) print_word_at::w#2 ← phi( print_dword_at/(word) print_word_at::w#0 print_dword_at::@1/(word) print_word_at::w#1 ) @@ -347,6 +361,8 @@ print_word_at::@2: scope:[print_word_at] from print_word_at::@1 print_word_at::@return: scope:[print_word_at] from print_word_at::@2 return to:@return + +(void()) print_dword_at((dword) print_dword_at::dw , (byte*) print_dword_at::at) print_dword_at: scope:[print_dword_at] from anim::@26 (byte*) print_dword_at::at#1 ← phi( anim::@26/(byte*) print_dword_at::at#0 ) (dword) print_dword_at::dw#1 ← phi( anim::@26/(dword) print_dword_at::dw#0 ) @@ -372,6 +388,8 @@ print_dword_at::@return: scope:[print_dword_at] from print_dword_at::@2 @44: scope:[] from @13 (byte[]) print_hextab#0 ← (const string) $2 to:@51 + +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) print_byte_at: scope:[print_byte_at] from print_word_at print_word_at::@1 (byte*) print_byte_at::at#2 ← phi( print_word_at/(byte*) print_byte_at::at#0 print_word_at::@1/(byte*) print_byte_at::at#1 ) (byte) print_byte_at::b#2 ← phi( print_word_at/(byte) print_byte_at::b#0 print_word_at::@1/(byte) print_byte_at::b#1 ) @@ -394,6 +412,8 @@ print_byte_at::@2: scope:[print_byte_at] from print_byte_at::@1 print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@2 return to:@return + +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 (byte*) print_char_at::at#2 ← phi( print_byte_at/(byte*) print_char_at::at#0 print_byte_at::@1/(byte*) print_char_at::at#1 ) (byte) print_char_at::ch#2 ← phi( print_byte_at/(byte) print_char_at::ch#0 print_byte_at::@1/(byte) print_char_at::ch#1 ) @@ -410,6 +430,8 @@ print_char_at::@return: scope:[print_char_at] from print_char_at (byte*~) $1 ← (byte[$140]) SIN#0 + (number) $40 (byte*) COS#0 ← (byte*~) $1 to:@53 + +(void()) main() main: scope:[main] from @54 (byte*) COS#9 ← phi( @54/(byte*) COS#11 ) asm { sei } @@ -424,6 +446,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 return to:@return + +(void()) init() init: scope:[init] from main call mulf_init to:init::@3 @@ -452,6 +476,8 @@ init::@return: scope:[init] from init::@1 (signed byte[8]) xs#0 ← { (number) -$46, (number) -$46, (number) -$46, (number) 0, (number) 0, (number) $46, (number) $46, (number) $46 } (signed byte[8]) ys#0 ← { (number) -$46, (number) 0, (number) $46, (number) -$46, (number) $46, (number) -$46, (number) 0, (number) $46 } to:@54 + +(void()) anim() anim: scope:[anim] from main::@1 (byte*) COS#5 ← phi( main::@1/(byte*) COS#7 ) (byte) anim::angle#0 ← (number) 0 @@ -2030,6 +2056,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] call init @@ -2041,6 +2069,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) anim() anim: scope:[anim] from main::@1 [9] phi() to:anim::@1 @@ -2132,6 +2162,8 @@ anim::@14: scope:[anim] from anim::@7 anim::@15: scope:[anim] from anim::@14 [62] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 to:anim::@1 + +(void()) print_dword_at((dword) print_dword_at::dw , (byte*) print_dword_at::at) print_dword_at: scope:[print_dword_at] from anim::@14 [63] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0 [64] call print_word_at @@ -2143,6 +2175,8 @@ print_dword_at::@1: scope:[print_dword_at] from print_dword_at print_dword_at::@return: scope:[print_dword_at] from print_dword_at::@1 [67] return to:@return + +(void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at) print_word_at: scope:[print_word_at] from print_dword_at print_dword_at::@1 [68] (byte*) print_word_at::at#2 ← phi( print_dword_at/(const byte*) SCREEN#0 print_dword_at::@1/(const byte*) SCREEN#0+(byte) 4 ) [68] (word) print_word_at::w#2 ← phi( print_dword_at/(word) print_word_at::w#0 print_dword_at::@1/(word) print_word_at::w#1 ) @@ -2158,6 +2192,8 @@ print_word_at::@1: scope:[print_word_at] from print_word_at print_word_at::@return: scope:[print_word_at] from print_word_at::@1 [75] return to:@return + +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) print_byte_at: scope:[print_byte_at] from print_word_at print_word_at::@1 [76] (byte*) print_byte_at::at#2 ← phi( print_word_at/(byte*) print_byte_at::at#0 print_word_at::@1/(byte*) print_byte_at::at#1 ) [76] (byte) print_byte_at::b#2 ← phi( print_word_at/(byte) print_byte_at::b#0 print_word_at::@1/(byte) print_byte_at::b#1 ) @@ -2175,6 +2211,8 @@ print_byte_at::@1: scope:[print_byte_at] from print_byte_at print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@1 [85] return to:@return + +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 [86] (byte*) print_char_at::at#2 ← phi( print_byte_at/(byte*) print_char_at::at#0 print_byte_at::@1/(byte*) print_char_at::at#1 ) [86] (byte) print_char_at::ch#2 ← phi( print_byte_at/(byte) print_char_at::ch#0 print_byte_at::@1/(byte) print_char_at::ch#1 ) @@ -2183,12 +2221,16 @@ print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print_char_at::@return: scope:[print_char_at] from print_char_at [88] return to:@return + +(dword()) clock() clock: scope:[clock] from anim::@7 [89] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) to:clock::@return clock::@return: scope:[clock] from clock [90] return to:@return + +(signed word()) mulf8s_prepared((signed byte) mulf8s_prepared::b) mulf8s_prepared: scope:[mulf8s_prepared] from anim::@10 anim::@12 anim::@8 anim::@9 [91] (signed byte) mulf8s_prepared::b#4 ← phi( anim::@8/(signed byte) mulf8s_prepared::b#0 anim::@9/(signed byte) mulf8s_prepared::b#2 anim::@10/(signed byte) mulf8s_prepared::b#1 anim::@12/(signed byte) mulf8s_prepared::b#3 ) [92] (byte) mulf8u_prepared::b#0 ← (byte)(signed byte) mulf8s_prepared::b#4 @@ -2219,6 +2261,8 @@ mulf8s_prepared::@2: scope:[mulf8s_prepared] from mulf8s_prepared::@1 mulf8s_pr mulf8s_prepared::@return: scope:[mulf8s_prepared] from mulf8s_prepared::@2 [106] return to:@return + +(word()) mulf8u_prepared((byte) mulf8u_prepared::b) mulf8u_prepared: scope:[mulf8u_prepared] from mulf8s_prepared [107] *((const byte*) mulf8u_prepared::memB#0) ← (byte) mulf8u_prepared::b#0 asm { ldxmemB sec sm1: ldamulf_sqr1_lo,x sm2: sbcmulf_sqr2_lo,x staresL sm3: ldamulf_sqr1_hi,x sm4: sbcmulf_sqr2_hi,x stamemB } @@ -2227,6 +2271,8 @@ mulf8u_prepared: scope:[mulf8u_prepared] from mulf8s_prepared mulf8u_prepared::@return: scope:[mulf8u_prepared] from mulf8u_prepared [110] return to:@return + +(void()) mulf8u_prepare((byte) mulf8u_prepare::a) mulf8u_prepare: scope:[mulf8u_prepare] from anim::mulf8s_prepare1 anim::mulf8s_prepare2 [111] (byte) mulf8u_prepare::a#2 ← phi( anim::mulf8s_prepare1/(byte~) mulf8u_prepare::a#3 anim::mulf8s_prepare2/(byte~) mulf8u_prepare::a#4 ) [112] *((const byte*) mulf8u_prepare::memA#0) ← (byte) mulf8u_prepare::a#2 @@ -2235,6 +2281,8 @@ mulf8u_prepare: scope:[mulf8u_prepare] from anim::mulf8s_prepare1 anim::mulf8s_ mulf8u_prepare::@return: scope:[mulf8u_prepare] from mulf8u_prepare [114] return to:@return + +(void()) clock_start() clock_start: scope:[clock_start] from anim::@3 [115] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [116] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 @@ -2245,6 +2293,8 @@ clock_start: scope:[clock_start] from anim::@3 clock_start::@return: scope:[clock_start] from clock_start [120] return to:@return + +(void()) init() init: scope:[init] from main [121] phi() [122] call mulf_init @@ -2262,6 +2312,8 @@ init::@1: scope:[init] from init::@1 init::@2 init::@return: scope:[init] from init::@1 [129] return to:@return + +(void()) mulf_init() mulf_init: scope:[mulf_init] from init [130] phi() to:mulf_init::@1 diff --git a/src/test/ref/examples/scroll/scroll.cfg b/src/test/ref/examples/scroll/scroll.cfg index 370d4d958..7841fe57a 100644 --- a/src/test/ref/examples/scroll/scroll.cfg +++ b/src/test/ref/examples/scroll/scroll.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call fillscreen @@ -51,6 +53,8 @@ main::@6: scope:[main] from main::@5 [23] *((const byte[]) main::line#0 + (byte) main::i#2) ← *((const byte[]) main::line#0+(byte) 1 + (byte) main::i#2) [24] (byte) main::i#1 ← ++ (byte) main::i#2 to:main::@5 + +(void()) fillscreen((byte*) fillscreen::screen , (byte) fillscreen::fill) fillscreen: scope:[fillscreen] from main [25] phi() to:fillscreen::@1 diff --git a/src/test/ref/examples/scroll/scroll.log b/src/test/ref/examples/scroll/scroll.log index 491377d1b..dc19404f9 100644 --- a/src/test/ref/examples/scroll/scroll.log +++ b/src/test/ref/examples/scroll/scroll.log @@ -23,6 +23,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCROLL#0 ← ((byte*)) (number) $d016 (byte*) TEXT#0 ← (const string) $0 to:@2 + +(void()) main() main: scope:[main] from @2 (byte*) fillscreen::screen#0 ← (byte*) SCREEN#0 (byte) fillscreen::fill#0 ← (number) $20 @@ -105,6 +107,8 @@ main::@14: scope:[main] from main::@10 main::@return: scope:[main] from main::@7 return to:@return + +(void()) fillscreen((byte*) fillscreen::screen , (byte) fillscreen::fill) fillscreen: scope:[fillscreen] from main (byte) fillscreen::fill#3 ← phi( main/(byte) fillscreen::fill#0 ) (byte*) fillscreen::screen#1 ← phi( main/(byte*) fillscreen::screen#0 ) @@ -425,6 +429,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call fillscreen @@ -469,6 +475,8 @@ main::@6: scope:[main] from main::@5 [23] *((const byte[]) main::line#0 + (byte) main::i#2) ← *((const byte[]) main::line#0+(byte) 1 + (byte) main::i#2) [24] (byte) main::i#1 ← ++ (byte) main::i#2 to:main::@5 + +(void()) fillscreen((byte*) fillscreen::screen , (byte) fillscreen::fill) fillscreen: scope:[fillscreen] from main [25] phi() to:fillscreen::@1 diff --git a/src/test/ref/examples/scrollbig/scrollbig.cfg b/src/test/ref/examples/scrollbig/scrollbig.cfg index 8e936f345..9d722020d 100644 --- a/src/test/ref/examples/scrollbig/scrollbig.cfg +++ b/src/test/ref/examples/scrollbig/scrollbig.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call fillscreen @@ -28,6 +30,8 @@ main::@3: scope:[main] from main::@2 main::@4: scope:[main] from main::@3 [11] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) to:main::@1 + +(void()) scroll_soft() scroll_soft: scope:[scroll_soft] from main::@3 [12] (byte) scroll#3 ← -- (byte) scroll#18 [13] if((byte) scroll#3!=(byte) $ff) goto scroll_soft::@1 @@ -46,6 +50,8 @@ scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@2 scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 [18] return to:@return + +(void()) scroll_bit() scroll_bit: scope:[scroll_bit] from scroll_soft::@2 [19] (byte) current_bit#5 ← (byte) current_bit#29 >> (byte) 1 [20] if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 @@ -94,6 +100,8 @@ scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@4 scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 [43] return to:@return + +(void()) scroll_hard() scroll_hard: scope:[scroll_hard] from scroll_bit::@1 [44] phi() to:scroll_hard::@1 @@ -115,6 +123,8 @@ scroll_hard::@2: scope:[scroll_hard] from scroll_hard::@1 [55] *((const byte*) SCREEN#0+(word)(number) $28*(number) 7 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(word)(number) $28*(number) 7+(byte) 1 + (byte) scroll_hard::i#2) [56] (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 to:scroll_hard::@1 + +(byte()) next_char() next_char: scope:[next_char] from scroll_bit::@2 [57] (byte) next_char::c#0 ← *((byte*) nxt#31) [58] if((byte) next_char::c#0!=(byte) 0) goto next_char::@1 @@ -130,6 +140,8 @@ next_char::@1: scope:[next_char] from next_char next_char::@2 next_char::@return: scope:[next_char] from next_char::@1 [62] return to:@return + +(void()) fillscreen((byte*) fillscreen::screen , (byte) fillscreen::fill) fillscreen: scope:[fillscreen] from main [63] phi() to:fillscreen::@1 diff --git a/src/test/ref/examples/scrollbig/scrollbig.log b/src/test/ref/examples/scrollbig/scrollbig.log index 47bcf4b3b..a4a5abf12 100644 --- a/src/test/ref/examples/scrollbig/scrollbig.log +++ b/src/test/ref/examples/scrollbig/scrollbig.log @@ -30,6 +30,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCROLL#0 ← ((byte*)) (number) $d016 (byte*) TEXT#0 ← (const string) $0 to:@1 + +(void()) main() main: scope:[main] from @6 (byte*) current_chargen#30 ← phi( @6/(byte*) current_chargen#21 ) (byte*) nxt#36 ← phi( @6/(byte*) nxt#26 ) @@ -95,6 +97,8 @@ main::@return: scope:[main] from main::@8 @1: scope:[] from @begin (byte) scroll#2 ← (number) 7 to:@2 + +(void()) scroll_soft() scroll_soft: scope:[scroll_soft] from main::@5 (byte*) current_chargen#23 ← phi( main::@5/(byte*) current_chargen#15 ) (byte*) nxt#28 ← phi( main::@5/(byte*) nxt#21 ) @@ -144,6 +148,8 @@ scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 (byte*) current_chargen#4 ← (byte*) CHARGEN#0 (byte) current_bit#4 ← (number) 1 to:@3 + +(void()) scroll_bit() scroll_bit: scope:[scroll_bit] from scroll_soft::@2 (byte*) current_chargen#28 ← phi( scroll_soft::@2/(byte*) current_chargen#16 ) (byte*) nxt#29 ← phi( scroll_soft::@2/(byte*) nxt#22 ) @@ -244,6 +250,8 @@ scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 (byte) scroll#17 ← phi( @2/(byte) scroll#19 ) (byte*) nxt#6 ← (byte*) TEXT#0 to:@6 + +(byte()) next_char() next_char: scope:[next_char] from scroll_bit::@2 (byte*) nxt#17 ← phi( scroll_bit::@2/(byte*) nxt#24 ) (byte) next_char::c#0 ← *((byte*) nxt#17) @@ -268,6 +276,8 @@ next_char::@return: scope:[next_char] from next_char::@1 (byte*) nxt#9 ← (byte*) nxt#19 return to:@return + +(void()) scroll_hard() scroll_hard: scope:[scroll_hard] from scroll_bit::@1 (byte) scroll_hard::i#0 ← (number) 0 to:scroll_hard::@1 @@ -315,6 +325,8 @@ scroll_hard::@2: scope:[scroll_hard] from scroll_hard::@1 scroll_hard::@return: scope:[scroll_hard] from scroll_hard::@1 return to:@return + +(void()) fillscreen((byte*) fillscreen::screen , (byte) fillscreen::fill) fillscreen: scope:[fillscreen] from main (byte) fillscreen::fill#3 ← phi( main/(byte) fillscreen::fill#0 ) (byte*) fillscreen::screen#1 ← phi( main/(byte*) fillscreen::screen#0 ) @@ -1129,6 +1141,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call fillscreen @@ -1150,6 +1164,8 @@ main::@3: scope:[main] from main::@2 main::@4: scope:[main] from main::@3 [11] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) to:main::@1 + +(void()) scroll_soft() scroll_soft: scope:[scroll_soft] from main::@3 [12] (byte) scroll#3 ← -- (byte) scroll#18 [13] if((byte) scroll#3!=(byte) $ff) goto scroll_soft::@1 @@ -1168,6 +1184,8 @@ scroll_soft::@1: scope:[scroll_soft] from scroll_soft scroll_soft::@2 scroll_soft::@return: scope:[scroll_soft] from scroll_soft::@1 [18] return to:@return + +(void()) scroll_bit() scroll_bit: scope:[scroll_bit] from scroll_soft::@2 [19] (byte) current_bit#5 ← (byte) current_bit#29 >> (byte) 1 [20] if((byte) current_bit#5!=(byte) 0) goto scroll_bit::@1 @@ -1216,6 +1234,8 @@ scroll_bit::@6: scope:[scroll_bit] from scroll_bit::@4 scroll_bit::@return: scope:[scroll_bit] from scroll_bit::@6 [43] return to:@return + +(void()) scroll_hard() scroll_hard: scope:[scroll_hard] from scroll_bit::@1 [44] phi() to:scroll_hard::@1 @@ -1237,6 +1257,8 @@ scroll_hard::@2: scope:[scroll_hard] from scroll_hard::@1 [55] *((const byte*) SCREEN#0+(word)(number) $28*(number) 7 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(word)(number) $28*(number) 7+(byte) 1 + (byte) scroll_hard::i#2) [56] (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 to:scroll_hard::@1 + +(byte()) next_char() next_char: scope:[next_char] from scroll_bit::@2 [57] (byte) next_char::c#0 ← *((byte*) nxt#31) [58] if((byte) next_char::c#0!=(byte) 0) goto next_char::@1 @@ -1252,6 +1274,8 @@ next_char::@1: scope:[next_char] from next_char next_char::@2 next_char::@return: scope:[next_char] from next_char::@1 [62] return to:@return + +(void()) fillscreen((byte*) fillscreen::screen , (byte) fillscreen::fill) fillscreen: scope:[fillscreen] from main [63] phi() to:fillscreen::@1 diff --git a/src/test/ref/examples/scrolllogo/scrolllogo.cfg b/src/test/ref/examples/scrolllogo/scrolllogo.cfg index f80a5e00f..9e5945000 100644 --- a/src/test/ref/examples/scrolllogo/scrolllogo.cfg +++ b/src/test/ref/examples/scrolllogo/scrolllogo.cfg @@ -15,6 +15,8 @@ to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 asm { sei } [6] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 @@ -51,6 +53,8 @@ main::@5: scope:[main] from main::@2 main::@return: scope:[main] from main::@5 [24] return to:@return + +(void()) loop() loop: scope:[loop] from main::@5 [25] phi() to:loop::@1 @@ -79,6 +83,8 @@ loop::@4: scope:[loop] from loop::@5 loop::@6 [37] (word) xsin_idx#19 ← phi( loop::@5/(byte) 0 loop::@6/(word) xsin_idx#3 ) [38] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0) to:loop::@1 + +(void()) render_logo((signed word) render_logo::xpos) render_logo: scope:[render_logo] from loop::@3 [39] (byte~) render_logo::$0 ← (byte)(signed word) render_logo::xpos#0 [40] (byte~) render_logo::$1 ← (byte~) render_logo::$0 & (byte) 7 @@ -209,6 +215,8 @@ render_logo::@10: scope:[render_logo] from render_logo::@24_5 [95] (byte) render_logo::screen_idx#5 ← ++ (byte) render_logo::screen_idx#21 [96] (byte) render_logo::logo_idx#4 ← ++ (byte) render_logo::logo_idx#11 to:render_logo::@8 + +(void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max) sin16s_gen2: scope:[sin16s_gen2] from main::@2 [97] phi() [98] call div32u16u @@ -244,6 +252,8 @@ sin16s_gen2::@5: scope:[sin16s_gen2] from sin16s_gen2::@4 [114] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [115] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 to:sin16s_gen2::@1 + +(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) mul16s: scope:[mul16s] from sin16s_gen2::@4 [116] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#0 [117] call mul16u @@ -267,6 +277,8 @@ mul16s::@2: scope:[mul16s] from mul16s::@1 mul16s::@return: scope:[mul16s] from mul16s::@2 [126] return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mul16s mulu16_sel [127] (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mulu16_sel/(word) mul16u::a#2 ) [127] (dword) mul16u::mb#0 ← phi( mul16s/(word)(const signed word) sin16s_gen2::ampl#0 mulu16_sel/(word) mul16u::b#1 ) @@ -292,6 +304,8 @@ mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4 [135] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 [136] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 to:mul16u::@1 + +(signed word()) sin16s((dword) sin16s::x) sin16s: scope:[sin16s] from sin16s_gen2::@2 [137] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 to:sin16s::@4 @@ -361,6 +375,8 @@ sin16s::@return: scope:[sin16s] from sin16s::@3 sin16s::@12: scope:[sin16s] from sin16s::@11 [176] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 to:sin16s::@3 + +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 [177] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) [177] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) @@ -378,6 +394,8 @@ mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 [185] return to:@return + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from sin16s_gen2 [186] phi() [187] call divr16u @@ -396,6 +414,8 @@ div32u16u::@2: scope:[div32u16u] from div32u16u::@1 div32u16u::@return: scope:[div32u16u] from div32u16u::@2 [195] return to:@return + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div32u16u div32u16u::@1 [196] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) [196] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) @@ -435,6 +455,8 @@ divr16u::@6: scope:[divr16u] from divr16u::@3 divr16u::@return: scope:[divr16u] from divr16u::@6 [213] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main::@3 main::@4 [214] (byte) memset::c#4 ← phi( main::@3/(const byte) BLACK#0 main::@4/(const byte) WHITE#0|(byte) 8 ) [214] (void*) memset::str#3 ← phi( main::@3/(void*)(const byte*) SCREEN#0 main::@4/(void*)(const byte*) COLS#0 ) diff --git a/src/test/ref/examples/scrolllogo/scrolllogo.log b/src/test/ref/examples/scrolllogo/scrolllogo.log index 6f9567241..b1f431c00 100644 --- a/src/test/ref/examples/scrolllogo/scrolllogo.log +++ b/src/test/ref/examples/scrolllogo/scrolllogo.log @@ -96,6 +96,8 @@ CONTROL FLOW GRAPH SSA @6: scope:[] from @begin (word) rem16u#0 ← (number) 0 to:@17 + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div32u16u div32u16u::@2 (word) divr16u::divisor#6 ← phi( div32u16u/(word) divr16u::divisor#0 div32u16u::@2/(word) divr16u::divisor#1 ) (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@2/(word) divr16u::dividend#2 ) @@ -173,6 +175,8 @@ divr16u::@return: scope:[divr16u] from divr16u::@6 (word) rem16u#2 ← (word) rem16u#11 return to:@return + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from sin16s_gen2 (word) rem16u#20 ← phi( sin16s_gen2/(word) rem16u#21 ) (word) div32u16u::divisor#1 ← phi( sin16s_gen2/(word) div32u16u::divisor#0 ) @@ -216,6 +220,8 @@ div32u16u::@return: scope:[div32u16u] from div32u16u::@3 (word) rem16u#5 ← (word) rem16u#14 return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mul16s mulu16_sel (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mulu16_sel/(word) mul16u::a#2 ) (word) mul16u::b#2 ← phi( mul16s/(word) mul16u::b#0 mulu16_sel/(word) mul16u::b#1 ) @@ -263,6 +269,8 @@ mul16u::@return: scope:[mul16u] from mul16u::@3 (dword) mul16u::return#1 ← (dword) mul16u::return#4 return to:@return + +(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) mul16s: scope:[mul16s] from sin16s_gen2::@8 (signed word) mul16s::b#1 ← phi( sin16s_gen2::@8/(signed word) mul16s::b#0 ) (signed word) mul16s::a#1 ← phi( sin16s_gen2::@8/(signed word) mul16s::a#0 ) @@ -326,6 +334,8 @@ mul16s::@return: scope:[mul16s] from mul16s::@2 (dword) PI_u4f28#0 ← (number) $3243f6a9 (dword) PI_HALF_u4f28#0 ← (number) $1921fb54 to:@28 + +(void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max) sin16s_gen2: scope:[sin16s_gen2] from main::@2 (signed word*) sin16s_gen2::sintab#7 ← phi( main::@2/(signed word*) sin16s_gen2::sintab#1 ) (word) rem16u#21 ← phi( main::@2/(word) rem16u#23 ) @@ -421,6 +431,8 @@ sin16s_gen2::@return: scope:[sin16s_gen2] from sin16s_gen2::@1 (word) rem16u#7 ← (word) rem16u#16 return to:@return + +(signed word()) sin16s((dword) sin16s::x) sin16s: scope:[sin16s] from sin16s_gen2::@2 (dword) sin16s::x#3 ← phi( sin16s_gen2::@2/(dword) sin16s::x#0 ) (byte) sin16s::isUpper#0 ← (number) 0 @@ -542,6 +554,8 @@ sin16s::@return: scope:[sin16s] from sin16s::@3 (signed word) sin16s::return#2 ← (signed word) sin16s::return#4 return to:@return + +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@11 sin16s::@2 sin16s::@8 sin16s::@9 (byte) mulu16_sel::select#6 ← phi( sin16s::@10/(byte) mulu16_sel::select#3 sin16s::@11/(byte) mulu16_sel::select#4 sin16s::@2/(byte) mulu16_sel::select#0 sin16s::@8/(byte) mulu16_sel::select#1 sin16s::@9/(byte) mulu16_sel::select#2 ) (word) mulu16_sel::v2#5 ← phi( sin16s::@10/(word) mulu16_sel::v2#3 sin16s::@11/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@8/(word) mulu16_sel::v2#1 sin16s::@9/(word) mulu16_sel::v2#2 ) @@ -564,6 +578,8 @@ mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@2 (word) mulu16_sel::return#6 ← (word) mulu16_sel::return#12 return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main::@3 main::@4 (byte) memset::c#5 ← phi( main::@3/(byte) memset::c#0 main::@4/(byte) memset::c#1 ) (void*) memset::str#4 ← phi( main::@3/(void*) memset::str#0 main::@4/(void*) memset::str#1 ) @@ -619,6 +635,8 @@ memset::@return: scope:[memset] from memset::@1 (word) XSIN_SIZE#0 ← (number) $200 (signed word[XSIN_SIZE#0]) xsin#0 ← { fill( XSIN_SIZE#0, 0) } to:@29 + +(void()) main() main: scope:[main] from @31 (word) xsin_idx#26 ← phi( @31/(word) xsin_idx#16 ) (word) rem16u#38 ← phi( @31/(word) rem16u#25 ) @@ -720,6 +738,8 @@ main::@return: scope:[main] from main::@7 (word) rem16u#28 ← phi( @28/(word) rem16u#31 ) (word) xsin_idx#2 ← (number) 0 to:@31 + +(void()) loop() loop: scope:[loop] from main::@6 (word) xsin_idx#18 ← phi( main::@6/(word) xsin_idx#13 ) to:loop::@1 @@ -760,6 +780,8 @@ loop::@return: scope:[loop] from loop::@1 (word) xsin_idx#5 ← (word) xsin_idx#11 return to:@return + +(void()) render_logo((signed word) render_logo::xpos) render_logo: scope:[render_logo] from loop::@6 (signed word) render_logo::xpos#1 ← phi( loop::@6/(signed word) render_logo::xpos#0 ) (byte) render_logo::logo_idx#0 ← (byte) 0 @@ -3345,6 +3367,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 asm { sei } [6] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 @@ -3381,6 +3405,8 @@ main::@5: scope:[main] from main::@2 main::@return: scope:[main] from main::@5 [24] return to:@return + +(void()) loop() loop: scope:[loop] from main::@5 [25] phi() to:loop::@1 @@ -3409,6 +3435,8 @@ loop::@4: scope:[loop] from loop::@5 loop::@6 [37] (word) xsin_idx#19 ← phi( loop::@5/(byte) 0 loop::@6/(word) xsin_idx#3 ) [38] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0) to:loop::@1 + +(void()) render_logo((signed word) render_logo::xpos) render_logo: scope:[render_logo] from loop::@3 [39] (byte~) render_logo::$0 ← (byte)(signed word) render_logo::xpos#0 [40] (byte~) render_logo::$1 ← (byte~) render_logo::$0 & (byte) 7 @@ -3539,6 +3567,8 @@ render_logo::@10: scope:[render_logo] from render_logo::@24_5 [95] (byte) render_logo::screen_idx#5 ← ++ (byte) render_logo::screen_idx#21 [96] (byte) render_logo::logo_idx#4 ← ++ (byte) render_logo::logo_idx#11 to:render_logo::@8 + +(void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max) sin16s_gen2: scope:[sin16s_gen2] from main::@2 [97] phi() [98] call div32u16u @@ -3574,6 +3604,8 @@ sin16s_gen2::@5: scope:[sin16s_gen2] from sin16s_gen2::@4 [114] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [115] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 to:sin16s_gen2::@1 + +(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) mul16s: scope:[mul16s] from sin16s_gen2::@4 [116] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#0 [117] call mul16u @@ -3597,6 +3629,8 @@ mul16s::@2: scope:[mul16s] from mul16s::@1 mul16s::@return: scope:[mul16s] from mul16s::@2 [126] return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mul16s mulu16_sel [127] (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mulu16_sel/(word) mul16u::a#2 ) [127] (dword) mul16u::mb#0 ← phi( mul16s/(word)(const signed word) sin16s_gen2::ampl#0 mulu16_sel/(word) mul16u::b#1 ) @@ -3622,6 +3656,8 @@ mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4 [135] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 [136] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 to:mul16u::@1 + +(signed word()) sin16s((dword) sin16s::x) sin16s: scope:[sin16s] from sin16s_gen2::@2 [137] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 to:sin16s::@4 @@ -3691,6 +3727,8 @@ sin16s::@return: scope:[sin16s] from sin16s::@3 sin16s::@12: scope:[sin16s] from sin16s::@11 [176] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 to:sin16s::@3 + +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 [177] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) [177] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) @@ -3708,6 +3746,8 @@ mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 [185] return to:@return + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from sin16s_gen2 [186] phi() [187] call divr16u @@ -3726,6 +3766,8 @@ div32u16u::@2: scope:[div32u16u] from div32u16u::@1 div32u16u::@return: scope:[div32u16u] from div32u16u::@2 [195] return to:@return + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div32u16u div32u16u::@1 [196] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) [196] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) @@ -3765,6 +3807,8 @@ divr16u::@6: scope:[divr16u] from divr16u::@3 divr16u::@return: scope:[divr16u] from divr16u::@6 [213] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main::@3 main::@4 [214] (byte) memset::c#4 ← phi( main::@3/(const byte) BLACK#0 main::@4/(const byte) WHITE#0|(byte) 8 ) [214] (void*) memset::str#3 ← phi( main::@3/(void*)(const byte*) SCREEN#0 main::@4/(void*)(const byte*) COLS#0 ) diff --git a/src/test/ref/examples/showlogo/showlogo.cfg b/src/test/ref/examples/showlogo/showlogo.cfg index 9093cb7b6..2a35da792 100644 --- a/src/test/ref/examples/showlogo/showlogo.cfg +++ b/src/test/ref/examples/showlogo/showlogo.cfg @@ -15,6 +15,8 @@ to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 [5] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 [6] *((const byte*) BGCOL2#0) ← (const byte) DARK_GREY#0 @@ -43,6 +45,8 @@ main::@2: scope:[main] from main::@1 main::@2 [19] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7) kickasm() {{ inc $d020 }} to:main::@2 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main::@3 main::@4 [21] (byte) memset::c#4 ← phi( main::@4/(const byte) WHITE#0|(byte) 8 main::@3/(const byte) BLACK#0 ) [21] (void*) memset::str#3 ← phi( main::@4/(void*)(const byte*) COLS#0 main::@3/(void*)(const byte*) SCREEN#0 ) diff --git a/src/test/ref/examples/showlogo/showlogo.log b/src/test/ref/examples/showlogo/showlogo.log index b65c02d3f..5222f5114 100644 --- a/src/test/ref/examples/showlogo/showlogo.log +++ b/src/test/ref/examples/showlogo/showlogo.log @@ -37,6 +37,8 @@ CONTROL FLOW GRAPH SSA (byte) WHITE#0 ← (number) 1 (byte) DARK_GREY#0 ← (number) $b to:@8 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main::@10 main::@9 (byte) memset::c#5 ← phi( main::@10/(byte) memset::c#1 main::@9/(byte) memset::c#0 ) (void*) memset::str#4 ← phi( main::@10/(void*) memset::str#1 main::@9/(void*) memset::str#0 ) @@ -89,6 +91,8 @@ memset::@return: scope:[memset] from memset::@1 .byte logoPic.getMulticolorByte(x,cp+y*8) }} to:@9 + +(void()) main() main: scope:[main] from @9 *((byte*) BORDERCOL#0) ← (byte) WHITE#0 *((byte*) BGCOL2#0) ← (byte) DARK_GREY#0 @@ -569,6 +573,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 [5] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 [6] *((const byte*) BGCOL2#0) ← (const byte) DARK_GREY#0 @@ -597,6 +603,8 @@ main::@2: scope:[main] from main::@1 main::@2 [19] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7) kickasm() {{ inc $d020 }} to:main::@2 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main::@3 main::@4 [21] (byte) memset::c#4 ← phi( main::@4/(const byte) WHITE#0|(byte) 8 main::@3/(const byte) BLACK#0 ) [21] (void*) memset::str#3 ← phi( main::@4/(void*)(const byte*) COLS#0 main::@3/(void*)(const byte*) SCREEN#0 ) diff --git a/src/test/ref/examples/sinplotter/sine-plotter.cfg b/src/test/ref/examples/sinplotter/sine-plotter.cfg index a4fefb8ae..7a8aed633 100644 --- a/src/test/ref/examples/sinplotter/sine-plotter.cfg +++ b/src/test/ref/examples/sinplotter/sine-plotter.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -47,6 +49,8 @@ main::@6: scope:[main] from main::@5 main::@1: scope:[main] from main::@1 main::@6 [21] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) to:main::@1 + +(void()) render_sine() render_sine: scope:[render_sine] from main::@6 [22] phi() to:render_sine::@1 @@ -97,6 +101,8 @@ render_sine::@3: scope:[render_sine] from render_sine::@7 render_sine::@8 [49] (word) render_sine::xpos#9 ← phi( render_sine::@8/(word) render_sine::xpos#1 render_sine::@7/(byte) 0 ) [50] (word) render_sine::sin_idx#1 ← ++ (word) render_sine::sin_idx#2 to:render_sine::@1 + +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from render_sine::@4 render_sine::@6 [51] (word) bitmap_plot::x#2 ← phi( render_sine::@6/(word) bitmap_plot::x#1 render_sine::@4/(word) bitmap_plot::x#0 ) [51] (byte) bitmap_plot::y#2 ← phi( render_sine::@6/(byte) bitmap_plot::y#1 render_sine::@4/(byte) bitmap_plot::y#0 ) @@ -109,6 +115,8 @@ bitmap_plot: scope:[bitmap_plot] from render_sine::@4 render_sine::@6 bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot [57] return to:@return + +(byte()) wrap_y((signed word) wrap_y::y) wrap_y: scope:[wrap_y] from render_sine::@2 render_sine::@5 [58] (signed word) wrap_y::y#9 ← phi( render_sine::@5/(signed word) wrap_y::y#1 render_sine::@2/(signed word) wrap_y::y#0 ) to:wrap_y::@1 @@ -132,6 +140,8 @@ wrap_y::@4: scope:[wrap_y] from wrap_y::@3 wrap_y::@2: scope:[wrap_y] from wrap_y::@1 [66] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8 to:wrap_y::@1 + +(void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max) sin16s_gen2: scope:[sin16s_gen2] from main::@5 [67] phi() [68] call div32u16u @@ -167,6 +177,8 @@ sin16s_gen2::@5: scope:[sin16s_gen2] from sin16s_gen2::@4 [84] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [85] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 to:sin16s_gen2::@1 + +(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) mul16s: scope:[mul16s] from sin16s_gen2::@4 [86] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#0 [87] call mul16u @@ -190,6 +202,8 @@ mul16s::@2: scope:[mul16s] from mul16s::@1 mul16s::@return: scope:[mul16s] from mul16s::@2 [96] return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mul16s mulu16_sel [97] (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mulu16_sel/(word) mul16u::a#2 ) [97] (dword) mul16u::mb#0 ← phi( mul16s/(word)(const signed word) sin16s_gen2::ampl#0 mulu16_sel/(word) mul16u::b#1 ) @@ -215,6 +229,8 @@ mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4 [105] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 [106] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 to:mul16u::@1 + +(signed word()) sin16s((dword) sin16s::x) sin16s: scope:[sin16s] from sin16s_gen2::@2 [107] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 to:sin16s::@4 @@ -284,6 +300,8 @@ sin16s::@return: scope:[sin16s] from sin16s::@3 sin16s::@12: scope:[sin16s] from sin16s::@11 [146] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 to:sin16s::@3 + +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 [147] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) [147] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) @@ -301,6 +319,8 @@ mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 [155] return to:@return + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from sin16s_gen2 [156] phi() [157] call divr16u @@ -319,6 +339,8 @@ div32u16u::@2: scope:[div32u16u] from div32u16u::@1 div32u16u::@return: scope:[div32u16u] from div32u16u::@2 [165] return to:@return + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div32u16u div32u16u::@1 [166] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) [166] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) @@ -358,6 +380,8 @@ divr16u::@6: scope:[divr16u] from divr16u::@3 divr16u::@return: scope:[divr16u] from divr16u::@6 [183] return to:@return + +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) bitmap_clear: scope:[bitmap_clear] from main::@4 [184] phi() [185] call memset @@ -369,6 +393,8 @@ bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 [188] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [189] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) [189] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) @@ -390,6 +416,8 @@ memset::@3: scope:[memset] from memset::@2 [196] *((byte*) memset::dst#2) ← (byte) memset::c#4 [197] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) bitmap_init: scope:[bitmap_init] from main::@3 [198] phi() to:bitmap_init::@1 diff --git a/src/test/ref/examples/sinplotter/sine-plotter.log b/src/test/ref/examples/sinplotter/sine-plotter.log index 5d4518c34..b04fbaea2 100644 --- a/src/test/ref/examples/sinplotter/sine-plotter.log +++ b/src/test/ref/examples/sinplotter/sine-plotter.log @@ -103,6 +103,8 @@ CONTROL FLOW GRAPH SSA @6: scope:[] from @begin (word) rem16u#0 ← (number) 0 to:@17 + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div32u16u div32u16u::@2 (word) divr16u::divisor#6 ← phi( div32u16u/(word) divr16u::divisor#0 div32u16u::@2/(word) divr16u::divisor#1 ) (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@2/(word) divr16u::dividend#2 ) @@ -180,6 +182,8 @@ divr16u::@return: scope:[divr16u] from divr16u::@6 (word) rem16u#2 ← (word) rem16u#11 return to:@return + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from sin16s_gen2 (word) rem16u#20 ← phi( sin16s_gen2/(word) rem16u#21 ) (word) div32u16u::divisor#1 ← phi( sin16s_gen2/(word) div32u16u::divisor#0 ) @@ -223,6 +227,8 @@ div32u16u::@return: scope:[div32u16u] from div32u16u::@3 (word) rem16u#5 ← (word) rem16u#14 return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mul16s mulu16_sel (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mulu16_sel/(word) mul16u::a#2 ) (word) mul16u::b#2 ← phi( mul16s/(word) mul16u::b#0 mulu16_sel/(word) mul16u::b#1 ) @@ -270,6 +276,8 @@ mul16u::@return: scope:[mul16u] from mul16u::@3 (dword) mul16u::return#1 ← (dword) mul16u::return#4 return to:@return + +(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) mul16s: scope:[mul16s] from sin16s_gen2::@8 (signed word) mul16s::b#1 ← phi( sin16s_gen2::@8/(signed word) mul16s::b#0 ) (signed word) mul16s::a#1 ← phi( sin16s_gen2::@8/(signed word) mul16s::a#0 ) @@ -333,6 +341,8 @@ mul16s::@return: scope:[mul16s] from mul16s::@2 (dword) PI_u4f28#0 ← (number) $3243f6a9 (dword) PI_HALF_u4f28#0 ← (number) $1921fb54 to:@28 + +(void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max) sin16s_gen2: scope:[sin16s_gen2] from main::@10 (signed word*) sin16s_gen2::sintab#7 ← phi( main::@10/(signed word*) sin16s_gen2::sintab#1 ) (word) rem16u#21 ← phi( main::@10/(word) rem16u#23 ) @@ -428,6 +438,8 @@ sin16s_gen2::@return: scope:[sin16s_gen2] from sin16s_gen2::@1 (word) rem16u#7 ← (word) rem16u#16 return to:@return + +(signed word()) sin16s((dword) sin16s::x) sin16s: scope:[sin16s] from sin16s_gen2::@2 (dword) sin16s::x#3 ← phi( sin16s_gen2::@2/(dword) sin16s::x#0 ) (byte) sin16s::isUpper#0 ← (number) 0 @@ -549,6 +561,8 @@ sin16s::@return: scope:[sin16s] from sin16s::@3 (signed word) sin16s::return#2 ← (signed word) sin16s::return#4 return to:@return + +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@11 sin16s::@2 sin16s::@8 sin16s::@9 (byte) mulu16_sel::select#6 ← phi( sin16s::@10/(byte) mulu16_sel::select#3 sin16s::@11/(byte) mulu16_sel::select#4 sin16s::@2/(byte) mulu16_sel::select#0 sin16s::@8/(byte) mulu16_sel::select#1 sin16s::@9/(byte) mulu16_sel::select#2 ) (word) mulu16_sel::v2#5 ← phi( sin16s::@10/(word) mulu16_sel::v2#3 sin16s::@11/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@8/(word) mulu16_sel::v2#1 sin16s::@9/(word) mulu16_sel::v2#2 ) @@ -571,6 +585,8 @@ mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@2 (word) mulu16_sel::return#6 ← (word) mulu16_sel::return#12 return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from bitmap_clear bitmap_clear::@1 (byte) memset::c#5 ← phi( bitmap_clear/(byte) memset::c#0 bitmap_clear::@1/(byte) memset::c#1 ) (void*) memset::str#4 ← phi( bitmap_clear/(void*) memset::str#0 bitmap_clear::@1/(void*) memset::str#1 ) @@ -621,6 +637,8 @@ memset::@return: scope:[memset] from memset::@1 (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } to:@34 + +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) bitmap_init: scope:[bitmap_init] from main::@8 (byte*) bitmap_init::screen#1 ← phi( main::@8/(byte*) bitmap_init::screen#0 ) (byte*) bitmap_init::gfx#1 ← phi( main::@8/(byte*) bitmap_init::gfx#0 ) @@ -705,6 +723,8 @@ bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@6 (byte*) bitmap_screen#2 ← (byte*) bitmap_screen#6 return to:@return + +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) bitmap_clear: scope:[bitmap_clear] from main::@9 (byte*) bitmap_gfx#12 ← phi( main::@9/(byte*) bitmap_gfx#3 ) (byte*) bitmap_screen#7 ← phi( main::@9/(byte*) bitmap_screen#3 ) @@ -732,6 +752,8 @@ bitmap_clear::@2: scope:[bitmap_clear] from bitmap_clear::@1 bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@2 return to:@return + +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from render_sine::@11 render_sine::@9 (word) bitmap_plot::x#2 ← phi( render_sine::@11/(word) bitmap_plot::x#1 render_sine::@9/(word) bitmap_plot::x#0 ) (byte) bitmap_plot::y#2 ← phi( render_sine::@11/(byte) bitmap_plot::y#1 render_sine::@9/(byte) bitmap_plot::y#0 ) @@ -758,6 +780,8 @@ bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot } }} to:@37 + +(void()) main() main: scope:[main] from @37 (word) rem16u#43 ← phi( @37/(word) rem16u#25 ) (byte*) bitmap_screen#33 ← phi( @37/(byte*) bitmap_screen#14 ) @@ -901,6 +925,8 @@ main::@return: scope:[main] from main::@1 (word) rem16u#9 ← (word) rem16u#18 return to:@return + +(void()) render_sine() render_sine: scope:[render_sine] from main::@11 (word) render_sine::xpos#0 ← (number) 0 (word) render_sine::sin_idx#0 ← (number) 0 @@ -972,6 +998,8 @@ render_sine::@7: scope:[render_sine] from render_sine::@12 render_sine::@return: scope:[render_sine] from render_sine::@1 return to:@return + +(byte()) wrap_y((signed word) wrap_y::y) wrap_y: scope:[wrap_y] from render_sine::@10 render_sine::@2 (signed word) wrap_y::y#9 ← phi( render_sine::@10/(signed word) wrap_y::y#1 render_sine::@2/(signed word) wrap_y::y#0 ) to:wrap_y::@1 @@ -3012,6 +3040,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -3052,6 +3082,8 @@ main::@6: scope:[main] from main::@5 main::@1: scope:[main] from main::@1 main::@6 [21] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) to:main::@1 + +(void()) render_sine() render_sine: scope:[render_sine] from main::@6 [22] phi() to:render_sine::@1 @@ -3102,6 +3134,8 @@ render_sine::@3: scope:[render_sine] from render_sine::@7 render_sine::@8 [49] (word) render_sine::xpos#9 ← phi( render_sine::@8/(word) render_sine::xpos#1 render_sine::@7/(byte) 0 ) [50] (word) render_sine::sin_idx#1 ← ++ (word) render_sine::sin_idx#2 to:render_sine::@1 + +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from render_sine::@4 render_sine::@6 [51] (word) bitmap_plot::x#2 ← phi( render_sine::@6/(word) bitmap_plot::x#1 render_sine::@4/(word) bitmap_plot::x#0 ) [51] (byte) bitmap_plot::y#2 ← phi( render_sine::@6/(byte) bitmap_plot::y#1 render_sine::@4/(byte) bitmap_plot::y#0 ) @@ -3114,6 +3148,8 @@ bitmap_plot: scope:[bitmap_plot] from render_sine::@4 render_sine::@6 bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot [57] return to:@return + +(byte()) wrap_y((signed word) wrap_y::y) wrap_y: scope:[wrap_y] from render_sine::@2 render_sine::@5 [58] (signed word) wrap_y::y#9 ← phi( render_sine::@5/(signed word) wrap_y::y#1 render_sine::@2/(signed word) wrap_y::y#0 ) to:wrap_y::@1 @@ -3137,6 +3173,8 @@ wrap_y::@4: scope:[wrap_y] from wrap_y::@3 wrap_y::@2: scope:[wrap_y] from wrap_y::@1 [66] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8 to:wrap_y::@1 + +(void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max) sin16s_gen2: scope:[sin16s_gen2] from main::@5 [67] phi() [68] call div32u16u @@ -3172,6 +3210,8 @@ sin16s_gen2::@5: scope:[sin16s_gen2] from sin16s_gen2::@4 [84] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [85] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 to:sin16s_gen2::@1 + +(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) mul16s: scope:[mul16s] from sin16s_gen2::@4 [86] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#0 [87] call mul16u @@ -3195,6 +3235,8 @@ mul16s::@2: scope:[mul16s] from mul16s::@1 mul16s::@return: scope:[mul16s] from mul16s::@2 [96] return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mul16s mulu16_sel [97] (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mulu16_sel/(word) mul16u::a#2 ) [97] (dword) mul16u::mb#0 ← phi( mul16s/(word)(const signed word) sin16s_gen2::ampl#0 mulu16_sel/(word) mul16u::b#1 ) @@ -3220,6 +3262,8 @@ mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4 [105] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 [106] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 to:mul16u::@1 + +(signed word()) sin16s((dword) sin16s::x) sin16s: scope:[sin16s] from sin16s_gen2::@2 [107] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 to:sin16s::@4 @@ -3289,6 +3333,8 @@ sin16s::@return: scope:[sin16s] from sin16s::@3 sin16s::@12: scope:[sin16s] from sin16s::@11 [146] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 to:sin16s::@3 + +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 [147] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) [147] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) @@ -3306,6 +3352,8 @@ mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 [155] return to:@return + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from sin16s_gen2 [156] phi() [157] call divr16u @@ -3324,6 +3372,8 @@ div32u16u::@2: scope:[div32u16u] from div32u16u::@1 div32u16u::@return: scope:[div32u16u] from div32u16u::@2 [165] return to:@return + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div32u16u div32u16u::@1 [166] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) [166] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) @@ -3363,6 +3413,8 @@ divr16u::@6: scope:[divr16u] from divr16u::@3 divr16u::@return: scope:[divr16u] from divr16u::@6 [183] return to:@return + +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) bitmap_clear: scope:[bitmap_clear] from main::@4 [184] phi() [185] call memset @@ -3374,6 +3426,8 @@ bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 [188] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from bitmap_clear bitmap_clear::@1 [189] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) [189] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) @@ -3395,6 +3449,8 @@ memset::@3: scope:[memset] from memset::@2 [196] *((byte*) memset::dst#2) ← (byte) memset::c#4 [197] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) bitmap_init: scope:[bitmap_init] from main::@3 [198] phi() to:bitmap_init::@1 diff --git a/src/test/ref/examples/sinsprites/sinus-sprites.cfg b/src/test/ref/examples/sinsprites/sinus-sprites.cfg index 984bbcb12..d7dd46a5d 100644 --- a/src/test/ref/examples/sinsprites/sinus-sprites.cfg +++ b/src/test/ref/examples/sinsprites/sinus-sprites.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call init @@ -20,6 +22,8 @@ main::@2: scope:[main] from main::@1 [8] phi() [9] call anim to:main::@1 + +(void()) anim() anim: scope:[anim] from main::@2 [10] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) [11] (byte) anim::xidx#0 ← (byte) sin_idx_x#13 @@ -81,6 +85,8 @@ anim::@2: scope:[anim] from anim::@1 anim::@10 anim::@return: scope:[anim] from anim::@2 [42] return to:@return + +(void()) init() init: scope:[init] from main [43] phi() [44] call clear_screen @@ -123,6 +129,8 @@ init::@8: scope:[init] from init::@7 init::@return: scope:[init] from init::@8 [64] return to:@return + +(void()) clear_screen() clear_screen: scope:[clear_screen] from init init::@8 [65] phi() to:clear_screen::@1 @@ -137,6 +145,8 @@ clear_screen::@2: scope:[clear_screen] from clear_screen::@1 [69] *((byte*) clear_screen::sc#2) ← (byte) ' ' [70] (byte*) clear_screen::sc#1 ← ++ (byte*) clear_screen::sc#2 to:clear_screen::@1 + +(void()) gen_sintab((byte*) gen_sintab::sintab , (byte) gen_sintab::length , (byte) gen_sintab::min , (byte) gen_sintab::max) gen_sintab: scope:[gen_sintab] from init::@5 init::@7 [71] (byte*) gen_sintab::sintab#13 ← phi( init::@5/(const byte[$dd]) sintab_x#0 init::@7/(const byte[$c5]) sintab_y#0 ) [71] (byte) gen_sintab::length#10 ← phi( init::@5/(const byte) sinlen_x#0 init::@7/(const byte) sinlen_y#0 ) @@ -240,6 +250,8 @@ gen_sintab::@21: scope:[gen_sintab] from gen_sintab::@20 gen_sintab::@22: scope:[gen_sintab] from gen_sintab::@21 [120] (byte) gen_sintab::i#1 ← ++ (byte) gen_sintab::i#10 to:gen_sintab::@1 + +(void()) progress_inc() progress_inc: scope:[progress_inc] from gen_sintab::@21 [121] (byte) progress_idx#10 ← ++ (byte) progress_idx#14 [122] if((byte) progress_idx#10!=(byte) 8) goto progress_inc::@1 @@ -256,6 +268,8 @@ progress_inc::@1: scope:[progress_inc] from progress_inc progress_inc::@2 progress_inc::@return: scope:[progress_inc] from progress_inc::@1 [127] return to:@return + +(word()) getFAC() getFAC: scope:[getFAC] from gen_sintab::@20 asm { jsr$b1aa stymemLo stamemHi } [129] (word) getFAC::return#0 ← *((const byte*) memHi#0) w= *((const byte*) memLo#0) @@ -263,6 +277,8 @@ getFAC: scope:[getFAC] from gen_sintab::@20 getFAC::@return: scope:[getFAC] from getFAC [130] return to:@return + +(void()) addMEMtoFAC((byte*) addMEMtoFAC::mem) addMEMtoFAC: scope:[addMEMtoFAC] from gen_sintab::@11 gen_sintab::@19 [131] phi() to:addMEMtoFAC::prepareMEM1 @@ -276,6 +292,8 @@ addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC::prepareMEM1 addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 [135] return to:@return + +(void()) mulFACbyMEM((byte*) mulFACbyMEM::mem) mulFACbyMEM: scope:[mulFACbyMEM] from gen_sintab::@13 gen_sintab::@18 [136] (byte*) mulFACbyMEM::mem#2 ← phi( gen_sintab::@13/(const byte*) gen_sintab::f_2pi#0 gen_sintab::@18/(const byte[]) gen_sintab::f_amp#0 ) to:mulFACbyMEM::prepareMEM1 @@ -291,12 +309,16 @@ mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM::prepareMEM1 mulFACbyMEM::@return: scope:[mulFACbyMEM] from mulFACbyMEM::@1 [142] return to:@return + +(void()) sinFAC() sinFAC: scope:[sinFAC] from gen_sintab::@17 asm { jsr$e26b } to:sinFAC::@return sinFAC::@return: scope:[sinFAC] from sinFAC [144] return to:@return + +(void()) divMEMbyFAC((byte*) divMEMbyFAC::mem) divMEMbyFAC: scope:[divMEMbyFAC] from gen_sintab::@16 gen_sintab::@9 [145] (byte*) divMEMbyFAC::mem#2 ← phi( gen_sintab::@9/(const byte[]) gen_sintab::f_amp#0 gen_sintab::@16/(const byte[]) gen_sintab::f_i#0 ) to:divMEMbyFAC::prepareMEM1 @@ -312,6 +334,8 @@ divMEMbyFAC::@1: scope:[divMEMbyFAC] from divMEMbyFAC::prepareMEM1 divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 [151] return to:@return + +(void()) setFAC((word) setFAC::w) setFAC: scope:[setFAC] from gen_sintab gen_sintab::@15 gen_sintab::@2 gen_sintab::@4 gen_sintab::@8 [152] (word) setFAC::prepareMEM1_mem#0 ← phi( gen_sintab/(word) setFAC::w#0 gen_sintab::@8/(byte) 2 gen_sintab::@2/(word) setFAC::w#3 gen_sintab::@15/(word) setFAC::w#4 gen_sintab::@4/(word) setFAC::w#1 ) to:setFAC::prepareMEM1 @@ -327,6 +351,8 @@ setFAC::@1: scope:[setFAC] from setFAC::prepareMEM1 setFAC::@return: scope:[setFAC] from setFAC::@1 [158] return to:@return + +(void()) setMEMtoFAC((byte*) setMEMtoFAC::mem) setMEMtoFAC: scope:[setMEMtoFAC] from gen_sintab::@10 gen_sintab::@12 gen_sintab::@14 gen_sintab::@5 gen_sintab::@7 [159] (byte*) setMEMtoFAC::mem#5 ← phi( gen_sintab::@7/(const byte[]) gen_sintab::f_amp#0 gen_sintab::@10/(const byte[]) gen_sintab::f_amp#0 gen_sintab::@12/(const byte[]) gen_sintab::f_min#0 gen_sintab::@14/(const byte[]) gen_sintab::f_i#0 gen_sintab::@5/(const byte[]) gen_sintab::f_min#0 ) to:setMEMtoFAC::prepareMEM1 @@ -342,24 +368,32 @@ setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC::prepareMEM1 setMEMtoFAC::@return: scope:[setMEMtoFAC] from setMEMtoFAC::@1 [165] return to:@return + +(void()) subFACfromARG() subFACfromARG: scope:[subFACfromARG] from gen_sintab::@6 asm { jsr$b853 } to:subFACfromARG::@return subFACfromARG::@return: scope:[subFACfromARG] from subFACfromARG [167] return to:@return + +(void()) setARGtoFAC() setARGtoFAC: scope:[setARGtoFAC] from gen_sintab::@3 asm { jsr$bc0f } to:setARGtoFAC::@return setARGtoFAC::@return: scope:[setARGtoFAC] from setARGtoFAC [169] return to:@return + +(void()) progress_init((byte*) progress_init::line) progress_init: scope:[progress_init] from init::@4 init::@6 [170] (byte*) progress_init::line#2 ← phi( init::@4/(const byte*) SCREEN#0 init::@6/(const byte*) SCREEN#0+(byte) $28 ) to:progress_init::@return progress_init::@return: scope:[progress_init] from progress_init [171] return to:@return + +(void()) gen_sprites() gen_sprites: scope:[gen_sprites] from init::@3 [172] phi() to:gen_sprites::@1 @@ -378,6 +412,8 @@ gen_sprites::@2: scope:[gen_sprites] from gen_sprites::@1 gen_sprites::@return: scope:[gen_sprites] from gen_sprites::@2 [180] return to:@return + +(void()) gen_chargen_sprite((byte) gen_chargen_sprite::ch , (byte*) gen_chargen_sprite::sprite) gen_chargen_sprite: scope:[gen_chargen_sprite] from gen_sprites::@1 [181] (word~) gen_chargen_sprite::$0 ← (word)(byte) gen_chargen_sprite::ch#0 [182] (word~) gen_chargen_sprite::$1 ← (word~) gen_chargen_sprite::$0 << (byte) 3 @@ -445,6 +481,8 @@ gen_chargen_sprite::@9: scope:[gen_chargen_sprite] from gen_chargen_sprite::@8 gen_chargen_sprite::@return: scope:[gen_chargen_sprite] from gen_chargen_sprite::@9 [213] return to:@return + +(void()) place_sprites() place_sprites: scope:[place_sprites] from init::@2 [214] *((const byte*) SPRITES_ENABLE#0) ← (byte) $7f [215] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) $7f diff --git a/src/test/ref/examples/sinsprites/sinus-sprites.log b/src/test/ref/examples/sinsprites/sinus-sprites.log index 3a3e92be0..5a0e484f0 100644 --- a/src/test/ref/examples/sinsprites/sinus-sprites.log +++ b/src/test/ref/examples/sinsprites/sinus-sprites.log @@ -131,6 +131,8 @@ CONTROL FLOW GRAPH SSA (byte*) memLo#0 ← ((byte*)) (number) $fe (byte*) memHi#0 ← ((byte*)) (number) $ff to:@67 + +(void()) setFAC((word) setFAC::w) setFAC: scope:[setFAC] from gen_sintab gen_sintab::@12 gen_sintab::@2 gen_sintab::@20 gen_sintab::@8 (word) setFAC::w#5 ← phi( gen_sintab/(word) setFAC::w#0 gen_sintab::@12/(word) setFAC::w#2 gen_sintab::@2/(word) setFAC::w#3 gen_sintab::@20/(word) setFAC::w#4 gen_sintab::@8/(word) setFAC::w#1 ) (word) setFAC::prepareMEM1_mem#0 ← (word) setFAC::w#5 @@ -148,6 +150,8 @@ setFAC::@1: scope:[setFAC] from setFAC::prepareMEM1 setFAC::@return: scope:[setFAC] from setFAC::@1 return to:@return + +(word()) getFAC() getFAC: scope:[getFAC] from gen_sintab::@25 asm { jsr$b1aa stymemLo stamemHi } (word) getFAC::w#0 ← ((word)) { *((byte*) memHi#0), *((byte*) memLo#0) } @@ -158,12 +162,16 @@ getFAC::@return: scope:[getFAC] from getFAC (word) getFAC::return#1 ← (word) getFAC::return#3 return to:@return + +(void()) setARGtoFAC() setARGtoFAC: scope:[setARGtoFAC] from gen_sintab::@7 asm { jsr$bc0f } to:setARGtoFAC::@return setARGtoFAC::@return: scope:[setARGtoFAC] from setARGtoFAC return to:@return + +(void()) setMEMtoFAC((byte*) setMEMtoFAC::mem) setMEMtoFAC: scope:[setMEMtoFAC] from gen_sintab::@11 gen_sintab::@14 gen_sintab::@16 gen_sintab::@19 gen_sintab::@9 (byte*) setMEMtoFAC::mem#5 ← phi( gen_sintab::@11/(byte*) setMEMtoFAC::mem#1 gen_sintab::@14/(byte*) setMEMtoFAC::mem#2 gen_sintab::@16/(byte*) setMEMtoFAC::mem#3 gen_sintab::@19/(byte*) setMEMtoFAC::mem#4 gen_sintab::@9/(byte*) setMEMtoFAC::mem#0 ) (word~) setMEMtoFAC::$0 ← ((word)) (byte*) setMEMtoFAC::mem#5 @@ -182,6 +190,8 @@ setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC::prepareMEM1 setMEMtoFAC::@return: scope:[setMEMtoFAC] from setMEMtoFAC::@1 return to:@return + +(void()) addMEMtoFAC((byte*) addMEMtoFAC::mem) addMEMtoFAC: scope:[addMEMtoFAC] from gen_sintab::@15 gen_sintab::@24 (byte*) addMEMtoFAC::mem#2 ← phi( gen_sintab::@15/(byte*) addMEMtoFAC::mem#0 gen_sintab::@24/(byte*) addMEMtoFAC::mem#1 ) (word~) addMEMtoFAC::$0 ← ((word)) (byte*) addMEMtoFAC::mem#2 @@ -200,12 +210,16 @@ addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC::prepareMEM1 addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 return to:@return + +(void()) subFACfromARG() subFACfromARG: scope:[subFACfromARG] from gen_sintab::@10 asm { jsr$b853 } to:subFACfromARG::@return subFACfromARG::@return: scope:[subFACfromARG] from subFACfromARG return to:@return + +(void()) divMEMbyFAC((byte*) divMEMbyFAC::mem) divMEMbyFAC: scope:[divMEMbyFAC] from gen_sintab::@13 gen_sintab::@21 (byte*) divMEMbyFAC::mem#2 ← phi( gen_sintab::@13/(byte*) divMEMbyFAC::mem#0 gen_sintab::@21/(byte*) divMEMbyFAC::mem#1 ) (word~) divMEMbyFAC::$0 ← ((word)) (byte*) divMEMbyFAC::mem#2 @@ -224,6 +238,8 @@ divMEMbyFAC::@1: scope:[divMEMbyFAC] from divMEMbyFAC::prepareMEM1 divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 return to:@return + +(void()) mulFACbyMEM((byte*) mulFACbyMEM::mem) mulFACbyMEM: scope:[mulFACbyMEM] from gen_sintab::@18 gen_sintab::@23 (byte*) mulFACbyMEM::mem#2 ← phi( gen_sintab::@18/(byte*) mulFACbyMEM::mem#0 gen_sintab::@23/(byte*) mulFACbyMEM::mem#1 ) (word~) mulFACbyMEM::$0 ← ((word)) (byte*) mulFACbyMEM::mem#2 @@ -242,6 +258,8 @@ mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM::prepareMEM1 mulFACbyMEM::@return: scope:[mulFACbyMEM] from mulFACbyMEM::@1 return to:@return + +(void()) sinFAC() sinFAC: scope:[sinFAC] from gen_sintab::@22 asm { jsr$e26b } to:sinFAC::@return @@ -256,6 +274,8 @@ sinFAC::@return: scope:[sinFAC] from sinFAC (byte*) sprites#0 ← ((byte*)) (number) $2000 (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@70 + +(void()) main() main: scope:[main] from @77 (byte) sin_idx_y#23 ← phi( @77/(byte) sin_idx_y#17 ) (byte) sin_idx_x#25 ← phi( @77/(byte) sin_idx_x#16 ) @@ -306,6 +326,8 @@ main::@return: scope:[main] from main::@6 (byte) sin_idx_y#1 ← (byte) sin_idx_y#8 return to:@return + +(void()) init() init: scope:[init] from main (byte) progress_idx#52 ← phi( main/(byte) progress_idx#30 ) (byte*) progress_cursor#52 ← phi( main/(byte*) progress_cursor#29 ) @@ -392,6 +414,8 @@ init::@return: scope:[init] from init::@10 (byte) progress_idx#6 ← (byte) progress_idx#22 return to:@return + +(void()) clear_screen() clear_screen: scope:[clear_screen] from init init::@9 (byte*) clear_screen::sc#0 ← (byte*) SCREEN#0 to:clear_screen::@1 @@ -413,6 +437,8 @@ clear_screen::@return: scope:[clear_screen] from clear_screen::@1 (byte*) progress_cursor#7 ← (byte*) SCREEN#0 (byte) progress_idx#7 ← (number) 0 to:@72 + +(void()) progress_init((byte*) progress_init::line) progress_init: scope:[progress_init] from init::@5 init::@7 (byte*) progress_init::line#2 ← phi( init::@5/(byte*) progress_init::line#0 init::@7/(byte*) progress_init::line#1 ) (byte*) progress_cursor#8 ← (byte*) progress_init::line#2 @@ -425,6 +451,8 @@ progress_init::@return: scope:[progress_init] from progress_init (byte) progress_idx#9 ← (byte) progress_idx#23 return to:@return + +(void()) progress_inc() progress_inc: scope:[progress_inc] from gen_sintab::@26 (byte*) progress_cursor#33 ← phi( gen_sintab::@26/(byte*) progress_cursor#34 ) (byte) progress_idx#24 ← phi( gen_sintab::@26/(byte) progress_idx#34 ) @@ -458,6 +486,8 @@ progress_inc::@return: scope:[progress_inc] from progress_inc::@1 (byte) sin_idx_x#2 ← (number) 0 (byte) sin_idx_y#2 ← (number) 0 to:@77 + +(void()) anim() anim: scope:[anim] from main::@3 (byte) sin_idx_y#9 ← phi( main::@3/(byte) sin_idx_y#13 ) (byte) sin_idx_x#9 ← phi( main::@3/(byte) sin_idx_x#13 ) @@ -580,6 +610,8 @@ anim::@return: scope:[anim] from anim::@2 (byte) sin_idx_y#5 ← (byte) sin_idx_y#11 return to:@return + +(void()) place_sprites() place_sprites: scope:[place_sprites] from init::@2 *((byte*) SPRITES_ENABLE#0) ← (number) $7f *((byte*) SPRITES_EXPAND_X#0) ← (number) $7f @@ -620,6 +652,8 @@ place_sprites::@1: scope:[place_sprites] from place_sprites place_sprites::@1 place_sprites::@return: scope:[place_sprites] from place_sprites::@1 return to:@return + +(void()) gen_sprites() gen_sprites: scope:[gen_sprites] from init::@4 (byte[]) gen_sprites::cml#0 ← (const string) gen_sprites::$3 (byte*) gen_sprites::spr#0 ← (byte*) sprites#0 @@ -644,6 +678,8 @@ gen_sprites::@3: scope:[gen_sprites] from gen_sprites::@1 gen_sprites::@return: scope:[gen_sprites] from gen_sprites::@3 return to:@return + +(void()) gen_chargen_sprite((byte) gen_chargen_sprite::ch , (byte*) gen_chargen_sprite::sprite) gen_chargen_sprite: scope:[gen_chargen_sprite] from gen_sprites::@1 (byte*) gen_chargen_sprite::sprite#12 ← phi( gen_sprites::@1/(byte*) gen_chargen_sprite::sprite#0 ) (byte) gen_chargen_sprite::ch#1 ← phi( gen_sprites::@1/(byte) gen_chargen_sprite::ch#0 ) @@ -778,6 +814,8 @@ gen_chargen_sprite::@9: scope:[gen_chargen_sprite] from gen_chargen_sprite::@8 gen_chargen_sprite::@return: scope:[gen_chargen_sprite] from gen_chargen_sprite::@9 return to:@return + +(void()) gen_sintab((byte*) gen_sintab::sintab , (byte) gen_sintab::length , (byte) gen_sintab::min , (byte) gen_sintab::max) gen_sintab: scope:[gen_sintab] from init::@6 init::@8 (byte*) gen_sintab::sintab#25 ← phi( init::@6/(byte*) gen_sintab::sintab#0 init::@8/(byte*) gen_sintab::sintab#1 ) (byte*) progress_cursor#65 ← phi( init::@6/(byte*) progress_cursor#2 init::@8/(byte*) progress_cursor#4 ) @@ -2839,6 +2877,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call init @@ -2852,6 +2892,8 @@ main::@2: scope:[main] from main::@1 [8] phi() [9] call anim to:main::@1 + +(void()) anim() anim: scope:[anim] from main::@2 [10] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) [11] (byte) anim::xidx#0 ← (byte) sin_idx_x#13 @@ -2913,6 +2955,8 @@ anim::@2: scope:[anim] from anim::@1 anim::@10 anim::@return: scope:[anim] from anim::@2 [42] return to:@return + +(void()) init() init: scope:[init] from main [43] phi() [44] call clear_screen @@ -2955,6 +2999,8 @@ init::@8: scope:[init] from init::@7 init::@return: scope:[init] from init::@8 [64] return to:@return + +(void()) clear_screen() clear_screen: scope:[clear_screen] from init init::@8 [65] phi() to:clear_screen::@1 @@ -2969,6 +3015,8 @@ clear_screen::@2: scope:[clear_screen] from clear_screen::@1 [69] *((byte*) clear_screen::sc#2) ← (byte) ' ' [70] (byte*) clear_screen::sc#1 ← ++ (byte*) clear_screen::sc#2 to:clear_screen::@1 + +(void()) gen_sintab((byte*) gen_sintab::sintab , (byte) gen_sintab::length , (byte) gen_sintab::min , (byte) gen_sintab::max) gen_sintab: scope:[gen_sintab] from init::@5 init::@7 [71] (byte*) gen_sintab::sintab#13 ← phi( init::@5/(const byte[$dd]) sintab_x#0 init::@7/(const byte[$c5]) sintab_y#0 ) [71] (byte) gen_sintab::length#10 ← phi( init::@5/(const byte) sinlen_x#0 init::@7/(const byte) sinlen_y#0 ) @@ -3072,6 +3120,8 @@ gen_sintab::@21: scope:[gen_sintab] from gen_sintab::@20 gen_sintab::@22: scope:[gen_sintab] from gen_sintab::@21 [120] (byte) gen_sintab::i#1 ← ++ (byte) gen_sintab::i#10 to:gen_sintab::@1 + +(void()) progress_inc() progress_inc: scope:[progress_inc] from gen_sintab::@21 [121] (byte) progress_idx#10 ← ++ (byte) progress_idx#14 [122] if((byte) progress_idx#10!=(byte) 8) goto progress_inc::@1 @@ -3088,6 +3138,8 @@ progress_inc::@1: scope:[progress_inc] from progress_inc progress_inc::@2 progress_inc::@return: scope:[progress_inc] from progress_inc::@1 [127] return to:@return + +(word()) getFAC() getFAC: scope:[getFAC] from gen_sintab::@20 asm { jsr$b1aa stymemLo stamemHi } [129] (word) getFAC::return#0 ← *((const byte*) memHi#0) w= *((const byte*) memLo#0) @@ -3095,6 +3147,8 @@ getFAC: scope:[getFAC] from gen_sintab::@20 getFAC::@return: scope:[getFAC] from getFAC [130] return to:@return + +(void()) addMEMtoFAC((byte*) addMEMtoFAC::mem) addMEMtoFAC: scope:[addMEMtoFAC] from gen_sintab::@11 gen_sintab::@19 [131] phi() to:addMEMtoFAC::prepareMEM1 @@ -3108,6 +3162,8 @@ addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC::prepareMEM1 addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 [135] return to:@return + +(void()) mulFACbyMEM((byte*) mulFACbyMEM::mem) mulFACbyMEM: scope:[mulFACbyMEM] from gen_sintab::@13 gen_sintab::@18 [136] (byte*) mulFACbyMEM::mem#2 ← phi( gen_sintab::@13/(const byte*) gen_sintab::f_2pi#0 gen_sintab::@18/(const byte[]) gen_sintab::f_amp#0 ) to:mulFACbyMEM::prepareMEM1 @@ -3123,12 +3179,16 @@ mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM::prepareMEM1 mulFACbyMEM::@return: scope:[mulFACbyMEM] from mulFACbyMEM::@1 [142] return to:@return + +(void()) sinFAC() sinFAC: scope:[sinFAC] from gen_sintab::@17 asm { jsr$e26b } to:sinFAC::@return sinFAC::@return: scope:[sinFAC] from sinFAC [144] return to:@return + +(void()) divMEMbyFAC((byte*) divMEMbyFAC::mem) divMEMbyFAC: scope:[divMEMbyFAC] from gen_sintab::@16 gen_sintab::@9 [145] (byte*) divMEMbyFAC::mem#2 ← phi( gen_sintab::@9/(const byte[]) gen_sintab::f_amp#0 gen_sintab::@16/(const byte[]) gen_sintab::f_i#0 ) to:divMEMbyFAC::prepareMEM1 @@ -3144,6 +3204,8 @@ divMEMbyFAC::@1: scope:[divMEMbyFAC] from divMEMbyFAC::prepareMEM1 divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 [151] return to:@return + +(void()) setFAC((word) setFAC::w) setFAC: scope:[setFAC] from gen_sintab gen_sintab::@15 gen_sintab::@2 gen_sintab::@4 gen_sintab::@8 [152] (word) setFAC::prepareMEM1_mem#0 ← phi( gen_sintab/(word) setFAC::w#0 gen_sintab::@8/(byte) 2 gen_sintab::@2/(word) setFAC::w#3 gen_sintab::@15/(word) setFAC::w#4 gen_sintab::@4/(word) setFAC::w#1 ) to:setFAC::prepareMEM1 @@ -3159,6 +3221,8 @@ setFAC::@1: scope:[setFAC] from setFAC::prepareMEM1 setFAC::@return: scope:[setFAC] from setFAC::@1 [158] return to:@return + +(void()) setMEMtoFAC((byte*) setMEMtoFAC::mem) setMEMtoFAC: scope:[setMEMtoFAC] from gen_sintab::@10 gen_sintab::@12 gen_sintab::@14 gen_sintab::@5 gen_sintab::@7 [159] (byte*) setMEMtoFAC::mem#5 ← phi( gen_sintab::@7/(const byte[]) gen_sintab::f_amp#0 gen_sintab::@10/(const byte[]) gen_sintab::f_amp#0 gen_sintab::@12/(const byte[]) gen_sintab::f_min#0 gen_sintab::@14/(const byte[]) gen_sintab::f_i#0 gen_sintab::@5/(const byte[]) gen_sintab::f_min#0 ) to:setMEMtoFAC::prepareMEM1 @@ -3174,24 +3238,32 @@ setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC::prepareMEM1 setMEMtoFAC::@return: scope:[setMEMtoFAC] from setMEMtoFAC::@1 [165] return to:@return + +(void()) subFACfromARG() subFACfromARG: scope:[subFACfromARG] from gen_sintab::@6 asm { jsr$b853 } to:subFACfromARG::@return subFACfromARG::@return: scope:[subFACfromARG] from subFACfromARG [167] return to:@return + +(void()) setARGtoFAC() setARGtoFAC: scope:[setARGtoFAC] from gen_sintab::@3 asm { jsr$bc0f } to:setARGtoFAC::@return setARGtoFAC::@return: scope:[setARGtoFAC] from setARGtoFAC [169] return to:@return + +(void()) progress_init((byte*) progress_init::line) progress_init: scope:[progress_init] from init::@4 init::@6 [170] (byte*) progress_init::line#2 ← phi( init::@4/(const byte*) SCREEN#0 init::@6/(const byte*) SCREEN#0+(byte) $28 ) to:progress_init::@return progress_init::@return: scope:[progress_init] from progress_init [171] return to:@return + +(void()) gen_sprites() gen_sprites: scope:[gen_sprites] from init::@3 [172] phi() to:gen_sprites::@1 @@ -3210,6 +3282,8 @@ gen_sprites::@2: scope:[gen_sprites] from gen_sprites::@1 gen_sprites::@return: scope:[gen_sprites] from gen_sprites::@2 [180] return to:@return + +(void()) gen_chargen_sprite((byte) gen_chargen_sprite::ch , (byte*) gen_chargen_sprite::sprite) gen_chargen_sprite: scope:[gen_chargen_sprite] from gen_sprites::@1 [181] (word~) gen_chargen_sprite::$0 ← (word)(byte) gen_chargen_sprite::ch#0 [182] (word~) gen_chargen_sprite::$1 ← (word~) gen_chargen_sprite::$0 << (byte) 3 @@ -3277,6 +3351,8 @@ gen_chargen_sprite::@9: scope:[gen_chargen_sprite] from gen_chargen_sprite::@8 gen_chargen_sprite::@return: scope:[gen_chargen_sprite] from gen_chargen_sprite::@9 [213] return to:@return + +(void()) place_sprites() place_sprites: scope:[place_sprites] from init::@2 [214] *((const byte*) SPRITES_ENABLE#0) ← (byte) $7f [215] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) $7f diff --git a/src/test/ref/examples/zpcode/zpcode.cfg b/src/test/ref/examples/zpcode/zpcode.cfg index a1de52c29..77661ea75 100644 --- a/src/test/ref/examples/zpcode/zpcode.cfg +++ b/src/test/ref/examples/zpcode/zpcode.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } to:main::@1 @@ -32,6 +34,8 @@ main::@2: scope:[main] from main::@1 [13] *((const byte*) main::zpCode#0 + (byte) main::i#2) ← *((const byte[]) zpCodeData#0 + (byte) main::i#2) [14] (byte) main::i#1 ← ++ (byte) main::i#2 to:main::@1 + +(void()) zpLoop() zpLoop: scope:[zpLoop] from main::@5 [15] phi() to:zpLoop::@1 @@ -44,6 +48,8 @@ zpLoop::@1: scope:[zpLoop] from zpLoop zpLoop::@1 zpLoop::@return: scope:[zpLoop] from zpLoop::@1 [20] return to:@return + +(void()) loop() loop: scope:[loop] from main::@4 [21] phi() to:loop::@1 diff --git a/src/test/ref/examples/zpcode/zpcode.log b/src/test/ref/examples/zpcode/zpcode.log index c0e61cca5..4a620484d 100644 --- a/src/test/ref/examples/zpcode/zpcode.log +++ b/src/test/ref/examples/zpcode/zpcode.log @@ -25,6 +25,8 @@ CONTROL FLOW GRAPH SSA (byte*) RASTER#0 ← ((byte*)) (number) $d012 (byte*) BGCOL#0 ← ((byte*)) (number) $d020 to:@2 + +(void()) main() main: scope:[main] from @3 asm { sei } (void()*~) main::$0 ← & (void()) zpLoop() @@ -63,6 +65,8 @@ main::@20: scope:[main] from main::@19 main::@return: scope:[main] from main::@7 return to:@return + +(void()) loop() loop: scope:[loop] from main::@12 (byte) loop::i#0 ← (byte) 0 to:loop::@1 @@ -80,6 +84,8 @@ loop::@return: scope:[loop] from loop::@1 (byte[]) zpCodeData#0 ← kickasm {{ .segmentout [segments="ZpCode"] }} to:@3 + +(void()) zpLoop() zpLoop: scope:[zpLoop] from main::@19 (byte) zpLoop::i#0 ← (byte) 0 to:zpLoop::@1 @@ -274,6 +280,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } to:main::@1 @@ -299,6 +307,8 @@ main::@2: scope:[main] from main::@1 [13] *((const byte*) main::zpCode#0 + (byte) main::i#2) ← *((const byte[]) zpCodeData#0 + (byte) main::i#2) [14] (byte) main::i#1 ← ++ (byte) main::i#2 to:main::@1 + +(void()) zpLoop() zpLoop: scope:[zpLoop] from main::@5 [15] phi() to:zpLoop::@1 @@ -311,6 +321,8 @@ zpLoop::@1: scope:[zpLoop] from zpLoop zpLoop::@1 zpLoop::@return: scope:[zpLoop] from zpLoop::@1 [20] return to:@return + +(void()) loop() loop: scope:[loop] from main::@4 [21] phi() to:loop::@1 diff --git a/src/test/ref/fastmultiply-127.cfg b/src/test/ref/fastmultiply-127.cfg index e51359e75..c0cbe0282 100644 --- a/src/test/ref/fastmultiply-127.cfg +++ b/src/test/ref/fastmultiply-127.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -102,6 +104,8 @@ main::@22: scope:[main] from main::@21 main::@return: scope:[main] from main::@22 [50] return to:@return + +(void()) print_mulf8s127((signed byte) print_mulf8s127::a , (signed byte) print_mulf8s127::b) print_mulf8s127: scope:[print_mulf8s127] from main::@13 main::@14 main::@15 main::@16 main::@17 main::@18 main::@19 main::@20 main::@21 main::@22 [51] (signed byte) print_mulf8s127::b#10 ← phi( main::@13/(signed byte) 0 main::@14/(signed byte) $40 main::@15/(signed byte) $7f main::@16/(signed byte) $40 main::@17/(signed byte) -$40 main::@18/(signed byte) -$40 main::@19/(signed byte) $7f main::@20/(signed byte) $7f main::@21/(signed byte) -$7f main::@22/(signed byte) -$7f ) [51] (signed byte) print_mulf8s127::a#10 ← phi( main::@13/(signed byte) 0 main::@14/(signed byte) $40 main::@15/(signed byte) $40 main::@16/(signed byte) -$40 main::@17/(signed byte) $40 main::@18/(signed byte) -$40 main::@19/(signed byte) $7f main::@20/(signed byte) -$7f main::@21/(signed byte) $7f main::@22/(signed byte) -$7f ) @@ -139,6 +143,8 @@ print_mulf8s127::@6: scope:[print_mulf8s127] from print_mulf8s127::@5 print_mulf8s127::@return: scope:[print_mulf8s127] from print_mulf8s127::@6 [70] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from main::@12 main::@2 print_mulf8s127::@6 print_mulf8u127::@6 [71] (byte*) print_char_cursor#123 ← phi( main::@12/(byte*) print_char_cursor#122 main::@2/(byte*) print_char_cursor#122 print_mulf8s127::@6/(byte*) print_char_cursor#19 print_mulf8u127::@6/(byte*) print_char_cursor#19 ) [71] (byte*) print_line_cursor#63 ← phi( main::@12/(byte*) print_line_cursor#1 main::@2/(byte*) 1024 print_mulf8s127::@6/(byte*) print_line_cursor#1 print_mulf8u127::@6/(byte*) print_line_cursor#1 ) @@ -151,6 +157,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [75] return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from print_mulf8s127::@5 [76] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 to:print_sword::@3 @@ -173,6 +181,8 @@ print_sword::@1: scope:[print_sword] from print_sword print_sword::@4: scope:[print_sword] from print_sword::@1 [85] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#1 to:print_sword::@2 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_mulf8s127::@2 print_mulf8s127::@4 print_mulf8u127::@2 print_mulf8u127::@4 print_sbyte::@1 print_sbyte::@3 print_sword::@1 print_sword::@3 [86] (byte*) print_char_cursor#80 ← phi( print_byte/(byte*) print_char_cursor#131 print_byte::@1/(byte*) print_char_cursor#19 print_mulf8s127::@2/(byte*) print_char_cursor#19 print_mulf8s127::@4/(byte*) print_char_cursor#19 print_mulf8u127::@2/(byte*) print_char_cursor#19 print_mulf8u127::@4/(byte*) print_char_cursor#19 print_sbyte::@1/(byte*) print_char_cursor#127 print_sbyte::@3/(byte*) print_char_cursor#127 print_sword::@1/(byte*) print_char_cursor#19 print_sword::@3/(byte*) print_char_cursor#19 ) [86] (byte) print_char::ch#10 ← phi( print_byte/(byte) print_char::ch#4 print_byte::@1/(byte) print_char::ch#5 print_mulf8s127::@2/(byte) '*' print_mulf8s127::@4/(byte) '=' print_mulf8u127::@2/(byte) '*' print_mulf8u127::@4/(byte) '=' print_sbyte::@1/(byte) '-' print_sbyte::@3/(byte) ' ' print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' ) @@ -182,6 +192,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_mulf8s127:: print_char::@return: scope:[print_char] from print_char [89] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_mulf8u127::@5 print_sword::@2 [90] (word) print_word::w#2 ← phi( print_mulf8u127::@5/(word) print_word::w#1 print_sword::@2/(word) print_word::w#0 ) [91] (byte) print_byte::b#1 ← > (word) print_word::w#2 @@ -194,6 +206,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [95] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_mulf8u127::@1 print_mulf8u127::@3 print_sbyte::@2 print_word print_word::@1 [96] (byte*) print_char_cursor#131 ← phi( print_mulf8u127::@1/(byte*~) print_char_cursor#152 print_mulf8u127::@3/(byte*) print_char_cursor#19 print_sbyte::@2/(byte*) print_char_cursor#19 print_word/(byte*) print_char_cursor#19 print_word::@1/(byte*) print_char_cursor#19 ) [96] (byte) print_byte::b#5 ← phi( print_mulf8u127::@1/(byte) print_byte::b#3 print_mulf8u127::@3/(byte) print_byte::b#4 print_sbyte::@2/(byte) print_byte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 ) @@ -209,6 +223,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [103] return to:@return + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from print_mulf8s127::@1 print_mulf8s127::@3 [104] (byte*) print_char_cursor#127 ← phi( print_mulf8s127::@1/(byte*~) print_char_cursor#150 print_mulf8s127::@3/(byte*) print_char_cursor#19 ) [104] (signed byte) print_sbyte::b#3 ← phi( print_mulf8s127::@1/(signed byte) print_sbyte::b#1 print_mulf8s127::@3/(signed byte) print_sbyte::b#2 ) @@ -233,6 +249,8 @@ print_sbyte::@1: scope:[print_sbyte] from print_sbyte print_sbyte::@4: scope:[print_sbyte] from print_sbyte::@1 [114] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#3 to:print_sbyte::@2 + +(signed word()) mulf8s127((signed byte) mulf8s127::a , (signed byte) mulf8s127::b) mulf8s127: scope:[mulf8s127] from print_mulf8s127 [115] (byte) mulf8u127::a#1 ← (byte)(signed byte) mulf8s127::a#0 [116] (byte) mulf8u127::b#1 ← (byte)(signed byte) mulf8s127::b#0 @@ -276,6 +294,8 @@ mulf8s127::@return: scope:[mulf8s127] from mulf8s127::@3 mulf8s127::@9: scope:[mulf8s127] from mulf8s127::@7 [135] (signed word~) mulf8s127::c#11 ← (signed word)(word) mulf8s127::c#0 to:mulf8s127::@1 + +(word()) mulf8u127((byte) mulf8u127::a , (byte) mulf8u127::b) mulf8u127: scope:[mulf8u127] from mulf8s127 print_mulf8u127 [136] (byte) mulf8u127::b#2 ← phi( mulf8s127/(byte) mulf8u127::b#1 print_mulf8u127/(byte) mulf8u127::b#0 ) [136] (byte) mulf8u127::a#2 ← phi( mulf8s127/(byte) mulf8u127::a#1 print_mulf8u127/(byte) mulf8u127::a#0 ) @@ -287,6 +307,8 @@ mulf8u127: scope:[mulf8u127] from mulf8s127 print_mulf8u127 mulf8u127::@return: scope:[mulf8u127] from mulf8u127 [141] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@1 main::@11 [142] (byte*) print_char_cursor#136 ← phi( main::@1/(byte*) 1024 main::@11/(byte*~) print_char_cursor#143 ) [142] (byte*) print_str::str#5 ← phi( main::@1/(const string) main::str main::@11/(const string) main::str1 ) @@ -304,6 +326,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [147] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#122 [148] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#3 to:print_str::@1 + +(void()) print_mulf8u127((byte) print_mulf8u127::a , (byte) print_mulf8u127::b) print_mulf8u127: scope:[print_mulf8u127] from main::@10 main::@3 main::@4 main::@5 main::@6 main::@7 main::@8 main::@9 [149] (byte) print_mulf8u127::b#10 ← phi( main::@10/(byte) $ff main::@3/(byte) 0 main::@4/(byte) $7f main::@5/(byte) $40 main::@6/(byte) $7f main::@7/(byte) $c0 main::@8/(byte) $7f main::@9/(byte) $c0 ) [149] (byte) print_mulf8u127::a#8 ← phi( main::@10/(byte) $ff main::@3/(byte) 0 main::@4/(byte) $7f main::@5/(byte) $40 main::@6/(byte) $40 main::@7/(byte) $40 main::@8/(byte) $ff main::@9/(byte) $c0 ) @@ -341,6 +365,8 @@ print_mulf8u127::@6: scope:[print_mulf8u127] from print_mulf8u127::@5 print_mulf8u127::@return: scope:[print_mulf8u127] from print_mulf8u127::@6 [168] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main [169] phi() [170] call memset @@ -348,6 +374,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [171] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [172] phi() to:memset::@1 diff --git a/src/test/ref/fastmultiply-127.log b/src/test/ref/fastmultiply-127.log index 6fe612e31..df1976496 100644 --- a/src/test/ref/fastmultiply-127.log +++ b/src/test/ref/fastmultiply-127.log @@ -64,6 +64,8 @@ Culled Empty Block (label) mulf8s127::@7 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@12 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -111,6 +113,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@29 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@1 main::@11 (byte*) print_char_cursor#136 ← phi( main::@1/(byte*) print_char_cursor#23 main::@11/(byte*) print_char_cursor#33 ) (byte*) print_str::str#5 ← phi( main::@1/(byte*) print_str::str#1 main::@11/(byte*) print_str::str#2 ) @@ -133,6 +137,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#63 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from main::@12 main::@2 print_mulf8s127::@6 print_mulf8u127::@6 (byte*) print_char_cursor#123 ← phi( main::@12/(byte*) print_char_cursor#34 main::@2/(byte*) print_char_cursor#24 print_mulf8s127::@6/(byte*) print_char_cursor#58 print_mulf8u127::@6/(byte*) print_char_cursor#51 ) (byte*) print_line_cursor#63 ← phi( main::@12/(byte*) print_line_cursor#66 main::@2/(byte*) print_line_cursor#65 print_mulf8s127::@6/(byte*) print_line_cursor#68 print_mulf8u127::@6/(byte*) print_line_cursor#67 ) @@ -156,6 +162,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#65 return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from print_mulf8s127::@5 (byte*) print_char_cursor#137 ← phi( print_mulf8s127::@5/(byte*) print_char_cursor#57 ) (signed word) print_sword::w#2 ← phi( print_mulf8s127::@5/(signed word) print_sword::w#1 ) @@ -202,6 +210,8 @@ print_sword::@return: scope:[print_sword] from print_sword::@7 (byte*) print_char_cursor#8 ← (byte*) print_char_cursor#69 return to:@return + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from print_mulf8s127::@1 print_mulf8s127::@3 (byte*) print_char_cursor#138 ← phi( print_mulf8s127::@1/(byte*) print_char_cursor#134 print_mulf8s127::@3/(byte*) print_char_cursor#55 ) (signed byte) print_sbyte::b#3 ← phi( print_mulf8s127::@1/(signed byte) print_sbyte::b#1 print_mulf8s127::@3/(signed byte) print_sbyte::b#2 ) @@ -248,6 +258,8 @@ print_sbyte::@return: scope:[print_sbyte] from print_sbyte::@7 (byte*) print_char_cursor#12 ← (byte*) print_char_cursor#73 return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_mulf8u127::@5 print_sword::@2 (byte*) print_char_cursor#130 ← phi( print_mulf8u127::@5/(byte*) print_char_cursor#50 print_sword::@2/(byte*) print_char_cursor#126 ) (word) print_word::w#2 ← phi( print_mulf8u127::@5/(word) print_word::w#1 print_sword::@2/(word) print_word::w#0 ) @@ -278,6 +290,8 @@ print_word::@return: scope:[print_word] from print_word::@2 (byte*) print_line_cursor#75 ← phi( @12/(byte*) print_line_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $0 to:@39 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_mulf8u127::@1 print_mulf8u127::@3 print_sbyte::@2 print_word print_word::@1 (byte*) print_char_cursor#131 ← phi( print_mulf8u127::@1/(byte*) print_char_cursor#133 print_mulf8u127::@3/(byte*) print_char_cursor#48 print_sbyte::@2/(byte*) print_char_cursor#129 print_word/(byte*) print_char_cursor#130 print_word::@1/(byte*) print_char_cursor#13 ) (byte) print_byte::b#5 ← phi( print_mulf8u127::@1/(byte) print_byte::b#3 print_mulf8u127::@3/(byte) print_byte::b#4 print_sbyte::@2/(byte) print_byte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 ) @@ -302,6 +316,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#18 ← (byte*) print_char_cursor#79 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_mulf8s127::@2 print_mulf8s127::@4 print_mulf8u127::@2 print_mulf8u127::@4 print_sbyte::@1 print_sbyte::@3 print_sword::@1 print_sword::@3 (byte*) print_char_cursor#80 ← phi( print_byte/(byte*) print_char_cursor#131 print_byte::@1/(byte*) print_char_cursor#16 print_mulf8s127::@2/(byte*) print_char_cursor#54 print_mulf8s127::@4/(byte*) print_char_cursor#56 print_mulf8u127::@2/(byte*) print_char_cursor#47 print_mulf8u127::@4/(byte*) print_char_cursor#49 print_sbyte::@1/(byte*) print_char_cursor#127 print_sbyte::@3/(byte*) print_char_cursor#128 print_sword::@1/(byte*) print_char_cursor#124 print_sword::@3/(byte*) print_char_cursor#125 ) (byte) print_char::ch#10 ← phi( print_byte/(byte) print_char::ch#4 print_byte::@1/(byte) print_char::ch#5 print_mulf8s127::@2/(byte) print_char::ch#8 print_mulf8s127::@4/(byte) print_char::ch#9 print_mulf8u127::@2/(byte) print_char::ch#6 print_mulf8u127::@4/(byte) print_char::ch#7 print_sbyte::@1/(byte) print_char::ch#2 print_sbyte::@3/(byte) print_char::ch#3 print_sword::@1/(byte) print_char::ch#0 print_sword::@3/(byte) print_char::ch#1 ) @@ -313,6 +329,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#20 ← (byte*) print_char_cursor#81 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main (byte*) print_screen#1 ← phi( main/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -333,6 +351,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte*) print_char_cursor#22 ← (byte*) print_char_cursor#82 return to:@return + +(void()) main() main: scope:[main] from @41 (byte*) print_char_cursor#132 ← phi( @41/(byte*) print_char_cursor#135 ) (byte*) print_line_cursor#64 ← phi( @41/(byte*) print_line_cursor#69 ) @@ -542,6 +562,8 @@ main::@return: scope:[main] from main::@23 (byte*) print_char_cursor#46 ← (byte*) print_char_cursor#106 return to:@return + +(void()) print_mulf8u127((byte) print_mulf8u127::a , (byte) print_mulf8u127::b) print_mulf8u127: scope:[print_mulf8u127] from main::@10 main::@3 main::@4 main::@5 main::@6 main::@7 main::@8 main::@9 (byte*) print_line_cursor#82 ← phi( main::@10/(byte*) print_line_cursor#13 main::@3/(byte*) print_line_cursor#6 main::@4/(byte*) print_line_cursor#7 main::@5/(byte*) print_line_cursor#8 main::@6/(byte*) print_line_cursor#9 main::@7/(byte*) print_line_cursor#10 main::@8/(byte*) print_line_cursor#11 main::@9/(byte*) print_line_cursor#12 ) (byte*) print_char_cursor#139 ← phi( main::@10/(byte*) print_char_cursor#32 main::@3/(byte*) print_char_cursor#25 main::@4/(byte*) print_char_cursor#26 main::@5/(byte*) print_char_cursor#27 main::@6/(byte*) print_char_cursor#28 main::@7/(byte*) print_char_cursor#29 main::@8/(byte*) print_char_cursor#30 main::@9/(byte*) print_char_cursor#31 ) @@ -616,6 +638,8 @@ print_mulf8u127::@return: scope:[print_mulf8u127] from print_mulf8u127::@7 (byte*) print_line_cursor#28 ← (byte*) print_line_cursor#59 return to:@return + +(void()) print_mulf8s127((signed byte) print_mulf8s127::a , (signed byte) print_mulf8s127::b) print_mulf8s127: scope:[print_mulf8s127] from main::@13 main::@14 main::@15 main::@16 main::@17 main::@18 main::@19 main::@20 main::@21 main::@22 (byte*) print_line_cursor#83 ← phi( main::@13/(byte*) print_line_cursor#15 main::@14/(byte*) print_line_cursor#16 main::@15/(byte*) print_line_cursor#17 main::@16/(byte*) print_line_cursor#18 main::@17/(byte*) print_line_cursor#19 main::@18/(byte*) print_line_cursor#20 main::@19/(byte*) print_line_cursor#21 main::@20/(byte*) print_line_cursor#22 main::@21/(byte*) print_line_cursor#23 main::@22/(byte*) print_line_cursor#24 ) (byte*) print_char_cursor#140 ← phi( main::@13/(byte*) print_char_cursor#35 main::@14/(byte*) print_char_cursor#36 main::@15/(byte*) print_char_cursor#37 main::@16/(byte*) print_char_cursor#38 main::@17/(byte*) print_char_cursor#39 main::@18/(byte*) print_char_cursor#40 main::@19/(byte*) print_char_cursor#41 main::@20/(byte*) print_char_cursor#42 main::@21/(byte*) print_char_cursor#43 main::@22/(byte*) print_char_cursor#44 ) @@ -699,6 +723,8 @@ print_mulf8s127::@return: scope:[print_mulf8s127] from print_mulf8s127::@7 (byte[$200]) mulf127_sqr2_lo#0 ← kickasm {{ .fill 512, round(((i-255)/127*(i-255)/127)*127/4) }} to:@41 + +(word()) mulf8u127((byte) mulf8u127::a , (byte) mulf8u127::b) mulf8u127: scope:[mulf8u127] from mulf8s127 print_mulf8u127 (byte) mulf8u127::b#2 ← phi( mulf8s127/(byte) mulf8u127::b#1 print_mulf8u127/(byte) mulf8u127::b#0 ) (byte) mulf8u127::a#2 ← phi( mulf8s127/(byte) mulf8u127::a#1 print_mulf8u127/(byte) mulf8u127::a#0 ) @@ -717,6 +743,8 @@ mulf8u127::@return: scope:[mulf8u127] from mulf8u127 (word) mulf8u127::return#2 ← (word) mulf8u127::return#5 return to:@return + +(signed word()) mulf8s127((signed byte) mulf8s127::a , (signed byte) mulf8s127::b) mulf8s127: scope:[mulf8s127] from print_mulf8s127 (signed byte) mulf8s127::b#1 ← phi( print_mulf8s127/(signed byte) mulf8s127::b#0 ) (signed byte) mulf8s127::a#1 ← phi( print_mulf8s127/(signed byte) mulf8s127::a#0 ) @@ -2236,6 +2264,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -2331,6 +2361,8 @@ main::@22: scope:[main] from main::@21 main::@return: scope:[main] from main::@22 [50] return to:@return + +(void()) print_mulf8s127((signed byte) print_mulf8s127::a , (signed byte) print_mulf8s127::b) print_mulf8s127: scope:[print_mulf8s127] from main::@13 main::@14 main::@15 main::@16 main::@17 main::@18 main::@19 main::@20 main::@21 main::@22 [51] (signed byte) print_mulf8s127::b#10 ← phi( main::@13/(signed byte) 0 main::@14/(signed byte) $40 main::@15/(signed byte) $7f main::@16/(signed byte) $40 main::@17/(signed byte) -$40 main::@18/(signed byte) -$40 main::@19/(signed byte) $7f main::@20/(signed byte) $7f main::@21/(signed byte) -$7f main::@22/(signed byte) -$7f ) [51] (signed byte) print_mulf8s127::a#10 ← phi( main::@13/(signed byte) 0 main::@14/(signed byte) $40 main::@15/(signed byte) $40 main::@16/(signed byte) -$40 main::@17/(signed byte) $40 main::@18/(signed byte) -$40 main::@19/(signed byte) $7f main::@20/(signed byte) -$7f main::@21/(signed byte) $7f main::@22/(signed byte) -$7f ) @@ -2368,6 +2400,8 @@ print_mulf8s127::@6: scope:[print_mulf8s127] from print_mulf8s127::@5 print_mulf8s127::@return: scope:[print_mulf8s127] from print_mulf8s127::@6 [70] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from main::@12 main::@2 print_mulf8s127::@6 print_mulf8u127::@6 [71] (byte*) print_char_cursor#123 ← phi( main::@12/(byte*) print_char_cursor#122 main::@2/(byte*) print_char_cursor#122 print_mulf8s127::@6/(byte*) print_char_cursor#19 print_mulf8u127::@6/(byte*) print_char_cursor#19 ) [71] (byte*) print_line_cursor#63 ← phi( main::@12/(byte*) print_line_cursor#1 main::@2/(byte*) 1024 print_mulf8s127::@6/(byte*) print_line_cursor#1 print_mulf8u127::@6/(byte*) print_line_cursor#1 ) @@ -2380,6 +2414,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [75] return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from print_mulf8s127::@5 [76] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 to:print_sword::@3 @@ -2402,6 +2438,8 @@ print_sword::@1: scope:[print_sword] from print_sword print_sword::@4: scope:[print_sword] from print_sword::@1 [85] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#1 to:print_sword::@2 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_mulf8s127::@2 print_mulf8s127::@4 print_mulf8u127::@2 print_mulf8u127::@4 print_sbyte::@1 print_sbyte::@3 print_sword::@1 print_sword::@3 [86] (byte*) print_char_cursor#80 ← phi( print_byte/(byte*) print_char_cursor#131 print_byte::@1/(byte*) print_char_cursor#19 print_mulf8s127::@2/(byte*) print_char_cursor#19 print_mulf8s127::@4/(byte*) print_char_cursor#19 print_mulf8u127::@2/(byte*) print_char_cursor#19 print_mulf8u127::@4/(byte*) print_char_cursor#19 print_sbyte::@1/(byte*) print_char_cursor#127 print_sbyte::@3/(byte*) print_char_cursor#127 print_sword::@1/(byte*) print_char_cursor#19 print_sword::@3/(byte*) print_char_cursor#19 ) [86] (byte) print_char::ch#10 ← phi( print_byte/(byte) print_char::ch#4 print_byte::@1/(byte) print_char::ch#5 print_mulf8s127::@2/(byte) '*' print_mulf8s127::@4/(byte) '=' print_mulf8u127::@2/(byte) '*' print_mulf8u127::@4/(byte) '=' print_sbyte::@1/(byte) '-' print_sbyte::@3/(byte) ' ' print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' ) @@ -2411,6 +2449,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_mulf8s127:: print_char::@return: scope:[print_char] from print_char [89] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_mulf8u127::@5 print_sword::@2 [90] (word) print_word::w#2 ← phi( print_mulf8u127::@5/(word) print_word::w#1 print_sword::@2/(word) print_word::w#0 ) [91] (byte) print_byte::b#1 ← > (word) print_word::w#2 @@ -2423,6 +2463,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [95] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_mulf8u127::@1 print_mulf8u127::@3 print_sbyte::@2 print_word print_word::@1 [96] (byte*) print_char_cursor#131 ← phi( print_mulf8u127::@1/(byte*~) print_char_cursor#152 print_mulf8u127::@3/(byte*) print_char_cursor#19 print_sbyte::@2/(byte*) print_char_cursor#19 print_word/(byte*) print_char_cursor#19 print_word::@1/(byte*) print_char_cursor#19 ) [96] (byte) print_byte::b#5 ← phi( print_mulf8u127::@1/(byte) print_byte::b#3 print_mulf8u127::@3/(byte) print_byte::b#4 print_sbyte::@2/(byte) print_byte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 ) @@ -2438,6 +2480,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [103] return to:@return + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from print_mulf8s127::@1 print_mulf8s127::@3 [104] (byte*) print_char_cursor#127 ← phi( print_mulf8s127::@1/(byte*~) print_char_cursor#150 print_mulf8s127::@3/(byte*) print_char_cursor#19 ) [104] (signed byte) print_sbyte::b#3 ← phi( print_mulf8s127::@1/(signed byte) print_sbyte::b#1 print_mulf8s127::@3/(signed byte) print_sbyte::b#2 ) @@ -2462,6 +2506,8 @@ print_sbyte::@1: scope:[print_sbyte] from print_sbyte print_sbyte::@4: scope:[print_sbyte] from print_sbyte::@1 [114] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#3 to:print_sbyte::@2 + +(signed word()) mulf8s127((signed byte) mulf8s127::a , (signed byte) mulf8s127::b) mulf8s127: scope:[mulf8s127] from print_mulf8s127 [115] (byte) mulf8u127::a#1 ← (byte)(signed byte) mulf8s127::a#0 [116] (byte) mulf8u127::b#1 ← (byte)(signed byte) mulf8s127::b#0 @@ -2505,6 +2551,8 @@ mulf8s127::@return: scope:[mulf8s127] from mulf8s127::@3 mulf8s127::@9: scope:[mulf8s127] from mulf8s127::@7 [135] (signed word~) mulf8s127::c#11 ← (signed word)(word) mulf8s127::c#0 to:mulf8s127::@1 + +(word()) mulf8u127((byte) mulf8u127::a , (byte) mulf8u127::b) mulf8u127: scope:[mulf8u127] from mulf8s127 print_mulf8u127 [136] (byte) mulf8u127::b#2 ← phi( mulf8s127/(byte) mulf8u127::b#1 print_mulf8u127/(byte) mulf8u127::b#0 ) [136] (byte) mulf8u127::a#2 ← phi( mulf8s127/(byte) mulf8u127::a#1 print_mulf8u127/(byte) mulf8u127::a#0 ) @@ -2516,6 +2564,8 @@ mulf8u127: scope:[mulf8u127] from mulf8s127 print_mulf8u127 mulf8u127::@return: scope:[mulf8u127] from mulf8u127 [141] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@1 main::@11 [142] (byte*) print_char_cursor#136 ← phi( main::@1/(byte*) 1024 main::@11/(byte*~) print_char_cursor#143 ) [142] (byte*) print_str::str#5 ← phi( main::@1/(const string) main::str main::@11/(const string) main::str1 ) @@ -2533,6 +2583,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [147] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#122 [148] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#3 to:print_str::@1 + +(void()) print_mulf8u127((byte) print_mulf8u127::a , (byte) print_mulf8u127::b) print_mulf8u127: scope:[print_mulf8u127] from main::@10 main::@3 main::@4 main::@5 main::@6 main::@7 main::@8 main::@9 [149] (byte) print_mulf8u127::b#10 ← phi( main::@10/(byte) $ff main::@3/(byte) 0 main::@4/(byte) $7f main::@5/(byte) $40 main::@6/(byte) $7f main::@7/(byte) $c0 main::@8/(byte) $7f main::@9/(byte) $c0 ) [149] (byte) print_mulf8u127::a#8 ← phi( main::@10/(byte) $ff main::@3/(byte) 0 main::@4/(byte) $7f main::@5/(byte) $40 main::@6/(byte) $40 main::@7/(byte) $40 main::@8/(byte) $ff main::@9/(byte) $c0 ) @@ -2570,6 +2622,8 @@ print_mulf8u127::@6: scope:[print_mulf8u127] from print_mulf8u127::@5 print_mulf8u127::@return: scope:[print_mulf8u127] from print_mulf8u127::@6 [168] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main [169] phi() [170] call memset @@ -2577,6 +2631,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [171] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [172] phi() to:memset::@1 diff --git a/src/test/ref/fibmem.cfg b/src/test/ref/fibmem.cfg index 1b6973675..c7acf6617 100644 --- a/src/test/ref/fibmem.cfg +++ b/src/test/ref/fibmem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte[$f]) fibs#0) ← (byte) 0 [5] *((const byte[$f]) fibs#0+(byte) 1) ← (byte) 1 diff --git a/src/test/ref/fibmem.log b/src/test/ref/fibmem.log index bc3b33098..eeeecdab8 100644 --- a/src/test/ref/fibmem.log +++ b/src/test/ref/fibmem.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte[$f]) fibs#0 ← { fill( $f, 0) } to:@1 + +(void()) main() main: scope:[main] from @1 *((byte[$f]) fibs#0 + (number) 0) ← (number) 0 *((byte[$f]) fibs#0 + (number) 1) ← (number) 1 @@ -128,6 +130,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte[$f]) fibs#0) ← (byte) 0 [5] *((const byte[$f]) fibs#0+(byte) 1) ← (byte) 1 diff --git a/src/test/ref/fill-square.cfg b/src/test/ref/fill-square.cfg index 84c0001d3..78757fc34 100644 --- a/src/test/ref/fill-square.cfg +++ b/src/test/ref/fill-square.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/fill-square.log b/src/test/ref/fill-square.log index b94db5e4e..a4affb914 100644 --- a/src/test/ref/fill-square.log +++ b/src/test/ref/fill-square.log @@ -5,6 +5,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::y#0 ← (byte) 5 to:main::@1 @@ -152,6 +154,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/fillscreen.cfg b/src/test/ref/fillscreen.cfg index 7ceba88f7..424570af0 100644 --- a/src/test/ref/fillscreen.cfg +++ b/src/test/ref/fillscreen.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::c#0 ← *((const byte*) SCREEN#0) [5] (byte) fillscreen::c#0 ← (byte) main::c#0 @@ -15,6 +17,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [7] return to:@return + +(void()) fillscreen((byte) fillscreen::c) fillscreen: scope:[fillscreen] from main [8] phi() to:fillscreen::@1 diff --git a/src/test/ref/fillscreen.log b/src/test/ref/fillscreen.log index fd9d5c697..502746fc2 100644 --- a/src/test/ref/fillscreen.log +++ b/src/test/ref/fillscreen.log @@ -6,6 +6,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@2 + +(void()) main() main: scope:[main] from @2 (byte) main::c#0 ← *((byte*) SCREEN#0) (byte) fillscreen::c#0 ← (byte) main::c#0 @@ -16,6 +18,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 return to:@return + +(void()) fillscreen((byte) fillscreen::c) fillscreen: scope:[fillscreen] from main (byte) fillscreen::c#2 ← phi( main/(byte) fillscreen::c#0 ) (byte) fillscreen::j#0 ← (byte) 0 @@ -160,6 +164,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::c#0 ← *((const byte*) SCREEN#0) [5] (byte) fillscreen::c#0 ← (byte) main::c#0 @@ -168,6 +174,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [7] return to:@return + +(void()) fillscreen((byte) fillscreen::c) fillscreen: scope:[fillscreen] from main [8] phi() to:fillscreen::@1 diff --git a/src/test/ref/flipper-rex2.cfg b/src/test/ref/flipper-rex2.cfg index a9bf9423f..85c5719d7 100644 --- a/src/test/ref/flipper-rex2.cfg +++ b/src/test/ref/flipper-rex2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call prepare @@ -30,6 +32,8 @@ main::@5: scope:[main] from main::@4 [13] phi() [14] call plot to:main::@1 + +(void()) plot() plot: scope:[plot] from main::@5 [15] phi() to:plot::@1 @@ -56,6 +60,8 @@ plot::@3: scope:[plot] from plot::@2 [24] (byte) plot::i#1 ← ++ (byte) plot::i#2 [25] (byte) plot::x#1 ← ++ (byte) plot::x#2 to:plot::@2 + +(void()) flip() flip: scope:[flip] from main::@4 [26] phi() to:flip::@1 @@ -88,6 +94,8 @@ flip::@4: scope:[flip] from flip::@3 flip::@4 flip::@return: scope:[flip] from flip::@4 [41] return to:@return + +(void()) prepare() prepare: scope:[prepare] from main [42] phi() to:prepare::@1 diff --git a/src/test/ref/flipper-rex2.log b/src/test/ref/flipper-rex2.log index fac08bd70..663c23259 100644 --- a/src/test/ref/flipper-rex2.log +++ b/src/test/ref/flipper-rex2.log @@ -20,6 +20,8 @@ CONTROL FLOW GRAPH SSA (byte*) RASTER#0 ← ((byte*)) (number) $d012 (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@4 + +(void()) main() main: scope:[main] from @4 call prepare to:main::@9 @@ -56,6 +58,8 @@ main::@11: scope:[main] from main::@10 main::@return: scope:[main] from main::@11 return to:@return + +(void()) prepare() prepare: scope:[prepare] from main (byte) prepare::i#0 ← (byte) 0 to:prepare::@1 @@ -69,6 +73,8 @@ prepare::@1: scope:[prepare] from prepare prepare::@1 prepare::@return: scope:[prepare] from prepare::@1 return to:@return + +(void()) flip() flip: scope:[flip] from main::@7 (byte) flip::srcIdx#0 ← (number) 0 (byte) flip::dstIdx#0 ← (number) $f @@ -115,6 +121,8 @@ flip::@5: scope:[flip] from flip::@4 flip::@5 flip::@return: scope:[flip] from flip::@5 return to:@return + +(void()) plot() plot: scope:[plot] from main::@10 (byte*~) plot::$0 ← (byte*) SCREEN#0 + (number) 5*(number) $28 (byte*~) plot::$1 ← (byte*~) plot::$0 + (number) $c @@ -523,6 +531,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call prepare @@ -546,6 +556,8 @@ main::@5: scope:[main] from main::@4 [13] phi() [14] call plot to:main::@1 + +(void()) plot() plot: scope:[plot] from main::@5 [15] phi() to:plot::@1 @@ -572,6 +584,8 @@ plot::@3: scope:[plot] from plot::@2 [24] (byte) plot::i#1 ← ++ (byte) plot::i#2 [25] (byte) plot::x#1 ← ++ (byte) plot::x#2 to:plot::@2 + +(void()) flip() flip: scope:[flip] from main::@4 [26] phi() to:flip::@1 @@ -604,6 +618,8 @@ flip::@4: scope:[flip] from flip::@3 flip::@4 flip::@return: scope:[flip] from flip::@4 [41] return to:@return + +(void()) prepare() prepare: scope:[prepare] from main [42] phi() to:prepare::@1 diff --git a/src/test/ref/font-hex-show.cfg b/src/test/ref/font-hex-show.cfg index fc31e6210..bd751b357 100644 --- a/src/test/ref/font-hex-show.cfg +++ b/src/test/ref/font-hex-show.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::toD0181 @@ -26,6 +28,8 @@ main::@1: scope:[main] from main::@1 main::@2 main::@return: scope:[main] from main::@1 [12] return to:@return + +(void()) init_font_hex((byte*) init_font_hex::charset) init_font_hex: scope:[init_font_hex] from main::@2 [13] phi() to:init_font_hex::@1 diff --git a/src/test/ref/font-hex-show.log b/src/test/ref/font-hex-show.log index 52cba8a79..a8435ed6b 100644 --- a/src/test/ref/font-hex-show.log +++ b/src/test/ref/font-hex-show.log @@ -21,6 +21,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) D018#0 ← ((byte*)) (number) $d018 to:@9 + +(void()) init_font_hex((byte*) init_font_hex::charset) init_font_hex: scope:[init_font_hex] from main::@3 (byte*) init_font_hex::charset#6 ← phi( main::@3/(byte*) init_font_hex::charset#1 ) (byte*) init_font_hex::proto_hi#0 ← (byte[]) FONT_HEX_PROTO#0 @@ -95,6 +97,8 @@ init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte*) CHARSET#0 ← ((byte*)) (number) $2000 to:@10 + +(void()) main() main: scope:[main] from @10 (byte*) main::toD0181_screen#0 ← (byte*) SCREEN#0 (byte*) main::toD0181_gfx#0 ← (byte*) CHARSET#0 @@ -602,6 +606,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::toD0181 @@ -621,6 +627,8 @@ main::@1: scope:[main] from main::@1 main::@2 main::@return: scope:[main] from main::@1 [12] return to:@return + +(void()) init_font_hex((byte*) init_font_hex::charset) init_font_hex: scope:[init_font_hex] from main::@2 [13] phi() to:init_font_hex::@1 diff --git a/src/test/ref/for-empty-increment.cfg b/src/test/ref/for-empty-increment.cfg index 8e17ec99e..c40fb9367 100644 --- a/src/test/ref/for-empty-increment.cfg +++ b/src/test/ref/for-empty-increment.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/for-empty-increment.log b/src/test/ref/for-empty-increment.log index 8756e3036..131a4757a 100644 --- a/src/test/ref/for-empty-increment.log +++ b/src/test/ref/for-empty-increment.log @@ -6,6 +6,8 @@ Culled Empty Block (label) main::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (number) 0 @@ -98,6 +100,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/for-empty-init.cfg b/src/test/ref/for-empty-init.cfg index 8e17ec99e..c40fb9367 100644 --- a/src/test/ref/for-empty-init.cfg +++ b/src/test/ref/for-empty-init.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/for-empty-init.log b/src/test/ref/for-empty-init.log index 97dd006fb..01b0cd6ad 100644 --- a/src/test/ref/for-empty-init.log +++ b/src/test/ref/for-empty-init.log @@ -6,6 +6,8 @@ Culled Empty Block (label) main::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (number) 0 @@ -98,6 +100,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/for-two-vars.cfg b/src/test/ref/for-two-vars.cfg index edd94d8c1..5d555d4d6 100644 --- a/src/test/ref/for-two-vars.cfg +++ b/src/test/ref/for-two-vars.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/for-two-vars.log b/src/test/ref/for-two-vars.log index 012e364cd..f58836fd7 100644 --- a/src/test/ref/for-two-vars.log +++ b/src/test/ref/for-two-vars.log @@ -6,6 +6,8 @@ Culled Empty Block (label) main::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte*~) main::$0 ← (byte*) main::SCREEN#0 + (number) $27 @@ -121,6 +123,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/forced-zeropage.cfg b/src/test/ref/forced-zeropage.cfg index 14296cc05..f3f6563d4 100644 --- a/src/test/ref/forced-zeropage.cfg +++ b/src/test/ref/forced-zeropage.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (word) main::u#1 ← *((word*) 160) - (word) $22b [5] *((word*) 1024) ← (word) main::u#1 diff --git a/src/test/ref/forced-zeropage.log b/src/test/ref/forced-zeropage.log index 2eceef546..0ad702a51 100644 --- a/src/test/ref/forced-zeropage.log +++ b/src/test/ref/forced-zeropage.log @@ -2,6 +2,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (word) main::u#0 ← (number) $22b (word*~) main::$0 ← ((word*)) (number) $a0 @@ -99,6 +101,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (word) main::u#1 ← *((word*) 160) - (word) $22b [5] *((word*) 1024) ← (word) main::u#1 diff --git a/src/test/ref/forclassicmin.cfg b/src/test/ref/forclassicmin.cfg index b93d67ece..e54d5f046 100644 --- a/src/test/ref/forclassicmin.cfg +++ b/src/test/ref/forclassicmin.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/forclassicmin.log b/src/test/ref/forclassicmin.log index 5546c2ab5..926fd96b3 100644 --- a/src/test/ref/forclassicmin.log +++ b/src/test/ref/forclassicmin.log @@ -8,6 +8,8 @@ CONTROL FLOW GRAPH SSA (byte*~) $0 ← ((byte*)) (number) $400 (byte*) SCREEN#0 ← (byte*~) $0 to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) SCREEN#3 ← phi( @1/(byte*) SCREEN#4 ) (byte) main::i#0 ← (number) 0 @@ -113,6 +115,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/forincrementassign.cfg b/src/test/ref/forincrementassign.cfg index 8dd7f8af1..3dfcbc916 100644 --- a/src/test/ref/forincrementassign.cfg +++ b/src/test/ref/forincrementassign.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/forincrementassign.log b/src/test/ref/forincrementassign.log index e66cc1642..0de30d73c 100644 --- a/src/test/ref/forincrementassign.log +++ b/src/test/ref/forincrementassign.log @@ -8,6 +8,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (number) 0 to:main::@1 @@ -107,6 +109,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/forrangedwords.cfg b/src/test/ref/forrangedwords.cfg index a42228e89..17d00d543 100644 --- a/src/test/ref/forrangedwords.cfg +++ b/src/test/ref/forrangedwords.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/forrangedwords.log b/src/test/ref/forrangedwords.log index 3e00e97b6..c3978bd4b 100644 --- a/src/test/ref/forrangedwords.log +++ b/src/test/ref/forrangedwords.log @@ -4,6 +4,8 @@ Culled Empty Block (label) main::@4 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (word) main::w#0 ← (word) 0 @@ -152,6 +154,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/forrangemin.cfg b/src/test/ref/forrangemin.cfg index d95e77718..6b313d9eb 100644 --- a/src/test/ref/forrangemin.cfg +++ b/src/test/ref/forrangemin.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/forrangemin.log b/src/test/ref/forrangemin.log index 179c729f9..0991ee9a3 100644 --- a/src/test/ref/forrangemin.log +++ b/src/test/ref/forrangemin.log @@ -7,6 +7,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN1#0 ← ((byte*)) (number) $400 (byte*) SCREEN2#0 ← ((byte*)) (number) $500 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -140,6 +142,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/forrangesymbolic.cfg b/src/test/ref/forrangesymbolic.cfg index 7b124bdf6..dfa2fe889 100644 --- a/src/test/ref/forrangesymbolic.cfg +++ b/src/test/ref/forrangesymbolic.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/forrangesymbolic.log b/src/test/ref/forrangesymbolic.log index 1c9b5ad9b..38ef74760 100644 --- a/src/test/ref/forrangesymbolic.log +++ b/src/test/ref/forrangesymbolic.log @@ -3,6 +3,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::BITMAP#0 ← ((byte*)) (number) $2000 (byte*~) main::$0 ← (byte*) main::BITMAP#0 + (number) $1fff @@ -106,6 +108,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/fragment-synth.cfg b/src/test/ref/fragment-synth.cfg index bcc8c15bf..20af9c8fc 100644 --- a/src/test/ref/fragment-synth.cfg +++ b/src/test/ref/fragment-synth.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((byte*) 1104+(byte) 2) ← (byte) $f0 [5] *((byte*) 1104+(byte) 3) ← (byte) $f @@ -26,6 +28,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [14] return to:@return + +(byte()) fct((byte) fct::x , (byte*) fct::z) fct: scope:[fct] from main main::@1 [15] (byte*) fct::z#2 ← phi( main/(byte*) 1104 main::@1/++(byte*) 1104 ) [15] (byte) fct::x#2 ← phi( main/(byte) $aa main::@1/(byte) $55 ) diff --git a/src/test/ref/fragment-synth.log b/src/test/ref/fragment-synth.log index 3a6c15493..3c4b54a19 100644 --- a/src/test/ref/fragment-synth.log +++ b/src/test/ref/fragment-synth.log @@ -5,6 +5,8 @@ Culled Empty Block (label) fct::@1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @2 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte*) main::z#0 ← ((byte*)) (number) $450 @@ -38,6 +40,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 return to:@return + +(byte()) fct((byte) fct::x , (byte*) fct::z) fct: scope:[fct] from main main::@1 (byte*) fct::z#2 ← phi( main/(byte*) fct::z#0 main::@1/(byte*) fct::z#1 ) (byte) fct::x#2 ← phi( main/(byte) fct::x#0 main::@1/(byte) fct::x#1 ) @@ -213,6 +217,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((byte*) 1104+(byte) 2) ← (byte) $f0 [5] *((byte*) 1104+(byte) 3) ← (byte) $f @@ -232,6 +238,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [14] return to:@return + +(byte()) fct((byte) fct::x , (byte*) fct::z) fct: scope:[fct] from main main::@1 [15] (byte*) fct::z#2 ← phi( main/(byte*) 1104 main::@1/++(byte*) 1104 ) [15] (byte) fct::x#2 ← phi( main/(byte) $aa main::@1/(byte) $55 ) diff --git a/src/test/ref/fragment-variations.cfg b/src/test/ref/fragment-variations.cfg index 5bafc958f..ec379ba46 100644 --- a/src/test/ref/fragment-variations.cfg +++ b/src/test/ref/fragment-variations.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call mul16u @@ -25,6 +27,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [13] return to:@return + +(dword()) mul16u((word) mul16u::b , (word) mul16u::a) mul16u: scope:[mul16u] from main main::@1 [14] (word) mul16u::a#2 ← phi( main/(byte) $a main::@1/(word) $3e8 ) [14] (dword) mul16u::mb#0 ← phi( main/(byte) $a main::@1/(word) $3e8 ) diff --git a/src/test/ref/fragment-variations.log b/src/test/ref/fragment-variations.log index 1ce60b186..253a9ebbf 100644 --- a/src/test/ref/fragment-variations.log +++ b/src/test/ref/fragment-variations.log @@ -7,6 +7,8 @@ Culled Empty Block (label) mul16u::@1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @2 (dword*) main::screen#0 ← ((dword*)) (number) $400 (word) main::w#0 ← (number) $a @@ -35,6 +37,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 return to:@return + +(dword()) mul16u((word) mul16u::b , (word) mul16u::a) mul16u: scope:[mul16u] from main main::@1 (word) mul16u::a#2 ← phi( main/(word) mul16u::a#0 main::@1/(word) mul16u::a#1 ) (word) mul16u::b#2 ← phi( main/(word) mul16u::b#0 main::@1/(word) mul16u::b#1 ) @@ -186,6 +190,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call mul16u @@ -204,6 +210,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [13] return to:@return + +(dword()) mul16u((word) mul16u::b , (word) mul16u::a) mul16u: scope:[mul16u] from main main::@1 [14] (word) mul16u::a#2 ← phi( main/(byte) $a main::@1/(word) $3e8 ) [14] (dword) mul16u::mb#0 ← phi( main/(byte) $a main::@1/(word) $3e8 ) diff --git a/src/test/ref/function-pointer-noarg-2.cfg b/src/test/ref/function-pointer-noarg-2.cfg index 44f714431..2a5ec8dc9 100644 --- a/src/test/ref/function-pointer-noarg-2.cfg +++ b/src/test/ref/function-pointer-noarg-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/function-pointer-noarg-2.log b/src/test/ref/function-pointer-noarg-2.log index 2386af4e6..9a633655c 100644 --- a/src/test/ref/function-pointer-noarg-2.log +++ b/src/test/ref/function-pointer-noarg-2.log @@ -9,6 +9,8 @@ Culled Empty Block (label) @2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@3 + +(void()) main() main: scope:[main] from @3 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -30,6 +32,8 @@ main::@3: scope:[main] from main::@1 main::@4 main::@return: scope:[main] from main::@3 return to:@return + +(void()) fn1() fn1: scope:[fn1] from (byte*) fn1::BORDERCOL#0 ← ((byte*)) (number) $d020 *((byte*) fn1::BORDERCOL#0) ← ++ *((byte*) fn1::BORDERCOL#0) @@ -37,6 +41,8 @@ fn1: scope:[fn1] from fn1::@return: scope:[fn1] from fn1 return to:@return + +(void()) fn2() fn2: scope:[fn2] from (byte*) fn2::BGCOL#0 ← ((byte*)) (number) $d021 *((byte*) fn2::BGCOL#0) ← ++ *((byte*) fn2::BGCOL#0) @@ -158,6 +164,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/function-pointer-noarg-3.cfg b/src/test/ref/function-pointer-noarg-3.cfg index 9e7338b81..f6d96bfd6 100644 --- a/src/test/ref/function-pointer-noarg-3.cfg +++ b/src/test/ref/function-pointer-noarg-3.cfg @@ -12,6 +12,8 @@ to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 [5] phi() to:main::@1 @@ -31,12 +33,16 @@ main::@4: scope:[main] from main::@2 main::@3 kickasm( uses main::f#3) {{ jsr ff }} to:main::@1 + +(void()) fn2() fn2: scope:[fn2] from [13] *((const byte*) fn2::BGCOL#0) ← ++ *((const byte*) fn2::BGCOL#0) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [14] return to:@return + +(void()) fn1() fn1: scope:[fn1] from [15] *((const byte*) fn1::BORDERCOL#0) ← ++ *((const byte*) fn1::BORDERCOL#0) to:fn1::@return diff --git a/src/test/ref/function-pointer-noarg-3.log b/src/test/ref/function-pointer-noarg-3.log index 766e7db29..506f7ad1d 100644 --- a/src/test/ref/function-pointer-noarg-3.log +++ b/src/test/ref/function-pointer-noarg-3.log @@ -10,6 +10,8 @@ Culled Empty Block (label) @2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @3 (void()*) main::f#0 ← (void()*) 0 (byte) main::i#0 ← (number) 0 @@ -49,6 +51,8 @@ main::@return: scope:[main] from main::@1 jmp (main.f) }} to:@3 + +(void()) fn1() fn1: scope:[fn1] from (byte*) fn1::BORDERCOL#0 ← ((byte*)) (number) $d020 *((byte*) fn1::BORDERCOL#0) ← ++ *((byte*) fn1::BORDERCOL#0) @@ -56,6 +60,8 @@ fn1: scope:[fn1] from fn1::@return: scope:[fn1] from fn1 return to:@return + +(void()) fn2() fn2: scope:[fn2] from (byte*) fn2::BGCOL#0 ← ((byte*)) (number) $d021 *((byte*) fn2::BGCOL#0) ← ++ *((byte*) fn2::BGCOL#0) @@ -200,6 +206,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 [5] phi() to:main::@1 @@ -219,12 +227,16 @@ main::@4: scope:[main] from main::@2 main::@3 kickasm( uses main::f#3) {{ jsr ff }} to:main::@1 + +(void()) fn2() fn2: scope:[fn2] from [13] *((const byte*) fn2::BGCOL#0) ← ++ *((const byte*) fn2::BGCOL#0) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [14] return to:@return + +(void()) fn1() fn1: scope:[fn1] from [15] *((const byte*) fn1::BORDERCOL#0) ← ++ *((const byte*) fn1::BORDERCOL#0) to:fn1::@return diff --git a/src/test/ref/function-pointer-noarg-call-10.cfg b/src/test/ref/function-pointer-noarg-call-10.cfg index 5f4961137..74e9567a4 100644 --- a/src/test/ref/function-pointer-noarg-call-10.cfg +++ b/src/test/ref/function-pointer-noarg-call-10.cfg @@ -10,6 +10,8 @@ to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 [5] phi() [6] call do10 @@ -21,6 +23,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [9] return to:@return + +(void()) do10((void()*) do10::fn) do10: scope:[do10] from main main::@1 [10] (void()*) do10::fn#3 ← phi( main/&(void()) hello() main::@1/&(void()) world() ) to:do10::@1 @@ -33,6 +37,8 @@ do10::@1: scope:[do10] from do10 do10::@1 do10::@return: scope:[do10] from do10::@1 [15] return to:@return + +(void()) world() world: scope:[world] from [16] phi() [17] call print @@ -40,6 +46,8 @@ world: scope:[world] from world::@return: scope:[world] from world [18] return to:@return + +(void()) print((byte*) print::msg) print: scope:[print] from hello world [19] (byte*) print::msg#3 ← phi( hello/(const string) hello::msg world/(const string) world::msg ) to:print::@1 @@ -54,6 +62,8 @@ print::@1: scope:[print] from print print::@1 print::@return: scope:[print] from print::@1 [25] return to:@return + +(void()) hello() hello: scope:[hello] from [26] phi() [27] call print diff --git a/src/test/ref/function-pointer-noarg-call-10.log b/src/test/ref/function-pointer-noarg-call-10.log index dc55a3052..2037c3dc7 100644 --- a/src/test/ref/function-pointer-noarg-call-10.log +++ b/src/test/ref/function-pointer-noarg-call-10.log @@ -10,6 +10,8 @@ Culled Empty Block (label) print::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@4 + +(void()) main() main: scope:[main] from @5 (void()*~) main::$0 ← & (void()) hello() (void()*) do10::fn#0 ← (void()*~) main::$0 @@ -25,6 +27,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 return to:@return + +(void()) do10((void()*) do10::fn) do10: scope:[do10] from main main::@1 (void()*) do10::fn#3 ← phi( main/(void()*) do10::fn#0 main::@1/(void()*) do10::fn#1 ) (byte) do10::i#0 ← (byte) 0 @@ -40,6 +44,8 @@ do10::@1: scope:[do10] from do10 do10::@1 do10::@return: scope:[do10] from do10::@1 return to:@return + +(void()) hello() hello: scope:[hello] from (byte) idx#13 ← phi( @5/(byte) idx#16 ) (byte*) print::msg#0 ← (const string) hello::msg @@ -54,6 +60,8 @@ hello::@return: scope:[hello] from hello::@1 (byte) idx#1 ← (byte) idx#8 return to:@return + +(void()) world() world: scope:[world] from (byte) idx#14 ← phi( @5/(byte) idx#16 ) (byte*) print::msg#1 ← (const string) world::msg @@ -72,6 +80,8 @@ world::@return: scope:[world] from world::@1 (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte) idx#4 ← (number) 0 to:@5 + +(void()) print((byte*) print::msg) print: scope:[print] from hello world (byte) idx#15 ← phi( hello/(byte) idx#13 world/(byte) idx#14 ) (byte*) print::msg#3 ← phi( hello/(byte*) print::msg#0 world/(byte*) print::msg#1 ) @@ -289,6 +299,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 [5] phi() [6] call do10 @@ -300,6 +312,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [9] return to:@return + +(void()) do10((void()*) do10::fn) do10: scope:[do10] from main main::@1 [10] (void()*) do10::fn#3 ← phi( main/&(void()) hello() main::@1/&(void()) world() ) to:do10::@1 @@ -312,6 +326,8 @@ do10::@1: scope:[do10] from do10 do10::@1 do10::@return: scope:[do10] from do10::@1 [15] return to:@return + +(void()) world() world: scope:[world] from [16] phi() [17] call print @@ -319,6 +335,8 @@ world: scope:[world] from world::@return: scope:[world] from world [18] return to:@return + +(void()) print((byte*) print::msg) print: scope:[print] from hello world [19] (byte*) print::msg#3 ← phi( hello/(const string) hello::msg world/(const string) world::msg ) to:print::@1 @@ -333,6 +351,8 @@ print::@1: scope:[print] from print print::@1 print::@return: scope:[print] from print::@1 [25] return to:@return + +(void()) hello() hello: scope:[hello] from [26] phi() [27] call print diff --git a/src/test/ref/function-pointer-noarg-call-2.cfg b/src/test/ref/function-pointer-noarg-call-2.cfg index 930630e61..13933f080 100644 --- a/src/test/ref/function-pointer-noarg-call-2.cfg +++ b/src/test/ref/function-pointer-noarg-call-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -25,12 +27,16 @@ main::@4: scope:[main] from main::@2 main::@3 [10] (void()*) main::f#3 ← phi( main::@3/&(void()) fn1() main::@2/&(void()) fn2() ) [11] call *((void()*) main::f#3) to:main::@1 + +(void()) fn2() fn2: scope:[fn2] from [12] *((const byte*) fn2::BGCOL#0) ← ++ *((const byte*) fn2::BGCOL#0) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [13] return to:@return + +(void()) fn1() fn1: scope:[fn1] from [14] *((const byte*) fn1::BORDERCOL#0) ← ++ *((const byte*) fn1::BORDERCOL#0) to:fn1::@return diff --git a/src/test/ref/function-pointer-noarg-call-2.log b/src/test/ref/function-pointer-noarg-call-2.log index 9fc680349..e9e737cd5 100644 --- a/src/test/ref/function-pointer-noarg-call-2.log +++ b/src/test/ref/function-pointer-noarg-call-2.log @@ -11,6 +11,8 @@ Culled Empty Block (label) @2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@3 + +(void()) main() main: scope:[main] from @3 (void()*) main::f#0 ← (void()*) 0 (byte) main::i#0 ← (number) 0 @@ -44,6 +46,8 @@ main::@5: scope:[main] from main::@4 main::@8 main::@return: scope:[main] from main::@1 return to:@return + +(void()) fn1() fn1: scope:[fn1] from (byte*) fn1::BORDERCOL#0 ← ((byte*)) (number) $d020 *((byte*) fn1::BORDERCOL#0) ← ++ *((byte*) fn1::BORDERCOL#0) @@ -51,6 +55,8 @@ fn1: scope:[fn1] from fn1::@return: scope:[fn1] from fn1 return to:@return + +(void()) fn2() fn2: scope:[fn2] from (byte*) fn2::BGCOL#0 ← ((byte*)) (number) $d021 *((byte*) fn2::BGCOL#0) ← ++ *((byte*) fn2::BGCOL#0) @@ -189,6 +195,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -207,12 +215,16 @@ main::@4: scope:[main] from main::@2 main::@3 [10] (void()*) main::f#3 ← phi( main::@3/&(void()) fn1() main::@2/&(void()) fn2() ) [11] call *((void()*) main::f#3) to:main::@1 + +(void()) fn2() fn2: scope:[fn2] from [12] *((const byte*) fn2::BGCOL#0) ← ++ *((const byte*) fn2::BGCOL#0) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [13] return to:@return + +(void()) fn1() fn1: scope:[fn1] from [14] *((const byte*) fn1::BORDERCOL#0) ← ++ *((const byte*) fn1::BORDERCOL#0) to:fn1::@return diff --git a/src/test/ref/function-pointer-noarg-call-3.cfg b/src/test/ref/function-pointer-noarg-call-3.cfg index acdf6d3c6..e0fae32e6 100644 --- a/src/test/ref/function-pointer-noarg-call-3.cfg +++ b/src/test/ref/function-pointer-noarg-call-3.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -23,6 +25,8 @@ main::@3: scope:[main] from main::@2 [10] (void()*~) main::$1 ← (void()*) getfn::return#0 [11] call *((void()*~) main::$1) to:main::@1 + +(void()*()) getfn((byte) getfn::b) getfn: scope:[getfn] from main::@2 [12] (byte~) getfn::$0 ← (byte) getfn::b#0 & (byte) 1 [13] if((byte~) getfn::$0==(byte) 0) goto getfn::@1 @@ -34,12 +38,16 @@ getfn::@return: scope:[getfn] from getfn getfn::@1 [15] (void()*) getfn::return#3 ← phi( getfn::@1/&(void()) fn1() getfn/&(void()) fn2() ) [16] return to:@return + +(void()) fn2() fn2: scope:[fn2] from [17] *((const byte*) fn2::BGCOL#0) ← ++ *((const byte*) fn2::BGCOL#0) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [18] return to:@return + +(void()) fn1() fn1: scope:[fn1] from [19] *((const byte*) fn1::BORDERCOL#0) ← ++ *((const byte*) fn1::BORDERCOL#0) to:fn1::@return diff --git a/src/test/ref/function-pointer-noarg-call-3.log b/src/test/ref/function-pointer-noarg-call-3.log index 6fe598a50..474111303 100644 --- a/src/test/ref/function-pointer-noarg-call-3.log +++ b/src/test/ref/function-pointer-noarg-call-3.log @@ -15,6 +15,8 @@ Culled Empty Block (label) @3 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@4 + +(void()) main() main: scope:[main] from @4 (byte) main::i#0 ← (number) 0 to:main::@1 @@ -38,6 +40,8 @@ main::@7: scope:[main] from main::@2 main::@return: scope:[main] from main::@1 return to:@return + +(void()*()) getfn((byte) getfn::b) getfn: scope:[getfn] from main::@2 (byte) getfn::b#1 ← phi( main::@2/(byte) getfn::b#0 ) (number~) getfn::$0 ← (byte) getfn::b#1 & (number) 1 @@ -57,6 +61,8 @@ getfn::@return: scope:[getfn] from getfn::@1 getfn::@3 (void()*) getfn::return#3 ← (void()*) getfn::return#5 return to:@return + +(void()) fn1() fn1: scope:[fn1] from (byte*) fn1::BORDERCOL#0 ← ((byte*)) (number) $d020 *((byte*) fn1::BORDERCOL#0) ← ++ *((byte*) fn1::BORDERCOL#0) @@ -64,6 +70,8 @@ fn1: scope:[fn1] from fn1::@return: scope:[fn1] from fn1 return to:@return + +(void()) fn2() fn2: scope:[fn2] from (byte*) fn2::BGCOL#0 ← ((byte*)) (number) $d021 *((byte*) fn2::BGCOL#0) ← ++ *((byte*) fn2::BGCOL#0) @@ -207,6 +215,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -223,6 +233,8 @@ main::@3: scope:[main] from main::@2 [10] (void()*~) main::$1 ← (void()*) getfn::return#0 [11] call *((void()*~) main::$1) to:main::@1 + +(void()*()) getfn((byte) getfn::b) getfn: scope:[getfn] from main::@2 [12] (byte~) getfn::$0 ← (byte) getfn::b#0 & (byte) 1 [13] if((byte~) getfn::$0==(byte) 0) goto getfn::@1 @@ -234,12 +246,16 @@ getfn::@return: scope:[getfn] from getfn getfn::@1 [15] (void()*) getfn::return#3 ← phi( getfn::@1/&(void()) fn1() getfn/&(void()) fn2() ) [16] return to:@return + +(void()) fn2() fn2: scope:[fn2] from [17] *((const byte*) fn2::BGCOL#0) ← ++ *((const byte*) fn2::BGCOL#0) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [18] return to:@return + +(void()) fn1() fn1: scope:[fn1] from [19] *((const byte*) fn1::BORDERCOL#0) ← ++ *((const byte*) fn1::BORDERCOL#0) to:fn1::@return diff --git a/src/test/ref/function-pointer-noarg-call-4.cfg b/src/test/ref/function-pointer-noarg-call-4.cfg index 2c6561d64..abd75108d 100644 --- a/src/test/ref/function-pointer-noarg-call-4.cfg +++ b/src/test/ref/function-pointer-noarg-call-4.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -21,12 +23,16 @@ main::@3: scope:[main] from main::@2 [8] phi() [9] call fn1 to:main::@1 + +(void()) fn1() fn1: scope:[fn1] from main::@3 [10] *((const byte*) fn1::BORDERCOL#0) ← ++ *((const byte*) fn1::BORDERCOL#0) to:fn1::@return fn1::@return: scope:[fn1] from fn1 [11] return to:@return + +(void()*()) getfn((byte) getfn::b) getfn: scope:[getfn] from main::@2 [12] phi() to:getfn::@return diff --git a/src/test/ref/function-pointer-noarg-call-4.log b/src/test/ref/function-pointer-noarg-call-4.log index 6ed80a8d1..534ac441c 100644 --- a/src/test/ref/function-pointer-noarg-call-4.log +++ b/src/test/ref/function-pointer-noarg-call-4.log @@ -10,6 +10,8 @@ Culled Empty Block (label) @2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@3 + +(void()) main() main: scope:[main] from @3 (byte) main::i#0 ← (number) 0 to:main::@1 @@ -33,6 +35,8 @@ main::@7: scope:[main] from main::@2 main::@return: scope:[main] from main::@1 return to:@return + +(void()*()) getfn((byte) getfn::b) getfn: scope:[getfn] from main::@2 (void()*~) getfn::$0 ← & (void()) fn1() (void()*) getfn::return#1 ← (void()*~) getfn::$0 @@ -42,6 +46,8 @@ getfn::@return: scope:[getfn] from getfn (void()*) getfn::return#2 ← (void()*) getfn::return#4 return to:@return + +(void()) fn1() fn1: scope:[fn1] from (byte*) fn1::BORDERCOL#0 ← ((byte*)) (number) $d020 *((byte*) fn1::BORDERCOL#0) ← ++ *((byte*) fn1::BORDERCOL#0) @@ -164,6 +170,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -178,12 +186,16 @@ main::@3: scope:[main] from main::@2 [8] phi() [9] call fn1 to:main::@1 + +(void()) fn1() fn1: scope:[fn1] from main::@3 [10] *((const byte*) fn1::BORDERCOL#0) ← ++ *((const byte*) fn1::BORDERCOL#0) to:fn1::@return fn1::@return: scope:[fn1] from fn1 [11] return to:@return + +(void()*()) getfn((byte) getfn::b) getfn: scope:[getfn] from main::@2 [12] phi() to:getfn::@return diff --git a/src/test/ref/function-pointer-noarg-call-5.cfg b/src/test/ref/function-pointer-noarg-call-5.cfg index a3ff44fb0..61e6dc7a9 100644 --- a/src/test/ref/function-pointer-noarg-call-5.cfg +++ b/src/test/ref/function-pointer-noarg-call-5.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -20,12 +22,16 @@ main::@2: scope:[main] from main::@1 [9] (void()*) main::f#0 ← *((const void()*[2]) fns#0 + (byte~) main::$2) [10] call *((void()*) main::f#0) to:main::@1 + +(void()) fn2() fn2: scope:[fn2] from [11] *((const byte*) fn2::BGCOL#0) ← ++ *((const byte*) fn2::BGCOL#0) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [12] return to:@return + +(void()) fn1() fn1: scope:[fn1] from [13] *((const byte*) fn1::BORDERCOL#0) ← ++ *((const byte*) fn1::BORDERCOL#0) to:fn1::@return diff --git a/src/test/ref/function-pointer-noarg-call-5.log b/src/test/ref/function-pointer-noarg-call-5.log index 51441bcde..6a434e276 100644 --- a/src/test/ref/function-pointer-noarg-call-5.log +++ b/src/test/ref/function-pointer-noarg-call-5.log @@ -14,6 +14,8 @@ CONTROL FLOW GRAPH SSA (void()*~) $1 ← & (void()) fn2() (void()*[2]) fns#0 ← { (void()*~) $0, (void()*~) $1 } to:@3 + +(void()) main() main: scope:[main] from @3 (byte) main::i#0 ← (number) 0 to:main::@1 @@ -32,6 +34,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@1 return to:@return + +(void()) fn1() fn1: scope:[fn1] from (byte*) fn1::BORDERCOL#0 ← ((byte*)) (number) $d020 *((byte*) fn1::BORDERCOL#0) ← ++ *((byte*) fn1::BORDERCOL#0) @@ -39,6 +43,8 @@ fn1: scope:[fn1] from fn1::@return: scope:[fn1] from fn1 return to:@return + +(void()) fn2() fn2: scope:[fn2] from (byte*) fn2::BGCOL#0 ← ((byte*)) (number) $d021 *((byte*) fn2::BGCOL#0) ← ++ *((byte*) fn2::BGCOL#0) @@ -160,6 +166,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -173,12 +181,16 @@ main::@2: scope:[main] from main::@1 [9] (void()*) main::f#0 ← *((const void()*[2]) fns#0 + (byte~) main::$2) [10] call *((void()*) main::f#0) to:main::@1 + +(void()) fn2() fn2: scope:[fn2] from [11] *((const byte*) fn2::BGCOL#0) ← ++ *((const byte*) fn2::BGCOL#0) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [12] return to:@return + +(void()) fn1() fn1: scope:[fn1] from [13] *((const byte*) fn1::BORDERCOL#0) ← ++ *((const byte*) fn1::BORDERCOL#0) to:fn1::@return diff --git a/src/test/ref/function-pointer-noarg-call-6.cfg b/src/test/ref/function-pointer-noarg-call-6.cfg index da937356b..5d62d9e56 100644 --- a/src/test/ref/function-pointer-noarg-call-6.cfg +++ b/src/test/ref/function-pointer-noarg-call-6.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -23,6 +25,8 @@ main::@2: scope:[main] from main::@1 [10] *((byte*) main::cols#2) ← ++ *((byte*) main::cols#2) [11] (byte*) main::cols#1 ← ++ (byte*) main::cols#2 to:main::@1 + +(void()) fn1() fn1: scope:[fn1] from main::@2 [12] phi() to:fn1::@1 diff --git a/src/test/ref/function-pointer-noarg-call-6.log b/src/test/ref/function-pointer-noarg-call-6.log index 51db07856..bd7969230 100644 --- a/src/test/ref/function-pointer-noarg-call-6.log +++ b/src/test/ref/function-pointer-noarg-call-6.log @@ -12,6 +12,8 @@ Culled Empty Block (label) fn1::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @2 (void()*~) main::$0 ← & (void()) fn1() (void()*) main::cls#0 ← (void()*~) main::$0 @@ -33,6 +35,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@1 return to:@return + +(void()) fn1() fn1: scope:[fn1] from (byte*) fn1::screen#0 ← ((byte*)) (number) $400 to:fn1::@1 @@ -155,6 +159,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -171,6 +177,8 @@ main::@2: scope:[main] from main::@1 [10] *((byte*) main::cols#2) ← ++ *((byte*) main::cols#2) [11] (byte*) main::cols#1 ← ++ (byte*) main::cols#2 to:main::@1 + +(void()) fn1() fn1: scope:[fn1] from main::@2 [12] phi() to:fn1::@1 diff --git a/src/test/ref/function-pointer-noarg-call-7.cfg b/src/test/ref/function-pointer-noarg-call-7.cfg index a5582da48..34dcb55c6 100644 --- a/src/test/ref/function-pointer-noarg-call-7.cfg +++ b/src/test/ref/function-pointer-noarg-call-7.cfg @@ -10,6 +10,8 @@ to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 [5] phi() [6] call do10 @@ -17,6 +19,8 @@ main: scope:[main] from @2 main::@return: scope:[main] from main [7] return to:@return + +(void()) do10((void()*) do10::fn) do10: scope:[do10] from main [8] phi() to:do10::@1 @@ -29,6 +33,8 @@ do10::@1: scope:[do10] from do10 do10::@1 do10::@return: scope:[do10] from do10::@1 [13] return to:@return + +(void()) hello() hello: scope:[hello] from do10::@1 [14] (byte~) idx#7 ← (byte) idx#0 to:hello::@1 diff --git a/src/test/ref/function-pointer-noarg-call-7.log b/src/test/ref/function-pointer-noarg-call-7.log index 075924c25..893b610e2 100644 --- a/src/test/ref/function-pointer-noarg-call-7.log +++ b/src/test/ref/function-pointer-noarg-call-7.log @@ -7,6 +7,8 @@ Culled Empty Block (label) hello::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @3 (void()*~) main::$0 ← & (void()) hello() (void()*) main::f#0 ← (void()*~) main::$0 @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 return to:@return + +(void()) do10((void()*) do10::fn) do10: scope:[do10] from main (void()*) do10::fn#2 ← phi( main/(void()*) do10::fn#0 ) (byte) do10::i#0 ← (byte) 0 @@ -38,6 +42,8 @@ do10::@return: scope:[do10] from do10::@1 (byte[]) msg#0 ← (const string) $0 (byte) idx#0 ← (number) 0 to:@3 + +(void()) hello() hello: scope:[hello] from (byte) idx#5 ← phi( @3/(byte) idx#6 ) (byte) hello::i#0 ← (number) 0 @@ -213,6 +219,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 [5] phi() [6] call do10 @@ -220,6 +228,8 @@ main: scope:[main] from @2 main::@return: scope:[main] from main [7] return to:@return + +(void()) do10((void()*) do10::fn) do10: scope:[do10] from main [8] phi() to:do10::@1 @@ -232,6 +242,8 @@ do10::@1: scope:[do10] from do10 do10::@1 do10::@return: scope:[do10] from do10::@1 [13] return to:@return + +(void()) hello() hello: scope:[hello] from do10::@1 [14] (byte~) idx#7 ← (byte) idx#0 to:hello::@1 diff --git a/src/test/ref/function-pointer-noarg-call-8.cfg b/src/test/ref/function-pointer-noarg-call-8.cfg index 85521c416..6f9546c2c 100644 --- a/src/test/ref/function-pointer-noarg-call-8.cfg +++ b/src/test/ref/function-pointer-noarg-call-8.cfg @@ -11,6 +11,8 @@ to:@end @end: scope:[] from @2 [5] phi() + +(void()) main() main: scope:[main] from @2 [6] (byte*) msg#0 ← (const byte[]) msg1#0 [7] call do10 @@ -22,6 +24,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [10] return to:@return + +(void()) do10((void()*) do10::fn) do10: scope:[do10] from main main::@1 [11] phi() to:do10::@1 @@ -34,6 +38,8 @@ do10::@1: scope:[do10] from do10 do10::@1 do10::@return: scope:[do10] from do10::@1 [16] return to:@return + +(void()) hello() hello: scope:[hello] from do10::@1 [17] (byte~) idx#7 ← (byte) idx#0 to:hello::@1 diff --git a/src/test/ref/function-pointer-noarg-call-8.log b/src/test/ref/function-pointer-noarg-call-8.log index 61672a795..915a076fd 100644 --- a/src/test/ref/function-pointer-noarg-call-8.log +++ b/src/test/ref/function-pointer-noarg-call-8.log @@ -11,6 +11,8 @@ Culled Empty Block (label) hello::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @3 (void()*~) main::$0 ← & (void()) hello() (void()*) main::f#0 ← (void()*~) main::$0 @@ -32,6 +34,8 @@ main::@return: scope:[main] from main::@2 (byte*) msg#2 ← (byte*) msg#5 return to:@return + +(void()) do10((void()*) do10::fn) do10: scope:[do10] from main main::@1 (void()*) do10::fn#3 ← phi( main/(void()*) do10::fn#0 main::@1/(void()*) do10::fn#1 ) (byte) do10::i#0 ← (byte) 0 @@ -54,6 +58,8 @@ do10::@return: scope:[do10] from do10::@1 (byte*) msg#3 ← (byte*) 0 (byte) idx#0 ← (number) 0 to:@3 + +(void()) hello() hello: scope:[hello] from (byte) idx#5 ← phi( @3/(byte) idx#6 ) (byte*) msg#9 ← phi( @3/(byte*) msg#10 ) @@ -263,6 +269,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @2 [5] phi() + +(void()) main() main: scope:[main] from @2 [6] (byte*) msg#0 ← (const byte[]) msg1#0 [7] call do10 @@ -274,6 +282,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [10] return to:@return + +(void()) do10((void()*) do10::fn) do10: scope:[do10] from main main::@1 [11] phi() to:do10::@1 @@ -286,6 +296,8 @@ do10::@1: scope:[do10] from do10 do10::@1 do10::@return: scope:[do10] from do10::@1 [16] return to:@return + +(void()) hello() hello: scope:[hello] from do10::@1 [17] (byte~) idx#7 ← (byte) idx#0 to:hello::@1 diff --git a/src/test/ref/function-pointer-noarg-call-9.cfg b/src/test/ref/function-pointer-noarg-call-9.cfg index a21845091..dc95357d9 100644 --- a/src/test/ref/function-pointer-noarg-call-9.cfg +++ b/src/test/ref/function-pointer-noarg-call-9.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call fn1 @@ -17,6 +19,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [9] return to:@return + +(void()) fn1() fn1: scope:[fn1] from main [10] (byte) idx#1 ← ++ (byte) idx#0 to:fn1::@return diff --git a/src/test/ref/function-pointer-noarg-call-9.log b/src/test/ref/function-pointer-noarg-call-9.log index f4c989a63..d78691b56 100644 --- a/src/test/ref/function-pointer-noarg-call-9.log +++ b/src/test/ref/function-pointer-noarg-call-9.log @@ -6,6 +6,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte) idx#0 ← (number) 0 to:@2 + +(void()) main() main: scope:[main] from @2 (byte) idx#3 ← phi( @2/(byte) idx#6 ) (void()*~) main::$0 ← & (void()) fn1() @@ -18,6 +20,8 @@ main: scope:[main] from @2 main::@return: scope:[main] from main return to:@return + +(void()) fn1() fn1: scope:[fn1] from (byte) idx#4 ← phi( @2/(byte) idx#6 ) (byte) idx#1 ← ++ (byte) idx#4 @@ -111,6 +115,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call fn1 @@ -121,6 +127,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [9] return to:@return + +(void()) fn1() fn1: scope:[fn1] from main [10] (byte) idx#1 ← ++ (byte) idx#0 to:fn1::@return diff --git a/src/test/ref/function-pointer-noarg-call.cfg b/src/test/ref/function-pointer-noarg-call.cfg index 49fbccb19..3e691296c 100644 --- a/src/test/ref/function-pointer-noarg-call.cfg +++ b/src/test/ref/function-pointer-noarg-call.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call fn1 @@ -14,6 +16,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [6] return to:@return + +(void()) fn1() fn1: scope:[fn1] from main [7] *((const byte*) fn1::BORDERCOL#0) ← ++ *((const byte*) fn1::BORDERCOL#0) to:fn1::@return diff --git a/src/test/ref/function-pointer-noarg-call.log b/src/test/ref/function-pointer-noarg-call.log index fd76000ac..b3009216e 100644 --- a/src/test/ref/function-pointer-noarg-call.log +++ b/src/test/ref/function-pointer-noarg-call.log @@ -4,6 +4,8 @@ Culled Empty Block (label) @1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @2 (void()*~) main::$0 ← & (void()) fn1() (void()*) main::f#0 ← (void()*~) main::$0 @@ -12,6 +14,8 @@ main: scope:[main] from @2 main::@return: scope:[main] from main return to:@return + +(void()) fn1() fn1: scope:[fn1] from (byte*) fn1::BORDERCOL#0 ← ((byte*)) (number) $d020 *((byte*) fn1::BORDERCOL#0) ← ++ *((byte*) fn1::BORDERCOL#0) @@ -84,6 +88,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call fn1 @@ -91,6 +97,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [6] return to:@return + +(void()) fn1() fn1: scope:[fn1] from main [7] *((const byte*) fn1::BORDERCOL#0) ← ++ *((const byte*) fn1::BORDERCOL#0) to:fn1::@return diff --git a/src/test/ref/function-pointer-noarg.cfg b/src/test/ref/function-pointer-noarg.cfg index f350497b5..26edd782e 100644 --- a/src/test/ref/function-pointer-noarg.cfg +++ b/src/test/ref/function-pointer-noarg.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← <(word)&(void()) fn1() [5] *((const byte*) main::SCREEN#0+(byte) 1) ← >(word)&(void()) fn1() @@ -16,12 +18,16 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [8] return to:@return + +(void()) fn2() fn2: scope:[fn2] from [9] *((const byte*) fn2::BGCOL#0) ← ++ *((const byte*) fn2::BGCOL#0) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [10] return to:@return + +(void()) fn1() fn1: scope:[fn1] from [11] *((const byte*) fn1::BORDERCOL#0) ← ++ *((const byte*) fn1::BORDERCOL#0) to:fn1::@return diff --git a/src/test/ref/function-pointer-noarg.log b/src/test/ref/function-pointer-noarg.log index 8b21b2a18..0e99417f7 100644 --- a/src/test/ref/function-pointer-noarg.log +++ b/src/test/ref/function-pointer-noarg.log @@ -6,6 +6,8 @@ Culled Empty Block (label) @2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@3 + +(void()) main() main: scope:[main] from @3 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (void()*) main::f#0 ← (void()*) 0 @@ -29,6 +31,8 @@ main: scope:[main] from @3 main::@return: scope:[main] from main return to:@return + +(void()) fn1() fn1: scope:[fn1] from (byte*) fn1::BORDERCOL#0 ← ((byte*)) (number) $d020 *((byte*) fn1::BORDERCOL#0) ← ++ *((byte*) fn1::BORDERCOL#0) @@ -36,6 +40,8 @@ fn1: scope:[fn1] from fn1::@return: scope:[fn1] from fn1 return to:@return + +(void()) fn2() fn2: scope:[fn2] from (byte*) fn2::BGCOL#0 ← ((byte*)) (number) $d021 *((byte*) fn2::BGCOL#0) ← ++ *((byte*) fn2::BGCOL#0) @@ -187,6 +193,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← <(word)&(void()) fn1() [5] *((const byte*) main::SCREEN#0+(byte) 1) ← >(word)&(void()) fn1() @@ -196,12 +204,16 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [8] return to:@return + +(void()) fn2() fn2: scope:[fn2] from [9] *((const byte*) fn2::BGCOL#0) ← ++ *((const byte*) fn2::BGCOL#0) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [10] return to:@return + +(void()) fn1() fn1: scope:[fn1] from [11] *((const byte*) fn1::BORDERCOL#0) ← ++ *((const byte*) fn1::BORDERCOL#0) to:fn1::@return diff --git a/src/test/ref/function-pointer-return.cfg b/src/test/ref/function-pointer-return.cfg index 1cfe0feac..5f937b761 100644 --- a/src/test/ref/function-pointer-return.cfg +++ b/src/test/ref/function-pointer-return.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -26,12 +28,16 @@ main::@4: scope:[main] from main::@2 main::@3 [11] (byte~) main::$4 ← (byte)(byte()*) main::f#3 [12] *((const byte*) main::SCREEN#0) ← (byte~) main::$4 to:main::@1 + +(byte()) fn2() fn2: scope:[fn2] from [13] *((const byte*) fn2::BGCOL#0) ← ++ *((const byte*) fn2::BGCOL#0) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [14] return to:@return + +(byte()) fn1() fn1: scope:[fn1] from [15] *((const byte*) fn1::BORDERCOL#0) ← ++ *((const byte*) fn1::BORDERCOL#0) to:fn1::@return diff --git a/src/test/ref/function-pointer-return.log b/src/test/ref/function-pointer-return.log index 2023eade4..8f2e91ce5 100644 --- a/src/test/ref/function-pointer-return.log +++ b/src/test/ref/function-pointer-return.log @@ -13,6 +13,8 @@ Culled Empty Block (label) fn2::@1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@3 + +(void()) main() main: scope:[main] from @3 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte()*) main::f#0 ← (byte()*) 0 @@ -48,6 +50,8 @@ main::@5: scope:[main] from main::@4 main::@8 main::@return: scope:[main] from main::@1 return to:@return + +(byte()) fn1() fn1: scope:[fn1] from (byte*) fn1::BORDERCOL#0 ← ((byte*)) (number) $d020 *((byte*) fn1::BORDERCOL#0) ← ++ *((byte*) fn1::BORDERCOL#0) @@ -58,6 +62,8 @@ fn1::@return: scope:[fn1] from fn1 (byte) fn1::return#1 ← (byte) fn1::return#2 return to:@return + +(byte()) fn2() fn2: scope:[fn2] from (byte*) fn2::BGCOL#0 ← ((byte*)) (number) $d021 *((byte*) fn2::BGCOL#0) ← ++ *((byte*) fn2::BGCOL#0) @@ -223,6 +229,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -242,12 +250,16 @@ main::@4: scope:[main] from main::@2 main::@3 [11] (byte~) main::$4 ← (byte)(byte()*) main::f#3 [12] *((const byte*) main::SCREEN#0) ← (byte~) main::$4 to:main::@1 + +(byte()) fn2() fn2: scope:[fn2] from [13] *((const byte*) fn2::BGCOL#0) ← ++ *((const byte*) fn2::BGCOL#0) to:fn2::@return fn2::@return: scope:[fn2] from fn2 [14] return to:@return + +(byte()) fn1() fn1: scope:[fn1] from [15] *((const byte*) fn1::BORDERCOL#0) ← ++ *((const byte*) fn1::BORDERCOL#0) to:fn1::@return diff --git a/src/test/ref/gfxbank.cfg b/src/test/ref/gfxbank.cfg index 454092802..53428b09f 100644 --- a/src/test/ref/gfxbank.cfg +++ b/src/test/ref/gfxbank.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::vicSelectGfxBank1 diff --git a/src/test/ref/gfxbank.log b/src/test/ref/gfxbank.log index d402a1e20..4240a563b 100644 --- a/src/test/ref/gfxbank.log +++ b/src/test/ref/gfxbank.log @@ -13,6 +13,8 @@ CONTROL FLOW GRAPH SSA (byte*) CIA2_PORT_A#0 ← ((byte*)) (number) $dd00 (byte*) CIA2_PORT_A_DDR#0 ← ((byte*)) (number) $dd02 to:@5 + +(void()) main() main: scope:[main] from @5 (byte*) main::PLAYFIELD_CHARSET#0 ← ((byte*)) (number) $2800 (byte*) main::vicSelectGfxBank1_gfx#0 ← (byte*) main::PLAYFIELD_CHARSET#0 @@ -176,6 +178,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::vicSelectGfxBank1 diff --git a/src/test/ref/global-pc-multiple.cfg b/src/test/ref/global-pc-multiple.cfg index 538215762..3b953f635 100644 --- a/src/test/ref/global-pc-multiple.cfg +++ b/src/test/ref/global-pc-multiple.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } to:main::@1 @@ -20,6 +22,8 @@ main::@2: scope:[main] from main::@1 [7] phi() [8] call incScreen to:main::@1 + +(void()) incScreen() incScreen: scope:[incScreen] from main::@2 [9] *((const byte*) BGCOL#0) ← *((const byte*) RASTER#0) to:incScreen::@return diff --git a/src/test/ref/global-pc-multiple.log b/src/test/ref/global-pc-multiple.log index 40e4778f3..6c570b0f8 100644 --- a/src/test/ref/global-pc-multiple.log +++ b/src/test/ref/global-pc-multiple.log @@ -11,6 +11,8 @@ CONTROL FLOW GRAPH SSA (byte*) BGCOL#0 ← ((byte*)) (number) $d021 (byte*) RASTER#0 ← ((byte*)) (number) $d012 to:@2 + +(void()) main() main: scope:[main] from @2 asm { sei } to:main::@1 @@ -32,6 +34,8 @@ main::@8: scope:[main] from main::@2 main::@return: scope:[main] from main::@1 return to:@return + +(void()) incScreen() incScreen: scope:[incScreen] from main::@4 *((byte*) BGCOL#0) ← *((byte*) RASTER#0) to:incScreen::@return @@ -124,6 +128,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } to:main::@1 @@ -137,6 +143,8 @@ main::@2: scope:[main] from main::@1 [7] phi() [8] call incScreen to:main::@1 + +(void()) incScreen() incScreen: scope:[incScreen] from main::@2 [9] *((const byte*) BGCOL#0) ← *((const byte*) RASTER#0) to:incScreen::@return diff --git a/src/test/ref/global-pc.cfg b/src/test/ref/global-pc.cfg index 0a03228ba..e2d9b65b1 100644 --- a/src/test/ref/global-pc.cfg +++ b/src/test/ref/global-pc.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } to:main::@1 diff --git a/src/test/ref/global-pc.log b/src/test/ref/global-pc.log index 6a9270077..1ae1e9d53 100644 --- a/src/test/ref/global-pc.log +++ b/src/test/ref/global-pc.log @@ -8,6 +8,8 @@ CONTROL FLOW GRAPH SSA (byte*) BGCOL#0 ← ((byte*)) (number) $d021 (byte*) RASTER#0 ← ((byte*)) (number) $d012 to:@1 + +(void()) main() main: scope:[main] from @1 asm { sei } to:main::@1 @@ -84,6 +86,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } to:main::@1 diff --git a/src/test/ref/halfscii.cfg b/src/test/ref/halfscii.cfg index 5f6bc7131..770fe1edc 100644 --- a/src/test/ref/halfscii.cfg +++ b/src/test/ref/halfscii.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT#0) ← (byte) $32 diff --git a/src/test/ref/halfscii.log b/src/test/ref/halfscii.log index 2886144f8..49d9237b7 100644 --- a/src/test/ref/halfscii.log +++ b/src/test/ref/halfscii.log @@ -14,6 +14,8 @@ CONTROL FLOW GRAPH SSA (byte*) CHARSET4#0 ← ((byte*)) (number) $2800 (byte[]) bits_count#0 ← { (number) 0, (number) 1, (number) 1, (number) 2, (number) 1, (number) 2, (number) 2, (number) 3, (number) 1, (number) 2, (number) 2, (number) 3, (number) 2, (number) 3, (number) 3, (number) 4 } to:@1 + +(void()) main() main: scope:[main] from @1 asm { sei } *((byte*) PROCPORT#0) ← (number) $32 @@ -623,6 +625,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT#0) ← (byte) $32 diff --git a/src/test/ref/helloworld0.cfg b/src/test/ref/helloworld0.cfg index ad4854fcf..d56718856 100644 --- a/src/test/ref/helloworld0.cfg +++ b/src/test/ref/helloworld0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/helloworld0.log b/src/test/ref/helloworld0.log index 218ae068a..c4f2c569e 100644 --- a/src/test/ref/helloworld0.log +++ b/src/test/ref/helloworld0.log @@ -6,6 +6,8 @@ CONTROL FLOW GRAPH SSA (byte[]) msg#0 ← (const string) $0 (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -96,6 +98,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/helloworld2-inline.cfg b/src/test/ref/helloworld2-inline.cfg index 4cc02d05c..7d9e7f250 100644 --- a/src/test/ref/helloworld2-inline.cfg +++ b/src/test/ref/helloworld2-inline.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::print21 diff --git a/src/test/ref/helloworld2-inline.log b/src/test/ref/helloworld2-inline.log index e0e43a1a6..6f7f6e3a5 100644 --- a/src/test/ref/helloworld2-inline.log +++ b/src/test/ref/helloworld2-inline.log @@ -20,6 +20,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) screen#0 ← ((byte*)) (number) $400 to:@2 + +(void()) main() main: scope:[main] from @2 (byte*) main::hello#0 ← (const string) main::$3 (byte*) main::print21_at#0 ← (byte*) screen#0 @@ -269,6 +271,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::print21 diff --git a/src/test/ref/helloworld2.cfg b/src/test/ref/helloworld2.cfg index 31817732e..bad7ddc65 100644 --- a/src/test/ref/helloworld2.cfg +++ b/src/test/ref/helloworld2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print2 @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print2((byte*) print2::at , (byte*) print2::msg) print2: scope:[print2] from main main::@1 [9] (byte*) print2::at#4 ← phi( main/(const byte*) screen#0 main::@1/(const byte*) screen#0+(byte) $50 ) to:print2::@1 diff --git a/src/test/ref/helloworld2.log b/src/test/ref/helloworld2.log index 58c9e56d8..5f9059049 100644 --- a/src/test/ref/helloworld2.log +++ b/src/test/ref/helloworld2.log @@ -11,6 +11,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) screen#0 ← ((byte*)) (number) $400 to:@2 + +(void()) main() main: scope:[main] from @2 (byte*) main::hello#0 ← (const string) main::$3 (byte*) print2::at#0 ← (byte*) screen#0 @@ -28,6 +30,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 return to:@return + +(void()) print2((byte*) print2::at , (byte*) print2::msg) print2: scope:[print2] from main main::@1 (byte*) print2::at#4 ← phi( main/(byte*) print2::at#0 main::@1/(byte*) print2::at#1 ) (byte*) print2::msg#4 ← phi( main/(byte*) print2::msg#0 main::@1/(byte*) print2::msg#1 ) @@ -201,6 +205,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print2 @@ -212,6 +218,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print2((byte*) print2::at , (byte*) print2::msg) print2: scope:[print2] from main main::@1 [9] (byte*) print2::at#4 ← phi( main/(const byte*) screen#0 main::@1/(const byte*) screen#0+(byte) $50 ) to:print2::@1 diff --git a/src/test/ref/hex2dec-ptrptr.cfg b/src/test/ref/hex2dec-ptrptr.cfg index 621a8a41b..6c6b7598c 100644 --- a/src/test/ref/hex2dec-ptrptr.cfg +++ b/src/test/ref/hex2dec-ptrptr.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call cls @@ -34,6 +36,8 @@ main::@5: scope:[main] from main::@4 main::@return: scope:[main] from main::@5 [16] return to:@return + +(void()) utoa16w((word) utoa16w::value , (byte*) utoa16w::dst) utoa16w: scope:[utoa16w] from main::@1 main::@2 main::@3 main::@4 main::@5 [17] (byte*) utoa16w::dst#5 ← phi( main::@1/(byte*) utoa16w::dst#0 main::@2/(byte*) utoa16w::dst#1 main::@3/(byte*) utoa16w::dst#2 main::@4/(byte*) utoa16w::dst#3 main::@5/(byte*) utoa16w::dst#4 ) [17] (word) utoa16w::value#5 ← phi( main::@1/(byte) 0 main::@2/(word) $4d2 main::@3/(word) $162e main::@4/(word) $270f main::@5/(word) $e608 ) @@ -68,6 +72,8 @@ utoa16w::@4: scope:[utoa16w] from utoa16w::@3 utoa16w::@return: scope:[utoa16w] from utoa16w::@4 [37] return to:@return + +(byte()) utoa16n((byte) utoa16n::nybble , (word**) utoa16n::dst , (byte) utoa16n::started) utoa16n: scope:[utoa16n] from utoa16w utoa16w::@1 utoa16w::@2 utoa16w::@3 [38] (byte) utoa16n::started#7 ← phi( utoa16w/(byte) 0 utoa16w::@1/(byte) utoa16n::started#1 utoa16w::@2/(byte) utoa16n::started#2 utoa16w::@3/(byte) 1 ) [38] (byte) utoa16n::nybble#4 ← phi( utoa16w/(byte) utoa16n::nybble#0 utoa16w::@1/(byte) utoa16n::nybble#1 utoa16w::@2/(byte) utoa16n::nybble#2 utoa16w::@3/(byte) utoa16n::nybble#3 ) @@ -87,6 +93,8 @@ utoa16n::@2: scope:[utoa16n] from utoa16n::@1 utoa16n::@return: scope:[utoa16n] from utoa16n::@1 utoa16n::@2 [45] return to:@return + +(void()) cls() cls: scope:[cls] from main [46] phi() to:cls::@1 diff --git a/src/test/ref/hex2dec-ptrptr.log b/src/test/ref/hex2dec-ptrptr.log index 3b87e0c97..8eb43c536 100644 --- a/src/test/ref/hex2dec-ptrptr.log +++ b/src/test/ref/hex2dec-ptrptr.log @@ -11,6 +11,8 @@ Culled Empty Block (label) utoa16n::@5 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @4 call cls to:main::@1 @@ -53,6 +55,8 @@ main::@6: scope:[main] from main::@5 main::@return: scope:[main] from main::@6 return to:@return + +(void()) cls() cls: scope:[cls] from main (byte*) cls::screen#0 ← ((byte*)) (number) $400 (byte*~) cls::$0 ← (byte*) cls::screen#0 + (number) $3e7 @@ -71,6 +75,8 @@ cls::@return: scope:[cls] from cls::@1 @2: scope:[] from @begin (byte[]) DIGITS#0 ← (const string) $0 to:@4 + +(void()) utoa16w((word) utoa16w::value , (byte*) utoa16w::dst) utoa16w: scope:[utoa16w] from main::@1 main::@2 main::@3 main::@4 main::@5 (byte*) utoa16w::dst#5 ← phi( main::@1/(byte*) utoa16w::dst#0 main::@2/(byte*) utoa16w::dst#1 main::@3/(byte*) utoa16w::dst#2 main::@4/(byte*) utoa16w::dst#3 main::@5/(byte*) utoa16w::dst#4 ) (word) utoa16w::value#5 ← phi( main::@1/(word) utoa16w::value#0 main::@2/(word) utoa16w::value#1 main::@3/(word) utoa16w::value#2 main::@4/(word) utoa16w::value#3 main::@5/(word) utoa16w::value#4 ) @@ -136,6 +142,8 @@ utoa16w::@4: scope:[utoa16w] from utoa16w::@3 utoa16w::@return: scope:[utoa16w] from utoa16w::@4 return to:@return + +(byte()) utoa16n((byte) utoa16n::nybble , (word**) utoa16n::dst , (byte) utoa16n::started) utoa16n: scope:[utoa16n] from utoa16w utoa16w::@1 utoa16w::@2 utoa16w::@3 (word**) utoa16n::dst#6 ← phi( utoa16w/(word**) utoa16n::dst#0 utoa16w::@1/(word**) utoa16n::dst#1 utoa16w::@2/(word**) utoa16n::dst#2 utoa16w::@3/(word**) utoa16n::dst#3 ) (byte) utoa16n::started#7 ← phi( utoa16w/(byte) utoa16n::started#0 utoa16w::@1/(byte) utoa16n::started#1 utoa16w::@2/(byte) utoa16n::started#2 utoa16w::@3/(byte) utoa16n::started#3 ) @@ -589,6 +597,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call cls @@ -616,6 +626,8 @@ main::@5: scope:[main] from main::@4 main::@return: scope:[main] from main::@5 [16] return to:@return + +(void()) utoa16w((word) utoa16w::value , (byte*) utoa16w::dst) utoa16w: scope:[utoa16w] from main::@1 main::@2 main::@3 main::@4 main::@5 [17] (byte*) utoa16w::dst#5 ← phi( main::@1/(byte*) utoa16w::dst#0 main::@2/(byte*) utoa16w::dst#1 main::@3/(byte*) utoa16w::dst#2 main::@4/(byte*) utoa16w::dst#3 main::@5/(byte*) utoa16w::dst#4 ) [17] (word) utoa16w::value#5 ← phi( main::@1/(byte) 0 main::@2/(word) $4d2 main::@3/(word) $162e main::@4/(word) $270f main::@5/(word) $e608 ) @@ -650,6 +662,8 @@ utoa16w::@4: scope:[utoa16w] from utoa16w::@3 utoa16w::@return: scope:[utoa16w] from utoa16w::@4 [37] return to:@return + +(byte()) utoa16n((byte) utoa16n::nybble , (word**) utoa16n::dst , (byte) utoa16n::started) utoa16n: scope:[utoa16n] from utoa16w utoa16w::@1 utoa16w::@2 utoa16w::@3 [38] (byte) utoa16n::started#7 ← phi( utoa16w/(byte) 0 utoa16w::@1/(byte) utoa16n::started#1 utoa16w::@2/(byte) utoa16n::started#2 utoa16w::@3/(byte) 1 ) [38] (byte) utoa16n::nybble#4 ← phi( utoa16w/(byte) utoa16n::nybble#0 utoa16w::@1/(byte) utoa16n::nybble#1 utoa16w::@2/(byte) utoa16n::nybble#2 utoa16w::@3/(byte) utoa16n::nybble#3 ) @@ -669,6 +683,8 @@ utoa16n::@2: scope:[utoa16n] from utoa16n::@1 utoa16n::@return: scope:[utoa16n] from utoa16n::@1 utoa16n::@2 [45] return to:@return + +(void()) cls() cls: scope:[cls] from main [46] phi() to:cls::@1 diff --git a/src/test/ref/hex2dec.cfg b/src/test/ref/hex2dec.cfg index f75f3572f..f0ec66dae 100644 --- a/src/test/ref/hex2dec.cfg +++ b/src/test/ref/hex2dec.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] call cls @@ -58,6 +60,8 @@ main::@4: scope:[main] from main::@3 [33] *((byte*) 1024+(byte) $28+(byte) $28+(byte) $28+(byte) $28+(byte) $50+(byte) 3 + (byte) main::i#2) ← *((const byte[]) main::msg#0 + (byte) main::i#2) [34] (byte) main::i#1 ← ++ (byte) main::i#2 to:main::@3 + +(void()) utoa10w((word) utoa10w::value , (byte*) utoa10w::dst) utoa10w: scope:[utoa10w] from main::@9 [35] phi() to:utoa10w::@1 @@ -104,6 +108,8 @@ utoa10w::@2: scope:[utoa10w] from utoa10w::@1 [54] (byte~) utoa10w::$9 ← (byte) utoa10w::i#2 << (byte) 1 [55] (word) utoa10w::value#1 ← (word) utoa10w::value#10 - *((const word[]) UTOA10_SUB#0 + (byte~) utoa10w::$9) to:utoa10w::@1 + +(void()) utoa16w((word) utoa16w::value , (byte*) utoa16w::dst) utoa16w: scope:[utoa16w] from main::@2 main::@5 main::@6 main::@7 main::@8 [56] (byte*) utoa16w::dst#5 ← phi( main::@5/(byte*) utoa16w::dst#1 main::@6/(byte*) utoa16w::dst#2 main::@7/(byte*) utoa16w::dst#3 main::@8/(byte*) utoa16w::dst#4 main::@2/(byte*) utoa16w::dst#0 ) [56] (word) utoa16w::value#5 ← phi( main::@5/(word) $4d2 main::@6/(word) $162e main::@7/(word) $270f main::@8/(word) $e608 main::@2/(byte) 0 ) @@ -138,6 +144,8 @@ utoa16w::@4: scope:[utoa16w] from utoa16w::@3 utoa16w::@return: scope:[utoa16w] from utoa16w::@4 [76] return to:@return + +(byte()) utoa16n((byte) utoa16n::nybble , (word**) utoa16n::dst , (byte) utoa16n::started) utoa16n: scope:[utoa16n] from utoa16w utoa16w::@1 utoa16w::@2 utoa16w::@3 [77] (byte) utoa16n::started#7 ← phi( utoa16w/(byte) 0 utoa16w::@1/(byte) utoa16n::started#1 utoa16w::@2/(byte) utoa16n::started#2 utoa16w::@3/(byte) 1 ) [77] (byte) utoa16n::nybble#4 ← phi( utoa16w/(byte) utoa16n::nybble#0 utoa16w::@1/(byte) utoa16n::nybble#1 utoa16w::@2/(byte) utoa16n::nybble#2 utoa16w::@3/(byte) utoa16n::nybble#3 ) @@ -157,6 +165,8 @@ utoa16n::@2: scope:[utoa16n] from utoa16n::@1 utoa16n::@return: scope:[utoa16n] from utoa16n::@1 utoa16n::@2 [84] return to:@return + +(void()) cls() cls: scope:[cls] from main [85] phi() to:cls::@1 diff --git a/src/test/ref/hex2dec.log b/src/test/ref/hex2dec.log index 10f6f0f21..bc293ce1a 100644 --- a/src/test/ref/hex2dec.log +++ b/src/test/ref/hex2dec.log @@ -30,6 +30,8 @@ CONTROL FLOW GRAPH SSA (byte*) raster#0 ← ((byte*)) (number) $d012 (byte*) bordercol#0 ← ((byte*)) (number) $d020 to:@2 + +(void()) main() main: scope:[main] from @5 asm { sei } call cls @@ -126,6 +128,8 @@ main::@7: scope:[main] from main::@6 main::@return: scope:[main] from main::@1 return to:@return + +(void()) cls() cls: scope:[cls] from main (byte*) cls::screen#0 ← ((byte*)) (number) $400 (byte*~) cls::$0 ← (byte*) cls::screen#0 + (number) $3e7 @@ -146,6 +150,8 @@ cls::@return: scope:[cls] from cls::@1 (word[]) UTOA10_SUB#0 ← { (number) $7530, (number) $2710, (number) $bb8, (number) $3e8, (number) $12c, (number) $64, (number) $1e, (number) $a } (byte[]) UTOA10_VAL#0 ← { (number) 3, (number) 1, (number) 3, (number) 1, (number) 3, (number) 1, (number) 3, (number) 1 } to:@5 + +(void()) utoa10w((word) utoa10w::value , (byte*) utoa10w::dst) utoa10w: scope:[utoa10w] from main::@20 (byte*) utoa10w::dst#10 ← phi( main::@20/(byte*) utoa10w::dst#0 ) (word) utoa10w::value#5 ← phi( main::@20/(word) utoa10w::value#0 ) @@ -231,6 +237,8 @@ utoa10w::@12: scope:[utoa10w] from utoa10w::@10 utoa10w::@return: scope:[utoa10w] from utoa10w::@12 return to:@return + +(void()) utoa16w((word) utoa16w::value , (byte*) utoa16w::dst) utoa16w: scope:[utoa16w] from main::@16 main::@17 main::@18 main::@19 main::@5 (byte*) utoa16w::dst#5 ← phi( main::@16/(byte*) utoa16w::dst#1 main::@17/(byte*) utoa16w::dst#2 main::@18/(byte*) utoa16w::dst#3 main::@19/(byte*) utoa16w::dst#4 main::@5/(byte*) utoa16w::dst#0 ) (word) utoa16w::value#5 ← phi( main::@16/(word) utoa16w::value#1 main::@17/(word) utoa16w::value#2 main::@18/(word) utoa16w::value#3 main::@19/(word) utoa16w::value#4 main::@5/(word) utoa16w::value#0 ) @@ -296,6 +304,8 @@ utoa16w::@4: scope:[utoa16w] from utoa16w::@3 utoa16w::@return: scope:[utoa16w] from utoa16w::@4 return to:@return + +(byte()) utoa16n((byte) utoa16n::nybble , (word**) utoa16n::dst , (byte) utoa16n::started) utoa16n: scope:[utoa16n] from utoa16w utoa16w::@1 utoa16w::@2 utoa16w::@3 (word**) utoa16n::dst#6 ← phi( utoa16w/(word**) utoa16n::dst#0 utoa16w::@1/(word**) utoa16n::dst#1 utoa16w::@2/(word**) utoa16n::dst#2 utoa16w::@3/(word**) utoa16n::dst#3 ) (byte) utoa16n::started#7 ← phi( utoa16w/(byte) utoa16n::started#0 utoa16w::@1/(byte) utoa16n::started#1 utoa16w::@2/(byte) utoa16n::started#2 utoa16w::@3/(byte) utoa16n::started#3 ) @@ -1105,6 +1115,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] call cls @@ -1156,6 +1168,8 @@ main::@4: scope:[main] from main::@3 [33] *((byte*) 1024+(byte) $28+(byte) $28+(byte) $28+(byte) $28+(byte) $50+(byte) 3 + (byte) main::i#2) ← *((const byte[]) main::msg#0 + (byte) main::i#2) [34] (byte) main::i#1 ← ++ (byte) main::i#2 to:main::@3 + +(void()) utoa10w((word) utoa10w::value , (byte*) utoa10w::dst) utoa10w: scope:[utoa10w] from main::@9 [35] phi() to:utoa10w::@1 @@ -1202,6 +1216,8 @@ utoa10w::@2: scope:[utoa10w] from utoa10w::@1 [54] (byte~) utoa10w::$9 ← (byte) utoa10w::i#2 << (byte) 1 [55] (word) utoa10w::value#1 ← (word) utoa10w::value#10 - *((const word[]) UTOA10_SUB#0 + (byte~) utoa10w::$9) to:utoa10w::@1 + +(void()) utoa16w((word) utoa16w::value , (byte*) utoa16w::dst) utoa16w: scope:[utoa16w] from main::@2 main::@5 main::@6 main::@7 main::@8 [56] (byte*) utoa16w::dst#5 ← phi( main::@5/(byte*) utoa16w::dst#1 main::@6/(byte*) utoa16w::dst#2 main::@7/(byte*) utoa16w::dst#3 main::@8/(byte*) utoa16w::dst#4 main::@2/(byte*) utoa16w::dst#0 ) [56] (word) utoa16w::value#5 ← phi( main::@5/(word) $4d2 main::@6/(word) $162e main::@7/(word) $270f main::@8/(word) $e608 main::@2/(byte) 0 ) @@ -1236,6 +1252,8 @@ utoa16w::@4: scope:[utoa16w] from utoa16w::@3 utoa16w::@return: scope:[utoa16w] from utoa16w::@4 [76] return to:@return + +(byte()) utoa16n((byte) utoa16n::nybble , (word**) utoa16n::dst , (byte) utoa16n::started) utoa16n: scope:[utoa16n] from utoa16w utoa16w::@1 utoa16w::@2 utoa16w::@3 [77] (byte) utoa16n::started#7 ← phi( utoa16w/(byte) 0 utoa16w::@1/(byte) utoa16n::started#1 utoa16w::@2/(byte) utoa16n::started#2 utoa16w::@3/(byte) 1 ) [77] (byte) utoa16n::nybble#4 ← phi( utoa16w/(byte) utoa16n::nybble#0 utoa16w::@1/(byte) utoa16n::nybble#1 utoa16w::@2/(byte) utoa16n::nybble#2 utoa16w::@3/(byte) utoa16n::nybble#3 ) @@ -1255,6 +1273,8 @@ utoa16n::@2: scope:[utoa16n] from utoa16n::@1 utoa16n::@return: scope:[utoa16n] from utoa16n::@1 utoa16n::@2 [84] return to:@return + +(void()) cls() cls: scope:[cls] from main [85] phi() to:cls::@1 diff --git a/src/test/ref/ifmin.cfg b/src/test/ref/ifmin.cfg index ea4d6b6a5..e65519be1 100644 --- a/src/test/ref/ifmin.cfg +++ b/src/test/ref/ifmin.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/ifmin.log b/src/test/ref/ifmin.log index aaedd70aa..fab2af682 100644 --- a/src/test/ref/ifmin.log +++ b/src/test/ref/ifmin.log @@ -5,6 +5,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (number) 0 to:main::@1 @@ -116,6 +118,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/immzero.cfg b/src/test/ref/immzero.cfg index 79762c0e7..227ed1227 100644 --- a/src/test/ref/immzero.cfg +++ b/src/test/ref/immzero.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/immzero.log b/src/test/ref/immzero.log index 3557c8389..bb77b2471 100644 --- a/src/test/ref/immzero.log +++ b/src/test/ref/immzero.log @@ -3,6 +3,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (word~) main::$0 ← ((word)) (number) 0 (word) main::w#0 ← (word~) main::$0 @@ -102,6 +104,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/importing.cfg b/src/test/ref/importing.cfg index 816e506a7..7a84fa990 100644 --- a/src/test/ref/importing.cfg +++ b/src/test/ref/importing.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::screen#0) ← (byte) 1 [5] *((const byte*) BGCOL#0) ← (const byte) RED#0 diff --git a/src/test/ref/importing.log b/src/test/ref/importing.log index 94948fff3..d5642ffad 100644 --- a/src/test/ref/importing.log +++ b/src/test/ref/importing.log @@ -5,6 +5,8 @@ CONTROL FLOW GRAPH SSA (byte*) BGCOL#0 ← ((byte*)) (number) $d021 (byte) RED#0 ← (number) 2 to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 *((byte*) main::screen#0) ← (number) 1 @@ -78,6 +80,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::screen#0) ← (byte) 1 [5] *((const byte*) BGCOL#0) ← (const byte) RED#0 diff --git a/src/test/ref/incd020.cfg b/src/test/ref/incd020.cfg index adb096f04..5b6f9955c 100644 --- a/src/test/ref/incd020.cfg +++ b/src/test/ref/incd020.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/incd020.log b/src/test/ref/incd020.log index e27a8a4bb..8d5a458e5 100644 --- a/src/test/ref/incd020.log +++ b/src/test/ref/incd020.log @@ -5,6 +5,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) BGCOL#0 ← ((byte*)) (number) $d020 to:@1 + +(void()) main() main: scope:[main] from @1 to:main::@1 main::@1: scope:[main] from main main::@1 @@ -69,6 +71,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/incrementinarray.cfg b/src/test/ref/incrementinarray.cfg index 3a0dbfeb5..92317fdd8 100644 --- a/src/test/ref/incrementinarray.cfg +++ b/src/test/ref/incrementinarray.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -32,6 +34,8 @@ main::@return: scope:[main] from main::@3 main::@4: scope:[main] from main::@3 [14] (byte*~) print_char_cursor#31 ← (byte*) print_line_cursor#1 to:main::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@2 [15] phi() to:print_ln::@1 @@ -43,6 +47,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [19] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@1 [20] phi() to:print_str::@1 @@ -59,6 +65,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [25] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#12 [26] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#2 to:print_str::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main [27] phi() [28] call memset @@ -66,6 +74,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [29] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [30] phi() to:memset::@1 diff --git a/src/test/ref/incrementinarray.log b/src/test/ref/incrementinarray.log index 3b8957f85..185f285d2 100644 --- a/src/test/ref/incrementinarray.log +++ b/src/test/ref/incrementinarray.log @@ -58,6 +58,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@12 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -105,6 +107,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@36 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@1 (byte*) print_char_cursor#27 ← phi( main::@1/(byte*) print_char_cursor#25 ) (byte*) print_str::str#4 ← phi( main::@1/(byte*) print_str::str#1 ) @@ -127,6 +131,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#13 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from main::@4 (byte*) print_char_cursor#23 ← phi( main::@4/(byte*) print_char_cursor#8 ) (byte*) print_line_cursor#17 ← phi( main::@4/(byte*) print_line_cursor#19 ) @@ -150,6 +156,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#15 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main (byte*) print_screen#1 ← phi( main/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -176,6 +184,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte*) print_line_cursor#22 ← phi( @12/(byte*) print_line_cursor#0 ) (byte[]) txt#0 ← (const string) $0 to:@37 + +(void()) main() main: scope:[main] from @37 (byte*) print_char_cursor#24 ← phi( @37/(byte*) print_char_cursor#26 ) (byte*) print_line_cursor#18 ← phi( @37/(byte*) print_line_cursor#20 ) @@ -586,6 +596,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -611,6 +623,8 @@ main::@return: scope:[main] from main::@3 main::@4: scope:[main] from main::@3 [14] (byte*~) print_char_cursor#31 ← (byte*) print_line_cursor#1 to:main::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@2 [15] phi() to:print_ln::@1 @@ -622,6 +636,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [19] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@1 [20] phi() to:print_str::@1 @@ -638,6 +654,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [25] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#12 [26] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#2 to:print_str::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main [27] phi() [28] call memset @@ -645,6 +663,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [29] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [30] phi() to:memset::@1 diff --git a/src/test/ref/infloop-error.cfg b/src/test/ref/infloop-error.cfg index 859cce320..edf98d46b 100644 --- a/src/test/ref/infloop-error.cfg +++ b/src/test/ref/infloop-error.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/infloop-error.log b/src/test/ref/infloop-error.log index c07533555..ea720e9e2 100644 --- a/src/test/ref/infloop-error.log +++ b/src/test/ref/infloop-error.log @@ -8,6 +8,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::min#0 ← (number) $ff (byte) main::max#0 ← (number) 0 @@ -219,6 +221,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/init-volatiles.cfg b/src/test/ref/init-volatiles.cfg index 783e3daf2..47365dd19 100644 --- a/src/test/ref/init-volatiles.cfg +++ b/src/test/ref/init-volatiles.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/init-volatiles.log b/src/test/ref/init-volatiles.log index 84e2b20af..f3b694c9a 100644 --- a/src/test/ref/init-volatiles.log +++ b/src/test/ref/init-volatiles.log @@ -7,6 +7,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte) x#0 ← (number) $c to:@1 + +(void()) main() main: scope:[main] from @1 (byte) x#8 ← phi( @1/(byte) x#9 ) to:main::@1 @@ -108,6 +110,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/initializer-0.cfg b/src/test/ref/initializer-0.cfg index f1b28795a..15f573bcd 100644 --- a/src/test/ref/initializer-0.cfg +++ b/src/test/ref/initializer-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/initializer-0.log b/src/test/ref/initializer-0.log index 75306a26e..9ae55c97e 100644 --- a/src/test/ref/initializer-0.log +++ b/src/test/ref/initializer-0.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte[]) chars#0 ← { (number) 1, (number) 2, (number) 3 } to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::idx#0 ← (number) 0 @@ -117,6 +119,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/initializer-1.cfg b/src/test/ref/initializer-1.cfg index 29a42064f..d5ca118a2 100644 --- a/src/test/ref/initializer-1.cfg +++ b/src/test/ref/initializer-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/initializer-1.log b/src/test/ref/initializer-1.log index 5fb3317b9..0122b0fa7 100644 --- a/src/test/ref/initializer-1.log +++ b/src/test/ref/initializer-1.log @@ -6,6 +6,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (word[]) words#0 ← { (number) 1, (number) 2, (number) 3 } to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::idx#0 ← (number) 0 @@ -139,6 +141,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/initializer-2.cfg b/src/test/ref/initializer-2.cfg index 52604d640..c417ee6a4 100644 --- a/src/test/ref/initializer-2.cfg +++ b/src/test/ref/initializer-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/initializer-2.log b/src/test/ref/initializer-2.log index b1b2065e3..f58aa4194 100644 --- a/src/test/ref/initializer-2.log +++ b/src/test/ref/initializer-2.log @@ -8,6 +8,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (struct Point[]) points#0 ← { { (number) 1, (number) 2 }, { (number) 3, (number) 4 }, { (number) 5, (number) 6 } } to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::idx#0 ← (number) 0 @@ -166,6 +168,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/initializer-3.cfg b/src/test/ref/initializer-3.cfg index 8b4b113ca..ad589289d 100644 --- a/src/test/ref/initializer-3.cfg +++ b/src/test/ref/initializer-3.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/initializer-3.log b/src/test/ref/initializer-3.log index bd4b58206..ec52809c8 100644 --- a/src/test/ref/initializer-3.log +++ b/src/test/ref/initializer-3.log @@ -10,6 +10,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (struct Point[]) points#0 ← { { (number) 1, (number) 2 }, { (number) 3, (number) 4 }, { (number) 5, (number) 6 } } to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::idx#0 ← (number) 0 @@ -185,6 +187,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inline-asm-clobber-none.cfg b/src/test/ref/inline-asm-clobber-none.cfg index 41ab4b316..468c4baf7 100644 --- a/src/test/ref/inline-asm-clobber-none.cfg +++ b/src/test/ref/inline-asm-clobber-none.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inline-asm-clobber-none.log b/src/test/ref/inline-asm-clobber-none.log index 801a45121..ece2b674d 100644 --- a/src/test/ref/inline-asm-clobber-none.log +++ b/src/test/ref/inline-asm-clobber-none.log @@ -4,6 +4,8 @@ Culled Empty Block (label) main::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -158,6 +160,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inline-asm-clobber.cfg b/src/test/ref/inline-asm-clobber.cfg index 738d0d610..623409563 100644 --- a/src/test/ref/inline-asm-clobber.cfg +++ b/src/test/ref/inline-asm-clobber.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inline-asm-clobber.log b/src/test/ref/inline-asm-clobber.log index 656ba6df0..ea1fab185 100644 --- a/src/test/ref/inline-asm-clobber.log +++ b/src/test/ref/inline-asm-clobber.log @@ -5,6 +5,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -195,6 +197,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inline-asm-jsr-clobber.cfg b/src/test/ref/inline-asm-jsr-clobber.cfg index 260cfde5f..72eb08eeb 100644 --- a/src/test/ref/inline-asm-jsr-clobber.cfg +++ b/src/test/ref/inline-asm-jsr-clobber.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inline-asm-jsr-clobber.log b/src/test/ref/inline-asm-jsr-clobber.log index 39470c7f9..38a09a694 100644 --- a/src/test/ref/inline-asm-jsr-clobber.log +++ b/src/test/ref/inline-asm-jsr-clobber.log @@ -4,6 +4,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -82,6 +84,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inline-asm-label.cfg b/src/test/ref/inline-asm-label.cfg index 572c4937b..c92134954 100644 --- a/src/test/ref/inline-asm-label.cfg +++ b/src/test/ref/inline-asm-label.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { ldx#0 nxt: ldatable,x staSCREEN+1,x inx cpx#4 bnenxt } to:main::@return diff --git a/src/test/ref/inline-asm-label.log b/src/test/ref/inline-asm-label.log index c50a7e027..934c415de 100644 --- a/src/test/ref/inline-asm-label.log +++ b/src/test/ref/inline-asm-label.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte[]) table#0 ← (const string) $0 to:@1 + +(void()) main() main: scope:[main] from @1 asm { ldx#0 nxt: ldatable,x staSCREEN+1,x inx cpx#4 bnenxt } to:main::@return @@ -63,6 +65,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { ldx#0 nxt: ldatable,x staSCREEN+1,x inx cpx#4 bnenxt } to:main::@return diff --git a/src/test/ref/inline-asm-optimized.cfg b/src/test/ref/inline-asm-optimized.cfg index daad5ea03..d09abb222 100644 --- a/src/test/ref/inline-asm-optimized.cfg +++ b/src/test/ref/inline-asm-optimized.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) 0 asm { lda#0 staSCREEN+1 lda#0 staSCREEN+2 } diff --git a/src/test/ref/inline-asm-optimized.log b/src/test/ref/inline-asm-optimized.log index be0c2d6a2..19ebc4d49 100644 --- a/src/test/ref/inline-asm-optimized.log +++ b/src/test/ref/inline-asm-optimized.log @@ -3,6 +3,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 *((byte*) SCREEN#0) ← (number) 0 asm { lda#0 staSCREEN+1 lda#0 staSCREEN+2 } @@ -74,6 +76,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) 0 asm { lda#0 staSCREEN+1 lda#0 staSCREEN+2 } diff --git a/src/test/ref/inline-asm-param.cfg b/src/test/ref/inline-asm-param.cfg index 694f4039e..60933c923 100644 --- a/src/test/ref/inline-asm-param.cfg +++ b/src/test/ref/inline-asm-param.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inline-asm-param.log b/src/test/ref/inline-asm-param.log index 48bcde1b1..b39482995 100644 --- a/src/test/ref/inline-asm-param.log +++ b/src/test/ref/inline-asm-param.log @@ -5,6 +5,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -90,6 +92,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inline-asm-ref-scoped.cfg b/src/test/ref/inline-asm-ref-scoped.cfg index 427210930..7ba11e37f 100644 --- a/src/test/ref/inline-asm-ref-scoped.cfg +++ b/src/test/ref/inline-asm-ref-scoped.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { lda#'c' stasub.ll+1 } [5] call sub @@ -14,6 +16,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [6] return to:@return + +(void()) sub() sub: scope:[sub] from main asm { ll: lda#0 sta$400 } to:sub::@return diff --git a/src/test/ref/inline-asm-ref-scoped.log b/src/test/ref/inline-asm-ref-scoped.log index e9238ade7..0e150d920 100644 --- a/src/test/ref/inline-asm-ref-scoped.log +++ b/src/test/ref/inline-asm-ref-scoped.log @@ -3,6 +3,8 @@ Culled Empty Block (label) @1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @2 asm { lda#'c' stasub.ll+1 } call sub @@ -12,6 +14,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 return to:@return + +(void()) sub() sub: scope:[sub] from main asm { ll: lda#0 sta$400 } to:sub::@return @@ -64,6 +68,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { lda#'c' stasub.ll+1 } [5] call sub @@ -71,6 +77,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [6] return to:@return + +(void()) sub() sub: scope:[sub] from main asm { ll: lda#0 sta$400 } to:sub::@return diff --git a/src/test/ref/inline-asm-refout-const.cfg b/src/test/ref/inline-asm-refout-const.cfg index f0fd9d09e..d78cba3af 100644 --- a/src/test/ref/inline-asm-refout-const.cfg +++ b/src/test/ref/inline-asm-refout-const.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { ldx#0 !: ldatable,x staSCREEN+1,x inx cpx#4 bne!- } to:main::@return diff --git a/src/test/ref/inline-asm-refout-const.log b/src/test/ref/inline-asm-refout-const.log index 0d9866bfe..0a46aa597 100644 --- a/src/test/ref/inline-asm-refout-const.log +++ b/src/test/ref/inline-asm-refout-const.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte[]) table#0 ← (const string) $0 to:@1 + +(void()) main() main: scope:[main] from @1 asm { ldx#0 !: ldatable,x staSCREEN+1,x inx cpx#4 bne!- } to:main::@return @@ -63,6 +65,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { ldx#0 !: ldatable,x staSCREEN+1,x inx cpx#4 bne!- } to:main::@return diff --git a/src/test/ref/inline-asm-refout.cfg b/src/test/ref/inline-asm-refout.cfg index 9d59ab4c8..2611dd54b 100644 --- a/src/test/ref/inline-asm-refout.cfg +++ b/src/test/ref/inline-asm-refout.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0+(byte) $28) ← *((const byte[]) table#0) asm { ldx#0 !: ldatable,x staSCREEN+1,x inx cpx#4 bne!- } diff --git a/src/test/ref/inline-asm-refout.log b/src/test/ref/inline-asm-refout.log index 0916a0f7a..c2285f234 100644 --- a/src/test/ref/inline-asm-refout.log +++ b/src/test/ref/inline-asm-refout.log @@ -3,6 +3,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte[]) table#0 ← (const string) $0 to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte*~) main::$0 ← (byte*) main::SCREEN#0 + (number) $28 @@ -82,6 +84,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0+(byte) $28) ← *((const byte[]) table#0) asm { ldx#0 !: ldatable,x staSCREEN+1,x inx cpx#4 bne!- } diff --git a/src/test/ref/inline-asm.cfg b/src/test/ref/inline-asm.cfg index 496e327af..cd2c30bb5 100644 --- a/src/test/ref/inline-asm.cfg +++ b/src/test/ref/inline-asm.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { lda#'a' ldx#$ff !: sta$0400,x sta$0500,x sta$0600,x sta$0700,x dex bne!- } to:main::@return diff --git a/src/test/ref/inline-asm.log b/src/test/ref/inline-asm.log index 39ea76382..bb65c6496 100644 --- a/src/test/ref/inline-asm.log +++ b/src/test/ref/inline-asm.log @@ -2,6 +2,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 asm { lda#'a' ldx#$ff !: sta$0400,x sta$0500,x sta$0600,x sta$0700,x dex bne!- } to:main::@return @@ -47,6 +49,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { lda#'a' ldx#$ff !: sta$0400,x sta$0500,x sta$0600,x sta$0700,x dex bne!- } to:main::@return diff --git a/src/test/ref/inline-assignment.cfg b/src/test/ref/inline-assignment.cfg index b290bea55..13c0fed3d 100644 --- a/src/test/ref/inline-assignment.cfg +++ b/src/test/ref/inline-assignment.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inline-assignment.log b/src/test/ref/inline-assignment.log index 1cd763fcf..f536093c8 100644 --- a/src/test/ref/inline-assignment.log +++ b/src/test/ref/inline-assignment.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::a#0 ← (byte) 0 (byte) main::i#0 ← (byte) 0 @@ -112,6 +114,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inline-function-if.cfg b/src/test/ref/inline-function-if.cfg index fa29ab154..3922788ea 100644 --- a/src/test/ref/inline-function-if.cfg +++ b/src/test/ref/inline-function-if.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::toUpper1 diff --git a/src/test/ref/inline-function-if.log b/src/test/ref/inline-function-if.log index e8f7de98d..b5efd96d8 100644 --- a/src/test/ref/inline-function-if.log +++ b/src/test/ref/inline-function-if.log @@ -9,6 +9,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) screen#0 ← ((byte*)) (number) $400 to:@2 + +(void()) main() main: scope:[main] from @2 (byte) main::toUpper1_ch#0 ← (byte) 'c' (bool) main::toUpper1_bo#0 ← true @@ -229,6 +231,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::toUpper1 diff --git a/src/test/ref/inline-function-level2.cfg b/src/test/ref/inline-function-level2.cfg index d4964bd20..18996df23 100644 --- a/src/test/ref/inline-function-level2.cfg +++ b/src/test/ref/inline-function-level2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inline-function-level2.log b/src/test/ref/inline-function-level2.log index 274610320..30711ada9 100644 --- a/src/test/ref/inline-function-level2.log +++ b/src/test/ref/inline-function-level2.log @@ -24,6 +24,8 @@ Culled Empty Block (label) @2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @3 (byte*) main::sc#0 ← ((byte*)) (number) $400 to:main::@1 @@ -527,6 +529,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inline-function-min.cfg b/src/test/ref/inline-function-min.cfg index f1c0aa95e..807c39a00 100644 --- a/src/test/ref/inline-function-min.cfg +++ b/src/test/ref/inline-function-min.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::sum1 diff --git a/src/test/ref/inline-function-min.log b/src/test/ref/inline-function-min.log index 9bd9ca6c7..9479025d1 100644 --- a/src/test/ref/inline-function-min.log +++ b/src/test/ref/inline-function-min.log @@ -11,6 +11,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) screen#0 ← ((byte*)) (number) $400 to:@2 + +(void()) main() main: scope:[main] from @2 (byte) main::sum1_a#0 ← (number) 2 (byte) main::sum1_b#0 ← (number) 1 @@ -244,6 +246,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::sum1 diff --git a/src/test/ref/inline-function-print.cfg b/src/test/ref/inline-function-print.cfg index 8702f8cd8..4e9d70dfd 100644 --- a/src/test/ref/inline-function-print.cfg +++ b/src/test/ref/inline-function-print.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::print1 diff --git a/src/test/ref/inline-function-print.log b/src/test/ref/inline-function-print.log index f70ecef4e..662c069da 100644 --- a/src/test/ref/inline-function-print.log +++ b/src/test/ref/inline-function-print.log @@ -20,6 +20,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) screen#0 ← ((byte*)) (number) $400 to:@2 + +(void()) main() main: scope:[main] from @2 (byte*) main::hello#0 ← (const string) main::$3 (byte*) main::print1_at#0 ← (byte*) screen#0 @@ -267,6 +269,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::print1 diff --git a/src/test/ref/inline-function.cfg b/src/test/ref/inline-function.cfg index 135691e06..dee6e8708 100644 --- a/src/test/ref/inline-function.cfg +++ b/src/test/ref/inline-function.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } to:main::@1 diff --git a/src/test/ref/inline-function.log b/src/test/ref/inline-function.log index 394eba3ea..ace3b9a3c 100644 --- a/src/test/ref/inline-function.log +++ b/src/test/ref/inline-function.log @@ -32,6 +32,8 @@ CONTROL FLOW GRAPH SSA (byte*) charset1#0 ← ((byte*)) (number) $1000 (byte*) charset2#0 ← ((byte*)) (number) $1800 to:@2 + +(void()) main() main: scope:[main] from @2 asm { sei } to:main::@1 @@ -363,6 +365,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } to:main::@1 diff --git a/src/test/ref/inline-kasm-clobber.cfg b/src/test/ref/inline-kasm-clobber.cfg index f3290476d..e878d6c3d 100644 --- a/src/test/ref/inline-kasm-clobber.cfg +++ b/src/test/ref/inline-kasm-clobber.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inline-kasm-clobber.log b/src/test/ref/inline-kasm-clobber.log index 20555aaf0..27268509d 100644 --- a/src/test/ref/inline-kasm-clobber.log +++ b/src/test/ref/inline-kasm-clobber.log @@ -5,6 +5,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::k#0 ← (byte) 0 to:main::@1 @@ -169,6 +171,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inline-kasm-data.cfg b/src/test/ref/inline-kasm-data.cfg index 45563de15..e6c963d87 100644 --- a/src/test/ref/inline-kasm-data.cfg +++ b/src/test/ref/inline-kasm-data.cfg @@ -8,6 +8,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inline-kasm-data.log b/src/test/ref/inline-kasm-data.log index e4ffbc4fc..6960882e0 100644 --- a/src/test/ref/inline-kasm-data.log +++ b/src/test/ref/inline-kasm-data.log @@ -6,6 +6,8 @@ CONTROL FLOW GRAPH SSA kickasm(location (byte*) sintab#0) {{ .fill 25, 20 + 20*sin(toRadians(i*360/25)) }} to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte*) main::cols#0 ← ((byte*)) (number) $d800 @@ -132,6 +134,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inline-kasm-loop.cfg b/src/test/ref/inline-kasm-loop.cfg index 3dc5e86e7..b69d39782 100644 --- a/src/test/ref/inline-kasm-loop.cfg +++ b/src/test/ref/inline-kasm-loop.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0+(word) $3e8) ← (byte) 0 kickasm() {{ lda #0 diff --git a/src/test/ref/inline-kasm-loop.log b/src/test/ref/inline-kasm-loop.log index eb2d06eeb..4276c882c 100644 --- a/src/test/ref/inline-kasm-loop.log +++ b/src/test/ref/inline-kasm-loop.log @@ -2,6 +2,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte*~) main::$0 ← (byte*) main::SCREEN#0 + (number) $3e8 @@ -78,6 +80,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0+(word) $3e8) ← (byte) 0 kickasm() {{ lda #0 diff --git a/src/test/ref/inline-kasm-refout.cfg b/src/test/ref/inline-kasm-refout.cfg index c7f97e71e..8add8d31c 100644 --- a/src/test/ref/inline-kasm-refout.cfg +++ b/src/test/ref/inline-kasm-refout.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 kickasm( uses main::SCREEN#0 uses table#0) {{ ldx #0 !: diff --git a/src/test/ref/inline-kasm-refout.log b/src/test/ref/inline-kasm-refout.log index 3c305e5ab..c13078656 100644 --- a/src/test/ref/inline-kasm-refout.log +++ b/src/test/ref/inline-kasm-refout.log @@ -3,6 +3,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte[]) table#0 ← (const string) $0 to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 kickasm( uses main::SCREEN#0 uses table#0) {{ ldx #0 @@ -70,6 +72,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 kickasm( uses main::SCREEN#0 uses table#0) {{ ldx #0 !: diff --git a/src/test/ref/inline-kasm-resource.cfg b/src/test/ref/inline-kasm-resource.cfg index 60758f5d6..de3f4735d 100644 --- a/src/test/ref/inline-kasm-resource.cfg +++ b/src/test/ref/inline-kasm-resource.cfg @@ -11,6 +11,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0+(word) $3f8) ← (byte)(word)(const byte*) SPRITE#0/(byte) $40 [5] *((const byte*) SPRITES_ENABLE#0) ← (byte) 1 diff --git a/src/test/ref/inline-kasm-resource.log b/src/test/ref/inline-kasm-resource.log index 907b5f7ef..961796bdf 100644 --- a/src/test/ref/inline-kasm-resource.log +++ b/src/test/ref/inline-kasm-resource.log @@ -12,6 +12,8 @@ CONTROL FLOW GRAPH SSA (byte*) SPRITES_XPOS#0 ← ((byte*)) (number) $d000 (byte*) SPRITES_YPOS#0 ← ((byte*)) (number) $d001 to:@1 + +(void()) main() main: scope:[main] from @1 (byte*~) main::$0 ← (byte*) SCREEN#0 + (number) $3f8 (word~) main::$1 ← ((word)) (byte*) SPRITE#0 @@ -142,6 +144,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0+(word) $3f8) ← (byte)(word)(const byte*) SPRITE#0/(byte) $40 [5] *((const byte*) SPRITES_ENABLE#0) ← (byte) 1 diff --git a/src/test/ref/inline-pointer-0.cfg b/src/test/ref/inline-pointer-0.cfg index 9aa77edf8..ea8a57574 100644 --- a/src/test/ref/inline-pointer-0.cfg +++ b/src/test/ref/inline-pointer-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::screen#0) ← (byte) 'a' to:main::@return diff --git a/src/test/ref/inline-pointer-0.log b/src/test/ref/inline-pointer-0.log index cfbffc9e5..b6b3093e4 100644 --- a/src/test/ref/inline-pointer-0.log +++ b/src/test/ref/inline-pointer-0.log @@ -2,6 +2,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*~) main::$0 ← ((byte*)) { (number) 4, (number) 0 } (byte*) main::screen#0 ← (byte*~) main::$0 @@ -84,6 +86,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::screen#0) ← (byte) 'a' to:main::@return diff --git a/src/test/ref/inline-pointer-1.cfg b/src/test/ref/inline-pointer-1.cfg index f3899e816..9cffbe839 100644 --- a/src/test/ref/inline-pointer-1.cfg +++ b/src/test/ref/inline-pointer-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call puta @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) puta((byte) puta::ph , (byte) puta::pl) puta: scope:[puta] from main main::@1 [9] (byte) puta::pl#2 ← phi( main/(byte) 0 main::@1/(byte) $18 ) [9] (byte) puta::ph#2 ← phi( main/(byte) 4 main::@1/(byte) 5 ) diff --git a/src/test/ref/inline-pointer-1.log b/src/test/ref/inline-pointer-1.log index 68cc9a59b..58adda30d 100644 --- a/src/test/ref/inline-pointer-1.log +++ b/src/test/ref/inline-pointer-1.log @@ -3,6 +3,8 @@ Culled Empty Block (label) @1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @2 (byte) puta::ph#0 ← (number) 4 (byte) puta::pl#0 ← (number) 0 @@ -18,6 +20,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 return to:@return + +(void()) puta((byte) puta::ph , (byte) puta::pl) puta: scope:[puta] from main main::@1 (byte) puta::pl#2 ← phi( main/(byte) puta::pl#0 main::@1/(byte) puta::pl#1 ) (byte) puta::ph#2 ← phi( main/(byte) puta::ph#0 main::@1/(byte) puta::ph#1 ) @@ -136,6 +140,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call puta @@ -147,6 +153,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) puta((byte) puta::ph , (byte) puta::pl) puta: scope:[puta] from main main::@1 [9] (byte) puta::pl#2 ← phi( main/(byte) 0 main::@1/(byte) $18 ) [9] (byte) puta::ph#2 ← phi( main/(byte) 4 main::@1/(byte) 5 ) diff --git a/src/test/ref/inline-pointer-2.cfg b/src/test/ref/inline-pointer-2.cfg index 9aa77edf8..ea8a57574 100644 --- a/src/test/ref/inline-pointer-2.cfg +++ b/src/test/ref/inline-pointer-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::screen#0) ← (byte) 'a' to:main::@return diff --git a/src/test/ref/inline-pointer-2.log b/src/test/ref/inline-pointer-2.log index 75057582d..1e1e217ac 100644 --- a/src/test/ref/inline-pointer-2.log +++ b/src/test/ref/inline-pointer-2.log @@ -2,6 +2,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*~) main::$0 ← ((byte*)) { (number) 4, (number) 0 } (word~) main::$1 ← ((word)) { (number) 0, (number) $28 } @@ -103,6 +105,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::screen#0) ← (byte) 'a' to:main::@return diff --git a/src/test/ref/inline-string-2.cfg b/src/test/ref/inline-string-2.cfg index e7e21737c..1d0643900 100644 --- a/src/test/ref/inline-string-2.cfg +++ b/src/test/ref/inline-string-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_msg @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print_msg((byte) print_msg::idx) print_msg: scope:[print_msg] from main main::@1 [9] (byte*) screen#18 ← phi( main/(byte*) 1024 main::@1/(byte*) screen#14 ) [9] (byte) print_msg::idx#2 ← phi( main/(byte) 1 main::@1/(byte) 2 ) @@ -34,6 +38,8 @@ print_msg::@2: scope:[print_msg] from print_msg print_msg::@1 print_msg::@return: scope:[print_msg] from print_msg::@2 [15] return to:@return + +(void()) print((byte*) print::msg) print: scope:[print] from print_msg::@2 [16] phi() to:print::@1 diff --git a/src/test/ref/inline-string-2.log b/src/test/ref/inline-string-2.log index 82a9ea855..5131fc410 100644 --- a/src/test/ref/inline-string-2.log +++ b/src/test/ref/inline-string-2.log @@ -9,6 +9,8 @@ Culled Empty Block (label) print::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @3 (byte*) screen#17 ← phi( @3/(byte*) screen#20 ) (byte) print_msg::idx#0 ← (number) 1 @@ -29,6 +31,8 @@ main::@return: scope:[main] from main::@2 (byte*) screen#2 ← (byte*) screen#11 return to:@return + +(void()) print_msg((byte) print_msg::idx) print_msg: scope:[print_msg] from main main::@1 (byte*) screen#24 ← phi( main/(byte*) screen#17 main::@1/(byte*) screen#0 ) (byte) print_msg::idx#2 ← phi( main/(byte) print_msg::idx#0 main::@1/(byte) print_msg::idx#1 ) @@ -62,6 +66,8 @@ print_msg::@return: scope:[print_msg] from print_msg::@5 @2: scope:[] from @begin (byte*) screen#5 ← ((byte*)) (number) $400 to:@3 + +(void()) print((byte*) print::msg) print: scope:[print] from print_msg::@2 (byte*) screen#23 ← phi( print_msg::@2/(byte*) screen#18 ) (byte*) print::msg#4 ← phi( print_msg::@2/(byte*) print::msg#0 ) @@ -272,6 +278,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_msg @@ -283,6 +291,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print_msg((byte) print_msg::idx) print_msg: scope:[print_msg] from main main::@1 [9] (byte*) screen#18 ← phi( main/(byte*) 1024 main::@1/(byte*) screen#14 ) [9] (byte) print_msg::idx#2 ← phi( main/(byte) 1 main::@1/(byte) 2 ) @@ -299,6 +309,8 @@ print_msg::@2: scope:[print_msg] from print_msg print_msg::@1 print_msg::@return: scope:[print_msg] from print_msg::@2 [15] return to:@return + +(void()) print((byte*) print::msg) print: scope:[print] from print_msg::@2 [16] phi() to:print::@1 diff --git a/src/test/ref/inline-string-3.cfg b/src/test/ref/inline-string-3.cfg index 2a1bdc0f1..2a2e45839 100644 --- a/src/test/ref/inline-string-3.cfg +++ b/src/test/ref/inline-string-3.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::PTR#0) ← <(const byte[]) main::STRING#0 [5] *((const byte*) main::PTR#0+(byte) 1) ← >(const byte[]) main::STRING#0 diff --git a/src/test/ref/inline-string-3.log b/src/test/ref/inline-string-3.log index d8d1050b3..45693ed97 100644 --- a/src/test/ref/inline-string-3.log +++ b/src/test/ref/inline-string-3.log @@ -2,6 +2,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte[]) main::STRING#0 ← (const string) main::$5 (byte*) main::PTR#0 ← ((byte*)) (number) $9ffe @@ -121,6 +123,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::PTR#0) ← <(const byte[]) main::STRING#0 [5] *((const byte*) main::PTR#0+(byte) 1) ← >(const byte[]) main::STRING#0 diff --git a/src/test/ref/inline-string-4.cfg b/src/test/ref/inline-string-4.cfg index 2e7587004..987b1658c 100644 --- a/src/test/ref/inline-string-4.cfg +++ b/src/test/ref/inline-string-4.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call output @@ -14,6 +16,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [6] return to:@return + +(void()) output((dword) output::dw) output: scope:[output] from main [7] *((const dword*) screen#0) ← (const dword) main::dw#0 to:output::@return diff --git a/src/test/ref/inline-string-4.log b/src/test/ref/inline-string-4.log index c0a80ab56..f840235a5 100644 --- a/src/test/ref/inline-string-4.log +++ b/src/test/ref/inline-string-4.log @@ -2,6 +2,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @2 (byte[]) main::msg#0 ← (const string) main::$2 (dword~) main::$0 ← ((dword)) (byte[]) main::msg#0 @@ -17,6 +19,8 @@ main::@return: scope:[main] from main::@1 @1: scope:[] from @begin (dword*) screen#0 ← ((dword*)) (number) $400 to:@2 + +(void()) output((dword) output::dw) output: scope:[output] from main (dword) output::dw#1 ← phi( main/(dword) output::dw#0 ) *((dword*) screen#0) ← (dword) output::dw#1 @@ -107,6 +111,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call output @@ -114,6 +120,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [6] return to:@return + +(void()) output((dword) output::dw) output: scope:[output] from main [7] *((const dword*) screen#0) ← (const dword) main::dw#0 to:output::@return diff --git a/src/test/ref/inline-string.cfg b/src/test/ref/inline-string.cfg index a814e5b4c..8cc32cf28 100644 --- a/src/test/ref/inline-string.cfg +++ b/src/test/ref/inline-string.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print @@ -22,6 +24,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [10] return to:@return + +(void()) print((byte*) print::msg) print: scope:[print] from main main::@1 main::@2 [11] (byte*) screen#18 ← phi( main/(byte*) 1024 main::@1/(byte*) screen#12 main::@2/(byte*) screen#12 ) [11] (byte*) print::msg#6 ← phi( main/(const byte[]) msg1#0 main::@1/(const byte[]) main::msg2#0 main::@2/(const string) main::msg ) diff --git a/src/test/ref/inline-string.log b/src/test/ref/inline-string.log index d7c99242f..658d870e4 100644 --- a/src/test/ref/inline-string.log +++ b/src/test/ref/inline-string.log @@ -8,6 +8,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte[]) msg1#0 ← (const string) $0 to:@1 + +(void()) main() main: scope:[main] from @2 (byte*) screen#15 ← phi( @2/(byte*) screen#17 ) (byte[]) main::msg2#0 ← (const string) main::$3 @@ -38,6 +40,8 @@ main::@return: scope:[main] from main::@3 @1: scope:[] from @begin (byte*) screen#4 ← ((byte*)) (number) $400 to:@2 + +(void()) print((byte*) print::msg) print: scope:[print] from main main::@1 main::@2 (byte*) screen#18 ← phi( main/(byte*) screen#15 main::@1/(byte*) screen#0 main::@2/(byte*) screen#1 ) (byte*) print::msg#6 ← phi( main/(byte*) print::msg#0 main::@1/(byte*) print::msg#1 main::@2/(byte*) print::msg#2 ) @@ -206,6 +210,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print @@ -221,6 +227,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [10] return to:@return + +(void()) print((byte*) print::msg) print: scope:[print] from main main::@1 main::@2 [11] (byte*) screen#18 ← phi( main/(byte*) 1024 main::@1/(byte*) screen#12 main::@2/(byte*) screen#12 ) [11] (byte*) print::msg#6 ← phi( main/(const byte[]) msg1#0 main::@1/(const byte[]) main::msg2#0 main::@2/(const string) main::msg ) diff --git a/src/test/ref/inline-word-0.cfg b/src/test/ref/inline-word-0.cfg index 12043eda2..69951ec56 100644 --- a/src/test/ref/inline-word-0.cfg +++ b/src/test/ref/inline-word-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const word*) main::screen#0) ← (const word) main::w#0 to:main::@return diff --git a/src/test/ref/inline-word-0.log b/src/test/ref/inline-word-0.log index 48fce1cdd..4f511aa73 100644 --- a/src/test/ref/inline-word-0.log +++ b/src/test/ref/inline-word-0.log @@ -4,6 +4,8 @@ Identified constant variable (word*) main::screen CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (word) main::w#0 ← ((word)) { (byte) 2, (byte) 1 } (word*) main::screen#0 ← ((word*)) (number) $400 @@ -102,6 +104,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const word*) main::screen#0) ← (const word) main::w#0 to:main::@return diff --git a/src/test/ref/inline-word-1.cfg b/src/test/ref/inline-word-1.cfg index 12043eda2..69951ec56 100644 --- a/src/test/ref/inline-word-1.cfg +++ b/src/test/ref/inline-word-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const word*) main::screen#0) ← (const word) main::w#0 to:main::@return diff --git a/src/test/ref/inline-word-1.log b/src/test/ref/inline-word-1.log index 3404401cb..e9b8be7d8 100644 --- a/src/test/ref/inline-word-1.log +++ b/src/test/ref/inline-word-1.log @@ -4,6 +4,8 @@ Identified constant variable (word*) main::screen CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (word) main::w#0 ← ((word)) { (number) 1, (number) 2 } (word*) main::screen#0 ← ((word*)) (number) $400 @@ -102,6 +104,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const word*) main::screen#0) ← (const word) main::w#0 to:main::@return diff --git a/src/test/ref/inline-word-2.cfg b/src/test/ref/inline-word-2.cfg index 12043eda2..69951ec56 100644 --- a/src/test/ref/inline-word-2.cfg +++ b/src/test/ref/inline-word-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const word*) main::screen#0) ← (const word) main::w#0 to:main::@return diff --git a/src/test/ref/inline-word-2.log b/src/test/ref/inline-word-2.log index 64022fa2c..9573cc6e1 100644 --- a/src/test/ref/inline-word-2.log +++ b/src/test/ref/inline-word-2.log @@ -4,6 +4,8 @@ Identified constant variable (word*) main::screen CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (word) main::w#0 ← ((word)) { (number) 1, (byte) 2 } (word*) main::screen#0 ← ((word*)) (number) $400 @@ -102,6 +104,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const word*) main::screen#0) ← (const word) main::w#0 to:main::@return diff --git a/src/test/ref/inline-word.cfg b/src/test/ref/inline-word.cfg index 8995373e7..b9032c52c 100644 --- a/src/test/ref/inline-word.cfg +++ b/src/test/ref/inline-word.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inline-word.log b/src/test/ref/inline-word.log index ff0ecf50b..43fb46bcb 100644 --- a/src/test/ref/inline-word.log +++ b/src/test/ref/inline-word.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte~) main::$0 ← > (byte*) SCREEN#0 (byte*~) main::$1 ← (byte*) SCREEN#0 + (number) $100 @@ -186,6 +188,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inlinearrayproblem.cfg b/src/test/ref/inlinearrayproblem.cfg index 02ec51f81..d7e89333b 100644 --- a/src/test/ref/inlinearrayproblem.cfg +++ b/src/test/ref/inlinearrayproblem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inlinearrayproblem.log b/src/test/ref/inlinearrayproblem.log index 34f8d4770..fa2a2469c 100644 --- a/src/test/ref/inlinearrayproblem.log +++ b/src/test/ref/inlinearrayproblem.log @@ -7,6 +7,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte*) SCREEN2#0 ← ((byte*)) (number) $400+(number) $28 to:@1 + +(void()) main() main: scope:[main] from @1 (byte[]) main::txt#0 ← (const string) main::$1 (byte[]) main::data#0 ← { (number) 1, (number) 2, (number) 3 } @@ -116,6 +118,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inmem-const-array.cfg b/src/test/ref/inmem-const-array.cfg index d0f4320dc..7b4b8a3b0 100644 --- a/src/test/ref/inmem-const-array.cfg +++ b/src/test/ref/inmem-const-array.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inmem-const-array.log b/src/test/ref/inmem-const-array.log index 908defe29..8ff78cad6 100644 --- a/src/test/ref/inmem-const-array.log +++ b/src/test/ref/inmem-const-array.log @@ -11,6 +11,8 @@ CONTROL FLOW GRAPH SSA (byte) RED#0 ← (number) 2 (byte) GREEN#0 ← (number) 5 to:@1 + +(void()) main() main: scope:[main] from @1 (byte[]) main::colseq#0 ← { (byte) WHITE#0, (byte) RED#0, (byte) GREEN#0 } (byte*) main::screen#0 ← ((byte*)) (number) $400 @@ -191,6 +193,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inmemarray.cfg b/src/test/ref/inmemarray.cfg index a191926fa..1b322914f 100644 --- a/src/test/ref/inmemarray.cfg +++ b/src/test/ref/inmemarray.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inmemarray.log b/src/test/ref/inmemarray.log index 4d021d619..127f82d08 100644 --- a/src/test/ref/inmemarray.log +++ b/src/test/ref/inmemarray.log @@ -6,6 +6,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte[]) TXT#0 ← { (number) 3, (number) 1, (number) $d, (number) 5, (number) $c, (number) $f, (number) $14, (number) $20 } to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::j#0 ← (number) 0 (byte) main::i#0 ← (byte) 0 @@ -165,6 +167,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inmemstring.cfg b/src/test/ref/inmemstring.cfg index d48d9127d..c2927e0c8 100644 --- a/src/test/ref/inmemstring.cfg +++ b/src/test/ref/inmemstring.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inmemstring.log b/src/test/ref/inmemstring.log index f5c91fa92..ce054079e 100644 --- a/src/test/ref/inmemstring.log +++ b/src/test/ref/inmemstring.log @@ -6,6 +6,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte[]) TEXT#0 ← (const string) $0 to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::cursor#0 ← (byte*) SCREEN#0 (byte) main::i#0 ← (number) 0 @@ -158,6 +160,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inner-increment-problem.cfg b/src/test/ref/inner-increment-problem.cfg index 15cf27701..26593d558 100644 --- a/src/test/ref/inner-increment-problem.cfg +++ b/src/test/ref/inner-increment-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/inner-increment-problem.log b/src/test/ref/inner-increment-problem.log index e20b12cce..1113a63e8 100644 --- a/src/test/ref/inner-increment-problem.log +++ b/src/test/ref/inner-increment-problem.log @@ -7,6 +7,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (word[$100]) CHAR_COUNTS#0 ← { fill( $100, 0) } to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (word) main::i#0 ← (word) 0 @@ -115,6 +117,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/int-conversion.cfg b/src/test/ref/int-conversion.cfg index 1e7a8bc7a..dbb3d03ba 100644 --- a/src/test/ref/int-conversion.cfg +++ b/src/test/ref/int-conversion.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -29,6 +31,8 @@ main::@2: scope:[main] from main::@1 [12] *((byte*) main::s#2) ← (byte) ' ' [13] (byte*) main::s#1 ← ++ (byte*) main::s#2 to:main::@1 + +(void()) testBinaryOperator() testBinaryOperator: scope:[testBinaryOperator] from main::@4 [14] phi() [15] call assertType @@ -176,6 +180,8 @@ testBinaryOperator::@35: scope:[testBinaryOperator] from testBinaryOperator::@3 testBinaryOperator::@return: scope:[testBinaryOperator] from testBinaryOperator::@35 [86] return to:@return + +(void()) assertType((byte) assertType::t1 , (byte) assertType::t2) assertType: scope:[assertType] from testBinaryOperator testBinaryOperator::@1 testBinaryOperator::@10 testBinaryOperator::@11 testBinaryOperator::@12 testBinaryOperator::@13 testBinaryOperator::@14 testBinaryOperator::@15 testBinaryOperator::@16 testBinaryOperator::@17 testBinaryOperator::@18 testBinaryOperator::@19 testBinaryOperator::@2 testBinaryOperator::@20 testBinaryOperator::@21 testBinaryOperator::@22 testBinaryOperator::@23 testBinaryOperator::@24 testBinaryOperator::@25 testBinaryOperator::@26 testBinaryOperator::@27 testBinaryOperator::@28 testBinaryOperator::@29 testBinaryOperator::@3 testBinaryOperator::@30 testBinaryOperator::@31 testBinaryOperator::@32 testBinaryOperator::@33 testBinaryOperator::@34 testBinaryOperator::@35 testBinaryOperator::@4 testBinaryOperator::@5 testBinaryOperator::@6 testBinaryOperator::@7 testBinaryOperator::@8 testBinaryOperator::@9 testUnaryOperator testUnaryOperator::@1 testUnaryOperator::@2 testUnaryOperator::@3 testUnaryOperator::@4 testUnaryOperator::@5 [87] (byte) idx#105 ← phi( testBinaryOperator/(byte) $28 testBinaryOperator::@1/(byte) idx#108 testBinaryOperator::@10/(byte) idx#108 testBinaryOperator::@11/(byte) idx#108 testBinaryOperator::@12/(byte) idx#26 testBinaryOperator::@13/(byte) idx#108 testBinaryOperator::@14/(byte) idx#108 testBinaryOperator::@15/(byte) idx#108 testBinaryOperator::@16/(byte) idx#108 testBinaryOperator::@17/(byte) idx#108 testBinaryOperator::@18/(byte) $50 testBinaryOperator::@19/(byte) idx#108 testBinaryOperator::@2/(byte) idx#108 testBinaryOperator::@20/(byte) idx#108 testBinaryOperator::@21/(byte) idx#108 testBinaryOperator::@22/(byte) idx#108 testBinaryOperator::@23/(byte) idx#108 testBinaryOperator::@24/(byte) idx#40 testBinaryOperator::@25/(byte) idx#108 testBinaryOperator::@26/(byte) idx#108 testBinaryOperator::@27/(byte) idx#108 testBinaryOperator::@28/(byte) idx#108 testBinaryOperator::@29/(byte) idx#108 testBinaryOperator::@3/(byte) idx#108 testBinaryOperator::@30/(byte) idx#47 testBinaryOperator::@31/(byte) idx#108 testBinaryOperator::@32/(byte) idx#108 testBinaryOperator::@33/(byte) idx#108 testBinaryOperator::@34/(byte) idx#108 testBinaryOperator::@35/(byte) idx#108 testBinaryOperator::@4/(byte) idx#108 testBinaryOperator::@5/(byte) idx#108 testBinaryOperator::@6/(byte) idx#19 testBinaryOperator::@7/(byte) idx#108 testBinaryOperator::@8/(byte) idx#108 testBinaryOperator::@9/(byte) idx#108 testUnaryOperator/(byte) 0 testUnaryOperator::@1/(byte) idx#108 testUnaryOperator::@2/(byte) idx#108 testUnaryOperator::@3/(byte) idx#108 testUnaryOperator::@4/(byte) idx#108 testUnaryOperator::@5/(byte) idx#108 ) [87] (byte) assertType::t2#42 ← phi( testBinaryOperator/(const byte) TYPEID_BYTE testBinaryOperator::@1/(const byte) TYPEID_BYTE testBinaryOperator::@10/(const byte) TYPEID_DWORD testBinaryOperator::@11/(const byte) TYPEID_SIGNED_DWORD testBinaryOperator::@12/(const byte) TYPEID_WORD testBinaryOperator::@13/(const byte) TYPEID_WORD testBinaryOperator::@14/(const byte) TYPEID_WORD testBinaryOperator::@15/(const byte) TYPEID_WORD testBinaryOperator::@16/(const byte) TYPEID_DWORD testBinaryOperator::@17/(const byte) TYPEID_SIGNED_DWORD testBinaryOperator::@18/(const byte) TYPEID_SIGNED_WORD testBinaryOperator::@19/(const byte) TYPEID_SIGNED_WORD testBinaryOperator::@2/(const byte) TYPEID_WORD testBinaryOperator::@20/(const byte) TYPEID_WORD testBinaryOperator::@21/(const byte) TYPEID_SIGNED_WORD testBinaryOperator::@22/(const byte) TYPEID_DWORD testBinaryOperator::@23/(const byte) TYPEID_SIGNED_DWORD testBinaryOperator::@24/(const byte) TYPEID_DWORD testBinaryOperator::@25/(const byte) TYPEID_DWORD testBinaryOperator::@26/(const byte) TYPEID_DWORD testBinaryOperator::@27/(const byte) TYPEID_DWORD testBinaryOperator::@28/(const byte) TYPEID_DWORD testBinaryOperator::@29/(const byte) TYPEID_DWORD testBinaryOperator::@3/(const byte) TYPEID_SIGNED_WORD testBinaryOperator::@30/(const byte) TYPEID_SIGNED_DWORD testBinaryOperator::@31/(const byte) TYPEID_SIGNED_DWORD testBinaryOperator::@32/(const byte) TYPEID_SIGNED_DWORD testBinaryOperator::@33/(const byte) TYPEID_SIGNED_DWORD testBinaryOperator::@34/(const byte) TYPEID_DWORD testBinaryOperator::@35/(const byte) TYPEID_SIGNED_DWORD testBinaryOperator::@4/(const byte) TYPEID_DWORD testBinaryOperator::@5/(const byte) TYPEID_SIGNED_DWORD testBinaryOperator::@6/(const byte) TYPEID_BYTE testBinaryOperator::@7/(const byte) TYPEID_SIGNED_BYTE testBinaryOperator::@8/(const byte) TYPEID_WORD testBinaryOperator::@9/(const byte) TYPEID_SIGNED_WORD testUnaryOperator/(const byte) TYPEID_BYTE testUnaryOperator::@1/(const byte) TYPEID_SIGNED_BYTE testUnaryOperator::@2/(const byte) TYPEID_WORD testUnaryOperator::@3/(const byte) TYPEID_SIGNED_WORD testUnaryOperator::@4/(const byte) TYPEID_DWORD testUnaryOperator::@5/(const byte) TYPEID_SIGNED_DWORD ) @@ -195,6 +201,8 @@ assertType::@return: scope:[assertType] from assertType::@2 assertType::@1: scope:[assertType] from assertType [93] *((const byte*) COLS#0 + (byte) idx#105) ← (const byte) GREEN#0 to:assertType::@2 + +(void()) testUnaryOperator() testUnaryOperator: scope:[testUnaryOperator] from main::@3 [94] phi() [95] call assertType diff --git a/src/test/ref/int-conversion.log b/src/test/ref/int-conversion.log index dee6940dc..9bc9b8957 100644 --- a/src/test/ref/int-conversion.log +++ b/src/test/ref/int-conversion.log @@ -56,6 +56,8 @@ CONTROL FLOW GRAPH SSA (byte*) COLS#0 ← ((byte*)) (number) $d800 (byte) idx#0 ← (byte) 0 to:@4 + +(void()) main() main: scope:[main] from @4 (byte) idx#114 ← phi( @4/(byte) idx#112 ) (byte*) main::s#0 ← (byte*) SCREEN#0 @@ -91,6 +93,8 @@ main::@return: scope:[main] from main::@8 (byte) idx#3 ← (byte) idx#60 return to:@return + +(void()) testUnaryOperator() testUnaryOperator: scope:[testUnaryOperator] from main::@3 (byte) idx#4 ← (number) 0 (byte~) testUnaryOperator::$0 ← (const byte) TYPEID_BYTE @@ -147,6 +151,8 @@ testUnaryOperator::@return: scope:[testUnaryOperator] from testUnaryOperator::@ (byte) idx#11 ← (byte) idx#67 return to:@return + +(void()) testBinaryOperator() testBinaryOperator: scope:[testBinaryOperator] from main::@7 (byte) idx#12 ← (number) $28 (byte~) testBinaryOperator::$0 ← (const byte) TYPEID_BYTE @@ -448,6 +454,8 @@ testBinaryOperator::@return: scope:[testBinaryOperator] from testBinaryOperator (byte) idx#54 ← (byte) idx#104 return to:@return + +(void()) assertType((byte) assertType::t1 , (byte) assertType::t2) assertType: scope:[assertType] from testBinaryOperator testBinaryOperator::@1 testBinaryOperator::@10 testBinaryOperator::@11 testBinaryOperator::@12 testBinaryOperator::@13 testBinaryOperator::@14 testBinaryOperator::@15 testBinaryOperator::@16 testBinaryOperator::@17 testBinaryOperator::@18 testBinaryOperator::@19 testBinaryOperator::@2 testBinaryOperator::@20 testBinaryOperator::@21 testBinaryOperator::@22 testBinaryOperator::@23 testBinaryOperator::@24 testBinaryOperator::@25 testBinaryOperator::@26 testBinaryOperator::@27 testBinaryOperator::@28 testBinaryOperator::@29 testBinaryOperator::@3 testBinaryOperator::@30 testBinaryOperator::@31 testBinaryOperator::@32 testBinaryOperator::@33 testBinaryOperator::@34 testBinaryOperator::@35 testBinaryOperator::@4 testBinaryOperator::@5 testBinaryOperator::@6 testBinaryOperator::@7 testBinaryOperator::@8 testBinaryOperator::@9 testUnaryOperator testUnaryOperator::@1 testUnaryOperator::@2 testUnaryOperator::@3 testUnaryOperator::@4 testUnaryOperator::@5 (byte) idx#111 ← phi( testBinaryOperator/(byte) idx#12 testBinaryOperator::@1/(byte) idx#13 testBinaryOperator::@10/(byte) idx#23 testBinaryOperator::@11/(byte) idx#24 testBinaryOperator::@12/(byte) idx#26 testBinaryOperator::@13/(byte) idx#27 testBinaryOperator::@14/(byte) idx#28 testBinaryOperator::@15/(byte) idx#29 testBinaryOperator::@16/(byte) idx#30 testBinaryOperator::@17/(byte) idx#31 testBinaryOperator::@18/(byte) idx#33 testBinaryOperator::@19/(byte) idx#34 testBinaryOperator::@2/(byte) idx#14 testBinaryOperator::@20/(byte) idx#35 testBinaryOperator::@21/(byte) idx#36 testBinaryOperator::@22/(byte) idx#37 testBinaryOperator::@23/(byte) idx#38 testBinaryOperator::@24/(byte) idx#40 testBinaryOperator::@25/(byte) idx#41 testBinaryOperator::@26/(byte) idx#42 testBinaryOperator::@27/(byte) idx#43 testBinaryOperator::@28/(byte) idx#44 testBinaryOperator::@29/(byte) idx#45 testBinaryOperator::@3/(byte) idx#15 testBinaryOperator::@30/(byte) idx#47 testBinaryOperator::@31/(byte) idx#48 testBinaryOperator::@32/(byte) idx#49 testBinaryOperator::@33/(byte) idx#50 testBinaryOperator::@34/(byte) idx#51 testBinaryOperator::@35/(byte) idx#52 testBinaryOperator::@4/(byte) idx#16 testBinaryOperator::@5/(byte) idx#17 testBinaryOperator::@6/(byte) idx#19 testBinaryOperator::@7/(byte) idx#20 testBinaryOperator::@8/(byte) idx#21 testBinaryOperator::@9/(byte) idx#22 testUnaryOperator/(byte) idx#4 testUnaryOperator::@1/(byte) idx#5 testUnaryOperator::@2/(byte) idx#6 testUnaryOperator::@3/(byte) idx#7 testUnaryOperator::@4/(byte) idx#8 testUnaryOperator::@5/(byte) idx#9 ) (byte) assertType::t2#42 ← phi( testBinaryOperator/(byte) assertType::t2#6 testBinaryOperator::@1/(byte) assertType::t2#7 testBinaryOperator::@10/(byte) assertType::t2#16 testBinaryOperator::@11/(byte) assertType::t2#17 testBinaryOperator::@12/(byte) assertType::t2#18 testBinaryOperator::@13/(byte) assertType::t2#19 testBinaryOperator::@14/(byte) assertType::t2#20 testBinaryOperator::@15/(byte) assertType::t2#21 testBinaryOperator::@16/(byte) assertType::t2#22 testBinaryOperator::@17/(byte) assertType::t2#23 testBinaryOperator::@18/(byte) assertType::t2#24 testBinaryOperator::@19/(byte) assertType::t2#25 testBinaryOperator::@2/(byte) assertType::t2#8 testBinaryOperator::@20/(byte) assertType::t2#26 testBinaryOperator::@21/(byte) assertType::t2#27 testBinaryOperator::@22/(byte) assertType::t2#28 testBinaryOperator::@23/(byte) assertType::t2#29 testBinaryOperator::@24/(byte) assertType::t2#30 testBinaryOperator::@25/(byte) assertType::t2#31 testBinaryOperator::@26/(byte) assertType::t2#32 testBinaryOperator::@27/(byte) assertType::t2#33 testBinaryOperator::@28/(byte) assertType::t2#34 testBinaryOperator::@29/(byte) assertType::t2#35 testBinaryOperator::@3/(byte) assertType::t2#9 testBinaryOperator::@30/(byte) assertType::t2#36 testBinaryOperator::@31/(byte) assertType::t2#37 testBinaryOperator::@32/(byte) assertType::t2#38 testBinaryOperator::@33/(byte) assertType::t2#39 testBinaryOperator::@34/(byte) assertType::t2#40 testBinaryOperator::@35/(byte) assertType::t2#41 testBinaryOperator::@4/(byte) assertType::t2#10 testBinaryOperator::@5/(byte) assertType::t2#11 testBinaryOperator::@6/(byte) assertType::t2#12 testBinaryOperator::@7/(byte) assertType::t2#13 testBinaryOperator::@8/(byte) assertType::t2#14 testBinaryOperator::@9/(byte) assertType::t2#15 testUnaryOperator/(byte) assertType::t2#0 testUnaryOperator::@1/(byte) assertType::t2#1 testUnaryOperator::@2/(byte) assertType::t2#2 testUnaryOperator::@3/(byte) assertType::t2#3 testUnaryOperator::@4/(byte) assertType::t2#4 testUnaryOperator::@5/(byte) assertType::t2#5 ) @@ -1390,6 +1398,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -1412,6 +1422,8 @@ main::@2: scope:[main] from main::@1 [12] *((byte*) main::s#2) ← (byte) ' ' [13] (byte*) main::s#1 ← ++ (byte*) main::s#2 to:main::@1 + +(void()) testBinaryOperator() testBinaryOperator: scope:[testBinaryOperator] from main::@4 [14] phi() [15] call assertType @@ -1559,6 +1571,8 @@ testBinaryOperator::@35: scope:[testBinaryOperator] from testBinaryOperator::@3 testBinaryOperator::@return: scope:[testBinaryOperator] from testBinaryOperator::@35 [86] return to:@return + +(void()) assertType((byte) assertType::t1 , (byte) assertType::t2) assertType: scope:[assertType] from testBinaryOperator testBinaryOperator::@1 testBinaryOperator::@10 testBinaryOperator::@11 testBinaryOperator::@12 testBinaryOperator::@13 testBinaryOperator::@14 testBinaryOperator::@15 testBinaryOperator::@16 testBinaryOperator::@17 testBinaryOperator::@18 testBinaryOperator::@19 testBinaryOperator::@2 testBinaryOperator::@20 testBinaryOperator::@21 testBinaryOperator::@22 testBinaryOperator::@23 testBinaryOperator::@24 testBinaryOperator::@25 testBinaryOperator::@26 testBinaryOperator::@27 testBinaryOperator::@28 testBinaryOperator::@29 testBinaryOperator::@3 testBinaryOperator::@30 testBinaryOperator::@31 testBinaryOperator::@32 testBinaryOperator::@33 testBinaryOperator::@34 testBinaryOperator::@35 testBinaryOperator::@4 testBinaryOperator::@5 testBinaryOperator::@6 testBinaryOperator::@7 testBinaryOperator::@8 testBinaryOperator::@9 testUnaryOperator testUnaryOperator::@1 testUnaryOperator::@2 testUnaryOperator::@3 testUnaryOperator::@4 testUnaryOperator::@5 [87] (byte) idx#105 ← phi( testBinaryOperator/(byte) $28 testBinaryOperator::@1/(byte) idx#108 testBinaryOperator::@10/(byte) idx#108 testBinaryOperator::@11/(byte) idx#108 testBinaryOperator::@12/(byte) idx#26 testBinaryOperator::@13/(byte) idx#108 testBinaryOperator::@14/(byte) idx#108 testBinaryOperator::@15/(byte) idx#108 testBinaryOperator::@16/(byte) idx#108 testBinaryOperator::@17/(byte) idx#108 testBinaryOperator::@18/(byte) $50 testBinaryOperator::@19/(byte) idx#108 testBinaryOperator::@2/(byte) idx#108 testBinaryOperator::@20/(byte) idx#108 testBinaryOperator::@21/(byte) idx#108 testBinaryOperator::@22/(byte) idx#108 testBinaryOperator::@23/(byte) idx#108 testBinaryOperator::@24/(byte) idx#40 testBinaryOperator::@25/(byte) idx#108 testBinaryOperator::@26/(byte) idx#108 testBinaryOperator::@27/(byte) idx#108 testBinaryOperator::@28/(byte) idx#108 testBinaryOperator::@29/(byte) idx#108 testBinaryOperator::@3/(byte) idx#108 testBinaryOperator::@30/(byte) idx#47 testBinaryOperator::@31/(byte) idx#108 testBinaryOperator::@32/(byte) idx#108 testBinaryOperator::@33/(byte) idx#108 testBinaryOperator::@34/(byte) idx#108 testBinaryOperator::@35/(byte) idx#108 testBinaryOperator::@4/(byte) idx#108 testBinaryOperator::@5/(byte) idx#108 testBinaryOperator::@6/(byte) idx#19 testBinaryOperator::@7/(byte) idx#108 testBinaryOperator::@8/(byte) idx#108 testBinaryOperator::@9/(byte) idx#108 testUnaryOperator/(byte) 0 testUnaryOperator::@1/(byte) idx#108 testUnaryOperator::@2/(byte) idx#108 testUnaryOperator::@3/(byte) idx#108 testUnaryOperator::@4/(byte) idx#108 testUnaryOperator::@5/(byte) idx#108 ) [87] (byte) assertType::t2#42 ← phi( testBinaryOperator/(const byte) TYPEID_BYTE testBinaryOperator::@1/(const byte) TYPEID_BYTE testBinaryOperator::@10/(const byte) TYPEID_DWORD testBinaryOperator::@11/(const byte) TYPEID_SIGNED_DWORD testBinaryOperator::@12/(const byte) TYPEID_WORD testBinaryOperator::@13/(const byte) TYPEID_WORD testBinaryOperator::@14/(const byte) TYPEID_WORD testBinaryOperator::@15/(const byte) TYPEID_WORD testBinaryOperator::@16/(const byte) TYPEID_DWORD testBinaryOperator::@17/(const byte) TYPEID_SIGNED_DWORD testBinaryOperator::@18/(const byte) TYPEID_SIGNED_WORD testBinaryOperator::@19/(const byte) TYPEID_SIGNED_WORD testBinaryOperator::@2/(const byte) TYPEID_WORD testBinaryOperator::@20/(const byte) TYPEID_WORD testBinaryOperator::@21/(const byte) TYPEID_SIGNED_WORD testBinaryOperator::@22/(const byte) TYPEID_DWORD testBinaryOperator::@23/(const byte) TYPEID_SIGNED_DWORD testBinaryOperator::@24/(const byte) TYPEID_DWORD testBinaryOperator::@25/(const byte) TYPEID_DWORD testBinaryOperator::@26/(const byte) TYPEID_DWORD testBinaryOperator::@27/(const byte) TYPEID_DWORD testBinaryOperator::@28/(const byte) TYPEID_DWORD testBinaryOperator::@29/(const byte) TYPEID_DWORD testBinaryOperator::@3/(const byte) TYPEID_SIGNED_WORD testBinaryOperator::@30/(const byte) TYPEID_SIGNED_DWORD testBinaryOperator::@31/(const byte) TYPEID_SIGNED_DWORD testBinaryOperator::@32/(const byte) TYPEID_SIGNED_DWORD testBinaryOperator::@33/(const byte) TYPEID_SIGNED_DWORD testBinaryOperator::@34/(const byte) TYPEID_DWORD testBinaryOperator::@35/(const byte) TYPEID_SIGNED_DWORD testBinaryOperator::@4/(const byte) TYPEID_DWORD testBinaryOperator::@5/(const byte) TYPEID_SIGNED_DWORD testBinaryOperator::@6/(const byte) TYPEID_BYTE testBinaryOperator::@7/(const byte) TYPEID_SIGNED_BYTE testBinaryOperator::@8/(const byte) TYPEID_WORD testBinaryOperator::@9/(const byte) TYPEID_SIGNED_WORD testUnaryOperator/(const byte) TYPEID_BYTE testUnaryOperator::@1/(const byte) TYPEID_SIGNED_BYTE testUnaryOperator::@2/(const byte) TYPEID_WORD testUnaryOperator::@3/(const byte) TYPEID_SIGNED_WORD testUnaryOperator::@4/(const byte) TYPEID_DWORD testUnaryOperator::@5/(const byte) TYPEID_SIGNED_DWORD ) @@ -1578,6 +1592,8 @@ assertType::@return: scope:[assertType] from assertType::@2 assertType::@1: scope:[assertType] from assertType [93] *((const byte*) COLS#0 + (byte) idx#105) ← (const byte) GREEN#0 to:assertType::@2 + +(void()) testUnaryOperator() testUnaryOperator: scope:[testUnaryOperator] from main::@3 [94] phi() [95] call assertType diff --git a/src/test/ref/int-literals.cfg b/src/test/ref/int-literals.cfg index 7f23d9119..291a22768 100644 --- a/src/test/ref/int-literals.cfg +++ b/src/test/ref/int-literals.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -25,6 +27,8 @@ main::@2: scope:[main] from main::@1 [10] *((byte*) main::s#2) ← (byte) ' ' [11] (byte*) main::s#1 ← ++ (byte*) main::s#2 to:main::@1 + +(void()) testSimpleTypes() testSimpleTypes: scope:[testSimpleTypes] from main::@3 [12] phi() [13] call assertType @@ -88,6 +92,8 @@ testSimpleTypes::@14: scope:[testSimpleTypes] from testSimpleTypes::@13 testSimpleTypes::@return: scope:[testSimpleTypes] from testSimpleTypes::@14 [42] return to:@return + +(void()) assertType((byte) assertType::t1 , (byte) assertType::t2) assertType: scope:[assertType] from testSimpleTypes testSimpleTypes::@1 testSimpleTypes::@10 testSimpleTypes::@11 testSimpleTypes::@12 testSimpleTypes::@13 testSimpleTypes::@14 testSimpleTypes::@2 testSimpleTypes::@3 testSimpleTypes::@4 testSimpleTypes::@5 testSimpleTypes::@6 testSimpleTypes::@7 testSimpleTypes::@8 testSimpleTypes::@9 [43] (byte) idx#41 ← phi( testSimpleTypes/(byte) 0 testSimpleTypes::@1/(byte) idx#20 testSimpleTypes::@10/(byte) idx#20 testSimpleTypes::@11/(byte) idx#20 testSimpleTypes::@12/(byte) idx#20 testSimpleTypes::@13/(byte) idx#20 testSimpleTypes::@14/(byte) idx#20 testSimpleTypes::@2/(byte) idx#20 testSimpleTypes::@3/(byte) idx#20 testSimpleTypes::@4/(byte) idx#20 testSimpleTypes::@5/(byte) idx#20 testSimpleTypes::@6/(byte) idx#20 testSimpleTypes::@7/(byte) idx#20 testSimpleTypes::@8/(byte) idx#20 testSimpleTypes::@9/(byte) idx#20 ) [43] (byte) assertType::t2#15 ← phi( testSimpleTypes/(const byte) TYPEID_BYTE testSimpleTypes::@1/(const byte) TYPEID_BYTE testSimpleTypes::@10/(const byte) TYPEID_DWORD testSimpleTypes::@11/(const byte) TYPEID_DWORD testSimpleTypes::@12/(const byte) TYPEID_SIGNED_DWORD testSimpleTypes::@13/(const byte) TYPEID_SIGNED_DWORD testSimpleTypes::@14/(const byte) TYPEID_SIGNED_DWORD testSimpleTypes::@2/(const byte) TYPEID_SIGNED_BYTE testSimpleTypes::@3/(const byte) TYPEID_SIGNED_BYTE testSimpleTypes::@4/(const byte) TYPEID_WORD testSimpleTypes::@5/(const byte) TYPEID_WORD testSimpleTypes::@6/(const byte) TYPEID_WORD testSimpleTypes::@7/(const byte) TYPEID_SIGNED_WORD testSimpleTypes::@8/(const byte) TYPEID_SIGNED_WORD testSimpleTypes::@9/(const byte) TYPEID_SIGNED_WORD ) diff --git a/src/test/ref/int-literals.log b/src/test/ref/int-literals.log index 80ca5f50f..0ba0b9e8b 100644 --- a/src/test/ref/int-literals.log +++ b/src/test/ref/int-literals.log @@ -28,6 +28,8 @@ CONTROL FLOW GRAPH SSA (byte*) COLS#0 ← ((byte*)) (word) $d800 (byte) idx#0 ← (byte) 0 to:@3 + +(void()) main() main: scope:[main] from @3 (byte) idx#50 ← phi( @3/(byte) idx#48 ) (byte*) main::s#0 ← (byte*) SCREEN#0 @@ -58,6 +60,8 @@ main::@return: scope:[main] from main::@7 (byte) idx#2 ← (byte) idx#24 return to:@return + +(void()) testSimpleTypes() testSimpleTypes: scope:[testSimpleTypes] from main::@3 (byte) idx#3 ← (byte) 0 (byte~) testSimpleTypes::$0 ← (const byte) TYPEID_BYTE @@ -186,6 +190,8 @@ testSimpleTypes::@return: scope:[testSimpleTypes] from testSimpleTypes::@15 (byte) idx#19 ← (byte) idx#40 return to:@return + +(void()) assertType((byte) assertType::t1 , (byte) assertType::t2) assertType: scope:[assertType] from testSimpleTypes testSimpleTypes::@1 testSimpleTypes::@10 testSimpleTypes::@11 testSimpleTypes::@12 testSimpleTypes::@13 testSimpleTypes::@14 testSimpleTypes::@2 testSimpleTypes::@3 testSimpleTypes::@4 testSimpleTypes::@5 testSimpleTypes::@6 testSimpleTypes::@7 testSimpleTypes::@8 testSimpleTypes::@9 (byte) idx#47 ← phi( testSimpleTypes/(byte) idx#3 testSimpleTypes::@1/(byte) idx#4 testSimpleTypes::@10/(byte) idx#13 testSimpleTypes::@11/(byte) idx#14 testSimpleTypes::@12/(byte) idx#15 testSimpleTypes::@13/(byte) idx#16 testSimpleTypes::@14/(byte) idx#17 testSimpleTypes::@2/(byte) idx#5 testSimpleTypes::@3/(byte) idx#6 testSimpleTypes::@4/(byte) idx#7 testSimpleTypes::@5/(byte) idx#8 testSimpleTypes::@6/(byte) idx#9 testSimpleTypes::@7/(byte) idx#10 testSimpleTypes::@8/(byte) idx#11 testSimpleTypes::@9/(byte) idx#12 ) (byte) assertType::t2#15 ← phi( testSimpleTypes/(byte) assertType::t2#0 testSimpleTypes::@1/(byte) assertType::t2#1 testSimpleTypes::@10/(byte) assertType::t2#10 testSimpleTypes::@11/(byte) assertType::t2#11 testSimpleTypes::@12/(byte) assertType::t2#12 testSimpleTypes::@13/(byte) assertType::t2#13 testSimpleTypes::@14/(byte) assertType::t2#14 testSimpleTypes::@2/(byte) assertType::t2#2 testSimpleTypes::@3/(byte) assertType::t2#3 testSimpleTypes::@4/(byte) assertType::t2#4 testSimpleTypes::@5/(byte) assertType::t2#5 testSimpleTypes::@6/(byte) assertType::t2#6 testSimpleTypes::@7/(byte) assertType::t2#7 testSimpleTypes::@8/(byte) assertType::t2#8 testSimpleTypes::@9/(byte) assertType::t2#9 ) @@ -633,6 +639,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -651,6 +659,8 @@ main::@2: scope:[main] from main::@1 [10] *((byte*) main::s#2) ← (byte) ' ' [11] (byte*) main::s#1 ← ++ (byte*) main::s#2 to:main::@1 + +(void()) testSimpleTypes() testSimpleTypes: scope:[testSimpleTypes] from main::@3 [12] phi() [13] call assertType @@ -714,6 +724,8 @@ testSimpleTypes::@14: scope:[testSimpleTypes] from testSimpleTypes::@13 testSimpleTypes::@return: scope:[testSimpleTypes] from testSimpleTypes::@14 [42] return to:@return + +(void()) assertType((byte) assertType::t1 , (byte) assertType::t2) assertType: scope:[assertType] from testSimpleTypes testSimpleTypes::@1 testSimpleTypes::@10 testSimpleTypes::@11 testSimpleTypes::@12 testSimpleTypes::@13 testSimpleTypes::@14 testSimpleTypes::@2 testSimpleTypes::@3 testSimpleTypes::@4 testSimpleTypes::@5 testSimpleTypes::@6 testSimpleTypes::@7 testSimpleTypes::@8 testSimpleTypes::@9 [43] (byte) idx#41 ← phi( testSimpleTypes/(byte) 0 testSimpleTypes::@1/(byte) idx#20 testSimpleTypes::@10/(byte) idx#20 testSimpleTypes::@11/(byte) idx#20 testSimpleTypes::@12/(byte) idx#20 testSimpleTypes::@13/(byte) idx#20 testSimpleTypes::@14/(byte) idx#20 testSimpleTypes::@2/(byte) idx#20 testSimpleTypes::@3/(byte) idx#20 testSimpleTypes::@4/(byte) idx#20 testSimpleTypes::@5/(byte) idx#20 testSimpleTypes::@6/(byte) idx#20 testSimpleTypes::@7/(byte) idx#20 testSimpleTypes::@8/(byte) idx#20 testSimpleTypes::@9/(byte) idx#20 ) [43] (byte) assertType::t2#15 ← phi( testSimpleTypes/(const byte) TYPEID_BYTE testSimpleTypes::@1/(const byte) TYPEID_BYTE testSimpleTypes::@10/(const byte) TYPEID_DWORD testSimpleTypes::@11/(const byte) TYPEID_DWORD testSimpleTypes::@12/(const byte) TYPEID_SIGNED_DWORD testSimpleTypes::@13/(const byte) TYPEID_SIGNED_DWORD testSimpleTypes::@14/(const byte) TYPEID_SIGNED_DWORD testSimpleTypes::@2/(const byte) TYPEID_SIGNED_BYTE testSimpleTypes::@3/(const byte) TYPEID_SIGNED_BYTE testSimpleTypes::@4/(const byte) TYPEID_WORD testSimpleTypes::@5/(const byte) TYPEID_WORD testSimpleTypes::@6/(const byte) TYPEID_WORD testSimpleTypes::@7/(const byte) TYPEID_SIGNED_WORD testSimpleTypes::@8/(const byte) TYPEID_SIGNED_WORD testSimpleTypes::@9/(const byte) TYPEID_SIGNED_WORD ) diff --git a/src/test/ref/interrupt-volatile-reuse-problem1.cfg b/src/test/ref/interrupt-volatile-reuse-problem1.cfg index d9ca8f89b..77c2c9c0a 100644 --- a/src/test/ref/interrupt-volatile-reuse-problem1.cfg +++ b/src/test/ref/interrupt-volatile-reuse-problem1.cfg @@ -8,12 +8,16 @@ to:@end @end: scope:[] from @1 [4] phi() + +(void()) main() main: scope:[main] from @1 [5] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_MIN)(void()) irq() to:main::@return main::@return: scope:[main] from main [6] return to:@return + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from [7] *((const byte*) SCREEN#0+(byte) $28) ← (byte) col1#0 [8] (byte) col1#1 ← ++ (byte) col1#0 diff --git a/src/test/ref/interrupt-volatile-reuse-problem1.log b/src/test/ref/interrupt-volatile-reuse-problem1.log index 20ea143ca..f14bbecd9 100644 --- a/src/test/ref/interrupt-volatile-reuse-problem1.log +++ b/src/test/ref/interrupt-volatile-reuse-problem1.log @@ -8,6 +8,8 @@ CONTROL FLOW GRAPH SSA (byte) col1#0 ← (number) 0 (byte) col2#0 ← (number) 8 to:@2 + +(void()) main() main: scope:[main] from @2 (void()*~) main::$0 ← & interrupt(KERNEL_MIN)(void()) irq() *((void()**) KERNEL_IRQ#0) ← (void()*~) main::$0 @@ -15,6 +17,8 @@ main: scope:[main] from @2 main::@return: scope:[main] from main return to:@return + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from (byte) col2#3 ← phi( @2/(byte) col2#5 ) (byte) col1#3 ← phi( @2/(byte) col1#5 ) @@ -133,12 +137,16 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [4] phi() + +(void()) main() main: scope:[main] from @1 [5] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_MIN)(void()) irq() to:main::@return main::@return: scope:[main] from main [6] return to:@return + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from [7] *((const byte*) SCREEN#0+(byte) $28) ← (byte) col1#0 [8] (byte) col1#1 ← ++ (byte) col1#0 diff --git a/src/test/ref/interrupt-volatile-reuse-problem2.cfg b/src/test/ref/interrupt-volatile-reuse-problem2.cfg index 0ad5580ab..b4ef697d0 100644 --- a/src/test/ref/interrupt-volatile-reuse-problem2.cfg +++ b/src/test/ref/interrupt-volatile-reuse-problem2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_MIN)(void()) irq() to:main::@1 @@ -34,6 +36,8 @@ main::@5: scope:[main] from main::@4 main::@6: scope:[main] from main::@5 [16] phi() to:main::@1 + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from [17] *((const byte*) IRQ_STATUS#0) ← (byte) 1 asm { lda$dc0d } diff --git a/src/test/ref/interrupt-volatile-reuse-problem2.log b/src/test/ref/interrupt-volatile-reuse-problem2.log index a8bc5b134..85cbfcdd5 100644 --- a/src/test/ref/interrupt-volatile-reuse-problem2.log +++ b/src/test/ref/interrupt-volatile-reuse-problem2.log @@ -13,6 +13,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte) col1#0 ← (number) 0 to:@2 + +(void()) main() main: scope:[main] from @2 (void()*~) main::$0 ← & interrupt(KERNEL_MIN)(void()) irq() *((void()**) KERNEL_IRQ#0) ← (void()*~) main::$0 @@ -58,6 +60,8 @@ main::@8: scope:[main] from main::@7 main::@return: scope:[main] from main::@1 return to:@return + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from (byte) col1#3 ← phi( @2/(byte) col1#5 ) *((byte*) IRQ_STATUS#0) ← (number) 1 @@ -251,6 +255,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_MIN)(void()) irq() to:main::@1 @@ -278,6 +284,8 @@ main::@5: scope:[main] from main::@4 main::@6: scope:[main] from main::@5 [16] phi() to:main::@1 + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from [17] *((const byte*) IRQ_STATUS#0) ← (byte) 1 asm { lda$dc0d } diff --git a/src/test/ref/irq-hardware-clobber-jsr.cfg b/src/test/ref/irq-hardware-clobber-jsr.cfg index 3c6aaa7fa..e88af167f 100644 --- a/src/test/ref/irq-hardware-clobber-jsr.cfg +++ b/src/test/ref/irq-hardware-clobber-jsr.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -21,6 +23,8 @@ main: scope:[main] from @1 main::@1: scope:[main] from main main::@1 [13] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) to:main::@1 + +interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from [14] phi() [15] call do_irq @@ -28,6 +32,8 @@ irq: scope:[irq] from irq::@return: scope:[irq] from irq [16] return to:@return + +(void()) do_irq() do_irq: scope:[do_irq] from irq [17] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [18] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 diff --git a/src/test/ref/irq-hardware-clobber-jsr.log b/src/test/ref/irq-hardware-clobber-jsr.log index d5c94d95b..9ac026963 100644 --- a/src/test/ref/irq-hardware-clobber-jsr.log +++ b/src/test/ref/irq-hardware-clobber-jsr.log @@ -30,6 +30,8 @@ CONTROL FLOW GRAPH SSA (byte) BLACK#0 ← (number) 0 (byte) WHITE#0 ← (number) 1 to:@7 + +(void()) main() main: scope:[main] from @7 asm { sei } *((byte*) PROCPORT_DDR#0) ← (byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -51,6 +53,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@1 return to:@return + +interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from call do_irq to:irq::@1 @@ -59,6 +63,8 @@ irq::@1: scope:[irq] from irq irq::@return: scope:[irq] from irq::@1 return to:@return + +(void()) do_irq() do_irq: scope:[do_irq] from irq *((byte*) BGCOL#0) ← (byte) WHITE#0 *((byte*) BGCOL#0) ← (byte) BLACK#0 @@ -236,6 +242,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -250,6 +258,8 @@ main: scope:[main] from @1 main::@1: scope:[main] from main main::@1 [13] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) to:main::@1 + +interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from [14] phi() [15] call do_irq @@ -257,6 +267,8 @@ irq: scope:[irq] from irq::@return: scope:[irq] from irq [16] return to:@return + +(void()) do_irq() do_irq: scope:[do_irq] from irq [17] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [18] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 diff --git a/src/test/ref/irq-hardware-clobber.cfg b/src/test/ref/irq-hardware-clobber.cfg index 3b07e4aaa..e86d99924 100644 --- a/src/test/ref/irq-hardware-clobber.cfg +++ b/src/test/ref/irq-hardware-clobber.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -21,6 +23,8 @@ main: scope:[main] from @1 main::@1: scope:[main] from main main::@1 [13] *((const byte*) FGCOL#0) ← ++ *((const byte*) FGCOL#0) to:main::@1 + +interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from [14] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [15] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 diff --git a/src/test/ref/irq-hardware-clobber.log b/src/test/ref/irq-hardware-clobber.log index d22e90b5a..3d0ba5a17 100644 --- a/src/test/ref/irq-hardware-clobber.log +++ b/src/test/ref/irq-hardware-clobber.log @@ -24,6 +24,8 @@ CONTROL FLOW GRAPH SSA (byte*) PROCPORT#0 ← ((byte*)) (number) 1 (byte) PROCPORT_RAM_IO#0 ← (number) $35 to:@2 + +(void()) main() main: scope:[main] from @2 asm { sei } *((byte*) PROCPORT_DDR#0) ← (byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -45,6 +47,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@1 return to:@return + +interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from *((byte*) BGCOL#0) ← (byte) WHITE#0 *((byte*) BGCOL#0) ← (byte) BLACK#0 @@ -214,6 +218,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -228,6 +234,8 @@ main: scope:[main] from @1 main::@1: scope:[main] from main main::@1 [13] *((const byte*) FGCOL#0) ← ++ *((const byte*) FGCOL#0) to:main::@1 + +interrupt(HARDWARE_CLOBBER)(void()) irq() irq: scope:[irq] from [14] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [15] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 diff --git a/src/test/ref/irq-hardware-stack.cfg b/src/test/ref/irq-hardware-stack.cfg index dd5bef1b5..301ea7c18 100644 --- a/src/test/ref/irq-hardware-stack.cfg +++ b/src/test/ref/irq-hardware-stack.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -21,6 +23,8 @@ main: scope:[main] from @1 main::@1: scope:[main] from main main::@1 [13] *((const byte*) FGCOL#0) ← ++ *((const byte*) FGCOL#0) to:main::@1 + +interrupt(HARDWARE_STACK)(void()) irq() irq: scope:[irq] from [14] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [15] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 diff --git a/src/test/ref/irq-hardware-stack.log b/src/test/ref/irq-hardware-stack.log index 22cc27fcd..9b2dc5d55 100644 --- a/src/test/ref/irq-hardware-stack.log +++ b/src/test/ref/irq-hardware-stack.log @@ -24,6 +24,8 @@ CONTROL FLOW GRAPH SSA (byte*) PROCPORT#0 ← ((byte*)) (number) 1 (byte) PROCPORT_RAM_IO#0 ← (number) $35 to:@2 + +(void()) main() main: scope:[main] from @2 asm { sei } *((byte*) PROCPORT_DDR#0) ← (byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -45,6 +47,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@1 return to:@return + +interrupt(HARDWARE_STACK)(void()) irq() irq: scope:[irq] from *((byte*) BGCOL#0) ← (byte) WHITE#0 *((byte*) BGCOL#0) ← (byte) BLACK#0 @@ -214,6 +218,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -228,6 +234,8 @@ main: scope:[main] from @1 main::@1: scope:[main] from main main::@1 [13] *((const byte*) FGCOL#0) ← ++ *((const byte*) FGCOL#0) to:main::@1 + +interrupt(HARDWARE_STACK)(void()) irq() irq: scope:[irq] from [14] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [15] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 diff --git a/src/test/ref/irq-hardware.cfg b/src/test/ref/irq-hardware.cfg index e7bfaa8d7..f294cc9de 100644 --- a/src/test/ref/irq-hardware.cfg +++ b/src/test/ref/irq-hardware.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -21,6 +23,8 @@ main: scope:[main] from @1 main::@1: scope:[main] from main main::@1 [13] *((const byte*) FGCOL#0) ← ++ *((const byte*) FGCOL#0) to:main::@1 + +interrupt(HARDWARE_ALL)(void()) irq() irq: scope:[irq] from [14] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [15] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 diff --git a/src/test/ref/irq-hardware.log b/src/test/ref/irq-hardware.log index 06eb3b719..d31b5c192 100644 --- a/src/test/ref/irq-hardware.log +++ b/src/test/ref/irq-hardware.log @@ -24,6 +24,8 @@ CONTROL FLOW GRAPH SSA (byte*) PROCPORT#0 ← ((byte*)) (number) 1 (byte) PROCPORT_RAM_IO#0 ← (number) $35 to:@2 + +(void()) main() main: scope:[main] from @2 asm { sei } *((byte*) PROCPORT_DDR#0) ← (byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -45,6 +47,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@1 return to:@return + +interrupt(HARDWARE_ALL)(void()) irq() irq: scope:[irq] from *((byte*) BGCOL#0) ← (byte) WHITE#0 *((byte*) BGCOL#0) ← (byte) BLACK#0 @@ -214,6 +218,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -228,6 +234,8 @@ main: scope:[main] from @1 main::@1: scope:[main] from main main::@1 [13] *((const byte*) FGCOL#0) ← ++ *((const byte*) FGCOL#0) to:main::@1 + +interrupt(HARDWARE_ALL)(void()) irq() irq: scope:[irq] from [14] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [15] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 diff --git a/src/test/ref/irq-idx-problem.cfg b/src/test/ref/irq-idx-problem.cfg index dd8e040e4..621b90d11 100644 --- a/src/test/ref/irq-idx-problem.cfg +++ b/src/test/ref/irq-idx-problem.cfg @@ -10,6 +10,8 @@ to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 asm { sei } [6] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 @@ -23,6 +25,8 @@ main: scope:[main] from @2 main::@return: scope:[main] from main [13] return to:@return + +interrupt(KERNEL_MIN)(void()) table_driven_irq() table_driven_irq: scope:[table_driven_irq] from [14] phi() to:table_driven_irq::@1 diff --git a/src/test/ref/irq-idx-problem.log b/src/test/ref/irq-idx-problem.log index e196c4214..d0f72e07b 100644 --- a/src/test/ref/irq-idx-problem.log +++ b/src/test/ref/irq-idx-problem.log @@ -24,6 +24,8 @@ CONTROL FLOW GRAPH SSA @4: scope:[] from @begin (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@5 + +(void()) main() main: scope:[main] from @6 asm { sei } *((byte*) CIA1_INTERRUPT#0) ← (byte) CIA_INTERRUPT_CLEAR#0 @@ -46,6 +48,8 @@ main::@return: scope:[main] from main (byte[]) IRQ_CHANGE_VAL#0 ← { (number) $b, (number) $b, (number) $63, (number) 0, (number) 0, (number) $80, (number) 7, (number) 7, (number) $83, (number) 0, (number) 0, (number) $60 } (byte) irq_idx#0 ← (number) 0 to:@6 + +interrupt(KERNEL_MIN)(void()) table_driven_irq() table_driven_irq: scope:[table_driven_irq] from (byte) irq_idx#6 ← phi( @6/(byte) irq_idx#9 ) to:table_driven_irq::@1 @@ -378,6 +382,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 asm { sei } [6] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 @@ -391,6 +397,8 @@ main: scope:[main] from @2 main::@return: scope:[main] from main [13] return to:@return + +interrupt(KERNEL_MIN)(void()) table_driven_irq() table_driven_irq: scope:[table_driven_irq] from [14] phi() to:table_driven_irq::@1 diff --git a/src/test/ref/irq-kernel-minimal.cfg b/src/test/ref/irq-kernel-minimal.cfg index b221dd488..209bba3f4 100644 --- a/src/test/ref/irq-kernel-minimal.cfg +++ b/src/test/ref/irq-kernel-minimal.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_KEYBOARD)(void()) irq() @@ -15,6 +17,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [7] return to:@return + +interrupt(KERNEL_KEYBOARD)(void()) irq() irq: scope:[irq] from [8] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [9] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 diff --git a/src/test/ref/irq-kernel-minimal.log b/src/test/ref/irq-kernel-minimal.log index 61fbab03e..9ecec5793 100644 --- a/src/test/ref/irq-kernel-minimal.log +++ b/src/test/ref/irq-kernel-minimal.log @@ -13,6 +13,8 @@ CONTROL FLOW GRAPH SSA (byte) BLACK#0 ← (number) 0 (byte) WHITE#0 ← (number) 1 to:@6 + +(void()) main() main: scope:[main] from @6 asm { sei } (void()*~) main::$0 ← & interrupt(KERNEL_KEYBOARD)(void()) irq() @@ -22,6 +24,8 @@ main: scope:[main] from @6 main::@return: scope:[main] from main return to:@return + +interrupt(KERNEL_KEYBOARD)(void()) irq() irq: scope:[irq] from *((byte*) BGCOL#0) ← (byte) WHITE#0 *((byte*) BGCOL#0) ← (byte) BLACK#0 @@ -106,6 +110,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_KEYBOARD)(void()) irq() @@ -114,6 +120,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [7] return to:@return + +interrupt(KERNEL_KEYBOARD)(void()) irq() irq: scope:[irq] from [8] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [9] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 diff --git a/src/test/ref/irq-kernel.cfg b/src/test/ref/irq-kernel.cfg index d8f796622..31f2a3c90 100644 --- a/src/test/ref/irq-kernel.cfg +++ b/src/test/ref/irq-kernel.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 @@ -19,6 +21,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [11] return to:@return + +interrupt(KERNEL_KEYBOARD)(void()) irq() irq: scope:[irq] from [12] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [13] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 diff --git a/src/test/ref/irq-kernel.log b/src/test/ref/irq-kernel.log index 396bd1379..faaddbb25 100644 --- a/src/test/ref/irq-kernel.log +++ b/src/test/ref/irq-kernel.log @@ -15,6 +15,8 @@ CONTROL FLOW GRAPH SSA (byte*) CIA1_INTERRUPT#0 ← ((byte*)) (number) $dc0d (byte) CIA_INTERRUPT_CLEAR#0 ← (number) $7f to:@2 + +(void()) main() main: scope:[main] from @2 asm { sei } *((byte*) CIA1_INTERRUPT#0) ← (byte) CIA_INTERRUPT_CLEAR#0 @@ -28,6 +30,8 @@ main: scope:[main] from @2 main::@return: scope:[main] from main return to:@return + +interrupt(KERNEL_KEYBOARD)(void()) irq() irq: scope:[irq] from *((byte*) BGCOL#0) ← (byte) WHITE#0 *((byte*) BGCOL#0) ← (byte) BLACK#0 @@ -159,6 +163,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 @@ -171,6 +177,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [11] return to:@return + +interrupt(KERNEL_KEYBOARD)(void()) irq() irq: scope:[irq] from [12] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [13] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 diff --git a/src/test/ref/irq-local-var-overlap-problem.cfg b/src/test/ref/irq-local-var-overlap-problem.cfg index 2739f280f..6e9ed9a65 100644 --- a/src/test/ref/irq-local-var-overlap-problem.cfg +++ b/src/test/ref/irq-local-var-overlap-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 @@ -44,6 +46,8 @@ main::@5: scope:[main] from main::@4 main::@7: scope:[main] from main::@5 [24] phi() to:main::@1 + +(void()) sub_main() sub_main: scope:[sub_main] from main::@3 [25] phi() to:sub_main::@1 @@ -72,6 +76,8 @@ sub_main::@5: scope:[sub_main] from sub_main::@4 sub_main::@return: scope:[sub_main] from sub_main::@5 [38] return to:@return + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from [39] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) to:irq::@1 @@ -107,6 +113,8 @@ irq::@6: scope:[irq] from irq::@5 irq::@return: scope:[irq] from irq::@6 [55] return to:@return + +(void()) sub_irq() sub_irq: scope:[sub_irq] from irq::@3 [56] phi() to:sub_irq::@1 diff --git a/src/test/ref/irq-local-var-overlap-problem.log b/src/test/ref/irq-local-var-overlap-problem.log index 34835567a..06cc846d2 100644 --- a/src/test/ref/irq-local-var-overlap-problem.log +++ b/src/test/ref/irq-local-var-overlap-problem.log @@ -23,6 +23,8 @@ CONTROL FLOW GRAPH SSA (byte*) CIA1_INTERRUPT#0 ← ((byte*)) (number) $dc0d (byte) CIA_INTERRUPT_CLEAR#0 ← (number) $7f to:@4 + +(void()) main() main: scope:[main] from @4 asm { sei } *((byte*) CIA1_INTERRUPT#0) ← (byte) CIA_INTERRUPT_CLEAR#0 @@ -81,6 +83,8 @@ main::@8: scope:[main] from main::@7 main::@return: scope:[main] from main::@1 return to:@return + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from *((byte*) BGCOL#0) ← ++ *((byte*) BGCOL#0) (byte) irq::i#0 ← (byte) 0 @@ -131,6 +135,8 @@ irq::@6: scope:[irq] from irq::@5 irq::@return: scope:[irq] from irq::@6 return to:@return + +(void()) sub_main() sub_main: scope:[sub_main] from main::@6 (byte) sub_main::i#0 ← (byte) 0 to:sub_main::@1 @@ -170,6 +176,8 @@ sub_main::@5: scope:[sub_main] from sub_main::@4 sub_main::@return: scope:[sub_main] from sub_main::@5 return to:@return + +(void()) sub_irq() sub_irq: scope:[sub_irq] from irq::@3 (byte) sub_irq::i#0 ← (byte) 0 to:sub_irq::@1 @@ -644,6 +652,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 @@ -681,6 +691,8 @@ main::@5: scope:[main] from main::@4 main::@7: scope:[main] from main::@5 [24] phi() to:main::@1 + +(void()) sub_main() sub_main: scope:[sub_main] from main::@3 [25] phi() to:sub_main::@1 @@ -709,6 +721,8 @@ sub_main::@5: scope:[sub_main] from sub_main::@4 sub_main::@return: scope:[sub_main] from sub_main::@5 [38] return to:@return + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from [39] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) to:irq::@1 @@ -744,6 +758,8 @@ irq::@6: scope:[irq] from irq::@5 irq::@return: scope:[irq] from irq::@6 [55] return to:@return + +(void()) sub_irq() sub_irq: scope:[sub_irq] from irq::@3 [56] phi() to:sub_irq::@1 diff --git a/src/test/ref/irq-raster.cfg b/src/test/ref/irq-raster.cfg index f03341a14..12316b436 100644 --- a/src/test/ref/irq-raster.cfg +++ b/src/test/ref/irq-raster.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 @@ -19,6 +21,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [11] return to:@return + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from [12] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [13] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 diff --git a/src/test/ref/irq-raster.log b/src/test/ref/irq-raster.log index a71aae745..fb657a4b7 100644 --- a/src/test/ref/irq-raster.log +++ b/src/test/ref/irq-raster.log @@ -15,6 +15,8 @@ CONTROL FLOW GRAPH SSA (byte*) CIA1_INTERRUPT#0 ← ((byte*)) (number) $dc0d (byte) CIA_INTERRUPT_CLEAR#0 ← (number) $7f to:@2 + +(void()) main() main: scope:[main] from @2 asm { sei } *((byte*) CIA1_INTERRUPT#0) ← (byte) CIA_INTERRUPT_CLEAR#0 @@ -28,6 +30,8 @@ main: scope:[main] from @2 main::@return: scope:[main] from main return to:@return + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from *((byte*) BGCOL#0) ← (byte) WHITE#0 *((byte*) BGCOL#0) ← (byte) BLACK#0 @@ -159,6 +163,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 @@ -171,6 +177,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [11] return to:@return + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from [12] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [13] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 diff --git a/src/test/ref/irq-volatile-bool-problem.cfg b/src/test/ref/irq-volatile-bool-problem.cfg index acb747f8b..5e38a8c97 100644 --- a/src/test/ref/irq-volatile-bool-problem.cfg +++ b/src/test/ref/irq-volatile-bool-problem.cfg @@ -10,6 +10,8 @@ to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 asm { sei } [6] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 @@ -28,6 +30,8 @@ main::@2: scope:[main] from main::@1 main::@3: scope:[main] from main::@2 [14] (bool) framedone#0 ← true to:main::@1 + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from [15] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) [16] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 diff --git a/src/test/ref/irq-volatile-bool-problem.log b/src/test/ref/irq-volatile-bool-problem.log index eda95496a..ec59c3cd3 100644 --- a/src/test/ref/irq-volatile-bool-problem.log +++ b/src/test/ref/irq-volatile-bool-problem.log @@ -18,6 +18,8 @@ CONTROL FLOW GRAPH SSA (byte*) CIA1_INTERRUPT#0 ← ((byte*)) (number) $dc0d (byte) CIA_INTERRUPT_CLEAR#0 ← (number) $7f to:@1 + +(void()) main() main: scope:[main] from @2 (bool) framedone#12 ← phi( @2/(bool) framedone#11 ) asm { sei } @@ -50,6 +52,8 @@ main::@return: scope:[main] from main::@1 @1: scope:[] from @begin (bool) framedone#2 ← false to:@2 + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from (bool) framedone#14 ← phi( @2/(bool) framedone#11 ) *((byte*) BGCOL#0) ← ++ *((byte*) BGCOL#0) @@ -254,6 +258,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @2 [4] phi() + +(void()) main() main: scope:[main] from @2 asm { sei } [6] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 @@ -272,6 +278,8 @@ main::@2: scope:[main] from main::@1 main::@3: scope:[main] from main::@2 [14] (bool) framedone#0 ← true to:main::@1 + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from [15] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) [16] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 diff --git a/src/test/ref/iterarray.cfg b/src/test/ref/iterarray.cfg index 1413a8679..4449c245b 100644 --- a/src/test/ref/iterarray.cfg +++ b/src/test/ref/iterarray.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/iterarray.log b/src/test/ref/iterarray.log index ad61492aa..7a9a14e25 100644 --- a/src/test/ref/iterarray.log +++ b/src/test/ref/iterarray.log @@ -3,6 +3,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte[$10]) main::buf#0 ← ((byte[$10])) (number) $1100 (byte) main::i#0 ← (number) 5 @@ -117,6 +119,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/kc-ka-string-encoding.cfg b/src/test/ref/kc-ka-string-encoding.cfg index cd3abe6d0..1609c4a0b 100644 --- a/src/test/ref/kc-ka-string-encoding.cfg +++ b/src/test/ref/kc-ka-string-encoding.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(signed word()) main() main: scope:[main] from @1 [4] *((const byte[]) strTemp#0+(byte) 2) ← (byte) 'e'pm [5] *((const byte[]) strTemp#0+(byte) 3) ← (byte) 0 diff --git a/src/test/ref/kc-ka-string-encoding.log b/src/test/ref/kc-ka-string-encoding.log index c8ecdc529..76e6c7900 100644 --- a/src/test/ref/kc-ka-string-encoding.log +++ b/src/test/ref/kc-ka-string-encoding.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte[]) strTemp#0 ← (const string) $0 to:@1 + +(signed word()) main() main: scope:[main] from @1 *((byte[]) strTemp#0 + (number) 2) ← (byte) 'e'pm *((byte[]) strTemp#0 + (number) 3) ← (number) 0 @@ -97,6 +99,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(signed word()) main() main: scope:[main] from @1 [4] *((const byte[]) strTemp#0+(byte) 2) ← (byte) 'e'pm [5] *((const byte[]) strTemp#0+(byte) 3) ← (byte) 0 diff --git a/src/test/ref/keyboard-glitch.cfg b/src/test/ref/keyboard-glitch.cfg index d10214114..4329838fc 100644 --- a/src/test/ref/keyboard-glitch.cfg +++ b/src/test/ref/keyboard-glitch.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BORDERCOL#0) ← (const byte) GREEN#0 to:main::@1 @@ -14,6 +16,8 @@ main::@1: scope:[main] from main main::@1 [5] phi() [6] call menu to:main::@1 + +(void()) menu() menu: scope:[menu] from main::@1 [7] phi() to:menu::@1 @@ -62,6 +66,8 @@ menu::@7: scope:[menu] from menu::@10 menu::@4: scope:[menu] from menu::@10 [30] *((const byte*) SCREEN#0) ← ++ *((const byte*) SCREEN#0) to:menu::@1 + +(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key) keyboard_key_pressed: scope:[keyboard_key_pressed] from menu::@1 menu::@2 menu::@3 pressed::@1 [31] (byte) keyboard_key_pressed::key#4 ← phi( menu::@1/(const byte) KEY_C#0 menu::@2/(const byte) KEY_I#0 menu::@3/(const byte) KEY_E#0 pressed::@1/(const byte) KEY_SPACE#0 ) [32] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#4 & (byte) 7 @@ -77,6 +83,8 @@ keyboard_key_pressed::@1: scope:[keyboard_key_pressed] from keyboard_key_presse keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@1 [39] return to:@return + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed [40] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [41] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) @@ -84,6 +92,8 @@ keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read [42] return to:@return + +(void()) pressed() pressed: scope:[pressed] from menu::@5 [43] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) to:pressed::@1 diff --git a/src/test/ref/keyboard-glitch.log b/src/test/ref/keyboard-glitch.log index abc31748a..e7c6a1258 100644 --- a/src/test/ref/keyboard-glitch.log +++ b/src/test/ref/keyboard-glitch.log @@ -49,6 +49,8 @@ CONTROL FLOW GRAPH SSA (byte[8]) keyboard_matrix_row_bitmask#0 ← { (number) $fe, (number) $fd, (number) $fb, (number) $f7, (number) $ef, (number) $df, (number) $bf, (number) $7f } (byte[8]) keyboard_matrix_col_bitmask#0 ← { (number) 1, (number) 2, (number) 4, (number) 8, (number) $10, (number) $20, (number) $40, (number) $80 } to:@12 + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed (byte) keyboard_matrix_read::rowid#1 ← phi( keyboard_key_pressed/(byte) keyboard_matrix_read::rowid#0 ) *((byte*) CIA1_PORT_A#0) ← *((byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#1) @@ -61,6 +63,8 @@ keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matri (byte) keyboard_matrix_read::return#1 ← (byte) keyboard_matrix_read::return#3 return to:@return + +(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key) keyboard_key_pressed: scope:[keyboard_key_pressed] from menu::@2 menu::@4 menu::@5 pressed::@2 (byte) keyboard_key_pressed::key#4 ← phi( menu::@2/(byte) keyboard_key_pressed::key#0 menu::@4/(byte) keyboard_key_pressed::key#1 menu::@5/(byte) keyboard_key_pressed::key#2 pressed::@2/(byte) keyboard_key_pressed::key#3 ) (number~) keyboard_key_pressed::$0 ← (byte) keyboard_key_pressed::key#4 & (number) 7 @@ -83,6 +87,8 @@ keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_p (byte) keyboard_key_pressed::return#1 ← (byte) keyboard_key_pressed::return#6 return to:@return + +(void()) main() main: scope:[main] from @14 *((byte*) BORDERCOL#0) ← (byte) GREEN#0 to:main::@1 @@ -100,6 +106,8 @@ main::@return: scope:[main] from main::@1 @12: scope:[] from @4 (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@14 + +(void()) menu() menu: scope:[menu] from main::@2 to:menu::@1 menu::@1: scope:[menu] from menu menu::@6 @@ -160,6 +168,8 @@ menu::@13: scope:[menu] from menu::@19 *((byte*) BORDERCOL#0) ← (byte) GREEN#0 asm { cli } to:menu::@return + +(void()) pressed() pressed: scope:[pressed] from menu::@9 *((byte*) BGCOL#0) ← ++ *((byte*) BGCOL#0) to:pressed::@1 @@ -511,6 +521,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BORDERCOL#0) ← (const byte) GREEN#0 to:main::@1 @@ -518,6 +530,8 @@ main::@1: scope:[main] from main main::@1 [5] phi() [6] call menu to:main::@1 + +(void()) menu() menu: scope:[menu] from main::@1 [7] phi() to:menu::@1 @@ -566,6 +580,8 @@ menu::@7: scope:[menu] from menu::@10 menu::@4: scope:[menu] from menu::@10 [30] *((const byte*) SCREEN#0) ← ++ *((const byte*) SCREEN#0) to:menu::@1 + +(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key) keyboard_key_pressed: scope:[keyboard_key_pressed] from menu::@1 menu::@2 menu::@3 pressed::@1 [31] (byte) keyboard_key_pressed::key#4 ← phi( menu::@1/(const byte) KEY_C#0 menu::@2/(const byte) KEY_I#0 menu::@3/(const byte) KEY_E#0 pressed::@1/(const byte) KEY_SPACE#0 ) [32] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#4 & (byte) 7 @@ -581,6 +597,8 @@ keyboard_key_pressed::@1: scope:[keyboard_key_pressed] from keyboard_key_presse keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@1 [39] return to:@return + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed [40] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [41] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) @@ -588,6 +606,8 @@ keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read [42] return to:@return + +(void()) pressed() pressed: scope:[pressed] from menu::@5 [43] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) to:pressed::@1 diff --git a/src/test/ref/kickasm-uses-prevent-deletion.cfg b/src/test/ref/kickasm-uses-prevent-deletion.cfg index 694375c16..e436b0afd 100644 --- a/src/test/ref/kickasm-uses-prevent-deletion.cfg +++ b/src/test/ref/kickasm-uses-prevent-deletion.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 kickasm( uses irq uses KERNEL_IRQ#0) {{ sei lda # (word) print_word::w#10 @@ -148,6 +154,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [74] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from main::@2 print_word print_word::@1 [75] (byte*) print_char_cursor#81 ← phi( main::@2/(byte*~) print_char_cursor#102 print_word/(byte*) print_char_cursor#2 print_word::@1/(byte*) print_char_cursor#11 ) [75] (byte) print_byte::b#3 ← phi( main::@2/(byte) print_byte::b#2 print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -163,6 +171,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [82] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 [83] (byte*) print_char_cursor#50 ← phi( print_byte/(byte*) print_char_cursor#81 print_byte::@1/(byte*) print_char_cursor#11 ) [83] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -172,6 +182,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char [86] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@11 main::@14 main::@16 main::@18 main::@23 main::@25 main::@3 main::@7 main::@9 [87] (byte*) print_char_cursor#86 ← phi( main::@7/(byte*) 1024 main::@9/(byte*) print_char_cursor#11 main::@11/(byte*) print_char_cursor#11 main::@14/(byte*) print_char_cursor#11 main::@16/(byte*) print_char_cursor#11 main::@18/(byte*) print_char_cursor#11 main::@23/(byte*) print_char_cursor#11 main::@25/(byte*) print_char_cursor#11 main::@3/(byte*~) print_char_cursor#99 ) [87] (byte*) print_str::str#12 ← phi( main::@7/(const string) main::str main::@9/(const string) main::str1 main::@11/(const string) main::str1 main::@14/(const string) main::str1 main::@16/(const string) main::str1 main::@18/(const string) main::str1 main::@23/(const string) main::str1 main::@25/(const string) main::str1 main::@3/(const string) main::str ) @@ -189,6 +201,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [92] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [93] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#10 to:print_str::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main::@6 [94] phi() [95] call memset @@ -196,6 +210,8 @@ print_cls: scope:[print_cls] from main::@6 print_cls::@return: scope:[print_cls] from print_cls [96] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [97] phi() to:memset::@1 @@ -210,6 +226,8 @@ memset::@2: scope:[memset] from memset::@1 [101] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [102] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) lin16u_gen((word) lin16u_gen::min , (word) lin16u_gen::max , (word*) lin16u_gen::lintab , (word) lin16u_gen::length) lin16u_gen: scope:[lin16u_gen] from main main::@4 main::@5 [103] (word*) lin16u_gen::lintab#6 ← phi( main/(const word[$14]) main::lintab1#0 main::@4/(const word[$14]) main::lintab2#0 main::@5/(const word[$14]) main::lintab3#0 ) [103] (word) lin16u_gen::min#3 ← phi( main/(word) $22d main::@4/(word) $79cb main::@5/(byte) 0 ) @@ -246,6 +264,8 @@ lin16u_gen::@2: scope:[lin16u_gen] from lin16u_gen::@1 [121] (word*) lin16u_gen::lintab#3 ← (word*) lin16u_gen::lintab#4 + (const byte) SIZEOF_WORD [122] (word) lin16u_gen::i#1 ← ++ (word) lin16u_gen::i#2 to:lin16u_gen::@1 + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from lin16u_gen lin16u_gen::@3 [123] (word) divr16u::divisor#6 ← phi( lin16u_gen/(byte) $14-(byte) 1 lin16u_gen::@3/(byte) $14-(byte) 1 ) [123] (word) divr16u::dividend#5 ← phi( lin16u_gen/(word) divr16u::dividend#1 lin16u_gen::@3/(byte) 0 ) diff --git a/src/test/ref/linegen.log b/src/test/ref/linegen.log index 18c3cc1ab..3ffb3e9f1 100644 --- a/src/test/ref/linegen.log +++ b/src/test/ref/linegen.log @@ -80,6 +80,8 @@ CONTROL FLOW GRAPH SSA @2: scope:[] from @begin (word) rem16u#0 ← (number) 0 to:@20 + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from lin16u_gen lin16u_gen::@7 (word) divr16u::divisor#6 ← phi( lin16u_gen/(word) divr16u::divisor#0 lin16u_gen::@7/(word) divr16u::divisor#1 ) (word) divr16u::dividend#5 ← phi( lin16u_gen/(word) divr16u::dividend#1 lin16u_gen::@7/(word) divr16u::dividend#2 ) @@ -157,6 +159,8 @@ divr16u::@return: scope:[divr16u] from divr16u::@6 (word) rem16u#2 ← (word) rem16u#11 return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -205,6 +209,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@37 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@10 main::@12 main::@14 main::@18 main::@20 main::@22 main::@27 main::@29 main::@3 (byte*) print_char_cursor#86 ← phi( main::@10/(byte*) print_char_cursor#15 main::@12/(byte*) print_char_cursor#17 main::@14/(byte*) print_char_cursor#19 main::@18/(byte*) print_char_cursor#23 main::@20/(byte*) print_char_cursor#25 main::@22/(byte*) print_char_cursor#27 main::@27/(byte*) print_char_cursor#32 main::@29/(byte*) print_char_cursor#34 main::@3/(byte*) print_char_cursor#84 ) (byte*) print_str::str#12 ← phi( main::@10/(byte*) print_str::str#1 main::@12/(byte*) print_str::str#2 main::@14/(byte*) print_str::str#3 main::@18/(byte*) print_str::str#4 main::@20/(byte*) print_str::str#5 main::@22/(byte*) print_str::str#6 main::@27/(byte*) print_str::str#8 main::@29/(byte*) print_str::str#9 main::@3/(byte*) print_str::str#7 ) @@ -227,6 +233,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#41 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from main::@16 main::@24 main::@31 (byte*) print_char_cursor#79 ← phi( main::@16/(byte*) print_char_cursor#21 main::@24/(byte*) print_char_cursor#29 main::@31/(byte*) print_char_cursor#36 ) (byte*) print_line_cursor#21 ← phi( main::@16/(byte*) print_line_cursor#23 main::@24/(byte*) print_line_cursor#24 main::@31/(byte*) print_line_cursor#25 ) @@ -250,6 +258,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#43 return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from main::@11 main::@13 main::@15 main::@19 main::@21 main::@23 main::@26 main::@28 main::@30 (byte*) print_char_cursor#80 ← phi( main::@11/(byte*) print_char_cursor#16 main::@13/(byte*) print_char_cursor#18 main::@15/(byte*) print_char_cursor#20 main::@19/(byte*) print_char_cursor#24 main::@21/(byte*) print_char_cursor#26 main::@23/(byte*) print_char_cursor#28 main::@26/(byte*) print_char_cursor#31 main::@28/(byte*) print_char_cursor#33 main::@30/(byte*) print_char_cursor#35 ) (word) print_word::w#9 ← phi( main::@11/(word) print_word::w#0 main::@13/(word) print_word::w#1 main::@15/(word) print_word::w#2 main::@19/(word) print_word::w#3 main::@21/(word) print_word::w#4 main::@23/(word) print_word::w#5 main::@26/(word) print_word::w#6 main::@28/(word) print_word::w#7 main::@30/(word) print_word::w#8 ) @@ -281,6 +291,8 @@ print_word::@return: scope:[print_word] from print_word::@2 (word) rem16u#27 ← phi( @20/(word) rem16u#28 ) (byte[]) print_hextab#0 ← (const string) $0 to:@46 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from main::@2 print_word print_word::@1 (byte*) print_char_cursor#81 ← phi( main::@2/(byte*) print_char_cursor#83 print_word/(byte*) print_char_cursor#80 print_word::@1/(byte*) print_char_cursor#5 ) (byte) print_byte::b#3 ← phi( main::@2/(byte) print_byte::b#2 print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -305,6 +317,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#10 ← (byte*) print_char_cursor#49 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 (byte*) print_char_cursor#50 ← phi( print_byte/(byte*) print_char_cursor#81 print_byte::@1/(byte*) print_char_cursor#8 ) (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -316,6 +330,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#12 ← (byte*) print_char_cursor#51 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main::@9 (byte*) print_screen#1 ← phi( main::@9/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -336,6 +352,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte*) print_char_cursor#14 ← (byte*) print_char_cursor#52 return to:@return + +(void()) main() main: scope:[main] from @46 (byte*) print_char_cursor#91 ← phi( @46/(byte*) print_char_cursor#85 ) (byte*) print_line_cursor#36 ← phi( @46/(byte*) print_line_cursor#26 ) @@ -606,6 +624,8 @@ main::@return: scope:[main] from main::@32 (byte*) print_char_cursor#38 ← (byte*) print_char_cursor#76 return to:@return + +(void()) lin16u_gen((word) lin16u_gen::min , (word) lin16u_gen::max , (word*) lin16u_gen::lintab , (word) lin16u_gen::length) lin16u_gen: scope:[lin16u_gen] from main main::@7 main::@8 (word*) lin16u_gen::lintab#8 ← phi( main/(word*) lin16u_gen::lintab#0 main::@7/(word*) lin16u_gen::lintab#1 main::@8/(word*) lin16u_gen::lintab#2 ) (word) rem16u#22 ← phi( main/(word) rem16u#20 main::@7/(word) rem16u#3 main::@8/(word) rem16u#4 ) @@ -1923,6 +1943,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call lin16u_gen @@ -2041,6 +2063,8 @@ main::@20: scope:[main] from main::@19 main::@21: scope:[main] from main::@20 [63] (byte) main::i#1 ← ++ (byte) main::i#10 to:main::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@13 main::@20 main::@27 [64] (byte*) print_line_cursor#21 ← phi( main::@13/(byte*) 1024 main::@20/(byte*) print_line_cursor#1 main::@27/(byte*) print_line_cursor#1 ) to:print_ln::@1 @@ -2052,6 +2076,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [68] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from main::@10 main::@12 main::@15 main::@17 main::@19 main::@22 main::@24 main::@26 main::@8 [69] (word) print_word::w#10 ← phi( main::@8/(word) $22d main::@10/(word) $79cb main::@12/(byte) 0 main::@15/(word) print_word::w#3 main::@17/(word) print_word::w#4 main::@19/(word) print_word::w#5 main::@22/(word) $7461 main::@24/(word) $f781 main::@26/(word) $6488 ) [70] (byte) print_byte::b#0 ← > (word) print_word::w#10 @@ -2064,6 +2090,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [74] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from main::@2 print_word print_word::@1 [75] (byte*) print_char_cursor#81 ← phi( main::@2/(byte*~) print_char_cursor#102 print_word/(byte*) print_char_cursor#2 print_word::@1/(byte*) print_char_cursor#11 ) [75] (byte) print_byte::b#3 ← phi( main::@2/(byte) print_byte::b#2 print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -2079,6 +2107,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [82] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 [83] (byte*) print_char_cursor#50 ← phi( print_byte/(byte*) print_char_cursor#81 print_byte::@1/(byte*) print_char_cursor#11 ) [83] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -2088,6 +2118,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char [86] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@11 main::@14 main::@16 main::@18 main::@23 main::@25 main::@3 main::@7 main::@9 [87] (byte*) print_char_cursor#86 ← phi( main::@7/(byte*) 1024 main::@9/(byte*) print_char_cursor#11 main::@11/(byte*) print_char_cursor#11 main::@14/(byte*) print_char_cursor#11 main::@16/(byte*) print_char_cursor#11 main::@18/(byte*) print_char_cursor#11 main::@23/(byte*) print_char_cursor#11 main::@25/(byte*) print_char_cursor#11 main::@3/(byte*~) print_char_cursor#99 ) [87] (byte*) print_str::str#12 ← phi( main::@7/(const string) main::str main::@9/(const string) main::str1 main::@11/(const string) main::str1 main::@14/(const string) main::str1 main::@16/(const string) main::str1 main::@18/(const string) main::str1 main::@23/(const string) main::str1 main::@25/(const string) main::str1 main::@3/(const string) main::str ) @@ -2105,6 +2137,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [92] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [93] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#10 to:print_str::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main::@6 [94] phi() [95] call memset @@ -2112,6 +2146,8 @@ print_cls: scope:[print_cls] from main::@6 print_cls::@return: scope:[print_cls] from print_cls [96] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [97] phi() to:memset::@1 @@ -2126,6 +2162,8 @@ memset::@2: scope:[memset] from memset::@1 [101] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [102] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) lin16u_gen((word) lin16u_gen::min , (word) lin16u_gen::max , (word*) lin16u_gen::lintab , (word) lin16u_gen::length) lin16u_gen: scope:[lin16u_gen] from main main::@4 main::@5 [103] (word*) lin16u_gen::lintab#6 ← phi( main/(const word[$14]) main::lintab1#0 main::@4/(const word[$14]) main::lintab2#0 main::@5/(const word[$14]) main::lintab3#0 ) [103] (word) lin16u_gen::min#3 ← phi( main/(word) $22d main::@4/(word) $79cb main::@5/(byte) 0 ) @@ -2162,6 +2200,8 @@ lin16u_gen::@2: scope:[lin16u_gen] from lin16u_gen::@1 [121] (word*) lin16u_gen::lintab#3 ← (word*) lin16u_gen::lintab#4 + (const byte) SIZEOF_WORD [122] (word) lin16u_gen::i#1 ← ++ (word) lin16u_gen::i#2 to:lin16u_gen::@1 + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from lin16u_gen lin16u_gen::@3 [123] (word) divr16u::divisor#6 ← phi( lin16u_gen/(byte) $14-(byte) 1 lin16u_gen::@3/(byte) $14-(byte) 1 ) [123] (word) divr16u::dividend#5 ← phi( lin16u_gen/(word) divr16u::dividend#1 lin16u_gen::@3/(byte) 0 ) diff --git a/src/test/ref/literal-char-minus-number.cfg b/src/test/ref/literal-char-minus-number.cfg index 6092ad915..c5d11802b 100644 --- a/src/test/ref/literal-char-minus-number.cfg +++ b/src/test/ref/literal-char-minus-number.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (byte) 'a'-(byte) 1 to:main::@return diff --git a/src/test/ref/literal-char-minus-number.log b/src/test/ref/literal-char-minus-number.log index adb41253b..221ec323b 100644 --- a/src/test/ref/literal-char-minus-number.log +++ b/src/test/ref/literal-char-minus-number.log @@ -2,6 +2,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 *((byte*) main::SCREEN#0) ← (byte) 'a'-(number) 1 @@ -64,6 +66,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (byte) 'a'-(byte) 1 to:main::@return diff --git a/src/test/ref/literal-strings.cfg b/src/test/ref/literal-strings.cfg index c80d5c9d4..7de8e2de9 100644 --- a/src/test/ref/literal-strings.cfg +++ b/src/test/ref/literal-strings.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/literal-strings.log b/src/test/ref/literal-strings.log index 7993f1790..48dffd916 100644 --- a/src/test/ref/literal-strings.log +++ b/src/test/ref/literal-strings.log @@ -6,6 +6,8 @@ CONTROL FLOW GRAPH SSA (byte[]) msgz#0 ← (const string) $0 (byte[]) msg#0 ← (const string) $1 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -114,6 +116,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/literal-word-pointer-0.cfg b/src/test/ref/literal-word-pointer-0.cfg index 55ac392f0..ca8bcb48d 100644 --- a/src/test/ref/literal-word-pointer-0.cfg +++ b/src/test/ref/literal-word-pointer-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print @@ -14,6 +16,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [6] return to:@return + +(void()) print((byte*) print::str) print: scope:[print] from main [7] *((byte**) 128) ← (const string) main::str to:print::@return diff --git a/src/test/ref/literal-word-pointer-0.log b/src/test/ref/literal-word-pointer-0.log index 48ddfe264..efa90b0c2 100644 --- a/src/test/ref/literal-word-pointer-0.log +++ b/src/test/ref/literal-word-pointer-0.log @@ -3,6 +3,8 @@ Culled Empty Block (label) @1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @2 (byte*) print::str#0 ← (const string) main::str call print @@ -12,6 +14,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 return to:@return + +(void()) print((byte*) print::str) print: scope:[print] from main (byte*) print::str#1 ← phi( main/(byte*) print::str#0 ) (byte**~) print::$0 ← ((byte**)) (number) $80 @@ -91,6 +95,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print @@ -98,6 +104,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [6] return to:@return + +(void()) print((byte*) print::str) print: scope:[print] from main [7] *((byte**) 128) ← (const string) main::str to:print::@return diff --git a/src/test/ref/literals.cfg b/src/test/ref/literals.cfg index 2c6feb3b5..e7f2b5081 100644 --- a/src/test/ref/literals.cfg +++ b/src/test/ref/literals.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (const byte) ch#0 [5] *((const byte*) SCREEN#0+(byte) 2) ← (const byte) num#0 diff --git a/src/test/ref/literals.log b/src/test/ref/literals.log index da4d12f36..c0f3668f8 100644 --- a/src/test/ref/literals.log +++ b/src/test/ref/literals.log @@ -11,6 +11,8 @@ CONTROL FLOW GRAPH SSA (byte[]) str#0 ← (const string) $0 (byte[]) nums#0 ← { (number) 2, (number) 3, (number) 4, (number) 5 } to:@1 + +(void()) main() main: scope:[main] from @1 *((byte*) SCREEN#0 + (number) 0) ← (byte) ch#0 *((byte*) SCREEN#0 + (number) 2) ← (byte) num#0 @@ -153,6 +155,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (const byte) ch#0 [5] *((const byte*) SCREEN#0+(byte) 2) ← (const byte) num#0 diff --git a/src/test/ref/liverange-call-problem.cfg b/src/test/ref/liverange-call-problem.cfg index 07829b894..6b9d9dc81 100644 --- a/src/test/ref/liverange-call-problem.cfg +++ b/src/test/ref/liverange-call-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call incw1 @@ -30,6 +32,8 @@ main::@4: scope:[main] from main::@3 main::@return: scope:[main] from main::@4 [14] return to:@return + +(void()) incw2() incw2: scope:[incw2] from main::@1 main::@3 [15] (word) w2#10 ← phi( main::@1/(byte) 0 main::@3/(word) w2#11 ) [16] (word) w2#11 ← ++ (word) w2#10 @@ -37,6 +41,8 @@ incw2: scope:[incw2] from main::@1 main::@3 incw2::@return: scope:[incw2] from incw2 [17] return to:@return + +(void()) incw1() incw1: scope:[incw1] from main main::@2 [18] (word) w1#11 ← phi( main/(byte) 0 main::@2/(word) w1#12 ) [19] (word) w1#12 ← ++ (word) w1#11 diff --git a/src/test/ref/liverange-call-problem.log b/src/test/ref/liverange-call-problem.log index 5f1636871..fbf5b3fb6 100644 --- a/src/test/ref/liverange-call-problem.log +++ b/src/test/ref/liverange-call-problem.log @@ -9,6 +9,8 @@ CONTROL FLOW GRAPH SSA (word) w1#0 ← (number) 0 (word) w2#0 ← (number) 0 to:@3 + +(void()) main() main: scope:[main] from @3 (word) w2#16 ← phi( @3/(word) w2#15 ) (word) w1#14 ← phi( @3/(word) w1#16 ) @@ -49,6 +51,8 @@ main::@return: scope:[main] from main::@4 (word) w2#3 ← (word) w2#9 return to:@return + +(void()) incw1() incw1: scope:[incw1] from main main::@2 (word) w1#11 ← phi( main/(word) w1#14 main::@2/(word) w1#15 ) (word) w1#4 ← ++ (word) w1#11 @@ -58,6 +62,8 @@ incw1::@return: scope:[incw1] from incw1 (word) w1#5 ← (word) w1#12 return to:@return + +(void()) incw2() incw2: scope:[incw2] from main::@1 main::@3 (word) w2#10 ← phi( main::@1/(word) w2#13 main::@3/(word) w2#14 ) (word) w2#4 ← ++ (word) w2#10 @@ -239,6 +245,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call incw1 @@ -262,6 +270,8 @@ main::@4: scope:[main] from main::@3 main::@return: scope:[main] from main::@4 [14] return to:@return + +(void()) incw2() incw2: scope:[incw2] from main::@1 main::@3 [15] (word) w2#10 ← phi( main::@1/(byte) 0 main::@3/(word) w2#11 ) [16] (word) w2#11 ← ++ (word) w2#10 @@ -269,6 +279,8 @@ incw2: scope:[incw2] from main::@1 main::@3 incw2::@return: scope:[incw2] from incw2 [17] return to:@return + +(void()) incw1() incw1: scope:[incw1] from main main::@2 [18] (word) w1#11 ← phi( main/(byte) 0 main::@2/(word) w1#12 ) [19] (word) w1#12 ← ++ (word) w1#11 diff --git a/src/test/ref/liverange-problem-0.cfg b/src/test/ref/liverange-problem-0.cfg index aab315c3e..16dbf48b5 100644 --- a/src/test/ref/liverange-problem-0.cfg +++ b/src/test/ref/liverange-problem-0.cfg @@ -20,6 +20,8 @@ to:@end @end: scope:[] from @2 [10] phi() + +(void()) main() main: scope:[main] from @2 [11] *((byte*) SCREEN_1#0) ← (byte) 0 [12] *((byte*) SCREEN_2#0) ← (byte) 0 @@ -27,6 +29,8 @@ main: scope:[main] from @2 main::@return: scope:[main] from main [13] return to:@return + +(byte*()) malloc() malloc: scope:[malloc] from @1 @3 [14] (byte*) MEM#5 ← phi( @1/(byte*) 1024 @3/(byte*) MEM#1 ) [15] (byte*) MEM#1 ← ++ (byte*) MEM#5 diff --git a/src/test/ref/liverange-problem-0.log b/src/test/ref/liverange-problem-0.log index 41ef228a3..632b3d0b6 100644 --- a/src/test/ref/liverange-problem-0.log +++ b/src/test/ref/liverange-problem-0.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) MEM#0 ← ((byte*)) (number) $400 to:@1 + +(byte*()) malloc() malloc: scope:[malloc] from @1 @3 (byte*) MEM#5 ← phi( @1/(byte*) MEM#9 @3/(byte*) MEM#3 ) (byte*) MEM#1 ← ++ (byte*) MEM#5 @@ -38,6 +40,8 @@ malloc::@return: scope:[malloc] from malloc (byte*) MEM#4 ← (byte*) MEM#8 (byte*) SCREEN_2#0 ← (byte*~) $1 to:@2 + +(void()) main() main: scope:[main] from @2 (byte*) SCREEN_2#1 ← phi( @2/(byte*) SCREEN_2#2 ) (byte*) SCREEN_1#1 ← phi( @2/(byte*) SCREEN_1#2 ) @@ -173,6 +177,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @2 [10] phi() + +(void()) main() main: scope:[main] from @2 [11] *((byte*) SCREEN_1#0) ← (byte) 0 [12] *((byte*) SCREEN_2#0) ← (byte) 0 @@ -180,6 +186,8 @@ main: scope:[main] from @2 main::@return: scope:[main] from main [13] return to:@return + +(byte*()) malloc() malloc: scope:[malloc] from @1 @3 [14] (byte*) MEM#5 ← phi( @1/(byte*) 1024 @3/(byte*) MEM#1 ) [15] (byte*) MEM#1 ← ++ (byte*) MEM#5 diff --git a/src/test/ref/liverange.cfg b/src/test/ref/liverange.cfg index ced956db9..8ed52a793 100644 --- a/src/test/ref/liverange.cfg +++ b/src/test/ref/liverange.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call inci @@ -27,6 +29,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [15] return to:@return + +(byte()) inci() inci: scope:[inci] from main main::@1 [16] (byte) i#10 ← phi( main/(byte) 0 main::@1/(byte) i#11 ) [17] (byte) i#11 ← (byte) i#10 + (byte) 7 diff --git a/src/test/ref/liverange.log b/src/test/ref/liverange.log index 6459bc1c1..4c87ffb8e 100644 --- a/src/test/ref/liverange.log +++ b/src/test/ref/liverange.log @@ -6,6 +6,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte) i#0 ← (number) 0 to:@2 + +(void()) main() main: scope:[main] from @2 (byte) i#13 ← phi( @2/(byte) i#14 ) (byte) main::a#0 ← (number) 4 @@ -41,6 +43,8 @@ main::@return: scope:[main] from main::@2 (byte) i#3 ← (byte) i#9 return to:@return + +(byte()) inci() inci: scope:[inci] from main main::@1 (byte) i#10 ← phi( main/(byte) i#13 main::@1/(byte) i#1 ) (number~) inci::$0 ← (byte) i#10 + (number) 7 @@ -197,6 +201,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call inci @@ -217,6 +223,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [15] return to:@return + +(byte()) inci() inci: scope:[inci] from main main::@1 [16] (byte) i#10 ← phi( main/(byte) 0 main::@1/(byte) i#11 ) [17] (byte) i#11 ← (byte) i#10 + (byte) 7 diff --git a/src/test/ref/local-string.cfg b/src/test/ref/local-string.cfg index 902f5dac9..07ddfc2e4 100644 --- a/src/test/ref/local-string.cfg +++ b/src/test/ref/local-string.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/local-string.log b/src/test/ref/local-string.log index e104219c6..673ac0393 100644 --- a/src/test/ref/local-string.log +++ b/src/test/ref/local-string.log @@ -8,6 +8,8 @@ Culled Empty Block (label) main::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte[]) main::msg#0 ← (const string) main::$1 @@ -106,6 +108,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/localscope-loops.cfg b/src/test/ref/localscope-loops.cfg index 2de207777..d0f72f65d 100644 --- a/src/test/ref/localscope-loops.cfg +++ b/src/test/ref/localscope-loops.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/localscope-loops.log b/src/test/ref/localscope-loops.log index 6d2448901..89f2d8e20 100644 --- a/src/test/ref/localscope-loops.log +++ b/src/test/ref/localscope-loops.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -134,6 +136,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/localscope-simple.cfg b/src/test/ref/localscope-simple.cfg index ad127fee6..25d3bbc5f 100644 --- a/src/test/ref/localscope-simple.cfg +++ b/src/test/ref/localscope-simple.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BGCOL#0) ← (const byte) main::i#0 [5] *((const byte*) BGCOL#0) ← (const byte) main::i1#0 diff --git a/src/test/ref/localscope-simple.log b/src/test/ref/localscope-simple.log index 17b4903f7..806863756 100644 --- a/src/test/ref/localscope-simple.log +++ b/src/test/ref/localscope-simple.log @@ -5,6 +5,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) BGCOL#0 ← ((byte*)) (number) $d021 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (number) 0 *((byte*) BGCOL#0) ← (byte) main::i#0 @@ -77,6 +79,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BGCOL#0) ← (const byte) main::i#0 [5] *((const byte*) BGCOL#0) ← (const byte) main::i1#0 diff --git a/src/test/ref/long-pointer-0.cfg b/src/test/ref/long-pointer-0.cfg index 713ba2f99..79249ddd5 100644 --- a/src/test/ref/long-pointer-0.cfg +++ b/src/test/ref/long-pointer-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (dword) main::long_ptr#0 ← (dword) $12345678 asm { nop lda(long_ptr_zp),y sta$ff } diff --git a/src/test/ref/long-pointer-0.log b/src/test/ref/long-pointer-0.log index 38ff12bb0..dfacd116e 100644 --- a/src/test/ref/long-pointer-0.log +++ b/src/test/ref/long-pointer-0.log @@ -3,6 +3,8 @@ Setting inferred volatile on symbol affected by address-of (dword*~) main::$0 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (dword) main::long_ptr#0 ← (number) $12345678 (dword*~) main::$0 ← & (dword) main::long_ptr#0 @@ -78,6 +80,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (dword) main::long_ptr#0 ← (dword) $12345678 asm { nop lda(long_ptr_zp),y sta$ff } diff --git a/src/test/ref/long-pointer-1.cfg b/src/test/ref/long-pointer-1.cfg index 713ba2f99..79249ddd5 100644 --- a/src/test/ref/long-pointer-1.cfg +++ b/src/test/ref/long-pointer-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (dword) main::long_ptr#0 ← (dword) $12345678 asm { nop lda(long_ptr_zp),y sta$ff } diff --git a/src/test/ref/long-pointer-1.log b/src/test/ref/long-pointer-1.log index 1c71e0a31..35d82be98 100644 --- a/src/test/ref/long-pointer-1.log +++ b/src/test/ref/long-pointer-1.log @@ -3,6 +3,8 @@ Setting inferred volatile on symbol affected by address-of (dword*~) main::$0 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (dword) main::long_ptr#0 ← (number) $12345678 (dword*~) main::$0 ← & (dword) main::long_ptr#0 @@ -79,6 +81,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (dword) main::long_ptr#0 ← (dword) $12345678 asm { nop lda(long_ptr_zp),y sta$ff } diff --git a/src/test/ref/longbranch-interrupt-problem.cfg b/src/test/ref/longbranch-interrupt-problem.cfg index c8abf00b0..498f89427 100644 --- a/src/test/ref/longbranch-interrupt-problem.cfg +++ b/src/test/ref/longbranch-interrupt-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_MIN)(void()) irq() to:main::@1 @@ -19,6 +21,8 @@ main::@2: scope:[main] from main::@1 main::@3: scope:[main] from main::@2 [7] (byte) col#1 ← (byte) 0 to:main::@1 + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from asm { lda$dc0d } [9] *((const byte*) BGCOL#0) ← (byte) col#0 diff --git a/src/test/ref/longbranch-interrupt-problem.log b/src/test/ref/longbranch-interrupt-problem.log index cc17996d3..c9c139ff9 100644 --- a/src/test/ref/longbranch-interrupt-problem.log +++ b/src/test/ref/longbranch-interrupt-problem.log @@ -13,6 +13,8 @@ CONTROL FLOW GRAPH SSA (byte*) BGCOL#0 ← ((byte*)) (number) $d020 (byte) col#0 ← (number) 0 to:@2 + +(void()) main() main: scope:[main] from @2 (byte) col#14 ← phi( @2/(byte) col#13 ) (void()*~) main::$0 ← & interrupt(KERNEL_MIN)(void()) irq() @@ -36,6 +38,8 @@ main::@return: scope:[main] from main::@1 (byte) col#2 ← (byte) col#7 return to:@return + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from (byte) col#8 ← phi( @2/(byte) col#13 ) asm { lda$dc0d } @@ -195,6 +199,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_MIN)(void()) irq() to:main::@1 @@ -207,6 +213,8 @@ main::@2: scope:[main] from main::@1 main::@3: scope:[main] from main::@2 [7] (byte) col#1 ← (byte) 0 to:main::@1 + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from asm { lda$dc0d } [9] *((const byte*) BGCOL#0) ← (byte) col#0 diff --git a/src/test/ref/longjump.cfg b/src/test/ref/longjump.cfg index d5b616b83..a942666b9 100644 --- a/src/test/ref/longjump.cfg +++ b/src/test/ref/longjump.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/longjump.log b/src/test/ref/longjump.log index 2eb02cb42..a7ca4c1ed 100644 --- a/src/test/ref/longjump.log +++ b/src/test/ref/longjump.log @@ -4,6 +4,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -91,6 +93,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/longjump2.cfg b/src/test/ref/longjump2.cfg index 6d9700bb3..e767fcc68 100644 --- a/src/test/ref/longjump2.cfg +++ b/src/test/ref/longjump2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call long1 @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) long2() long2: scope:[long2] from main::@1 [9] phi() to:long2::@1 @@ -31,6 +35,8 @@ long2::@1: scope:[long2] from long2 long2::@1 long2::@return: scope:[long2] from long2::@1 [15] return to:@return + +(void()) long1() long1: scope:[long1] from main [16] phi() to:long1::@1 diff --git a/src/test/ref/longjump2.log b/src/test/ref/longjump2.log index 2f4454a80..23554cee6 100644 --- a/src/test/ref/longjump2.log +++ b/src/test/ref/longjump2.log @@ -8,6 +8,8 @@ Culled Empty Block (label) long2::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@3 + +(void()) main() main: scope:[main] from @3 call long1 to:main::@1 @@ -19,6 +21,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 return to:@return + +(void()) long1() long1: scope:[long1] from main (byte*) long1::SCREEN#0 ← ((byte*)) (number) $400 (byte) long1::i#0 ← (byte) 0 @@ -34,6 +38,8 @@ long1::@1: scope:[long1] from long1 long1::@1 long1::@return: scope:[long1] from long1::@1 return to:@return + +(void()) long2() long2: scope:[long2] from main::@1 (byte*) long2::SCREEN#0 ← ((byte*)) (number) $400 (byte) long2::i#0 ← (byte) 0 @@ -160,6 +166,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call long1 @@ -171,6 +179,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) long2() long2: scope:[long2] from main::@1 [9] phi() to:long2::@1 @@ -184,6 +194,8 @@ long2::@1: scope:[long2] from long2 long2::@1 long2::@return: scope:[long2] from long2::@1 [15] return to:@return + +(void()) long1() long1: scope:[long1] from main [16] phi() to:long1::@1 diff --git a/src/test/ref/loop-break-continue.cfg b/src/test/ref/loop-break-continue.cfg index 38389e37c..c922aced4 100644 --- a/src/test/ref/loop-break-continue.cfg +++ b/src/test/ref/loop-break-continue.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loop-break-continue.log b/src/test/ref/loop-break-continue.log index cadcac549..d173df07b 100644 --- a/src/test/ref/loop-break-continue.log +++ b/src/test/ref/loop-break-continue.log @@ -8,6 +8,8 @@ Culled Empty Block (label) main::@10 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte[]) main::str#0 ← (const string) main::$5 @@ -162,6 +164,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loop-break-nested.cfg b/src/test/ref/loop-break-nested.cfg index 049a09907..c32945947 100644 --- a/src/test/ref/loop-break-nested.cfg +++ b/src/test/ref/loop-break-nested.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loop-break-nested.log b/src/test/ref/loop-break-nested.log index a49e3289d..e8a93f25b 100644 --- a/src/test/ref/loop-break-nested.log +++ b/src/test/ref/loop-break-nested.log @@ -12,6 +12,8 @@ Culled Empty Block (label) main::@12 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::line#0 ← ((byte*)) (number) $400 to:main::@1 @@ -173,6 +175,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loop-break.cfg b/src/test/ref/loop-break.cfg index a383f23d3..0bea70f2e 100644 --- a/src/test/ref/loop-break.cfg +++ b/src/test/ref/loop-break.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loop-break.log b/src/test/ref/loop-break.log index af78a7016..104b50792 100644 --- a/src/test/ref/loop-break.log +++ b/src/test/ref/loop-break.log @@ -7,6 +7,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -105,6 +107,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loop-continue.cfg b/src/test/ref/loop-continue.cfg index cf91e399c..ca4fee9ed 100644 --- a/src/test/ref/loop-continue.cfg +++ b/src/test/ref/loop-continue.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loop-continue.log b/src/test/ref/loop-continue.log index 24a528d64..5a782e05c 100644 --- a/src/test/ref/loop-continue.log +++ b/src/test/ref/loop-continue.log @@ -6,6 +6,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -111,6 +113,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loop-for-continue.cfg b/src/test/ref/loop-for-continue.cfg index 23eda4021..dec9c5a4c 100644 --- a/src/test/ref/loop-for-continue.cfg +++ b/src/test/ref/loop-for-continue.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loop-for-continue.log b/src/test/ref/loop-for-continue.log index 0a4ba1efd..8cac1c559 100644 --- a/src/test/ref/loop-for-continue.log +++ b/src/test/ref/loop-for-continue.log @@ -11,6 +11,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte[]) MESSAGE#0 ← (const string) $0 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::idx#0 ← (number) 0 (byte) main::i#0 ← (number) 0 @@ -157,6 +159,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loop-for-empty-body.cfg b/src/test/ref/loop-for-empty-body.cfg index e9327b626..824ec8034 100644 --- a/src/test/ref/loop-for-empty-body.cfg +++ b/src/test/ref/loop-for-empty-body.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loop-for-empty-body.log b/src/test/ref/loop-for-empty-body.log index e18bbeb69..b0c9a3bfc 100644 --- a/src/test/ref/loop-for-empty-body.log +++ b/src/test/ref/loop-for-empty-body.log @@ -7,6 +7,8 @@ CONTROL FLOW GRAPH SSA (byte[]) str#0 ← (const string) $0 (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::b#0 ← (number) 0 to:main::@1 @@ -115,6 +117,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loop-for-sideeffect.cfg b/src/test/ref/loop-for-sideeffect.cfg index 2450d64bc..c20fe5911 100644 --- a/src/test/ref/loop-for-sideeffect.cfg +++ b/src/test/ref/loop-for-sideeffect.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loop-for-sideeffect.log b/src/test/ref/loop-for-sideeffect.log index c05630a76..a4b943124 100644 --- a/src/test/ref/loop-for-sideeffect.log +++ b/src/test/ref/loop-for-sideeffect.log @@ -7,6 +7,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (byte) 0 (byte) main::i#1 ← (number) 7 @@ -109,6 +111,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loop-memset-min.cfg b/src/test/ref/loop-memset-min.cfg index ca3ababfa..52097bbe9 100644 --- a/src/test/ref/loop-memset-min.cfg +++ b/src/test/ref/loop-memset-min.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call memset @@ -14,6 +16,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [6] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main [7] phi() to:memset::@1 diff --git a/src/test/ref/loop-memset-min.log b/src/test/ref/loop-memset-min.log index 6499ea41b..3207f8a83 100644 --- a/src/test/ref/loop-memset-min.log +++ b/src/test/ref/loop-memset-min.log @@ -10,6 +10,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@2 + +(void()) main() main: scope:[main] from @2 (void*) memset::str#0 ← (void*)(byte*) SCREEN#0 (byte) memset::c#0 ← (byte) 'c' @@ -22,6 +24,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main (byte) memset::c#4 ← phi( main/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( main/(void*) memset::str#0 ) @@ -228,6 +232,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call memset @@ -235,6 +241,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [6] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main [7] phi() to:memset::@1 diff --git a/src/test/ref/loop-problem.cfg b/src/test/ref/loop-problem.cfg index d1ea7e846..7b58670e9 100644 --- a/src/test/ref/loop-problem.cfg +++ b/src/test/ref/loop-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) '0' [5] call d @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) b() b: scope:[b] from main::@1 [9] phi() to:b::@1 @@ -32,6 +36,8 @@ b::@2: scope:[b] from b::@1 b::@return: scope:[b] from b::@2 [14] return to:@return + +(void()) d() d: scope:[d] from b::@1 main [15] *((const byte*) SCREEN#0) ← ++ *((const byte*) SCREEN#0) to:d::@return diff --git a/src/test/ref/loop-problem.log b/src/test/ref/loop-problem.log index 3bb174c79..0417acb2e 100644 --- a/src/test/ref/loop-problem.log +++ b/src/test/ref/loop-problem.log @@ -7,6 +7,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@3 + +(void()) main() main: scope:[main] from @3 *((byte*) SCREEN#0) ← (byte) '0' call d @@ -19,6 +21,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 return to:@return + +(void()) b() b: scope:[b] from main::@1 (byte) b::i#0 ← (byte) 0 to:b::@1 @@ -35,6 +39,8 @@ b::@3: scope:[b] from b::@1 b::@return: scope:[b] from b::@3 return to:@return + +(void()) d() d: scope:[d] from b::@1 main *((byte*) SCREEN#0) ← ++ *((byte*) SCREEN#0) to:d::@return @@ -131,6 +137,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) '0' [5] call d @@ -142,6 +150,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) b() b: scope:[b] from main::@1 [9] phi() to:b::@1 @@ -156,6 +166,8 @@ b::@2: scope:[b] from b::@1 b::@return: scope:[b] from b::@2 [14] return to:@return + +(void()) d() d: scope:[d] from b::@1 main [15] *((const byte*) SCREEN#0) ← ++ *((const byte*) SCREEN#0) to:d::@return diff --git a/src/test/ref/loop-problem2.cfg b/src/test/ref/loop-problem2.cfg index 46598877e..0d9d57997 100644 --- a/src/test/ref/loop-problem2.cfg +++ b/src/test/ref/loop-problem2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) mode_ctrl() mode_ctrl: scope:[mode_ctrl] from main::@1 [9] phi() to:mode_ctrl::@1 @@ -31,6 +35,8 @@ mode_ctrl::@3: scope:[mode_ctrl] from mode_ctrl::@1 mode_ctrl::@2: scope:[mode_ctrl] from mode_ctrl::@1 [13] *((const byte*) BORDERCOL#0) ← (byte) 2 to:mode_ctrl::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main [14] phi() to:print_cls::@1 diff --git a/src/test/ref/loop-problem2.log b/src/test/ref/loop-problem2.log index 1c3657ff8..21932c099 100644 --- a/src/test/ref/loop-problem2.log +++ b/src/test/ref/loop-problem2.log @@ -16,6 +16,8 @@ CONTROL FLOW GRAPH SSA (byte*) BORDERCOL#0 ← ((byte*)) (number) $d020 (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@3 + +(void()) main() main: scope:[main] from @3 call print_cls to:main::@1 @@ -27,6 +29,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main (byte*) print_cls::sc#0 ← (byte*) SCREEN#0 to:print_cls::@1 @@ -44,6 +48,8 @@ print_cls::@2: scope:[print_cls] from print_cls::@1 print_cls::@return: scope:[print_cls] from print_cls::@1 return to:@return + +(void()) mode_ctrl() mode_ctrl: scope:[mode_ctrl] from main::@1 to:mode_ctrl::@1 mode_ctrl::@1: scope:[mode_ctrl] from mode_ctrl mode_ctrl::@4 mode_ctrl::@8 @@ -190,6 +196,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -201,6 +209,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) mode_ctrl() mode_ctrl: scope:[mode_ctrl] from main::@1 [9] phi() to:mode_ctrl::@1 @@ -214,6 +224,8 @@ mode_ctrl::@3: scope:[mode_ctrl] from mode_ctrl::@1 mode_ctrl::@2: scope:[mode_ctrl] from mode_ctrl::@1 [13] *((const byte*) BORDERCOL#0) ← (byte) 2 to:mode_ctrl::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main [14] phi() to:print_cls::@1 diff --git a/src/test/ref/loop-while-continue.cfg b/src/test/ref/loop-while-continue.cfg index cd5b53bf1..8c765bc84 100644 --- a/src/test/ref/loop-while-continue.cfg +++ b/src/test/ref/loop-while-continue.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loop-while-continue.log b/src/test/ref/loop-while-continue.log index d4b125067..a616bb4ec 100644 --- a/src/test/ref/loop-while-continue.log +++ b/src/test/ref/loop-while-continue.log @@ -9,6 +9,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (number) 0 to:main::@1 @@ -117,6 +119,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loop-while-min.cfg b/src/test/ref/loop-while-min.cfg index b93d67ece..e54d5f046 100644 --- a/src/test/ref/loop-while-min.cfg +++ b/src/test/ref/loop-while-min.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loop-while-min.log b/src/test/ref/loop-while-min.log index 4dca6a2e4..adfe03765 100644 --- a/src/test/ref/loop-while-min.log +++ b/src/test/ref/loop-while-min.log @@ -8,6 +8,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (number) 0 to:main::@1 @@ -99,6 +101,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loop-while-sideeffect.cfg b/src/test/ref/loop-while-sideeffect.cfg index 35a51cd3c..77a2ad1eb 100644 --- a/src/test/ref/loop-while-sideeffect.cfg +++ b/src/test/ref/loop-while-sideeffect.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loop-while-sideeffect.log b/src/test/ref/loop-while-sideeffect.log index 0b0e4e80c..864736481 100644 --- a/src/test/ref/loop-while-sideeffect.log +++ b/src/test/ref/loop-while-sideeffect.log @@ -7,6 +7,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (number) 7 to:main::@1 @@ -104,6 +106,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loop100.cfg b/src/test/ref/loop100.cfg index 69b7bab07..80368ac13 100644 --- a/src/test/ref/loop100.cfg +++ b/src/test/ref/loop100.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loop100.log b/src/test/ref/loop100.log index 66e2fb0ac..60bfdbe9f 100644 --- a/src/test/ref/loop100.log +++ b/src/test/ref/loop100.log @@ -6,6 +6,8 @@ Culled Empty Block (label) main::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (number) 0 to:main::@1 @@ -91,6 +93,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loophead-problem-2.cfg b/src/test/ref/loophead-problem-2.cfg index bcdd915cc..1bca9d711 100644 --- a/src/test/ref/loophead-problem-2.cfg +++ b/src/test/ref/loophead-problem-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call scan_for_lowest @@ -24,6 +26,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [14] return to:@return + +(byte()) scan_for_lowest() scan_for_lowest: scope:[scan_for_lowest] from main [15] phi() to:scan_for_lowest::@1 diff --git a/src/test/ref/loophead-problem-2.log b/src/test/ref/loophead-problem-2.log index d2ee5678f..718f40e50 100644 --- a/src/test/ref/loophead-problem-2.log +++ b/src/test/ref/loophead-problem-2.log @@ -12,6 +12,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (signed word[8]) ball_y#0 ← { (number) $32, (number) $64, (number) -$c8, (number) $c, (number) -$64, (number) $4b, (number) 0, (number) -$79 } to:@2 + +(void()) main() main: scope:[main] from @2 (byte*) main::screen#0 ← ((byte*)) (number) $400 call scan_for_lowest @@ -32,6 +34,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 return to:@return + +(byte()) scan_for_lowest() scan_for_lowest: scope:[scan_for_lowest] from main (byte) scan_for_lowest::lowest#0 ← (number) $ff (signed word) scan_for_lowest::height#0 ← (number) $258 @@ -267,6 +271,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call scan_for_lowest @@ -284,6 +290,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [14] return to:@return + +(byte()) scan_for_lowest() scan_for_lowest: scope:[scan_for_lowest] from main [15] phi() to:scan_for_lowest::@1 diff --git a/src/test/ref/loophead-problem-3.cfg b/src/test/ref/loophead-problem-3.cfg index a9f0718d8..55ff9ad33 100644 --- a/src/test/ref/loophead-problem-3.cfg +++ b/src/test/ref/loophead-problem-3.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call mul16u @@ -23,6 +25,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [13] return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from main [14] phi() to:mul16u::@1 diff --git a/src/test/ref/loophead-problem-3.log b/src/test/ref/loophead-problem-3.log index 770a51282..8f97fdce6 100644 --- a/src/test/ref/loophead-problem-3.log +++ b/src/test/ref/loophead-problem-3.log @@ -18,6 +18,8 @@ CONTROL FLOW GRAPH SSA (byte*) BORDERCOL#0 ← ((byte*)) (number) $d020 (byte*) BGCOL#0 ← ((byte*)) (number) $d021 to:@10 + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from main (word) mul16u::a#5 ← phi( main/(word) mul16u::a#1 ) (word) mul16u::b#1 ← phi( main/(word) mul16u::b#0 ) @@ -65,6 +67,8 @@ mul16u::@return: scope:[mul16u] from mul16u::@3 (dword) mul16u::return#1 ← (dword) mul16u::return#3 return to:@return + +(void()) main() main: scope:[main] from @10 (word) mul16u::a#1 ← (number) 4 (word) mul16u::b#0 ← (number) $7b @@ -270,6 +274,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call mul16u @@ -286,6 +292,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [13] return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from main [14] phi() to:mul16u::@1 diff --git a/src/test/ref/loophead-problem.cfg b/src/test/ref/loophead-problem.cfg index c32f34f0a..974ddc52a 100644 --- a/src/test/ref/loophead-problem.cfg +++ b/src/test/ref/loophead-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) screen#0+(byte) $28) ← (byte) 'a' [5] call popup_selector @@ -17,6 +19,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [7] return to:@return + +(void()) popup_selector() popup_selector: scope:[popup_selector] from main [8] phi() to:popup_selector::@1 diff --git a/src/test/ref/loophead-problem.log b/src/test/ref/loophead-problem.log index 64828d332..ff196fc6c 100644 --- a/src/test/ref/loophead-problem.log +++ b/src/test/ref/loophead-problem.log @@ -9,6 +9,8 @@ CONTROL FLOW GRAPH SSA (byte*) screen#0 ← ((byte*)) (number) $400 (byte) opcode#0 ← (byte) 'a' to:@2 + +(void()) main() main: scope:[main] from @2 (byte) opcode#6 ← phi( @2/(byte) opcode#11 ) *((byte*) screen#0 + (number) $28) ← (byte) opcode#6 @@ -24,6 +26,8 @@ main::@return: scope:[main] from main::@1 (byte) opcode#2 ← (byte) opcode#8 return to:@return + +(void()) popup_selector() popup_selector: scope:[popup_selector] from main (byte) opcode#13 ← phi( main/(byte) opcode#6 ) (byte) popup_selector::k#0 ← (number) 0 @@ -176,6 +180,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) screen#0+(byte) $28) ← (byte) 'a' [5] call popup_selector @@ -186,6 +192,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [7] return to:@return + +(void()) popup_selector() popup_selector: scope:[popup_selector] from main [8] phi() to:popup_selector::@1 diff --git a/src/test/ref/loopmin.cfg b/src/test/ref/loopmin.cfg index 42550cb12..126aa0d5e 100644 --- a/src/test/ref/loopmin.cfg +++ b/src/test/ref/loopmin.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loopmin.log b/src/test/ref/loopmin.log index b69c8cf85..33f9a24bc 100644 --- a/src/test/ref/loopmin.log +++ b/src/test/ref/loopmin.log @@ -3,6 +3,8 @@ Culled Empty Block (label) main::@4 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (number) $a (byte) main::s#0 ← (number) 0 @@ -144,6 +146,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loopnest.cfg b/src/test/ref/loopnest.cfg index 9e247c39e..9a3c6eb6f 100644 --- a/src/test/ref/loopnest.cfg +++ b/src/test/ref/loopnest.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -21,6 +23,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [9] return to:@return + +(void()) nest() nest: scope:[nest] from main::@1 [10] phi() to:nest::@1 diff --git a/src/test/ref/loopnest.log b/src/test/ref/loopnest.log index c2538d738..e72ccd007 100644 --- a/src/test/ref/loopnest.log +++ b/src/test/ref/loopnest.log @@ -7,6 +7,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@2 + +(void()) main() main: scope:[main] from @2 (byte) main::i#0 ← (number) $64 to:main::@1 @@ -23,6 +25,8 @@ main::@3: scope:[main] from main::@1 main::@return: scope:[main] from main::@3 return to:@return + +(void()) nest() nest: scope:[nest] from main::@1 (byte) nest::j#0 ← (number) $64 to:nest::@1 @@ -140,6 +144,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -154,6 +160,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [9] return to:@return + +(void()) nest() nest: scope:[nest] from main::@1 [10] phi() to:nest::@1 diff --git a/src/test/ref/loopnest2.cfg b/src/test/ref/loopnest2.cfg index 7c25677c6..b28fa8fad 100644 --- a/src/test/ref/loopnest2.cfg +++ b/src/test/ref/loopnest2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -28,6 +30,8 @@ main::@3: scope:[main] from main::@4 main::@return: scope:[main] from main::@3 [12] return to:@return + +(void()) nest1() nest1: scope:[nest1] from main::@2 [13] phi() to:nest1::@1 @@ -49,6 +53,8 @@ nest1::@3: scope:[nest1] from nest1::@4 nest1::@return: scope:[nest1] from nest1::@3 [21] return to:@return + +(void()) nest2() nest2: scope:[nest2] from nest1::@2 [22] phi() to:nest2::@1 diff --git a/src/test/ref/loopnest2.log b/src/test/ref/loopnest2.log index f67cbec5a..e8d628600 100644 --- a/src/test/ref/loopnest2.log +++ b/src/test/ref/loopnest2.log @@ -9,6 +9,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@3 + +(void()) main() main: scope:[main] from @3 (byte) main::i#0 ← (number) $64 to:main::@1 @@ -37,6 +39,8 @@ main::@3: scope:[main] from main::@5 main::@return: scope:[main] from main::@3 return to:@return + +(void()) nest1() nest1: scope:[nest1] from main::@2 (byte) nest1::i#0 ← (number) $64 to:nest1::@1 @@ -65,6 +69,8 @@ nest1::@3: scope:[nest1] from nest1::@5 nest1::@return: scope:[nest1] from nest1::@3 return to:@return + +(void()) nest2() nest2: scope:[nest2] from nest1::@2 (byte) nest2::i#0 ← (number) $64 to:nest2::@1 @@ -300,6 +306,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -321,6 +329,8 @@ main::@3: scope:[main] from main::@4 main::@return: scope:[main] from main::@3 [12] return to:@return + +(void()) nest1() nest1: scope:[nest1] from main::@2 [13] phi() to:nest1::@1 @@ -342,6 +352,8 @@ nest1::@3: scope:[nest1] from nest1::@4 nest1::@return: scope:[nest1] from nest1::@3 [21] return to:@return + +(void()) nest2() nest2: scope:[nest2] from nest1::@2 [22] phi() to:nest2::@1 diff --git a/src/test/ref/loopnest3.cfg b/src/test/ref/loopnest3.cfg index 273470cba..01ccc4cb7 100644 --- a/src/test/ref/loopnest3.cfg +++ b/src/test/ref/loopnest3.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -22,6 +24,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [10] return to:@return + +(void()) b((byte) b::i) b: scope:[b] from main::@1 [11] (byte) c::i#0 ← (byte) b::i#0 [12] call c @@ -29,6 +33,8 @@ b: scope:[b] from main::@1 b::@return: scope:[b] from b [13] return to:@return + +(void()) c((byte) c::i) c: scope:[c] from b [14] phi() to:c::@1 diff --git a/src/test/ref/loopnest3.log b/src/test/ref/loopnest3.log index 1cef22c9d..e57e52163 100644 --- a/src/test/ref/loopnest3.log +++ b/src/test/ref/loopnest3.log @@ -5,6 +5,8 @@ Culled Empty Block (label) c::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @3 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -22,6 +24,8 @@ main::@3: scope:[main] from main::@1 main::@return: scope:[main] from main::@3 return to:@return + +(void()) b((byte) b::i) b: scope:[b] from main::@1 (byte) b::i#1 ← phi( main::@1/(byte) b::i#0 ) (byte) c::i#0 ← (byte) b::i#1 @@ -35,6 +39,8 @@ b::@return: scope:[b] from b::@1 @2: scope:[] from @begin (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@3 + +(void()) c((byte) c::i) c: scope:[c] from b (byte) c::i#2 ← phi( b/(byte) c::i#0 ) (byte) c::j#0 ← (byte) 0 @@ -171,6 +177,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -186,6 +194,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [10] return to:@return + +(void()) b((byte) b::i) b: scope:[b] from main::@1 [11] (byte) c::i#0 ← (byte) b::i#0 [12] call c @@ -193,6 +203,8 @@ b: scope:[b] from main::@1 b::@return: scope:[b] from b [13] return to:@return + +(void()) c((byte) c::i) c: scope:[c] from b [14] phi() to:c::@1 diff --git a/src/test/ref/loopsplit.cfg b/src/test/ref/loopsplit.cfg index fa4a57c3e..db6d37c77 100644 --- a/src/test/ref/loopsplit.cfg +++ b/src/test/ref/loopsplit.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/loopsplit.log b/src/test/ref/loopsplit.log index 80216101e..3d3158927 100644 --- a/src/test/ref/loopsplit.log +++ b/src/test/ref/loopsplit.log @@ -7,6 +7,8 @@ Culled Empty Block (label) main::@10 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (number) $64 (byte) main::s#0 ← (number) 0 @@ -157,6 +159,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/malloc-0.cfg b/src/test/ref/malloc-0.cfg index 64da5da73..dec99cb70 100644 --- a/src/test/ref/malloc-0.cfg +++ b/src/test/ref/malloc-0.cfg @@ -11,6 +11,8 @@ to:@end @end: scope:[] from @2 [5] phi() + +(void()) main() main: scope:[main] from @2 [6] phi() to:main::@1 @@ -23,6 +25,8 @@ main::@1: scope:[main] from main main::@1 main::@return: scope:[main] from main::@1 [11] return to:@return + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from @1 [12] phi() to:malloc::@return diff --git a/src/test/ref/malloc-0.log b/src/test/ref/malloc-0.log index ea75c2a2e..e4a5f6eb2 100644 --- a/src/test/ref/malloc-0.log +++ b/src/test/ref/malloc-0.log @@ -25,6 +25,8 @@ CONTROL FLOW GRAPH SSA (byte*) HEAP_TOP#0 ← ((byte*)) (number) $a000 (byte*) heap_head#0 ← (byte*) HEAP_TOP#0 to:@12 + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from @12 (word) malloc::size#1 ← phi( @12/(word) malloc::size#0 ) (byte*) heap_head#4 ← phi( @12/(byte*) heap_head#7 ) @@ -53,6 +55,8 @@ malloc::@return: scope:[malloc] from malloc (byte*) heap_head#3 ← (byte*) heap_head#6 (byte*) BYTES#0 ← ((byte*)) (void*~) $0 to:@13 + +(void()) main() main: scope:[main] from @13 (byte*) BYTES#2 ← phi( @13/(byte*) BYTES#3 ) (byte) main::i#0 ← (byte) 0 @@ -235,6 +239,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @2 [5] phi() + +(void()) main() main: scope:[main] from @2 [6] phi() to:main::@1 @@ -247,6 +253,8 @@ main::@1: scope:[main] from main main::@1 main::@return: scope:[main] from main::@1 [11] return to:@return + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from @1 [12] phi() to:malloc::@return diff --git a/src/test/ref/malloc-1.cfg b/src/test/ref/malloc-1.cfg index 57ea15324..9e1f7a3ce 100644 --- a/src/test/ref/malloc-1.cfg +++ b/src/test/ref/malloc-1.cfg @@ -11,6 +11,8 @@ to:@end @end: scope:[] from @2 [5] phi() + +(void()) main() main: scope:[main] from @2 [6] phi() to:main::@1 @@ -25,6 +27,8 @@ main::@1: scope:[main] from main main::@1 main::@return: scope:[main] from main::@1 [12] return to:@return + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from @1 [13] phi() to:malloc::@return diff --git a/src/test/ref/malloc-1.log b/src/test/ref/malloc-1.log index 0e8742edf..12768e068 100644 --- a/src/test/ref/malloc-1.log +++ b/src/test/ref/malloc-1.log @@ -26,6 +26,8 @@ CONTROL FLOW GRAPH SSA (byte*) HEAP_TOP#0 ← ((byte*)) (number) $a000 (byte*) heap_head#0 ← (byte*) HEAP_TOP#0 to:@12 + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from @12 (word) malloc::size#1 ← phi( @12/(word) malloc::size#0 ) (byte*) heap_head#4 ← phi( @12/(byte*) heap_head#7 ) @@ -54,6 +56,8 @@ malloc::@return: scope:[malloc] from malloc (byte*) heap_head#3 ← (byte*) heap_head#6 (word*) WORDS#0 ← ((word*)) (void*~) $0 to:@13 + +(void()) main() main: scope:[main] from @13 (word*) WORDS#1 ← phi( @13/(word*) WORDS#2 ) (word*) main::w#0 ← (word*) WORDS#1 @@ -246,6 +250,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @2 [5] phi() + +(void()) main() main: scope:[main] from @2 [6] phi() to:main::@1 @@ -260,6 +266,8 @@ main::@1: scope:[main] from main main::@1 main::@return: scope:[main] from main::@1 [12] return to:@return + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from @1 [13] phi() to:malloc::@return diff --git a/src/test/ref/mem-alignment.cfg b/src/test/ref/mem-alignment.cfg index bd2401aa8..7d787efa6 100644 --- a/src/test/ref/mem-alignment.cfg +++ b/src/test/ref/mem-alignment.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/mem-alignment.log b/src/test/ref/mem-alignment.log index 70230d84c..685962323 100644 --- a/src/test/ref/mem-alignment.log +++ b/src/test/ref/mem-alignment.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte[$100]) bs#0 ← { fill( $100, 0) } to:@1 + +(void()) main() main: scope:[main] from @1 (byte[$100]) main::cs#0 ← { fill( $100, 0) } (byte) main::i#0 ← (byte) 0 @@ -143,6 +145,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/memcpy-0.cfg b/src/test/ref/memcpy-0.cfg index 543058303..62d96aa6a 100644 --- a/src/test/ref/memcpy-0.cfg +++ b/src/test/ref/memcpy-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::toD0181 @@ -29,6 +31,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [13] return to:@return + +(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num) memcpy: scope:[memcpy] from main::@1 main::@2 [14] (word) memcpy::num#2 ← phi( main::@1/(word) $400 main::@2/(word) $800 ) [14] (void*) memcpy::destination#2 ← phi( main::@1/(void*)(const byte*) SCREEN_COPY#0 main::@2/(void*)(const byte*) CHARSET#0 ) diff --git a/src/test/ref/memcpy-0.log b/src/test/ref/memcpy-0.log index edc0a7602..56164c48a 100644 --- a/src/test/ref/memcpy-0.log +++ b/src/test/ref/memcpy-0.log @@ -22,6 +22,8 @@ CONTROL FLOW GRAPH SSA (byte*) CHARGEN#0 ← ((byte*)) (number) $d000 (byte*) D018#0 ← ((byte*)) (number) $d018 to:@8 + +(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num) memcpy: scope:[memcpy] from main::@1 main::@2 (word) memcpy::num#2 ← phi( main::@1/(word) memcpy::num#0 main::@2/(word) memcpy::num#1 ) (void*) memcpy::destination#2 ← phi( main::@1/(void*) memcpy::destination#0 main::@2/(void*) memcpy::destination#1 ) @@ -63,6 +65,8 @@ memcpy::@return: scope:[memcpy] from memcpy::@3 (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte*) SCREEN_COPY#0 ← ((byte*)) (number) $2400 to:@9 + +(void()) main() main: scope:[main] from @9 (byte*) main::toD0181_screen#0 ← (byte*) SCREEN_COPY#0 (byte*) main::toD0181_gfx#0 ← (byte*) CHARSET#0 @@ -414,6 +418,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::toD0181 @@ -436,6 +442,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [13] return to:@return + +(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num) memcpy: scope:[memcpy] from main::@1 main::@2 [14] (word) memcpy::num#2 ← phi( main::@1/(word) $400 main::@2/(word) $800 ) [14] (void*) memcpy::destination#2 ← phi( main::@1/(void*)(const byte*) SCREEN_COPY#0 main::@2/(void*)(const byte*) CHARSET#0 ) diff --git a/src/test/ref/memcpy-1.cfg b/src/test/ref/memcpy-1.cfg index 3d07f7559..131bb9343 100644 --- a/src/test/ref/memcpy-1.cfg +++ b/src/test/ref/memcpy-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -41,6 +43,8 @@ main::@4: scope:[main] from main::@3 main::@return: scope:[main] from main::@4 [21] return to:@return + +(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num) memcpy: scope:[memcpy] from main::@3 main::@4 [22] (word) memcpy::num#2 ← phi( main::@3/(byte) 7 main::@4/(byte) 5 ) [22] (void*) memcpy::destination#2 ← phi( main::@3/(void*)(const byte*) SCREEN#0+(byte) $a main::@4/(void*)(const byte*) SCREEN#0+(byte) $32 ) diff --git a/src/test/ref/memcpy-1.log b/src/test/ref/memcpy-1.log index 84cb7d283..3bba5b680 100644 --- a/src/test/ref/memcpy-1.log +++ b/src/test/ref/memcpy-1.log @@ -10,6 +10,8 @@ Culled Empty Block (label) @3 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@4 + +(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num) memcpy: scope:[memcpy] from main::@4 main::@5 (word) memcpy::num#2 ← phi( main::@4/(word) memcpy::num#0 main::@5/(word) memcpy::num#1 ) (void*) memcpy::destination#2 ← phi( main::@4/(void*) memcpy::destination#0 main::@5/(void*) memcpy::destination#1 ) @@ -50,6 +52,8 @@ memcpy::@return: scope:[memcpy] from memcpy::@3 (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte[]) CAMELOT#0 ← (const string) $0 to:@5 + +(void()) main() main: scope:[main] from @5 (byte*) main::sc#0 ← (byte*) SCREEN#0 (byte*) main::camelot#0 ← (byte[]) CAMELOT#0 @@ -379,6 +383,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -413,6 +419,8 @@ main::@4: scope:[main] from main::@3 main::@return: scope:[main] from main::@4 [21] return to:@return + +(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num) memcpy: scope:[memcpy] from main::@3 main::@4 [22] (word) memcpy::num#2 ← phi( main::@3/(byte) 7 main::@4/(byte) 5 ) [22] (void*) memcpy::destination#2 ← phi( main::@3/(void*)(const byte*) SCREEN#0+(byte) $a main::@4/(void*)(const byte*) SCREEN#0+(byte) $32 ) diff --git a/src/test/ref/memory-heap.cfg b/src/test/ref/memory-heap.cfg index 3ab7acf89..b48a85180 100644 --- a/src/test/ref/memory-heap.cfg +++ b/src/test/ref/memory-heap.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call malloc @@ -41,12 +43,16 @@ main::@6: scope:[main] from main::@5 main::@return: scope:[main] from main::@6 [21] return to:@return + +(void()) free((void*) free::ptr) free: scope:[free] from main::@2 main::@5 [22] phi() to:free::@return free::@return: scope:[free] from free [23] return to:@return + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from main main::@3 [24] (byte*) heap_head#7 ← phi( main/(const byte*) HEAP_TOP#0 main::@3/(byte*) heap_head#1 ) [25] (byte*) malloc::mem#0 ← (byte*) heap_head#7 - (byte) $64 diff --git a/src/test/ref/memory-heap.log b/src/test/ref/memory-heap.log index 8a3f93063..079d9ddac 100644 --- a/src/test/ref/memory-heap.log +++ b/src/test/ref/memory-heap.log @@ -26,6 +26,8 @@ CONTROL FLOW GRAPH SSA (byte*) HEAP_TOP#0 ← ((byte*)) (number) $a000 (byte*) heap_head#0 ← (byte*) HEAP_TOP#0 to:@13 + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from main main::@3 (word) malloc::size#2 ← phi( main/(word) malloc::size#0 main::@3/(word) malloc::size#1 ) (byte*) heap_head#7 ← phi( main/(byte*) heap_head#13 main::@3/(byte*) heap_head#3 ) @@ -41,11 +43,15 @@ malloc::@return: scope:[malloc] from malloc (byte*) heap_head#2 ← (byte*) heap_head#8 return to:@return + +(void()) free((void*) free::ptr) free: scope:[free] from main::@2 main::@5 to:free::@return free::@return: scope:[free] from free return to:@return + +(void()) main() main: scope:[main] from @13 (byte*) heap_head#13 ← phi( @13/(byte*) heap_head#15 ) (word) malloc::size#0 ← (number) $64 @@ -339,6 +345,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call malloc @@ -373,12 +381,16 @@ main::@6: scope:[main] from main::@5 main::@return: scope:[main] from main::@6 [21] return to:@return + +(void()) free((void*) free::ptr) free: scope:[free] from main::@2 main::@5 [22] phi() to:free::@return free::@return: scope:[free] from free [23] return to:@return + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from main main::@3 [24] (byte*) heap_head#7 ← phi( main/(const byte*) HEAP_TOP#0 main::@3/(byte*) heap_head#1 ) [25] (byte*) malloc::mem#0 ← (byte*) heap_head#7 - (byte) $64 diff --git a/src/test/ref/min-fmul-16.cfg b/src/test/ref/min-fmul-16.cfg index b23aa09a0..596be2141 100644 --- a/src/test/ref/min-fmul-16.cfg +++ b/src/test/ref/min-fmul-16.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call mulf_init @@ -35,12 +37,16 @@ main::@6: scope:[main] from main::@5 [16] phi() [17] call print_set_screen to:main::@1 + +(void()) print_set_screen((byte*) print_set_screen::screen) print_set_screen: scope:[print_set_screen] from main::@6 [18] phi() to:print_set_screen::@return print_set_screen::@return: scope:[print_set_screen] from print_set_screen [19] return to:@return + +(void()) print_dword((dword) print_dword::dw) print_dword: scope:[print_dword] from main::@5 [20] (word) print_word::w#0 ← > (dword) print_dword::dw#0 [21] call print_word @@ -52,6 +58,8 @@ print_dword::@1: scope:[print_dword] from print_dword print_dword::@return: scope:[print_dword] from print_dword::@1 [24] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_dword print_dword::@1 [25] (byte*) print_char_cursor#34 ← phi( print_dword/(byte*) print_char_cursor#16 print_dword::@1/(byte*) print_char_cursor#10 ) [25] (word) print_word::w#2 ← phi( print_dword/(word) print_word::w#0 print_dword::@1/(word) print_word::w#1 ) @@ -65,6 +73,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [30] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [31] (byte*) print_char_cursor#36 ← phi( print_word/(byte*) print_char_cursor#34 print_word::@1/(byte*) print_char_cursor#10 ) [31] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -80,6 +90,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [38] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 [39] (byte*) print_char_cursor#27 ← phi( print_byte/(byte*) print_char_cursor#36 print_byte::@1/(byte*) print_char_cursor#10 ) [39] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -89,6 +101,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char [42] return to:@return + +(dword()) mulf16u((word) mulf16u::a , (word) mulf16u::b) mulf16u: scope:[mulf16u] from main::@3 [43] *((const word*) mulf16u::memA#0) ← (const word) main::a#0 [44] *((const word*) mulf16u::memB#0) ← (const word) main::b#0 @@ -98,6 +112,8 @@ mulf16u: scope:[mulf16u] from main::@3 mulf16u::@return: scope:[mulf16u] from mulf16u [47] return to:@return + +(void()) mulf_init() mulf_init: scope:[mulf_init] from main [48] phi() to:mulf_init::@1 diff --git a/src/test/ref/min-fmul-16.log b/src/test/ref/min-fmul-16.log index 72457a27b..af5162ad4 100644 --- a/src/test/ref/min-fmul-16.log +++ b/src/test/ref/min-fmul-16.log @@ -74,6 +74,8 @@ CONTROL FLOW GRAPH SSA (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@29 + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_dword print_dword::@1 (byte*) print_char_cursor#34 ← phi( print_dword/(byte*) print_char_cursor#35 print_dword::@1/(byte*) print_char_cursor#4 ) (word) print_word::w#2 ← phi( print_dword/(word) print_word::w#0 print_dword::@1/(word) print_word::w#1 ) @@ -98,6 +100,8 @@ print_word::@return: scope:[print_word] from print_word::@2 (byte*) print_char_cursor#3 ← (byte*) print_char_cursor#20 return to:@return + +(void()) print_dword((dword) print_dword::dw) print_dword: scope:[print_dword] from main::@14 (byte*) print_char_cursor#35 ← phi( main::@14/(byte*) print_char_cursor#37 ) (dword) print_dword::dw#1 ← phi( main::@14/(dword) print_dword::dw#0 ) @@ -128,6 +132,8 @@ print_dword::@return: scope:[print_dword] from print_dword::@2 (byte*) print_char_cursor#46 ← phi( @12/(byte*) print_char_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $0 to:@36 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) print_char_cursor#36 ← phi( print_word/(byte*) print_char_cursor#34 print_word::@1/(byte*) print_char_cursor#1 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -152,6 +158,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#9 ← (byte*) print_char_cursor#26 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 (byte*) print_char_cursor#27 ← phi( print_byte/(byte*) print_char_cursor#36 print_byte::@1/(byte*) print_char_cursor#7 ) (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -163,6 +171,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#11 ← (byte*) print_char_cursor#28 return to:@return + +(void()) print_set_screen((byte*) print_set_screen::screen) print_set_screen: scope:[print_set_screen] from main::@15 (byte*) print_set_screen::screen#1 ← phi( main::@15/(byte*) print_set_screen::screen#0 ) (byte*) print_screen#1 ← (byte*) print_set_screen::screen#1 @@ -186,6 +196,8 @@ print_set_screen::@return: scope:[print_set_screen] from print_set_screen (byte*) BORDERCOL#0 ← ((byte*)) (number) $d020 (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@37 + +(void()) main() main: scope:[main] from @39 (byte*) print_line_cursor#16 ← phi( @39/(byte*) print_line_cursor#12 ) (byte*) print_screen#16 ← phi( @39/(byte*) print_screen#12 ) @@ -268,6 +280,8 @@ main::@return: scope:[main] from main::@1 (byte[$200]) mulf_sqr2_lo#0 ← { fill( $200, 0) } (byte[$200]) mulf_sqr2_hi#0 ← { fill( $200, 0) } to:@39 + +(void()) mulf_init() mulf_init: scope:[mulf_init] from main (word) mulf_init::sqr#0 ← (number) 0 (byte) mulf_init::x_2#0 ← (number) 0 @@ -377,6 +391,8 @@ mulf_init::@15: scope:[mulf_init] from mulf_init::@10 mulf_init::@return: scope:[mulf_init] from mulf_init::@11 return to:@return + +(dword()) mulf16u((word) mulf16u::a , (word) mulf16u::b) mulf16u: scope:[mulf16u] from main::@6 (word) mulf16u::b#1 ← phi( main::@6/(word) mulf16u::b#0 ) (word) mulf16u::a#1 ← phi( main::@6/(word) mulf16u::a#0 ) @@ -1086,6 +1102,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call mulf_init @@ -1114,12 +1132,16 @@ main::@6: scope:[main] from main::@5 [16] phi() [17] call print_set_screen to:main::@1 + +(void()) print_set_screen((byte*) print_set_screen::screen) print_set_screen: scope:[print_set_screen] from main::@6 [18] phi() to:print_set_screen::@return print_set_screen::@return: scope:[print_set_screen] from print_set_screen [19] return to:@return + +(void()) print_dword((dword) print_dword::dw) print_dword: scope:[print_dword] from main::@5 [20] (word) print_word::w#0 ← > (dword) print_dword::dw#0 [21] call print_word @@ -1131,6 +1153,8 @@ print_dword::@1: scope:[print_dword] from print_dword print_dword::@return: scope:[print_dword] from print_dword::@1 [24] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_dword print_dword::@1 [25] (byte*) print_char_cursor#34 ← phi( print_dword/(byte*) print_char_cursor#16 print_dword::@1/(byte*) print_char_cursor#10 ) [25] (word) print_word::w#2 ← phi( print_dword/(word) print_word::w#0 print_dword::@1/(word) print_word::w#1 ) @@ -1144,6 +1168,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [30] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [31] (byte*) print_char_cursor#36 ← phi( print_word/(byte*) print_char_cursor#34 print_word::@1/(byte*) print_char_cursor#10 ) [31] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -1159,6 +1185,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [38] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 [39] (byte*) print_char_cursor#27 ← phi( print_byte/(byte*) print_char_cursor#36 print_byte::@1/(byte*) print_char_cursor#10 ) [39] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -1168,6 +1196,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char [42] return to:@return + +(dword()) mulf16u((word) mulf16u::a , (word) mulf16u::b) mulf16u: scope:[mulf16u] from main::@3 [43] *((const word*) mulf16u::memA#0) ← (const word) main::a#0 [44] *((const word*) mulf16u::memB#0) ← (const word) main::b#0 @@ -1177,6 +1207,8 @@ mulf16u: scope:[mulf16u] from main::@3 mulf16u::@return: scope:[mulf16u] from mulf16u [47] return to:@return + +(void()) mulf_init() mulf_init: scope:[mulf_init] from main [48] phi() to:mulf_init::@1 diff --git a/src/test/ref/mixed-array-0.cfg b/src/test/ref/mixed-array-0.cfg index 4e140473f..25ddda3b6 100644 --- a/src/test/ref/mixed-array-0.cfg +++ b/src/test/ref/mixed-array-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← *((const byte[]) main::msg#0) [5] *((const byte*) main::SCREEN#0+(byte) 1) ← *((const byte[]) main::msg#0+(byte) 1) diff --git a/src/test/ref/mixed-array-0.log b/src/test/ref/mixed-array-0.log index f6a3f8fe7..acbc474f5 100644 --- a/src/test/ref/mixed-array-0.log +++ b/src/test/ref/mixed-array-0.log @@ -3,6 +3,8 @@ Identified constant variable (byte*) main::SCREEN CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte[]) main::msg#0 ← { (byte) 1, (number) 2, (number) 3 } (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 @@ -97,6 +99,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← *((const byte[]) main::msg#0) [5] *((const byte*) main::SCREEN#0+(byte) 1) ← *((const byte[]) main::msg#0+(byte) 1) diff --git a/src/test/ref/mixed-array-1.cfg b/src/test/ref/mixed-array-1.cfg index b06d740e7..fa6800c77 100644 --- a/src/test/ref/mixed-array-1.cfg +++ b/src/test/ref/mixed-array-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const signed byte*) main::SCREEN#0) ← *((const signed byte[]) main::msg#0) [5] *((const signed byte*) main::SCREEN#0+(byte) 1) ← *((const signed byte[]) main::msg#0+(byte) 1) diff --git a/src/test/ref/mixed-array-1.log b/src/test/ref/mixed-array-1.log index 95eb3a3bc..37841cd4b 100644 --- a/src/test/ref/mixed-array-1.log +++ b/src/test/ref/mixed-array-1.log @@ -3,6 +3,8 @@ Identified constant variable (signed byte*) main::SCREEN CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (signed byte[]) main::msg#0 ← { (number) -1, (number) 0, (number) 1 } (signed byte*) main::SCREEN#0 ← ((signed byte*)) (number) $400 @@ -98,6 +100,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const signed byte*) main::SCREEN#0) ← *((const signed byte[]) main::msg#0) [5] *((const signed byte*) main::SCREEN#0+(byte) 1) ← *((const signed byte[]) main::msg#0+(byte) 1) diff --git a/src/test/ref/modglobal.cfg b/src/test/ref/modglobal.cfg index d28131ee0..b2734e93f 100644 --- a/src/test/ref/modglobal.cfg +++ b/src/test/ref/modglobal.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call inccnt @@ -28,6 +30,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [16] return to:@return + +(byte()) inccnt() inccnt: scope:[inccnt] from main main::@1 [17] (byte) cnt3#10 ← phi( main/(byte) 0 main::@1/(byte) cnt3#11 ) [17] (byte) cnt2#10 ← phi( main/(byte) 0 main::@1/(byte) cnt2#11 ) diff --git a/src/test/ref/modglobal.log b/src/test/ref/modglobal.log index 378c9aa27..1db49a3fd 100644 --- a/src/test/ref/modglobal.log +++ b/src/test/ref/modglobal.log @@ -8,6 +8,8 @@ CONTROL FLOW GRAPH SSA (byte) cnt3#0 ← (number) 0 (byte[$100]) SCREEN#0 ← ((byte[$100])) (number) $400 to:@2 + +(void()) main() main: scope:[main] from @2 (byte) cnt3#13 ← phi( @2/(byte) cnt3#14 ) (byte) cnt2#13 ← phi( @2/(byte) cnt2#14 ) @@ -51,6 +53,8 @@ main::@return: scope:[main] from main::@2 (byte) cnt3#3 ← (byte) cnt3#9 return to:@return + +(byte()) inccnt() inccnt: scope:[inccnt] from main main::@1 (byte) cnt3#10 ← phi( main/(byte) cnt3#13 main::@1/(byte) cnt3#1 ) (byte) cnt2#10 ← phi( main/(byte) cnt2#13 main::@1/(byte) cnt2#1 ) @@ -271,6 +275,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call inccnt @@ -292,6 +298,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [16] return to:@return + +(byte()) inccnt() inccnt: scope:[inccnt] from main main::@1 [17] (byte) cnt3#10 ← phi( main/(byte) 0 main::@1/(byte) cnt3#11 ) [17] (byte) cnt2#10 ← phi( main/(byte) 0 main::@1/(byte) cnt2#11 ) diff --git a/src/test/ref/modglobalmin.cfg b/src/test/ref/modglobalmin.cfg index aae4fbdfd..f83ccc850 100644 --- a/src/test/ref/modglobalmin.cfg +++ b/src/test/ref/modglobalmin.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call inccnt @@ -23,6 +25,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [11] return to:@return + +(void()) inccnt() inccnt: scope:[inccnt] from main main::@1 [12] (byte) cnt#12 ← phi( main/(byte) 0 main::@1/(byte) cnt#2 ) [13] (byte) cnt#13 ← ++ (byte) cnt#12 diff --git a/src/test/ref/modglobalmin.log b/src/test/ref/modglobalmin.log index c0519c7b1..c1ef81fd4 100644 --- a/src/test/ref/modglobalmin.log +++ b/src/test/ref/modglobalmin.log @@ -5,6 +5,8 @@ CONTROL FLOW GRAPH SSA (byte) cnt#0 ← (number) 0 (byte[$100]) SCREEN#0 ← ((byte[$100])) (number) $400 to:@2 + +(void()) main() main: scope:[main] from @2 (byte) cnt#15 ← phi( @2/(byte) cnt#16 ) call inccnt @@ -27,6 +29,8 @@ main::@return: scope:[main] from main::@2 (byte) cnt#5 ← (byte) cnt#11 return to:@return + +(void()) inccnt() inccnt: scope:[inccnt] from main main::@1 (byte) cnt#12 ← phi( main/(byte) cnt#15 main::@1/(byte) cnt#2 ) (byte) cnt#6 ← ++ (byte) cnt#12 @@ -145,6 +149,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call inccnt @@ -161,6 +167,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [11] return to:@return + +(void()) inccnt() inccnt: scope:[inccnt] from main main::@1 [12] (byte) cnt#12 ← phi( main/(byte) 0 main::@1/(byte) cnt#2 ) [13] (byte) cnt#13 ← ++ (byte) cnt#12 diff --git a/src/test/ref/mul8u-min.cfg b/src/test/ref/mul8u-min.cfg index 7ceb61991..57ff29524 100644 --- a/src/test/ref/mul8u-min.cfg +++ b/src/test/ref/mul8u-min.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -37,6 +39,8 @@ main::@3: scope:[main] from main::@4 main::@return: scope:[main] from main::@3 [19] return to:@return + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from main::@2 [20] phi() to:mul8u::@1 diff --git a/src/test/ref/mul8u-min.log b/src/test/ref/mul8u-min.log index 2f908dae6..1bf51f3c4 100644 --- a/src/test/ref/mul8u-min.log +++ b/src/test/ref/mul8u-min.log @@ -13,6 +13,8 @@ Culled Empty Block (label) main::@4 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@6 + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from main::@2 (byte) mul8u::a#5 ← phi( main::@2/(byte) mul8u::a#1 ) (byte) mul8u::b#1 ← phi( main::@2/(byte) mul8u::b#0 ) @@ -60,6 +62,8 @@ mul8u::@return: scope:[mul8u] from mul8u::@3 (word) mul8u::return#1 ← (word) mul8u::return#3 return to:@return + +(void()) main() main: scope:[main] from @6 (word*) main::screen#0 ← ((word*)) (number) $400 (byte) main::i#0 ← (number) 0 @@ -335,6 +339,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -365,6 +371,8 @@ main::@3: scope:[main] from main::@4 main::@return: scope:[main] from main::@3 [19] return to:@return + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from main::@2 [20] phi() to:mul8u::@1 diff --git a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.cfg b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.cfg index 994a89577..85d70065f 100644 --- a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.cfg +++ b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.cfg @@ -25,6 +25,8 @@ to:@end @end: scope:[] from @5 [9] phi() + +(void()) main() main: scope:[main] from @5 asm { sei } [11] call init @@ -36,6 +38,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [14] return to:@return + +(void()) loop() loop: scope:[loop] from main::@1 [15] phi() to:loop::@1 @@ -73,6 +77,8 @@ loop::@6: scope:[loop] from loop::@5 [30] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f [31] *((const byte*) RASTER#0) ← (byte) 0 to:loop::@1 + +(void()) plexSort() plexSort: scope:[plexSort] from loop::@5 [32] phi() to:plexSort::@1 @@ -122,6 +128,8 @@ plexSort::plexFreePrepare1_@2: scope:[plexSort] from plexSort::plexFreePrepare1 plexSort::@return: scope:[plexSort] from plexSort::plexFreePrepare1_@2 [56] return to:@return + +(void()) init() init: scope:[init] from main [57] *((const byte*) D011#0) ← (const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [58] call plexInit @@ -156,6 +164,8 @@ init::@4: scope:[init] from init::@3 init::@return: scope:[init] from init::@4 [77] return to:@return + +(void()) plexInit((byte*) plexInit::screen) plexInit: scope:[plexInit] from init [78] phi() to:plexInit::plexSetScreen1 @@ -171,6 +181,8 @@ plexInit::@1: scope:[plexInit] from plexInit::@1 plexInit::plexSetScreen1 plexInit::@return: scope:[plexInit] from plexInit::@1 [84] return to:@return + +interrupt(KERNEL_MIN)(void()) plex_irq() plex_irq: scope:[plex_irq] from [85] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 to:plex_irq::@3 @@ -208,6 +220,8 @@ plex_irq::@return: scope:[plex_irq] from plex_irq::@2 plex_irq::@1: scope:[plex_irq] from plex_irq::@4 [98] *((const byte*) RASTER#0) ← (byte) plex_irq::plexFreeNextYpos1_return#0 to:plex_irq::@2 + +(void()) plexShowSprite() plexShowSprite: scope:[plexShowSprite] from plex_irq::@3 [99] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#25 << (byte) 1 [100] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte[PLEX_COUNT#0]) PLEX_YPOS#0 + *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plex_show_idx#27)) diff --git a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log index 7a821677b..d015e3721 100644 --- a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log +++ b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log @@ -73,6 +73,8 @@ CONTROL FLOW GRAPH SSA (byte) plex_sprite_idx#0 ← (number) 0 (byte) plex_sprite_msb#0 ← (number) 1 to:@9 + +(void()) plexInit((byte*) plexInit::screen) plexInit: scope:[plexInit] from init (byte*) plexInit::screen#1 ← phi( init/(byte*) plexInit::screen#0 ) (byte*) plexInit::plexSetScreen1_screen#0 ← (byte*) plexInit::screen#1 @@ -100,6 +102,8 @@ plexInit::@return: scope:[plexInit] from plexInit::@1 (byte*) PLEX_SCREEN_PTR#2 ← (byte*) PLEX_SCREEN_PTR#8 return to:@return + +(void()) plexSort() plexSort: scope:[plexSort] from loop::@11 (number~) plexSort::$1 ← (byte) PLEX_COUNT#0 - (number) 2 (byte) plexSort::m#0 ← (byte) 0 @@ -183,6 +187,8 @@ plexSort::@return: scope:[plexSort] from plexSort::plexFreePrepare1_@2 (byte) plex_free_next#1 ← (byte) plex_free_next#12 return to:@return + +(void()) plexShowSprite() plexShowSprite: scope:[plexShowSprite] from plex_irq::@3 (byte) plex_sprite_msb#44 ← phi( plex_irq::@3/(byte) plex_sprite_msb#28 ) (byte*) PLEX_SCREEN_PTR#23 ← phi( plex_irq::@3/(byte*) PLEX_SCREEN_PTR#26 ) @@ -300,6 +306,8 @@ plexShowSprite::@return: scope:[plexShowSprite] from plexShowSprite::@2 plexSho .byte round(min+(ampl/2)+(ampl/2)*sin(toRadians(360*i/256))) }} to:@14 + +(void()) main() main: scope:[main] from @16 (bool) framedone#18 ← phi( @16/(bool) framedone#17 ) (byte) plex_free_next#34 ← phi( @16/(byte) plex_free_next#31 ) @@ -348,6 +356,8 @@ main::@return: scope:[main] from main::@2 (bool) framedone#1 ← (bool) framedone#9 return to:@return + +(void()) init() init: scope:[init] from main (byte*) PLEX_SCREEN_PTR#19 ← phi( main/(byte*) PLEX_SCREEN_PTR#17 ) (byte~) init::$0 ← (byte) VIC_DEN#0 | (byte) VIC_RSEL#0 @@ -413,6 +423,8 @@ init::@return: scope:[init] from init::@4 (byte*) PLEX_SCREEN_PTR#25 ← phi( @12/(byte*) PLEX_SCREEN_PTR#28 ) (bool) framedone#2 ← true to:@16 + +interrupt(KERNEL_MIN)(void()) plex_irq() plex_irq: scope:[plex_irq] from (bool) framedone#27 ← phi( @16/(bool) framedone#17 ) (byte*) PLEX_SCREEN_PTR#31 ← phi( @16/(byte*) PLEX_SCREEN_PTR#21 ) @@ -527,6 +539,8 @@ plex_irq::@return: scope:[plex_irq] from plex_irq::@2 (bool) framedone#4 ← (bool) framedone#10 return to:@return + +(void()) loop() loop: scope:[loop] from main::@1 (byte) plex_free_next#39 ← phi( main::@1/(byte) plex_free_next#26 ) (byte) plex_sprite_msb#40 ← phi( main::@1/(byte) plex_sprite_msb#27 ) @@ -1941,6 +1955,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @5 [9] phi() + +(void()) main() main: scope:[main] from @5 asm { sei } [11] call init @@ -1952,6 +1968,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [14] return to:@return + +(void()) loop() loop: scope:[loop] from main::@1 [15] phi() to:loop::@1 @@ -1989,6 +2007,8 @@ loop::@6: scope:[loop] from loop::@5 [30] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f [31] *((const byte*) RASTER#0) ← (byte) 0 to:loop::@1 + +(void()) plexSort() plexSort: scope:[plexSort] from loop::@5 [32] phi() to:plexSort::@1 @@ -2038,6 +2058,8 @@ plexSort::plexFreePrepare1_@2: scope:[plexSort] from plexSort::plexFreePrepare1 plexSort::@return: scope:[plexSort] from plexSort::plexFreePrepare1_@2 [56] return to:@return + +(void()) init() init: scope:[init] from main [57] *((const byte*) D011#0) ← (const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [58] call plexInit @@ -2072,6 +2094,8 @@ init::@4: scope:[init] from init::@3 init::@return: scope:[init] from init::@4 [77] return to:@return + +(void()) plexInit((byte*) plexInit::screen) plexInit: scope:[plexInit] from init [78] phi() to:plexInit::plexSetScreen1 @@ -2087,6 +2111,8 @@ plexInit::@1: scope:[plexInit] from plexInit::@1 plexInit::plexSetScreen1 plexInit::@return: scope:[plexInit] from plexInit::@1 [84] return to:@return + +interrupt(KERNEL_MIN)(void()) plex_irq() plex_irq: scope:[plex_irq] from [85] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 to:plex_irq::@3 @@ -2124,6 +2150,8 @@ plex_irq::@return: scope:[plex_irq] from plex_irq::@2 plex_irq::@1: scope:[plex_irq] from plex_irq::@4 [98] *((const byte*) RASTER#0) ← (byte) plex_irq::plexFreeNextYpos1_return#0 to:plex_irq::@2 + +(void()) plexShowSprite() plexShowSprite: scope:[plexShowSprite] from plex_irq::@3 [99] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#25 << (byte) 1 [100] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte[PLEX_COUNT#0]) PLEX_YPOS#0 + *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plex_show_idx#27)) diff --git a/src/test/ref/multiply-2s.cfg b/src/test/ref/multiply-2s.cfg index 76f235411..2c806330c 100644 --- a/src/test/ref/multiply-2s.cfg +++ b/src/test/ref/multiply-2s.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/multiply-2s.log b/src/test/ref/multiply-2s.log index 1ea4552d7..dde8a0cbd 100644 --- a/src/test/ref/multiply-2s.log +++ b/src/test/ref/multiply-2s.log @@ -3,6 +3,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -190,6 +192,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/multiply-ns.cfg b/src/test/ref/multiply-ns.cfg index a993584cd..ae614be9c 100644 --- a/src/test/ref/multiply-ns.cfg +++ b/src/test/ref/multiply-ns.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/multiply-ns.log b/src/test/ref/multiply-ns.log index bea4efbb2..c59aa05b8 100644 --- a/src/test/ref/multiply-ns.log +++ b/src/test/ref/multiply-ns.log @@ -3,6 +3,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -350,6 +352,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/nes-array.cfg b/src/test/ref/nes-array.cfg index e2de90afb..97b60169b 100644 --- a/src/test/ref/nes-array.cfg +++ b/src/test/ref/nes-array.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (signed word) main::y1#0 ← (signed word) $1234 [5] (signed word) main::y2#0 ← (signed word) $1234 @@ -26,6 +28,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [14] return to:@return + +(signed word()) foo((byte) foo::x , (signed word*) foo::y) foo: scope:[foo] from main main::@1 [15] (signed word*) foo::y#2 ← phi( main/&(signed word) main::y1#0 main::@1/&(signed word) main::y2#0 ) [15] (byte) foo::x#2 ← phi( main/(byte) 1 main::@1/(byte) 2 ) diff --git a/src/test/ref/nes-array.log b/src/test/ref/nes-array.log index b42e90302..50c37e35c 100644 --- a/src/test/ref/nes-array.log +++ b/src/test/ref/nes-array.log @@ -10,6 +10,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (signed word[4]) wow#0 ← { (number) $cafe, (number) $babe, (number) $1234, (number) $5678 } to:@2 + +(signed word()) foo((byte) foo::x , (signed word*) foo::y) foo: scope:[foo] from main main::@1 (signed word*) foo::y#2 ← phi( main/(signed word*) foo::y#0 main::@1/(signed word*) foo::y#1 ) (byte) foo::x#2 ← phi( main/(byte) foo::x#0 main::@1/(byte) foo::x#1 ) @@ -22,6 +24,8 @@ foo::@return: scope:[foo] from foo (signed word) foo::return#1 ← (signed word) foo::return#4 return to:@return + +(void()) main() main: scope:[main] from @2 (signed word*) main::SCREEN#0 ← ((signed word*)) (number) $400 (signed word) main::y1#0 ← (number) $1234 @@ -204,6 +208,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (signed word) main::y1#0 ← (signed word) $1234 [5] (signed word) main::y2#0 ← (signed word) $1234 @@ -223,6 +229,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [14] return to:@return + +(signed word()) foo((byte) foo::x , (signed word*) foo::y) foo: scope:[foo] from main main::@1 [15] (signed word*) foo::y#2 ← phi( main/&(signed word) main::y1#0 main::@1/&(signed word) main::y2#0 ) [15] (byte) foo::x#2 ← phi( main/(byte) 1 main::@1/(byte) 2 ) diff --git a/src/test/ref/no-recursion-heavy.cfg b/src/test/ref/no-recursion-heavy.cfg index 80dfc52df..4c83177d0 100644 --- a/src/test/ref/no-recursion-heavy.cfg +++ b/src/test/ref/no-recursion-heavy.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -23,6 +25,8 @@ main::@2: scope:[main] from main::@1 main::@3: scope:[main] from main::@2 [8] (byte) ba#1 ← ++ (byte) ba#17 to:main::@1 + +(void()) f0() f0: scope:[f0] from main::@2 [9] if((byte) ba#17!=(byte) 0) goto f0::@1 to:f0::@10 @@ -135,6 +139,8 @@ f0::@return: scope:[f0] from f0::@19 f0::@9 [57] (byte) bb#13 ← phi( f0::@19/(byte) 0 f0::@9/(byte) bb#50 ) [58] return to:@return + +(void()) fa() fa: scope:[fa] from f0::@10 f0::@11 f0::@12 f0::@13 f0::@14 f0::@15 f0::@16 f0::@17 f0::@18 f0::@19 [59] (byte) bd#137 ← phi( f0::@10/(byte) bd#2 f0::@11/(byte) bd#129 f0::@12/(byte) bd#130 f0::@13/(byte) bd#131 f0::@14/(byte) bd#132 f0::@15/(byte) bd#133 f0::@16/(byte) bd#134 f0::@17/(byte) bd#135 f0::@18/(byte) bd#136 f0::@19/(byte) bd#93 ) [59] (byte) bc#39 ← phi( f0::@10/(byte) bc#2 f0::@11/(byte) bc#63 f0::@12/(byte) bc#64 f0::@13/(byte) bc#65 f0::@14/(byte) bc#66 f0::@15/(byte) bc#100 f0::@16/(byte) bc#101 f0::@17/(byte) bc#102 f0::@18/(byte) bc#103 f0::@19/(byte) bc#71 ) @@ -240,6 +246,8 @@ fa::@return: scope:[fa] from fa::@19 fa::@9 [108] (byte) bc#24 ← phi( fa::@19/(byte) 0 fa::@9/(byte) bc#83 ) [109] return to:@return + +(void()) fb() fb: scope:[fb] from fa::@10 fa::@11 fa::@12 fa::@13 fa::@14 fa::@15 fa::@16 fa::@17 fa::@18 fa::@19 [110] (byte) bd#106 ← phi( fa::@10/(byte) bd#137 fa::@11/(byte) bd#138 fa::@12/(byte) bd#139 fa::@13/(byte) bd#140 fa::@14/(byte) bd#141 fa::@15/(byte) bd#100 fa::@16/(byte) bd#101 fa::@17/(byte) bd#102 fa::@18/(byte) bd#103 fa::@19/(byte) bd#104 ) [110] (byte) bc#113 ← phi( fa::@10/(byte~) bc#172 fa::@11/(byte~) bc#173 fa::@12/(byte~) bc#174 fa::@13/(byte~) bc#175 fa::@14/(byte~) bc#176 fa::@15/(byte~) bc#177 fa::@16/(byte~) bc#178 fa::@17/(byte~) bc#179 fa::@18/(byte~) bc#180 fa::@19/(byte) 0 ) @@ -334,6 +342,8 @@ fb::@return: scope:[fb] from fb::@19 fb::@9 [159] (byte) bd#35 ← phi( fb::@19/(byte) 0 fb::@9/(byte) bd#116 ) [160] return to:@return + +(void()) fc() fc: scope:[fc] from fb::@10 fb::@11 fb::@12 fb::@13 fb::@14 fb::@15 fb::@16 fb::@17 fb::@18 fb::@19 [161] (byte) bd#117 ← phi( fb::@10/(byte~) bd#235 fb::@11/(byte~) bd#236 fb::@12/(byte~) bd#237 fb::@13/(byte~) bd#238 fb::@14/(byte~) bd#239 fb::@15/(byte~) bd#240 fb::@16/(byte~) bd#241 fb::@17/(byte~) bd#242 fb::@18/(byte~) bd#243 fb::@19/(byte) 0 ) [162] if((byte) bd#117!=(byte) 0) goto fc::@1 diff --git a/src/test/ref/no-recursion-heavy.log b/src/test/ref/no-recursion-heavy.log index 14d6cab02..4ceeb2b90 100644 --- a/src/test/ref/no-recursion-heavy.log +++ b/src/test/ref/no-recursion-heavy.log @@ -18,6 +18,8 @@ CONTROL FLOW GRAPH SSA (byte) bc#0 ← (number) 0 (byte) bd#0 ← (number) 0 to:@5 + +(void()) main() main: scope:[main] from @5 (byte) ba#29 ← phi( @5/(byte) ba#28 ) (byte) bd#127 ← phi( @5/(byte) bd#126 ) @@ -59,6 +61,8 @@ main::@return: scope:[main] from main::@1 (byte) ba#2 ← (byte) ba#5 return to:@return + +(void()) f0() f0: scope:[f0] from main::@2 (byte) bd#128 ← phi( main::@2/(byte) bd#82 ) (byte) bc#95 ← phi( main::@2/(byte) bc#60 ) @@ -315,6 +319,8 @@ f0::@return: scope:[f0] from f0::@30 f0::@9 (byte) bd#13 ← (byte) bd#49 return to:@return + +(void()) fa() fa: scope:[fa] from f0::@11 f0::@12 f0::@13 f0::@14 f0::@15 f0::@16 f0::@17 f0::@18 f0::@19 f0::@20 (byte) bd#137 ← phi( f0::@11/(byte) bd#84 f0::@12/(byte) bd#85 f0::@13/(byte) bd#86 f0::@14/(byte) bd#87 f0::@15/(byte) bd#88 f0::@16/(byte) bd#89 f0::@17/(byte) bd#90 f0::@18/(byte) bd#91 f0::@19/(byte) bd#92 f0::@20/(byte) bd#93 ) (byte) bc#73 ← phi( f0::@11/(byte) bc#62 f0::@12/(byte) bc#63 f0::@13/(byte) bc#64 f0::@14/(byte) bc#65 f0::@15/(byte) bc#66 f0::@16/(byte) bc#67 f0::@17/(byte) bc#68 f0::@18/(byte) bc#69 f0::@19/(byte) bc#70 f0::@20/(byte) bc#71 ) @@ -529,6 +535,8 @@ fa::@return: scope:[fa] from fa::@30 fa::@9 (byte) bd#24 ← (byte) bd#60 return to:@return + +(void()) fb() fb: scope:[fb] from fa::@11 fa::@12 fa::@13 fa::@14 fa::@15 fa::@16 fa::@17 fa::@18 fa::@19 fa::@20 (byte) bd#106 ← phi( fa::@11/(byte) bd#95 fa::@12/(byte) bd#96 fa::@13/(byte) bd#97 fa::@14/(byte) bd#98 fa::@15/(byte) bd#99 fa::@16/(byte) bd#100 fa::@17/(byte) bd#101 fa::@18/(byte) bd#102 fa::@19/(byte) bd#103 fa::@20/(byte) bd#104 ) (byte) bc#49 ← phi( fa::@11/(byte) bc#14 fa::@12/(byte) bc#15 fa::@13/(byte) bc#16 fa::@14/(byte) bc#17 fa::@15/(byte) bc#18 fa::@16/(byte) bc#19 fa::@17/(byte) bc#20 fa::@18/(byte) bc#21 fa::@19/(byte) bc#22 fa::@20/(byte) bc#23 ) @@ -701,6 +709,8 @@ fb::@return: scope:[fb] from fb::@30 fb::@9 (byte) bd#35 ← (byte) bd#70 return to:@return + +(void()) fc() fc: scope:[fc] from fb::@11 fb::@12 fb::@13 fb::@14 fb::@15 fb::@16 fb::@17 fb::@18 fb::@19 fb::@20 (byte) bd#71 ← phi( fb::@11/(byte) bd#25 fb::@12/(byte) bd#26 fb::@13/(byte) bd#27 fb::@14/(byte) bd#28 fb::@15/(byte) bd#29 fb::@16/(byte) bd#30 fb::@17/(byte) bd#31 fb::@18/(byte) bd#32 fb::@19/(byte) bd#33 fb::@20/(byte) bd#34 ) (bool~) fc::$0 ← (byte) bd#71 == (number) 0 @@ -2271,6 +2281,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -2287,6 +2299,8 @@ main::@2: scope:[main] from main::@1 main::@3: scope:[main] from main::@2 [8] (byte) ba#1 ← ++ (byte) ba#17 to:main::@1 + +(void()) f0() f0: scope:[f0] from main::@2 [9] if((byte) ba#17!=(byte) 0) goto f0::@1 to:f0::@10 @@ -2399,6 +2413,8 @@ f0::@return: scope:[f0] from f0::@19 f0::@9 [57] (byte) bb#13 ← phi( f0::@19/(byte) 0 f0::@9/(byte) bb#50 ) [58] return to:@return + +(void()) fa() fa: scope:[fa] from f0::@10 f0::@11 f0::@12 f0::@13 f0::@14 f0::@15 f0::@16 f0::@17 f0::@18 f0::@19 [59] (byte) bd#137 ← phi( f0::@10/(byte) bd#2 f0::@11/(byte) bd#129 f0::@12/(byte) bd#130 f0::@13/(byte) bd#131 f0::@14/(byte) bd#132 f0::@15/(byte) bd#133 f0::@16/(byte) bd#134 f0::@17/(byte) bd#135 f0::@18/(byte) bd#136 f0::@19/(byte) bd#93 ) [59] (byte) bc#39 ← phi( f0::@10/(byte) bc#2 f0::@11/(byte) bc#63 f0::@12/(byte) bc#64 f0::@13/(byte) bc#65 f0::@14/(byte) bc#66 f0::@15/(byte) bc#100 f0::@16/(byte) bc#101 f0::@17/(byte) bc#102 f0::@18/(byte) bc#103 f0::@19/(byte) bc#71 ) @@ -2504,6 +2520,8 @@ fa::@return: scope:[fa] from fa::@19 fa::@9 [108] (byte) bc#24 ← phi( fa::@19/(byte) 0 fa::@9/(byte) bc#83 ) [109] return to:@return + +(void()) fb() fb: scope:[fb] from fa::@10 fa::@11 fa::@12 fa::@13 fa::@14 fa::@15 fa::@16 fa::@17 fa::@18 fa::@19 [110] (byte) bd#106 ← phi( fa::@10/(byte) bd#137 fa::@11/(byte) bd#138 fa::@12/(byte) bd#139 fa::@13/(byte) bd#140 fa::@14/(byte) bd#141 fa::@15/(byte) bd#100 fa::@16/(byte) bd#101 fa::@17/(byte) bd#102 fa::@18/(byte) bd#103 fa::@19/(byte) bd#104 ) [110] (byte) bc#113 ← phi( fa::@10/(byte~) bc#172 fa::@11/(byte~) bc#173 fa::@12/(byte~) bc#174 fa::@13/(byte~) bc#175 fa::@14/(byte~) bc#176 fa::@15/(byte~) bc#177 fa::@16/(byte~) bc#178 fa::@17/(byte~) bc#179 fa::@18/(byte~) bc#180 fa::@19/(byte) 0 ) @@ -2598,6 +2616,8 @@ fb::@return: scope:[fb] from fb::@19 fb::@9 [159] (byte) bd#35 ← phi( fb::@19/(byte) 0 fb::@9/(byte) bd#116 ) [160] return to:@return + +(void()) fc() fc: scope:[fc] from fb::@10 fb::@11 fb::@12 fb::@13 fb::@14 fb::@15 fb::@16 fb::@17 fb::@18 fb::@19 [161] (byte) bd#117 ← phi( fb::@10/(byte~) bd#235 fb::@11/(byte~) bd#236 fb::@12/(byte~) bd#237 fb::@13/(byte~) bd#238 fb::@14/(byte~) bd#239 fb::@15/(byte~) bd#240 fb::@16/(byte~) bd#241 fb::@17/(byte~) bd#242 fb::@18/(byte~) bd#243 fb::@19/(byte) 0 ) [162] if((byte) bd#117!=(byte) 0) goto fc::@1 diff --git a/src/test/ref/noop-cast-elimination.cfg b/src/test/ref/noop-cast-elimination.cfg index 972c24592..762cf5800 100644 --- a/src/test/ref/noop-cast-elimination.cfg +++ b/src/test/ref/noop-cast-elimination.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/noop-cast-elimination.log b/src/test/ref/noop-cast-elimination.log index ba7fdd2ca..33068ba55 100644 --- a/src/test/ref/noop-cast-elimination.log +++ b/src/test/ref/noop-cast-elimination.log @@ -4,6 +4,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (signed word*) main::screen#0 ← ((signed word*)) (number) $400 (signed word) main::sw#0 ← (number) $1234 @@ -119,6 +121,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/norom-charset.cfg b/src/test/ref/norom-charset.cfg index 97c551389..da6cb4710 100644 --- a/src/test/ref/norom-charset.cfg +++ b/src/test/ref/norom-charset.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -31,6 +33,8 @@ main::@4: scope:[main] from main::@2 [13] (byte*) main::charset#1 ← (byte*) main::charset#2 + (byte) 8 [14] (byte) main::c#1 ← ++ (byte) main::c#2 to:main::@1 + +(void()) gen_char3((byte*) gen_char3::dst , (word) gen_char3::spec) gen_char3: scope:[gen_char3] from main::@2 [15] phi() to:gen_char3::@1 diff --git a/src/test/ref/norom-charset.log b/src/test/ref/norom-charset.log index 031abaf75..0e5d92445 100644 --- a/src/test/ref/norom-charset.log +++ b/src/test/ref/norom-charset.log @@ -15,6 +15,8 @@ CONTROL FLOW GRAPH SSA (byte*) CHARSET#0 ← ((byte*)) (number) $3000 (word[]) charset_spec_row#0 ← { (number) $f7da, (number) $f7de, (number) $f24e, (number) $d6de } to:@2 + +(void()) main() main: scope:[main] from @2 (byte*~) main::$0 ← (byte*) CHARSET#0 + (number) 8 (byte*) main::charset#0 ← (byte*~) main::$0 @@ -53,6 +55,8 @@ main::@3: scope:[main] from main::@1 main::@return: scope:[main] from main::@3 return to:@return + +(void()) gen_char3((byte*) gen_char3::dst , (word) gen_char3::spec) gen_char3: scope:[gen_char3] from main::@2 (byte*) gen_char3::dst#6 ← phi( main::@2/(byte*) gen_char3::dst#0 ) (word) gen_char3::spec#6 ← phi( main::@2/(word) gen_char3::spec#0 ) @@ -440,6 +444,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -464,6 +470,8 @@ main::@4: scope:[main] from main::@2 [13] (byte*) main::charset#1 ← (byte*) main::charset#2 + (byte) 8 [14] (byte) main::c#1 ← ++ (byte) main::c#2 to:main::@1 + +(void()) gen_char3((byte*) gen_char3::dst , (word) gen_char3::spec) gen_char3: scope:[gen_char3] from main::@2 [15] phi() to:gen_char3::@1 diff --git a/src/test/ref/number-conversion.cfg b/src/test/ref/number-conversion.cfg index 430ebad93..0ae6b54e9 100644 --- a/src/test/ref/number-conversion.cfg +++ b/src/test/ref/number-conversion.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call assertType @@ -150,6 +152,8 @@ main::@34: scope:[main] from main::@33 main::@return: scope:[main] from main::@34 [74] return to:@return + +(void()) assertType((byte) assertType::t1 , (byte) assertType::t2) assertType: scope:[assertType] from main main::@1 main::@10 main::@11 main::@12 main::@13 main::@14 main::@15 main::@16 main::@17 main::@18 main::@19 main::@2 main::@20 main::@21 main::@22 main::@23 main::@24 main::@25 main::@26 main::@27 main::@28 main::@29 main::@3 main::@30 main::@31 main::@32 main::@33 main::@34 main::@4 main::@5 main::@6 main::@7 main::@8 main::@9 [75] (byte) idx#79 ← phi( main/(byte) 0 main::@1/(byte) idx#40 main::@10/(byte) idx#40 main::@11/(byte) idx#40 main::@12/(byte) idx#40 main::@13/(byte) idx#40 main::@14/(byte) idx#40 main::@15/(byte) idx#40 main::@16/(byte) idx#40 main::@17/(byte) idx#40 main::@18/(byte) idx#40 main::@19/(byte) idx#40 main::@2/(byte) idx#40 main::@20/(byte) idx#40 main::@21/(byte) $50 main::@22/(byte) idx#40 main::@23/(byte) idx#40 main::@24/(byte) idx#40 main::@25/(byte) idx#40 main::@26/(byte) idx#40 main::@27/(byte) idx#40 main::@28/(byte) idx#40 main::@29/(byte) idx#40 main::@3/(byte) idx#40 main::@30/(byte) idx#40 main::@31/(byte) idx#40 main::@32/(byte) idx#40 main::@33/(byte) idx#40 main::@34/(byte) idx#40 main::@4/(byte) idx#40 main::@5/(byte) idx#40 main::@6/(byte) idx#40 main::@7/(byte) idx#40 main::@8/(byte) idx#40 main::@9/(byte) $28 ) [75] (byte) assertType::t2#35 ← phi( main/(const byte) TYPEID_SIGNED_BYTE main::@1/(const byte) TYPEID_SIGNED_WORD main::@10/(const byte) TYPEID_BYTE main::@11/(const byte) TYPEID_WORD main::@12/(const byte) TYPEID_WORD main::@13/(const byte) TYPEID_DWORD main::@14/(const byte) TYPEID_WORD main::@15/(const byte) TYPEID_WORD main::@16/(const byte) TYPEID_DWORD main::@17/(const byte) TYPEID_DWORD main::@18/(const byte) TYPEID_DWORD main::@19/(const byte) TYPEID_DWORD main::@2/(const byte) TYPEID_SIGNED_DWORD main::@20/(const byte) TYPEID_DWORD main::@21/(const byte) TYPEID_BYTE main::@22/(const byte) TYPEID_BYTE main::@23/(const byte) TYPEID_BYTE main::@24/(const byte) TYPEID_WORD main::@25/(const byte) TYPEID_WORD main::@26/(const byte) TYPEID_DWORD main::@27/(const byte) TYPEID_WORD main::@28/(const byte) TYPEID_WORD main::@29/(const byte) TYPEID_WORD main::@3/(const byte) TYPEID_SIGNED_WORD main::@30/(const byte) TYPEID_DWORD main::@31/(const byte) TYPEID_DWORD main::@32/(const byte) TYPEID_DWORD main::@33/(const byte) TYPEID_DWORD main::@34/(const byte) TYPEID_DWORD main::@4/(const byte) TYPEID_SIGNED_WORD main::@5/(const byte) TYPEID_SIGNED_DWORD main::@6/(const byte) TYPEID_SIGNED_DWORD main::@7/(const byte) TYPEID_SIGNED_DWORD main::@8/(const byte) TYPEID_SIGNED_DWORD main::@9/(const byte) TYPEID_BYTE ) diff --git a/src/test/ref/number-conversion.log b/src/test/ref/number-conversion.log index 34407e107..58df1be52 100644 --- a/src/test/ref/number-conversion.log +++ b/src/test/ref/number-conversion.log @@ -6,6 +6,8 @@ Culled Empty Block (label) assertType::@4 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @2 (byte) idx#0 ← (byte) 0 (byte~) main::$0 ← typeid (signed byte) $c+(number) $c @@ -303,6 +305,8 @@ main::@return: scope:[main] from main::@35 (byte*) COLS#0 ← ((byte*)) (word) $d800 (byte) idx#39 ← (byte) 0 to:@2 + +(void()) assertType((byte) assertType::t1 , (byte) assertType::t2) assertType: scope:[assertType] from main main::@1 main::@10 main::@11 main::@12 main::@13 main::@14 main::@15 main::@16 main::@17 main::@18 main::@19 main::@2 main::@20 main::@21 main::@22 main::@23 main::@24 main::@25 main::@26 main::@27 main::@28 main::@29 main::@3 main::@30 main::@31 main::@32 main::@33 main::@34 main::@4 main::@5 main::@6 main::@7 main::@8 main::@9 (byte) idx#84 ← phi( main/(byte) idx#0 main::@1/(byte) idx#1 main::@10/(byte) idx#11 main::@11/(byte) idx#12 main::@12/(byte) idx#13 main::@13/(byte) idx#14 main::@14/(byte) idx#15 main::@15/(byte) idx#16 main::@16/(byte) idx#17 main::@17/(byte) idx#18 main::@18/(byte) idx#19 main::@19/(byte) idx#20 main::@2/(byte) idx#2 main::@20/(byte) idx#21 main::@21/(byte) idx#23 main::@22/(byte) idx#24 main::@23/(byte) idx#25 main::@24/(byte) idx#26 main::@25/(byte) idx#27 main::@26/(byte) idx#28 main::@27/(byte) idx#29 main::@28/(byte) idx#30 main::@29/(byte) idx#31 main::@3/(byte) idx#3 main::@30/(byte) idx#32 main::@31/(byte) idx#33 main::@32/(byte) idx#34 main::@33/(byte) idx#35 main::@34/(byte) idx#36 main::@4/(byte) idx#4 main::@5/(byte) idx#5 main::@6/(byte) idx#6 main::@7/(byte) idx#7 main::@8/(byte) idx#8 main::@9/(byte) idx#10 ) (byte) assertType::t2#35 ← phi( main/(byte) assertType::t2#0 main::@1/(byte) assertType::t2#1 main::@10/(byte) assertType::t2#10 main::@11/(byte) assertType::t2#11 main::@12/(byte) assertType::t2#12 main::@13/(byte) assertType::t2#13 main::@14/(byte) assertType::t2#14 main::@15/(byte) assertType::t2#15 main::@16/(byte) assertType::t2#16 main::@17/(byte) assertType::t2#17 main::@18/(byte) assertType::t2#18 main::@19/(byte) assertType::t2#19 main::@2/(byte) assertType::t2#2 main::@20/(byte) assertType::t2#20 main::@21/(byte) assertType::t2#21 main::@22/(byte) assertType::t2#22 main::@23/(byte) assertType::t2#23 main::@24/(byte) assertType::t2#24 main::@25/(byte) assertType::t2#25 main::@26/(byte) assertType::t2#26 main::@27/(byte) assertType::t2#27 main::@28/(byte) assertType::t2#28 main::@29/(byte) assertType::t2#29 main::@3/(byte) assertType::t2#3 main::@30/(byte) assertType::t2#30 main::@31/(byte) assertType::t2#31 main::@32/(byte) assertType::t2#32 main::@33/(byte) assertType::t2#33 main::@34/(byte) assertType::t2#34 main::@4/(byte) assertType::t2#4 main::@5/(byte) assertType::t2#5 main::@6/(byte) assertType::t2#6 main::@7/(byte) assertType::t2#7 main::@8/(byte) assertType::t2#8 main::@9/(byte) assertType::t2#9 ) @@ -1200,6 +1204,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call assertType @@ -1343,6 +1349,8 @@ main::@34: scope:[main] from main::@33 main::@return: scope:[main] from main::@34 [74] return to:@return + +(void()) assertType((byte) assertType::t1 , (byte) assertType::t2) assertType: scope:[assertType] from main main::@1 main::@10 main::@11 main::@12 main::@13 main::@14 main::@15 main::@16 main::@17 main::@18 main::@19 main::@2 main::@20 main::@21 main::@22 main::@23 main::@24 main::@25 main::@26 main::@27 main::@28 main::@29 main::@3 main::@30 main::@31 main::@32 main::@33 main::@34 main::@4 main::@5 main::@6 main::@7 main::@8 main::@9 [75] (byte) idx#79 ← phi( main/(byte) 0 main::@1/(byte) idx#40 main::@10/(byte) idx#40 main::@11/(byte) idx#40 main::@12/(byte) idx#40 main::@13/(byte) idx#40 main::@14/(byte) idx#40 main::@15/(byte) idx#40 main::@16/(byte) idx#40 main::@17/(byte) idx#40 main::@18/(byte) idx#40 main::@19/(byte) idx#40 main::@2/(byte) idx#40 main::@20/(byte) idx#40 main::@21/(byte) $50 main::@22/(byte) idx#40 main::@23/(byte) idx#40 main::@24/(byte) idx#40 main::@25/(byte) idx#40 main::@26/(byte) idx#40 main::@27/(byte) idx#40 main::@28/(byte) idx#40 main::@29/(byte) idx#40 main::@3/(byte) idx#40 main::@30/(byte) idx#40 main::@31/(byte) idx#40 main::@32/(byte) idx#40 main::@33/(byte) idx#40 main::@34/(byte) idx#40 main::@4/(byte) idx#40 main::@5/(byte) idx#40 main::@6/(byte) idx#40 main::@7/(byte) idx#40 main::@8/(byte) idx#40 main::@9/(byte) $28 ) [75] (byte) assertType::t2#35 ← phi( main/(const byte) TYPEID_SIGNED_BYTE main::@1/(const byte) TYPEID_SIGNED_WORD main::@10/(const byte) TYPEID_BYTE main::@11/(const byte) TYPEID_WORD main::@12/(const byte) TYPEID_WORD main::@13/(const byte) TYPEID_DWORD main::@14/(const byte) TYPEID_WORD main::@15/(const byte) TYPEID_WORD main::@16/(const byte) TYPEID_DWORD main::@17/(const byte) TYPEID_DWORD main::@18/(const byte) TYPEID_DWORD main::@19/(const byte) TYPEID_DWORD main::@2/(const byte) TYPEID_SIGNED_DWORD main::@20/(const byte) TYPEID_DWORD main::@21/(const byte) TYPEID_BYTE main::@22/(const byte) TYPEID_BYTE main::@23/(const byte) TYPEID_BYTE main::@24/(const byte) TYPEID_WORD main::@25/(const byte) TYPEID_WORD main::@26/(const byte) TYPEID_DWORD main::@27/(const byte) TYPEID_WORD main::@28/(const byte) TYPEID_WORD main::@29/(const byte) TYPEID_WORD main::@3/(const byte) TYPEID_SIGNED_WORD main::@30/(const byte) TYPEID_DWORD main::@31/(const byte) TYPEID_DWORD main::@32/(const byte) TYPEID_DWORD main::@33/(const byte) TYPEID_DWORD main::@34/(const byte) TYPEID_DWORD main::@4/(const byte) TYPEID_SIGNED_WORD main::@5/(const byte) TYPEID_SIGNED_DWORD main::@6/(const byte) TYPEID_SIGNED_DWORD main::@7/(const byte) TYPEID_SIGNED_DWORD main::@8/(const byte) TYPEID_SIGNED_DWORD main::@9/(const byte) TYPEID_BYTE ) diff --git a/src/test/ref/number-inference-sum.cfg b/src/test/ref/number-inference-sum.cfg index 35288c24d..26a51300c 100644 --- a/src/test/ref/number-inference-sum.cfg +++ b/src/test/ref/number-inference-sum.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const word*) main::screen#0) ← (const word) main::w#0 to:main::@1 diff --git a/src/test/ref/number-inference-sum.log b/src/test/ref/number-inference-sum.log index 4791cb109..909b16417 100644 --- a/src/test/ref/number-inference-sum.log +++ b/src/test/ref/number-inference-sum.log @@ -5,6 +5,8 @@ Culled Empty Block (label) main::@1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (word*) main::screen#0 ← ((word*)) (number) $400 (byte*) main::bgcol#0 ← ((byte*)) (number) $d020 @@ -151,6 +153,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const word*) main::screen#0) ← (const word) main::w#0 to:main::@1 diff --git a/src/test/ref/number-type.cfg b/src/test/ref/number-type.cfg index 3877d37fd..ec5cd156b 100644 --- a/src/test/ref/number-type.cfg +++ b/src/test/ref/number-type.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call testBytes @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) testSBytes() testSBytes: scope:[testSBytes] from main::@1 [9] *((const signed byte*) testSBytes::SCREEN#0) ← (signed byte) -$c [10] *((const signed byte*) testSBytes::SCREEN#0+(byte) 1) ← (signed byte)(number) -6-(number) 6 @@ -35,6 +39,8 @@ testSBytes: scope:[testSBytes] from main::@1 testSBytes::@return: scope:[testSBytes] from testSBytes [21] return to:@return + +(void()) testBytes() testBytes: scope:[testBytes] from main [22] *((const byte*) testBytes::SCREEN#0) ← (byte) $c [23] *((const byte*) testBytes::SCREEN#0+(byte) 1) ← (byte)(number) 6+(number) 6 diff --git a/src/test/ref/number-type.log b/src/test/ref/number-type.log index df2d1c1bd..773cc2a5e 100644 --- a/src/test/ref/number-type.log +++ b/src/test/ref/number-type.log @@ -4,6 +4,8 @@ Culled Empty Block (label) @2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@3 + +(void()) main() main: scope:[main] from @3 call testBytes to:main::@1 @@ -15,6 +17,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 return to:@return + +(void()) testBytes() testBytes: scope:[testBytes] from main (byte*) testBytes::SCREEN#0 ← ((byte*)) (number) $400 (byte) testBytes::idx#0 ← (number) 0 @@ -49,6 +53,8 @@ testBytes: scope:[testBytes] from main testBytes::@return: scope:[testBytes] from testBytes return to:@return + +(void()) testSBytes() testSBytes: scope:[testSBytes] from main::@1 (signed byte*) testSBytes::SCREEN#0 ← ((signed byte*)) (number) $428 (byte) testSBytes::idx#0 ← (number) 0 @@ -467,6 +473,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call testBytes @@ -478,6 +486,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) testSBytes() testSBytes: scope:[testSBytes] from main::@1 [9] *((const signed byte*) testSBytes::SCREEN#0) ← (signed byte) -$c [10] *((const signed byte*) testSBytes::SCREEN#0+(byte) 1) ← (signed byte)(number) -6-(number) 6 @@ -495,6 +505,8 @@ testSBytes: scope:[testSBytes] from main::@1 testSBytes::@return: scope:[testSBytes] from testSBytes [21] return to:@return + +(void()) testBytes() testBytes: scope:[testBytes] from main [22] *((const byte*) testBytes::SCREEN#0) ← (byte) $c [23] *((const byte*) testBytes::SCREEN#0+(byte) 1) ← (byte)(number) 6+(number) 6 diff --git a/src/test/ref/operator-lohi-problem-1.cfg b/src/test/ref/operator-lohi-problem-1.cfg index 1191d9575..1d530338a 100644 --- a/src/test/ref/operator-lohi-problem-1.cfg +++ b/src/test/ref/operator-lohi-problem-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← <(word)(const dword) DVAL#0/(word) $400 [5] *((const byte*) SCREEN#0+(byte) 1) ← (byte) 0 diff --git a/src/test/ref/operator-lohi-problem-1.log b/src/test/ref/operator-lohi-problem-1.log index 0ed9002a7..d74615b58 100644 --- a/src/test/ref/operator-lohi-problem-1.log +++ b/src/test/ref/operator-lohi-problem-1.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA (dword) DVAL#0 ← (number) $20000 (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (number~) main::$0 ← (dword) DVAL#0 / (number) $400 (word~) main::$1 ← ((word)) (number~) main::$0 @@ -130,6 +132,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← <(word)(const dword) DVAL#0/(word) $400 [5] *((const byte*) SCREEN#0+(byte) 1) ← (byte) 0 diff --git a/src/test/ref/operator-lohi-problem.cfg b/src/test/ref/operator-lohi-problem.cfg index a15f8427e..0ac3ad911 100644 --- a/src/test/ref/operator-lohi-problem.cfg +++ b/src/test/ref/operator-lohi-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) 0 [5] *((const byte*) SCREEN#0+(byte) 1) ← (byte) 0 diff --git a/src/test/ref/operator-lohi-problem.log b/src/test/ref/operator-lohi-problem.log index af5816c1c..f226bfcd0 100644 --- a/src/test/ref/operator-lohi-problem.log +++ b/src/test/ref/operator-lohi-problem.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (dword) main::dw#0 ← (number) $2000 (word~) main::$0 ← < (dword) main::dw#0 @@ -151,6 +153,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) 0 [5] *((const byte*) SCREEN#0+(byte) 1) ← (byte) 0 diff --git a/src/test/ref/optimize-unsigned-comparisons.cfg b/src/test/ref/optimize-unsigned-comparisons.cfg index 8e8f08fa8..3b3956503 100644 --- a/src/test/ref/optimize-unsigned-comparisons.cfg +++ b/src/test/ref/optimize-unsigned-comparisons.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/optimize-unsigned-comparisons.log b/src/test/ref/optimize-unsigned-comparisons.log index b439763a7..f562900da 100644 --- a/src/test/ref/optimize-unsigned-comparisons.log +++ b/src/test/ref/optimize-unsigned-comparisons.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte[8]) ball_active#0 ← { (number) 0, (number) 1, (number) 0, (number) 1, (number) 0, (number) 1, (number) 1, (number) 1 } to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte) main::temp#0 ← (byte) 0 @@ -180,6 +182,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/overlap-allocation-2.cfg b/src/test/ref/overlap-allocation-2.cfg index 49c02a4f2..ac4054e94 100644 --- a/src/test/ref/overlap-allocation-2.cfg +++ b/src/test/ref/overlap-allocation-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -31,6 +33,8 @@ main::@4: scope:[main] from main::@2 main::@return: scope:[main] from main::@4 [15] return to:@return + +(void()) line((byte) line::l) line: scope:[line] from main::@1 main::@2 [16] (byte) line::l#2 ← phi( main::@1/(byte) line::l#0 main::@2/(byte) line::l#1 ) [17] (byte) plot::x#0 ← (byte) line::l#2 @@ -43,6 +47,8 @@ line::@1: scope:[line] from line line::@return: scope:[line] from line::@1 [21] return to:@return + +(void()) plot((byte) plot::x) plot: scope:[plot] from line line::@1 [22] (byte) plot::x#2 ← phi( line/(byte) plot::x#0 line::@1/(byte) plot::x#1 ) [23] *((const byte*) SCREEN#0 + (byte) plot::x#2) ← (byte) '*' diff --git a/src/test/ref/overlap-allocation-2.log b/src/test/ref/overlap-allocation-2.log index 2b10b1ff3..7dd448bde 100644 --- a/src/test/ref/overlap-allocation-2.log +++ b/src/test/ref/overlap-allocation-2.log @@ -7,6 +7,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@3 + +(void()) main() main: scope:[main] from @3 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -38,6 +40,8 @@ main::@6: scope:[main] from main::@3 main::@return: scope:[main] from main::@6 return to:@return + +(void()) line((byte) line::l) line: scope:[line] from main::@1 main::@3 (byte) line::l#2 ← phi( main::@1/(byte) line::l#0 main::@3/(byte) line::l#1 ) (byte) plot::x#0 ← (byte) line::l#2 @@ -54,6 +58,8 @@ line::@2: scope:[line] from line::@1 line::@return: scope:[line] from line::@2 return to:@return + +(void()) plot((byte) plot::x) plot: scope:[plot] from line line::@1 (byte) plot::x#2 ← phi( line/(byte) plot::x#0 line::@1/(byte) plot::x#1 ) *((byte*) SCREEN#0 + (byte) plot::x#2) ← (byte) '*' @@ -198,6 +204,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -222,6 +230,8 @@ main::@4: scope:[main] from main::@2 main::@return: scope:[main] from main::@4 [15] return to:@return + +(void()) line((byte) line::l) line: scope:[line] from main::@1 main::@2 [16] (byte) line::l#2 ← phi( main::@1/(byte) line::l#0 main::@2/(byte) line::l#1 ) [17] (byte) plot::x#0 ← (byte) line::l#2 @@ -234,6 +244,8 @@ line::@1: scope:[line] from line line::@return: scope:[line] from line::@1 [21] return to:@return + +(void()) plot((byte) plot::x) plot: scope:[plot] from line line::@1 [22] (byte) plot::x#2 ← phi( line/(byte) plot::x#0 line::@1/(byte) plot::x#1 ) [23] *((const byte*) SCREEN#0 + (byte) plot::x#2) ← (byte) '*' diff --git a/src/test/ref/overlap-allocation.cfg b/src/test/ref/overlap-allocation.cfg index a760b3635..5468ab1ba 100644 --- a/src/test/ref/overlap-allocation.cfg +++ b/src/test/ref/overlap-allocation.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -40,6 +42,8 @@ main::@6: scope:[main] from main::@3 main::@return: scope:[main] from main::@6 [20] return to:@return + +(void()) plot((byte) plot::x) plot: scope:[plot] from main::@1 main::@2 main::@3 [21] (byte) plot::x#3 ← phi( main::@1/(byte) plot::x#0 main::@2/(byte) plot::x#1 main::@3/(byte) plot::x#2 ) [22] *((const byte*) SCREEN#0 + (byte) plot::x#3) ← (byte) '*' diff --git a/src/test/ref/overlap-allocation.log b/src/test/ref/overlap-allocation.log index 2fe95f98b..032b9aeb8 100644 --- a/src/test/ref/overlap-allocation.log +++ b/src/test/ref/overlap-allocation.log @@ -6,6 +6,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@2 + +(void()) main() main: scope:[main] from @2 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -51,6 +53,8 @@ main::@9: scope:[main] from main::@5 main::@return: scope:[main] from main::@9 return to:@return + +(void()) plot((byte) plot::x) plot: scope:[plot] from main::@1 main::@3 main::@5 (byte) plot::x#3 ← phi( main::@1/(byte) plot::x#0 main::@3/(byte) plot::x#1 main::@5/(byte) plot::x#2 ) *((byte*) SCREEN#0 + (byte) plot::x#3) ← (byte) '*' @@ -199,6 +203,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -232,6 +238,8 @@ main::@6: scope:[main] from main::@3 main::@return: scope:[main] from main::@6 [20] return to:@return + +(void()) plot((byte) plot::x) plot: scope:[plot] from main::@1 main::@2 main::@3 [21] (byte) plot::x#3 ← phi( main::@1/(byte) plot::x#0 main::@2/(byte) plot::x#1 main::@3/(byte) plot::x#2 ) [22] *((const byte*) SCREEN#0 + (byte) plot::x#3) ← (byte) '*' diff --git a/src/test/ref/parse-negated-struct-ref.cfg b/src/test/ref/parse-negated-struct-ref.cfg index ae3412a19..ee925da31 100644 --- a/src/test/ref/parse-negated-struct-ref.cfg +++ b/src/test/ref/parse-negated-struct-ref.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] if((byte) 0!=*((byte*)(const struct A*) main::a#0)) goto main::@1 to:main::@2 diff --git a/src/test/ref/parse-negated-struct-ref.log b/src/test/ref/parse-negated-struct-ref.log index 882d3eab5..405d02732 100644 --- a/src/test/ref/parse-negated-struct-ref.log +++ b/src/test/ref/parse-negated-struct-ref.log @@ -11,6 +11,8 @@ CONTROL FLOW GRAPH SSA (byte) aa_b#0 ← (number) 1 (struct A) aa#0 ← struct-unwound {(byte) aa_b#0} to:@1 + +(void()) main() main: scope:[main] from @1 (struct A) aa#1 ← phi( @1/(struct A) aa#2 ) (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 @@ -129,6 +131,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] if((byte) 0!=*((byte*)(const struct A*) main::a#0)) goto main::@1 to:main::@2 diff --git a/src/test/ref/plasma-center.cfg b/src/test/ref/plasma-center.cfg index 9f62c7dfb..6a7cc88a3 100644 --- a/src/test/ref/plasma-center.cfg +++ b/src/test/ref/plasma-center.cfg @@ -18,6 +18,8 @@ to:@end @end: scope:[] from @2 [8] phi() + +(void()) main() main: scope:[main] from @2 [9] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 [10] call init_dist_screen @@ -55,6 +57,8 @@ main::toD0182: scope:[main] from main::@3 main::@4: scope:[main] from main::toD0182 [24] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 to:main::@1 + +(void()) doplasma((byte*) doplasma::screen) doplasma: scope:[doplasma] from main::@2 main::@3 [25] (byte*) doplasma::screen#6 ← phi( main::@2/(const byte*) SCREEN1#0 main::@3/(const byte*) SCREEN2#0 ) [25] (byte) sin_offset_y#10 ← phi( main::@2/(byte) sin_offset_y#14 main::@3/(byte) sin_offset_y#12 ) @@ -91,6 +95,8 @@ doplasma::@4: scope:[doplasma] from doplasma::@3 doplasma::@return: scope:[doplasma] from doplasma::@4 [43] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main::@7 print_cls [44] (byte) memset::c#4 ← phi( main::@7/(const byte) BLACK#0 print_cls/(byte) ' ' ) [44] (void*) memset::str#3 ← phi( main::@7/(void*)(const byte*) COLS#0 print_cls/(void*)(const byte*) print_line_cursor#0 ) @@ -110,6 +116,8 @@ memset::@3: scope:[memset] from memset::@2 [50] *((byte*) memset::dst#2) ← (byte) memset::c#4 [51] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) make_plasma_charset((byte*) make_plasma_charset::charset) make_plasma_charset: scope:[make_plasma_charset] from main::@6 [52] phi() [53] call sid_rnd_init @@ -175,12 +183,16 @@ make_plasma_charset::@8: scope:[make_plasma_charset] from make_plasma_charset:: [83] (byte) make_plasma_charset::b#6 ← phi( make_plasma_charset::@9/(byte) make_plasma_charset::b#1 make_plasma_charset::@13/(byte) make_plasma_charset::b#2 ) [84] (byte) make_plasma_charset::ii#1 ← ++ (byte) make_plasma_charset::ii#2 to:make_plasma_charset::@5 + +(byte()) sid_rnd() sid_rnd: scope:[sid_rnd] from make_plasma_charset::@6 [85] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) to:sid_rnd::@return sid_rnd::@return: scope:[sid_rnd] from sid_rnd [86] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from make_plasma_charset::@10 [87] *((byte*) print_char_cursor#18) ← (const byte) print_char::ch#0 [88] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#18 @@ -188,6 +200,8 @@ print_char: scope:[print_char] from make_plasma_charset::@10 print_char::@return: scope:[print_char] from print_char [89] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from make_plasma_charset::@12 [90] phi() [91] call memset @@ -195,6 +209,8 @@ print_cls: scope:[print_cls] from make_plasma_charset::@12 print_cls::@return: scope:[print_cls] from print_cls [92] return to:@return + +(void()) sid_rnd_init() sid_rnd_init: scope:[sid_rnd_init] from make_plasma_charset [93] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff [94] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 @@ -202,6 +218,8 @@ sid_rnd_init: scope:[sid_rnd_init] from make_plasma_charset sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init [95] return to:@return + +(void()) init_angle_screen((byte*) init_angle_screen::screen) init_angle_screen: scope:[init_angle_screen] from main::@5 [96] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [97] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c @@ -250,6 +268,8 @@ init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@3 [125] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 [126] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 to:init_angle_screen::@2 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from init_angle_screen::@3 [127] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 to:atan2_16::@2 @@ -347,6 +367,8 @@ atan2_16::@4: scope:[atan2_16] from atan2_16::@3 atan2_16::@1: scope:[atan2_16] from atan2_16 [169] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 + +(void()) init_dist_screen((byte*) init_dist_screen::screen) init_dist_screen: scope:[init_dist_screen] from main [170] phi() [171] call init_squares @@ -422,6 +444,8 @@ init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 [209] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 to:init_dist_screen::@4 + +(byte()) sqrt((word) sqrt::val) sqrt: scope:[sqrt] from init_dist_screen::@13 [210] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [211] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 @@ -437,6 +461,8 @@ sqrt::@1: scope:[sqrt] from sqrt sqrt::@return: scope:[sqrt] from sqrt::@1 [218] return to:@return + +(word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) bsearch16u: scope:[bsearch16u] from sqrt [219] phi() to:bsearch16u::@3 @@ -480,6 +506,8 @@ bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 [236] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) [237] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 to:bsearch16u::@3 + +(word()) sqr((byte) sqr::val) sqr: scope:[sqr] from init_dist_screen::@10 init_dist_screen::@4 [238] (byte) sqr::val#2 ← phi( init_dist_screen::@10/(byte) sqr::val#1 init_dist_screen::@4/(byte) sqr::val#0 ) [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 @@ -488,6 +516,8 @@ sqr: scope:[sqr] from init_dist_screen::@10 init_dist_screen::@4 sqr::@return: scope:[sqr] from sqr [241] return to:@return + +(void()) init_squares() init_squares: scope:[init_squares] from init_dist_screen [242] phi() [243] call malloc @@ -511,6 +541,8 @@ init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@2 init_squares::@return: scope:[init_squares] from init_squares::@1 [254] return to:@return + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from @1 @3 init_squares [255] (word) malloc::size#3 ← phi( @1/(word) $3e8 @3/(word) $3e8 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD ) [255] (byte*) heap_head#12 ← phi( @1/(const byte*) HEAP_TOP#0 @3/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) diff --git a/src/test/ref/plasma-center.log b/src/test/ref/plasma-center.log index d7f0fd94e..f24cebcee 100644 --- a/src/test/ref/plasma-center.log +++ b/src/test/ref/plasma-center.log @@ -127,6 +127,8 @@ CONTROL FLOW GRAPH SSA (byte*) COLS#0 ← ((byte*)) (number) $d800 (byte) BLACK#0 ← (number) 0 to:@8 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main::@11 print_cls (byte) memset::c#5 ← phi( main::@11/(byte) memset::c#1 print_cls/(byte) memset::c#0 ) (void*) memset::str#4 ← phi( main::@11/(void*) memset::str#1 print_cls/(void*) memset::str#0 ) @@ -173,6 +175,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) HEAP_TOP#0 ← ((byte*)) (number) $a000 (byte*) heap_head#0 ← (byte*) HEAP_TOP#0 to:@16 + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from @47 @53 init_squares (word) malloc::size#3 ← phi( @47/(word) malloc::size#1 @53/(word) malloc::size#2 init_squares/(word) malloc::size#0 ) (byte*) heap_head#12 ← phi( @47/(byte*) heap_head#23 @53/(byte*) heap_head#5 init_squares/(byte*) heap_head#24 ) @@ -188,6 +192,8 @@ malloc::@return: scope:[malloc] from malloc (byte*) heap_head#2 ← (byte*) heap_head#13 return to:@return + +(word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) bsearch16u: scope:[bsearch16u] from sqrt (word) bsearch16u::key#4 ← phi( sqrt/(word) bsearch16u::key#0 ) (word*) bsearch16u::items#7 ← phi( sqrt/(word*) bsearch16u::items#1 ) @@ -275,6 +281,8 @@ bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2 (byte) NUM_SQUARES#0 ← (number) $ff (word*) SQUARES#0 ← (word*) 0 to:@19 + +(void()) init_squares() init_squares: scope:[init_squares] from init_dist_screen (byte*) heap_head#24 ← phi( init_dist_screen/(byte*) heap_head#28 ) (byte) NUM_SQUARES#6 ← phi( init_dist_screen/(byte) NUM_SQUARES#3 ) @@ -317,6 +325,8 @@ init_squares::@return: scope:[init_squares] from init_squares::@1 (word*) SQUARES#2 ← (word*) SQUARES#8 return to:@return + +(word()) sqr((byte) sqr::val) sqr: scope:[sqr] from init_dist_screen::@10 init_dist_screen::@4 (word*) SQUARES#9 ← phi( init_dist_screen::@10/(word*) SQUARES#18 init_dist_screen::@4/(word*) SQUARES#19 ) (byte) sqr::val#2 ← phi( init_dist_screen::@10/(byte) sqr::val#1 init_dist_screen::@4/(byte) sqr::val#0 ) @@ -328,6 +338,8 @@ sqr::@return: scope:[sqr] from sqr (word) sqr::return#1 ← (word) sqr::return#4 return to:@return + +(byte()) sqrt((word) sqrt::val) sqrt: scope:[sqrt] from init_dist_screen::@21 (byte) NUM_SQUARES#8 ← phi( init_dist_screen::@21/(byte) NUM_SQUARES#13 ) (word*) SQUARES#10 ← phi( init_dist_screen::@21/(word*) SQUARES#20 ) @@ -363,6 +375,8 @@ sqrt::@return: scope:[sqrt] from sqrt::@2 .word 256*2*256*atan(1/pow(2,i))/PI/2 }} to:@21 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from init_angle_screen::@3 (signed word) atan2_16::x#9 ← phi( init_angle_screen::@3/(signed word) atan2_16::x#0 ) (signed word) atan2_16::y#1 ← phi( init_angle_screen::@3/(signed word) atan2_16::y#0 ) @@ -581,6 +595,8 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@45 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from make_plasma_charset::@18 (byte*) print_char_cursor#11 ← phi( make_plasma_charset::@18/(byte*) print_char_cursor#20 ) (byte) print_char::ch#1 ← phi( make_plasma_charset::@18/(byte) print_char::ch#0 ) @@ -592,6 +608,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#12 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from make_plasma_charset::@23 (byte*) print_screen#1 ← phi( make_plasma_charset::@23/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -624,6 +642,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte) SID_CONTROL_NOISE#0 ← (number) $80 (byte*) SID_VOICE3_OSC#0 ← ((byte*)) (number) $d41b to:@47 + +(void()) sid_rnd_init() sid_rnd_init: scope:[sid_rnd_init] from make_plasma_charset *((word*) SID_VOICE3_FREQ#0) ← (number) $ffff *((byte*) SID_VOICE3_CONTROL#0) ← (byte) SID_CONTROL_NOISE#0 @@ -631,6 +651,8 @@ sid_rnd_init: scope:[sid_rnd_init] from make_plasma_charset sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init return to:@return + +(byte()) sid_rnd() sid_rnd: scope:[sid_rnd] from make_plasma_charset::@8 (byte) sid_rnd::return#0 ← *((byte*) SID_VOICE3_OSC#0) to:sid_rnd::@return @@ -683,6 +705,8 @@ sid_rnd::@return: scope:[sid_rnd] from sid_rnd (byte*) SCREEN1#0 ← ((byte*)) (number) $2800 (byte*) SCREEN2#0 ← ((byte*)) (number) $2c00 to:@48 + +(void()) main() main: scope:[main] from @52 (byte) sin_offset_y#30 ← phi( @52/(byte) sin_offset_y#18 ) (byte) sin_offset_x#30 ← phi( @52/(byte) sin_offset_x#18 ) @@ -911,6 +935,8 @@ main::@return: scope:[main] from main::@1 (byte) sin_offset_x#3 ← (number) 0 (byte) sin_offset_y#3 ← (number) 0 to:@52 + +(void()) doplasma((byte*) doplasma::screen) doplasma: scope:[doplasma] from main::@2 main::@7 (byte*) doplasma::screen#6 ← phi( main::@2/(byte*) doplasma::screen#0 main::@7/(byte*) doplasma::screen#1 ) (byte) sin_offset_y#10 ← phi( main::@2/(byte) sin_offset_y#14 main::@7/(byte) sin_offset_y#15 ) @@ -979,6 +1005,8 @@ doplasma::@return: scope:[doplasma] from doplasma::@4 (byte) sin_offset_y#5 ← (byte) sin_offset_y#12 return to:@return + +(void()) init_angle_screen((byte*) init_angle_screen::screen) init_angle_screen: scope:[init_angle_screen] from main::@9 (byte*) init_angle_screen::screen#1 ← phi( main::@9/(byte*) init_angle_screen::screen#0 ) (byte*~) init_angle_screen::$0 ← (byte*) init_angle_screen::screen#1 + (number) $28*(number) $c @@ -1058,6 +1086,8 @@ init_angle_screen::@4: scope:[init_angle_screen] from init_angle_screen::@2 init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@4 return to:@return + +(void()) init_dist_screen((byte*) init_dist_screen::screen) init_dist_screen: scope:[init_dist_screen] from main (byte*) init_dist_screen::screen#2 ← phi( main/(byte*) init_dist_screen::screen#0 ) (word*) SQUARES#23 ← phi( main/(word*) SQUARES#21 ) @@ -1270,6 +1300,8 @@ init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@7 (word*) SQUARES#6 ← (word*) SQUARES#15 return to:@return + +(void()) make_plasma_charset((byte*) make_plasma_charset::charset) make_plasma_charset: scope:[make_plasma_charset] from main::@10 (byte*) make_plasma_charset::charset#16 ← phi( main::@10/(byte*) make_plasma_charset::charset#0 ) (byte*) print_char_cursor#29 ← phi( main::@10/(byte*) print_char_cursor#21 ) @@ -4167,6 +4199,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @2 [8] phi() + +(void()) main() main: scope:[main] from @2 [9] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 [10] call init_dist_screen @@ -4204,6 +4238,8 @@ main::toD0182: scope:[main] from main::@3 main::@4: scope:[main] from main::toD0182 [24] *((const byte*) D018#0) ← (const byte) main::toD0182_return#0 to:main::@1 + +(void()) doplasma((byte*) doplasma::screen) doplasma: scope:[doplasma] from main::@2 main::@3 [25] (byte*) doplasma::screen#6 ← phi( main::@2/(const byte*) SCREEN1#0 main::@3/(const byte*) SCREEN2#0 ) [25] (byte) sin_offset_y#10 ← phi( main::@2/(byte) sin_offset_y#14 main::@3/(byte) sin_offset_y#12 ) @@ -4240,6 +4276,8 @@ doplasma::@4: scope:[doplasma] from doplasma::@3 doplasma::@return: scope:[doplasma] from doplasma::@4 [43] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main::@7 print_cls [44] (byte) memset::c#4 ← phi( main::@7/(const byte) BLACK#0 print_cls/(byte) ' ' ) [44] (void*) memset::str#3 ← phi( main::@7/(void*)(const byte*) COLS#0 print_cls/(void*)(const byte*) print_line_cursor#0 ) @@ -4259,6 +4297,8 @@ memset::@3: scope:[memset] from memset::@2 [50] *((byte*) memset::dst#2) ← (byte) memset::c#4 [51] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) make_plasma_charset((byte*) make_plasma_charset::charset) make_plasma_charset: scope:[make_plasma_charset] from main::@6 [52] phi() [53] call sid_rnd_init @@ -4324,12 +4364,16 @@ make_plasma_charset::@8: scope:[make_plasma_charset] from make_plasma_charset:: [83] (byte) make_plasma_charset::b#6 ← phi( make_plasma_charset::@9/(byte) make_plasma_charset::b#1 make_plasma_charset::@13/(byte) make_plasma_charset::b#2 ) [84] (byte) make_plasma_charset::ii#1 ← ++ (byte) make_plasma_charset::ii#2 to:make_plasma_charset::@5 + +(byte()) sid_rnd() sid_rnd: scope:[sid_rnd] from make_plasma_charset::@6 [85] (byte) sid_rnd::return#0 ← *((const byte*) SID_VOICE3_OSC#0) to:sid_rnd::@return sid_rnd::@return: scope:[sid_rnd] from sid_rnd [86] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from make_plasma_charset::@10 [87] *((byte*) print_char_cursor#18) ← (const byte) print_char::ch#0 [88] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#18 @@ -4337,6 +4381,8 @@ print_char: scope:[print_char] from make_plasma_charset::@10 print_char::@return: scope:[print_char] from print_char [89] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from make_plasma_charset::@12 [90] phi() [91] call memset @@ -4344,6 +4390,8 @@ print_cls: scope:[print_cls] from make_plasma_charset::@12 print_cls::@return: scope:[print_cls] from print_cls [92] return to:@return + +(void()) sid_rnd_init() sid_rnd_init: scope:[sid_rnd_init] from make_plasma_charset [93] *((const word*) SID_VOICE3_FREQ#0) ← (word) $ffff [94] *((const byte*) SID_VOICE3_CONTROL#0) ← (const byte) SID_CONTROL_NOISE#0 @@ -4351,6 +4399,8 @@ sid_rnd_init: scope:[sid_rnd_init] from make_plasma_charset sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init [95] return to:@return + +(void()) init_angle_screen((byte*) init_angle_screen::screen) init_angle_screen: scope:[init_angle_screen] from main::@5 [96] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [97] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c @@ -4399,6 +4449,8 @@ init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@3 [125] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 [126] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 to:init_angle_screen::@2 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from init_angle_screen::@3 [127] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 to:atan2_16::@2 @@ -4496,6 +4548,8 @@ atan2_16::@4: scope:[atan2_16] from atan2_16::@3 atan2_16::@1: scope:[atan2_16] from atan2_16 [169] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 + +(void()) init_dist_screen((byte*) init_dist_screen::screen) init_dist_screen: scope:[init_dist_screen] from main [170] phi() [171] call init_squares @@ -4571,6 +4625,8 @@ init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 [209] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 to:init_dist_screen::@4 + +(byte()) sqrt((word) sqrt::val) sqrt: scope:[sqrt] from init_dist_screen::@13 [210] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [211] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 @@ -4586,6 +4642,8 @@ sqrt::@1: scope:[sqrt] from sqrt sqrt::@return: scope:[sqrt] from sqrt::@1 [218] return to:@return + +(word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) bsearch16u: scope:[bsearch16u] from sqrt [219] phi() to:bsearch16u::@3 @@ -4629,6 +4687,8 @@ bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 [236] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) [237] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 to:bsearch16u::@3 + +(word()) sqr((byte) sqr::val) sqr: scope:[sqr] from init_dist_screen::@10 init_dist_screen::@4 [238] (byte) sqr::val#2 ← phi( init_dist_screen::@10/(byte) sqr::val#1 init_dist_screen::@4/(byte) sqr::val#0 ) [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 @@ -4637,6 +4697,8 @@ sqr: scope:[sqr] from init_dist_screen::@10 init_dist_screen::@4 sqr::@return: scope:[sqr] from sqr [241] return to:@return + +(void()) init_squares() init_squares: scope:[init_squares] from init_dist_screen [242] phi() [243] call malloc @@ -4660,6 +4722,8 @@ init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@2 init_squares::@return: scope:[init_squares] from init_squares::@1 [254] return to:@return + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from @1 @3 init_squares [255] (word) malloc::size#3 ← phi( @1/(word) $3e8 @3/(word) $3e8 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD ) [255] (byte*) heap_head#12 ← phi( @1/(const byte*) HEAP_TOP#0 @3/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) diff --git a/src/test/ref/platform-asm6502.cfg b/src/test/ref/platform-asm6502.cfg index 6d2b8eabe..3599eee71 100644 --- a/src/test/ref/platform-asm6502.cfg +++ b/src/test/ref/platform-asm6502.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/platform-asm6502.log b/src/test/ref/platform-asm6502.log index 10102dff2..3e33747a4 100644 --- a/src/test/ref/platform-asm6502.log +++ b/src/test/ref/platform-asm6502.log @@ -7,6 +7,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte[$a]) TABLE#0 ← { fill( $a, 0) } to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (number) 0 to:main::@1 @@ -98,6 +100,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/plus-0.cfg b/src/test/ref/plus-0.cfg index 230022baf..cc5282232 100644 --- a/src/test/ref/plus-0.cfg +++ b/src/test/ref/plus-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call fill @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) fill((byte*) fill::screen , (byte) fill::ch) fill: scope:[fill] from main main::@1 [9] (byte) fill::ch#4 ← phi( main/(byte) 'a' main::@1/(byte) 'b' ) [9] (byte*) fill::screen#4 ← phi( main/(byte*) 1024 main::@1/(byte*) 8192 ) diff --git a/src/test/ref/plus-0.log b/src/test/ref/plus-0.log index 51fdcb7fc..3c07407f0 100644 --- a/src/test/ref/plus-0.log +++ b/src/test/ref/plus-0.log @@ -4,6 +4,8 @@ Culled Empty Block (label) fill::@4 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @2 (byte*~) main::$0 ← ((byte*)) (number) $400 (byte*) fill::screen#0 ← (byte*~) main::$0 @@ -21,6 +23,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 return to:@return + +(void()) fill((byte*) fill::screen , (byte) fill::ch) fill: scope:[fill] from main main::@1 (byte) fill::ch#4 ← phi( main/(byte) fill::ch#0 main::@1/(byte) fill::ch#1 ) (byte*) fill::screen#4 ← phi( main/(byte*) fill::screen#0 main::@1/(byte*) fill::screen#1 ) @@ -274,6 +278,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call fill @@ -285,6 +291,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) fill((byte*) fill::screen , (byte) fill::ch) fill: scope:[fill] from main main::@1 [9] (byte) fill::ch#4 ← phi( main/(byte) 'a' main::@1/(byte) 'b' ) [9] (byte*) fill::screen#4 ← phi( main/(byte*) 1024 main::@1/(byte*) 8192 ) diff --git a/src/test/ref/pointer-anding.cfg b/src/test/ref/pointer-anding.cfg index 3d09cdcad..4420afb8b 100644 --- a/src/test/ref/pointer-anding.cfg +++ b/src/test/ref/pointer-anding.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/pointer-anding.log b/src/test/ref/pointer-anding.log index 427c2d853..996c2a9c3 100644 --- a/src/test/ref/pointer-anding.log +++ b/src/test/ref/pointer-anding.log @@ -4,6 +4,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (signed word*) main::pos_ptr#0 ← ((signed word*)) (number) $400 (byte*) main::vram_ptr#0 ← ((byte*)) (number) $428 @@ -133,6 +135,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/pointer-cast-2.cfg b/src/test/ref/pointer-cast-2.cfg index abac0f486..c70037464 100644 --- a/src/test/ref/pointer-cast-2.cfg +++ b/src/test/ref/pointer-cast-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::ub#0 ← (byte) $ff [5] *((const signed byte*) main::sb_ptr#0) ← (signed byte) 1 diff --git a/src/test/ref/pointer-cast-2.log b/src/test/ref/pointer-cast-2.log index 6744c2614..81eea8c50 100644 --- a/src/test/ref/pointer-cast-2.log +++ b/src/test/ref/pointer-cast-2.log @@ -4,6 +4,8 @@ Setting inferred volatile on symbol affected by address-of (signed byte*~) main: CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::ub_screen#0 ← ((byte*)) (number) $400 (byte) main::ub#0 ← (number) $ff @@ -128,6 +130,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::ub#0 ← (byte) $ff [5] *((const signed byte*) main::sb_ptr#0) ← (signed byte) 1 diff --git a/src/test/ref/pointer-cast-3.cfg b/src/test/ref/pointer-cast-3.cfg index bd9fee67b..1d4a2f88b 100644 --- a/src/test/ref/pointer-cast-3.cfg +++ b/src/test/ref/pointer-cast-3.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const signed byte*) main::sb_screen#0) ← (const signed byte) main::sb#0 to:main::@return diff --git a/src/test/ref/pointer-cast-3.log b/src/test/ref/pointer-cast-3.log index ead891f2a..7d4880687 100644 --- a/src/test/ref/pointer-cast-3.log +++ b/src/test/ref/pointer-cast-3.log @@ -2,6 +2,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (signed byte*) main::sb_screen#0 ← ((signed byte*)) (number) $400 (signed byte~) main::$0 ← ((signed byte)) (number) $ff @@ -66,6 +68,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const signed byte*) main::sb_screen#0) ← (const signed byte) main::sb#0 to:main::@return diff --git a/src/test/ref/pointer-cast-4.cfg b/src/test/ref/pointer-cast-4.cfg index 584ee97fc..e9275f4b9 100644 --- a/src/test/ref/pointer-cast-4.cfg +++ b/src/test/ref/pointer-cast-4.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/pointer-cast-4.log b/src/test/ref/pointer-cast-4.log index e7dadd734..aa7ad04d9 100644 --- a/src/test/ref/pointer-cast-4.log +++ b/src/test/ref/pointer-cast-4.log @@ -5,6 +5,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::bscreen#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -113,6 +115,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/pointer-cast.cfg b/src/test/ref/pointer-cast.cfg index 21d6c73b3..f985cf261 100644 --- a/src/test/ref/pointer-cast.cfg +++ b/src/test/ref/pointer-cast.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) ub_screen#0) ← (const byte) ub#0 [5] *((signed byte*)(const byte*) ub_screen#0+(byte) 1) ← (const signed byte) sb#0 diff --git a/src/test/ref/pointer-cast.log b/src/test/ref/pointer-cast.log index 695fb7eb8..732e52770 100644 --- a/src/test/ref/pointer-cast.log +++ b/src/test/ref/pointer-cast.log @@ -26,6 +26,8 @@ CONTROL FLOW GRAPH SSA (word) uw#0 ← (number) $3000 (signed word) sw#0 ← (number) -$3000 to:@1 + +(void()) main() main: scope:[main] from @1 (byte*~) main::$0 ← ((byte*)) (byte*) ub_screen#0 *((byte*~) main::$0) ← (byte) ub#0 @@ -397,6 +399,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) ub_screen#0) ← (const byte) ub#0 [5] *((signed byte*)(const byte*) ub_screen#0+(byte) 1) ← (const signed byte) sb#0 diff --git a/src/test/ref/pointer-plus-0.cfg b/src/test/ref/pointer-plus-0.cfg index 63647a275..c8fd5ca75 100644 --- a/src/test/ref/pointer-plus-0.cfg +++ b/src/test/ref/pointer-plus-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call first @@ -25,6 +27,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [13] return to:@return + +(byte*()) first((byte*) first::msg) first: scope:[first] from main main::@1 [14] (byte*) first::return#2 ← phi( main/(const byte[]) msg1#0 main::@1/(const byte[]) msg2#0 ) to:first::@return diff --git a/src/test/ref/pointer-plus-0.log b/src/test/ref/pointer-plus-0.log index a6e811dec..efae0224d 100644 --- a/src/test/ref/pointer-plus-0.log +++ b/src/test/ref/pointer-plus-0.log @@ -6,6 +6,8 @@ CONTROL FLOW GRAPH SSA (byte[]) msg1#0 ← (const string) $0 (byte[]) msg2#0 ← (const string) $1 to:@2 + +(void()) main() main: scope:[main] from @2 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte*) first::msg#0 ← (byte[]) msg1#0 @@ -30,6 +32,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 return to:@return + +(byte*()) first((byte*) first::msg) first: scope:[first] from main main::@1 (byte*) first::msg#2 ← phi( main/(byte*) first::msg#0 main::@1/(byte*) first::msg#1 ) (byte*~) first::$0 ← (byte*) first::msg#2 + (number) 0 @@ -170,6 +174,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call first @@ -188,6 +194,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [13] return to:@return + +(byte*()) first((byte*) first::msg) first: scope:[first] from main main::@1 [14] (byte*) first::return#2 ← phi( main/(const byte[]) msg1#0 main::@1/(const byte[]) msg2#0 ) to:first::@return diff --git a/src/test/ref/pointer-plus-signed-word.cfg b/src/test/ref/pointer-plus-signed-word.cfg index 8733fcb6e..77d9f57f5 100644 --- a/src/test/ref/pointer-plus-signed-word.cfg +++ b/src/test/ref/pointer-plus-signed-word.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/pointer-plus-signed-word.log b/src/test/ref/pointer-plus-signed-word.log index 9818e6a7d..94883bbb7 100644 --- a/src/test/ref/pointer-plus-signed-word.log +++ b/src/test/ref/pointer-plus-signed-word.log @@ -5,6 +5,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400+(number) $28*(number) $a to:@1 + +(void()) main() main: scope:[main] from @1 (signed word) main::i#0 ← (signed word) -$a to:main::@1 @@ -100,6 +102,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/pointer-pointer-1.cfg b/src/test/ref/pointer-pointer-1.cfg index f66c6d203..237109ea2 100644 --- a/src/test/ref/pointer-pointer-1.cfg +++ b/src/test/ref/pointer-pointer-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::b#0 ← (byte) 'a' [5] (byte*) main::pb#0 ← &(byte) main::b#0 diff --git a/src/test/ref/pointer-pointer-1.log b/src/test/ref/pointer-pointer-1.log index a991f32c4..d87d066c7 100644 --- a/src/test/ref/pointer-pointer-1.log +++ b/src/test/ref/pointer-pointer-1.log @@ -4,6 +4,8 @@ Setting inferred volatile on symbol affected by address-of (byte**~) main::$1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::b#0 ← (byte) 'a' @@ -82,6 +84,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::b#0 ← (byte) 'a' [5] (byte*) main::pb#0 ← &(byte) main::b#0 diff --git a/src/test/ref/pointer-pointer-2.cfg b/src/test/ref/pointer-pointer-2.cfg index 0bfe3e822..1068a5390 100644 --- a/src/test/ref/pointer-pointer-2.cfg +++ b/src/test/ref/pointer-pointer-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte*) main::text#0 ← (byte*) 0 to:main::@1 @@ -34,6 +36,8 @@ main::@3: scope:[main] from main::@2 [13] (byte*) main::screen#1 ← ++ (byte*) main::screen#2 [14] (byte*) main::text#1 ← ++ (byte*) main::text#3 to:main::@2 + +(void()) nexttext((byte**) nexttext::textp) nexttext: scope:[nexttext] from main::@1 [15] (byte~) nexttext::$0 ← (byte) textid#11 & (byte) 1 [16] (byte) textid#13 ← ++ (byte) textid#11 diff --git a/src/test/ref/pointer-pointer-2.log b/src/test/ref/pointer-pointer-2.log index 6693b65a8..202c3648c 100644 --- a/src/test/ref/pointer-pointer-2.log +++ b/src/test/ref/pointer-pointer-2.log @@ -10,6 +10,8 @@ Culled Empty Block (label) nexttext::@4 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @2 (byte) textid#16 ← phi( @2/(byte) textid#15 ) (byte*) main::screen#0 ← ((byte*)) (number) $400 @@ -68,6 +70,8 @@ main::@return: scope:[main] from main::@4 (byte[]) text2#0 ← (const string) $1 (byte) textid#2 ← (number) 0 to:@2 + +(void()) nexttext((byte**) nexttext::textp) nexttext: scope:[nexttext] from main::@1 (byte**) nexttext::textp#3 ← phi( main::@1/(byte**) nexttext::textp#0 ) (byte) textid#8 ← phi( main::@1/(byte) textid#11 ) @@ -296,6 +300,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte*) main::text#0 ← (byte*) 0 to:main::@1 @@ -323,6 +329,8 @@ main::@3: scope:[main] from main::@2 [13] (byte*) main::screen#1 ← ++ (byte*) main::screen#2 [14] (byte*) main::text#1 ← ++ (byte*) main::text#3 to:main::@2 + +(void()) nexttext((byte**) nexttext::textp) nexttext: scope:[nexttext] from main::@1 [15] (byte~) nexttext::$0 ← (byte) textid#11 & (byte) 1 [16] (byte) textid#13 ← ++ (byte) textid#11 diff --git a/src/test/ref/pointer-pointer-3.cfg b/src/test/ref/pointer-pointer-3.cfg index 5f7e85308..598f738d1 100644 --- a/src/test/ref/pointer-pointer-3.cfg +++ b/src/test/ref/pointer-pointer-3.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call setscreen @@ -21,6 +23,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [9] return to:@return + +(void()) setscreen((byte**) setscreen::screen , (byte*) setscreen::val) setscreen: scope:[setscreen] from main main::@1 [10] (byte*) setscreen::val#2 ← phi( main/(const byte*) screen1#0 main::@1/(const byte*) screen2#0 ) [11] *(&(byte*) screen#0) ← (byte*) setscreen::val#2 diff --git a/src/test/ref/pointer-pointer-3.log b/src/test/ref/pointer-pointer-3.log index 07ca81557..a1b6f744b 100644 --- a/src/test/ref/pointer-pointer-3.log +++ b/src/test/ref/pointer-pointer-3.log @@ -10,6 +10,8 @@ CONTROL FLOW GRAPH SSA (byte*) screen1#0 ← ((byte*)) (number) $400 (byte*) screen2#0 ← ((byte*)) (number) $400+(number) $28 to:@2 + +(void()) main() main: scope:[main] from @2 (byte*) screen#1 ← phi( @2/(byte*) screen#4 ) (byte**~) main::$0 ← & (byte*) screen#1 @@ -32,6 +34,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 return to:@return + +(void()) setscreen((byte**) setscreen::screen , (byte*) setscreen::val) setscreen: scope:[setscreen] from main main::@1 (byte**) setscreen::screen#2 ← phi( main/(byte**) setscreen::screen#0 main::@1/(byte**) setscreen::screen#1 ) (byte*) setscreen::val#2 ← phi( main/(byte*) setscreen::val#0 main::@1/(byte*) setscreen::val#1 ) @@ -154,6 +158,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call setscreen @@ -168,6 +174,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [9] return to:@return + +(void()) setscreen((byte**) setscreen::screen , (byte*) setscreen::val) setscreen: scope:[setscreen] from main main::@1 [10] (byte*) setscreen::val#2 ← phi( main/(const byte*) screen1#0 main::@1/(const byte*) screen2#0 ) [11] *(&(byte*) screen#0) ← (byte*) setscreen::val#2 diff --git a/src/test/ref/pointer-void-0.cfg b/src/test/ref/pointer-void-0.cfg index 6b08a67e2..51ae4b0ab 100644 --- a/src/test/ref/pointer-void-0.cfg +++ b/src/test/ref/pointer-void-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (word) main::w#0 ← (word) $4d2 [5] *((const byte*) main::SCREEN#0) ← *((const byte*) main::bp#0) diff --git a/src/test/ref/pointer-void-0.log b/src/test/ref/pointer-void-0.log index bd60ecdf6..cf7e1f507 100644 --- a/src/test/ref/pointer-void-0.log +++ b/src/test/ref/pointer-void-0.log @@ -3,6 +3,8 @@ Setting inferred volatile on symbol affected by address-of (word*~) main::$0 ← CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (word) main::w#0 ← (number) $4d2 @@ -92,6 +94,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (word) main::w#0 ← (word) $4d2 [5] *((const byte*) main::SCREEN#0) ← *((const byte*) main::bp#0) diff --git a/src/test/ref/pointer-void-1.cfg b/src/test/ref/pointer-void-1.cfg index 9620ba507..64ee2cb89 100644 --- a/src/test/ref/pointer-void-1.cfg +++ b/src/test/ref/pointer-void-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (dword) main::d#0 ← (dword) $12345678 [5] (word) main::w#0 ← (word) $1234 @@ -24,6 +26,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [12] return to:@return + +(void()) print((void*) print::ptr) print: scope:[print] from main main::@1 main::@2 [13] (byte) idx#12 ← phi( main/(byte) 0 main::@1/(byte) idx#13 main::@2/(byte) idx#13 ) [13] (void*) print::ptr#3 ← phi( main/(const void*) main::vb#0 main::@1/(const void*) main::vw#0 main::@2/(const void*) main::vd#0 ) diff --git a/src/test/ref/pointer-void-1.log b/src/test/ref/pointer-void-1.log index 450e0412c..97c8dae8d 100644 --- a/src/test/ref/pointer-void-1.log +++ b/src/test/ref/pointer-void-1.log @@ -5,6 +5,8 @@ Setting inferred volatile on symbol affected by address-of (dword*~) main::$2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @2 (byte) idx#15 ← phi( @2/(byte) idx#16 ) (dword) main::d#0 ← (number) $12345678 @@ -47,6 +49,8 @@ main::@return: scope:[main] from main::@3 (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte) idx#4 ← (number) 0 to:@2 + +(void()) print((void*) print::ptr) print: scope:[print] from main main::@1 main::@2 (byte) idx#12 ← phi( main/(byte) idx#15 main::@1/(byte) idx#0 main::@2/(byte) idx#1 ) (void*) print::ptr#3 ← phi( main/(void*) print::ptr#0 main::@1/(void*) print::ptr#1 main::@2/(void*) print::ptr#2 ) @@ -238,6 +242,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (dword) main::d#0 ← (dword) $12345678 [5] (word) main::w#0 ← (word) $1234 @@ -255,6 +261,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [12] return to:@return + +(void()) print((void*) print::ptr) print: scope:[print] from main main::@1 main::@2 [13] (byte) idx#12 ← phi( main/(byte) 0 main::@1/(byte) idx#13 main::@2/(byte) idx#13 ) [13] (void*) print::ptr#3 ← phi( main/(const void*) main::vb#0 main::@1/(const void*) main::vw#0 main::@2/(const void*) main::vd#0 ) diff --git a/src/test/ref/pointer-void-2.cfg b/src/test/ref/pointer-void-2.cfg index b524705aa..5062b3738 100644 --- a/src/test/ref/pointer-void-2.cfg +++ b/src/test/ref/pointer-void-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (dword) main::d#0 ← (dword) $12345678 [5] (word) main::w#0 ← (word) $1234 @@ -24,6 +26,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [12] return to:@return + +(void()) print((void*) print::ptr) print: scope:[print] from main main::@1 main::@2 [13] (byte) idx#12 ← phi( main/(byte) 0 main::@1/(byte) idx#13 main::@2/(byte) idx#13 ) [13] (void*) print::ptr#3 ← phi( main/(void*)&(byte) main::b#0 main::@1/(void*)&(word) main::w#0 main::@2/(void*)&(dword) main::d#0 ) diff --git a/src/test/ref/pointer-void-2.log b/src/test/ref/pointer-void-2.log index 3e750c02f..f8923dbd0 100644 --- a/src/test/ref/pointer-void-2.log +++ b/src/test/ref/pointer-void-2.log @@ -5,6 +5,8 @@ Setting inferred volatile on symbol affected by address-of (dword*~) main::$4 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @2 (byte) idx#15 ← phi( @2/(byte) idx#16 ) (dword) main::d#0 ← (number) $12345678 @@ -44,6 +46,8 @@ main::@return: scope:[main] from main::@3 (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte) idx#4 ← (number) 0 to:@2 + +(void()) print((void*) print::ptr) print: scope:[print] from main main::@1 main::@2 (byte) idx#12 ← phi( main/(byte) idx#15 main::@1/(byte) idx#0 main::@2/(byte) idx#1 ) (void*) print::ptr#3 ← phi( main/(void*) print::ptr#0 main::@1/(void*) print::ptr#1 main::@2/(void*) print::ptr#2 ) @@ -222,6 +226,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (dword) main::d#0 ← (dword) $12345678 [5] (word) main::w#0 ← (word) $1234 @@ -239,6 +245,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [12] return to:@return + +(void()) print((void*) print::ptr) print: scope:[print] from main main::@1 main::@2 [13] (byte) idx#12 ← phi( main/(byte) 0 main::@1/(byte) idx#13 main::@2/(byte) idx#13 ) [13] (void*) print::ptr#3 ← phi( main/(void*)&(byte) main::b#0 main::@1/(void*)&(word) main::w#0 main::@2/(void*)&(dword) main::d#0 ) diff --git a/src/test/ref/pointer-void-3.cfg b/src/test/ref/pointer-void-3.cfg index 5a9c4598e..a267aa18d 100644 --- a/src/test/ref/pointer-void-3.cfg +++ b/src/test/ref/pointer-void-3.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call malloc @@ -27,6 +29,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [15] return to:@return + +(void*()) malloc() malloc: scope:[malloc] from main main::@1 [16] (byte*) heap_head#10 ← phi( main/(byte*) 49152 main::@1/(byte*) heap_head#11 ) [17] (byte*) heap_head#11 ← ++ (byte*) heap_head#10 diff --git a/src/test/ref/pointer-void-3.log b/src/test/ref/pointer-void-3.log index 76ca416fc..87a84eff3 100644 --- a/src/test/ref/pointer-void-3.log +++ b/src/test/ref/pointer-void-3.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @2 (byte*) heap_head#13 ← phi( @2/(byte*) heap_head#14 ) call malloc @@ -38,6 +40,8 @@ main::@return: scope:[main] from main::@2 @1: scope:[] from @begin (byte*) heap_head#3 ← ((byte*)) (number) $c000 to:@2 + +(void*()) malloc() malloc: scope:[malloc] from main main::@1 (byte*) heap_head#10 ← phi( main/(byte*) heap_head#13 main::@1/(byte*) heap_head#0 ) (byte*) heap_head#4 ← ++ (byte*) heap_head#10 @@ -182,6 +186,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call malloc @@ -202,6 +208,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [15] return to:@return + +(void*()) malloc() malloc: scope:[malloc] from main main::@1 [16] (byte*) heap_head#10 ← phi( main/(byte*) 49152 main::@1/(byte*) heap_head#11 ) [17] (byte*) heap_head#11 ← ++ (byte*) heap_head#10 diff --git a/src/test/ref/print-problem.cfg b/src/test/ref/print-problem.cfg index fdfbe578a..1ce44cecd 100644 --- a/src/test/ref/print-problem.cfg +++ b/src/test/ref/print-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call ln @@ -26,6 +28,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [12] return to:@return + +(void()) ln() ln: scope:[ln] from main main::@1 main::@2 [13] (byte) line#12 ← phi( main/(byte) $40 main::@1/(byte) line#13 main::@2/(byte) line#13 ) [14] (byte) line#13 ← (byte) line#12 + (byte) 2 diff --git a/src/test/ref/print-problem.log b/src/test/ref/print-problem.log index fd3c9ec75..f17ffbe5b 100644 --- a/src/test/ref/print-problem.log +++ b/src/test/ref/print-problem.log @@ -7,6 +7,8 @@ CONTROL FLOW GRAPH SSA (byte) line#0 ← (number) $40 (byte) ch#0 ← (byte) line#0 to:@2 + +(void()) main() main: scope:[main] from @2 (byte) ch#16 ← phi( @2/(byte) ch#17 ) (byte) line#15 ← phi( @2/(byte) line#16 ) @@ -44,6 +46,8 @@ main::@return: scope:[main] from main::@3 (byte) ch#6 ← (byte) ch#13 return to:@return + +(void()) ln() ln: scope:[ln] from main main::@1 main::@2 (byte) line#12 ← phi( main/(byte) line#15 main::@1/(byte) line#1 main::@2/(byte) line#2 ) (number~) ln::$0 ← (byte) line#12 + (number) 2 @@ -210,6 +214,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call ln @@ -229,6 +235,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [12] return to:@return + +(void()) ln() ln: scope:[ln] from main main::@1 main::@2 [13] (byte) line#12 ← phi( main/(byte) $40 main::@1/(byte) line#13 main::@2/(byte) line#13 ) [14] (byte) line#13 ← (byte) line#12 + (byte) 2 diff --git a/src/test/ref/printmsg.cfg b/src/test/ref/printmsg.cfg index 596f1fce0..a5cef19d9 100644 --- a/src/test/ref/printmsg.cfg +++ b/src/test/ref/printmsg.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_str @@ -34,6 +36,8 @@ main::@5: scope:[main] from main::@4 main::@return: scope:[main] from main::@5 [16] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from main::@1 main::@3 main::@5 [17] (byte*) print_line_cursor#16 ← phi( main::@1/(byte*) 1024 main::@3/(byte*) print_line_cursor#1 main::@5/(byte*) print_line_cursor#1 ) to:print_ln::@1 @@ -45,6 +49,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [21] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main main::@2 main::@4 [22] (byte*) print_char_cursor#29 ← phi( main/(byte*) 1024 main::@2/(byte*~) print_char_cursor#31 main::@4/(byte*~) print_char_cursor#32 ) [22] (byte*) print_str::str#6 ← phi( main/(const byte[]) msg#0 main::@2/(const byte[]) msg2#0 main::@4/(const byte[]) msg3#0 ) diff --git a/src/test/ref/printmsg.log b/src/test/ref/printmsg.log index f9e5f8ac8..4eebc08a7 100644 --- a/src/test/ref/printmsg.log +++ b/src/test/ref/printmsg.log @@ -57,6 +57,8 @@ CONTROL FLOW GRAPH SSA (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@36 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main main::@2 main::@4 (byte*) print_char_cursor#29 ← phi( main/(byte*) print_char_cursor#27 main::@2/(byte*) print_char_cursor#6 main::@4/(byte*) print_char_cursor#8 ) (byte*) print_str::str#6 ← phi( main/(byte*) print_str::str#1 main::@2/(byte*) print_str::str#2 main::@4/(byte*) print_str::str#3 ) @@ -79,6 +81,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#14 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from main::@1 main::@3 main::@5 (byte*) print_char_cursor#26 ← phi( main::@1/(byte*) print_char_cursor#5 main::@3/(byte*) print_char_cursor#7 main::@5/(byte*) print_char_cursor#9 ) (byte*) print_line_cursor#16 ← phi( main::@1/(byte*) print_line_cursor#17 main::@3/(byte*) print_line_cursor#18 main::@5/(byte*) print_line_cursor#19 ) @@ -109,6 +113,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte[]) msg2#0 ← (const string) $1 (byte[]) msg3#0 ← (const string) $2 to:@37 + +(void()) main() main: scope:[main] from @37 (byte*) print_line_cursor#21 ← phi( @37/(byte*) print_line_cursor#20 ) (byte*) print_char_cursor#27 ← phi( @37/(byte*) print_char_cursor#28 ) @@ -403,6 +409,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_str @@ -430,6 +438,8 @@ main::@5: scope:[main] from main::@4 main::@return: scope:[main] from main::@5 [16] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from main::@1 main::@3 main::@5 [17] (byte*) print_line_cursor#16 ← phi( main::@1/(byte*) 1024 main::@3/(byte*) print_line_cursor#1 main::@5/(byte*) print_line_cursor#1 ) to:print_ln::@1 @@ -441,6 +451,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [21] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main main::@2 main::@4 [22] (byte*) print_char_cursor#29 ← phi( main/(byte*) 1024 main::@2/(byte*~) print_char_cursor#31 main::@4/(byte*~) print_char_cursor#32 ) [22] (byte*) print_str::str#6 ← phi( main/(const byte[]) msg#0 main::@2/(const byte[]) msg2#0 main::@4/(const byte[]) msg3#0 ) diff --git a/src/test/ref/problem-negative-word-const.cfg b/src/test/ref/problem-negative-word-const.cfg index deb52ff08..9011f8f83 100644 --- a/src/test/ref/problem-negative-word-const.cfg +++ b/src/test/ref/problem-negative-word-const.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/problem-negative-word-const.log b/src/test/ref/problem-negative-word-const.log index 8f4cbd332..9200fac01 100644 --- a/src/test/ref/problem-negative-word-const.log +++ b/src/test/ref/problem-negative-word-const.log @@ -7,6 +7,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (word*) screen#0 ← ((word*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -153,6 +155,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/processor-port-test.cfg b/src/test/ref/processor-port-test.cfg index 0bc6b1904..4573aa0f8 100644 --- a/src/test/ref/processor-port-test.cfg +++ b/src/test/ref/processor-port-test.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -127,6 +129,8 @@ main::@27: scope:[main] from main::@26 main::@1: scope:[main] from main::@1 main::@27 [67] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7) to:main::@1 + +(void()) testProcport((byte) testProcport::ddr , (byte) testProcport::port , (byte) testProcport::ddr2) testProcport: scope:[testProcport] from main::@10 main::@11 main::@12 main::@13 main::@14 main::@15 main::@16 main::@17 main::@18 main::@19 main::@20 main::@21 main::@22 main::@23 main::@24 main::@25 main::@26 main::@4 main::@5 main::@6 main::@7 main::@8 main::@9 [68] (byte) testProcport::ddr2#23 ← phi( main::@5/(const byte) PROCPORT_DDR_MEMORY_MASK#0 main::@6/(const byte) PROCPORT_DDR_MEMORY_MASK#0 main::@7/(const byte) PROCPORT_DDR_MEMORY_MASK#0 main::@8/(const byte) PROCPORT_DDR_MEMORY_MASK#0 main::@9/(byte) 0 main::@10/(byte) 0 main::@11/(byte) 0 main::@12/(byte) $ff main::@13/(byte) $ff main::@14/(byte) $ff main::@15/(byte) $ff main::@16/(byte) $55 main::@17/(byte) $55 main::@18/(byte) $55 main::@19/(byte) $aa main::@20/(byte) $aa main::@21/(byte) $aa main::@22/(byte) 0 main::@23/(byte) $55 main::@24/(byte) $15 main::@25/(byte) $17 main::@26/(byte) $17 main::@4/(const byte) PROCPORT_DDR_MEMORY_MASK#0 ) [68] (byte) testProcport::port#23 ← phi( main::@5/(const byte) PROCPORT_RAM_IO#0 main::@6/(const byte) PROCPORT_RAM_CHARROM#0 main::@7/(const byte) PROCPORT_KERNEL_IO#0 main::@8/(const byte) PROCPORT_BASIC_KERNEL_IO#0 main::@9/(byte) 0 main::@10/(byte) 0 main::@11/(byte) $ff main::@12/(byte) 0 main::@13/(byte) $55 main::@14/(byte) $aa main::@15/(byte) $ff main::@16/(byte) 0 main::@17/(byte) $55 main::@18/(byte) $ff main::@19/(byte) 0 main::@20/(byte) $ff main::@21/(byte) $aa main::@22/(byte) $d0 main::@23/(byte) $55 main::@24/(byte) $15 main::@25/(byte) $15 main::@26/(byte) $17 main::@4/(const byte) PROCPORT_RAM_ALL#0 ) @@ -206,6 +210,8 @@ testProcport::@16: scope:[testProcport] from testProcport::@15 testProcport::@return: scope:[testProcport] from testProcport::@16 [108] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from main::@3 testProcport::@16 [109] (byte*) print_char_cursor#115 ← phi( main::@3/(byte*) print_char_cursor#114 testProcport::@16/(byte*) print_char_cursor#66 ) [109] (byte*) print_line_cursor#67 ← phi( main::@3/(byte*) 1024 testProcport::@16/(byte*) print_line_cursor#1 ) @@ -218,6 +224,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [113] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from testProcport::@1 testProcport::@11 testProcport::@13 testProcport::@15 testProcport::@3 testProcport::@5 testProcport::@7 testProcport::@9 [114] (byte) print_byte::b#8 ← phi( testProcport::@1/(byte) print_byte::b#0 testProcport::@11/(byte) print_byte::b#5 testProcport::@13/(byte) print_byte::b#6 testProcport::@15/(byte) print_byte::b#7 testProcport::@3/(byte) print_byte::b#1 testProcport::@5/(byte) print_byte::b#2 testProcport::@7/(byte) print_byte::b#3 testProcport::@9/(byte) print_byte::b#4 ) [115] (byte~) print_byte::$0 ← (byte) print_byte::b#8 >> (byte) 4 @@ -232,6 +240,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [121] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 [122] (byte*) print_char_cursor#65 ← phi( print_byte/(byte*) print_char_cursor#114 print_byte::@1/(byte*) print_char_cursor#66 ) [122] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -241,6 +251,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char [125] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@2 testProcport testProcport::@10 testProcport::@12 testProcport::@14 testProcport::@2 testProcport::@4 testProcport::@6 testProcport::@8 [126] (byte*) print_char_cursor#121 ← phi( main::@2/(byte*) 1024 testProcport/(byte*~) print_char_cursor#125 testProcport::@10/(byte*) print_char_cursor#66 testProcport::@12/(byte*) print_char_cursor#66 testProcport::@14/(byte*) print_char_cursor#66 testProcport::@2/(byte*) print_char_cursor#66 testProcport::@4/(byte*) print_char_cursor#66 testProcport::@6/(byte*) print_char_cursor#66 testProcport::@8/(byte*) print_char_cursor#66 ) [126] (byte*) print_str::str#12 ← phi( main::@2/(const string) main::str testProcport/(const string) testProcport::str testProcport::@10/(const string) testProcport::str5 testProcport::@12/(const string) testProcport::str5 testProcport::@14/(const string) testProcport::str5 testProcport::@2/(const string) testProcport::str1 testProcport::@4/(const string) testProcport::str1 testProcport::@6/(const string) testProcport::str3 testProcport::@8/(const string) testProcport::str3 ) @@ -258,6 +270,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [131] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#114 [132] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#10 to:print_str::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main [133] phi() [134] call memset @@ -265,6 +279,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [135] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [136] phi() to:memset::@1 diff --git a/src/test/ref/processor-port-test.log b/src/test/ref/processor-port-test.log index 1cc2e7090..936a8118b 100644 --- a/src/test/ref/processor-port-test.log +++ b/src/test/ref/processor-port-test.log @@ -74,6 +74,8 @@ CONTROL FLOW GRAPH SSA (byte) PROCPORT_KERNEL_IO#0 ← (number) 6 (byte) PROCPORT_BASIC_KERNEL_IO#0 ← (number) 7 to:@16 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -121,6 +123,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@33 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@7 testProcport testProcport::@10 testProcport::@12 testProcport::@14 testProcport::@2 testProcport::@4 testProcport::@6 testProcport::@8 (byte*) print_char_cursor#121 ← phi( main::@7/(byte*) print_char_cursor#12 testProcport/(byte*) print_char_cursor#119 testProcport::@10/(byte*) print_char_cursor#48 testProcport::@12/(byte*) print_char_cursor#50 testProcport::@14/(byte*) print_char_cursor#52 testProcport::@2/(byte*) print_char_cursor#40 testProcport::@4/(byte*) print_char_cursor#42 testProcport::@6/(byte*) print_char_cursor#44 testProcport::@8/(byte*) print_char_cursor#46 ) (byte*) print_str::str#12 ← phi( main::@7/(byte*) print_str::str#1 testProcport/(byte*) print_str::str#2 testProcport::@10/(byte*) print_str::str#7 testProcport::@12/(byte*) print_str::str#8 testProcport::@14/(byte*) print_str::str#9 testProcport::@2/(byte*) print_str::str#3 testProcport::@4/(byte*) print_str::str#4 testProcport::@6/(byte*) print_str::str#5 testProcport::@8/(byte*) print_str::str#6 ) @@ -143,6 +147,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#59 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from main::@8 testProcport::@16 (byte*) print_char_cursor#115 ← phi( main::@8/(byte*) print_char_cursor#13 testProcport::@16/(byte*) print_char_cursor#54 ) (byte*) print_line_cursor#67 ← phi( main::@8/(byte*) print_line_cursor#69 testProcport::@16/(byte*) print_line_cursor#71 ) @@ -172,6 +178,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_line_cursor#76 ← phi( @16/(byte*) print_line_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $0 to:@40 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from testProcport::@1 testProcport::@11 testProcport::@13 testProcport::@15 testProcport::@3 testProcport::@5 testProcport::@7 testProcport::@9 (byte*) print_char_cursor#116 ← phi( testProcport::@1/(byte*) print_char_cursor#39 testProcport::@11/(byte*) print_char_cursor#49 testProcport::@13/(byte*) print_char_cursor#51 testProcport::@15/(byte*) print_char_cursor#53 testProcport::@3/(byte*) print_char_cursor#41 testProcport::@5/(byte*) print_char_cursor#43 testProcport::@7/(byte*) print_char_cursor#45 testProcport::@9/(byte*) print_char_cursor#47 ) (byte) print_byte::b#8 ← phi( testProcport::@1/(byte) print_byte::b#0 testProcport::@11/(byte) print_byte::b#5 testProcport::@13/(byte) print_byte::b#6 testProcport::@15/(byte) print_byte::b#7 testProcport::@3/(byte) print_byte::b#1 testProcport::@5/(byte) print_byte::b#2 testProcport::@7/(byte) print_byte::b#3 testProcport::@9/(byte) print_byte::b#4 ) @@ -196,6 +204,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#7 ← (byte*) print_char_cursor#64 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 (byte*) print_char_cursor#65 ← phi( print_byte/(byte*) print_char_cursor#116 print_byte::@1/(byte*) print_char_cursor#5 ) (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -207,6 +217,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#9 ← (byte*) print_char_cursor#66 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main (byte*) print_screen#1 ← phi( main/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -236,6 +248,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte*) IO_RAM#0 ← ((byte*)) (number) $d000 (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@42 + +(void()) main() main: scope:[main] from @42 (byte*) print_char_cursor#117 ← phi( @42/(byte*) print_char_cursor#120 ) (byte*) print_line_cursor#68 ← phi( @42/(byte*) print_line_cursor#72 ) @@ -522,6 +536,8 @@ main::@return: scope:[main] from main::@1 (byte*) print_char_cursor#38 ← (byte*) print_char_cursor#94 return to:@return + +(void()) testProcport((byte) testProcport::ddr , (byte) testProcport::port , (byte) testProcport::ddr2) testProcport: scope:[testProcport] from main::@10 main::@11 main::@12 main::@13 main::@14 main::@15 main::@16 main::@17 main::@18 main::@19 main::@20 main::@21 main::@22 main::@23 main::@24 main::@25 main::@26 main::@27 main::@28 main::@29 main::@30 main::@31 main::@9 (byte*) print_line_cursor#91 ← phi( main::@10/(byte*) print_line_cursor#7 main::@11/(byte*) print_line_cursor#8 main::@12/(byte*) print_line_cursor#9 main::@13/(byte*) print_line_cursor#10 main::@14/(byte*) print_line_cursor#11 main::@15/(byte*) print_line_cursor#12 main::@16/(byte*) print_line_cursor#13 main::@17/(byte*) print_line_cursor#14 main::@18/(byte*) print_line_cursor#15 main::@19/(byte*) print_line_cursor#16 main::@20/(byte*) print_line_cursor#17 main::@21/(byte*) print_line_cursor#18 main::@22/(byte*) print_line_cursor#19 main::@23/(byte*) print_line_cursor#20 main::@24/(byte*) print_line_cursor#21 main::@25/(byte*) print_line_cursor#22 main::@26/(byte*) print_line_cursor#23 main::@27/(byte*) print_line_cursor#24 main::@28/(byte*) print_line_cursor#25 main::@29/(byte*) print_line_cursor#26 main::@30/(byte*) print_line_cursor#27 main::@31/(byte*) print_line_cursor#28 main::@9/(byte*) print_line_cursor#6 ) (byte*) print_char_cursor#119 ← phi( main::@10/(byte*) print_char_cursor#15 main::@11/(byte*) print_char_cursor#16 main::@12/(byte*) print_char_cursor#17 main::@13/(byte*) print_char_cursor#18 main::@14/(byte*) print_char_cursor#19 main::@15/(byte*) print_char_cursor#20 main::@16/(byte*) print_char_cursor#21 main::@17/(byte*) print_char_cursor#22 main::@18/(byte*) print_char_cursor#23 main::@19/(byte*) print_char_cursor#24 main::@20/(byte*) print_char_cursor#25 main::@21/(byte*) print_char_cursor#26 main::@22/(byte*) print_char_cursor#27 main::@23/(byte*) print_char_cursor#28 main::@24/(byte*) print_char_cursor#29 main::@25/(byte*) print_char_cursor#30 main::@26/(byte*) print_char_cursor#31 main::@27/(byte*) print_char_cursor#32 main::@28/(byte*) print_char_cursor#33 main::@29/(byte*) print_char_cursor#34 main::@30/(byte*) print_char_cursor#35 main::@31/(byte*) print_char_cursor#36 main::@9/(byte*) print_char_cursor#14 ) @@ -2149,6 +2165,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 @@ -2269,6 +2287,8 @@ main::@27: scope:[main] from main::@26 main::@1: scope:[main] from main::@1 main::@27 [67] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7) to:main::@1 + +(void()) testProcport((byte) testProcport::ddr , (byte) testProcport::port , (byte) testProcport::ddr2) testProcport: scope:[testProcport] from main::@10 main::@11 main::@12 main::@13 main::@14 main::@15 main::@16 main::@17 main::@18 main::@19 main::@20 main::@21 main::@22 main::@23 main::@24 main::@25 main::@26 main::@4 main::@5 main::@6 main::@7 main::@8 main::@9 [68] (byte) testProcport::ddr2#23 ← phi( main::@5/(const byte) PROCPORT_DDR_MEMORY_MASK#0 main::@6/(const byte) PROCPORT_DDR_MEMORY_MASK#0 main::@7/(const byte) PROCPORT_DDR_MEMORY_MASK#0 main::@8/(const byte) PROCPORT_DDR_MEMORY_MASK#0 main::@9/(byte) 0 main::@10/(byte) 0 main::@11/(byte) 0 main::@12/(byte) $ff main::@13/(byte) $ff main::@14/(byte) $ff main::@15/(byte) $ff main::@16/(byte) $55 main::@17/(byte) $55 main::@18/(byte) $55 main::@19/(byte) $aa main::@20/(byte) $aa main::@21/(byte) $aa main::@22/(byte) 0 main::@23/(byte) $55 main::@24/(byte) $15 main::@25/(byte) $17 main::@26/(byte) $17 main::@4/(const byte) PROCPORT_DDR_MEMORY_MASK#0 ) [68] (byte) testProcport::port#23 ← phi( main::@5/(const byte) PROCPORT_RAM_IO#0 main::@6/(const byte) PROCPORT_RAM_CHARROM#0 main::@7/(const byte) PROCPORT_KERNEL_IO#0 main::@8/(const byte) PROCPORT_BASIC_KERNEL_IO#0 main::@9/(byte) 0 main::@10/(byte) 0 main::@11/(byte) $ff main::@12/(byte) 0 main::@13/(byte) $55 main::@14/(byte) $aa main::@15/(byte) $ff main::@16/(byte) 0 main::@17/(byte) $55 main::@18/(byte) $ff main::@19/(byte) 0 main::@20/(byte) $ff main::@21/(byte) $aa main::@22/(byte) $d0 main::@23/(byte) $55 main::@24/(byte) $15 main::@25/(byte) $15 main::@26/(byte) $17 main::@4/(const byte) PROCPORT_RAM_ALL#0 ) @@ -2348,6 +2368,8 @@ testProcport::@16: scope:[testProcport] from testProcport::@15 testProcport::@return: scope:[testProcport] from testProcport::@16 [108] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from main::@3 testProcport::@16 [109] (byte*) print_char_cursor#115 ← phi( main::@3/(byte*) print_char_cursor#114 testProcport::@16/(byte*) print_char_cursor#66 ) [109] (byte*) print_line_cursor#67 ← phi( main::@3/(byte*) 1024 testProcport::@16/(byte*) print_line_cursor#1 ) @@ -2360,6 +2382,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [113] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from testProcport::@1 testProcport::@11 testProcport::@13 testProcport::@15 testProcport::@3 testProcport::@5 testProcport::@7 testProcport::@9 [114] (byte) print_byte::b#8 ← phi( testProcport::@1/(byte) print_byte::b#0 testProcport::@11/(byte) print_byte::b#5 testProcport::@13/(byte) print_byte::b#6 testProcport::@15/(byte) print_byte::b#7 testProcport::@3/(byte) print_byte::b#1 testProcport::@5/(byte) print_byte::b#2 testProcport::@7/(byte) print_byte::b#3 testProcport::@9/(byte) print_byte::b#4 ) [115] (byte~) print_byte::$0 ← (byte) print_byte::b#8 >> (byte) 4 @@ -2374,6 +2398,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [121] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 [122] (byte*) print_char_cursor#65 ← phi( print_byte/(byte*) print_char_cursor#114 print_byte::@1/(byte*) print_char_cursor#66 ) [122] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -2383,6 +2409,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char [125] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@2 testProcport testProcport::@10 testProcport::@12 testProcport::@14 testProcport::@2 testProcport::@4 testProcport::@6 testProcport::@8 [126] (byte*) print_char_cursor#121 ← phi( main::@2/(byte*) 1024 testProcport/(byte*~) print_char_cursor#125 testProcport::@10/(byte*) print_char_cursor#66 testProcport::@12/(byte*) print_char_cursor#66 testProcport::@14/(byte*) print_char_cursor#66 testProcport::@2/(byte*) print_char_cursor#66 testProcport::@4/(byte*) print_char_cursor#66 testProcport::@6/(byte*) print_char_cursor#66 testProcport::@8/(byte*) print_char_cursor#66 ) [126] (byte*) print_str::str#12 ← phi( main::@2/(const string) main::str testProcport/(const string) testProcport::str testProcport::@10/(const string) testProcport::str5 testProcport::@12/(const string) testProcport::str5 testProcport::@14/(const string) testProcport::str5 testProcport::@2/(const string) testProcport::str1 testProcport::@4/(const string) testProcport::str1 testProcport::@6/(const string) testProcport::str3 testProcport::@8/(const string) testProcport::str3 ) @@ -2400,6 +2428,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [131] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#114 [132] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#10 to:print_str::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main [133] phi() [134] call memset @@ -2407,6 +2437,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [135] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [136] phi() to:memset::@1 diff --git a/src/test/ref/ptr-complex.cfg b/src/test/ref/ptr-complex.cfg index 94eb94279..a6f0e1aaf 100644 --- a/src/test/ref/ptr-complex.cfg +++ b/src/test/ref/ptr-complex.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/ptr-complex.log b/src/test/ref/ptr-complex.log index 4fee3f314..b33eacbfb 100644 --- a/src/test/ref/ptr-complex.log +++ b/src/test/ref/ptr-complex.log @@ -4,6 +4,8 @@ Identified constant variable (byte*) main::BGCOL CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -226,6 +228,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/ptrptr-optimize-0.cfg b/src/test/ref/ptrptr-optimize-0.cfg index 32a02b7c2..0bead6da7 100644 --- a/src/test/ref/ptrptr-optimize-0.cfg +++ b/src/test/ref/ptrptr-optimize-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte*) main::screen#0 ← (byte*) 1024 [5] *(*((const byte**) main::pscreen#0)) ← (byte) 'a' diff --git a/src/test/ref/ptrptr-optimize-0.log b/src/test/ref/ptrptr-optimize-0.log index b73c95ec3..8504e5c22 100644 --- a/src/test/ref/ptrptr-optimize-0.log +++ b/src/test/ref/ptrptr-optimize-0.log @@ -3,6 +3,8 @@ Setting inferred volatile on symbol affected by address-of (byte**~) main::$0 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte**~) main::$0 ← & (byte*) main::screen#0 @@ -68,6 +70,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte*) main::screen#0 ← (byte*) 1024 [5] *(*((const byte**) main::pscreen#0)) ← (byte) 'a' diff --git a/src/test/ref/ptrptr-optimize-1.cfg b/src/test/ref/ptrptr-optimize-1.cfg index 5d483081c..6ae11f4e0 100644 --- a/src/test/ref/ptrptr-optimize-1.cfg +++ b/src/test/ref/ptrptr-optimize-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte*) main::screen#0 ← (byte*) 1024 [5] call sub @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) sub((byte) sub::ch , (byte**) sub::dst) sub: scope:[sub] from main main::@1 [9] (byte) sub::ch#2 ← phi( main/(byte) 'a' main::@1/(byte) 'b' ) [10] *(*((const byte**) main::pscreen#0)) ← (byte) sub::ch#2 diff --git a/src/test/ref/ptrptr-optimize-1.log b/src/test/ref/ptrptr-optimize-1.log index b637e4801..b7c210da8 100644 --- a/src/test/ref/ptrptr-optimize-1.log +++ b/src/test/ref/ptrptr-optimize-1.log @@ -4,6 +4,8 @@ Culled Empty Block (label) @1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @2 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte**~) main::$0 ← & (byte*) main::screen#0 @@ -23,6 +25,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 return to:@return + +(void()) sub((byte) sub::ch , (byte**) sub::dst) sub: scope:[sub] from main main::@1 (byte**) sub::dst#2 ← phi( main/(byte**) sub::dst#0 main::@1/(byte**) sub::dst#1 ) (byte) sub::ch#2 ← phi( main/(byte) sub::ch#0 main::@1/(byte) sub::ch#1 ) @@ -121,6 +125,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte*) main::screen#0 ← (byte*) 1024 [5] call sub @@ -132,6 +138,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) sub((byte) sub::ch , (byte**) sub::dst) sub: scope:[sub] from main main::@1 [9] (byte) sub::ch#2 ← phi( main/(byte) 'a' main::@1/(byte) 'b' ) [10] *(*((const byte**) main::pscreen#0)) ← (byte) sub::ch#2 diff --git a/src/test/ref/ptrptr-optimize-2.cfg b/src/test/ref/ptrptr-optimize-2.cfg index 0592a2f18..5695797d2 100644 --- a/src/test/ref/ptrptr-optimize-2.cfg +++ b/src/test/ref/ptrptr-optimize-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte*) main::screen#0 ← (byte*) 1024 [5] call sub @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) sub((byte) sub::ch , (byte**) sub::dst) sub: scope:[sub] from main main::@1 [9] (byte) sub::ch#2 ← phi( main/(byte) 'a' main::@1/(byte) 'b' ) [10] *(*(&(byte*) main::screen#0)) ← (byte) sub::ch#2 diff --git a/src/test/ref/ptrptr-optimize-2.log b/src/test/ref/ptrptr-optimize-2.log index 06547ede3..2c4d8d9ee 100644 --- a/src/test/ref/ptrptr-optimize-2.log +++ b/src/test/ref/ptrptr-optimize-2.log @@ -5,6 +5,8 @@ Culled Empty Block (label) @1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @2 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte**~) main::$0 ← & (byte*) main::screen#0 @@ -24,6 +26,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 return to:@return + +(void()) sub((byte) sub::ch , (byte**) sub::dst) sub: scope:[sub] from main main::@1 (byte**) sub::dst#2 ← phi( main/(byte**) sub::dst#0 main::@1/(byte**) sub::dst#1 ) (byte) sub::ch#2 ← phi( main/(byte) sub::ch#0 main::@1/(byte) sub::ch#1 ) @@ -122,6 +126,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte*) main::screen#0 ← (byte*) 1024 [5] call sub @@ -133,6 +139,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) sub((byte) sub::ch , (byte**) sub::dst) sub: scope:[sub] from main main::@1 [9] (byte) sub::ch#2 ← phi( main/(byte) 'a' main::@1/(byte) 'b' ) [10] *(*(&(byte*) main::screen#0)) ← (byte) sub::ch#2 diff --git a/src/test/ref/ptrtest.cfg b/src/test/ref/ptrtest.cfg index e23b1e486..ef555046b 100644 --- a/src/test/ref/ptrtest.cfg +++ b/src/test/ref/ptrtest.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call lvalue @@ -26,6 +28,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [12] return to:@return + +(void()) lvaluevar() lvaluevar: scope:[lvaluevar] from main::@3 [13] phi() to:lvaluevar::@1 @@ -42,6 +46,8 @@ lvaluevar::@2: scope:[lvaluevar] from lvaluevar::@1 [18] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2 [19] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#2 to:lvaluevar::@1 + +(void()) rvaluevar() rvaluevar: scope:[rvaluevar] from main::@2 [20] phi() to:rvaluevar::@1 @@ -62,6 +68,8 @@ rvaluevar::@2: scope:[rvaluevar] from rvaluevar::@1 [26] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2 [27] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#2 to:rvaluevar::@1 + +(void()) rvalue() rvalue: scope:[rvalue] from main::@1 [28] (byte) rvalue::b#1 ← *((const byte[$400]) rvalue::SCREEN#0+(byte) 1) to:rvalue::@1 @@ -80,6 +88,8 @@ rvalue::@2: scope:[rvalue] from rvalue::@1 [33] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#2) [34] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#2 to:rvalue::@1 + +(void()) lvalue() lvalue: scope:[lvalue] from main [35] *((const byte[$400]) lvalue::SCREEN#0) ← (byte) 1 [36] *((const byte[$400]) lvalue::SCREEN#0+(byte) 1) ← (byte) 2 diff --git a/src/test/ref/ptrtest.log b/src/test/ref/ptrtest.log index 143abda9f..7bd5073e7 100644 --- a/src/test/ref/ptrtest.log +++ b/src/test/ref/ptrtest.log @@ -23,6 +23,8 @@ Culled Empty Block (label) rvaluevar::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@5 + +(void()) main() main: scope:[main] from @5 call lvalue to:main::@1 @@ -40,6 +42,8 @@ main::@4: scope:[main] from main::@3 main::@return: scope:[main] from main::@4 return to:@return + +(void()) lvalue() lvalue: scope:[lvalue] from main (byte[$400]) lvalue::SCREEN#0 ← ((byte[$400])) (number) $400 *((byte[$400]) lvalue::SCREEN#0) ← (number) 1 @@ -59,6 +63,8 @@ lvalue::@2: scope:[lvalue] from lvalue::@1 lvalue::@return: scope:[lvalue] from lvalue::@1 return to:@return + +(void()) rvalue() rvalue: scope:[rvalue] from main::@1 (byte[$400]) rvalue::SCREEN#0 ← ((byte[$400])) (number) $400 (byte) rvalue::b#0 ← *((byte[$400]) rvalue::SCREEN#0) @@ -84,6 +90,8 @@ rvalue::@3: scope:[rvalue] from rvalue::@1 rvalue::@return: scope:[rvalue] from rvalue::@3 return to:@return + +(void()) lvaluevar() lvaluevar: scope:[lvaluevar] from main::@3 (byte*) lvaluevar::screen#0 ← ((byte*)) (number) $400 (byte) lvaluevar::b#0 ← (number) 4 @@ -105,6 +113,8 @@ lvaluevar::@2: scope:[lvaluevar] from lvaluevar::@1 lvaluevar::@return: scope:[lvaluevar] from lvaluevar::@1 return to:@return + +(void()) rvaluevar() rvaluevar: scope:[rvaluevar] from main::@2 (byte*) rvaluevar::screen#0 ← ((byte*)) (number) $400 (byte) rvaluevar::b#0 ← (byte) 0 @@ -386,6 +396,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call lvalue @@ -405,6 +417,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [12] return to:@return + +(void()) lvaluevar() lvaluevar: scope:[lvaluevar] from main::@3 [13] phi() to:lvaluevar::@1 @@ -421,6 +435,8 @@ lvaluevar::@2: scope:[lvaluevar] from lvaluevar::@1 [18] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2 [19] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#2 to:lvaluevar::@1 + +(void()) rvaluevar() rvaluevar: scope:[rvaluevar] from main::@2 [20] phi() to:rvaluevar::@1 @@ -441,6 +457,8 @@ rvaluevar::@2: scope:[rvaluevar] from rvaluevar::@1 [26] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2 [27] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#2 to:rvaluevar::@1 + +(void()) rvalue() rvalue: scope:[rvalue] from main::@1 [28] (byte) rvalue::b#1 ← *((const byte[$400]) rvalue::SCREEN#0+(byte) 1) to:rvalue::@1 @@ -459,6 +477,8 @@ rvalue::@2: scope:[rvalue] from rvalue::@1 [33] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#2) [34] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#2 to:rvalue::@1 + +(void()) lvalue() lvalue: scope:[lvalue] from main [35] *((const byte[$400]) lvalue::SCREEN#0) ← (byte) 1 [36] *((const byte[$400]) lvalue::SCREEN#0+(byte) 1) ← (byte) 2 diff --git a/src/test/ref/ptrtestmin.cfg b/src/test/ref/ptrtestmin.cfg index c2308fbae..b6eefd0b7 100644 --- a/src/test/ref/ptrtestmin.cfg +++ b/src/test/ref/ptrtestmin.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/ptrtestmin.log b/src/test/ref/ptrtestmin.log index bf4618b7c..506d26fa6 100644 --- a/src/test/ref/ptrtestmin.log +++ b/src/test/ref/ptrtestmin.log @@ -5,6 +5,8 @@ Culled Empty Block (label) main::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte[$400]) main::SCREEN#0 ← ((byte[$400])) (number) $400 (byte) main::b#0 ← (byte) 0 @@ -124,6 +126,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/reserve-zp-global.cfg b/src/test/ref/reserve-zp-global.cfg index 78635569c..e4e1ad57b 100644 --- a/src/test/ref/reserve-zp-global.cfg +++ b/src/test/ref/reserve-zp-global.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -25,6 +27,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [13] return to:@return + +(byte()) sub1((byte) sub1::i) sub1: scope:[sub1] from main::@1 [14] (byte) sub1::return#1 ← (byte) sub1::i#0 + (byte) sub1::i#0 to:sub1::@return diff --git a/src/test/ref/reserve-zp-global.log b/src/test/ref/reserve-zp-global.log index 0fb63e666..9cc2349b1 100644 --- a/src/test/ref/reserve-zp-global.log +++ b/src/test/ref/reserve-zp-global.log @@ -5,6 +5,8 @@ Culled Empty Block (label) sub1::@1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @2 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -27,6 +29,8 @@ main::@3: scope:[main] from main::@1 main::@return: scope:[main] from main::@3 return to:@return + +(byte()) sub1((byte) sub1::i) sub1: scope:[sub1] from main::@1 (byte) sub1::i#1 ← phi( main::@1/(byte) sub1::i#0 ) (byte~) sub1::$0 ← (byte) sub1::i#1 + (byte) sub1::i#1 @@ -128,6 +132,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -146,6 +152,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [13] return to:@return + +(byte()) sub1((byte) sub1::i) sub1: scope:[sub1] from main::@1 [14] (byte) sub1::return#1 ← (byte) sub1::i#0 + (byte) sub1::i#0 to:sub1::@return diff --git a/src/test/ref/reserve-zp-procedure-1.cfg b/src/test/ref/reserve-zp-procedure-1.cfg index 78635569c..e4e1ad57b 100644 --- a/src/test/ref/reserve-zp-procedure-1.cfg +++ b/src/test/ref/reserve-zp-procedure-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -25,6 +27,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [13] return to:@return + +(byte()) sub1((byte) sub1::i) sub1: scope:[sub1] from main::@1 [14] (byte) sub1::return#1 ← (byte) sub1::i#0 + (byte) sub1::i#0 to:sub1::@return diff --git a/src/test/ref/reserve-zp-procedure-1.log b/src/test/ref/reserve-zp-procedure-1.log index 4b13ec9b7..c8717727d 100644 --- a/src/test/ref/reserve-zp-procedure-1.log +++ b/src/test/ref/reserve-zp-procedure-1.log @@ -5,6 +5,8 @@ Culled Empty Block (label) sub1::@1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @2 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -27,6 +29,8 @@ main::@3: scope:[main] from main::@1 main::@return: scope:[main] from main::@3 return to:@return + +(byte()) sub1((byte) sub1::i) sub1: scope:[sub1] from main::@1 (byte) sub1::i#1 ← phi( main::@1/(byte) sub1::i#0 ) (byte~) sub1::$0 ← (byte) sub1::i#1 + (byte) sub1::i#1 @@ -128,6 +132,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -146,6 +152,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [13] return to:@return + +(byte()) sub1((byte) sub1::i) sub1: scope:[sub1] from main::@1 [14] (byte) sub1::return#1 ← (byte) sub1::i#0 + (byte) sub1::i#0 to:sub1::@return diff --git a/src/test/ref/reserve-zp-procedure-2.cfg b/src/test/ref/reserve-zp-procedure-2.cfg index eed6a7920..92378f219 100644 --- a/src/test/ref/reserve-zp-procedure-2.cfg +++ b/src/test/ref/reserve-zp-procedure-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -32,6 +34,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [18] return to:@return + +(byte()) sub2((byte) sub2::i) sub2: scope:[sub2] from main::@2 [19] (byte~) sub2::$0 ← (byte) sub2::i#0 + (byte) sub2::i#0 [20] (byte) sub2::return#1 ← (byte~) sub2::$0 + (byte) sub2::i#0 @@ -39,6 +43,8 @@ sub2: scope:[sub2] from main::@2 sub2::@return: scope:[sub2] from sub2 [21] return to:@return + +(byte()) sub1((byte) sub1::i) sub1: scope:[sub1] from main::@1 [22] (byte) sub1::return#1 ← (byte) sub1::i#0 + (byte) sub1::i#0 to:sub1::@return diff --git a/src/test/ref/reserve-zp-procedure-2.log b/src/test/ref/reserve-zp-procedure-2.log index 7e4bada3d..d78fce2f4 100644 --- a/src/test/ref/reserve-zp-procedure-2.log +++ b/src/test/ref/reserve-zp-procedure-2.log @@ -7,6 +7,8 @@ Culled Empty Block (label) sub2::@1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@3 + +(void()) main() main: scope:[main] from @3 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -39,6 +41,8 @@ main::@4: scope:[main] from main::@3 main::@return: scope:[main] from main::@4 return to:@return + +(byte()) sub1((byte) sub1::i) sub1: scope:[sub1] from main::@1 (byte) sub1::i#1 ← phi( main::@1/(byte) sub1::i#0 ) (byte~) sub1::$0 ← (byte) sub1::i#1 + (byte) sub1::i#1 @@ -49,6 +53,8 @@ sub1::@return: scope:[sub1] from sub1 (byte) sub1::return#2 ← (byte) sub1::return#4 return to:@return + +(byte()) sub2((byte) sub2::i) sub2: scope:[sub2] from main::@3 (byte) sub2::i#1 ← phi( main::@3/(byte) sub2::i#0 ) (byte~) sub2::$0 ← (byte) sub2::i#1 + (byte) sub2::i#1 @@ -183,6 +189,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -208,6 +216,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [18] return to:@return + +(byte()) sub2((byte) sub2::i) sub2: scope:[sub2] from main::@2 [19] (byte~) sub2::$0 ← (byte) sub2::i#0 + (byte) sub2::i#0 [20] (byte) sub2::return#1 ← (byte~) sub2::$0 + (byte) sub2::i#0 @@ -215,6 +225,8 @@ sub2: scope:[sub2] from main::@2 sub2::@return: scope:[sub2] from sub2 [21] return to:@return + +(byte()) sub1((byte) sub1::i) sub1: scope:[sub1] from main::@1 [22] (byte) sub1::return#1 ← (byte) sub1::i#0 + (byte) sub1::i#0 to:sub1::@return diff --git a/src/test/ref/reserve-zp-procedure-3.cfg b/src/test/ref/reserve-zp-procedure-3.cfg index 78635569c..e4e1ad57b 100644 --- a/src/test/ref/reserve-zp-procedure-3.cfg +++ b/src/test/ref/reserve-zp-procedure-3.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -25,6 +27,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [13] return to:@return + +(byte()) sub1((byte) sub1::i) sub1: scope:[sub1] from main::@1 [14] (byte) sub1::return#1 ← (byte) sub1::i#0 + (byte) sub1::i#0 to:sub1::@return diff --git a/src/test/ref/reserve-zp-procedure-3.log b/src/test/ref/reserve-zp-procedure-3.log index 49fe135b2..d99b2250f 100644 --- a/src/test/ref/reserve-zp-procedure-3.log +++ b/src/test/ref/reserve-zp-procedure-3.log @@ -6,6 +6,8 @@ Culled Empty Block (label) @2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@3 + +(void()) main() main: scope:[main] from @3 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -28,6 +30,8 @@ main::@3: scope:[main] from main::@1 main::@return: scope:[main] from main::@3 return to:@return + +(byte()) sub1((byte) sub1::i) sub1: scope:[sub1] from main::@1 (byte) sub1::i#1 ← phi( main::@1/(byte) sub1::i#0 ) (byte~) sub1::$0 ← (byte) sub1::i#1 + (byte) sub1::i#1 @@ -129,6 +133,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -147,6 +153,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [13] return to:@return + +(byte()) sub1((byte) sub1::i) sub1: scope:[sub1] from main::@1 [14] (byte) sub1::return#1 ← (byte) sub1::i#0 + (byte) sub1::i#0 to:sub1::@return diff --git a/src/test/ref/robozzle64-label-problem.cfg b/src/test/ref/robozzle64-label-problem.cfg index 41b30833b..9b00b5e7a 100644 --- a/src/test/ref/robozzle64-label-problem.cfg +++ b/src/test/ref/robozzle64-label-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -34,6 +36,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [19] return to:@return + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from main::@1 main::@2 [20] (byte) mul8u::a#6 ← phi( main::@1/(byte) mul8u::a#1 main::@2/(byte) mul8u::a#2 ) [20] (word) mul8u::mb#0 ← phi( main::@1/(const byte) mul8u::b#0 main::@2/(const byte) mul8u::b#1 ) diff --git a/src/test/ref/robozzle64-label-problem.log b/src/test/ref/robozzle64-label-problem.log index a72df8e11..d9613d879 100644 --- a/src/test/ref/robozzle64-label-problem.log +++ b/src/test/ref/robozzle64-label-problem.log @@ -14,6 +14,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@6 + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from main::@1 main::@3 (byte) mul8u::a#6 ← phi( main::@1/(byte) mul8u::a#1 main::@3/(byte) mul8u::a#2 ) (byte) mul8u::b#2 ← phi( main::@1/(byte) mul8u::b#0 main::@3/(byte) mul8u::b#1 ) @@ -61,6 +63,8 @@ mul8u::@return: scope:[mul8u] from mul8u::@3 (word) mul8u::return#1 ← (word) mul8u::return#4 return to:@return + +(void()) main() main: scope:[main] from @6 (word*) main::screen#0 ← ((word*)) (number) $400 (byte) main::y#0 ← (byte) 0 @@ -325,6 +329,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -352,6 +358,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [19] return to:@return + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from main::@1 main::@2 [20] (byte) mul8u::a#6 ← phi( main::@1/(byte) mul8u::a#1 main::@2/(byte) mul8u::a#2 ) [20] (word) mul8u::mb#0 ← phi( main::@1/(const byte) mul8u::b#0 main::@2/(const byte) mul8u::b#1 ) diff --git a/src/test/ref/roll-sprite-msb.cfg b/src/test/ref/roll-sprite-msb.cfg index 44c54c5ed..a5cbc8866 100644 --- a/src/test/ref/roll-sprite-msb.cfg +++ b/src/test/ref/roll-sprite-msb.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -25,6 +27,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [12] return to:@return + +(void()) position_sprite((byte) position_sprite::spriteno , (word) position_sprite::x , (byte) position_sprite::y) position_sprite: scope:[position_sprite] from main::@1 [13] (byte~) position_sprite::$1 ← (byte) position_sprite::spriteno#0 << (byte) 1 [14] *((const byte*) SPRITES_YPOS#0 + (byte~) position_sprite::$1) ← (const byte) position_sprite::y#0 diff --git a/src/test/ref/roll-sprite-msb.log b/src/test/ref/roll-sprite-msb.log index 1252e58ab..2b0a372ca 100644 --- a/src/test/ref/roll-sprite-msb.log +++ b/src/test/ref/roll-sprite-msb.log @@ -14,6 +14,8 @@ CONTROL FLOW GRAPH SSA (byte*) SPRITES_YPOS#0 ← ((byte*)) (number) $d001 (byte*) SPRITES_XMSB#0 ← ((byte*)) (number) $d010 to:@6 + +(void()) main() main: scope:[main] from @6 (word) main::xpos#0 ← (number) $c8 (byte) main::s#0 ← (byte) 0 @@ -37,6 +39,8 @@ main::@3: scope:[main] from main::@1 main::@return: scope:[main] from main::@3 return to:@return + +(void()) position_sprite((byte) position_sprite::spriteno , (word) position_sprite::x , (byte) position_sprite::y) position_sprite: scope:[position_sprite] from main::@1 (word) position_sprite::x#1 ← phi( main::@1/(word) position_sprite::x#0 ) (byte) position_sprite::y#1 ← phi( main::@1/(byte) position_sprite::y#0 ) @@ -239,6 +243,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -257,6 +263,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [12] return to:@return + +(void()) position_sprite((byte) position_sprite::spriteno , (word) position_sprite::x , (byte) position_sprite::y) position_sprite: scope:[position_sprite] from main::@1 [13] (byte~) position_sprite::$1 ← (byte) position_sprite::spriteno#0 << (byte) 1 [14] *((const byte*) SPRITES_YPOS#0 + (byte~) position_sprite::$1) ← (const byte) position_sprite::y#0 diff --git a/src/test/ref/roll-variable.cfg b/src/test/ref/roll-variable.cfg index 2fca078ca..a16a8deef 100644 --- a/src/test/ref/roll-variable.cfg +++ b/src/test/ref/roll-variable.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/roll-variable.log b/src/test/ref/roll-variable.log index 8c86ea29a..e413d34bd 100644 --- a/src/test/ref/roll-variable.log +++ b/src/test/ref/roll-variable.log @@ -4,6 +4,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte) main::b#0 ← (byte) 0 @@ -99,6 +101,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/runtime-unused-procedure.cfg b/src/test/ref/runtime-unused-procedure.cfg index 0f943b72c..efe2c52e0 100644 --- a/src/test/ref/runtime-unused-procedure.cfg +++ b/src/test/ref/runtime-unused-procedure.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) screen#0) ← (byte) 'a' to:main::@return diff --git a/src/test/ref/runtime-unused-procedure.log b/src/test/ref/runtime-unused-procedure.log index 08044064d..17fa9d433 100644 --- a/src/test/ref/runtime-unused-procedure.log +++ b/src/test/ref/runtime-unused-procedure.log @@ -9,6 +9,8 @@ CONTROL FLOW GRAPH SSA (byte) call#0 ← (number) 0 (byte*) screen#0 ← ((byte*)) (number) $400 to:@2 + +(void()) main() main: scope:[main] from @2 *((byte*) screen#0 + (number) 0) ← (byte) 'a' (bool~) main::$0 ← (byte) call#0 != (number) 0 @@ -23,6 +25,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main main::@3 return to:@return + +(void()) proc() proc: scope:[proc] from main::@2 *((byte*) screen#0 + (number) 1) ← (byte) 'a' (bool~) proc::$0 ← *((byte*) screen#0 + (number) 1) != (number) 0 @@ -138,6 +142,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) screen#0) ← (byte) 'a' to:main::@return diff --git a/src/test/ref/sandbox-ternary-error.cfg b/src/test/ref/sandbox-ternary-error.cfg index c9f03353f..7ed8dcfbe 100644 --- a/src/test/ref/sandbox-ternary-error.cfg +++ b/src/test/ref/sandbox-ternary-error.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/sandbox-ternary-error.log b/src/test/ref/sandbox-ternary-error.log index 82fcd35f1..8546234c1 100644 --- a/src/test/ref/sandbox-ternary-error.log +++ b/src/test/ref/sandbox-ternary-error.log @@ -7,6 +7,8 @@ Culled Empty Block (label) main::@12 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::b#0 ← (byte) 0 @@ -175,6 +177,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/sandbox.cfg b/src/test/ref/sandbox.cfg index d9047b33f..b97eb09e9 100644 --- a/src/test/ref/sandbox.cfg +++ b/src/test/ref/sandbox.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(signed word()) main() main: scope:[main] from @1 [4] *((const byte*) VICBANK#0) ← (byte) $17 [5] *((const byte*) zp1#0) ← (byte) 0 @@ -97,6 +99,8 @@ main::@12: scope:[main] from main::@5 [52] (word) main::v#1 ← (word) div16u::return#2 [53] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) to:main::@4 + +(word()) div16u((word) div16u::dividend , (word) div16u::divisor) div16u: scope:[div16u] from main::@5 [54] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 [55] call divr16u @@ -108,6 +112,8 @@ div16u::@1: scope:[div16u] from div16u div16u::@return: scope:[div16u] from div16u::@1 [58] return to:@return + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div16u [59] phi() to:divr16u::@1 @@ -143,12 +149,16 @@ divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 divr16u::@return: scope:[divr16u] from divr16u::@3 [75] return to:@return + +(void()) Print() Print: scope:[Print] from main::@13 main::@16 asm { ldy#0 loop: ldastrTemp,y beqdone jsr$FFD2 iny jmploop done: } to:Print::@return Print::@return: scope:[Print] from Print [77] return to:@return + +(byte()) myprintf((byte*) myprintf::dst , (byte*) myprintf::str , (word) myprintf::w1 , (word) myprintf::w2 , (word) myprintf::w3) myprintf: scope:[myprintf] from main::@11 main::@6 [78] (word) myprintf::w3#8 ← phi( main::@11/(word) myprintf::w3#1 main::@6/(word) myprintf::w3#0 ) [78] (word) myprintf::w2#8 ← phi( main::@11/(word) myprintf::w2#1 main::@6/(word) myprintf::w2#0 ) @@ -349,6 +359,8 @@ myprintf::@37: scope:[myprintf] from myprintf::@33 myprintf::@42 myprintf::@47 [157] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#10) ← (byte) myprintf::b#25 [158] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#10 to:myprintf::@32 + +(void()) utoa((word) utoa::value , (byte*) utoa::dst) utoa: scope:[utoa] from myprintf::@9 [159] phi() to:utoa::@13 @@ -432,6 +444,8 @@ utoa::@5: scope:[utoa] from utoa::@13 utoa::@9: scope:[utoa] from utoa::@5 [198] (word) utoa::value#0 ← (word) append::return#2 to:utoa::@1 + +(word()) append((byte*) append::dst , (word) append::value , (word) append::sub) append: scope:[append] from utoa::@5 utoa::@6 utoa::@7 utoa::@8 [199] (word) append::sub#6 ← phi( utoa::@5/(word) $2710 utoa::@6/(word) $3e8 utoa::@7/(byte) $64 utoa::@8/(byte) $a ) [199] (word) append::value#8 ← phi( utoa::@5/(word) append::value#1 utoa::@6/(word) append::value#2 utoa::@7/(word) append::value#3 utoa::@8/(word) append::value#4 ) @@ -449,6 +463,8 @@ append::@2: scope:[append] from append::@1 [204] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) [205] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 to:append::@1 + +(word()) div10((word) div10::val) div10: scope:[div10] from main::@10 [206] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 [207] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 diff --git a/src/test/ref/sandbox.log b/src/test/ref/sandbox.log index ad6a05730..6680f6485 100644 --- a/src/test/ref/sandbox.log +++ b/src/test/ref/sandbox.log @@ -73,6 +73,8 @@ Culled Empty Block (label) main::@25 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@8 + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div16u (word) divr16u::divisor#5 ← phi( div16u/(word) divr16u::divisor#0 ) (word) divr16u::dividend#4 ← phi( div16u/(word) divr16u::dividend#1 ) @@ -146,6 +148,8 @@ divr16u::@return: scope:[divr16u] from divr16u::@6 (word) divr16u::return#1 ← (word) divr16u::return#3 return to:@return + +(word()) div16u((word) div16u::dividend , (word) div16u::divisor) div16u: scope:[div16u] from main::@5 (word) div16u::divisor#1 ← phi( main::@5/(word) div16u::divisor#0 ) (word) div16u::dividend#1 ← phi( main::@5/(word) div16u::dividend#0 ) @@ -173,6 +177,8 @@ div16u::@return: scope:[div16u] from div16u::@2 (byte*) VICBANK#0 ← ((byte*)) (number) $d018 (byte[$64]) strTemp#0 ← { fill( $64, 0) } to:@14 + +(word()) append((byte*) append::dst , (word) append::value , (word) append::sub) append: scope:[append] from utoa::@5 utoa::@6 utoa::@7 utoa::@8 (word) append::sub#6 ← phi( utoa::@5/(word) append::sub#0 utoa::@6/(word) append::sub#1 utoa::@7/(word) append::sub#2 utoa::@8/(word) append::sub#3 ) (word) append::value#8 ← phi( utoa::@5/(word) append::value#1 utoa::@6/(word) append::value#2 utoa::@7/(word) append::value#3 utoa::@8/(word) append::value#4 ) @@ -202,6 +208,8 @@ append::@return: scope:[append] from append::@3 (word) append::return#1 ← (word) append::return#6 return to:@return + +(void()) utoa((word) utoa::value , (byte*) utoa::dst) utoa: scope:[utoa] from myprintf::@9 (byte*) utoa::dst#15 ← phi( myprintf::@9/(byte*) utoa::dst#5 ) (word) utoa::value#5 ← phi( myprintf::@9/(word) utoa::value#4 ) @@ -322,6 +330,8 @@ utoa::@12: scope:[utoa] from utoa::@8 utoa::@return: scope:[utoa] from utoa::@4 return to:@return + +(byte()) myprintf((byte*) myprintf::dst , (byte*) myprintf::str , (word) myprintf::w1 , (word) myprintf::w2 , (word) myprintf::w3) myprintf: scope:[myprintf] from main::@18 main::@6 (word) myprintf::w3#8 ← phi( main::@18/(word) myprintf::w3#1 main::@6/(word) myprintf::w3#0 ) (word) myprintf::w2#8 ← phi( main::@18/(word) myprintf::w2#1 main::@6/(word) myprintf::w2#0 ) @@ -1120,12 +1130,16 @@ myprintf::@return: scope:[myprintf] from myprintf::@3 (byte) myprintf::return#1 ← (byte) myprintf::return#4 return to:@return + +(void()) Print() Print: scope:[Print] from main::@27 main::@30 asm { ldy#0 loop: ldastrTemp,y beqdone jsr$FFD2 iny jmploop done: } to:Print::@return Print::@return: scope:[Print] from Print return to:@return + +(word()) div10((word) div10::val) div10: scope:[div10] from main::@17 (word) div10::val#5 ← phi( main::@17/(word) div10::val#4 ) (word~) div10::$0 ← (word) div10::val#5 >> (number) 1 @@ -1145,6 +1159,8 @@ div10::@return: scope:[div10] from div10 (word) div10::return#1 ← (word) div10::return#3 return to:@return + +(signed word()) main() main: scope:[main] from @14 (word) main::u#0 ← (word) 0 (word) main::v#0 ← (word) 0 @@ -3550,6 +3566,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(signed word()) main() main: scope:[main] from @1 [4] *((const byte*) VICBANK#0) ← (byte) $17 [5] *((const byte*) zp1#0) ← (byte) 0 @@ -3640,6 +3658,8 @@ main::@12: scope:[main] from main::@5 [52] (word) main::v#1 ← (word) div16u::return#2 [53] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) to:main::@4 + +(word()) div16u((word) div16u::dividend , (word) div16u::divisor) div16u: scope:[div16u] from main::@5 [54] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 [55] call divr16u @@ -3651,6 +3671,8 @@ div16u::@1: scope:[div16u] from div16u div16u::@return: scope:[div16u] from div16u::@1 [58] return to:@return + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div16u [59] phi() to:divr16u::@1 @@ -3686,12 +3708,16 @@ divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 divr16u::@return: scope:[divr16u] from divr16u::@3 [75] return to:@return + +(void()) Print() Print: scope:[Print] from main::@13 main::@16 asm { ldy#0 loop: ldastrTemp,y beqdone jsr$FFD2 iny jmploop done: } to:Print::@return Print::@return: scope:[Print] from Print [77] return to:@return + +(byte()) myprintf((byte*) myprintf::dst , (byte*) myprintf::str , (word) myprintf::w1 , (word) myprintf::w2 , (word) myprintf::w3) myprintf: scope:[myprintf] from main::@11 main::@6 [78] (word) myprintf::w3#8 ← phi( main::@11/(word) myprintf::w3#1 main::@6/(word) myprintf::w3#0 ) [78] (word) myprintf::w2#8 ← phi( main::@11/(word) myprintf::w2#1 main::@6/(word) myprintf::w2#0 ) @@ -3892,6 +3918,8 @@ myprintf::@37: scope:[myprintf] from myprintf::@33 myprintf::@42 myprintf::@47 [157] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#10) ← (byte) myprintf::b#25 [158] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#10 to:myprintf::@32 + +(void()) utoa((word) utoa::value , (byte*) utoa::dst) utoa: scope:[utoa] from myprintf::@9 [159] phi() to:utoa::@13 @@ -3975,6 +4003,8 @@ utoa::@5: scope:[utoa] from utoa::@13 utoa::@9: scope:[utoa] from utoa::@5 [198] (word) utoa::value#0 ← (word) append::return#2 to:utoa::@1 + +(word()) append((byte*) append::dst , (word) append::value , (word) append::sub) append: scope:[append] from utoa::@5 utoa::@6 utoa::@7 utoa::@8 [199] (word) append::sub#6 ← phi( utoa::@5/(word) $2710 utoa::@6/(word) $3e8 utoa::@7/(byte) $64 utoa::@8/(byte) $a ) [199] (word) append::value#8 ← phi( utoa::@5/(word) append::value#1 utoa::@6/(word) append::value#2 utoa::@7/(word) append::value#3 utoa::@8/(word) append::value#4 ) @@ -3992,6 +4022,8 @@ append::@2: scope:[append] from append::@1 [204] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) [205] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 to:append::@1 + +(word()) div10((word) div10::val) div10: scope:[div10] from main::@10 [206] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 [207] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 diff --git a/src/test/ref/scan-desire-problem.cfg b/src/test/ref/scan-desire-problem.cfg index 9ceaa9c4d..395f0df84 100644 --- a/src/test/ref/scan-desire-problem.cfg +++ b/src/test/ref/scan-desire-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call init @@ -36,6 +38,8 @@ main::@3: scope:[main] from main::@2 main::@6: scope:[main] from main::@3 [18] (byte) main::y#1 ← ++ (byte) main::y#2 to:main::@2 + +(void()) draw_block((byte) draw_block::tileno , (byte) draw_block::x , (byte) draw_block::y , (byte) draw_block::color) draw_block: scope:[draw_block] from main::@3 [19] (byte) draw_block::tileno#1 ← (byte) draw_block::tileno#0 << (byte) 2 [20] (word) draw_block::x1#0 ← (byte) draw_block::x#0 << (byte) 1 @@ -68,6 +72,8 @@ draw_block::@1: scope:[draw_block] from draw_block draw_block::@return: scope:[draw_block] from draw_block::@1 [44] return to:@return + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from draw_block [45] phi() to:mul8u::@1 @@ -92,6 +98,8 @@ mul8u::@3: scope:[mul8u] from mul8u::@2 mul8u::@4 [53] (byte) mul8u::a#0 ← (byte) mul8u::a#2 >> (byte) 1 [54] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 to:mul8u::@1 + +(void()) init() init: scope:[init] from main [55] phi() [56] call init_sprites @@ -119,6 +127,8 @@ init::@1: scope:[init] from init::toD0181 init::@return: scope:[init] from init::@1 [69] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from init::@2 init::@3 [70] (byte) memset::c#4 ← phi( init::@2/(byte) 0 init::@3/(const byte) BLACK#0 ) [70] (void*) memset::str#3 ← phi( init::@2/(void*)(const byte*) screen#0 init::@3/(void*)(const byte*) colors#0 ) @@ -138,6 +148,8 @@ memset::@3: scope:[memset] from memset::@2 [76] *((byte*) memset::dst#2) ← (byte) memset::c#4 [77] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) init_sprites() init_sprites: scope:[init_sprites] from init [78] *((const byte*) SPRITES_ENABLE#0) ← (byte) 1 [79] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 diff --git a/src/test/ref/scan-desire-problem.log b/src/test/ref/scan-desire-problem.log index 7df41776c..09b56b5de 100644 --- a/src/test/ref/scan-desire-problem.log +++ b/src/test/ref/scan-desire-problem.log @@ -63,6 +63,8 @@ CONTROL FLOW GRAPH SSA (byte) BLUE#0 ← (number) 6 (byte) YELLOW#0 ← (number) 7 to:@20 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from init::@2 init::@3 (byte) memset::c#5 ← phi( init::@2/(byte) memset::c#0 init::@3/(byte) memset::c#1 ) (void*) memset::str#4 ← phi( init::@2/(void*) memset::str#0 init::@3/(void*) memset::str#1 ) @@ -105,6 +107,8 @@ memset::@return: scope:[memset] from memset::@1 (void*) memset::return#1 ← (void*) memset::return#4 return to:@return + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from draw_block (byte) mul8u::a#5 ← phi( draw_block/(byte) mul8u::a#1 ) (byte) mul8u::b#1 ← phi( draw_block/(byte) mul8u::b#0 ) @@ -159,6 +163,8 @@ mul8u::@return: scope:[mul8u] from mul8u::@3 (byte*) colors#0 ← ((byte*)) (number) $d800 (byte*) level_address#0 ← ((byte*)) (number) $3000 to:@24 + +(void()) main() main: scope:[main] from @24 call init to:main::@15 @@ -207,6 +213,8 @@ main::@13: scope:[main] from main::@1 main::@13 main::@return: scope:[main] from main::@13 return to:@return + +(void()) init() init: scope:[init] from main call init_sprites to:init::@2 @@ -260,6 +268,8 @@ init::@1: scope:[init] from init::toD0181_@return init::@return: scope:[init] from init::@1 return to:@return + +(void()) init_sprites() init_sprites: scope:[init_sprites] from init *((byte*) SPRITES_ENABLE#0) ← (number) 1 *((byte*) SPRITES_EXPAND_X#0) ← (number) 0 @@ -271,6 +281,8 @@ init_sprites: scope:[init_sprites] from init init_sprites::@return: scope:[init_sprites] from init_sprites return to:@return + +(void()) draw_block((byte) draw_block::tileno , (byte) draw_block::x , (byte) draw_block::y , (byte) draw_block::color) draw_block: scope:[draw_block] from main::@5 (byte) draw_block::y#2 ← phi( main::@5/(byte) draw_block::y#0 ) (byte) draw_block::x#1 ← phi( main::@5/(byte) draw_block::x#0 ) @@ -1049,6 +1061,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call init @@ -1078,6 +1092,8 @@ main::@3: scope:[main] from main::@2 main::@6: scope:[main] from main::@3 [18] (byte) main::y#1 ← ++ (byte) main::y#2 to:main::@2 + +(void()) draw_block((byte) draw_block::tileno , (byte) draw_block::x , (byte) draw_block::y , (byte) draw_block::color) draw_block: scope:[draw_block] from main::@3 [19] (byte) draw_block::tileno#1 ← (byte) draw_block::tileno#0 << (byte) 2 [20] (word) draw_block::x1#0 ← (byte) draw_block::x#0 << (byte) 1 @@ -1110,6 +1126,8 @@ draw_block::@1: scope:[draw_block] from draw_block draw_block::@return: scope:[draw_block] from draw_block::@1 [44] return to:@return + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from draw_block [45] phi() to:mul8u::@1 @@ -1134,6 +1152,8 @@ mul8u::@3: scope:[mul8u] from mul8u::@2 mul8u::@4 [53] (byte) mul8u::a#0 ← (byte) mul8u::a#2 >> (byte) 1 [54] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 to:mul8u::@1 + +(void()) init() init: scope:[init] from main [55] phi() [56] call init_sprites @@ -1161,6 +1181,8 @@ init::@1: scope:[init] from init::toD0181 init::@return: scope:[init] from init::@1 [69] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from init::@2 init::@3 [70] (byte) memset::c#4 ← phi( init::@2/(byte) 0 init::@3/(const byte) BLACK#0 ) [70] (void*) memset::str#3 ← phi( init::@2/(void*)(const byte*) screen#0 init::@3/(void*)(const byte*) colors#0 ) @@ -1180,6 +1202,8 @@ memset::@3: scope:[memset] from memset::@2 [76] *((byte*) memset::dst#2) ← (byte) memset::c#4 [77] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) init_sprites() init_sprites: scope:[init_sprites] from init [78] *((const byte*) SPRITES_ENABLE#0) ← (byte) 1 [79] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 diff --git a/src/test/ref/screen-center-angle.cfg b/src/test/ref/screen-center-angle.cfg index c0c69df1b..626a52e38 100644 --- a/src/test/ref/screen-center-angle.cfg +++ b/src/test/ref/screen-center-angle.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call init_font_hex @@ -42,6 +44,8 @@ main::@2: scope:[main] from main::toD0182 main::@return: scope:[main] from main::@2 [20] return to:@return + +(void()) print_dword_at((dword) print_dword_at::dw , (byte*) print_dword_at::at) print_dword_at: scope:[print_dword_at] from main::@5 [21] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0 [22] call print_word_at @@ -53,6 +57,8 @@ print_dword_at::@1: scope:[print_dword_at] from print_dword_at print_dword_at::@return: scope:[print_dword_at] from print_dword_at::@1 [25] return to:@return + +(void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at) print_word_at: scope:[print_word_at] from print_dword_at print_dword_at::@1 [26] (byte*) print_word_at::at#2 ← phi( print_dword_at/(const byte*) main::BASE_SCREEN#0 print_dword_at::@1/(const byte*) main::BASE_SCREEN#0+(byte) 4 ) [26] (word) print_word_at::w#2 ← phi( print_dword_at/(word) print_word_at::w#0 print_dword_at::@1/(word) print_word_at::w#1 ) @@ -68,6 +74,8 @@ print_word_at::@1: scope:[print_word_at] from print_word_at print_word_at::@return: scope:[print_word_at] from print_word_at::@1 [33] return to:@return + +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) print_byte_at: scope:[print_byte_at] from print_word_at print_word_at::@1 [34] (byte*) print_byte_at::at#2 ← phi( print_word_at/(byte*) print_byte_at::at#0 print_word_at::@1/(byte*) print_byte_at::at#1 ) [34] (byte) print_byte_at::b#2 ← phi( print_word_at/(byte) print_byte_at::b#0 print_word_at::@1/(byte) print_byte_at::b#1 ) @@ -85,6 +93,8 @@ print_byte_at::@1: scope:[print_byte_at] from print_byte_at print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@1 [43] return to:@return + +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 [44] (byte*) print_char_at::at#2 ← phi( print_byte_at/(byte*) print_char_at::at#0 print_byte_at::@1/(byte*) print_char_at::at#1 ) [44] (byte) print_char_at::ch#2 ← phi( print_byte_at/(byte) print_char_at::ch#0 print_byte_at::@1/(byte) print_char_at::ch#1 ) @@ -93,12 +103,16 @@ print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print_char_at::@return: scope:[print_char_at] from print_char_at [46] return to:@return + +(dword()) clock() clock: scope:[clock] from main::@4 [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) to:clock::@return clock::@return: scope:[clock] from clock [48] return to:@return + +(void()) init_angle_screen((byte*) init_angle_screen::screen) init_angle_screen: scope:[init_angle_screen] from main::@3 [49] phi() to:init_angle_screen::@1 @@ -146,6 +160,8 @@ init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@3 [77] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 [78] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 to:init_angle_screen::@2 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from init_angle_screen::@3 [79] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 to:atan2_16::@2 @@ -243,6 +259,8 @@ atan2_16::@4: scope:[atan2_16] from atan2_16::@3 atan2_16::@1: scope:[atan2_16] from atan2_16 [121] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 + +(void()) clock_start() clock_start: scope:[clock_start] from main::@1 [122] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [123] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 @@ -253,6 +271,8 @@ clock_start: scope:[clock_start] from main::@1 clock_start::@return: scope:[clock_start] from clock_start [127] return to:@return + +(void()) init_font_hex((byte*) init_font_hex::charset) init_font_hex: scope:[init_font_hex] from main [128] phi() to:init_font_hex::@1 diff --git a/src/test/ref/screen-center-angle.log b/src/test/ref/screen-center-angle.log index b8a4fb437..33af63885 100644 --- a/src/test/ref/screen-center-angle.log +++ b/src/test/ref/screen-center-angle.log @@ -96,6 +96,8 @@ CONTROL FLOW GRAPH SSA (byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES#0 ← (number) 0 (byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 ← (number) $40 to:@17 + +(void()) init_font_hex((byte*) init_font_hex::charset) init_font_hex: scope:[init_font_hex] from main (byte*) init_font_hex::charset#6 ← phi( main/(byte*) init_font_hex::charset#1 ) (byte*) init_font_hex::proto_hi#0 ← (byte[]) FONT_HEX_PROTO#0 @@ -172,6 +174,8 @@ init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 .word 256*2*256*atan(1/pow(2,i))/PI/2 }} to:@19 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from init_angle_screen::@3 (signed word) atan2_16::x#9 ← phi( init_angle_screen::@3/(signed word) atan2_16::x#0 ) (signed word) atan2_16::y#1 ← phi( init_angle_screen::@3/(signed word) atan2_16::y#0 ) @@ -385,6 +389,8 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 @19: scope:[] from @17 (dword) CLOCKS_PER_INIT#0 ← (number) $12 to:@38 + +(dword()) clock() clock: scope:[clock] from main::@5 (number~) clock::$0 ← (number) $ffffffff - *((dword*) CIA2_TIMER_AB#0) (dword) clock::return#0 ← (number~) clock::$0 @@ -394,6 +400,8 @@ clock::@return: scope:[clock] from clock (dword) clock::return#1 ← (dword) clock::return#3 return to:@return + +(void()) clock_start() clock_start: scope:[clock_start] from main::@1 (byte~) clock_start::$0 ← (byte) CIA_TIMER_CONTROL_STOP#0 | (byte) CIA_TIMER_CONTROL_CONTINUOUS#0 (byte~) clock_start::$1 ← (byte~) clock_start::$0 | (byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES#0 @@ -412,6 +420,8 @@ clock_start: scope:[clock_start] from main::@1 clock_start::@return: scope:[clock_start] from clock_start return to:@return + +(void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at) print_word_at: scope:[print_word_at] from print_dword_at print_dword_at::@1 (byte*) print_word_at::at#2 ← phi( print_dword_at/(byte*) print_word_at::at#0 print_dword_at::@1/(byte*) print_word_at::at#1 ) (word) print_word_at::w#2 ← phi( print_dword_at/(word) print_word_at::w#0 print_dword_at::@1/(word) print_word_at::w#1 ) @@ -434,6 +444,8 @@ print_word_at::@2: scope:[print_word_at] from print_word_at::@1 print_word_at::@return: scope:[print_word_at] from print_word_at::@2 return to:@return + +(void()) print_dword_at((dword) print_dword_at::dw , (byte*) print_dword_at::at) print_dword_at: scope:[print_dword_at] from main::@6 (byte*) print_dword_at::at#1 ← phi( main::@6/(byte*) print_dword_at::at#0 ) (dword) print_dword_at::dw#1 ← phi( main::@6/(dword) print_dword_at::dw#0 ) @@ -459,6 +471,8 @@ print_dword_at::@return: scope:[print_dword_at] from print_dword_at::@2 @38: scope:[] from @19 (byte[]) print_hextab#0 ← (const string) $1 to:@45 + +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) print_byte_at: scope:[print_byte_at] from print_word_at print_word_at::@1 (byte*) print_byte_at::at#2 ← phi( print_word_at/(byte*) print_byte_at::at#0 print_word_at::@1/(byte*) print_byte_at::at#1 ) (byte) print_byte_at::b#2 ← phi( print_word_at/(byte) print_byte_at::b#0 print_word_at::@1/(byte) print_byte_at::b#1 ) @@ -481,6 +495,8 @@ print_byte_at::@2: scope:[print_byte_at] from print_byte_at::@1 print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@2 return to:@return + +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 (byte*) print_char_at::at#2 ← phi( print_byte_at/(byte*) print_char_at::at#0 print_byte_at::@1/(byte*) print_char_at::at#1 ) (byte) print_char_at::ch#2 ← phi( print_byte_at/(byte) print_char_at::ch#0 print_byte_at::@1/(byte) print_char_at::ch#1 ) @@ -493,6 +509,8 @@ print_char_at::@return: scope:[print_char_at] from print_char_at (byte*) CHARSET#0 ← ((byte*)) (number) $2000 (byte*) SCREEN#0 ← ((byte*)) (number) $2800 to:@47 + +(void()) main() main: scope:[main] from @47 (byte*) init_font_hex::charset#1 ← (byte*) CHARSET#0 call init_font_hex @@ -574,6 +592,8 @@ main::@2: scope:[main] from main::toD0182_@return main::@return: scope:[main] from main::@2 return to:@return + +(void()) init_angle_screen((byte*) init_angle_screen::screen) init_angle_screen: scope:[init_angle_screen] from main::@4 (byte*) init_angle_screen::screen#1 ← phi( main::@4/(byte*) init_angle_screen::screen#0 ) (byte*~) init_angle_screen::$0 ← (byte*) init_angle_screen::screen#1 + (number) $28*(number) $c @@ -2085,6 +2105,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call init_font_hex @@ -2120,6 +2142,8 @@ main::@2: scope:[main] from main::toD0182 main::@return: scope:[main] from main::@2 [20] return to:@return + +(void()) print_dword_at((dword) print_dword_at::dw , (byte*) print_dword_at::at) print_dword_at: scope:[print_dword_at] from main::@5 [21] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0 [22] call print_word_at @@ -2131,6 +2155,8 @@ print_dword_at::@1: scope:[print_dword_at] from print_dword_at print_dword_at::@return: scope:[print_dword_at] from print_dword_at::@1 [25] return to:@return + +(void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at) print_word_at: scope:[print_word_at] from print_dword_at print_dword_at::@1 [26] (byte*) print_word_at::at#2 ← phi( print_dword_at/(const byte*) main::BASE_SCREEN#0 print_dword_at::@1/(const byte*) main::BASE_SCREEN#0+(byte) 4 ) [26] (word) print_word_at::w#2 ← phi( print_dword_at/(word) print_word_at::w#0 print_dword_at::@1/(word) print_word_at::w#1 ) @@ -2146,6 +2172,8 @@ print_word_at::@1: scope:[print_word_at] from print_word_at print_word_at::@return: scope:[print_word_at] from print_word_at::@1 [33] return to:@return + +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) print_byte_at: scope:[print_byte_at] from print_word_at print_word_at::@1 [34] (byte*) print_byte_at::at#2 ← phi( print_word_at/(byte*) print_byte_at::at#0 print_word_at::@1/(byte*) print_byte_at::at#1 ) [34] (byte) print_byte_at::b#2 ← phi( print_word_at/(byte) print_byte_at::b#0 print_word_at::@1/(byte) print_byte_at::b#1 ) @@ -2163,6 +2191,8 @@ print_byte_at::@1: scope:[print_byte_at] from print_byte_at print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@1 [43] return to:@return + +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 [44] (byte*) print_char_at::at#2 ← phi( print_byte_at/(byte*) print_char_at::at#0 print_byte_at::@1/(byte*) print_char_at::at#1 ) [44] (byte) print_char_at::ch#2 ← phi( print_byte_at/(byte) print_char_at::ch#0 print_byte_at::@1/(byte) print_char_at::ch#1 ) @@ -2171,12 +2201,16 @@ print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print_char_at::@return: scope:[print_char_at] from print_char_at [46] return to:@return + +(dword()) clock() clock: scope:[clock] from main::@4 [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) to:clock::@return clock::@return: scope:[clock] from clock [48] return to:@return + +(void()) init_angle_screen((byte*) init_angle_screen::screen) init_angle_screen: scope:[init_angle_screen] from main::@3 [49] phi() to:init_angle_screen::@1 @@ -2224,6 +2258,8 @@ init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@3 [77] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 [78] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 to:init_angle_screen::@2 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from init_angle_screen::@3 [79] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 to:atan2_16::@2 @@ -2321,6 +2357,8 @@ atan2_16::@4: scope:[atan2_16] from atan2_16::@3 atan2_16::@1: scope:[atan2_16] from atan2_16 [121] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 + +(void()) clock_start() clock_start: scope:[clock_start] from main::@1 [122] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [123] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 @@ -2331,6 +2369,8 @@ clock_start: scope:[clock_start] from main::@1 clock_start::@return: scope:[clock_start] from clock_start [127] return to:@return + +(void()) init_font_hex((byte*) init_font_hex::charset) init_font_hex: scope:[init_font_hex] from main [128] phi() to:init_font_hex::@1 diff --git a/src/test/ref/screen-center-distance.cfg b/src/test/ref/screen-center-distance.cfg index 4b9c4ff05..0151b9aa1 100644 --- a/src/test/ref/screen-center-distance.cfg +++ b/src/test/ref/screen-center-distance.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call init_font_hex @@ -42,6 +44,8 @@ main::@2: scope:[main] from main::toD0182 main::@return: scope:[main] from main::@2 [20] return to:@return + +(void()) print_dword_at((dword) print_dword_at::dw , (byte*) print_dword_at::at) print_dword_at: scope:[print_dword_at] from main::@5 [21] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0 [22] call print_word_at @@ -53,6 +57,8 @@ print_dword_at::@1: scope:[print_dword_at] from print_dword_at print_dword_at::@return: scope:[print_dword_at] from print_dword_at::@1 [25] return to:@return + +(void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at) print_word_at: scope:[print_word_at] from print_dword_at print_dword_at::@1 [26] (byte*) print_word_at::at#2 ← phi( print_dword_at/(const byte*) main::BASE_SCREEN#0 print_dword_at::@1/(const byte*) main::BASE_SCREEN#0+(byte) 4 ) [26] (word) print_word_at::w#2 ← phi( print_dword_at/(word) print_word_at::w#0 print_dword_at::@1/(word) print_word_at::w#1 ) @@ -68,6 +74,8 @@ print_word_at::@1: scope:[print_word_at] from print_word_at print_word_at::@return: scope:[print_word_at] from print_word_at::@1 [33] return to:@return + +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) print_byte_at: scope:[print_byte_at] from print_word_at print_word_at::@1 [34] (byte*) print_byte_at::at#2 ← phi( print_word_at/(byte*) print_byte_at::at#0 print_word_at::@1/(byte*) print_byte_at::at#1 ) [34] (byte) print_byte_at::b#2 ← phi( print_word_at/(byte) print_byte_at::b#0 print_word_at::@1/(byte) print_byte_at::b#1 ) @@ -85,6 +93,8 @@ print_byte_at::@1: scope:[print_byte_at] from print_byte_at print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@1 [43] return to:@return + +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 [44] (byte*) print_char_at::at#2 ← phi( print_byte_at/(byte*) print_char_at::at#0 print_byte_at::@1/(byte*) print_char_at::at#1 ) [44] (byte) print_char_at::ch#2 ← phi( print_byte_at/(byte) print_char_at::ch#0 print_byte_at::@1/(byte) print_char_at::ch#1 ) @@ -93,12 +103,16 @@ print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print_char_at::@return: scope:[print_char_at] from print_char_at [46] return to:@return + +(dword()) clock() clock: scope:[clock] from main::@4 [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) to:clock::@return clock::@return: scope:[clock] from clock [48] return to:@return + +(void()) init_dist_screen((byte*) init_dist_screen::screen) init_dist_screen: scope:[init_dist_screen] from main::@3 [49] phi() [50] call init_squares @@ -171,6 +185,8 @@ init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 [87] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 to:init_dist_screen::@4 + +(byte()) sqrt((word) sqrt::val) sqrt: scope:[sqrt] from init_dist_screen::@12 [88] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [89] call bsearch16u @@ -185,6 +201,8 @@ sqrt::@1: scope:[sqrt] from sqrt sqrt::@return: scope:[sqrt] from sqrt::@1 [95] return to:@return + +(word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) bsearch16u: scope:[bsearch16u] from sqrt [96] phi() to:bsearch16u::@3 @@ -228,6 +246,8 @@ bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 [113] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) [114] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 to:bsearch16u::@3 + +(word()) sqr((byte) sqr::val) sqr: scope:[sqr] from init_dist_screen::@10 init_dist_screen::@4 [115] (byte) sqr::val#2 ← phi( init_dist_screen::@10/(byte) sqr::val#1 init_dist_screen::@4/(byte) sqr::val#0 ) [116] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 @@ -236,6 +256,8 @@ sqr: scope:[sqr] from init_dist_screen::@10 init_dist_screen::@4 sqr::@return: scope:[sqr] from sqr [118] return to:@return + +(void()) init_squares() init_squares: scope:[init_squares] from init_dist_screen [119] phi() [120] call malloc @@ -255,12 +277,16 @@ init_squares::@1: scope:[init_squares] from init_squares init_squares::@1 init_squares::@return: scope:[init_squares] from init_squares::@1 [129] return to:@return + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from init_squares [130] phi() to:malloc::@return malloc::@return: scope:[malloc] from malloc [131] return to:@return + +(void()) clock_start() clock_start: scope:[clock_start] from main::@1 [132] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [133] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 @@ -271,6 +297,8 @@ clock_start: scope:[clock_start] from main::@1 clock_start::@return: scope:[clock_start] from clock_start [137] return to:@return + +(void()) init_font_hex((byte*) init_font_hex::charset) init_font_hex: scope:[init_font_hex] from main [138] phi() to:init_font_hex::@1 diff --git a/src/test/ref/screen-center-distance.log b/src/test/ref/screen-center-distance.log index d9b2ead70..a3b3826be 100644 --- a/src/test/ref/screen-center-distance.log +++ b/src/test/ref/screen-center-distance.log @@ -92,6 +92,8 @@ CONTROL FLOW GRAPH SSA (byte*) HEAP_TOP#0 ← ((byte*)) (number) $a000 (byte*) heap_head#0 ← (byte*) HEAP_TOP#0 to:@12 + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from init_squares (word) malloc::size#1 ← phi( init_squares/(word) malloc::size#0 ) (byte*) heap_head#10 ← phi( init_squares/(byte*) heap_head#19 ) @@ -107,6 +109,8 @@ malloc::@return: scope:[malloc] from malloc (byte*) heap_head#2 ← (byte*) heap_head#11 return to:@return + +(word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) bsearch16u: scope:[bsearch16u] from sqrt (word) bsearch16u::key#4 ← phi( sqrt/(word) bsearch16u::key#0 ) (word*) bsearch16u::items#7 ← phi( sqrt/(word*) bsearch16u::items#1 ) @@ -194,6 +198,8 @@ bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2 (byte) NUM_SQUARES#0 ← (number) $ff (word*) SQUARES#0 ← (word*) 0 to:@15 + +(void()) init_squares() init_squares: scope:[init_squares] from init_dist_screen (byte*) heap_head#19 ← phi( init_dist_screen/(byte*) heap_head#23 ) (byte) NUM_SQUARES#6 ← phi( init_dist_screen/(byte) NUM_SQUARES#3 ) @@ -236,6 +242,8 @@ init_squares::@return: scope:[init_squares] from init_squares::@1 (word*) SQUARES#2 ← (word*) SQUARES#8 return to:@return + +(word()) sqr((byte) sqr::val) sqr: scope:[sqr] from init_dist_screen::@10 init_dist_screen::@4 (word*) SQUARES#9 ← phi( init_dist_screen::@10/(word*) SQUARES#18 init_dist_screen::@4/(word*) SQUARES#19 ) (byte) sqr::val#2 ← phi( init_dist_screen::@10/(byte) sqr::val#1 init_dist_screen::@4/(byte) sqr::val#0 ) @@ -247,6 +255,8 @@ sqr::@return: scope:[sqr] from sqr (word) sqr::return#1 ← (word) sqr::return#4 return to:@return + +(byte()) sqrt((word) sqrt::val) sqrt: scope:[sqrt] from init_dist_screen::@21 (byte) NUM_SQUARES#8 ← phi( init_dist_screen::@21/(byte) NUM_SQUARES#13 ) (word*) SQUARES#10 ← phi( init_dist_screen::@21/(word*) SQUARES#20 ) @@ -287,6 +297,8 @@ sqrt::@return: scope:[sqrt] from sqrt::@2 (byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES#0 ← (number) 0 (byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 ← (number) $40 to:@20 + +(void()) init_font_hex((byte*) init_font_hex::charset) init_font_hex: scope:[init_font_hex] from main (byte*) init_font_hex::charset#6 ← phi( main/(byte*) init_font_hex::charset#1 ) (byte*) init_font_hex::proto_hi#0 ← (byte[]) FONT_HEX_PROTO#0 @@ -363,6 +375,8 @@ init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 (byte[]) FONT_HEX_PROTO#0 ← { (number) 2, (number) 5, (number) 5, (number) 5, (number) 2, (number) 6, (number) 2, (number) 2, (number) 2, (number) 7, (number) 6, (number) 1, (number) 2, (number) 4, (number) 7, (number) 6, (number) 1, (number) 2, (number) 1, (number) 6, (number) 5, (number) 5, (number) 7, (number) 1, (number) 1, (number) 7, (number) 4, (number) 6, (number) 1, (number) 6, (number) 3, (number) 4, (number) 6, (number) 5, (number) 2, (number) 7, (number) 1, (number) 1, (number) 1, (number) 1, (number) 2, (number) 5, (number) 2, (number) 5, (number) 2, (number) 2, (number) 5, (number) 3, (number) 1, (number) 1, (number) 2, (number) 5, (number) 7, (number) 5, (number) 5, (number) 6, (number) 5, (number) 6, (number) 5, (number) 6, (number) 2, (number) 5, (number) 4, (number) 5, (number) 2, (number) 6, (number) 5, (number) 5, (number) 5, (number) 6, (number) 7, (number) 4, (number) 6, (number) 4, (number) 7, (number) 7, (number) 4, (number) 6, (number) 4, (number) 4 } (dword) CLOCKS_PER_INIT#0 ← (number) $12 to:@39 + +(dword()) clock() clock: scope:[clock] from main::@5 (number~) clock::$0 ← (number) $ffffffff - *((dword*) CIA2_TIMER_AB#0) (dword) clock::return#0 ← (number~) clock::$0 @@ -372,6 +386,8 @@ clock::@return: scope:[clock] from clock (dword) clock::return#1 ← (dword) clock::return#3 return to:@return + +(void()) clock_start() clock_start: scope:[clock_start] from main::@1 (byte~) clock_start::$0 ← (byte) CIA_TIMER_CONTROL_STOP#0 | (byte) CIA_TIMER_CONTROL_CONTINUOUS#0 (byte~) clock_start::$1 ← (byte~) clock_start::$0 | (byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES#0 @@ -390,6 +406,8 @@ clock_start: scope:[clock_start] from main::@1 clock_start::@return: scope:[clock_start] from clock_start return to:@return + +(void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at) print_word_at: scope:[print_word_at] from print_dword_at print_dword_at::@1 (byte*) print_word_at::at#2 ← phi( print_dword_at/(byte*) print_word_at::at#0 print_dword_at::@1/(byte*) print_word_at::at#1 ) (word) print_word_at::w#2 ← phi( print_dword_at/(word) print_word_at::w#0 print_dword_at::@1/(word) print_word_at::w#1 ) @@ -412,6 +430,8 @@ print_word_at::@2: scope:[print_word_at] from print_word_at::@1 print_word_at::@return: scope:[print_word_at] from print_word_at::@2 return to:@return + +(void()) print_dword_at((dword) print_dword_at::dw , (byte*) print_dword_at::at) print_dword_at: scope:[print_dword_at] from main::@6 (byte*) print_dword_at::at#1 ← phi( main::@6/(byte*) print_dword_at::at#0 ) (dword) print_dword_at::dw#1 ← phi( main::@6/(dword) print_dword_at::dw#0 ) @@ -440,6 +460,8 @@ print_dword_at::@return: scope:[print_dword_at] from print_dword_at::@2 (byte) NUM_SQUARES#23 ← phi( @20/(byte) NUM_SQUARES#30 ) (byte[]) print_hextab#0 ← (const string) $1 to:@46 + +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) print_byte_at: scope:[print_byte_at] from print_word_at print_word_at::@1 (byte*) print_byte_at::at#2 ← phi( print_word_at/(byte*) print_byte_at::at#0 print_word_at::@1/(byte*) print_byte_at::at#1 ) (byte) print_byte_at::b#2 ← phi( print_word_at/(byte) print_byte_at::b#0 print_word_at::@1/(byte) print_byte_at::b#1 ) @@ -462,6 +484,8 @@ print_byte_at::@2: scope:[print_byte_at] from print_byte_at::@1 print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@2 return to:@return + +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 (byte*) print_char_at::at#2 ← phi( print_byte_at/(byte*) print_char_at::at#0 print_byte_at::@1/(byte*) print_char_at::at#1 ) (byte) print_char_at::ch#2 ← phi( print_byte_at/(byte) print_char_at::ch#0 print_byte_at::@1/(byte) print_char_at::ch#1 ) @@ -477,6 +501,8 @@ print_char_at::@return: scope:[print_char_at] from print_char_at (byte*) CHARSET#0 ← ((byte*)) (number) $2000 (byte*) SCREEN#0 ← ((byte*)) (number) $2800 to:@48 + +(void()) main() main: scope:[main] from @48 (word*) SQUARES#47 ← phi( @48/(word*) SQUARES#25 ) (byte*) heap_head#47 ← phi( @48/(byte*) heap_head#25 ) @@ -603,6 +629,8 @@ main::@return: scope:[main] from main::@2 (word*) SQUARES#4 ← (word*) SQUARES#13 return to:@return + +(void()) init_dist_screen((byte*) init_dist_screen::screen) init_dist_screen: scope:[init_dist_screen] from main::@4 (byte*) init_dist_screen::screen#2 ← phi( main::@4/(byte*) init_dist_screen::screen#0 ) (word*) SQUARES#23 ← phi( main::@4/(word*) SQUARES#21 ) @@ -2524,6 +2552,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call init_font_hex @@ -2559,6 +2589,8 @@ main::@2: scope:[main] from main::toD0182 main::@return: scope:[main] from main::@2 [20] return to:@return + +(void()) print_dword_at((dword) print_dword_at::dw , (byte*) print_dword_at::at) print_dword_at: scope:[print_dword_at] from main::@5 [21] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0 [22] call print_word_at @@ -2570,6 +2602,8 @@ print_dword_at::@1: scope:[print_dword_at] from print_dword_at print_dword_at::@return: scope:[print_dword_at] from print_dword_at::@1 [25] return to:@return + +(void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at) print_word_at: scope:[print_word_at] from print_dword_at print_dword_at::@1 [26] (byte*) print_word_at::at#2 ← phi( print_dword_at/(const byte*) main::BASE_SCREEN#0 print_dword_at::@1/(const byte*) main::BASE_SCREEN#0+(byte) 4 ) [26] (word) print_word_at::w#2 ← phi( print_dword_at/(word) print_word_at::w#0 print_dword_at::@1/(word) print_word_at::w#1 ) @@ -2585,6 +2619,8 @@ print_word_at::@1: scope:[print_word_at] from print_word_at print_word_at::@return: scope:[print_word_at] from print_word_at::@1 [33] return to:@return + +(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at) print_byte_at: scope:[print_byte_at] from print_word_at print_word_at::@1 [34] (byte*) print_byte_at::at#2 ← phi( print_word_at/(byte*) print_byte_at::at#0 print_word_at::@1/(byte*) print_byte_at::at#1 ) [34] (byte) print_byte_at::b#2 ← phi( print_word_at/(byte) print_byte_at::b#0 print_word_at::@1/(byte) print_byte_at::b#1 ) @@ -2602,6 +2638,8 @@ print_byte_at::@1: scope:[print_byte_at] from print_byte_at print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@1 [43] return to:@return + +(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at) print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 [44] (byte*) print_char_at::at#2 ← phi( print_byte_at/(byte*) print_char_at::at#0 print_byte_at::@1/(byte*) print_char_at::at#1 ) [44] (byte) print_char_at::ch#2 ← phi( print_byte_at/(byte) print_char_at::ch#0 print_byte_at::@1/(byte) print_char_at::ch#1 ) @@ -2610,12 +2648,16 @@ print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print_char_at::@return: scope:[print_char_at] from print_char_at [46] return to:@return + +(dword()) clock() clock: scope:[clock] from main::@4 [47] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) to:clock::@return clock::@return: scope:[clock] from clock [48] return to:@return + +(void()) init_dist_screen((byte*) init_dist_screen::screen) init_dist_screen: scope:[init_dist_screen] from main::@3 [49] phi() [50] call init_squares @@ -2688,6 +2730,8 @@ init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 [87] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 to:init_dist_screen::@4 + +(byte()) sqrt((word) sqrt::val) sqrt: scope:[sqrt] from init_dist_screen::@12 [88] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [89] call bsearch16u @@ -2702,6 +2746,8 @@ sqrt::@1: scope:[sqrt] from sqrt sqrt::@return: scope:[sqrt] from sqrt::@1 [95] return to:@return + +(word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) bsearch16u: scope:[bsearch16u] from sqrt [96] phi() to:bsearch16u::@3 @@ -2745,6 +2791,8 @@ bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 [113] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) [114] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 to:bsearch16u::@3 + +(word()) sqr((byte) sqr::val) sqr: scope:[sqr] from init_dist_screen::@10 init_dist_screen::@4 [115] (byte) sqr::val#2 ← phi( init_dist_screen::@10/(byte) sqr::val#1 init_dist_screen::@4/(byte) sqr::val#0 ) [116] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 @@ -2753,6 +2801,8 @@ sqr: scope:[sqr] from init_dist_screen::@10 init_dist_screen::@4 sqr::@return: scope:[sqr] from sqr [118] return to:@return + +(void()) init_squares() init_squares: scope:[init_squares] from init_dist_screen [119] phi() [120] call malloc @@ -2772,12 +2822,16 @@ init_squares::@1: scope:[init_squares] from init_squares init_squares::@1 init_squares::@return: scope:[init_squares] from init_squares::@1 [129] return to:@return + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from init_squares [130] phi() to:malloc::@return malloc::@return: scope:[malloc] from malloc [131] return to:@return + +(void()) clock_start() clock_start: scope:[clock_start] from main::@1 [132] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [133] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 @@ -2788,6 +2842,8 @@ clock_start: scope:[clock_start] from main::@1 clock_start::@return: scope:[clock_start] from clock_start [137] return to:@return + +(void()) init_font_hex((byte*) init_font_hex::charset) init_font_hex: scope:[init_font_hex] from main [138] phi() to:init_font_hex::@1 diff --git a/src/test/ref/screen-show-spiral-buckets.cfg b/src/test/ref/screen-show-spiral-buckets.cfg index 7e6b8ccd7..e45c1c930 100644 --- a/src/test/ref/screen-show-spiral-buckets.cfg +++ b/src/test/ref/screen-show-spiral-buckets.cfg @@ -33,6 +33,8 @@ to:@end @end: scope:[] from @3 [15] phi() + +(void()) main() main: scope:[main] from @3 asm { sei } [17] (byte*) init_dist_screen::screen#0 ← (byte[])(void*) SCREEN_DIST#0 @@ -111,6 +113,8 @@ main::@17: scope:[main] from main::@9 main::@18: scope:[main] from main::@6 [52] (word~) main::min_offset#11 ← (word) main::min_offset#2 to:main::@8 + +(void()) init_buckets((byte*) init_buckets::screen) init_buckets: scope:[init_buckets] from main::@16 [53] phi() to:init_buckets::@1 @@ -173,6 +177,8 @@ init_buckets::@7: scope:[init_buckets] from init_buckets::@6 init_buckets::@7 init_buckets::@return: scope:[init_buckets] from init_buckets::@7 [92] return to:@return + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from @1 @2 @4 @6 @7 init_buckets::@4 init_squares [93] (word) malloc::size#7 ← phi( @1/(word) $3e8 @2/(const byte) NUM_BUCKETS#0*(const byte) SIZEOF_BYTE @4/(word) $3e8 @6/(const byte) NUM_BUCKETS#0*(const byte) SIZEOF_POINTER @7/(const byte) NUM_BUCKETS#0*(const byte) SIZEOF_BYTE init_buckets::@4/(word) malloc::size#6 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD ) [93] (byte*) heap_head#18 ← phi( @1/(const byte*) HEAP_TOP#0 @2/(byte*) heap_head#1 @4/(byte*) heap_head#1 @6/(byte*) heap_head#1 @7/(byte*) heap_head#1 init_buckets::@4/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) @@ -182,6 +188,8 @@ malloc: scope:[malloc] from @1 @2 @4 @6 @7 init_buckets::@4 init_squares malloc::@return: scope:[malloc] from malloc [96] return to:@return + +(void()) init_angle_screen((byte*) init_angle_screen::screen) init_angle_screen: scope:[init_angle_screen] from main::@15 [97] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [98] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c @@ -230,6 +238,8 @@ init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@3 [126] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 [127] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 to:init_angle_screen::@2 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from init_angle_screen::@3 [128] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 to:atan2_16::@2 @@ -327,6 +337,8 @@ atan2_16::@4: scope:[atan2_16] from atan2_16::@3 atan2_16::@1: scope:[atan2_16] from atan2_16 [170] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 + +(void()) init_dist_screen((byte*) init_dist_screen::screen) init_dist_screen: scope:[init_dist_screen] from main [171] phi() [172] call init_squares @@ -402,6 +414,8 @@ init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 [210] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 to:init_dist_screen::@4 + +(byte()) sqrt((word) sqrt::val) sqrt: scope:[sqrt] from init_dist_screen::@13 [211] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [212] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 @@ -417,6 +431,8 @@ sqrt::@1: scope:[sqrt] from sqrt sqrt::@return: scope:[sqrt] from sqrt::@1 [219] return to:@return + +(word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) bsearch16u: scope:[bsearch16u] from sqrt [220] phi() to:bsearch16u::@3 @@ -460,6 +476,8 @@ bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 [237] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) [238] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 to:bsearch16u::@3 + +(word()) sqr((byte) sqr::val) sqr: scope:[sqr] from init_dist_screen::@10 init_dist_screen::@4 [239] (byte) sqr::val#2 ← phi( init_dist_screen::@10/(byte) sqr::val#1 init_dist_screen::@4/(byte) sqr::val#0 ) [240] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 @@ -468,6 +486,8 @@ sqr: scope:[sqr] from init_dist_screen::@10 init_dist_screen::@4 sqr::@return: scope:[sqr] from sqr [242] return to:@return + +(void()) init_squares() init_squares: scope:[init_squares] from init_dist_screen [243] phi() [244] call malloc diff --git a/src/test/ref/screen-show-spiral-buckets.log b/src/test/ref/screen-show-spiral-buckets.log index 45cd856c2..fa2f6feb8 100644 --- a/src/test/ref/screen-show-spiral-buckets.log +++ b/src/test/ref/screen-show-spiral-buckets.log @@ -103,6 +103,8 @@ CONTROL FLOW GRAPH SSA (byte*) HEAP_TOP#0 ← ((byte*)) (number) $a000 (byte*) heap_head#0 ← (byte*) HEAP_TOP#0 to:@16 + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from @21 @22 @26 @28 @29 init_buckets::@5 init_squares (word) malloc::size#7 ← phi( @21/(word) malloc::size#1 @22/(word) malloc::size#3 @26/(word) malloc::size#2 @28/(word) malloc::size#4 @29/(word) malloc::size#5 init_buckets::@5/(word) malloc::size#6 init_squares/(word) malloc::size#0 ) (byte*) heap_head#18 ← phi( @21/(byte*) heap_head#35 @22/(byte*) heap_head#36 @26/(byte*) heap_head#5 @28/(byte*) heap_head#10 @29/(byte*) heap_head#11 init_buckets::@5/(byte*) heap_head#37 init_squares/(byte*) heap_head#38 ) @@ -118,6 +120,8 @@ malloc::@return: scope:[malloc] from malloc (byte*) heap_head#2 ← (byte*) heap_head#19 return to:@return + +(word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) bsearch16u: scope:[bsearch16u] from sqrt (word) bsearch16u::key#4 ← phi( sqrt/(word) bsearch16u::key#0 ) (word*) bsearch16u::items#7 ← phi( sqrt/(word*) bsearch16u::items#1 ) @@ -205,6 +209,8 @@ bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2 (byte) NUM_SQUARES#0 ← (number) $ff (word*) SQUARES#0 ← (word*) 0 to:@19 + +(void()) init_squares() init_squares: scope:[init_squares] from init_dist_screen (byte*) heap_head#38 ← phi( init_dist_screen/(byte*) heap_head#44 ) (byte) NUM_SQUARES#6 ← phi( init_dist_screen/(byte) NUM_SQUARES#3 ) @@ -247,6 +253,8 @@ init_squares::@return: scope:[init_squares] from init_squares::@1 (word*) SQUARES#2 ← (word*) SQUARES#8 return to:@return + +(word()) sqr((byte) sqr::val) sqr: scope:[sqr] from init_dist_screen::@10 init_dist_screen::@4 (word*) SQUARES#9 ← phi( init_dist_screen::@10/(word*) SQUARES#18 init_dist_screen::@4/(word*) SQUARES#19 ) (byte) sqr::val#2 ← phi( init_dist_screen::@10/(byte) sqr::val#1 init_dist_screen::@4/(byte) sqr::val#0 ) @@ -258,6 +266,8 @@ sqr::@return: scope:[sqr] from sqr (word) sqr::return#1 ← (word) sqr::return#4 return to:@return + +(byte()) sqrt((word) sqrt::val) sqrt: scope:[sqrt] from init_dist_screen::@21 (byte) NUM_SQUARES#8 ← phi( init_dist_screen::@21/(byte) NUM_SQUARES#13 ) (word*) SQUARES#10 ← phi( init_dist_screen::@21/(word*) SQUARES#20 ) @@ -293,6 +303,8 @@ sqrt::@return: scope:[sqrt] from sqrt::@2 .word 256*2*256*atan(1/pow(2,i))/PI/2 }} to:@21 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from init_angle_screen::@3 (signed word) atan2_16::x#9 ← phi( init_angle_screen::@3/(signed word) atan2_16::x#0 ) (signed word) atan2_16::y#1 ← phi( init_angle_screen::@3/(signed word) atan2_16::y#0 ) @@ -534,6 +546,8 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 (byte*) SCREEN_FILL#0 ← ((byte*)) (number) $400 (byte) FILL_CHAR#0 ← (byte) '*' to:@22 + +(void()) main() main: scope:[main] from @25 (word*) SQUARES#21 ← phi( @25/(word*) SQUARES#25 ) (byte*) heap_head#40 ← phi( @25/(byte*) heap_head#46 ) @@ -783,6 +797,8 @@ main::@return: scope:[main] from main::@28 (byte*) heap_head#12 ← (byte*) heap_head#29 (byte[]) BUCKET_IDX#0 ← ((byte[])) (void*~) $7 to:@25 + +(void()) init_buckets((byte*) init_buckets::screen) init_buckets: scope:[init_buckets] from main::@35 (byte*) heap_head#76 ← phi( main::@35/(byte*) heap_head#41 ) (byte*) init_buckets::screen#6 ← phi( main::@35/(byte*) init_buckets::screen#0 ) @@ -887,6 +903,8 @@ init_buckets::@return: scope:[init_buckets] from init_buckets::@9 (byte*) heap_head#14 ← (byte*) heap_head#31 return to:@return + +(void()) init_angle_screen((byte*) init_angle_screen::screen) init_angle_screen: scope:[init_angle_screen] from main::@34 (byte*) init_angle_screen::screen#1 ← phi( main::@34/(byte*) init_angle_screen::screen#0 ) (byte*~) init_angle_screen::$0 ← (byte*) init_angle_screen::screen#1 + (number) $28*(number) $c @@ -966,6 +984,8 @@ init_angle_screen::@4: scope:[init_angle_screen] from init_angle_screen::@2 init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@4 return to:@return + +(void()) init_dist_screen((byte*) init_dist_screen::screen) init_dist_screen: scope:[init_dist_screen] from main (byte*) init_dist_screen::screen#2 ← phi( main/(byte*) init_dist_screen::screen#0 ) (word*) SQUARES#23 ← phi( main/(word*) SQUARES#21 ) @@ -3408,6 +3428,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @3 [15] phi() + +(void()) main() main: scope:[main] from @3 asm { sei } [17] (byte*) init_dist_screen::screen#0 ← (byte[])(void*) SCREEN_DIST#0 @@ -3486,6 +3508,8 @@ main::@17: scope:[main] from main::@9 main::@18: scope:[main] from main::@6 [52] (word~) main::min_offset#11 ← (word) main::min_offset#2 to:main::@8 + +(void()) init_buckets((byte*) init_buckets::screen) init_buckets: scope:[init_buckets] from main::@16 [53] phi() to:init_buckets::@1 @@ -3548,6 +3572,8 @@ init_buckets::@7: scope:[init_buckets] from init_buckets::@6 init_buckets::@7 init_buckets::@return: scope:[init_buckets] from init_buckets::@7 [92] return to:@return + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from @1 @2 @4 @6 @7 init_buckets::@4 init_squares [93] (word) malloc::size#7 ← phi( @1/(word) $3e8 @2/(const byte) NUM_BUCKETS#0*(const byte) SIZEOF_BYTE @4/(word) $3e8 @6/(const byte) NUM_BUCKETS#0*(const byte) SIZEOF_POINTER @7/(const byte) NUM_BUCKETS#0*(const byte) SIZEOF_BYTE init_buckets::@4/(word) malloc::size#6 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD ) [93] (byte*) heap_head#18 ← phi( @1/(const byte*) HEAP_TOP#0 @2/(byte*) heap_head#1 @4/(byte*) heap_head#1 @6/(byte*) heap_head#1 @7/(byte*) heap_head#1 init_buckets::@4/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) @@ -3557,6 +3583,8 @@ malloc: scope:[malloc] from @1 @2 @4 @6 @7 init_buckets::@4 init_squares malloc::@return: scope:[malloc] from malloc [96] return to:@return + +(void()) init_angle_screen((byte*) init_angle_screen::screen) init_angle_screen: scope:[init_angle_screen] from main::@15 [97] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [98] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c @@ -3605,6 +3633,8 @@ init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@3 [126] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 [127] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 to:init_angle_screen::@2 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from init_angle_screen::@3 [128] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 to:atan2_16::@2 @@ -3702,6 +3732,8 @@ atan2_16::@4: scope:[atan2_16] from atan2_16::@3 atan2_16::@1: scope:[atan2_16] from atan2_16 [170] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 + +(void()) init_dist_screen((byte*) init_dist_screen::screen) init_dist_screen: scope:[init_dist_screen] from main [171] phi() [172] call init_squares @@ -3777,6 +3809,8 @@ init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 [210] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 to:init_dist_screen::@4 + +(byte()) sqrt((word) sqrt::val) sqrt: scope:[sqrt] from init_dist_screen::@13 [211] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [212] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 @@ -3792,6 +3826,8 @@ sqrt::@1: scope:[sqrt] from sqrt sqrt::@return: scope:[sqrt] from sqrt::@1 [219] return to:@return + +(word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) bsearch16u: scope:[bsearch16u] from sqrt [220] phi() to:bsearch16u::@3 @@ -3835,6 +3871,8 @@ bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 [237] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) [238] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 to:bsearch16u::@3 + +(word()) sqr((byte) sqr::val) sqr: scope:[sqr] from init_dist_screen::@10 init_dist_screen::@4 [239] (byte) sqr::val#2 ← phi( init_dist_screen::@10/(byte) sqr::val#1 init_dist_screen::@4/(byte) sqr::val#0 ) [240] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 @@ -3843,6 +3881,8 @@ sqr: scope:[sqr] from init_dist_screen::@10 init_dist_screen::@4 sqr::@return: scope:[sqr] from sqr [242] return to:@return + +(void()) init_squares() init_squares: scope:[init_squares] from init_dist_screen [243] phi() [244] call malloc diff --git a/src/test/ref/screen-show-spiral.cfg b/src/test/ref/screen-show-spiral.cfg index 7742cac6e..d3048fb7c 100644 --- a/src/test/ref/screen-show-spiral.cfg +++ b/src/test/ref/screen-show-spiral.cfg @@ -18,6 +18,8 @@ to:@end @end: scope:[] from @2 [8] phi() + +(void()) main() main: scope:[main] from @2 [9] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 [10] call init_dist_screen @@ -71,6 +73,8 @@ main::@11: scope:[main] from main::@4 main::@10: scope:[main] from main::@2 [30] (word~) main::min_dist_angle#7 ← (word) main::min_dist_angle#2 to:main::@3 + +(void()) init_angle_screen((byte*) init_angle_screen::screen) init_angle_screen: scope:[init_angle_screen] from main::@8 [31] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [32] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c @@ -119,6 +123,8 @@ init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@3 [60] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 [61] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 to:init_angle_screen::@2 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from init_angle_screen::@3 [62] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 to:atan2_16::@2 @@ -216,6 +222,8 @@ atan2_16::@4: scope:[atan2_16] from atan2_16::@3 atan2_16::@1: scope:[atan2_16] from atan2_16 [104] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 + +(void()) init_dist_screen((byte*) init_dist_screen::screen) init_dist_screen: scope:[init_dist_screen] from main [105] phi() [106] call init_squares @@ -291,6 +299,8 @@ init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 [144] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 to:init_dist_screen::@4 + +(byte()) sqrt((word) sqrt::val) sqrt: scope:[sqrt] from init_dist_screen::@13 [145] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [146] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 @@ -306,6 +316,8 @@ sqrt::@1: scope:[sqrt] from sqrt sqrt::@return: scope:[sqrt] from sqrt::@1 [153] return to:@return + +(word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) bsearch16u: scope:[bsearch16u] from sqrt [154] phi() to:bsearch16u::@3 @@ -349,6 +361,8 @@ bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 [171] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) [172] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 to:bsearch16u::@3 + +(word()) sqr((byte) sqr::val) sqr: scope:[sqr] from init_dist_screen::@10 init_dist_screen::@4 [173] (byte) sqr::val#2 ← phi( init_dist_screen::@10/(byte) sqr::val#1 init_dist_screen::@4/(byte) sqr::val#0 ) [174] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 @@ -357,6 +371,8 @@ sqr: scope:[sqr] from init_dist_screen::@10 init_dist_screen::@4 sqr::@return: scope:[sqr] from sqr [176] return to:@return + +(void()) init_squares() init_squares: scope:[init_squares] from init_dist_screen [177] phi() [178] call malloc @@ -380,6 +396,8 @@ init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@2 init_squares::@return: scope:[init_squares] from init_squares::@1 [189] return to:@return + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from @1 @3 init_squares [190] (word) malloc::size#3 ← phi( @1/(word) $3e8 @3/(word) $3e8 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD ) [190] (byte*) heap_head#12 ← phi( @1/(const byte*) HEAP_TOP#0 @3/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) diff --git a/src/test/ref/screen-show-spiral.log b/src/test/ref/screen-show-spiral.log index e51694e44..d53d919bb 100644 --- a/src/test/ref/screen-show-spiral.log +++ b/src/test/ref/screen-show-spiral.log @@ -77,6 +77,8 @@ CONTROL FLOW GRAPH SSA (byte*) HEAP_TOP#0 ← ((byte*)) (number) $a000 (byte*) heap_head#0 ← (byte*) HEAP_TOP#0 to:@12 + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from @17 @21 init_squares (word) malloc::size#3 ← phi( @17/(word) malloc::size#1 @21/(word) malloc::size#2 init_squares/(word) malloc::size#0 ) (byte*) heap_head#12 ← phi( @17/(byte*) heap_head#23 @21/(byte*) heap_head#5 init_squares/(byte*) heap_head#24 ) @@ -92,6 +94,8 @@ malloc::@return: scope:[malloc] from malloc (byte*) heap_head#2 ← (byte*) heap_head#13 return to:@return + +(word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) bsearch16u: scope:[bsearch16u] from sqrt (word) bsearch16u::key#4 ← phi( sqrt/(word) bsearch16u::key#0 ) (word*) bsearch16u::items#7 ← phi( sqrt/(word*) bsearch16u::items#1 ) @@ -179,6 +183,8 @@ bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2 (byte) NUM_SQUARES#0 ← (number) $ff (word*) SQUARES#0 ← (word*) 0 to:@15 + +(void()) init_squares() init_squares: scope:[init_squares] from init_dist_screen (byte*) heap_head#24 ← phi( init_dist_screen/(byte*) heap_head#29 ) (byte) NUM_SQUARES#6 ← phi( init_dist_screen/(byte) NUM_SQUARES#3 ) @@ -221,6 +227,8 @@ init_squares::@return: scope:[init_squares] from init_squares::@1 (word*) SQUARES#2 ← (word*) SQUARES#8 return to:@return + +(word()) sqr((byte) sqr::val) sqr: scope:[sqr] from init_dist_screen::@10 init_dist_screen::@4 (word*) SQUARES#9 ← phi( init_dist_screen::@10/(word*) SQUARES#18 init_dist_screen::@4/(word*) SQUARES#19 ) (byte) sqr::val#2 ← phi( init_dist_screen::@10/(byte) sqr::val#1 init_dist_screen::@4/(byte) sqr::val#0 ) @@ -232,6 +240,8 @@ sqr::@return: scope:[sqr] from sqr (word) sqr::return#1 ← (word) sqr::return#4 return to:@return + +(byte()) sqrt((word) sqrt::val) sqrt: scope:[sqrt] from init_dist_screen::@21 (byte) NUM_SQUARES#8 ← phi( init_dist_screen::@21/(byte) NUM_SQUARES#13 ) (word*) SQUARES#10 ← phi( init_dist_screen::@21/(word*) SQUARES#20 ) @@ -267,6 +277,8 @@ sqrt::@return: scope:[sqrt] from sqrt::@2 .word 256*2*256*atan(1/pow(2,i))/PI/2 }} to:@17 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from init_angle_screen::@3 (signed word) atan2_16::x#9 ← phi( init_angle_screen::@3/(signed word) atan2_16::x#0 ) (signed word) atan2_16::y#1 ← phi( init_angle_screen::@3/(signed word) atan2_16::y#0 ) @@ -508,6 +520,8 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 (byte*) SCREEN_FILL#0 ← ((byte*)) (number) $400 (byte) FILL_CHAR#0 ← (byte) '@' to:@20 + +(void()) main() main: scope:[main] from @20 (word*) SQUARES#21 ← phi( @20/(word*) SQUARES#26 ) (byte*) heap_head#26 ← phi( @20/(byte*) heap_head#31 ) @@ -626,6 +640,8 @@ main::@return: scope:[main] from main::@1 main::@9 (word*) SQUARES#4 ← (word*) SQUARES#13 return to:@return + +(void()) init_angle_screen((byte*) init_angle_screen::screen) init_angle_screen: scope:[init_angle_screen] from main::@17 (byte*) init_angle_screen::screen#1 ← phi( main::@17/(byte*) init_angle_screen::screen#0 ) (byte*~) init_angle_screen::$0 ← (byte*) init_angle_screen::screen#1 + (number) $28*(number) $c @@ -705,6 +721,8 @@ init_angle_screen::@4: scope:[init_angle_screen] from init_angle_screen::@2 init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@4 return to:@return + +(void()) init_dist_screen((byte*) init_dist_screen::screen) init_dist_screen: scope:[init_dist_screen] from main (byte*) init_dist_screen::screen#2 ← phi( main/(byte*) init_dist_screen::screen#0 ) (word*) SQUARES#24 ← phi( main/(word*) SQUARES#21 ) @@ -2669,6 +2687,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @2 [8] phi() + +(void()) main() main: scope:[main] from @2 [9] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0 [10] call init_dist_screen @@ -2722,6 +2742,8 @@ main::@11: scope:[main] from main::@4 main::@10: scope:[main] from main::@2 [30] (word~) main::min_dist_angle#7 ← (word) main::min_dist_angle#2 to:main::@3 + +(void()) init_angle_screen((byte*) init_angle_screen::screen) init_angle_screen: scope:[init_angle_screen] from main::@8 [31] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [32] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c @@ -2770,6 +2792,8 @@ init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@3 [60] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 [61] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 to:init_angle_screen::@2 + +(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) atan2_16: scope:[atan2_16] from init_angle_screen::@3 [62] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 to:atan2_16::@2 @@ -2867,6 +2891,8 @@ atan2_16::@4: scope:[atan2_16] from atan2_16::@3 atan2_16::@1: scope:[atan2_16] from atan2_16 [104] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 to:atan2_16::@3 + +(void()) init_dist_screen((byte*) init_dist_screen::screen) init_dist_screen: scope:[init_dist_screen] from main [105] phi() [106] call init_squares @@ -2942,6 +2968,8 @@ init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 [144] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18 to:init_dist_screen::@4 + +(byte()) sqrt((word) sqrt::val) sqrt: scope:[sqrt] from init_dist_screen::@13 [145] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [146] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1 @@ -2957,6 +2985,8 @@ sqrt::@1: scope:[sqrt] from sqrt sqrt::@return: scope:[sqrt] from sqrt::@1 [153] return to:@return + +(word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) bsearch16u: scope:[bsearch16u] from sqrt [154] phi() to:bsearch16u::@3 @@ -3000,6 +3030,8 @@ bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 [171] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) [172] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 to:bsearch16u::@3 + +(word()) sqr((byte) sqr::val) sqr: scope:[sqr] from init_dist_screen::@10 init_dist_screen::@4 [173] (byte) sqr::val#2 ← phi( init_dist_screen::@10/(byte) sqr::val#1 init_dist_screen::@4/(byte) sqr::val#0 ) [174] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 @@ -3008,6 +3040,8 @@ sqr: scope:[sqr] from init_dist_screen::@10 init_dist_screen::@4 sqr::@return: scope:[sqr] from sqr [176] return to:@return + +(void()) init_squares() init_squares: scope:[init_squares] from init_dist_screen [177] phi() [178] call malloc @@ -3031,6 +3065,8 @@ init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@2 init_squares::@return: scope:[init_squares] from init_squares::@1 [189] return to:@return + +(void*()) malloc((word) malloc::size) malloc: scope:[malloc] from @1 @3 init_squares [190] (word) malloc::size#3 ← phi( @1/(word) $3e8 @3/(word) $3e8 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD ) [190] (byte*) heap_head#12 ← phi( @1/(const byte*) HEAP_TOP#0 @3/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 ) diff --git a/src/test/ref/scroll-clobber.cfg b/src/test/ref/scroll-clobber.cfg index bf58b36dd..784cbf8dd 100644 --- a/src/test/ref/scroll-clobber.cfg +++ b/src/test/ref/scroll-clobber.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/scroll-clobber.log b/src/test/ref/scroll-clobber.log index 806d06e8e..bf7ba9d7b 100644 --- a/src/test/ref/scroll-clobber.log +++ b/src/test/ref/scroll-clobber.log @@ -7,6 +7,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte[]) TEXT#0 ← (const string) $0 to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::nxt#0 ← (byte[]) TEXT#0 (byte) main::i#0 ← (number) 0 @@ -150,6 +152,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/scrollbig-clobber.cfg b/src/test/ref/scrollbig-clobber.cfg index 6cb5effb6..2667d3b34 100644 --- a/src/test/ref/scrollbig-clobber.cfg +++ b/src/test/ref/scrollbig-clobber.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -25,6 +27,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [12] return to:@return + +(byte()) next_char() next_char: scope:[next_char] from main::@1 [13] (byte) next_char::c#0 ← *((byte*) nxt#13) [14] if((byte) next_char::c#0!=(byte) 0) goto next_char::@1 diff --git a/src/test/ref/scrollbig-clobber.log b/src/test/ref/scrollbig-clobber.log index 4dbf60de3..29b183ecc 100644 --- a/src/test/ref/scrollbig-clobber.log +++ b/src/test/ref/scrollbig-clobber.log @@ -7,6 +7,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) TEXT#0 ← (const string) $0 to:@1 + +(void()) main() main: scope:[main] from @2 (byte*) nxt#15 ← phi( @2/(byte*) nxt#14 ) (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 @@ -37,6 +39,8 @@ main::@return: scope:[main] from main::@3 @1: scope:[] from @begin (byte*) nxt#2 ← (byte*) TEXT#0 to:@2 + +(byte()) next_char() next_char: scope:[next_char] from main::@1 (byte*) nxt#9 ← phi( main::@1/(byte*) nxt#13 ) (byte) next_char::c#0 ← *((byte*) nxt#9) @@ -214,6 +218,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -232,6 +238,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [12] return to:@return + +(byte()) next_char() next_char: scope:[next_char] from main::@1 [13] (byte) next_char::c#0 ← *((byte*) nxt#13) [14] if((byte) next_char::c#0!=(byte) 0) goto next_char::@1 diff --git a/src/test/ref/semi-struct-1.cfg b/src/test/ref/semi-struct-1.cfg index 27405e2bb..3c788b0e5 100644 --- a/src/test/ref/semi-struct-1.cfg +++ b/src/test/ref/semi-struct-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call init_points @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print_points() print_points: scope:[print_points] from main::@1 [9] phi() [10] call print_cls @@ -63,6 +67,8 @@ print_points::@return: scope:[print_points] from print_points::@6 print_points::@7: scope:[print_points] from print_points::@6 [27] (byte*~) print_char_cursor#66 ← (byte*) print_line_cursor#1 to:print_points::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from print_points::@5 [28] phi() to:print_ln::@1 @@ -74,6 +80,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [32] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_points::@2 print_points::@3 [33] (byte*) print_char_cursor#42 ← phi( print_points::@2/(byte*) print_char_cursor#45 print_points::@3/(byte*) print_char_cursor#2 ) [33] (byte) print_byte::b#2 ← phi( print_points::@2/(byte) print_byte::b#0 print_points::@3/(byte) print_byte::b#1 ) @@ -89,6 +97,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [40] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 [41] (byte*) print_char_cursor#28 ← phi( print_byte/(byte*) print_char_cursor#42 print_byte::@1/(byte*) print_char_cursor#29 ) [41] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -98,6 +108,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char [44] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from print_points::@4 [45] phi() to:print_str::@1 @@ -114,6 +126,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [50] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [51] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#2 to:print_str::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from print_points [52] phi() [53] call memset @@ -121,6 +135,8 @@ print_cls: scope:[print_cls] from print_points print_cls::@return: scope:[print_cls] from print_cls [54] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [55] phi() to:memset::@1 @@ -135,6 +151,8 @@ memset::@2: scope:[memset] from memset::@1 [59] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [60] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) init_points() init_points: scope:[init_points] from main [61] phi() to:init_points::@1 diff --git a/src/test/ref/semi-struct-1.log b/src/test/ref/semi-struct-1.log index 3b7b1a16a..ec8d792bd 100644 --- a/src/test/ref/semi-struct-1.log +++ b/src/test/ref/semi-struct-1.log @@ -75,6 +75,8 @@ Culled Empty Block (label) print_points::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@12 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -122,6 +124,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@29 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from print_points::@7 (byte*) print_char_cursor#48 ← phi( print_points::@7/(byte*) print_char_cursor#15 ) (byte*) print_str::str#4 ← phi( print_points::@7/(byte*) print_str::str#1 ) @@ -144,6 +148,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#22 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from print_points::@9 (byte*) print_char_cursor#41 ← phi( print_points::@9/(byte*) print_char_cursor#17 ) (byte*) print_line_cursor#21 ← phi( print_points::@9/(byte*) print_line_cursor#24 ) @@ -173,6 +179,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_line_cursor#29 ← phi( @12/(byte*) print_line_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $1 to:@36 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_points::@4 print_points::@5 (byte*) print_char_cursor#42 ← phi( print_points::@4/(byte*) print_char_cursor#45 print_points::@5/(byte*) print_char_cursor#46 ) (byte) print_byte::b#2 ← phi( print_points::@4/(byte) print_byte::b#0 print_points::@5/(byte) print_byte::b#1 ) @@ -197,6 +205,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#7 ← (byte*) print_char_cursor#27 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 (byte*) print_char_cursor#28 ← phi( print_byte/(byte*) print_char_cursor#42 print_byte::@1/(byte*) print_char_cursor#5 ) (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -208,6 +218,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#9 ← (byte*) print_char_cursor#29 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from print_points (byte*) print_screen#1 ← phi( print_points/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -237,6 +249,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte~) $0 ← (byte) NUM_POINTS#0 * (byte) SIZEOF_POINT#0 (byte[$0]) points#0 ← { fill( $0, 0) } to:@42 + +(void()) main() main: scope:[main] from @42 (byte*) print_screen#5 ← phi( @42/(byte*) print_screen#6 ) (byte*) print_char_cursor#49 ← phi( @42/(byte*) print_char_cursor#47 ) @@ -262,6 +276,8 @@ main::@return: scope:[main] from main::@2 (byte*) print_char_cursor#13 ← (byte*) print_char_cursor#32 return to:@return + +(void()) init_points() init_points: scope:[init_points] from main (byte) init_points::pos#0 ← (number) $a (number~) init_points::$0 ← (byte) NUM_POINTS#0 - (number) 1 @@ -348,6 +364,8 @@ init_points::@5: scope:[init_points] from init_points::pointYpos1_@return init_points::@return: scope:[init_points] from init_points::@5 return to:@return + +(void()) print_points() print_points: scope:[print_points] from main::@1 (byte*) print_char_cursor#44 ← phi( main::@1/(byte*) print_char_cursor#43 ) (byte*) print_line_cursor#23 ← phi( main::@1/(byte*) print_line_cursor#22 ) @@ -1273,6 +1291,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call init_points @@ -1284,6 +1304,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print_points() print_points: scope:[print_points] from main::@1 [9] phi() [10] call print_cls @@ -1329,6 +1351,8 @@ print_points::@return: scope:[print_points] from print_points::@6 print_points::@7: scope:[print_points] from print_points::@6 [27] (byte*~) print_char_cursor#66 ← (byte*) print_line_cursor#1 to:print_points::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from print_points::@5 [28] phi() to:print_ln::@1 @@ -1340,6 +1364,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [32] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_points::@2 print_points::@3 [33] (byte*) print_char_cursor#42 ← phi( print_points::@2/(byte*) print_char_cursor#45 print_points::@3/(byte*) print_char_cursor#2 ) [33] (byte) print_byte::b#2 ← phi( print_points::@2/(byte) print_byte::b#0 print_points::@3/(byte) print_byte::b#1 ) @@ -1355,6 +1381,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [40] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 [41] (byte*) print_char_cursor#28 ← phi( print_byte/(byte*) print_char_cursor#42 print_byte::@1/(byte*) print_char_cursor#29 ) [41] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -1364,6 +1392,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char [44] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from print_points::@4 [45] phi() to:print_str::@1 @@ -1380,6 +1410,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [50] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [51] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#2 to:print_str::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from print_points [52] phi() [53] call memset @@ -1387,6 +1419,8 @@ print_cls: scope:[print_cls] from print_points print_cls::@return: scope:[print_cls] from print_cls [54] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [55] phi() to:memset::@1 @@ -1401,6 +1435,8 @@ memset::@2: scope:[memset] from memset::@1 [59] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [60] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) init_points() init_points: scope:[init_points] from main [61] phi() to:init_points::@1 diff --git a/src/test/ref/semi-struct-2.cfg b/src/test/ref/semi-struct-2.cfg index 03332b93b..c42ce6a6a 100644 --- a/src/test/ref/semi-struct-2.cfg +++ b/src/test/ref/semi-struct-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call keyboard_init @@ -122,6 +124,8 @@ main::@4: scope:[main] from main::@23 main::@return: scope:[main] from main::@4 [64] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main::@2 main::@4 main::@9 [65] phi() [66] call memset @@ -129,6 +133,8 @@ print_cls: scope:[print_cls] from main::@2 main::@4 main::@9 print_cls::@return: scope:[print_cls] from print_cls [67] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [68] phi() to:memset::@1 @@ -143,6 +149,8 @@ memset::@2: scope:[memset] from memset::@1 [72] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [73] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key) keyboard_key_pressed: scope:[keyboard_key_pressed] from main::@1 main::@3 [74] phi() [75] call keyboard_matrix_read @@ -155,6 +163,8 @@ keyboard_key_pressed::@1: scope:[keyboard_key_pressed] from keyboard_key_presse keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@1 [79] return to:@return + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed [80] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0+(const byte) keyboard_key_pressed::rowidx#0) [81] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) @@ -162,6 +172,8 @@ keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read [82] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@10 main::@15 main::@17 main::@22 printEntry printEntry::@15 printEntry::@17 printEntry::@19 printEntry::@21 printEntry::@23 printEntry::@25 printEntry::@27 printEntry::@29 printEntry::@31 printEntry::@33 printEntry::@35 printEntry::@37 [83] (byte*) print_char_cursor#164 ← phi( main::@10/(byte*) 1024 main::@15/(byte*~) print_char_cursor#210 main::@17/(byte*) 1024 main::@22/(byte*~) print_char_cursor#211 printEntry/(byte*~) print_char_cursor#212 printEntry::@15/(byte*~) print_char_cursor#213 printEntry::@17/(byte*~) print_char_cursor#214 printEntry::@19/(byte*~) print_char_cursor#215 printEntry::@21/(byte*~) print_char_cursor#216 printEntry::@23/(byte*~) print_char_cursor#217 printEntry::@25/(byte*~) print_char_cursor#218 printEntry::@27/(byte*~) print_char_cursor#219 printEntry::@29/(byte*~) print_char_cursor#220 printEntry::@31/(byte*~) print_char_cursor#221 printEntry::@33/(byte*~) print_char_cursor#222 printEntry::@35/(byte*~) print_char_cursor#223 printEntry::@37/(byte*~) print_char_cursor#224 ) [83] (byte*) print_str::str#20 ← phi( main::@10/(const string) main::str main::@15/(const string) main::str1 main::@17/(const string) main::str2 main::@22/(const string) main::str1 printEntry/(const string) printEntry::str printEntry::@15/(const string) printEntry::str1 printEntry::@17/(const string) printEntry::str2 printEntry::@19/(const string) printEntry::str3 printEntry::@21/(const string) printEntry::str4 printEntry::@23/(const string) printEntry::str5 printEntry::@25/(const string) printEntry::str6 printEntry::@27/(const string) printEntry::str7 printEntry::@29/(const string) printEntry::str8 printEntry::@31/(const string) printEntry::str9 printEntry::@33/(const string) printEntry::str10 printEntry::@35/(const string) printEntry::str11 printEntry::@37/(const string) printEntry::str12 ) @@ -179,6 +191,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [88] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#142 [89] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#18 to:print_str::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@11 main::@12 main::@14 main::@18 main::@19 main::@21 printEntry::@14 printEntry::@16 printEntry::@18 printEntry::@20 printEntry::@22 printEntry::@24 printEntry::@26 printEntry::@28 printEntry::@30 printEntry::@32 printEntry::@34 printEntry::@36 printEntry::@38 [90] (byte*) print_char_cursor#143 ← phi( main::@11/(byte*) print_char_cursor#142 main::@12/(byte*~) print_char_cursor#228 main::@14/(byte*~) print_char_cursor#229 main::@18/(byte*) print_char_cursor#142 main::@19/(byte*~) print_char_cursor#231 main::@21/(byte*~) print_char_cursor#232 printEntry::@14/(byte*) print_char_cursor#11 printEntry::@16/(byte*) print_char_cursor#11 printEntry::@18/(byte*) print_char_cursor#11 printEntry::@20/(byte*) print_char_cursor#11 printEntry::@22/(byte*) print_char_cursor#11 printEntry::@24/(byte*) print_char_cursor#11 printEntry::@26/(byte*) print_char_cursor#11 printEntry::@28/(byte*) print_char_cursor#11 printEntry::@30/(byte*) print_char_cursor#11 printEntry::@32/(byte*) print_char_cursor#11 printEntry::@34/(byte*) print_char_cursor#11 printEntry::@36/(byte*) print_char_cursor#11 printEntry::@38/(byte*) print_char_cursor#11 ) [90] (byte*) print_line_cursor#63 ← phi( main::@11/(byte*) 1024 main::@12/(byte*~) print_line_cursor#157 main::@14/(byte*~) print_line_cursor#158 main::@18/(byte*) 1024 main::@19/(byte*~) print_line_cursor#159 main::@21/(byte*~) print_line_cursor#160 printEntry::@14/(byte*~) print_line_cursor#161 printEntry::@16/(byte*~) print_line_cursor#162 printEntry::@18/(byte*~) print_line_cursor#163 printEntry::@20/(byte*~) print_line_cursor#164 printEntry::@22/(byte*~) print_line_cursor#165 printEntry::@24/(byte*~) print_line_cursor#166 printEntry::@26/(byte*~) print_line_cursor#167 printEntry::@28/(byte*~) print_line_cursor#168 printEntry::@30/(byte*~) print_line_cursor#169 printEntry::@32/(byte*~) print_line_cursor#170 printEntry::@34/(byte*~) print_line_cursor#171 printEntry::@36/(byte*~) print_line_cursor#172 printEntry::@38/(byte*~) print_line_cursor#173 ) @@ -194,6 +208,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@1 print_ln::@2: scope:[print_ln] from print_ln::@1 [95] (byte*~) print_line_cursor#175 ← (byte*) print_line_cursor#1 to:print_ln::@1 + +(void()) printEntry((byte*) printEntry::entry) printEntry: scope:[printEntry] from main::@13 main::@20 [96] (byte*) printEntry::entry#10 ← phi( main::@13/(byte*) printEntry::entry#0 main::@20/(byte*) printEntry::entry#1 ) [97] (byte*~) print_char_cursor#212 ← (byte*) print_line_cursor#1 @@ -393,6 +409,8 @@ printEntry::@38: scope:[printEntry] from printEntry::@13 printEntry::@return: scope:[printEntry] from printEntry::@38 [188] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from printEntry::@10 printEntry::@11 printEntry::@12 printEntry::@13 printEntry::@5 printEntry::@6 printEntry::@7 printEntry::@8 print_word print_word::@1 [189] (byte*) print_char_cursor#145 ← phi( printEntry::@10/(byte*) print_char_cursor#142 printEntry::@11/(byte*) print_char_cursor#142 printEntry::@12/(byte*) print_char_cursor#142 printEntry::@13/(byte*) print_char_cursor#142 printEntry::@5/(byte*) print_char_cursor#142 printEntry::@6/(byte*) print_char_cursor#142 printEntry::@7/(byte*) print_char_cursor#142 printEntry::@8/(byte*) print_char_cursor#142 print_word/(byte*) print_char_cursor#142 print_word::@1/(byte*) print_char_cursor#11 ) [189] (byte) print_byte::b#10 ← phi( printEntry::@10/(byte) print_byte::b#6 printEntry::@11/(byte) print_byte::b#7 printEntry::@12/(byte) print_byte::b#8 printEntry::@13/(byte) print_byte::b#9 printEntry::@5/(byte) print_byte::b#2 printEntry::@6/(byte) print_byte::b#3 printEntry::@7/(byte) print_byte::b#4 printEntry::@8/(byte) print_byte::b#5 print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -408,6 +426,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [196] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 [197] (byte*) print_char_cursor#82 ← phi( print_byte/(byte*) print_char_cursor#145 print_byte::@1/(byte*) print_char_cursor#11 ) [197] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -417,6 +437,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char [200] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from printEntry::@1 printEntry::@2 printEntry::@3 printEntry::@4 printEntry::@9 [201] (word) print_word::w#5 ← phi( printEntry::@1/(word~) print_word::w#7 printEntry::@2/(word~) print_word::w#8 printEntry::@3/(word) print_word::w#2 printEntry::@4/(word~) print_word::w#10 printEntry::@9/(word) print_word::w#4 ) [202] (byte) print_byte::b#0 ← > (word) print_word::w#5 @@ -429,6 +451,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [206] return to:@return + +(void()) initEntry((byte*) initEntry::entry , (byte) initEntry::n) initEntry: scope:[initEntry] from main::@5 main::@8 [207] (byte) initEntry::n#10 ← phi( main::@5/(byte) 0 main::@8/(byte) $11 ) [207] (byte*) initEntry::entry#10 ← phi( main::@5/(byte*) initEntry::entry#0 main::@8/(byte*) initEntry::entry#1 ) @@ -527,6 +551,8 @@ initEntry::@13: scope:[initEntry] from initEntry::entryTLo1 initEntry::@return: scope:[initEntry] from initEntry::@13 [247] return to:@return + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from main::fileEntry1 main::fileEntry2 [248] (byte) mul8u::a#6 ← phi( main::fileEntry1/(const byte) main::fileEntry1_idx#0 main::fileEntry2/(const byte) main::fileEntry2_idx#0 ) to:mul8u::@1 @@ -551,6 +577,8 @@ mul8u::@3: scope:[mul8u] from mul8u::@2 mul8u::@4 [256] (byte) mul8u::a#0 ← (byte) mul8u::a#3 >> (byte) 1 [257] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 to:mul8u::@1 + +(void()) keyboard_init() keyboard_init: scope:[keyboard_init] from main [258] *((const byte*) CIA1_PORT_A_DDR#0) ← (byte) $ff [259] *((const byte*) CIA1_PORT_B_DDR#0) ← (byte) 0 diff --git a/src/test/ref/semi-struct-2.log b/src/test/ref/semi-struct-2.log index dfca67858..62bbb9d74 100644 --- a/src/test/ref/semi-struct-2.log +++ b/src/test/ref/semi-struct-2.log @@ -157,6 +157,8 @@ Culled Empty Block (label) printEntry::entryTLo1_@1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@17 + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from main::fileEntry1 main::fileEntry2 (byte) mul8u::a#6 ← phi( main::fileEntry1/(byte) mul8u::a#1 main::fileEntry2/(byte) mul8u::a#2 ) (byte) mul8u::b#2 ← phi( main::fileEntry1/(byte) mul8u::b#0 main::fileEntry2/(byte) mul8u::b#1 ) @@ -204,6 +206,8 @@ mul8u::@return: scope:[mul8u] from mul8u::@3 (word) mul8u::return#1 ← (word) mul8u::return#4 return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -251,6 +255,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@34 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@20 main::@25 main::@28 main::@33 printEntry printEntry::@16 printEntry::@19 printEntry::@22 printEntry::@25 printEntry::@28 printEntry::@31 printEntry::@34 printEntry::@37 printEntry::@40 printEntry::@43 printEntry::@46 printEntry::@49 (byte*) print_char_cursor#164 ← phi( main::@20/(byte*) print_char_cursor#15 main::@25/(byte*) print_char_cursor#20 main::@28/(byte*) print_char_cursor#22 main::@33/(byte*) print_char_cursor#27 printEntry/(byte*) print_char_cursor#149 printEntry::@16/(byte*) print_char_cursor#33 printEntry::@19/(byte*) print_char_cursor#36 printEntry::@22/(byte*) print_char_cursor#39 printEntry::@25/(byte*) print_char_cursor#42 printEntry::@28/(byte*) print_char_cursor#45 printEntry::@31/(byte*) print_char_cursor#48 printEntry::@34/(byte*) print_char_cursor#51 printEntry::@37/(byte*) print_char_cursor#54 printEntry::@40/(byte*) print_char_cursor#57 printEntry::@43/(byte*) print_char_cursor#60 printEntry::@46/(byte*) print_char_cursor#63 printEntry::@49/(byte*) print_char_cursor#66 ) (byte*) print_str::str#20 ← phi( main::@20/(byte*) print_str::str#1 main::@25/(byte*) print_str::str#2 main::@28/(byte*) print_str::str#3 main::@33/(byte*) print_str::str#4 printEntry/(byte*) print_str::str#5 printEntry::@16/(byte*) print_str::str#6 printEntry::@19/(byte*) print_str::str#7 printEntry::@22/(byte*) print_str::str#8 printEntry::@25/(byte*) print_str::str#9 printEntry::@28/(byte*) print_str::str#10 printEntry::@31/(byte*) print_str::str#11 printEntry::@34/(byte*) print_str::str#12 printEntry::@37/(byte*) print_str::str#13 printEntry::@40/(byte*) print_str::str#14 printEntry::@43/(byte*) print_str::str#15 printEntry::@46/(byte*) print_str::str#16 printEntry::@49/(byte*) print_str::str#17 ) @@ -273,6 +279,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#73 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from main::@21 main::@22 main::@24 main::@29 main::@30 main::@32 printEntry::@15 printEntry::@18 printEntry::@21 printEntry::@24 printEntry::@27 printEntry::@30 printEntry::@33 printEntry::@36 printEntry::@39 printEntry::@42 printEntry::@45 printEntry::@48 printEntry::@51 (byte*) print_char_cursor#143 ← phi( main::@21/(byte*) print_char_cursor#16 main::@22/(byte*) print_char_cursor#17 main::@24/(byte*) print_char_cursor#19 main::@29/(byte*) print_char_cursor#23 main::@30/(byte*) print_char_cursor#24 main::@32/(byte*) print_char_cursor#26 printEntry::@15/(byte*) print_char_cursor#32 printEntry::@18/(byte*) print_char_cursor#35 printEntry::@21/(byte*) print_char_cursor#38 printEntry::@24/(byte*) print_char_cursor#41 printEntry::@27/(byte*) print_char_cursor#44 printEntry::@30/(byte*) print_char_cursor#47 printEntry::@33/(byte*) print_char_cursor#50 printEntry::@36/(byte*) print_char_cursor#53 printEntry::@39/(byte*) print_char_cursor#56 printEntry::@42/(byte*) print_char_cursor#59 printEntry::@45/(byte*) print_char_cursor#62 printEntry::@48/(byte*) print_char_cursor#65 printEntry::@51/(byte*) print_char_cursor#68 ) (byte*) print_line_cursor#63 ← phi( main::@21/(byte*) print_line_cursor#65 main::@22/(byte*) print_line_cursor#6 main::@24/(byte*) print_line_cursor#8 main::@29/(byte*) print_line_cursor#67 main::@30/(byte*) print_line_cursor#11 main::@32/(byte*) print_line_cursor#13 printEntry::@15/(byte*) print_line_cursor#69 printEntry::@18/(byte*) print_line_cursor#70 printEntry::@21/(byte*) print_line_cursor#71 printEntry::@24/(byte*) print_line_cursor#72 printEntry::@27/(byte*) print_line_cursor#73 printEntry::@30/(byte*) print_line_cursor#74 printEntry::@33/(byte*) print_line_cursor#75 printEntry::@36/(byte*) print_line_cursor#76 printEntry::@39/(byte*) print_line_cursor#77 printEntry::@42/(byte*) print_line_cursor#78 printEntry::@45/(byte*) print_line_cursor#79 printEntry::@48/(byte*) print_line_cursor#80 printEntry::@51/(byte*) print_line_cursor#81 ) @@ -296,6 +304,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#75 return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from printEntry::@1 printEntry::@2 printEntry::@3 printEntry::@4 printEntry::@9 (byte*) print_char_cursor#144 ← phi( printEntry::@1/(byte*) print_char_cursor#150 printEntry::@2/(byte*) print_char_cursor#151 printEntry::@3/(byte*) print_char_cursor#152 printEntry::@4/(byte*) print_char_cursor#153 printEntry::@9/(byte*) print_char_cursor#158 ) (word) print_word::w#5 ← phi( printEntry::@1/(word) print_word::w#0 printEntry::@2/(word) print_word::w#1 printEntry::@3/(word) print_word::w#2 printEntry::@4/(word) print_word::w#3 printEntry::@9/(word) print_word::w#4 ) @@ -326,6 +336,8 @@ print_word::@return: scope:[print_word] from print_word::@2 (byte*) print_line_cursor#134 ← phi( @17/(byte*) print_line_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $3 to:@41 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from printEntry::@10 printEntry::@11 printEntry::@12 printEntry::@13 printEntry::@5 printEntry::@6 printEntry::@7 printEntry::@8 print_word print_word::@1 (byte*) print_char_cursor#145 ← phi( printEntry::@10/(byte*) print_char_cursor#159 printEntry::@11/(byte*) print_char_cursor#160 printEntry::@12/(byte*) print_char_cursor#161 printEntry::@13/(byte*) print_char_cursor#162 printEntry::@5/(byte*) print_char_cursor#154 printEntry::@6/(byte*) print_char_cursor#155 printEntry::@7/(byte*) print_char_cursor#156 printEntry::@8/(byte*) print_char_cursor#157 print_word/(byte*) print_char_cursor#144 print_word::@1/(byte*) print_char_cursor#5 ) (byte) print_byte::b#10 ← phi( printEntry::@10/(byte) print_byte::b#6 printEntry::@11/(byte) print_byte::b#7 printEntry::@12/(byte) print_byte::b#8 printEntry::@13/(byte) print_byte::b#9 printEntry::@5/(byte) print_byte::b#2 printEntry::@6/(byte) print_byte::b#3 printEntry::@7/(byte) print_byte::b#4 printEntry::@8/(byte) print_byte::b#5 print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -350,6 +362,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#10 ← (byte*) print_char_cursor#81 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 (byte*) print_char_cursor#82 ← phi( print_byte/(byte*) print_char_cursor#145 print_byte::@1/(byte*) print_char_cursor#8 ) (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -361,6 +375,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#12 ← (byte*) print_char_cursor#83 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main::@19 main::@3 main::@9 (byte*) print_screen#1 ← phi( main::@19/(byte*) print_screen#3 main::@3/(byte*) print_screen#4 main::@9/(byte*) print_screen#5 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -398,6 +414,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte[8]) keyboard_matrix_row_bitmask#0 ← { (number) $fe, (number) $fd, (number) $fb, (number) $f7, (number) $ef, (number) $df, (number) $bf, (number) $7f } (byte[8]) keyboard_matrix_col_bitmask#0 ← { (number) 1, (number) 2, (number) 4, (number) 8, (number) $10, (number) $20, (number) $40, (number) $80 } to:@52 + +(void()) keyboard_init() keyboard_init: scope:[keyboard_init] from main *((byte*) CIA1_PORT_A_DDR#0) ← (number) $ff *((byte*) CIA1_PORT_B_DDR#0) ← (number) 0 @@ -405,6 +423,8 @@ keyboard_init: scope:[keyboard_init] from main keyboard_init::@return: scope:[keyboard_init] from keyboard_init return to:@return + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed (byte) keyboard_matrix_read::rowid#1 ← phi( keyboard_key_pressed/(byte) keyboard_matrix_read::rowid#0 ) *((byte*) CIA1_PORT_A#0) ← *((byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#1) @@ -417,6 +437,8 @@ keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matri (byte) keyboard_matrix_read::return#1 ← (byte) keyboard_matrix_read::return#3 return to:@return + +(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key) keyboard_key_pressed: scope:[keyboard_key_pressed] from main::@1 main::@7 (byte) keyboard_key_pressed::key#2 ← phi( main::@1/(byte) keyboard_key_pressed::key#0 main::@7/(byte) keyboard_key_pressed::key#1 ) (number~) keyboard_key_pressed::$0 ← (byte) keyboard_key_pressed::key#2 & (number) 7 @@ -449,6 +471,8 @@ keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_p (word~) $2 ← (word~) $1 * (byte) SIZEOF_ENTRY#0 (byte[$2]) files#0 ← { fill( $2, 0) } to:@69 + +(void()) main() main: scope:[main] from @69 (byte*) print_char_cursor#209 ← phi( @69/(byte*) print_char_cursor#163 ) (byte*) print_line_cursor#156 ← phi( @69/(byte*) print_line_cursor#82 ) @@ -744,6 +768,8 @@ main::@return: scope:[main] from main::@36 (byte*) print_char_cursor#30 ← (byte*) print_char_cursor#100 return to:@return + +(void()) initEntry((byte*) initEntry::entry , (byte) initEntry::n) initEntry: scope:[initEntry] from main::@14 main::@18 (byte) initEntry::n#41 ← phi( main::@14/(byte) initEntry::n#0 main::@18/(byte) initEntry::n#1 ) (byte*) initEntry::entry#2 ← phi( main::@14/(byte*) initEntry::entry#0 main::@18/(byte*) initEntry::entry#1 ) @@ -1046,6 +1072,8 @@ initEntry::@13: scope:[initEntry] from initEntry::entryTLo1_@return initEntry::@return: scope:[initEntry] from initEntry::@13 return to:@return + +(void()) printEntry((byte*) printEntry::entry) printEntry: scope:[printEntry] from main::@23 main::@31 (byte*) print_line_cursor#150 ← phi( main::@23/(byte*) print_line_cursor#7 main::@31/(byte*) print_line_cursor#12 ) (byte*) printEntry::entry#15 ← phi( main::@23/(byte*) printEntry::entry#0 main::@31/(byte*) printEntry::entry#1 ) @@ -4299,6 +4327,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call keyboard_init @@ -4414,6 +4444,8 @@ main::@4: scope:[main] from main::@23 main::@return: scope:[main] from main::@4 [64] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main::@2 main::@4 main::@9 [65] phi() [66] call memset @@ -4421,6 +4453,8 @@ print_cls: scope:[print_cls] from main::@2 main::@4 main::@9 print_cls::@return: scope:[print_cls] from print_cls [67] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [68] phi() to:memset::@1 @@ -4435,6 +4469,8 @@ memset::@2: scope:[memset] from memset::@1 [72] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [73] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key) keyboard_key_pressed: scope:[keyboard_key_pressed] from main::@1 main::@3 [74] phi() [75] call keyboard_matrix_read @@ -4447,6 +4483,8 @@ keyboard_key_pressed::@1: scope:[keyboard_key_pressed] from keyboard_key_presse keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@1 [79] return to:@return + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed [80] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0+(const byte) keyboard_key_pressed::rowidx#0) [81] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) @@ -4454,6 +4492,8 @@ keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read [82] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@10 main::@15 main::@17 main::@22 printEntry printEntry::@15 printEntry::@17 printEntry::@19 printEntry::@21 printEntry::@23 printEntry::@25 printEntry::@27 printEntry::@29 printEntry::@31 printEntry::@33 printEntry::@35 printEntry::@37 [83] (byte*) print_char_cursor#164 ← phi( main::@10/(byte*) 1024 main::@15/(byte*~) print_char_cursor#210 main::@17/(byte*) 1024 main::@22/(byte*~) print_char_cursor#211 printEntry/(byte*~) print_char_cursor#212 printEntry::@15/(byte*~) print_char_cursor#213 printEntry::@17/(byte*~) print_char_cursor#214 printEntry::@19/(byte*~) print_char_cursor#215 printEntry::@21/(byte*~) print_char_cursor#216 printEntry::@23/(byte*~) print_char_cursor#217 printEntry::@25/(byte*~) print_char_cursor#218 printEntry::@27/(byte*~) print_char_cursor#219 printEntry::@29/(byte*~) print_char_cursor#220 printEntry::@31/(byte*~) print_char_cursor#221 printEntry::@33/(byte*~) print_char_cursor#222 printEntry::@35/(byte*~) print_char_cursor#223 printEntry::@37/(byte*~) print_char_cursor#224 ) [83] (byte*) print_str::str#20 ← phi( main::@10/(const string) main::str main::@15/(const string) main::str1 main::@17/(const string) main::str2 main::@22/(const string) main::str1 printEntry/(const string) printEntry::str printEntry::@15/(const string) printEntry::str1 printEntry::@17/(const string) printEntry::str2 printEntry::@19/(const string) printEntry::str3 printEntry::@21/(const string) printEntry::str4 printEntry::@23/(const string) printEntry::str5 printEntry::@25/(const string) printEntry::str6 printEntry::@27/(const string) printEntry::str7 printEntry::@29/(const string) printEntry::str8 printEntry::@31/(const string) printEntry::str9 printEntry::@33/(const string) printEntry::str10 printEntry::@35/(const string) printEntry::str11 printEntry::@37/(const string) printEntry::str12 ) @@ -4471,6 +4511,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [88] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#142 [89] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#18 to:print_str::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@11 main::@12 main::@14 main::@18 main::@19 main::@21 printEntry::@14 printEntry::@16 printEntry::@18 printEntry::@20 printEntry::@22 printEntry::@24 printEntry::@26 printEntry::@28 printEntry::@30 printEntry::@32 printEntry::@34 printEntry::@36 printEntry::@38 [90] (byte*) print_char_cursor#143 ← phi( main::@11/(byte*) print_char_cursor#142 main::@12/(byte*~) print_char_cursor#228 main::@14/(byte*~) print_char_cursor#229 main::@18/(byte*) print_char_cursor#142 main::@19/(byte*~) print_char_cursor#231 main::@21/(byte*~) print_char_cursor#232 printEntry::@14/(byte*) print_char_cursor#11 printEntry::@16/(byte*) print_char_cursor#11 printEntry::@18/(byte*) print_char_cursor#11 printEntry::@20/(byte*) print_char_cursor#11 printEntry::@22/(byte*) print_char_cursor#11 printEntry::@24/(byte*) print_char_cursor#11 printEntry::@26/(byte*) print_char_cursor#11 printEntry::@28/(byte*) print_char_cursor#11 printEntry::@30/(byte*) print_char_cursor#11 printEntry::@32/(byte*) print_char_cursor#11 printEntry::@34/(byte*) print_char_cursor#11 printEntry::@36/(byte*) print_char_cursor#11 printEntry::@38/(byte*) print_char_cursor#11 ) [90] (byte*) print_line_cursor#63 ← phi( main::@11/(byte*) 1024 main::@12/(byte*~) print_line_cursor#157 main::@14/(byte*~) print_line_cursor#158 main::@18/(byte*) 1024 main::@19/(byte*~) print_line_cursor#159 main::@21/(byte*~) print_line_cursor#160 printEntry::@14/(byte*~) print_line_cursor#161 printEntry::@16/(byte*~) print_line_cursor#162 printEntry::@18/(byte*~) print_line_cursor#163 printEntry::@20/(byte*~) print_line_cursor#164 printEntry::@22/(byte*~) print_line_cursor#165 printEntry::@24/(byte*~) print_line_cursor#166 printEntry::@26/(byte*~) print_line_cursor#167 printEntry::@28/(byte*~) print_line_cursor#168 printEntry::@30/(byte*~) print_line_cursor#169 printEntry::@32/(byte*~) print_line_cursor#170 printEntry::@34/(byte*~) print_line_cursor#171 printEntry::@36/(byte*~) print_line_cursor#172 printEntry::@38/(byte*~) print_line_cursor#173 ) @@ -4486,6 +4528,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@1 print_ln::@2: scope:[print_ln] from print_ln::@1 [95] (byte*~) print_line_cursor#175 ← (byte*) print_line_cursor#1 to:print_ln::@1 + +(void()) printEntry((byte*) printEntry::entry) printEntry: scope:[printEntry] from main::@13 main::@20 [96] (byte*) printEntry::entry#10 ← phi( main::@13/(byte*) printEntry::entry#0 main::@20/(byte*) printEntry::entry#1 ) [97] (byte*~) print_char_cursor#212 ← (byte*) print_line_cursor#1 @@ -4685,6 +4729,8 @@ printEntry::@38: scope:[printEntry] from printEntry::@13 printEntry::@return: scope:[printEntry] from printEntry::@38 [188] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from printEntry::@10 printEntry::@11 printEntry::@12 printEntry::@13 printEntry::@5 printEntry::@6 printEntry::@7 printEntry::@8 print_word print_word::@1 [189] (byte*) print_char_cursor#145 ← phi( printEntry::@10/(byte*) print_char_cursor#142 printEntry::@11/(byte*) print_char_cursor#142 printEntry::@12/(byte*) print_char_cursor#142 printEntry::@13/(byte*) print_char_cursor#142 printEntry::@5/(byte*) print_char_cursor#142 printEntry::@6/(byte*) print_char_cursor#142 printEntry::@7/(byte*) print_char_cursor#142 printEntry::@8/(byte*) print_char_cursor#142 print_word/(byte*) print_char_cursor#142 print_word::@1/(byte*) print_char_cursor#11 ) [189] (byte) print_byte::b#10 ← phi( printEntry::@10/(byte) print_byte::b#6 printEntry::@11/(byte) print_byte::b#7 printEntry::@12/(byte) print_byte::b#8 printEntry::@13/(byte) print_byte::b#9 printEntry::@5/(byte) print_byte::b#2 printEntry::@6/(byte) print_byte::b#3 printEntry::@7/(byte) print_byte::b#4 printEntry::@8/(byte) print_byte::b#5 print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -4700,6 +4746,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [196] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 [197] (byte*) print_char_cursor#82 ← phi( print_byte/(byte*) print_char_cursor#145 print_byte::@1/(byte*) print_char_cursor#11 ) [197] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -4709,6 +4757,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char [200] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from printEntry::@1 printEntry::@2 printEntry::@3 printEntry::@4 printEntry::@9 [201] (word) print_word::w#5 ← phi( printEntry::@1/(word~) print_word::w#7 printEntry::@2/(word~) print_word::w#8 printEntry::@3/(word) print_word::w#2 printEntry::@4/(word~) print_word::w#10 printEntry::@9/(word) print_word::w#4 ) [202] (byte) print_byte::b#0 ← > (word) print_word::w#5 @@ -4721,6 +4771,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [206] return to:@return + +(void()) initEntry((byte*) initEntry::entry , (byte) initEntry::n) initEntry: scope:[initEntry] from main::@5 main::@8 [207] (byte) initEntry::n#10 ← phi( main::@5/(byte) 0 main::@8/(byte) $11 ) [207] (byte*) initEntry::entry#10 ← phi( main::@5/(byte*) initEntry::entry#0 main::@8/(byte*) initEntry::entry#1 ) @@ -4819,6 +4871,8 @@ initEntry::@13: scope:[initEntry] from initEntry::entryTLo1 initEntry::@return: scope:[initEntry] from initEntry::@13 [247] return to:@return + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from main::fileEntry1 main::fileEntry2 [248] (byte) mul8u::a#6 ← phi( main::fileEntry1/(const byte) main::fileEntry1_idx#0 main::fileEntry2/(const byte) main::fileEntry2_idx#0 ) to:mul8u::@1 @@ -4843,6 +4897,8 @@ mul8u::@3: scope:[mul8u] from mul8u::@2 mul8u::@4 [256] (byte) mul8u::a#0 ← (byte) mul8u::a#3 >> (byte) 1 [257] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 to:mul8u::@1 + +(void()) keyboard_init() keyboard_init: scope:[keyboard_init] from main [258] *((const byte*) CIA1_PORT_A_DDR#0) ← (byte) $ff [259] *((const byte*) CIA1_PORT_B_DDR#0) ← (byte) 0 diff --git a/src/test/ref/sequence-locality-0.cfg b/src/test/ref/sequence-locality-0.cfg index 4e8a13740..cdd898f19 100644 --- a/src/test/ref/sequence-locality-0.cfg +++ b/src/test/ref/sequence-locality-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/sequence-locality-0.log b/src/test/ref/sequence-locality-0.log index 380d0e7e3..ccf7415ee 100644 --- a/src/test/ref/sequence-locality-0.log +++ b/src/test/ref/sequence-locality-0.log @@ -4,6 +4,8 @@ Culled Empty Block (label) main::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte) main::idx#0 ← (number) 0 @@ -158,6 +160,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/sequence-locality-1.cfg b/src/test/ref/sequence-locality-1.cfg index 78aa952a3..b9d80b5b6 100644 --- a/src/test/ref/sequence-locality-1.cfg +++ b/src/test/ref/sequence-locality-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/sequence-locality-1.log b/src/test/ref/sequence-locality-1.log index 779001640..ea38cc166 100644 --- a/src/test/ref/sequence-locality-1.log +++ b/src/test/ref/sequence-locality-1.log @@ -3,6 +3,8 @@ Culled Empty Block (label) main::@4 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte) main::idx#0 ← (number) 0 @@ -156,6 +158,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/sieve-min.cfg b/src/test/ref/sieve-min.cfg index 309939869..51507ba66 100644 --- a/src/test/ref/sieve-min.cfg +++ b/src/test/ref/sieve-min.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call memset @@ -61,6 +63,8 @@ main::@5: scope:[main] from main::@4 [27] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#12 [28] (word) main::j#1 ← (word) main::j#2 + (word) main::i#12 to:main::@4 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from main::@12 print_byte print_byte::@1 [29] (byte*) print_char_cursor#19 ← phi( main::@12/(byte*) print_char_cursor#20 print_byte/(byte*) print_char_cursor#26 print_byte::@1/(byte*) print_char_cursor#20 ) [29] (byte) print_char::ch#3 ← phi( main::@12/(byte) ' ' print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -70,6 +74,8 @@ print_char: scope:[print_char] from main::@12 print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char [32] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from main::@10 [33] (byte) print_byte::b#0 ← > (word) print_word::w#0 [34] call print_byte @@ -81,6 +87,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [37] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [38] (byte*) print_char_cursor#26 ← phi( print_word/(byte*) print_char_cursor#27 print_word::@1/(byte*) print_char_cursor#20 ) [38] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -96,6 +104,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [45] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main [46] phi() to:memset::@1 diff --git a/src/test/ref/sieve-min.log b/src/test/ref/sieve-min.log index 3d47b3468..49702cf56 100644 --- a/src/test/ref/sieve-min.log +++ b/src/test/ref/sieve-min.log @@ -85,6 +85,8 @@ Culled Empty Block (label) main::@28 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@26 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main (byte) memset::c#4 ← phi( main/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( main/(void*) memset::str#0 ) @@ -132,6 +134,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@43 + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from main::@21 (byte*) print_char_cursor#25 ← phi( main::@21/(byte*) print_char_cursor#27 ) (word) print_word::w#1 ← phi( main::@21/(word) print_word::w#0 ) @@ -160,6 +164,8 @@ print_word::@return: scope:[print_word] from print_word::@2 (byte*) print_char_cursor#34 ← phi( @26/(byte*) print_char_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $1 to:@50 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) print_char_cursor#26 ← phi( print_word/(byte*) print_char_cursor#25 print_word::@1/(byte*) print_char_cursor#1 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -184,6 +190,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#6 ← (byte*) print_char_cursor#18 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from main::@30 print_byte print_byte::@1 (byte*) print_char_cursor#19 ← phi( main::@30/(byte*) print_char_cursor#9 print_byte/(byte*) print_char_cursor#26 print_byte::@1/(byte*) print_char_cursor#4 ) (byte) print_char::ch#3 ← phi( main::@30/(byte) print_char::ch#2 print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -202,6 +210,8 @@ print_char::@return: scope:[print_char] from print_char (byte) SQRT_COUNT#0 ← (number) $80 (byte*) sieve#0 ← ((byte*)) (number) $1000 to:@51 + +(void()) main() main: scope:[main] from @51 (byte*) print_char_cursor#40 ← phi( @51/(byte*) print_char_cursor#29 ) (void*) memset::str#0 ← (void*)(byte*) sieve#0 @@ -840,6 +850,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call memset @@ -894,6 +906,8 @@ main::@5: scope:[main] from main::@4 [27] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#12 [28] (word) main::j#1 ← (word) main::j#2 + (word) main::i#12 to:main::@4 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from main::@12 print_byte print_byte::@1 [29] (byte*) print_char_cursor#19 ← phi( main::@12/(byte*) print_char_cursor#20 print_byte/(byte*) print_char_cursor#26 print_byte::@1/(byte*) print_char_cursor#20 ) [29] (byte) print_char::ch#3 ← phi( main::@12/(byte) ' ' print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -903,6 +917,8 @@ print_char: scope:[print_char] from main::@12 print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char [32] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from main::@10 [33] (byte) print_byte::b#0 ← > (word) print_word::w#0 [34] call print_byte @@ -914,6 +930,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [37] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [38] (byte*) print_char_cursor#26 ← phi( print_word/(byte*) print_char_cursor#27 print_word::@1/(byte*) print_char_cursor#20 ) [38] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -929,6 +947,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [45] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main [46] phi() to:memset::@1 diff --git a/src/test/ref/sieve.cfg b/src/test/ref/sieve.cfg index e8ad1e1ce..863df61d6 100644 --- a/src/test/ref/sieve.cfg +++ b/src/test/ref/sieve.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::toD0181 @@ -134,6 +136,8 @@ main::@6: scope:[main] from main::@5 [66] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#12 [67] (word) main::j#1 ← (word) main::j#2 + (word) main::i#12 to:main::@5 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from main::@28 [68] *((byte*) print_char_cursor#2) ← (const byte) print_char::ch#0 [69] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#2 @@ -141,6 +145,8 @@ print_char: scope:[print_char] from main::@28 print_char::@return: scope:[print_char] from print_char [70] return to:@return + +(void()) print_word_decimal((word) print_word_decimal::w) print_word_decimal: scope:[print_word_decimal] from main::@12 main::@18 main::@24 [71] (byte*) print_char_cursor#58 ← phi( main::@12/(byte*~) print_char_cursor#97 main::@18/(byte*) print_char_cursor#2 main::@24/(byte*) print_char_cursor#2 ) [71] (word) print_word_decimal::w#3 ← phi( main::@12/(word) print_word_decimal::w#2 main::@18/(const word) COUNT#0 main::@24/(word) print_word_decimal::w#1 ) @@ -154,6 +160,8 @@ print_word_decimal::@1: scope:[print_word_decimal] from print_word_decimal print_word_decimal::@return: scope:[print_word_decimal] from print_word_decimal::@1 [76] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@10 main::@15 main::@17 main::@23 main::@25 print_dword_decimal::@1 print_word_decimal::@1 [77] (byte*) print_char_cursor#66 ← phi( main::@10/(byte*~) print_char_cursor#89 main::@15/(byte*) 1024 main::@17/(byte*~) print_char_cursor#90 main::@23/(byte*~) print_char_cursor#91 main::@25/(byte*) print_char_cursor#2 print_dword_decimal::@1/(byte*) print_char_cursor#2 print_word_decimal::@1/(byte*) print_char_cursor#58 ) [77] (byte*) print_str::str#10 ← phi( main::@10/(const string) main::str4 main::@15/(const string) main::str main::@17/(const string) main::str1 main::@23/(const string) main::str2 main::@25/(const string) main::str3 print_dword_decimal::@1/(const byte[$b]) decimal_digits_long#0 print_word_decimal::@1/(const byte[6]) decimal_digits#0 ) @@ -171,6 +179,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [82] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [83] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#8 to:print_str::@1 + +(void()) utoa((word) utoa::value , (byte*) utoa::buffer , (byte) utoa::radix) utoa: scope:[utoa] from print_word_decimal [84] phi() to:utoa::@1 @@ -215,6 +225,8 @@ utoa::@6: scope:[utoa] from utoa::@5 [103] (word) utoa::value#0 ← (word) utoa_append::return#0 [104] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11 to:utoa::@4 + +(word()) utoa_append((byte*) utoa_append::buffer , (word) utoa_append::value , (word) utoa_append::sub) utoa_append: scope:[utoa_append] from utoa::@5 [105] phi() to:utoa_append::@1 @@ -233,6 +245,8 @@ utoa_append::@2: scope:[utoa_append] from utoa_append::@1 [110] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 [111] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 to:utoa_append::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@16 main::@19 main::@27 [112] (byte*) print_line_cursor#21 ← phi( main::@16/(byte*) 1024 main::@19/(byte*) print_line_cursor#1 main::@27/(byte*) print_line_cursor#1 ) to:print_ln::@1 @@ -244,6 +258,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [116] return to:@return + +(void()) print_dword_decimal((dword) print_dword_decimal::w) print_dword_decimal: scope:[print_dword_decimal] from main::@26 [117] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 [118] call ultoa @@ -255,6 +271,8 @@ print_dword_decimal::@1: scope:[print_dword_decimal] from print_dword_decimal print_dword_decimal::@return: scope:[print_dword_decimal] from print_dword_decimal::@1 [121] return to:@return + +(void()) ultoa((dword) ultoa::value , (byte*) ultoa::buffer , (byte) ultoa::radix) ultoa: scope:[ultoa] from print_dword_decimal [122] phi() to:ultoa::@1 @@ -299,6 +317,8 @@ ultoa::@6: scope:[ultoa] from ultoa::@5 [141] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 [142] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#11 to:ultoa::@4 + +(dword()) ultoa_append((byte*) ultoa_append::buffer , (dword) ultoa_append::value , (dword) ultoa_append::sub) ultoa_append: scope:[ultoa_append] from ultoa::@5 [143] phi() to:ultoa_append::@1 @@ -317,6 +337,8 @@ ultoa_append::@2: scope:[ultoa_append] from ultoa_append::@1 [148] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 [149] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 to:ultoa_append::@1 + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from main::@22 [150] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 [151] call divr16u @@ -336,6 +358,8 @@ div32u16u::@2: scope:[div32u16u] from div32u16u::@1 div32u16u::@return: scope:[div32u16u] from div32u16u::@2 [160] return to:@return + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div32u16u div32u16u::@1 [161] (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@1/(word) divr16u::dividend#2 ) [161] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) @@ -375,12 +399,16 @@ divr16u::@6: scope:[divr16u] from divr16u::@3 divr16u::@return: scope:[divr16u] from divr16u::@6 [178] return to:@return + +(dword()) clock() clock: scope:[clock] from main::@3 [179] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) to:clock::@return clock::@return: scope:[clock] from clock [180] return to:@return + +(void()) clock_start() clock_start: scope:[clock_start] from main::@21 [181] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [182] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 @@ -391,6 +419,8 @@ clock_start: scope:[clock_start] from main::@21 clock_start::@return: scope:[clock_start] from clock_start [186] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main::@20 print_cls [187] (byte) memset::c#4 ← phi( main::@20/(byte) 0 print_cls/(byte) ' ' ) [187] (void*) memset::str#3 ← phi( main::@20/(void*)(const byte*) sieve#0 print_cls/(void*)(byte*) 1024 ) @@ -412,6 +442,8 @@ memset::@3: scope:[memset] from memset::@2 [194] *((byte*) memset::dst#2) ← (byte) memset::c#4 [195] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) print_cls() print_cls: scope:[print_cls] from main::@14 [196] phi() [197] call memset diff --git a/src/test/ref/sieve.log b/src/test/ref/sieve.log index 648f4ded8..101d62d6b 100644 --- a/src/test/ref/sieve.log +++ b/src/test/ref/sieve.log @@ -117,6 +117,8 @@ Culled Empty Block (label) main::@28 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@4 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main::@35 print_cls (byte) memset::c#5 ← phi( main::@35/(byte) memset::c#1 print_cls/(byte) memset::c#0 ) (void*) memset::str#4 ← phi( main::@35/(void*) memset::str#1 print_cls/(void*) memset::str#0 ) @@ -177,6 +179,8 @@ memset::@return: scope:[memset] from memset::@1 (dword) CLOCKS_PER_SEC#0 ← (word~) $0 (dword) CLOCKS_PER_INIT#0 ← (number) $12 to:@12 + +(dword()) clock() clock: scope:[clock] from main::@3 (number~) clock::$0 ← (number) $ffffffff - *((dword*) CIA2_TIMER_AB#0) (dword) clock::return#0 ← (number~) clock::$0 @@ -186,6 +190,8 @@ clock::@return: scope:[clock] from clock (dword) clock::return#1 ← (dword) clock::return#3 return to:@return + +(void()) clock_start() clock_start: scope:[clock_start] from main::@36 (byte~) clock_start::$0 ← (byte) CIA_TIMER_CONTROL_STOP#0 | (byte) CIA_TIMER_CONTROL_CONTINUOUS#0 (byte~) clock_start::$1 ← (byte~) clock_start::$0 | (byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES#0 @@ -207,6 +213,8 @@ clock_start::@return: scope:[clock_start] from clock_start @12: scope:[] from @8 (word) rem16u#0 ← (number) 0 to:@22 + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div32u16u div32u16u::@2 (word) divr16u::divisor#6 ← phi( div32u16u/(word) divr16u::divisor#0 div32u16u::@2/(word) divr16u::divisor#1 ) (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@2/(word) divr16u::dividend#2 ) @@ -284,6 +292,8 @@ divr16u::@return: scope:[divr16u] from divr16u::@6 (word) rem16u#2 ← (word) rem16u#9 return to:@return + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from main::@38 (word) rem16u#16 ← phi( main::@38/(word) rem16u#17 ) (word) div32u16u::divisor#1 ← phi( main::@38/(word) div32u16u::divisor#0 ) @@ -335,6 +345,8 @@ div32u16u::@return: scope:[div32u16u] from div32u16u::@3 (word[]) RADIX_DECIMAL_VALUES#0 ← { (number) $2710, (number) $3e8, (number) $64, (number) $a } (word[]) RADIX_HEXADECIMAL_VALUES#0 ← { (number) $1000, (number) $100, (number) $10 } to:@24 + +(void()) utoa((word) utoa::value , (byte*) utoa::buffer , (byte) utoa::radix) utoa: scope:[utoa] from print_word_decimal (byte*) utoa::buffer#21 ← phi( print_word_decimal/(byte*) utoa::buffer#5 ) (word) utoa::value#12 ← phi( print_word_decimal/(word) utoa::value#1 ) @@ -476,6 +488,8 @@ utoa::@26: scope:[utoa] from utoa::@24 (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#9 (byte) utoa::started#1 ← (number) 1 to:utoa::@21 + +(word()) utoa_append((byte*) utoa_append::buffer , (word) utoa_append::value , (word) utoa_append::sub) utoa_append: scope:[utoa_append] from utoa::@24 (byte*) utoa_append::buffer#3 ← phi( utoa::@24/(byte*) utoa_append::buffer#0 ) (word) utoa_append::sub#3 ← phi( utoa::@24/(word) utoa_append::sub#0 ) @@ -517,6 +531,8 @@ utoa_append::@return: scope:[utoa_append] from utoa_append::@3 (dword[]) RADIX_DECIMAL_VALUES_LONG#0 ← { (number) $3b9aca00, (number) $5f5e100, (number) $989680, (number) $f4240, (number) $186a0, (number) $2710, (number) $3e8, (number) $64, (number) $a } (dword[]) RADIX_HEXADECIMAL_VALUES_LONG#0 ← { (number) $10000000, (number) $1000000, (number) $100000, (number) $10000, (number) $1000, (number) $100, (number) $10 } to:@26 + +(void()) ultoa((dword) ultoa::value , (byte*) ultoa::buffer , (byte) ultoa::radix) ultoa: scope:[ultoa] from print_dword_decimal (byte*) ultoa::buffer#21 ← phi( print_dword_decimal/(byte*) ultoa::buffer#5 ) (dword) ultoa::value#12 ← phi( print_dword_decimal/(dword) ultoa::value#1 ) @@ -658,6 +674,8 @@ ultoa::@26: scope:[ultoa] from ultoa::@24 (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#9 (byte) ultoa::started#1 ← (number) 1 to:ultoa::@21 + +(dword()) ultoa_append((byte*) ultoa_append::buffer , (dword) ultoa_append::value , (dword) ultoa_append::sub) ultoa_append: scope:[ultoa_append] from ultoa::@24 (byte*) ultoa_append::buffer#3 ← phi( ultoa::@24/(byte*) ultoa_append::buffer#0 ) (dword) ultoa_append::sub#3 ← phi( ultoa::@24/(dword) ultoa_append::sub#0 ) @@ -698,6 +716,8 @@ ultoa_append::@return: scope:[ultoa_append] from ultoa_append::@3 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@36 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@17 main::@30 main::@32 main::@39 main::@41 print_dword_decimal::@1 print_word_decimal::@1 (byte*) print_char_cursor#66 ← phi( main::@17/(byte*) print_char_cursor#62 main::@30/(byte*) print_char_cursor#13 main::@32/(byte*) print_char_cursor#15 main::@39/(byte*) print_char_cursor#61 main::@41/(byte*) print_char_cursor#20 print_dword_decimal::@1/(byte*) print_char_cursor#59 print_word_decimal::@1/(byte*) print_char_cursor#58 ) (byte*) print_str::str#10 ← phi( main::@17/(byte*) print_str::str#7 main::@30/(byte*) print_str::str#3 main::@32/(byte*) print_str::str#4 main::@39/(byte*) print_str::str#5 main::@41/(byte*) print_str::str#6 print_dword_decimal::@1/(byte*) print_str::str#2 print_word_decimal::@1/(byte*) print_str::str#1 ) @@ -720,6 +740,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#30 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from main::@31 main::@34 main::@43 (byte*) print_char_cursor#57 ← phi( main::@31/(byte*) print_char_cursor#14 main::@34/(byte*) print_char_cursor#17 main::@43/(byte*) print_char_cursor#22 ) (byte*) print_line_cursor#21 ← phi( main::@31/(byte*) print_line_cursor#23 main::@34/(byte*) print_line_cursor#24 main::@43/(byte*) print_line_cursor#25 ) @@ -750,6 +772,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_line_cursor#38 ← phi( @26/(byte*) print_line_cursor#0 ) (byte[6]) decimal_digits#0 ← { fill( 6, 0) } to:@40 + +(void()) print_word_decimal((word) print_word_decimal::w) print_word_decimal: scope:[print_word_decimal] from main::@21 main::@33 main::@40 (byte*) print_char_cursor#67 ← phi( main::@21/(byte*) print_char_cursor#63 main::@33/(byte*) print_char_cursor#16 main::@40/(byte*) print_char_cursor#19 ) (word) print_word_decimal::w#3 ← phi( main::@21/(word) print_word_decimal::w#2 main::@33/(word) print_word_decimal::w#0 main::@40/(word) print_word_decimal::w#1 ) @@ -779,6 +803,8 @@ print_word_decimal::@return: scope:[print_word_decimal] from print_word_decimal (byte*) print_line_cursor#34 ← phi( @36/(byte*) print_line_cursor#38 ) (byte[$b]) decimal_digits_long#0 ← { fill( $b, 0) } to:@50 + +(void()) print_dword_decimal((dword) print_dword_decimal::w) print_dword_decimal: scope:[print_dword_decimal] from main::@42 (byte*) print_char_cursor#68 ← phi( main::@42/(byte*) print_char_cursor#21 ) (dword) print_dword_decimal::w#1 ← phi( main::@42/(dword) print_dword_decimal::w#0 ) @@ -801,6 +827,8 @@ print_dword_decimal::@return: scope:[print_dword_decimal] from print_dword_deci (byte*) print_char_cursor#8 ← (byte*) print_char_cursor#36 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from main::@46 (byte*) print_char_cursor#37 ← phi( main::@46/(byte*) print_char_cursor#25 ) (byte) print_char::ch#1 ← phi( main::@46/(byte) print_char::ch#0 ) @@ -812,6 +840,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#10 ← (byte*) print_char_cursor#38 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main::@29 (byte*) print_screen#1 ← phi( main::@29/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -842,6 +872,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte) SQRT_COUNT#0 ← (number) $80 (byte*) sieve#0 ← ((byte*)) (number) $1000 to:@51 + +(void()) main() main: scope:[main] from @51 (word) rem16u#58 ← phi( @51/(word) rem16u#19 ) (byte*) print_char_cursor#80 ← phi( @51/(byte*) print_char_cursor#65 ) @@ -3417,6 +3449,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::toD0181 @@ -3544,6 +3578,8 @@ main::@6: scope:[main] from main::@5 [66] (byte*) main::s#1 ← (byte*) main::s#2 + (word) main::i#12 [67] (word) main::j#1 ← (word) main::j#2 + (word) main::i#12 to:main::@5 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from main::@28 [68] *((byte*) print_char_cursor#2) ← (const byte) print_char::ch#0 [69] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#2 @@ -3551,6 +3587,8 @@ print_char: scope:[print_char] from main::@28 print_char::@return: scope:[print_char] from print_char [70] return to:@return + +(void()) print_word_decimal((word) print_word_decimal::w) print_word_decimal: scope:[print_word_decimal] from main::@12 main::@18 main::@24 [71] (byte*) print_char_cursor#58 ← phi( main::@12/(byte*~) print_char_cursor#97 main::@18/(byte*) print_char_cursor#2 main::@24/(byte*) print_char_cursor#2 ) [71] (word) print_word_decimal::w#3 ← phi( main::@12/(word) print_word_decimal::w#2 main::@18/(const word) COUNT#0 main::@24/(word) print_word_decimal::w#1 ) @@ -3564,6 +3602,8 @@ print_word_decimal::@1: scope:[print_word_decimal] from print_word_decimal print_word_decimal::@return: scope:[print_word_decimal] from print_word_decimal::@1 [76] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@10 main::@15 main::@17 main::@23 main::@25 print_dword_decimal::@1 print_word_decimal::@1 [77] (byte*) print_char_cursor#66 ← phi( main::@10/(byte*~) print_char_cursor#89 main::@15/(byte*) 1024 main::@17/(byte*~) print_char_cursor#90 main::@23/(byte*~) print_char_cursor#91 main::@25/(byte*) print_char_cursor#2 print_dword_decimal::@1/(byte*) print_char_cursor#2 print_word_decimal::@1/(byte*) print_char_cursor#58 ) [77] (byte*) print_str::str#10 ← phi( main::@10/(const string) main::str4 main::@15/(const string) main::str main::@17/(const string) main::str1 main::@23/(const string) main::str2 main::@25/(const string) main::str3 print_dword_decimal::@1/(const byte[$b]) decimal_digits_long#0 print_word_decimal::@1/(const byte[6]) decimal_digits#0 ) @@ -3581,6 +3621,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [82] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [83] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#8 to:print_str::@1 + +(void()) utoa((word) utoa::value , (byte*) utoa::buffer , (byte) utoa::radix) utoa: scope:[utoa] from print_word_decimal [84] phi() to:utoa::@1 @@ -3625,6 +3667,8 @@ utoa::@6: scope:[utoa] from utoa::@5 [103] (word) utoa::value#0 ← (word) utoa_append::return#0 [104] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11 to:utoa::@4 + +(word()) utoa_append((byte*) utoa_append::buffer , (word) utoa_append::value , (word) utoa_append::sub) utoa_append: scope:[utoa_append] from utoa::@5 [105] phi() to:utoa_append::@1 @@ -3643,6 +3687,8 @@ utoa_append::@2: scope:[utoa_append] from utoa_append::@1 [110] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 [111] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 to:utoa_append::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@16 main::@19 main::@27 [112] (byte*) print_line_cursor#21 ← phi( main::@16/(byte*) 1024 main::@19/(byte*) print_line_cursor#1 main::@27/(byte*) print_line_cursor#1 ) to:print_ln::@1 @@ -3654,6 +3700,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [116] return to:@return + +(void()) print_dword_decimal((dword) print_dword_decimal::w) print_dword_decimal: scope:[print_dword_decimal] from main::@26 [117] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 [118] call ultoa @@ -3665,6 +3713,8 @@ print_dword_decimal::@1: scope:[print_dword_decimal] from print_dword_decimal print_dword_decimal::@return: scope:[print_dword_decimal] from print_dword_decimal::@1 [121] return to:@return + +(void()) ultoa((dword) ultoa::value , (byte*) ultoa::buffer , (byte) ultoa::radix) ultoa: scope:[ultoa] from print_dword_decimal [122] phi() to:ultoa::@1 @@ -3709,6 +3759,8 @@ ultoa::@6: scope:[ultoa] from ultoa::@5 [141] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 [142] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#11 to:ultoa::@4 + +(dword()) ultoa_append((byte*) ultoa_append::buffer , (dword) ultoa_append::value , (dword) ultoa_append::sub) ultoa_append: scope:[ultoa_append] from ultoa::@5 [143] phi() to:ultoa_append::@1 @@ -3727,6 +3779,8 @@ ultoa_append::@2: scope:[ultoa_append] from ultoa_append::@1 [148] (byte) ultoa_append::digit#1 ← ++ (byte) ultoa_append::digit#2 [149] (dword) ultoa_append::value#1 ← (dword) ultoa_append::value#2 - (dword) ultoa_append::sub#0 to:ultoa_append::@1 + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from main::@22 [150] (word) divr16u::dividend#1 ← > (dword) div32u16u::dividend#0 [151] call divr16u @@ -3746,6 +3800,8 @@ div32u16u::@2: scope:[div32u16u] from div32u16u::@1 div32u16u::@return: scope:[div32u16u] from div32u16u::@2 [160] return to:@return + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div32u16u div32u16u::@1 [161] (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@1/(word) divr16u::dividend#2 ) [161] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) @@ -3785,12 +3841,16 @@ divr16u::@6: scope:[divr16u] from divr16u::@3 divr16u::@return: scope:[divr16u] from divr16u::@6 [178] return to:@return + +(dword()) clock() clock: scope:[clock] from main::@3 [179] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0) to:clock::@return clock::@return: scope:[clock] from clock [180] return to:@return + +(void()) clock_start() clock_start: scope:[clock_start] from main::@21 [181] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 [182] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 @@ -3801,6 +3861,8 @@ clock_start: scope:[clock_start] from main::@21 clock_start::@return: scope:[clock_start] from clock_start [186] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from main::@20 print_cls [187] (byte) memset::c#4 ← phi( main::@20/(byte) 0 print_cls/(byte) ' ' ) [187] (void*) memset::str#3 ← phi( main::@20/(void*)(const byte*) sieve#0 print_cls/(void*)(byte*) 1024 ) @@ -3822,6 +3884,8 @@ memset::@3: scope:[memset] from memset::@2 [194] *((byte*) memset::dst#2) ← (byte) memset::c#4 [195] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 + +(void()) print_cls() print_cls: scope:[print_cls] from main::@14 [196] phi() [197] call memset diff --git a/src/test/ref/signed-bytes.cfg b/src/test/ref/signed-bytes.cfg index 57172f44b..aab178397 100644 --- a/src/test/ref/signed-bytes.cfg +++ b/src/test/ref/signed-bytes.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/signed-bytes.log b/src/test/ref/signed-bytes.log index 0a426f925..279c571f1 100644 --- a/src/test/ref/signed-bytes.log +++ b/src/test/ref/signed-bytes.log @@ -7,6 +7,8 @@ Culled Empty Block (label) main::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte) main::j#0 ← (number) 0 @@ -122,6 +124,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/signed-char-comparison.cfg b/src/test/ref/signed-char-comparison.cfg index 53489f3f8..71133bd82 100644 --- a/src/test/ref/signed-char-comparison.cfg +++ b/src/test/ref/signed-char-comparison.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -22,6 +24,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [10] return to:@return + +(void()) debug((signed byte) debug::dy) debug: scope:[debug] from main::@1 [11] if((signed byte) debug::dy#0<=(signed byte) -$78) goto debug::@return to:debug::@1 diff --git a/src/test/ref/signed-char-comparison.log b/src/test/ref/signed-char-comparison.log index c7aad9568..07e992fae 100644 --- a/src/test/ref/signed-char-comparison.log +++ b/src/test/ref/signed-char-comparison.log @@ -5,6 +5,8 @@ Culled Empty Block (label) debug::@1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @2 (signed byte) main::dy#0 ← (signed byte) -$80 to:main::@1 @@ -25,6 +27,8 @@ main::@return: scope:[main] from main::@3 @1: scope:[] from @begin (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@2 + +(void()) debug((signed byte) debug::dy) debug: scope:[debug] from main::@1 (signed byte) debug::dy#1 ← phi( main::@1/(signed byte) debug::dy#0 ) (byte~) debug::$0 ← ((byte)) (signed byte) debug::dy#1 @@ -153,6 +157,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -168,6 +174,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [10] return to:@return + +(void()) debug((signed byte) debug::dy) debug: scope:[debug] from main::@1 [11] if((signed byte) debug::dy#0<=(signed byte) -$78) goto debug::@return to:debug::@1 diff --git a/src/test/ref/signed-indexed-subtract.cfg b/src/test/ref/signed-indexed-subtract.cfg index 865088396..0e8bba612 100644 --- a/src/test/ref/signed-indexed-subtract.cfg +++ b/src/test/ref/signed-indexed-subtract.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -53,6 +55,8 @@ main::@return: scope:[main] from main::@8 main::@9: scope:[main] from main::@8 [25] (byte*~) print_char_cursor#63 ← (byte*) print_line_cursor#1 to:main::@3 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@7 [26] phi() to:print_ln::@1 @@ -64,6 +68,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [30] return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from main::@3 [31] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 to:print_sword::@3 @@ -86,6 +92,8 @@ print_sword::@1: scope:[print_sword] from print_sword print_sword::@4: scope:[print_sword] from print_sword::@1 [40] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#1 to:print_sword::@2 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sword::@1 print_sword::@3 [41] (byte*) print_char_cursor#34 ← phi( print_byte/(byte*) print_char_cursor#13 print_byte::@1/(byte*) print_char_cursor#13 print_sword::@1/(byte*) print_char_cursor#49 print_sword::@3/(byte*) print_char_cursor#49 ) [41] (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' ) @@ -95,6 +103,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_sword::@1 p print_char::@return: scope:[print_char] from print_char [44] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_sword::@2 [45] (byte) print_byte::b#0 ← > (word) print_word::w#0 [46] call print_byte @@ -106,6 +116,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [49] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [50] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) [51] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 @@ -120,6 +132,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [57] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main::@2 [58] phi() [59] call memset @@ -127,6 +141,8 @@ print_cls: scope:[print_cls] from main::@2 print_cls::@return: scope:[print_cls] from print_cls [60] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [61] phi() to:memset::@1 @@ -141,6 +157,8 @@ memset::@2: scope:[memset] from memset::@1 [65] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [66] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) sub((byte) sub::idx , (byte) sub::s) sub: scope:[sub] from main::@1 main::@4 main::@5 [67] (byte) sub::s#3 ← phi( main::@1/(byte) $80 main::@4/(byte) $40 main::@5/(byte) $40 ) [67] (byte) sub::idx#3 ← phi( main::@1/(byte) sub::idx#0 main::@4/(byte) sub::idx#1 main::@5/(byte) sub::idx#2 ) diff --git a/src/test/ref/signed-indexed-subtract.log b/src/test/ref/signed-indexed-subtract.log index 3c5e4f74b..0889e9dc1 100644 --- a/src/test/ref/signed-indexed-subtract.log +++ b/src/test/ref/signed-indexed-subtract.log @@ -58,6 +58,8 @@ Culled Empty Block (label) @37 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@12 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -105,6 +107,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@29 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@9 (byte*) print_char_cursor#42 ← phi( main::@9/(byte*) print_char_cursor#18 ) (byte*) print_line_cursor#17 ← phi( main::@9/(byte*) print_line_cursor#19 ) @@ -128,6 +132,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#23 return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from main::@3 (byte*) print_char_cursor#51 ← phi( main::@3/(byte*) print_char_cursor#49 ) (signed word) print_sword::w#2 ← phi( main::@3/(signed word) print_sword::w#1 ) @@ -174,6 +180,8 @@ print_sword::@return: scope:[print_sword] from print_sword::@7 (byte*) print_char_cursor#6 ← (byte*) print_char_cursor#27 return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_sword::@2 (byte*) print_char_cursor#46 ← phi( print_sword::@2/(byte*) print_char_cursor#45 ) (word) print_word::w#1 ← phi( print_sword::@2/(word) print_word::w#0 ) @@ -204,6 +212,8 @@ print_word::@return: scope:[print_word] from print_word::@2 (byte*) print_line_cursor#24 ← phi( @12/(byte*) print_line_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $0 to:@36 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) print_char_cursor#47 ← phi( print_word/(byte*) print_char_cursor#46 print_word::@1/(byte*) print_char_cursor#7 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -228,6 +238,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#12 ← (byte*) print_char_cursor#33 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sword::@1 print_sword::@3 (byte*) print_char_cursor#34 ← phi( print_byte/(byte*) print_char_cursor#47 print_byte::@1/(byte*) print_char_cursor#10 print_sword::@1/(byte*) print_char_cursor#43 print_sword::@3/(byte*) print_char_cursor#44 ) (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sword::@1/(byte) print_char::ch#0 print_sword::@3/(byte) print_char::ch#1 ) @@ -239,6 +251,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#14 ← (byte*) print_char_cursor#35 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main::@2 (byte*) print_screen#1 ← phi( main::@2/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -265,6 +279,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte*) print_line_cursor#23 ← phi( @29/(byte*) print_line_cursor#24 ) (signed word[]) words#0 ← { (number) -$6000, (number) -$600, (number) -$60, (number) -6, (number) 0, (number) 6, (number) $60, (number) $600, (number) $6000 } to:@38 + +(void()) main() main: scope:[main] from @38 (byte*) print_char_cursor#58 ← phi( @38/(byte*) print_char_cursor#50 ) (byte*) print_line_cursor#28 ← phi( @38/(byte*) print_line_cursor#20 ) @@ -352,6 +368,8 @@ main::@return: scope:[main] from main::@10 (byte*) print_char_cursor#20 ← (byte*) print_char_cursor#40 return to:@return + +(void()) sub((byte) sub::idx , (byte) sub::s) sub: scope:[sub] from main::@1 main::@5 main::@6 (byte) sub::s#3 ← phi( main::@1/(byte) sub::s#0 main::@5/(byte) sub::s#1 main::@6/(byte) sub::s#2 ) (byte) sub::idx#3 ← phi( main::@1/(byte) sub::idx#0 main::@5/(byte) sub::idx#1 main::@6/(byte) sub::idx#2 ) @@ -953,6 +971,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -999,6 +1019,8 @@ main::@return: scope:[main] from main::@8 main::@9: scope:[main] from main::@8 [25] (byte*~) print_char_cursor#63 ← (byte*) print_line_cursor#1 to:main::@3 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@7 [26] phi() to:print_ln::@1 @@ -1010,6 +1032,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [30] return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from main::@3 [31] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 to:print_sword::@3 @@ -1032,6 +1056,8 @@ print_sword::@1: scope:[print_sword] from print_sword print_sword::@4: scope:[print_sword] from print_sword::@1 [40] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#1 to:print_sword::@2 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sword::@1 print_sword::@3 [41] (byte*) print_char_cursor#34 ← phi( print_byte/(byte*) print_char_cursor#13 print_byte::@1/(byte*) print_char_cursor#13 print_sword::@1/(byte*) print_char_cursor#49 print_sword::@3/(byte*) print_char_cursor#49 ) [41] (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' ) @@ -1041,6 +1067,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_sword::@1 p print_char::@return: scope:[print_char] from print_char [44] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_sword::@2 [45] (byte) print_byte::b#0 ← > (word) print_word::w#0 [46] call print_byte @@ -1052,6 +1080,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [49] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [50] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) [51] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 @@ -1066,6 +1096,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [57] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main::@2 [58] phi() [59] call memset @@ -1073,6 +1105,8 @@ print_cls: scope:[print_cls] from main::@2 print_cls::@return: scope:[print_cls] from print_cls [60] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [61] phi() to:memset::@1 @@ -1087,6 +1121,8 @@ memset::@2: scope:[memset] from memset::@1 [65] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [66] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) sub((byte) sub::idx , (byte) sub::s) sub: scope:[sub] from main::@1 main::@4 main::@5 [67] (byte) sub::s#3 ← phi( main::@1/(byte) $80 main::@4/(byte) $40 main::@5/(byte) $40 ) [67] (byte) sub::idx#3 ← phi( main::@1/(byte) sub::idx#0 main::@4/(byte) sub::idx#1 main::@5/(byte) sub::idx#2 ) diff --git a/src/test/ref/signed-word-minus-byte-2.cfg b/src/test/ref/signed-word-minus-byte-2.cfg index d0a4e5ef5..c1c902087 100644 --- a/src/test/ref/signed-word-minus-byte-2.cfg +++ b/src/test/ref/signed-word-minus-byte-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/signed-word-minus-byte-2.log b/src/test/ref/signed-word-minus-byte-2.log index 1cac01a4f..fbc6bd43f 100644 --- a/src/test/ref/signed-word-minus-byte-2.log +++ b/src/test/ref/signed-word-minus-byte-2.log @@ -5,6 +5,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (signed word) main::w1#0 ← (number) $4d2 (signed word*) main::screen#0 ← ((signed word*)) (number) $400 @@ -124,6 +126,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/signed-words.cfg b/src/test/ref/signed-words.cfg index 355fc231f..fa2c7aac4 100644 --- a/src/test/ref/signed-words.cfg +++ b/src/test/ref/signed-words.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call init @@ -23,6 +25,8 @@ main::@2: scope:[main] from main::@1 [8] phi() [9] call anim to:main::@1 + +(void()) anim() anim: scope:[anim] from main::@2 [10] if((signed word) ypos#13>=(signed byte) 0) goto anim::@1 to:anim::@2 @@ -61,6 +65,8 @@ anim::@1: scope:[anim] from anim anim::@3 anim::@return: scope:[anim] from anim::@1 [31] return to:@return + +(void()) init() init: scope:[init] from main [32] *((const byte*) SPRITES_ENABLE#0) ← (byte) 1 [33] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 diff --git a/src/test/ref/signed-words.log b/src/test/ref/signed-words.log index 9fcd504c9..f85748e91 100644 --- a/src/test/ref/signed-words.log +++ b/src/test/ref/signed-words.log @@ -28,6 +28,8 @@ CONTROL FLOW GRAPH SSA (byte*) SPRITES_PTR#0 ← (byte*~) $0 (byte*) SPRITE#0 ← ((byte*)) (number) $2000 to:@6 + +(void()) main() main: scope:[main] from @7 (signed word) yvel_init#19 ← phi( @7/(signed word) yvel_init#16 ) (signed word) xvel#19 ← phi( @7/(signed word) xvel#15 ) @@ -86,6 +88,8 @@ main::@return: scope:[main] from main::@6 (signed word) yvel_init#1 ← (signed word) yvel_init#8 return to:@return + +(void()) init() init: scope:[init] from main *((byte*) SPRITES_ENABLE#0) ← (number) 1 *((byte*) SPRITES_EXPAND_X#0) ← (number) 0 @@ -130,6 +134,8 @@ init::@return: scope:[init] from init::@7 (signed word) yvel#2 ← (signed word) yvel_init#2 (signed word) g#0 ← (number) -5 to:@7 + +(void()) anim() anim: scope:[anim] from main::@3 (signed word) yvel_init#14 ← phi( main::@3/(signed word) yvel_init#13 ) (signed word) xvel#13 ← phi( main::@3/(signed word) xvel#12 ) @@ -787,6 +793,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call init @@ -803,6 +811,8 @@ main::@2: scope:[main] from main::@1 [8] phi() [9] call anim to:main::@1 + +(void()) anim() anim: scope:[anim] from main::@2 [10] if((signed word) ypos#13>=(signed byte) 0) goto anim::@1 to:anim::@2 @@ -841,6 +851,8 @@ anim::@1: scope:[anim] from anim anim::@3 anim::@return: scope:[anim] from anim::@1 [31] return to:@return + +(void()) init() init: scope:[init] from main [32] *((const byte*) SPRITES_ENABLE#0) ← (byte) 1 [33] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 diff --git a/src/test/ref/simple-loop.cfg b/src/test/ref/simple-loop.cfg index e7ad2b140..9a8a0da08 100644 --- a/src/test/ref/simple-loop.cfg +++ b/src/test/ref/simple-loop.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/simple-loop.log b/src/test/ref/simple-loop.log index 9337bd99a..c7ed73978 100644 --- a/src/test/ref/simple-loop.log +++ b/src/test/ref/simple-loop.log @@ -6,6 +6,8 @@ Culled Empty Block (label) main::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (number) 0 @@ -112,6 +114,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/sinus-basic.cfg b/src/test/ref/sinus-basic.cfg index adde0e513..b9199db39 100644 --- a/src/test/ref/sinus-basic.cfg +++ b/src/test/ref/sinus-basic.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call setFAC @@ -77,6 +79,8 @@ main::@return: scope:[main] from main::@14 main::@15: scope:[main] from main::@14 [37] (byte*~) print_char_cursor#53 ← (byte*) print_line_cursor#1 to:main::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@13 [38] phi() to:print_ln::@1 @@ -88,6 +92,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [42] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from main::@12 [43] (byte) print_byte::b#0 ← > (word) print_word::w#0 [44] call print_byte @@ -99,6 +105,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [47] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [48] (byte*) print_char_cursor#31 ← phi( print_word/(byte*) print_char_cursor#32 print_word::@1/(byte*) print_char_cursor#10 ) [48] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -114,6 +122,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [55] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 [56] (byte*) print_char_cursor#23 ← phi( print_byte/(byte*) print_char_cursor#31 print_byte::@1/(byte*) print_char_cursor#10 ) [56] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -123,6 +133,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char [59] return to:@return + +(word()) getFAC() getFAC: scope:[getFAC] from main::@11 asm { jsr$b1aa stymemLo stamemHi } [61] (word) getFAC::return#0 ← *((const byte*) memHi#0) w= *((const byte*) memLo#0) @@ -130,6 +142,8 @@ getFAC: scope:[getFAC] from main::@11 getFAC::@return: scope:[getFAC] from getFAC [62] return to:@return + +(void()) addMEMtoFAC((byte*) addMEMtoFAC::mem) addMEMtoFAC: scope:[addMEMtoFAC] from main::@10 [63] phi() to:addMEMtoFAC::prepareMEM1 @@ -143,6 +157,8 @@ addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC::prepareMEM1 addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 [67] return to:@return + +(void()) mulFACbyMEM((byte*) mulFACbyMEM::mem) mulFACbyMEM: scope:[mulFACbyMEM] from main::@4 main::@9 [68] (byte*) mulFACbyMEM::mem#2 ← phi( main::@9/(const byte[]) main::f_127#0 main::@4/(const byte*) main::f_2pi#0 ) to:mulFACbyMEM::prepareMEM1 @@ -158,12 +174,16 @@ mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM::prepareMEM1 mulFACbyMEM::@return: scope:[mulFACbyMEM] from mulFACbyMEM::@1 [74] return to:@return + +(void()) sinFAC() sinFAC: scope:[sinFAC] from main::@8 asm { jsr$e26b } to:sinFAC::@return sinFAC::@return: scope:[sinFAC] from sinFAC [76] return to:@return + +(void()) divMEMbyFAC((byte*) divMEMbyFAC::mem) divMEMbyFAC: scope:[divMEMbyFAC] from main::@7 [77] phi() to:divMEMbyFAC::prepareMEM1 @@ -177,6 +197,8 @@ divMEMbyFAC::@1: scope:[divMEMbyFAC] from divMEMbyFAC::prepareMEM1 divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 [81] return to:@return + +(void()) setFAC((word) setFAC::w) setFAC: scope:[setFAC] from main main::@1 main::@6 [82] (word) setFAC::prepareMEM1_mem#0 ← phi( main/(word) $4fb main::@1/(word) setFAC::w#1 main::@6/(byte) $19 ) to:setFAC::prepareMEM1 @@ -192,6 +214,8 @@ setFAC::@1: scope:[setFAC] from setFAC::prepareMEM1 setFAC::@return: scope:[setFAC] from setFAC::@1 [88] return to:@return + +(void()) setMEMtoFAC((byte*) setMEMtoFAC::mem) setMEMtoFAC: scope:[setMEMtoFAC] from main::@3 main::@5 [89] (byte*) setMEMtoFAC::mem#2 ← phi( main::@3/(const byte[]) main::f_127#0 main::@5/(const byte[]) main::f_i#0 ) to:setMEMtoFAC::prepareMEM1 @@ -207,6 +231,8 @@ setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC::prepareMEM1 setMEMtoFAC::@return: scope:[setMEMtoFAC] from setMEMtoFAC::@1 [95] return to:@return + +(void()) divFACby10() divFACby10: scope:[divFACby10] from main::@2 asm { jsr$bafe } to:divFACby10::@return diff --git a/src/test/ref/sinus-basic.log b/src/test/ref/sinus-basic.log index 020903c3c..231b71ac2 100644 --- a/src/test/ref/sinus-basic.log +++ b/src/test/ref/sinus-basic.log @@ -95,6 +95,8 @@ CONTROL FLOW GRAPH SSA (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@29 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@15 (byte*) print_char_cursor#29 ← phi( main::@15/(byte*) print_char_cursor#11 ) (byte*) print_line_cursor#12 ← phi( main::@15/(byte*) print_line_cursor#13 ) @@ -118,6 +120,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#16 return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from main::@14 (byte*) print_char_cursor#30 ← phi( main::@14/(byte*) print_char_cursor#32 ) (word) print_word::w#1 ← phi( main::@14/(word) print_word::w#0 ) @@ -147,6 +151,8 @@ print_word::@return: scope:[print_word] from print_word::@2 (byte*) print_char_cursor#36 ← phi( @12/(byte*) print_char_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $0 to:@36 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) print_char_cursor#31 ← phi( print_word/(byte*) print_char_cursor#30 print_word::@1/(byte*) print_char_cursor#3 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -171,6 +177,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#8 ← (byte*) print_char_cursor#22 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 (byte*) print_char_cursor#23 ← phi( print_byte/(byte*) print_char_cursor#31 print_byte::@1/(byte*) print_char_cursor#6 ) (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -188,6 +196,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) memLo#0 ← ((byte*)) (number) $fe (byte*) memHi#0 ← ((byte*)) (number) $ff to:@64 + +(void()) setFAC((word) setFAC::w) setFAC: scope:[setFAC] from main main::@1 main::@8 (word) setFAC::w#3 ← phi( main/(word) setFAC::w#0 main::@1/(word) setFAC::w#1 main::@8/(word) setFAC::w#2 ) (word) setFAC::prepareMEM1_mem#0 ← (word) setFAC::w#3 @@ -205,6 +215,8 @@ setFAC::@1: scope:[setFAC] from setFAC::prepareMEM1 setFAC::@return: scope:[setFAC] from setFAC::@1 return to:@return + +(word()) getFAC() getFAC: scope:[getFAC] from main::@13 asm { jsr$b1aa stymemLo stamemHi } (word) getFAC::w#0 ← ((word)) { *((byte*) memHi#0), *((byte*) memLo#0) } @@ -215,6 +227,8 @@ getFAC::@return: scope:[getFAC] from getFAC (word) getFAC::return#1 ← (word) getFAC::return#3 return to:@return + +(void()) setMEMtoFAC((byte*) setMEMtoFAC::mem) setMEMtoFAC: scope:[setMEMtoFAC] from main::@4 main::@7 (byte*) setMEMtoFAC::mem#2 ← phi( main::@4/(byte*) setMEMtoFAC::mem#0 main::@7/(byte*) setMEMtoFAC::mem#1 ) (word~) setMEMtoFAC::$0 ← ((word)) (byte*) setMEMtoFAC::mem#2 @@ -233,6 +247,8 @@ setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC::prepareMEM1 setMEMtoFAC::@return: scope:[setMEMtoFAC] from setMEMtoFAC::@1 return to:@return + +(void()) addMEMtoFAC((byte*) addMEMtoFAC::mem) addMEMtoFAC: scope:[addMEMtoFAC] from main::@12 (byte*) addMEMtoFAC::mem#1 ← phi( main::@12/(byte*) addMEMtoFAC::mem#0 ) (word~) addMEMtoFAC::$0 ← ((word)) (byte*) addMEMtoFAC::mem#1 @@ -251,6 +267,8 @@ addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC::prepareMEM1 addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 return to:@return + +(void()) divMEMbyFAC((byte*) divMEMbyFAC::mem) divMEMbyFAC: scope:[divMEMbyFAC] from main::@9 (byte*) divMEMbyFAC::mem#1 ← phi( main::@9/(byte*) divMEMbyFAC::mem#0 ) (word~) divMEMbyFAC::$0 ← ((word)) (byte*) divMEMbyFAC::mem#1 @@ -269,6 +287,8 @@ divMEMbyFAC::@1: scope:[divMEMbyFAC] from divMEMbyFAC::prepareMEM1 divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 return to:@return + +(void()) mulFACbyMEM((byte*) mulFACbyMEM::mem) mulFACbyMEM: scope:[mulFACbyMEM] from main::@11 main::@6 (byte*) mulFACbyMEM::mem#2 ← phi( main::@11/(byte*) mulFACbyMEM::mem#1 main::@6/(byte*) mulFACbyMEM::mem#0 ) (word~) mulFACbyMEM::$0 ← ((word)) (byte*) mulFACbyMEM::mem#2 @@ -287,18 +307,24 @@ mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM::prepareMEM1 mulFACbyMEM::@return: scope:[mulFACbyMEM] from mulFACbyMEM::@1 return to:@return + +(void()) sinFAC() sinFAC: scope:[sinFAC] from main::@10 asm { jsr$e26b } to:sinFAC::@return sinFAC::@return: scope:[sinFAC] from sinFAC return to:@return + +(void()) divFACby10() divFACby10: scope:[divFACby10] from main::@3 asm { jsr$bafe } to:divFACby10::@return divFACby10::@return: scope:[divFACby10] from divFACby10 return to:@return + +(void()) main() main: scope:[main] from @64 (byte*) print_line_cursor#30 ← phi( @64/(byte*) print_line_cursor#14 ) (byte*) print_char_cursor#48 ← phi( @64/(byte*) print_char_cursor#33 ) @@ -983,6 +1009,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call setFAC @@ -1053,6 +1081,8 @@ main::@return: scope:[main] from main::@14 main::@15: scope:[main] from main::@14 [37] (byte*~) print_char_cursor#53 ← (byte*) print_line_cursor#1 to:main::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@13 [38] phi() to:print_ln::@1 @@ -1064,6 +1094,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [42] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from main::@12 [43] (byte) print_byte::b#0 ← > (word) print_word::w#0 [44] call print_byte @@ -1075,6 +1107,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [47] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [48] (byte*) print_char_cursor#31 ← phi( print_word/(byte*) print_char_cursor#32 print_word::@1/(byte*) print_char_cursor#10 ) [48] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -1090,6 +1124,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [55] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 [56] (byte*) print_char_cursor#23 ← phi( print_byte/(byte*) print_char_cursor#31 print_byte::@1/(byte*) print_char_cursor#10 ) [56] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -1099,6 +1135,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char [59] return to:@return + +(word()) getFAC() getFAC: scope:[getFAC] from main::@11 asm { jsr$b1aa stymemLo stamemHi } [61] (word) getFAC::return#0 ← *((const byte*) memHi#0) w= *((const byte*) memLo#0) @@ -1106,6 +1144,8 @@ getFAC: scope:[getFAC] from main::@11 getFAC::@return: scope:[getFAC] from getFAC [62] return to:@return + +(void()) addMEMtoFAC((byte*) addMEMtoFAC::mem) addMEMtoFAC: scope:[addMEMtoFAC] from main::@10 [63] phi() to:addMEMtoFAC::prepareMEM1 @@ -1119,6 +1159,8 @@ addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC::prepareMEM1 addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1 [67] return to:@return + +(void()) mulFACbyMEM((byte*) mulFACbyMEM::mem) mulFACbyMEM: scope:[mulFACbyMEM] from main::@4 main::@9 [68] (byte*) mulFACbyMEM::mem#2 ← phi( main::@9/(const byte[]) main::f_127#0 main::@4/(const byte*) main::f_2pi#0 ) to:mulFACbyMEM::prepareMEM1 @@ -1134,12 +1176,16 @@ mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM::prepareMEM1 mulFACbyMEM::@return: scope:[mulFACbyMEM] from mulFACbyMEM::@1 [74] return to:@return + +(void()) sinFAC() sinFAC: scope:[sinFAC] from main::@8 asm { jsr$e26b } to:sinFAC::@return sinFAC::@return: scope:[sinFAC] from sinFAC [76] return to:@return + +(void()) divMEMbyFAC((byte*) divMEMbyFAC::mem) divMEMbyFAC: scope:[divMEMbyFAC] from main::@7 [77] phi() to:divMEMbyFAC::prepareMEM1 @@ -1153,6 +1199,8 @@ divMEMbyFAC::@1: scope:[divMEMbyFAC] from divMEMbyFAC::prepareMEM1 divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1 [81] return to:@return + +(void()) setFAC((word) setFAC::w) setFAC: scope:[setFAC] from main main::@1 main::@6 [82] (word) setFAC::prepareMEM1_mem#0 ← phi( main/(word) $4fb main::@1/(word) setFAC::w#1 main::@6/(byte) $19 ) to:setFAC::prepareMEM1 @@ -1168,6 +1216,8 @@ setFAC::@1: scope:[setFAC] from setFAC::prepareMEM1 setFAC::@return: scope:[setFAC] from setFAC::@1 [88] return to:@return + +(void()) setMEMtoFAC((byte*) setMEMtoFAC::mem) setMEMtoFAC: scope:[setMEMtoFAC] from main::@3 main::@5 [89] (byte*) setMEMtoFAC::mem#2 ← phi( main::@3/(const byte[]) main::f_127#0 main::@5/(const byte[]) main::f_i#0 ) to:setMEMtoFAC::prepareMEM1 @@ -1183,6 +1233,8 @@ setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC::prepareMEM1 setMEMtoFAC::@return: scope:[setMEMtoFAC] from setMEMtoFAC::@1 [95] return to:@return + +(void()) divFACby10() divFACby10: scope:[divFACby10] from main::@2 asm { jsr$bafe } to:divFACby10::@return diff --git a/src/test/ref/sinusgen16.cfg b/src/test/ref/sinusgen16.cfg index 0c2021ad2..caf974187 100644 --- a/src/test/ref/sinusgen16.cfg +++ b/src/test/ref/sinusgen16.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call sin16s_gen @@ -43,6 +45,8 @@ main::@6: scope:[main] from main::@3 main::@7: scope:[main] from main::@6 [20] (signed word*) main::st1#1 ← (signed word*) main::st1#2 + (const byte) SIZEOF_SIGNED_WORD to:main::@1 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@4 main::@6 [21] (byte*) print_char_cursor#55 ← phi( main::@6/(byte*) print_char_cursor#13 main::@4/(byte*) print_char_cursor#21 ) [21] (byte*) print_str::str#5 ← phi( main::@6/(const string) main::str main::@4/(const string) main::str1 ) @@ -60,6 +64,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [26] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [27] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#3 to:print_str::@1 + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from main::@3 [28] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 to:print_sword::@3 @@ -82,6 +88,8 @@ print_sword::@1: scope:[print_sword] from print_sword print_sword::@4: scope:[print_sword] from print_sword::@1 [37] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#1 to:print_sword::@2 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sword::@1 print_sword::@3 [38] (byte*) print_char_cursor#35 ← phi( print_byte/(byte*) print_char_cursor#13 print_byte::@1/(byte*) print_char_cursor#13 print_sword::@1/(byte*) print_char_cursor#51 print_sword::@3/(byte*) print_char_cursor#51 ) [38] (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' ) @@ -91,6 +99,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_sword::@1 p print_char::@return: scope:[print_char] from print_char [41] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_sword::@2 [42] (byte) print_byte::b#0 ← > (word) print_word::w#0 [43] call print_byte @@ -102,6 +112,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [46] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [47] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) [48] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 @@ -116,6 +128,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [54] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main::@5 [55] phi() [56] call memset @@ -123,6 +137,8 @@ print_cls: scope:[print_cls] from main::@5 print_cls::@return: scope:[print_cls] from print_cls [57] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [58] phi() to:memset::@1 @@ -137,6 +153,8 @@ memset::@2: scope:[memset] from memset::@1 [62] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [63] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) sin16s_gen((signed word*) sin16s_gen::sintab , (word) sin16s_gen::wavelength) sin16s_gen: scope:[sin16s_gen] from main [64] phi() [65] call div32u16u @@ -166,6 +184,8 @@ sin16s_gen::@4: scope:[sin16s_gen] from sin16s_gen::@2 [77] (dword) sin16s_gen::x#1 ← (dword) sin16s_gen::x#2 + (dword) sin16s_gen::step#0 [78] (word) sin16s_gen::i#1 ← ++ (word) sin16s_gen::i#2 to:sin16s_gen::@1 + +(signed word()) sin16s((dword) sin16s::x) sin16s: scope:[sin16s] from sin16s_gen::@2 [79] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 to:sin16s::@4 @@ -235,6 +255,8 @@ sin16s::@return: scope:[sin16s] from sin16s::@3 sin16s::@12: scope:[sin16s] from sin16s::@11 [118] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 to:sin16s::@3 + +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 [119] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) [119] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) @@ -252,6 +274,8 @@ mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 [127] return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mulu16_sel [128] phi() to:mul16u::@1 @@ -276,6 +300,8 @@ mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4 [136] (word) mul16u::a#0 ← (word) mul16u::a#2 >> (byte) 1 [137] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 to:mul16u::@1 + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from sin16s_gen [138] phi() [139] call divr16u @@ -294,6 +320,8 @@ div32u16u::@2: scope:[div32u16u] from div32u16u::@1 div32u16u::@return: scope:[div32u16u] from div32u16u::@2 [147] return to:@return + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div32u16u div32u16u::@1 [148] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) [148] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) diff --git a/src/test/ref/sinusgen16.log b/src/test/ref/sinusgen16.log index badbfa5d1..f92bf4ba6 100644 --- a/src/test/ref/sinusgen16.log +++ b/src/test/ref/sinusgen16.log @@ -100,6 +100,8 @@ CONTROL FLOW GRAPH SSA @2: scope:[] from @begin (word) rem16u#0 ← (number) 0 to:@13 + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div32u16u div32u16u::@2 (word) divr16u::divisor#6 ← phi( div32u16u/(word) divr16u::divisor#0 div32u16u::@2/(word) divr16u::divisor#1 ) (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@2/(word) divr16u::dividend#2 ) @@ -177,6 +179,8 @@ divr16u::@return: scope:[divr16u] from divr16u::@6 (word) rem16u#2 ← (word) rem16u#11 return to:@return + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from sin16s_gen (word) rem16u#20 ← phi( sin16s_gen/(word) rem16u#21 ) (word) div32u16u::divisor#1 ← phi( sin16s_gen/(word) div32u16u::divisor#0 ) @@ -220,6 +224,8 @@ div32u16u::@return: scope:[div32u16u] from div32u16u::@3 (word) rem16u#5 ← (word) rem16u#14 return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mulu16_sel (word) mul16u::a#5 ← phi( mulu16_sel/(word) mul16u::a#1 ) (word) mul16u::b#1 ← phi( mulu16_sel/(word) mul16u::b#0 ) @@ -273,6 +279,8 @@ mul16u::@return: scope:[mul16u] from mul16u::@3 (dword) PI_u4f28#0 ← (number) $3243f6a9 (dword) PI_HALF_u4f28#0 ← (number) $1921fb54 to:@32 + +(void()) sin16s_gen((signed word*) sin16s_gen::sintab , (word) sin16s_gen::wavelength) sin16s_gen: scope:[sin16s_gen] from main (signed word*) sin16s_gen::sintab#6 ← phi( main/(signed word*) sin16s_gen::sintab#1 ) (word) rem16u#21 ← phi( main/(word) rem16u#23 ) @@ -334,6 +342,8 @@ sin16s_gen::@return: scope:[sin16s_gen] from sin16s_gen::@1 (word) rem16u#7 ← (word) rem16u#16 return to:@return + +(signed word()) sin16s((dword) sin16s::x) sin16s: scope:[sin16s] from sin16s_gen::@2 (dword) sin16s::x#3 ← phi( sin16s_gen::@2/(dword) sin16s::x#0 ) (byte) sin16s::isUpper#0 ← (number) 0 @@ -455,6 +465,8 @@ sin16s::@return: scope:[sin16s] from sin16s::@3 (signed word) sin16s::return#2 ← (signed word) sin16s::return#4 return to:@return + +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@11 sin16s::@2 sin16s::@8 sin16s::@9 (byte) mulu16_sel::select#6 ← phi( sin16s::@10/(byte) mulu16_sel::select#3 sin16s::@11/(byte) mulu16_sel::select#4 sin16s::@2/(byte) mulu16_sel::select#0 sin16s::@8/(byte) mulu16_sel::select#1 sin16s::@9/(byte) mulu16_sel::select#2 ) (word) mulu16_sel::v2#5 ← phi( sin16s::@10/(word) mulu16_sel::v2#3 sin16s::@11/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@8/(word) mulu16_sel::v2#1 sin16s::@9/(word) mulu16_sel::v2#2 ) @@ -477,6 +489,8 @@ mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@2 (word) mulu16_sel::return#6 ← (word) mulu16_sel::return#12 return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -525,6 +539,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@49 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@11 main::@7 (byte*) print_char_cursor#55 ← phi( main::@11/(byte*) print_char_cursor#18 main::@7/(byte*) print_char_cursor#52 ) (byte*) print_str::str#5 ← phi( main::@11/(byte*) print_str::str#1 main::@7/(byte*) print_str::str#2 ) @@ -547,6 +563,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#24 return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from main::@4 (byte*) print_char_cursor#56 ← phi( main::@4/(byte*) print_char_cursor#51 ) (signed word) print_sword::w#2 ← phi( main::@4/(signed word) print_sword::w#1 ) @@ -593,6 +611,8 @@ print_sword::@return: scope:[print_sword] from print_sword::@7 (byte*) print_char_cursor#6 ← (byte*) print_char_cursor#28 return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_sword::@2 (byte*) print_char_cursor#48 ← phi( print_sword::@2/(byte*) print_char_cursor#47 ) (word) print_word::w#1 ← phi( print_sword::@2/(word) print_word::w#0 ) @@ -624,6 +644,8 @@ print_word::@return: scope:[print_word] from print_word::@2 (word) rem16u#29 ← phi( @32/(word) rem16u#31 ) (byte[]) print_hextab#0 ← (const string) $0 to:@57 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) print_char_cursor#49 ← phi( print_word/(byte*) print_char_cursor#48 print_word::@1/(byte*) print_char_cursor#7 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -648,6 +670,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#12 ← (byte*) print_char_cursor#34 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sword::@1 print_sword::@3 (byte*) print_char_cursor#35 ← phi( print_byte/(byte*) print_char_cursor#49 print_byte::@1/(byte*) print_char_cursor#10 print_sword::@1/(byte*) print_char_cursor#45 print_sword::@3/(byte*) print_char_cursor#46 ) (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sword::@1/(byte) print_char::ch#0 print_sword::@3/(byte) print_char::ch#1 ) @@ -659,6 +683,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#14 ← (byte*) print_char_cursor#36 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main::@9 (byte*) print_screen#1 ← phi( main::@9/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -679,6 +705,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte*) print_char_cursor#16 ← (byte*) print_char_cursor#37 return to:@return + +(void()) main() main: scope:[main] from @57 (byte*) print_char_cursor#57 ← phi( @57/(byte*) print_char_cursor#54 ) (byte*) print_line_cursor#13 ← phi( @57/(byte*) print_line_cursor#12 ) @@ -2103,6 +2131,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call sin16s_gen @@ -2139,6 +2169,8 @@ main::@6: scope:[main] from main::@3 main::@7: scope:[main] from main::@6 [20] (signed word*) main::st1#1 ← (signed word*) main::st1#2 + (const byte) SIZEOF_SIGNED_WORD to:main::@1 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@4 main::@6 [21] (byte*) print_char_cursor#55 ← phi( main::@6/(byte*) print_char_cursor#13 main::@4/(byte*) print_char_cursor#21 ) [21] (byte*) print_str::str#5 ← phi( main::@6/(const string) main::str main::@4/(const string) main::str1 ) @@ -2156,6 +2188,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [26] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [27] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#3 to:print_str::@1 + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from main::@3 [28] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 to:print_sword::@3 @@ -2178,6 +2212,8 @@ print_sword::@1: scope:[print_sword] from print_sword print_sword::@4: scope:[print_sword] from print_sword::@1 [37] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#1 to:print_sword::@2 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sword::@1 print_sword::@3 [38] (byte*) print_char_cursor#35 ← phi( print_byte/(byte*) print_char_cursor#13 print_byte::@1/(byte*) print_char_cursor#13 print_sword::@1/(byte*) print_char_cursor#51 print_sword::@3/(byte*) print_char_cursor#51 ) [38] (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' ) @@ -2187,6 +2223,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_sword::@1 p print_char::@return: scope:[print_char] from print_char [41] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_sword::@2 [42] (byte) print_byte::b#0 ← > (word) print_word::w#0 [43] call print_byte @@ -2198,6 +2236,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [46] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [47] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) [48] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 @@ -2212,6 +2252,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [54] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main::@5 [55] phi() [56] call memset @@ -2219,6 +2261,8 @@ print_cls: scope:[print_cls] from main::@5 print_cls::@return: scope:[print_cls] from print_cls [57] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [58] phi() to:memset::@1 @@ -2233,6 +2277,8 @@ memset::@2: scope:[memset] from memset::@1 [62] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [63] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) sin16s_gen((signed word*) sin16s_gen::sintab , (word) sin16s_gen::wavelength) sin16s_gen: scope:[sin16s_gen] from main [64] phi() [65] call div32u16u @@ -2262,6 +2308,8 @@ sin16s_gen::@4: scope:[sin16s_gen] from sin16s_gen::@2 [77] (dword) sin16s_gen::x#1 ← (dword) sin16s_gen::x#2 + (dword) sin16s_gen::step#0 [78] (word) sin16s_gen::i#1 ← ++ (word) sin16s_gen::i#2 to:sin16s_gen::@1 + +(signed word()) sin16s((dword) sin16s::x) sin16s: scope:[sin16s] from sin16s_gen::@2 [79] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 to:sin16s::@4 @@ -2331,6 +2379,8 @@ sin16s::@return: scope:[sin16s] from sin16s::@3 sin16s::@12: scope:[sin16s] from sin16s::@11 [118] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 to:sin16s::@3 + +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 [119] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) [119] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) @@ -2348,6 +2398,8 @@ mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 [127] return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mulu16_sel [128] phi() to:mul16u::@1 @@ -2372,6 +2424,8 @@ mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4 [136] (word) mul16u::a#0 ← (word) mul16u::a#2 >> (byte) 1 [137] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 to:mul16u::@1 + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from sin16s_gen [138] phi() [139] call divr16u @@ -2390,6 +2444,8 @@ div32u16u::@2: scope:[div32u16u] from div32u16u::@1 div32u16u::@return: scope:[div32u16u] from div32u16u::@2 [147] return to:@return + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div32u16u div32u16u::@1 [148] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) [148] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) diff --git a/src/test/ref/sinusgen16b.cfg b/src/test/ref/sinusgen16b.cfg index 5cf8f5b01..ac76ff1c5 100644 --- a/src/test/ref/sinusgen16b.cfg +++ b/src/test/ref/sinusgen16b.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call sin16s_gen @@ -49,6 +51,8 @@ main::@7: scope:[main] from main::@6 main::@return: scope:[main] from main::@7 [24] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@3 main::@6 [25] (byte*) print_char_cursor#54 ← phi( main::@3/(byte*) print_char_cursor#52 main::@6/(byte*) print_char_cursor#13 ) [25] (byte*) print_str::str#5 ← phi( main::@3/(const string) main::str1 main::@6/(const string) main::str ) @@ -66,6 +70,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [30] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [31] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#3 to:print_str::@1 + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from main::@2 [32] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 to:print_sword::@3 @@ -88,6 +94,8 @@ print_sword::@1: scope:[print_sword] from print_sword print_sword::@4: scope:[print_sword] from print_sword::@1 [41] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#1 to:print_sword::@2 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sword::@1 print_sword::@3 [42] (byte*) print_char_cursor#35 ← phi( print_byte/(byte*) print_char_cursor#13 print_byte::@1/(byte*) print_char_cursor#13 print_sword::@1/(byte*) print_char_cursor#51 print_sword::@3/(byte*) print_char_cursor#51 ) [42] (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' ) @@ -97,6 +105,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_sword::@1 p print_char::@return: scope:[print_char] from print_char [45] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_sword::@2 [46] (byte) print_byte::b#0 ← > (word) print_word::w#0 [47] call print_byte @@ -108,6 +118,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [50] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [51] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) [52] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 @@ -122,6 +134,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [58] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main::@5 [59] phi() [60] call memset @@ -129,6 +143,8 @@ print_cls: scope:[print_cls] from main::@5 print_cls::@return: scope:[print_cls] from print_cls [61] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [62] phi() to:memset::@1 @@ -143,6 +159,8 @@ memset::@2: scope:[memset] from memset::@1 [66] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [67] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) sin16s_genb((signed word*) sin16s_genb::sintab , (word) sin16s_genb::wavelength) sin16s_genb: scope:[sin16s_genb] from main::@4 [68] phi() [69] call div32u16u @@ -172,6 +190,8 @@ sin16s_genb::@4: scope:[sin16s_genb] from sin16s_genb::@2 [81] (dword) sin16s_genb::x#1 ← (dword) sin16s_genb::x#2 + (dword) sin16s_genb::step#0 [82] (word) sin16s_genb::i#1 ← ++ (word) sin16s_genb::i#2 to:sin16s_genb::@1 + +(signed word()) sin16sb((word) sin16sb::x) sin16sb: scope:[sin16sb] from sin16s_genb::@2 [83] if((word) sin16sb::x#0<(const word) PI_u4f12#0) goto sin16sb::@1 to:sin16sb::@4 @@ -240,6 +260,8 @@ sin16sb::@return: scope:[sin16sb] from sin16sb::@3 sin16sb::@12: scope:[sin16sb] from sin16sb::@11 [121] (signed word~) sin16sb::return#5 ← (signed word)(word) sin16sb::usinx#1 to:sin16sb::@3 + +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 sin16sb::@10 sin16sb::@2 sin16sb::@7 sin16sb::@8 sin16sb::@9 [122] (byte) mulu16_sel::select#10 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 sin16sb::@9/(byte) 0 sin16sb::@10/(byte) 0 sin16sb::@2/(byte) 0 sin16sb::@7/(byte) 1 sin16sb::@8/(byte) 1 ) [122] (word) mulu16_sel::v2#10 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 sin16sb::@9/(word) mulu16_sel::v2#8 sin16sb::@10/(word) mulu16_sel::v2#9 sin16sb::@2/(word) mulu16_sel::v2#5 sin16sb::@7/(word) mulu16_sel::v2#6 sin16sb::@8/(word)(number) $10000/(number) 6 ) @@ -257,6 +279,8 @@ mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 [130] return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mulu16_sel [131] phi() to:mul16u::@1 @@ -281,6 +305,8 @@ mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4 [139] (word) mul16u::a#0 ← (word) mul16u::a#2 >> (byte) 1 [140] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 to:mul16u::@1 + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from sin16s_gen sin16s_genb [141] phi() [142] call divr16u @@ -299,6 +325,8 @@ div32u16u::@2: scope:[div32u16u] from div32u16u::@1 div32u16u::@return: scope:[div32u16u] from div32u16u::@2 [150] return to:@return + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div32u16u div32u16u::@1 [151] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) [151] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) @@ -338,6 +366,8 @@ divr16u::@6: scope:[divr16u] from divr16u::@3 divr16u::@return: scope:[divr16u] from divr16u::@6 [168] return to:@return + +(void()) sin16s_gen((signed word*) sin16s_gen::sintab , (word) sin16s_gen::wavelength) sin16s_gen: scope:[sin16s_gen] from main [169] phi() [170] call div32u16u @@ -367,6 +397,8 @@ sin16s_gen::@4: scope:[sin16s_gen] from sin16s_gen::@2 [182] (dword) sin16s_gen::x#1 ← (dword) sin16s_gen::x#2 + (dword) sin16s_gen::step#0 [183] (word) sin16s_gen::i#1 ← ++ (word) sin16s_gen::i#2 to:sin16s_gen::@1 + +(signed word()) sin16s((dword) sin16s::x) sin16s: scope:[sin16s] from sin16s_gen::@2 [184] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 to:sin16s::@4 diff --git a/src/test/ref/sinusgen16b.log b/src/test/ref/sinusgen16b.log index ec6d681f6..d8110a50f 100644 --- a/src/test/ref/sinusgen16b.log +++ b/src/test/ref/sinusgen16b.log @@ -105,6 +105,8 @@ CONTROL FLOW GRAPH SSA @2: scope:[] from @begin (word) rem16u#0 ← (number) 0 to:@13 + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div32u16u div32u16u::@2 (word) divr16u::divisor#6 ← phi( div32u16u/(word) divr16u::divisor#0 div32u16u::@2/(word) divr16u::divisor#1 ) (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@2/(word) divr16u::dividend#2 ) @@ -182,6 +184,8 @@ divr16u::@return: scope:[divr16u] from divr16u::@6 (word) rem16u#2 ← (word) rem16u#14 return to:@return + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from sin16s_gen sin16s_genb (word) rem16u#26 ← phi( sin16s_gen/(word) rem16u#27 sin16s_genb/(word) rem16u#29 ) (word) div32u16u::divisor#2 ← phi( sin16s_gen/(word) div32u16u::divisor#0 sin16s_genb/(word) div32u16u::divisor#1 ) @@ -225,6 +229,8 @@ div32u16u::@return: scope:[div32u16u] from div32u16u::@3 (word) rem16u#5 ← (word) rem16u#17 return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mulu16_sel (word) mul16u::a#5 ← phi( mulu16_sel/(word) mul16u::a#1 ) (word) mul16u::b#1 ← phi( mulu16_sel/(word) mul16u::b#0 ) @@ -280,6 +286,8 @@ mul16u::@return: scope:[mul16u] from mul16u::@3 (word) PI_u4f12#0 ← (number) $3244 (word) PI_HALF_u4f12#0 ← (number) $1922 to:@34 + +(void()) sin16s_gen((signed word*) sin16s_gen::sintab , (word) sin16s_gen::wavelength) sin16s_gen: scope:[sin16s_gen] from main (signed word*) sin16s_gen::sintab#6 ← phi( main/(signed word*) sin16s_gen::sintab#1 ) (word) rem16u#27 ← phi( main/(word) rem16u#31 ) @@ -341,6 +349,8 @@ sin16s_gen::@return: scope:[sin16s_gen] from sin16s_gen::@1 (word) rem16u#7 ← (word) rem16u#19 return to:@return + +(signed word()) sin16s((dword) sin16s::x) sin16s: scope:[sin16s] from sin16s_gen::@2 (dword) sin16s::x#3 ← phi( sin16s_gen::@2/(dword) sin16s::x#0 ) (byte) sin16s::isUpper#0 ← (number) 0 @@ -462,6 +472,8 @@ sin16s::@return: scope:[sin16s] from sin16s::@3 (signed word) sin16s::return#2 ← (signed word) sin16s::return#4 return to:@return + +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@11 sin16s::@2 sin16s::@8 sin16s::@9 sin16sb::@10 sin16sb::@11 sin16sb::@2 sin16sb::@8 sin16sb::@9 (byte) mulu16_sel::select#11 ← phi( sin16s::@10/(byte) mulu16_sel::select#3 sin16s::@11/(byte) mulu16_sel::select#4 sin16s::@2/(byte) mulu16_sel::select#0 sin16s::@8/(byte) mulu16_sel::select#1 sin16s::@9/(byte) mulu16_sel::select#2 sin16sb::@10/(byte) mulu16_sel::select#8 sin16sb::@11/(byte) mulu16_sel::select#9 sin16sb::@2/(byte) mulu16_sel::select#5 sin16sb::@8/(byte) mulu16_sel::select#6 sin16sb::@9/(byte) mulu16_sel::select#7 ) (word) mulu16_sel::v2#10 ← phi( sin16s::@10/(word) mulu16_sel::v2#3 sin16s::@11/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@8/(word) mulu16_sel::v2#1 sin16s::@9/(word) mulu16_sel::v2#2 sin16sb::@10/(word) mulu16_sel::v2#8 sin16sb::@11/(word) mulu16_sel::v2#9 sin16sb::@2/(word) mulu16_sel::v2#5 sin16sb::@8/(word) mulu16_sel::v2#6 sin16sb::@9/(word) mulu16_sel::v2#7 ) @@ -484,6 +496,8 @@ mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@2 (word) mulu16_sel::return#6 ← (word) mulu16_sel::return#17 return to:@return + +(void()) sin16s_genb((signed word*) sin16s_genb::sintab , (word) sin16s_genb::wavelength) sin16s_genb: scope:[sin16s_genb] from main::@5 (signed word*) sin16s_genb::sintab#6 ← phi( main::@5/(signed word*) sin16s_genb::sintab#1 ) (word) rem16u#29 ← phi( main::@5/(word) rem16u#10 ) @@ -546,6 +560,8 @@ sin16s_genb::@return: scope:[sin16s_genb] from sin16s_genb::@1 (word) rem16u#9 ← (word) rem16u#21 return to:@return + +(signed word()) sin16sb((word) sin16sb::x) sin16sb: scope:[sin16sb] from sin16s_genb::@2 (word) sin16sb::x#3 ← phi( sin16s_genb::@2/(word) sin16sb::x#0 ) (byte) sin16sb::isUpper#0 ← (number) 0 @@ -666,6 +682,8 @@ sin16sb::@return: scope:[sin16sb] from sin16sb::@3 (signed word) sin16sb::return#2 ← (signed word) sin16sb::return#4 return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -714,6 +732,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@51 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@3 main::@8 (byte*) print_char_cursor#54 ← phi( main::@3/(byte*) print_char_cursor#52 main::@8/(byte*) print_char_cursor#18 ) (byte*) print_str::str#5 ← phi( main::@3/(byte*) print_str::str#2 main::@8/(byte*) print_str::str#1 ) @@ -736,6 +756,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#24 return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from main::@2 (byte*) print_char_cursor#55 ← phi( main::@2/(byte*) print_char_cursor#51 ) (signed word) print_sword::w#2 ← phi( main::@2/(signed word) print_sword::w#1 ) @@ -782,6 +804,8 @@ print_sword::@return: scope:[print_sword] from print_sword::@7 (byte*) print_char_cursor#6 ← (byte*) print_char_cursor#28 return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_sword::@2 (byte*) print_char_cursor#48 ← phi( print_sword::@2/(byte*) print_char_cursor#47 ) (word) print_word::w#1 ← phi( print_sword::@2/(word) print_word::w#0 ) @@ -813,6 +837,8 @@ print_word::@return: scope:[print_word] from print_word::@2 (word) rem16u#37 ← phi( @34/(word) rem16u#40 ) (byte[]) print_hextab#0 ← (const string) $0 to:@59 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) print_char_cursor#49 ← phi( print_word/(byte*) print_char_cursor#48 print_word::@1/(byte*) print_char_cursor#7 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -837,6 +863,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#12 ← (byte*) print_char_cursor#34 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sword::@1 print_sword::@3 (byte*) print_char_cursor#35 ← phi( print_byte/(byte*) print_char_cursor#49 print_byte::@1/(byte*) print_char_cursor#10 print_sword::@1/(byte*) print_char_cursor#45 print_sword::@3/(byte*) print_char_cursor#46 ) (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sword::@1/(byte) print_char::ch#0 print_sword::@3/(byte) print_char::ch#1 ) @@ -848,6 +876,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#14 ← (byte*) print_char_cursor#36 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main::@6 (byte*) print_screen#1 ← phi( main::@6/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -868,6 +898,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte*) print_char_cursor#16 ← (byte*) print_char_cursor#37 return to:@return + +(void()) main() main: scope:[main] from @59 (byte*) print_char_cursor#59 ← phi( @59/(byte*) print_char_cursor#53 ) (byte*) print_line_cursor#16 ← phi( @59/(byte*) print_line_cursor#12 ) @@ -2724,6 +2756,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call sin16s_gen @@ -2766,6 +2800,8 @@ main::@7: scope:[main] from main::@6 main::@return: scope:[main] from main::@7 [24] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@3 main::@6 [25] (byte*) print_char_cursor#54 ← phi( main::@3/(byte*) print_char_cursor#52 main::@6/(byte*) print_char_cursor#13 ) [25] (byte*) print_str::str#5 ← phi( main::@3/(const string) main::str1 main::@6/(const string) main::str ) @@ -2783,6 +2819,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [30] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [31] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#3 to:print_str::@1 + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from main::@2 [32] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 to:print_sword::@3 @@ -2805,6 +2843,8 @@ print_sword::@1: scope:[print_sword] from print_sword print_sword::@4: scope:[print_sword] from print_sword::@1 [41] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#1 to:print_sword::@2 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sword::@1 print_sword::@3 [42] (byte*) print_char_cursor#35 ← phi( print_byte/(byte*) print_char_cursor#13 print_byte::@1/(byte*) print_char_cursor#13 print_sword::@1/(byte*) print_char_cursor#51 print_sword::@3/(byte*) print_char_cursor#51 ) [42] (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' ) @@ -2814,6 +2854,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_sword::@1 p print_char::@return: scope:[print_char] from print_char [45] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_sword::@2 [46] (byte) print_byte::b#0 ← > (word) print_word::w#0 [47] call print_byte @@ -2825,6 +2867,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [50] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [51] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) [52] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 @@ -2839,6 +2883,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [58] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main::@5 [59] phi() [60] call memset @@ -2846,6 +2892,8 @@ print_cls: scope:[print_cls] from main::@5 print_cls::@return: scope:[print_cls] from print_cls [61] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [62] phi() to:memset::@1 @@ -2860,6 +2908,8 @@ memset::@2: scope:[memset] from memset::@1 [66] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [67] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) sin16s_genb((signed word*) sin16s_genb::sintab , (word) sin16s_genb::wavelength) sin16s_genb: scope:[sin16s_genb] from main::@4 [68] phi() [69] call div32u16u @@ -2889,6 +2939,8 @@ sin16s_genb::@4: scope:[sin16s_genb] from sin16s_genb::@2 [81] (dword) sin16s_genb::x#1 ← (dword) sin16s_genb::x#2 + (dword) sin16s_genb::step#0 [82] (word) sin16s_genb::i#1 ← ++ (word) sin16s_genb::i#2 to:sin16s_genb::@1 + +(signed word()) sin16sb((word) sin16sb::x) sin16sb: scope:[sin16sb] from sin16s_genb::@2 [83] if((word) sin16sb::x#0<(const word) PI_u4f12#0) goto sin16sb::@1 to:sin16sb::@4 @@ -2957,6 +3009,8 @@ sin16sb::@return: scope:[sin16sb] from sin16sb::@3 sin16sb::@12: scope:[sin16sb] from sin16sb::@11 [121] (signed word~) sin16sb::return#5 ← (signed word)(word) sin16sb::usinx#1 to:sin16sb::@3 + +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 sin16sb::@10 sin16sb::@2 sin16sb::@7 sin16sb::@8 sin16sb::@9 [122] (byte) mulu16_sel::select#10 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 sin16sb::@9/(byte) 0 sin16sb::@10/(byte) 0 sin16sb::@2/(byte) 0 sin16sb::@7/(byte) 1 sin16sb::@8/(byte) 1 ) [122] (word) mulu16_sel::v2#10 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 sin16sb::@9/(word) mulu16_sel::v2#8 sin16sb::@10/(word) mulu16_sel::v2#9 sin16sb::@2/(word) mulu16_sel::v2#5 sin16sb::@7/(word) mulu16_sel::v2#6 sin16sb::@8/(word)(number) $10000/(number) 6 ) @@ -2974,6 +3028,8 @@ mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 [130] return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mulu16_sel [131] phi() to:mul16u::@1 @@ -2998,6 +3054,8 @@ mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4 [139] (word) mul16u::a#0 ← (word) mul16u::a#2 >> (byte) 1 [140] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 to:mul16u::@1 + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from sin16s_gen sin16s_genb [141] phi() [142] call divr16u @@ -3016,6 +3074,8 @@ div32u16u::@2: scope:[div32u16u] from div32u16u::@1 div32u16u::@return: scope:[div32u16u] from div32u16u::@2 [150] return to:@return + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div32u16u div32u16u::@1 [151] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) [151] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) @@ -3055,6 +3115,8 @@ divr16u::@6: scope:[divr16u] from divr16u::@3 divr16u::@return: scope:[divr16u] from divr16u::@6 [168] return to:@return + +(void()) sin16s_gen((signed word*) sin16s_gen::sintab , (word) sin16s_gen::wavelength) sin16s_gen: scope:[sin16s_gen] from main [169] phi() [170] call div32u16u @@ -3084,6 +3146,8 @@ sin16s_gen::@4: scope:[sin16s_gen] from sin16s_gen::@2 [182] (dword) sin16s_gen::x#1 ← (dword) sin16s_gen::x#2 + (dword) sin16s_gen::step#0 [183] (word) sin16s_gen::i#1 ← ++ (word) sin16s_gen::i#2 to:sin16s_gen::@1 + +(signed word()) sin16s((dword) sin16s::x) sin16s: scope:[sin16s] from sin16s_gen::@2 [184] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 to:sin16s::@4 diff --git a/src/test/ref/sinusgen8.cfg b/src/test/ref/sinusgen8.cfg index 355499e28..debe9537c 100644 --- a/src/test/ref/sinusgen8.cfg +++ b/src/test/ref/sinusgen8.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call sin8s_gen @@ -41,6 +43,8 @@ main::@6: scope:[main] from main::@5 main::@return: scope:[main] from main::@6 [20] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@3 main::@5 [21] (byte*) print_char_cursor#47 ← phi( main::@3/(byte*) print_char_cursor#45 main::@5/(byte*) print_char_cursor#10 ) [21] (byte*) print_str::str#5 ← phi( main::@3/(const string) main::str1 main::@5/(const string) main::str ) @@ -58,6 +62,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [26] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [27] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#3 to:print_str::@1 + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from main::@2 [28] if((signed byte) print_sbyte::b#1<(signed byte) 0) goto print_sbyte::@1 to:print_sbyte::@3 @@ -80,6 +86,8 @@ print_sbyte::@1: scope:[print_sbyte] from print_sbyte print_sbyte::@4: scope:[print_sbyte] from print_sbyte::@1 [37] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#1 to:print_sbyte::@2 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sbyte::@3 [38] (byte*) print_char_cursor#29 ← phi( print_byte/(byte*) print_char_cursor#10 print_byte::@1/(byte*) print_char_cursor#10 print_sbyte::@1/(byte*) print_char_cursor#44 print_sbyte::@3/(byte*) print_char_cursor#44 ) [38] (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sbyte::@1/(byte) '-' print_sbyte::@3/(byte) ' ' ) @@ -89,6 +97,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 p print_char::@return: scope:[print_char] from print_char [41] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_sbyte::@2 [42] (byte~) print_byte::$0 ← (byte) print_byte::b#0 >> (byte) 4 [43] (byte) print_char::ch#2 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) @@ -102,6 +112,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [48] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main::@4 [49] phi() [50] call memset @@ -109,6 +121,8 @@ print_cls: scope:[print_cls] from main::@4 print_cls::@return: scope:[print_cls] from print_cls [51] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [52] phi() to:memset::@1 @@ -123,6 +137,8 @@ memset::@2: scope:[memset] from memset::@1 [56] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [57] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) sin8s_gen((signed byte*) sin8s_gen::sintab , (word) sin8s_gen::wavelength) sin8s_gen: scope:[sin8s_gen] from main [58] phi() [59] call div16u @@ -152,6 +168,8 @@ sin8s_gen::@4: scope:[sin8s_gen] from sin8s_gen::@2 [71] (word) sin8s_gen::x#1 ← (word) sin8s_gen::x#2 + (word) sin8s_gen::step#0 [72] (word) sin8s_gen::i#1 ← ++ (word) sin8s_gen::i#2 to:sin8s_gen::@1 + +(signed byte()) sin8s((word) sin8s::x) sin8s: scope:[sin8s] from sin8s_gen::@2 [73] if((word) sin8s::x#0<(const word) PI_u4f12#0) goto sin8s::@1 to:sin8s::@5 @@ -228,6 +246,8 @@ sin8s::@return: scope:[sin8s] from sin8s::@4 sin8s::@14: scope:[sin8s] from sin8s::@3 [115] (signed byte~) sin8s::return#5 ← (signed byte)(byte) sin8s::usinx#4 to:sin8s::@4 + +(byte()) mulu8_sel((byte) mulu8_sel::v1 , (byte) mulu8_sel::v2 , (byte) mulu8_sel::select) mulu8_sel: scope:[mulu8_sel] from sin8s::@10 sin8s::@11 sin8s::@12 sin8s::@2 sin8s::@9 [116] (byte) mulu8_sel::select#5 ← phi( sin8s::@9/(byte) 1 sin8s::@10/(byte) 1 sin8s::@11/(byte) 0 sin8s::@12/(byte) 0 sin8s::@2/(byte) 0 ) [116] (byte) mulu8_sel::v2#5 ← phi( sin8s::@9/(byte) mulu8_sel::v2#1 sin8s::@10/(const byte) sin8s::DIV_6#0 sin8s::@11/(byte) mulu8_sel::v2#3 sin8s::@12/(byte) mulu8_sel::v2#4 sin8s::@2/(byte) mulu8_sel::v2#0 ) @@ -245,6 +265,8 @@ mulu8_sel::@1: scope:[mulu8_sel] from mulu8_sel mulu8_sel::@return: scope:[mulu8_sel] from mulu8_sel::@1 [124] return to:@return + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from mulu8_sel [125] phi() to:mul8u::@1 @@ -269,6 +291,8 @@ mul8u::@3: scope:[mul8u] from mul8u::@2 mul8u::@4 [133] (byte) mul8u::a#0 ← (byte) mul8u::a#2 >> (byte) 1 [134] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 to:mul8u::@1 + +(word()) div16u((word) div16u::dividend , (word) div16u::divisor) div16u: scope:[div16u] from sin8s_gen [135] phi() [136] call divr16u @@ -280,6 +304,8 @@ div16u::@1: scope:[div16u] from div16u div16u::@return: scope:[div16u] from div16u::@1 [139] return to:@return + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div16u [140] phi() to:divr16u::@1 diff --git a/src/test/ref/sinusgen8.log b/src/test/ref/sinusgen8.log index 13f743401..675004a1b 100644 --- a/src/test/ref/sinusgen8.log +++ b/src/test/ref/sinusgen8.log @@ -93,6 +93,8 @@ Culled Empty Block (label) main::@4 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@13 + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div16u (word) divr16u::divisor#5 ← phi( div16u/(word) divr16u::divisor#0 ) (word) divr16u::dividend#4 ← phi( div16u/(word) divr16u::dividend#1 ) @@ -166,6 +168,8 @@ divr16u::@return: scope:[divr16u] from divr16u::@6 (word) divr16u::return#1 ← (word) divr16u::return#3 return to:@return + +(word()) div16u((word) div16u::dividend , (word) div16u::divisor) div16u: scope:[div16u] from sin8s_gen (word) div16u::divisor#1 ← phi( sin8s_gen/(word) div16u::divisor#0 ) (word) div16u::dividend#1 ← phi( sin8s_gen/(word) div16u::dividend#0 ) @@ -185,6 +189,8 @@ div16u::@return: scope:[div16u] from div16u::@2 (word) div16u::return#1 ← (word) div16u::return#3 return to:@return + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from mulu8_sel (byte) mul8u::a#5 ← phi( mulu8_sel/(byte) mul8u::a#1 ) (byte) mul8u::b#1 ← phi( mulu8_sel/(byte) mul8u::b#0 ) @@ -237,6 +243,8 @@ mul8u::@return: scope:[mul8u] from mul8u::@3 (word) PI_u4f12#0 ← (number) $3244 (word) PI_HALF_u4f12#0 ← (number) $1922 to:@32 + +(void()) sin8s_gen((signed byte*) sin8s_gen::sintab , (word) sin8s_gen::wavelength) sin8s_gen: scope:[sin8s_gen] from main (signed byte*) sin8s_gen::sintab#6 ← phi( main/(signed byte*) sin8s_gen::sintab#1 ) (word) sin8s_gen::wavelength#1 ← phi( main/(word) sin8s_gen::wavelength#0 ) @@ -290,6 +298,8 @@ sin8s_gen::@8: scope:[sin8s_gen] from sin8s_gen::@2 sin8s_gen::@return: scope:[sin8s_gen] from sin8s_gen::@1 return to:@return + +(signed byte()) sin8s((word) sin8s::x) sin8s: scope:[sin8s] from sin8s_gen::@2 (word) sin8s::x#3 ← phi( sin8s_gen::@2/(word) sin8s::x#0 ) (byte) sin8s::isUpper#0 ← (number) 0 @@ -424,6 +434,8 @@ sin8s::@return: scope:[sin8s] from sin8s::@4 (signed byte) sin8s::return#2 ← (signed byte) sin8s::return#4 return to:@return + +(byte()) mulu8_sel((byte) mulu8_sel::v1 , (byte) mulu8_sel::v2 , (byte) mulu8_sel::select) mulu8_sel: scope:[mulu8_sel] from sin8s::@10 sin8s::@11 sin8s::@12 sin8s::@13 sin8s::@2 (byte) mulu8_sel::select#6 ← phi( sin8s::@10/(byte) mulu8_sel::select#1 sin8s::@11/(byte) mulu8_sel::select#2 sin8s::@12/(byte) mulu8_sel::select#3 sin8s::@13/(byte) mulu8_sel::select#4 sin8s::@2/(byte) mulu8_sel::select#0 ) (byte) mulu8_sel::v2#5 ← phi( sin8s::@10/(byte) mulu8_sel::v2#1 sin8s::@11/(byte) mulu8_sel::v2#2 sin8s::@12/(byte) mulu8_sel::v2#3 sin8s::@13/(byte) mulu8_sel::v2#4 sin8s::@2/(byte) mulu8_sel::v2#0 ) @@ -446,6 +458,8 @@ mulu8_sel::@return: scope:[mulu8_sel] from mulu8_sel::@2 (byte) mulu8_sel::return#6 ← (byte) mulu8_sel::return#12 return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -493,6 +507,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@49 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@3 main::@7 (byte*) print_char_cursor#47 ← phi( main::@3/(byte*) print_char_cursor#45 main::@7/(byte*) print_char_cursor#15 ) (byte*) print_str::str#5 ← phi( main::@3/(byte*) print_str::str#2 main::@7/(byte*) print_str::str#1 ) @@ -515,6 +531,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#21 return to:@return + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from main::@2 (byte*) print_char_cursor#48 ← phi( main::@2/(byte*) print_char_cursor#44 ) (signed byte) print_sbyte::b#2 ← phi( main::@2/(signed byte) print_sbyte::b#1 ) @@ -567,6 +585,8 @@ print_sbyte::@return: scope:[print_sbyte] from print_sbyte::@7 (byte*) print_line_cursor#15 ← phi( @32/(byte*) print_line_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $0 to:@57 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_sbyte::@2 (byte*) print_char_cursor#42 ← phi( print_sbyte::@2/(byte*) print_char_cursor#41 ) (byte) print_byte::b#1 ← phi( print_sbyte::@2/(byte) print_byte::b#0 ) @@ -591,6 +611,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#9 ← (byte*) print_char_cursor#28 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sbyte::@3 (byte*) print_char_cursor#29 ← phi( print_byte/(byte*) print_char_cursor#42 print_byte::@1/(byte*) print_char_cursor#7 print_sbyte::@1/(byte*) print_char_cursor#39 print_sbyte::@3/(byte*) print_char_cursor#40 ) (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sbyte::@1/(byte) print_char::ch#0 print_sbyte::@3/(byte) print_char::ch#1 ) @@ -602,6 +624,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#11 ← (byte*) print_char_cursor#30 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main::@5 (byte*) print_screen#1 ← phi( main::@5/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -622,6 +646,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte*) print_char_cursor#13 ← (byte*) print_char_cursor#31 return to:@return + +(void()) main() main: scope:[main] from @57 (byte*) print_char_cursor#49 ← phi( @57/(byte*) print_char_cursor#46 ) (byte*) print_line_cursor#13 ← phi( @57/(byte*) print_line_cursor#12 ) @@ -2104,6 +2130,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call sin8s_gen @@ -2138,6 +2166,8 @@ main::@6: scope:[main] from main::@5 main::@return: scope:[main] from main::@6 [20] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@3 main::@5 [21] (byte*) print_char_cursor#47 ← phi( main::@3/(byte*) print_char_cursor#45 main::@5/(byte*) print_char_cursor#10 ) [21] (byte*) print_str::str#5 ← phi( main::@3/(const string) main::str1 main::@5/(const string) main::str ) @@ -2155,6 +2185,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [26] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [27] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#3 to:print_str::@1 + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from main::@2 [28] if((signed byte) print_sbyte::b#1<(signed byte) 0) goto print_sbyte::@1 to:print_sbyte::@3 @@ -2177,6 +2209,8 @@ print_sbyte::@1: scope:[print_sbyte] from print_sbyte print_sbyte::@4: scope:[print_sbyte] from print_sbyte::@1 [37] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#1 to:print_sbyte::@2 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sbyte::@3 [38] (byte*) print_char_cursor#29 ← phi( print_byte/(byte*) print_char_cursor#10 print_byte::@1/(byte*) print_char_cursor#10 print_sbyte::@1/(byte*) print_char_cursor#44 print_sbyte::@3/(byte*) print_char_cursor#44 ) [38] (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sbyte::@1/(byte) '-' print_sbyte::@3/(byte) ' ' ) @@ -2186,6 +2220,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 p print_char::@return: scope:[print_char] from print_char [41] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_sbyte::@2 [42] (byte~) print_byte::$0 ← (byte) print_byte::b#0 >> (byte) 4 [43] (byte) print_char::ch#2 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) @@ -2199,6 +2235,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [48] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main::@4 [49] phi() [50] call memset @@ -2206,6 +2244,8 @@ print_cls: scope:[print_cls] from main::@4 print_cls::@return: scope:[print_cls] from print_cls [51] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [52] phi() to:memset::@1 @@ -2220,6 +2260,8 @@ memset::@2: scope:[memset] from memset::@1 [56] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [57] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) sin8s_gen((signed byte*) sin8s_gen::sintab , (word) sin8s_gen::wavelength) sin8s_gen: scope:[sin8s_gen] from main [58] phi() [59] call div16u @@ -2249,6 +2291,8 @@ sin8s_gen::@4: scope:[sin8s_gen] from sin8s_gen::@2 [71] (word) sin8s_gen::x#1 ← (word) sin8s_gen::x#2 + (word) sin8s_gen::step#0 [72] (word) sin8s_gen::i#1 ← ++ (word) sin8s_gen::i#2 to:sin8s_gen::@1 + +(signed byte()) sin8s((word) sin8s::x) sin8s: scope:[sin8s] from sin8s_gen::@2 [73] if((word) sin8s::x#0<(const word) PI_u4f12#0) goto sin8s::@1 to:sin8s::@5 @@ -2325,6 +2369,8 @@ sin8s::@return: scope:[sin8s] from sin8s::@4 sin8s::@14: scope:[sin8s] from sin8s::@3 [115] (signed byte~) sin8s::return#5 ← (signed byte)(byte) sin8s::usinx#4 to:sin8s::@4 + +(byte()) mulu8_sel((byte) mulu8_sel::v1 , (byte) mulu8_sel::v2 , (byte) mulu8_sel::select) mulu8_sel: scope:[mulu8_sel] from sin8s::@10 sin8s::@11 sin8s::@12 sin8s::@2 sin8s::@9 [116] (byte) mulu8_sel::select#5 ← phi( sin8s::@9/(byte) 1 sin8s::@10/(byte) 1 sin8s::@11/(byte) 0 sin8s::@12/(byte) 0 sin8s::@2/(byte) 0 ) [116] (byte) mulu8_sel::v2#5 ← phi( sin8s::@9/(byte) mulu8_sel::v2#1 sin8s::@10/(const byte) sin8s::DIV_6#0 sin8s::@11/(byte) mulu8_sel::v2#3 sin8s::@12/(byte) mulu8_sel::v2#4 sin8s::@2/(byte) mulu8_sel::v2#0 ) @@ -2342,6 +2388,8 @@ mulu8_sel::@1: scope:[mulu8_sel] from mulu8_sel mulu8_sel::@return: scope:[mulu8_sel] from mulu8_sel::@1 [124] return to:@return + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from mulu8_sel [125] phi() to:mul8u::@1 @@ -2366,6 +2414,8 @@ mul8u::@3: scope:[mul8u] from mul8u::@2 mul8u::@4 [133] (byte) mul8u::a#0 ← (byte) mul8u::a#2 >> (byte) 1 [134] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 to:mul8u::@1 + +(word()) div16u((word) div16u::dividend , (word) div16u::divisor) div16u: scope:[div16u] from sin8s_gen [135] phi() [136] call divr16u @@ -2377,6 +2427,8 @@ div16u::@1: scope:[div16u] from div16u div16u::@return: scope:[div16u] from div16u::@1 [139] return to:@return + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div16u [140] phi() to:divr16u::@1 diff --git a/src/test/ref/sinusgen8b.cfg b/src/test/ref/sinusgen8b.cfg index 972fcdbd1..b3f6a92d3 100644 --- a/src/test/ref/sinusgen8b.cfg +++ b/src/test/ref/sinusgen8b.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call sin8s_gen @@ -43,6 +45,8 @@ main::@5: scope:[main] from main::@4 main::@return: scope:[main] from main::@5 [24] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@4 [25] phi() to:print_str::@1 @@ -59,6 +63,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [30] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#19 [31] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#2 to:print_str::@1 + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from main::@1 [32] if((signed byte) print_sbyte::b#1<(signed byte) 0) goto print_sbyte::@1 to:print_sbyte::@3 @@ -81,6 +87,8 @@ print_sbyte::@1: scope:[print_sbyte] from print_sbyte print_sbyte::@4: scope:[print_sbyte] from print_sbyte::@1 [41] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#1 to:print_sbyte::@2 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sbyte::@3 [42] (byte*) print_char_cursor#28 ← phi( print_byte/(byte*) print_char_cursor#10 print_byte::@1/(byte*) print_char_cursor#10 print_sbyte::@1/(byte*) print_char_cursor#42 print_sbyte::@3/(byte*) print_char_cursor#42 ) [42] (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sbyte::@1/(byte) '-' print_sbyte::@3/(byte) ' ' ) @@ -90,6 +98,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 p print_char::@return: scope:[print_char] from print_char [45] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_sbyte::@2 [46] (byte~) print_byte::$0 ← (byte) print_byte::b#0 >> (byte) 4 [47] (byte) print_char::ch#2 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) @@ -103,6 +113,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [52] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main::@3 [53] phi() [54] call memset @@ -110,6 +122,8 @@ print_cls: scope:[print_cls] from main::@3 print_cls::@return: scope:[print_cls] from print_cls [55] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [56] phi() to:memset::@1 @@ -124,6 +138,8 @@ memset::@2: scope:[memset] from memset::@1 [60] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [61] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) sin16s_gen((signed word*) sin16s_gen::sintab , (word) sin16s_gen::wavelength) sin16s_gen: scope:[sin16s_gen] from main::@2 [62] phi() [63] call div32u16u @@ -153,6 +169,8 @@ sin16s_gen::@4: scope:[sin16s_gen] from sin16s_gen::@2 [75] (dword) sin16s_gen::x#1 ← (dword) sin16s_gen::x#2 + (dword) sin16s_gen::step#0 [76] (word) sin16s_gen::i#1 ← ++ (word) sin16s_gen::i#2 to:sin16s_gen::@1 + +(signed word()) sin16s((dword) sin16s::x) sin16s: scope:[sin16s] from sin16s_gen::@2 [77] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 to:sin16s::@4 @@ -222,6 +240,8 @@ sin16s::@return: scope:[sin16s] from sin16s::@3 sin16s::@12: scope:[sin16s] from sin16s::@11 [116] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 to:sin16s::@3 + +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 [117] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) [117] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) @@ -239,6 +259,8 @@ mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 [125] return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mulu16_sel [126] phi() to:mul16u::@1 @@ -263,6 +285,8 @@ mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4 [134] (word) mul16u::a#0 ← (word) mul16u::a#2 >> (byte) 1 [135] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 to:mul16u::@1 + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from sin16s_gen [136] phi() [137] call divr16u @@ -281,6 +305,8 @@ div32u16u::@2: scope:[div32u16u] from div32u16u::@1 div32u16u::@return: scope:[div32u16u] from div32u16u::@2 [145] return to:@return + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div16u div32u16u div32u16u::@1 [146] (word) divr16u::dividend#6 ← phi( div16u/(const word) PI2_u4f12#0 div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) [146] (word) divr16u::rem#11 ← phi( div16u/(byte) 0 div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#5 ) @@ -320,6 +346,8 @@ divr16u::@6: scope:[divr16u] from divr16u::@3 divr16u::@return: scope:[divr16u] from divr16u::@6 [163] return to:@return + +(void()) sin8s_gen((signed byte*) sin8s_gen::sintab , (word) sin8s_gen::wavelength) sin8s_gen: scope:[sin8s_gen] from main [164] phi() [165] call div16u @@ -349,6 +377,8 @@ sin8s_gen::@4: scope:[sin8s_gen] from sin8s_gen::@2 [177] (word) sin8s_gen::x#1 ← (word) sin8s_gen::x#2 + (word) sin8s_gen::step#0 [178] (word) sin8s_gen::i#1 ← ++ (word) sin8s_gen::i#2 to:sin8s_gen::@1 + +(signed byte()) sin8s((word) sin8s::x) sin8s: scope:[sin8s] from sin8s_gen::@2 [179] if((word) sin8s::x#0<(const word) PI_u4f12#0) goto sin8s::@1 to:sin8s::@5 @@ -425,6 +455,8 @@ sin8s::@return: scope:[sin8s] from sin8s::@4 sin8s::@14: scope:[sin8s] from sin8s::@3 [221] (signed byte~) sin8s::return#5 ← (signed byte)(byte) sin8s::usinx#4 to:sin8s::@4 + +(byte()) mulu8_sel((byte) mulu8_sel::v1 , (byte) mulu8_sel::v2 , (byte) mulu8_sel::select) mulu8_sel: scope:[mulu8_sel] from sin8s::@10 sin8s::@11 sin8s::@12 sin8s::@2 sin8s::@9 [222] (byte) mulu8_sel::select#5 ← phi( sin8s::@9/(byte) 1 sin8s::@10/(byte) 1 sin8s::@11/(byte) 0 sin8s::@12/(byte) 0 sin8s::@2/(byte) 0 ) [222] (byte) mulu8_sel::v2#5 ← phi( sin8s::@9/(byte) mulu8_sel::v2#1 sin8s::@10/(const byte) sin8s::DIV_6#0 sin8s::@11/(byte) mulu8_sel::v2#3 sin8s::@12/(byte) mulu8_sel::v2#4 sin8s::@2/(byte) mulu8_sel::v2#0 ) @@ -442,6 +474,8 @@ mulu8_sel::@1: scope:[mulu8_sel] from mulu8_sel mulu8_sel::@return: scope:[mulu8_sel] from mulu8_sel::@1 [230] return to:@return + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from mulu8_sel [231] phi() to:mul8u::@1 @@ -466,6 +500,8 @@ mul8u::@3: scope:[mul8u] from mul8u::@2 mul8u::@4 [239] (byte) mul8u::a#0 ← (byte) mul8u::a#2 >> (byte) 1 [240] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 to:mul8u::@1 + +(word()) div16u((word) div16u::dividend , (word) div16u::divisor) div16u: scope:[div16u] from sin8s_gen [241] phi() [242] call divr16u diff --git a/src/test/ref/sinusgen8b.log b/src/test/ref/sinusgen8b.log index 57a001483..6e25c0794 100644 --- a/src/test/ref/sinusgen8b.log +++ b/src/test/ref/sinusgen8b.log @@ -107,6 +107,8 @@ CONTROL FLOW GRAPH SSA @2: scope:[] from @begin (word) rem16u#0 ← (number) 0 to:@13 + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div16u div32u16u div32u16u::@2 (word) divr16u::divisor#7 ← phi( div16u/(word) divr16u::divisor#0 div32u16u/(word) divr16u::divisor#1 div32u16u::@2/(word) divr16u::divisor#2 ) (word) divr16u::dividend#6 ← phi( div16u/(word) divr16u::dividend#1 div32u16u/(word) divr16u::dividend#2 div32u16u::@2/(word) divr16u::dividend#3 ) @@ -184,6 +186,8 @@ divr16u::@return: scope:[divr16u] from divr16u::@6 (word) rem16u#2 ← (word) rem16u#16 return to:@return + +(word()) div16u((word) div16u::dividend , (word) div16u::divisor) div16u: scope:[div16u] from sin8s_gen (word) rem16u#30 ← phi( sin8s_gen/(word) rem16u#34 ) (word) div16u::divisor#1 ← phi( sin8s_gen/(word) div16u::divisor#0 ) @@ -208,6 +212,8 @@ div16u::@return: scope:[div16u] from div16u::@2 (word) rem16u#4 ← (word) rem16u#18 return to:@return + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from sin16s_gen (word) rem16u#31 ← phi( sin16s_gen/(word) rem16u#32 ) (word) div32u16u::divisor#1 ← phi( sin16s_gen/(word) div32u16u::divisor#0 ) @@ -251,6 +257,8 @@ div32u16u::@return: scope:[div32u16u] from div32u16u::@3 (word) rem16u#7 ← (word) rem16u#21 return to:@return + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from mulu8_sel (byte) mul8u::a#5 ← phi( mulu8_sel/(byte) mul8u::a#1 ) (byte) mul8u::b#1 ← phi( mulu8_sel/(byte) mul8u::b#0 ) @@ -298,6 +306,8 @@ mul8u::@return: scope:[mul8u] from mul8u::@3 (word) mul8u::return#1 ← (word) mul8u::return#3 return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mulu16_sel (word) mul16u::a#5 ← phi( mulu16_sel/(word) mul16u::a#1 ) (word) mul16u::b#1 ← phi( mulu16_sel/(word) mul16u::b#0 ) @@ -354,6 +364,8 @@ mul16u::@return: scope:[mul16u] from mul16u::@3 (word) PI_u4f12#0 ← (number) $3244 (word) PI_HALF_u4f12#0 ← (number) $1922 to:@32 + +(void()) sin16s_gen((signed word*) sin16s_gen::sintab , (word) sin16s_gen::wavelength) sin16s_gen: scope:[sin16s_gen] from main::@3 (signed word*) sin16s_gen::sintab#6 ← phi( main::@3/(signed word*) sin16s_gen::sintab#1 ) (word) rem16u#32 ← phi( main::@3/(word) rem16u#12 ) @@ -415,6 +427,8 @@ sin16s_gen::@return: scope:[sin16s_gen] from sin16s_gen::@1 (word) rem16u#9 ← (word) rem16u#23 return to:@return + +(void()) sin8s_gen((signed byte*) sin8s_gen::sintab , (word) sin8s_gen::wavelength) sin8s_gen: scope:[sin8s_gen] from main (signed byte*) sin8s_gen::sintab#6 ← phi( main/(signed byte*) sin8s_gen::sintab#1 ) (word) rem16u#34 ← phi( main/(word) rem16u#36 ) @@ -476,6 +490,8 @@ sin8s_gen::@return: scope:[sin8s_gen] from sin8s_gen::@1 (word) rem16u#11 ← (word) rem16u#25 return to:@return + +(signed word()) sin16s((dword) sin16s::x) sin16s: scope:[sin16s] from sin16s_gen::@2 (dword) sin16s::x#3 ← phi( sin16s_gen::@2/(dword) sin16s::x#0 ) (byte) sin16s::isUpper#0 ← (number) 0 @@ -597,6 +613,8 @@ sin16s::@return: scope:[sin16s] from sin16s::@3 (signed word) sin16s::return#2 ← (signed word) sin16s::return#4 return to:@return + +(signed byte()) sin8s((word) sin8s::x) sin8s: scope:[sin8s] from sin8s_gen::@2 (word) sin8s::x#3 ← phi( sin8s_gen::@2/(word) sin8s::x#0 ) (byte) sin8s::isUpper#0 ← (number) 0 @@ -731,6 +749,8 @@ sin8s::@return: scope:[sin8s] from sin8s::@4 (signed byte) sin8s::return#2 ← (signed byte) sin8s::return#4 return to:@return + +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@11 sin16s::@2 sin16s::@8 sin16s::@9 (byte) mulu16_sel::select#6 ← phi( sin16s::@10/(byte) mulu16_sel::select#3 sin16s::@11/(byte) mulu16_sel::select#4 sin16s::@2/(byte) mulu16_sel::select#0 sin16s::@8/(byte) mulu16_sel::select#1 sin16s::@9/(byte) mulu16_sel::select#2 ) (word) mulu16_sel::v2#5 ← phi( sin16s::@10/(word) mulu16_sel::v2#3 sin16s::@11/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@8/(word) mulu16_sel::v2#1 sin16s::@9/(word) mulu16_sel::v2#2 ) @@ -753,6 +773,8 @@ mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@2 (word) mulu16_sel::return#6 ← (word) mulu16_sel::return#12 return to:@return + +(byte()) mulu8_sel((byte) mulu8_sel::v1 , (byte) mulu8_sel::v2 , (byte) mulu8_sel::select) mulu8_sel: scope:[mulu8_sel] from sin8s::@10 sin8s::@11 sin8s::@12 sin8s::@13 sin8s::@2 (byte) mulu8_sel::select#6 ← phi( sin8s::@10/(byte) mulu8_sel::select#1 sin8s::@11/(byte) mulu8_sel::select#2 sin8s::@12/(byte) mulu8_sel::select#3 sin8s::@13/(byte) mulu8_sel::select#4 sin8s::@2/(byte) mulu8_sel::select#0 ) (byte) mulu8_sel::v2#5 ← phi( sin8s::@10/(byte) mulu8_sel::v2#1 sin8s::@11/(byte) mulu8_sel::v2#2 sin8s::@12/(byte) mulu8_sel::v2#3 sin8s::@13/(byte) mulu8_sel::v2#4 sin8s::@2/(byte) mulu8_sel::v2#0 ) @@ -775,6 +797,8 @@ mulu8_sel::@return: scope:[mulu8_sel] from mulu8_sel::@2 (byte) mulu8_sel::return#6 ← (byte) mulu8_sel::return#12 return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -823,6 +847,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@49 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@6 (byte*) print_char_cursor#44 ← phi( main::@6/(byte*) print_char_cursor#15 ) (byte*) print_str::str#4 ← phi( main::@6/(byte*) print_str::str#1 ) @@ -845,6 +871,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#20 return to:@return + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from main::@1 (byte*) print_char_cursor#45 ← phi( main::@1/(byte*) print_char_cursor#42 ) (signed byte) print_sbyte::b#2 ← phi( main::@1/(signed byte) print_sbyte::b#1 ) @@ -898,6 +926,8 @@ print_sbyte::@return: scope:[print_sbyte] from print_sbyte::@7 (word) rem16u#42 ← phi( @32/(word) rem16u#45 ) (byte[]) print_hextab#0 ← (const string) $0 to:@57 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_sbyte::@2 (byte*) print_char_cursor#40 ← phi( print_sbyte::@2/(byte*) print_char_cursor#39 ) (byte) print_byte::b#1 ← phi( print_sbyte::@2/(byte) print_byte::b#0 ) @@ -922,6 +952,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#9 ← (byte*) print_char_cursor#27 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sbyte::@3 (byte*) print_char_cursor#28 ← phi( print_byte/(byte*) print_char_cursor#40 print_byte::@1/(byte*) print_char_cursor#7 print_sbyte::@1/(byte*) print_char_cursor#37 print_sbyte::@3/(byte*) print_char_cursor#38 ) (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sbyte::@1/(byte) print_char::ch#0 print_sbyte::@3/(byte) print_char::ch#1 ) @@ -933,6 +965,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#11 ← (byte*) print_char_cursor#29 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main::@4 (byte*) print_screen#1 ← phi( main::@4/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -953,6 +987,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte*) print_char_cursor#13 ← (byte*) print_char_cursor#30 return to:@return + +(void()) main() main: scope:[main] from @57 (byte*) print_char_cursor#48 ← phi( @57/(byte*) print_char_cursor#43 ) (byte*) print_line_cursor#16 ← phi( @57/(byte*) print_line_cursor#12 ) @@ -2863,6 +2899,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call sin8s_gen @@ -2899,6 +2937,8 @@ main::@5: scope:[main] from main::@4 main::@return: scope:[main] from main::@5 [24] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@4 [25] phi() to:print_str::@1 @@ -2915,6 +2955,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [30] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#19 [31] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#2 to:print_str::@1 + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from main::@1 [32] if((signed byte) print_sbyte::b#1<(signed byte) 0) goto print_sbyte::@1 to:print_sbyte::@3 @@ -2937,6 +2979,8 @@ print_sbyte::@1: scope:[print_sbyte] from print_sbyte print_sbyte::@4: scope:[print_sbyte] from print_sbyte::@1 [41] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#1 to:print_sbyte::@2 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sbyte::@3 [42] (byte*) print_char_cursor#28 ← phi( print_byte/(byte*) print_char_cursor#10 print_byte::@1/(byte*) print_char_cursor#10 print_sbyte::@1/(byte*) print_char_cursor#42 print_sbyte::@3/(byte*) print_char_cursor#42 ) [42] (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sbyte::@1/(byte) '-' print_sbyte::@3/(byte) ' ' ) @@ -2946,6 +2990,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 p print_char::@return: scope:[print_char] from print_char [45] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_sbyte::@2 [46] (byte~) print_byte::$0 ← (byte) print_byte::b#0 >> (byte) 4 [47] (byte) print_char::ch#2 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) @@ -2959,6 +3005,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [52] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main::@3 [53] phi() [54] call memset @@ -2966,6 +3014,8 @@ print_cls: scope:[print_cls] from main::@3 print_cls::@return: scope:[print_cls] from print_cls [55] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [56] phi() to:memset::@1 @@ -2980,6 +3030,8 @@ memset::@2: scope:[memset] from memset::@1 [60] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [61] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 + +(void()) sin16s_gen((signed word*) sin16s_gen::sintab , (word) sin16s_gen::wavelength) sin16s_gen: scope:[sin16s_gen] from main::@2 [62] phi() [63] call div32u16u @@ -3009,6 +3061,8 @@ sin16s_gen::@4: scope:[sin16s_gen] from sin16s_gen::@2 [75] (dword) sin16s_gen::x#1 ← (dword) sin16s_gen::x#2 + (dword) sin16s_gen::step#0 [76] (word) sin16s_gen::i#1 ← ++ (word) sin16s_gen::i#2 to:sin16s_gen::@1 + +(signed word()) sin16s((dword) sin16s::x) sin16s: scope:[sin16s] from sin16s_gen::@2 [77] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 to:sin16s::@4 @@ -3078,6 +3132,8 @@ sin16s::@return: scope:[sin16s] from sin16s::@3 sin16s::@12: scope:[sin16s] from sin16s::@11 [116] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 to:sin16s::@3 + +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 [117] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) [117] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) @@ -3095,6 +3151,8 @@ mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 [125] return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mulu16_sel [126] phi() to:mul16u::@1 @@ -3119,6 +3177,8 @@ mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4 [134] (word) mul16u::a#0 ← (word) mul16u::a#2 >> (byte) 1 [135] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 to:mul16u::@1 + +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) div32u16u: scope:[div32u16u] from sin16s_gen [136] phi() [137] call divr16u @@ -3137,6 +3197,8 @@ div32u16u::@2: scope:[div32u16u] from div32u16u::@1 div32u16u::@return: scope:[div32u16u] from div32u16u::@2 [145] return to:@return + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div16u div32u16u div32u16u::@1 [146] (word) divr16u::dividend#6 ← phi( div16u/(const word) PI2_u4f12#0 div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) [146] (word) divr16u::rem#11 ← phi( div16u/(byte) 0 div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#5 ) @@ -3176,6 +3238,8 @@ divr16u::@6: scope:[divr16u] from divr16u::@3 divr16u::@return: scope:[divr16u] from divr16u::@6 [163] return to:@return + +(void()) sin8s_gen((signed byte*) sin8s_gen::sintab , (word) sin8s_gen::wavelength) sin8s_gen: scope:[sin8s_gen] from main [164] phi() [165] call div16u @@ -3205,6 +3269,8 @@ sin8s_gen::@4: scope:[sin8s_gen] from sin8s_gen::@2 [177] (word) sin8s_gen::x#1 ← (word) sin8s_gen::x#2 + (word) sin8s_gen::step#0 [178] (word) sin8s_gen::i#1 ← ++ (word) sin8s_gen::i#2 to:sin8s_gen::@1 + +(signed byte()) sin8s((word) sin8s::x) sin8s: scope:[sin8s] from sin8s_gen::@2 [179] if((word) sin8s::x#0<(const word) PI_u4f12#0) goto sin8s::@1 to:sin8s::@5 @@ -3281,6 +3347,8 @@ sin8s::@return: scope:[sin8s] from sin8s::@4 sin8s::@14: scope:[sin8s] from sin8s::@3 [221] (signed byte~) sin8s::return#5 ← (signed byte)(byte) sin8s::usinx#4 to:sin8s::@4 + +(byte()) mulu8_sel((byte) mulu8_sel::v1 , (byte) mulu8_sel::v2 , (byte) mulu8_sel::select) mulu8_sel: scope:[mulu8_sel] from sin8s::@10 sin8s::@11 sin8s::@12 sin8s::@2 sin8s::@9 [222] (byte) mulu8_sel::select#5 ← phi( sin8s::@9/(byte) 1 sin8s::@10/(byte) 1 sin8s::@11/(byte) 0 sin8s::@12/(byte) 0 sin8s::@2/(byte) 0 ) [222] (byte) mulu8_sel::v2#5 ← phi( sin8s::@9/(byte) mulu8_sel::v2#1 sin8s::@10/(const byte) sin8s::DIV_6#0 sin8s::@11/(byte) mulu8_sel::v2#3 sin8s::@12/(byte) mulu8_sel::v2#4 sin8s::@2/(byte) mulu8_sel::v2#0 ) @@ -3298,6 +3366,8 @@ mulu8_sel::@1: scope:[mulu8_sel] from mulu8_sel mulu8_sel::@return: scope:[mulu8_sel] from mulu8_sel::@1 [230] return to:@return + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from mulu8_sel [231] phi() to:mul8u::@1 @@ -3322,6 +3392,8 @@ mul8u::@3: scope:[mul8u] from mul8u::@2 mul8u::@4 [239] (byte) mul8u::a#0 ← (byte) mul8u::a#2 >> (byte) 1 [240] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 to:mul8u::@1 + +(word()) div16u((word) div16u::dividend , (word) div16u::divisor) div16u: scope:[div16u] from sin8s_gen [241] phi() [242] call divr16u diff --git a/src/test/ref/sinusgenscale8.cfg b/src/test/ref/sinusgenscale8.cfg index 396ed48ba..dfc166e88 100644 --- a/src/test/ref/sinusgenscale8.cfg +++ b/src/test/ref/sinusgenscale8.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) sin8u_table((byte*) sin8u_table::sintab , (word) sin8u_table::tabsize , (byte) sin8u_table::min , (byte) sin8u_table::max) sin8u_table: scope:[sin8u_table] from main::@1 [9] phi() [10] call div16u @@ -131,6 +135,8 @@ sin8u_table::@24: scope:[sin8u_table] from sin8u_table::@23 [66] (word) sin8u_table::x#1 ← (word) sin8u_table::x#10 + (word) sin8u_table::step#0 [67] (word) sin8u_table::i#1 ← ++ (word) sin8u_table::i#10 to:sin8u_table::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from sin8u_table::@13 sin8u_table::@23 [68] (byte*) print_line_cursor#23 ← phi( sin8u_table::@13/(byte*) 1024 sin8u_table::@23/(byte*) print_line_cursor#1 ) to:print_ln::@1 @@ -142,6 +148,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [72] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_sbyte::@2 print_word print_word::@1 sin8u_table::@10 sin8u_table::@12 sin8u_table::@22 sin8u_table::@6 sin8u_table::@8 [73] (byte*) print_char_cursor#103 ← phi( print_sbyte::@2/(byte*) print_char_cursor#19 print_word/(byte*) print_char_cursor#102 print_word::@1/(byte*) print_char_cursor#19 sin8u_table::@6/(byte*) print_char_cursor#2 sin8u_table::@8/(byte*) print_char_cursor#2 sin8u_table::@10/(byte*) print_char_cursor#2 sin8u_table::@12/(byte*) print_char_cursor#2 sin8u_table::@22/(byte*) print_char_cursor#2 ) [73] (byte) print_byte::b#8 ← phi( print_sbyte::@2/(byte) print_byte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 sin8u_table::@6/(const byte) sin8u_table::min#0 sin8u_table::@8/(const byte) sin8u_table::max#0 sin8u_table::@10/(const byte) sin8u_table::amplitude#0 sin8u_table::@12/(const byte) sin8u_table::mid#0 sin8u_table::@22/(byte) print_byte::b#7 ) @@ -157,6 +165,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [80] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sbyte::@3 print_sword::@1 print_sword::@3 [81] (byte*) print_char_cursor#66 ← phi( print_byte/(byte*) print_char_cursor#103 print_byte::@1/(byte*) print_char_cursor#19 print_sbyte::@1/(byte*) print_char_cursor#2 print_sbyte::@3/(byte*) print_char_cursor#2 print_sword::@1/(byte*) print_char_cursor#2 print_sword::@3/(byte*) print_char_cursor#2 ) [81] (byte) print_char::ch#6 ← phi( print_byte/(byte) print_char::ch#4 print_byte::@1/(byte) print_char::ch#5 print_sbyte::@1/(byte) '-' print_sbyte::@3/(byte) ' ' print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' ) @@ -166,6 +176,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 p print_char::@return: scope:[print_char] from print_char [84] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from sin8u_table::@11 sin8u_table::@15 sin8u_table::@17 sin8u_table::@19 sin8u_table::@21 sin8u_table::@3 sin8u_table::@5 sin8u_table::@7 sin8u_table::@9 [85] (byte*) print_char_cursor#109 ← phi( sin8u_table::@7/(byte*) print_char_cursor#19 sin8u_table::@9/(byte*) print_char_cursor#19 sin8u_table::@11/(byte*) print_char_cursor#19 sin8u_table::@15/(byte*~) print_char_cursor#119 sin8u_table::@17/(byte*) print_char_cursor#19 sin8u_table::@19/(byte*) print_char_cursor#19 sin8u_table::@21/(byte*) print_char_cursor#19 sin8u_table::@3/(byte*) 1024 sin8u_table::@5/(byte*) print_char_cursor#19 ) [85] (byte*) print_str::str#12 ← phi( sin8u_table::@7/(const string) sin8u_table::str2 sin8u_table::@9/(const string) sin8u_table::str3 sin8u_table::@11/(const string) sin8u_table::str4 sin8u_table::@15/(const string) sin8u_table::str5 sin8u_table::@17/(const string) sin8u_table::str6 sin8u_table::@19/(const string) sin8u_table::str7 sin8u_table::@21/(const string) sin8u_table::str8 sin8u_table::@3/(const string) sin8u_table::str sin8u_table::@5/(const string) sin8u_table::str1 ) @@ -183,6 +195,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [90] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [91] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#10 to:print_str::@1 + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from sin8u_table::@20 [92] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 to:print_sword::@3 @@ -205,6 +219,8 @@ print_sword::@1: scope:[print_sword] from print_sword print_sword::@4: scope:[print_sword] from print_sword::@1 [101] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#1 to:print_sword::@2 + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_sword::@2 sin8u_table::@16 sin8u_table::@4 [102] (byte*) print_char_cursor#102 ← phi( print_sword::@2/(byte*) print_char_cursor#19 sin8u_table::@16/(byte*) print_char_cursor#2 sin8u_table::@4/(byte*) print_char_cursor#2 ) [102] (word) print_word::w#3 ← phi( print_sword::@2/(word) print_word::w#0 sin8u_table::@16/(word) print_word::w#2 sin8u_table::@4/(word) print_word::w#1 ) @@ -218,6 +234,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [107] return to:@return + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from sin8u_table::@18 [108] if((signed byte) print_sbyte::b#1<(signed byte) 0) goto print_sbyte::@1 to:print_sbyte::@3 @@ -240,6 +258,8 @@ print_sbyte::@1: scope:[print_sbyte] from print_sbyte print_sbyte::@4: scope:[print_sbyte] from print_sbyte::@1 [117] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#1 to:print_sbyte::@2 + +(signed word()) mul8su((signed byte) mul8su::a , (byte) mul8su::b) mul8su: scope:[mul8su] from sin8u_table::@14 [118] (byte) mul8u::a#1 ← (byte)(signed byte) mul8su::a#0 [119] call mul8u @@ -260,6 +280,8 @@ mul8su::@1: scope:[mul8su] from mul8su::@2 mul8su::@3 mul8su::@return: scope:[mul8su] from mul8su::@1 [127] return to:@return + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from mul8su mulu8_sel [128] (byte) mul8u::a#6 ← phi( mul8su/(byte) mul8u::a#1 mulu8_sel/(byte) mul8u::a#2 ) [128] (word) mul8u::mb#0 ← phi( mul8su/(const byte) mul8su::b#0 mulu8_sel/(byte) mul8u::b#1 ) @@ -285,6 +307,8 @@ mul8u::@3: scope:[mul8u] from mul8u::@2 mul8u::@4 [136] (byte) mul8u::a#0 ← (byte) mul8u::a#3 >> (byte) 1 [137] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 to:mul8u::@1 + +(signed byte()) sin8s((word) sin8s::x) sin8s: scope:[sin8s] from sin8u_table::@2 [138] if((word) sin8s::x#2<(const word) PI_u4f12#0) goto sin8s::@1 to:sin8s::@5 @@ -361,6 +385,8 @@ sin8s::@return: scope:[sin8s] from sin8s::@4 sin8s::@14: scope:[sin8s] from sin8s::@3 [180] (signed byte~) sin8s::return#5 ← (signed byte)(byte) sin8s::usinx#4 to:sin8s::@4 + +(byte()) mulu8_sel((byte) mulu8_sel::v1 , (byte) mulu8_sel::v2 , (byte) mulu8_sel::select) mulu8_sel: scope:[mulu8_sel] from sin8s::@10 sin8s::@11 sin8s::@12 sin8s::@2 sin8s::@9 [181] (byte) mulu8_sel::select#5 ← phi( sin8s::@9/(byte) 1 sin8s::@10/(byte) 1 sin8s::@11/(byte) 0 sin8s::@12/(byte) 0 sin8s::@2/(byte) 0 ) [181] (byte) mulu8_sel::v2#5 ← phi( sin8s::@9/(byte) mulu8_sel::v2#1 sin8s::@10/(const byte) sin8s::DIV_6#0 sin8s::@11/(byte) mulu8_sel::v2#3 sin8s::@12/(byte) mulu8_sel::v2#4 sin8s::@2/(byte) mulu8_sel::v2#0 ) @@ -378,6 +404,8 @@ mulu8_sel::@1: scope:[mulu8_sel] from mulu8_sel mulu8_sel::@return: scope:[mulu8_sel] from mulu8_sel::@1 [189] return to:@return + +(word()) div16u((word) div16u::dividend , (word) div16u::divisor) div16u: scope:[div16u] from sin8u_table [190] phi() [191] call divr16u @@ -389,6 +417,8 @@ div16u::@1: scope:[div16u] from div16u div16u::@return: scope:[div16u] from div16u::@1 [194] return to:@return + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div16u [195] phi() to:divr16u::@1 @@ -424,6 +454,8 @@ divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 divr16u::@return: scope:[divr16u] from divr16u::@3 [211] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main [212] phi() [213] call memset @@ -431,6 +463,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [214] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [215] phi() to:memset::@1 diff --git a/src/test/ref/sinusgenscale8.log b/src/test/ref/sinusgenscale8.log index 8d6714104..ab5a28303 100644 --- a/src/test/ref/sinusgenscale8.log +++ b/src/test/ref/sinusgenscale8.log @@ -95,6 +95,8 @@ Culled Empty Block (label) sin8u_table::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@13 + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div16u (word) divr16u::divisor#5 ← phi( div16u/(word) divr16u::divisor#0 ) (word) divr16u::dividend#4 ← phi( div16u/(word) divr16u::dividend#1 ) @@ -168,6 +170,8 @@ divr16u::@return: scope:[divr16u] from divr16u::@6 (word) divr16u::return#1 ← (word) divr16u::return#3 return to:@return + +(word()) div16u((word) div16u::dividend , (word) div16u::divisor) div16u: scope:[div16u] from sin8u_table (word) div16u::divisor#1 ← phi( sin8u_table/(word) div16u::divisor#0 ) (word) div16u::dividend#1 ← phi( sin8u_table/(word) div16u::dividend#0 ) @@ -187,6 +191,8 @@ div16u::@return: scope:[div16u] from div16u::@2 (word) div16u::return#1 ← (word) div16u::return#3 return to:@return + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from mul8su mulu8_sel (byte) mul8u::a#6 ← phi( mul8su/(byte) mul8u::a#1 mulu8_sel/(byte) mul8u::a#2 ) (byte) mul8u::b#2 ← phi( mul8su/(byte) mul8u::b#0 mulu8_sel/(byte) mul8u::b#1 ) @@ -234,6 +240,8 @@ mul8u::@return: scope:[mul8u] from mul8u::@3 (word) mul8u::return#1 ← (word) mul8u::return#4 return to:@return + +(signed word()) mul8su((signed byte) mul8su::a , (byte) mul8su::b) mul8su: scope:[mul8su] from sin8u_table::@19 (byte) mul8su::b#1 ← phi( sin8u_table::@19/(byte) mul8su::b#0 ) (signed byte) mul8su::a#1 ← phi( sin8u_table::@19/(signed byte) mul8su::a#0 ) @@ -278,6 +286,8 @@ mul8su::@return: scope:[mul8su] from mul8su::@1 (word) PI_u4f12#0 ← (number) $3244 (word) PI_HALF_u4f12#0 ← (number) $1922 to:@32 + +(signed byte()) sin8s((word) sin8s::x) sin8s: scope:[sin8s] from sin8u_table::@2 (word) sin8s::x#3 ← phi( sin8u_table::@2/(word) sin8s::x#2 ) (byte) sin8s::isUpper#0 ← (number) 0 @@ -412,6 +422,8 @@ sin8s::@return: scope:[sin8s] from sin8s::@4 (signed byte) sin8s::return#1 ← (signed byte) sin8s::return#3 return to:@return + +(byte()) mulu8_sel((byte) mulu8_sel::v1 , (byte) mulu8_sel::v2 , (byte) mulu8_sel::select) mulu8_sel: scope:[mulu8_sel] from sin8s::@10 sin8s::@11 sin8s::@12 sin8s::@13 sin8s::@2 (byte) mulu8_sel::select#6 ← phi( sin8s::@10/(byte) mulu8_sel::select#1 sin8s::@11/(byte) mulu8_sel::select#2 sin8s::@12/(byte) mulu8_sel::select#3 sin8s::@13/(byte) mulu8_sel::select#4 sin8s::@2/(byte) mulu8_sel::select#0 ) (byte) mulu8_sel::v2#5 ← phi( sin8s::@10/(byte) mulu8_sel::v2#1 sin8s::@11/(byte) mulu8_sel::v2#2 sin8s::@12/(byte) mulu8_sel::v2#3 sin8s::@13/(byte) mulu8_sel::v2#4 sin8s::@2/(byte) mulu8_sel::v2#0 ) @@ -434,6 +446,8 @@ mulu8_sel::@return: scope:[mulu8_sel] from mulu8_sel::@2 (byte) mulu8_sel::return#6 ← (byte) mulu8_sel::return#12 return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -481,6 +495,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@49 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from sin8u_table::@11 sin8u_table::@13 sin8u_table::@15 sin8u_table::@20 sin8u_table::@22 sin8u_table::@24 sin8u_table::@26 sin8u_table::@7 sin8u_table::@9 (byte*) print_char_cursor#109 ← phi( sin8u_table::@11/(byte*) print_char_cursor#29 sin8u_table::@13/(byte*) print_char_cursor#31 sin8u_table::@15/(byte*) print_char_cursor#33 sin8u_table::@20/(byte*) print_char_cursor#106 sin8u_table::@22/(byte*) print_char_cursor#38 sin8u_table::@24/(byte*) print_char_cursor#40 sin8u_table::@26/(byte*) print_char_cursor#42 sin8u_table::@7/(byte*) print_char_cursor#105 sin8u_table::@9/(byte*) print_char_cursor#27 ) (byte*) print_str::str#12 ← phi( sin8u_table::@11/(byte*) print_str::str#3 sin8u_table::@13/(byte*) print_str::str#4 sin8u_table::@15/(byte*) print_str::str#5 sin8u_table::@20/(byte*) print_str::str#6 sin8u_table::@22/(byte*) print_str::str#7 sin8u_table::@24/(byte*) print_str::str#8 sin8u_table::@26/(byte*) print_str::str#9 sin8u_table::@7/(byte*) print_str::str#1 sin8u_table::@9/(byte*) print_str::str#2 ) @@ -503,6 +519,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#49 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from sin8u_table::@17 sin8u_table::@28 (byte*) print_char_cursor#95 ← phi( sin8u_table::@17/(byte*) print_char_cursor#35 sin8u_table::@28/(byte*) print_char_cursor#44 ) (byte*) print_line_cursor#23 ← phi( sin8u_table::@17/(byte*) print_line_cursor#25 sin8u_table::@28/(byte*) print_line_cursor#26 ) @@ -526,6 +544,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#51 return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from sin8u_table::@25 (byte*) print_char_cursor#110 ← phi( sin8u_table::@25/(byte*) print_char_cursor#41 ) (signed word) print_sword::w#2 ← phi( sin8u_table::@25/(signed word) print_sword::w#1 ) @@ -572,6 +592,8 @@ print_sword::@return: scope:[print_sword] from print_sword::@7 (byte*) print_char_cursor#8 ← (byte*) print_char_cursor#55 return to:@return + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from sin8u_table::@23 (byte*) print_char_cursor#111 ← phi( sin8u_table::@23/(byte*) print_char_cursor#39 ) (signed byte) print_sbyte::b#2 ← phi( sin8u_table::@23/(signed byte) print_sbyte::b#1 ) @@ -618,6 +640,8 @@ print_sbyte::@return: scope:[print_sbyte] from print_sbyte::@7 (byte*) print_char_cursor#12 ← (byte*) print_char_cursor#59 return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_sword::@2 sin8u_table::@21 sin8u_table::@8 (byte*) print_char_cursor#102 ← phi( print_sword::@2/(byte*) print_char_cursor#98 sin8u_table::@21/(byte*) print_char_cursor#37 sin8u_table::@8/(byte*) print_char_cursor#26 ) (word) print_word::w#3 ← phi( print_sword::@2/(word) print_word::w#0 sin8u_table::@21/(word) print_word::w#2 sin8u_table::@8/(word) print_word::w#1 ) @@ -648,6 +672,8 @@ print_word::@return: scope:[print_word] from print_word::@2 (byte*) print_line_cursor#31 ← phi( @32/(byte*) print_line_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $0 to:@58 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_sbyte::@2 print_word print_word::@1 sin8u_table::@10 sin8u_table::@12 sin8u_table::@14 sin8u_table::@16 sin8u_table::@27 (byte*) print_char_cursor#103 ← phi( print_sbyte::@2/(byte*) print_char_cursor#101 print_word/(byte*) print_char_cursor#102 print_word::@1/(byte*) print_char_cursor#13 sin8u_table::@10/(byte*) print_char_cursor#28 sin8u_table::@12/(byte*) print_char_cursor#30 sin8u_table::@14/(byte*) print_char_cursor#32 sin8u_table::@16/(byte*) print_char_cursor#34 sin8u_table::@27/(byte*) print_char_cursor#43 ) (byte) print_byte::b#8 ← phi( print_sbyte::@2/(byte) print_byte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 sin8u_table::@10/(byte) print_byte::b#3 sin8u_table::@12/(byte) print_byte::b#4 sin8u_table::@14/(byte) print_byte::b#5 sin8u_table::@16/(byte) print_byte::b#6 sin8u_table::@27/(byte) print_byte::b#7 ) @@ -672,6 +698,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#18 ← (byte*) print_char_cursor#65 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sbyte::@3 print_sword::@1 print_sword::@3 (byte*) print_char_cursor#66 ← phi( print_byte/(byte*) print_char_cursor#103 print_byte::@1/(byte*) print_char_cursor#16 print_sbyte::@1/(byte*) print_char_cursor#99 print_sbyte::@3/(byte*) print_char_cursor#100 print_sword::@1/(byte*) print_char_cursor#96 print_sword::@3/(byte*) print_char_cursor#97 ) (byte) print_char::ch#6 ← phi( print_byte/(byte) print_char::ch#4 print_byte::@1/(byte) print_char::ch#5 print_sbyte::@1/(byte) print_char::ch#2 print_sbyte::@3/(byte) print_char::ch#3 print_sword::@1/(byte) print_char::ch#0 print_sword::@3/(byte) print_char::ch#1 ) @@ -683,6 +711,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#20 ← (byte*) print_char_cursor#67 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main (byte*) print_screen#1 ← phi( main/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -703,6 +733,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte*) print_char_cursor#22 ← (byte*) print_char_cursor#68 return to:@return + +(void()) main() main: scope:[main] from @58 (byte*) print_char_cursor#104 ← phi( @58/(byte*) print_char_cursor#108 ) (byte*) print_line_cursor#24 ← phi( @58/(byte*) print_line_cursor#28 ) @@ -735,6 +767,8 @@ main::@return: scope:[main] from main::@2 (byte*) print_char_cursor#25 ← (byte*) print_char_cursor#71 return to:@return + +(void()) sin8u_table((byte*) sin8u_table::sintab , (word) sin8u_table::tabsize , (byte) sin8u_table::min , (byte) sin8u_table::max) sin8u_table: scope:[sin8u_table] from main::@1 (byte*) sin8u_table::sintab#27 ← phi( main::@1/(byte*) sin8u_table::sintab#0 ) (byte*) print_line_cursor#50 ← phi( main::@1/(byte*) print_line_cursor#5 ) @@ -2963,6 +2997,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -2974,6 +3010,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) sin8u_table((byte*) sin8u_table::sintab , (word) sin8u_table::tabsize , (byte) sin8u_table::min , (byte) sin8u_table::max) sin8u_table: scope:[sin8u_table] from main::@1 [9] phi() [10] call div16u @@ -3087,6 +3125,8 @@ sin8u_table::@24: scope:[sin8u_table] from sin8u_table::@23 [66] (word) sin8u_table::x#1 ← (word) sin8u_table::x#10 + (word) sin8u_table::step#0 [67] (word) sin8u_table::i#1 ← ++ (word) sin8u_table::i#10 to:sin8u_table::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from sin8u_table::@13 sin8u_table::@23 [68] (byte*) print_line_cursor#23 ← phi( sin8u_table::@13/(byte*) 1024 sin8u_table::@23/(byte*) print_line_cursor#1 ) to:print_ln::@1 @@ -3098,6 +3138,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [72] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_sbyte::@2 print_word print_word::@1 sin8u_table::@10 sin8u_table::@12 sin8u_table::@22 sin8u_table::@6 sin8u_table::@8 [73] (byte*) print_char_cursor#103 ← phi( print_sbyte::@2/(byte*) print_char_cursor#19 print_word/(byte*) print_char_cursor#102 print_word::@1/(byte*) print_char_cursor#19 sin8u_table::@6/(byte*) print_char_cursor#2 sin8u_table::@8/(byte*) print_char_cursor#2 sin8u_table::@10/(byte*) print_char_cursor#2 sin8u_table::@12/(byte*) print_char_cursor#2 sin8u_table::@22/(byte*) print_char_cursor#2 ) [73] (byte) print_byte::b#8 ← phi( print_sbyte::@2/(byte) print_byte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 sin8u_table::@6/(const byte) sin8u_table::min#0 sin8u_table::@8/(const byte) sin8u_table::max#0 sin8u_table::@10/(const byte) sin8u_table::amplitude#0 sin8u_table::@12/(const byte) sin8u_table::mid#0 sin8u_table::@22/(byte) print_byte::b#7 ) @@ -3113,6 +3155,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [80] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sbyte::@3 print_sword::@1 print_sword::@3 [81] (byte*) print_char_cursor#66 ← phi( print_byte/(byte*) print_char_cursor#103 print_byte::@1/(byte*) print_char_cursor#19 print_sbyte::@1/(byte*) print_char_cursor#2 print_sbyte::@3/(byte*) print_char_cursor#2 print_sword::@1/(byte*) print_char_cursor#2 print_sword::@3/(byte*) print_char_cursor#2 ) [81] (byte) print_char::ch#6 ← phi( print_byte/(byte) print_char::ch#4 print_byte::@1/(byte) print_char::ch#5 print_sbyte::@1/(byte) '-' print_sbyte::@3/(byte) ' ' print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' ) @@ -3122,6 +3166,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 p print_char::@return: scope:[print_char] from print_char [84] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from sin8u_table::@11 sin8u_table::@15 sin8u_table::@17 sin8u_table::@19 sin8u_table::@21 sin8u_table::@3 sin8u_table::@5 sin8u_table::@7 sin8u_table::@9 [85] (byte*) print_char_cursor#109 ← phi( sin8u_table::@7/(byte*) print_char_cursor#19 sin8u_table::@9/(byte*) print_char_cursor#19 sin8u_table::@11/(byte*) print_char_cursor#19 sin8u_table::@15/(byte*~) print_char_cursor#119 sin8u_table::@17/(byte*) print_char_cursor#19 sin8u_table::@19/(byte*) print_char_cursor#19 sin8u_table::@21/(byte*) print_char_cursor#19 sin8u_table::@3/(byte*) 1024 sin8u_table::@5/(byte*) print_char_cursor#19 ) [85] (byte*) print_str::str#12 ← phi( sin8u_table::@7/(const string) sin8u_table::str2 sin8u_table::@9/(const string) sin8u_table::str3 sin8u_table::@11/(const string) sin8u_table::str4 sin8u_table::@15/(const string) sin8u_table::str5 sin8u_table::@17/(const string) sin8u_table::str6 sin8u_table::@19/(const string) sin8u_table::str7 sin8u_table::@21/(const string) sin8u_table::str8 sin8u_table::@3/(const string) sin8u_table::str sin8u_table::@5/(const string) sin8u_table::str1 ) @@ -3139,6 +3185,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [90] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [91] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#10 to:print_str::@1 + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from sin8u_table::@20 [92] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 to:print_sword::@3 @@ -3161,6 +3209,8 @@ print_sword::@1: scope:[print_sword] from print_sword print_sword::@4: scope:[print_sword] from print_sword::@1 [101] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#1 to:print_sword::@2 + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_sword::@2 sin8u_table::@16 sin8u_table::@4 [102] (byte*) print_char_cursor#102 ← phi( print_sword::@2/(byte*) print_char_cursor#19 sin8u_table::@16/(byte*) print_char_cursor#2 sin8u_table::@4/(byte*) print_char_cursor#2 ) [102] (word) print_word::w#3 ← phi( print_sword::@2/(word) print_word::w#0 sin8u_table::@16/(word) print_word::w#2 sin8u_table::@4/(word) print_word::w#1 ) @@ -3174,6 +3224,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [107] return to:@return + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from sin8u_table::@18 [108] if((signed byte) print_sbyte::b#1<(signed byte) 0) goto print_sbyte::@1 to:print_sbyte::@3 @@ -3196,6 +3248,8 @@ print_sbyte::@1: scope:[print_sbyte] from print_sbyte print_sbyte::@4: scope:[print_sbyte] from print_sbyte::@1 [117] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#1 to:print_sbyte::@2 + +(signed word()) mul8su((signed byte) mul8su::a , (byte) mul8su::b) mul8su: scope:[mul8su] from sin8u_table::@14 [118] (byte) mul8u::a#1 ← (byte)(signed byte) mul8su::a#0 [119] call mul8u @@ -3216,6 +3270,8 @@ mul8su::@1: scope:[mul8su] from mul8su::@2 mul8su::@3 mul8su::@return: scope:[mul8su] from mul8su::@1 [127] return to:@return + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from mul8su mulu8_sel [128] (byte) mul8u::a#6 ← phi( mul8su/(byte) mul8u::a#1 mulu8_sel/(byte) mul8u::a#2 ) [128] (word) mul8u::mb#0 ← phi( mul8su/(const byte) mul8su::b#0 mulu8_sel/(byte) mul8u::b#1 ) @@ -3241,6 +3297,8 @@ mul8u::@3: scope:[mul8u] from mul8u::@2 mul8u::@4 [136] (byte) mul8u::a#0 ← (byte) mul8u::a#3 >> (byte) 1 [137] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 to:mul8u::@1 + +(signed byte()) sin8s((word) sin8s::x) sin8s: scope:[sin8s] from sin8u_table::@2 [138] if((word) sin8s::x#2<(const word) PI_u4f12#0) goto sin8s::@1 to:sin8s::@5 @@ -3317,6 +3375,8 @@ sin8s::@return: scope:[sin8s] from sin8s::@4 sin8s::@14: scope:[sin8s] from sin8s::@3 [180] (signed byte~) sin8s::return#5 ← (signed byte)(byte) sin8s::usinx#4 to:sin8s::@4 + +(byte()) mulu8_sel((byte) mulu8_sel::v1 , (byte) mulu8_sel::v2 , (byte) mulu8_sel::select) mulu8_sel: scope:[mulu8_sel] from sin8s::@10 sin8s::@11 sin8s::@12 sin8s::@2 sin8s::@9 [181] (byte) mulu8_sel::select#5 ← phi( sin8s::@9/(byte) 1 sin8s::@10/(byte) 1 sin8s::@11/(byte) 0 sin8s::@12/(byte) 0 sin8s::@2/(byte) 0 ) [181] (byte) mulu8_sel::v2#5 ← phi( sin8s::@9/(byte) mulu8_sel::v2#1 sin8s::@10/(const byte) sin8s::DIV_6#0 sin8s::@11/(byte) mulu8_sel::v2#3 sin8s::@12/(byte) mulu8_sel::v2#4 sin8s::@2/(byte) mulu8_sel::v2#0 ) @@ -3334,6 +3394,8 @@ mulu8_sel::@1: scope:[mulu8_sel] from mulu8_sel mulu8_sel::@return: scope:[mulu8_sel] from mulu8_sel::@1 [189] return to:@return + +(word()) div16u((word) div16u::dividend , (word) div16u::divisor) div16u: scope:[div16u] from sin8u_table [190] phi() [191] call divr16u @@ -3345,6 +3407,8 @@ div16u::@1: scope:[div16u] from div16u div16u::@return: scope:[div16u] from div16u::@1 [194] return to:@return + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div16u [195] phi() to:divr16u::@1 @@ -3380,6 +3444,8 @@ divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 divr16u::@return: scope:[divr16u] from divr16u::@3 [211] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main [212] phi() [213] call memset @@ -3387,6 +3453,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [214] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [215] phi() to:memset::@1 diff --git a/src/test/ref/sizeof-arrays.cfg b/src/test/ref/sizeof-arrays.cfg index 222121942..6646fd21b 100644 --- a/src/test/ref/sizeof-arrays.cfg +++ b/src/test/ref/sizeof-arrays.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) '0'+(byte) 3*(const byte) SIZEOF_BYTE/(const byte) SIZEOF_BYTE [5] *((const byte*) SCREEN#0+(byte) 1) ← (byte) '0'+(byte) 3*(const byte) SIZEOF_WORD/(const byte) SIZEOF_WORD diff --git a/src/test/ref/sizeof-arrays.log b/src/test/ref/sizeof-arrays.log index 7f485edfa..5b0d97bc1 100644 --- a/src/test/ref/sizeof-arrays.log +++ b/src/test/ref/sizeof-arrays.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::idx#0 ← (number) 0 (byte[3]) main::ba#0 ← { fill( 3, 0) } @@ -325,6 +327,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) '0'+(byte) 3*(const byte) SIZEOF_BYTE/(const byte) SIZEOF_BYTE [5] *((const byte*) SCREEN#0+(byte) 1) ← (byte) '0'+(byte) 3*(const byte) SIZEOF_WORD/(const byte) SIZEOF_WORD diff --git a/src/test/ref/sizeof-expr.cfg b/src/test/ref/sizeof-expr.cfg index bf7933b71..26ca2b986 100644 --- a/src/test/ref/sizeof-expr.cfg +++ b/src/test/ref/sizeof-expr.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::b#0 ← (byte) 0 [5] (word) main::w#0 ← (byte) 0 diff --git a/src/test/ref/sizeof-expr.log b/src/test/ref/sizeof-expr.log index 98d9e1962..220821f58 100644 --- a/src/test/ref/sizeof-expr.log +++ b/src/test/ref/sizeof-expr.log @@ -11,6 +11,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::idx#0 ← (number) 0 (byte) main::b#0 ← (number) 0 @@ -284,6 +286,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::b#0 ← (byte) 0 [5] (word) main::w#0 ← (byte) 0 diff --git a/src/test/ref/sizeof-struct.cfg b/src/test/ref/sizeof-struct.cfg index 6d6a59dda..517481356 100644 --- a/src/test/ref/sizeof-struct.cfg +++ b/src/test/ref/sizeof-struct.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) '0'+(const byte) SIZEOF_STRUCT_POINT [5] *((const byte*) SCREEN#0+(byte) 1) ← (byte) '0'+(const byte) SIZEOF_STRUCT_CIRCLE diff --git a/src/test/ref/sizeof-struct.log b/src/test/ref/sizeof-struct.log index 96192f1c9..ffa1b5c54 100644 --- a/src/test/ref/sizeof-struct.log +++ b/src/test/ref/sizeof-struct.log @@ -25,6 +25,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::idx#0 ← (number) 0 *((byte*) SCREEN#0 + (byte) main::idx#0) ← (byte) '0'+(const byte) SIZEOF_STRUCT_POINT @@ -318,6 +320,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) '0'+(const byte) SIZEOF_STRUCT_POINT [5] *((const byte*) SCREEN#0+(byte) 1) ← (byte) '0'+(const byte) SIZEOF_STRUCT_CIRCLE diff --git a/src/test/ref/sizeof-types.cfg b/src/test/ref/sizeof-types.cfg index 5fb603432..d070f2e01 100644 --- a/src/test/ref/sizeof-types.cfg +++ b/src/test/ref/sizeof-types.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) '0' [5] *((const byte*) SCREEN#0+(byte) 2) ← (byte) '0'+(const byte) SIZEOF_BYTE diff --git a/src/test/ref/sizeof-types.log b/src/test/ref/sizeof-types.log index bc681cdce..32b903d93 100644 --- a/src/test/ref/sizeof-types.log +++ b/src/test/ref/sizeof-types.log @@ -3,6 +3,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::idx#0 ← (number) 0 *((byte*) SCREEN#0 + (byte) main::idx#0) ← (byte) '0'+(const byte) SIZEOF_VOID @@ -365,6 +367,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) '0' [5] *((const byte*) SCREEN#0+(byte) 2) ← (byte) '0'+(const byte) SIZEOF_BYTE diff --git a/src/test/ref/stack-relative-addressing.cfg b/src/test/ref/stack-relative-addressing.cfg index 1c2c68bf9..3d9ce205c 100644 --- a/src/test/ref/stack-relative-addressing.cfg +++ b/src/test/ref/stack-relative-addressing.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { lda#'1' pha lda#'2' pha lda#'3' pha } [5] call peek_stack @@ -17,6 +19,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [7] return to:@return + +(void()) peek_stack() peek_stack: scope:[peek_stack] from main asm { tsx ldaSTACK,x staSCREEN ldaSTACK+1,x staSCREEN+1 ldaSTACK+2,x staSCREEN+2 } to:peek_stack::@return diff --git a/src/test/ref/stack-relative-addressing.log b/src/test/ref/stack-relative-addressing.log index e90ab6e95..88880c212 100644 --- a/src/test/ref/stack-relative-addressing.log +++ b/src/test/ref/stack-relative-addressing.log @@ -3,6 +3,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) STACK#0 ← ((byte*)) (number) $103 to:@1 + +(void()) main() main: scope:[main] from @2 asm { lda#'1' pha lda#'2' pha lda#'3' pha } call peek_stack @@ -16,6 +18,8 @@ main::@return: scope:[main] from main::@1 @1: scope:[] from @begin (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@2 + +(void()) peek_stack() peek_stack: scope:[peek_stack] from main asm { tsx ldaSTACK,x staSCREEN ldaSTACK+1,x staSCREEN+1 ldaSTACK+2,x staSCREEN+2 } to:peek_stack::@return @@ -82,6 +86,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { lda#'1' pha lda#'2' pha lda#'3' pha } [5] call peek_stack @@ -92,6 +98,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [7] return to:@return + +(void()) peek_stack() peek_stack: scope:[peek_stack] from main asm { tsx ldaSTACK,x staSCREEN ldaSTACK+1,x staSCREEN+1 ldaSTACK+2,x staSCREEN+2 } to:peek_stack::@return diff --git a/src/test/ref/statement-sequence-1.cfg b/src/test/ref/statement-sequence-1.cfg index c69957425..08aefb051 100644 --- a/src/test/ref/statement-sequence-1.cfg +++ b/src/test/ref/statement-sequence-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/statement-sequence-1.log b/src/test/ref/statement-sequence-1.log index 147418cbb..011df0192 100644 --- a/src/test/ref/statement-sequence-1.log +++ b/src/test/ref/statement-sequence-1.log @@ -3,6 +3,8 @@ Culled Empty Block (label) main::@4 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -166,6 +168,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/string-const-consolidation-noroot.cfg b/src/test/ref/string-const-consolidation-noroot.cfg index 35b06f1f8..420699abb 100644 --- a/src/test/ref/string-const-consolidation-noroot.cfg +++ b/src/test/ref/string-const-consolidation-noroot.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print @@ -22,6 +24,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [10] return to:@return + +(void()) print((byte*) print::string) print: scope:[print] from main main::@1 main::@2 [11] (byte*) screen#18 ← phi( main/(byte*) 1024 main::@1/(byte*) screen#12 main::@2/(byte*) screen#12 ) to:print::@1 diff --git a/src/test/ref/string-const-consolidation-noroot.log b/src/test/ref/string-const-consolidation-noroot.log index 4aa82f2aa..ce7ba58cb 100644 --- a/src/test/ref/string-const-consolidation-noroot.log +++ b/src/test/ref/string-const-consolidation-noroot.log @@ -9,6 +9,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) screen#0 ← ((byte*)) (number) $400 to:@2 + +(void()) main() main: scope:[main] from @2 (byte*) screen#15 ← phi( @2/(byte*) screen#17 ) (byte[]) main::rex1#0 ← (const string) main::$3 @@ -37,6 +39,8 @@ main::@return: scope:[main] from main::@3 (byte*) screen#4 ← (byte*) screen#11 return to:@return + +(void()) print((byte*) print::string) print: scope:[print] from main main::@1 main::@2 (byte*) screen#18 ← phi( main/(byte*) screen#15 main::@1/(byte*) screen#1 main::@2/(byte*) screen#2 ) (byte*) print::string#6 ← phi( main/(byte*) print::string#0 main::@1/(byte*) print::string#1 main::@2/(byte*) print::string#2 ) @@ -208,6 +212,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print @@ -223,6 +229,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [10] return to:@return + +(void()) print((byte*) print::string) print: scope:[print] from main main::@1 main::@2 [11] (byte*) screen#18 ← phi( main/(byte*) 1024 main::@1/(byte*) screen#12 main::@2/(byte*) screen#12 ) to:print::@1 diff --git a/src/test/ref/string-const-consolidation.cfg b/src/test/ref/string-const-consolidation.cfg index 321c26318..9bba4d224 100644 --- a/src/test/ref/string-const-consolidation.cfg +++ b/src/test/ref/string-const-consolidation.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print @@ -22,6 +24,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [10] return to:@return + +(void()) print((byte*) print::string) print: scope:[print] from main main::@1 main::@2 [11] (byte*) screen#18 ← phi( main/(byte*) 1024 main::@1/(byte*) screen#12 main::@2/(byte*) screen#12 ) to:print::@1 diff --git a/src/test/ref/string-const-consolidation.log b/src/test/ref/string-const-consolidation.log index b17d8fedf..81802fafe 100644 --- a/src/test/ref/string-const-consolidation.log +++ b/src/test/ref/string-const-consolidation.log @@ -10,6 +10,8 @@ CONTROL FLOW GRAPH SSA (byte[]) rex1#0 ← (const string) $0 (byte*) screen#0 ← ((byte*)) (number) $400 to:@2 + +(void()) main() main: scope:[main] from @2 (byte*) screen#15 ← phi( @2/(byte*) screen#17 ) (byte[]) main::rex2#0 ← (const string) main::$3 @@ -37,6 +39,8 @@ main::@return: scope:[main] from main::@3 (byte*) screen#4 ← (byte*) screen#11 return to:@return + +(void()) print((byte*) print::string) print: scope:[print] from main main::@1 main::@2 (byte*) screen#18 ← phi( main/(byte*) screen#15 main::@1/(byte*) screen#1 main::@2/(byte*) screen#2 ) (byte*) print::string#6 ← phi( main/(byte*) print::string#0 main::@1/(byte*) print::string#1 main::@2/(byte*) print::string#2 ) @@ -208,6 +212,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print @@ -223,6 +229,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [10] return to:@return + +(void()) print((byte*) print::string) print: scope:[print] from main main::@1 main::@2 [11] (byte*) screen#18 ← phi( main/(byte*) 1024 main::@1/(byte*) screen#12 main::@2/(byte*) screen#12 ) to:print::@1 diff --git a/src/test/ref/string-encoding-literals.cfg b/src/test/ref/string-encoding-literals.cfg index 4256c783e..5ee5aada7 100644 --- a/src/test/ref/string-encoding-literals.cfg +++ b/src/test/ref/string-encoding-literals.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/string-encoding-literals.log b/src/test/ref/string-encoding-literals.log index 7c1139721..3bc5670e2 100644 --- a/src/test/ref/string-encoding-literals.log +++ b/src/test/ref/string-encoding-literals.log @@ -11,6 +11,8 @@ CONTROL FLOW GRAPH SSA (byte[]) screencode_standard#0 ← (const string) $5 (byte[]) standard#0 ← (const string) $6 to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -186,6 +188,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/string-encoding-pragma.cfg b/src/test/ref/string-encoding-pragma.cfg index 074cdc77f..40e111d7e 100644 --- a/src/test/ref/string-encoding-pragma.cfg +++ b/src/test/ref/string-encoding-pragma.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/string-encoding-pragma.log b/src/test/ref/string-encoding-pragma.log index 306114396..d179cc66f 100644 --- a/src/test/ref/string-encoding-pragma.log +++ b/src/test/ref/string-encoding-pragma.log @@ -10,6 +10,8 @@ CONTROL FLOW GRAPH SSA (byte[]) screencode_upper#0 ← (const string) $4 (byte[]) screencode_mixed3#0 ← (const string) $5 to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -173,6 +175,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/string-escapes-0.cfg b/src/test/ref/string-escapes-0.cfg index b0e0f53e5..5e91fa3a8 100644 --- a/src/test/ref/string-escapes-0.cfg +++ b/src/test/ref/string-escapes-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/string-escapes-0.log b/src/test/ref/string-escapes-0.log index ce668eafb..fdd3fd036 100644 --- a/src/test/ref/string-escapes-0.log +++ b/src/test/ref/string-escapes-0.log @@ -10,6 +10,8 @@ CONTROL FLOW GRAPH SSA (byte[]) MESSAGE#0 ← (const string) $0 (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (number) 0 to:main::@1 @@ -107,6 +109,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/string-escapes-1.cfg b/src/test/ref/string-escapes-1.cfg index 9c705a6dd..34f5af580 100644 --- a/src/test/ref/string-escapes-1.cfg +++ b/src/test/ref/string-escapes-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/string-escapes-1.log b/src/test/ref/string-escapes-1.log index f35577b1c..28c1bd9f3 100644 --- a/src/test/ref/string-escapes-1.log +++ b/src/test/ref/string-escapes-1.log @@ -12,6 +12,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte[]) MESSAGE#0 ← (const string) $0 to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::line#0 ← ((byte*)) (number) $400 (byte*) main::cursor#0 ← (byte*) main::line#0 @@ -171,6 +173,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/string-escapes-2.cfg b/src/test/ref/string-escapes-2.cfg index 4b87c8f7d..4d73efee9 100644 --- a/src/test/ref/string-escapes-2.cfg +++ b/src/test/ref/string-escapes-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -24,6 +26,8 @@ main::@2: scope:[main] from main::@1 main::@3: scope:[main] from main::@2 [10] (byte) main::i#1 ← ++ (byte) main::i#2 to:main::@1 + +(void()) chrout((byte) chrout::c) chrout: scope:[chrout] from main::@2 [11] *((const byte*) memA#0) ← (byte) chrout::c#0 asm { ldamemA jsr$ffd2 } diff --git a/src/test/ref/string-escapes-2.log b/src/test/ref/string-escapes-2.log index 2f6821c48..85f111edb 100644 --- a/src/test/ref/string-escapes-2.log +++ b/src/test/ref/string-escapes-2.log @@ -10,6 +10,8 @@ CONTROL FLOW GRAPH SSA (byte[]) MESSAGE#0 ← (const string) $0 (byte*) memA#0 ← ((byte*)) (number) $ff to:@2 + +(void()) main() main: scope:[main] from @2 (byte) main::i#0 ← (number) 0 to:main::@1 @@ -30,6 +32,8 @@ main::@7: scope:[main] from main::@2 main::@return: scope:[main] from main::@1 return to:@return + +(void()) chrout((byte) chrout::c) chrout: scope:[chrout] from main::@2 (byte) chrout::c#1 ← phi( main::@2/(byte) chrout::c#0 ) *((byte*) memA#0) ← (byte) chrout::c#1 @@ -131,6 +135,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -148,6 +154,8 @@ main::@2: scope:[main] from main::@1 main::@3: scope:[main] from main::@2 [10] (byte) main::i#1 ← ++ (byte) main::i#2 to:main::@1 + +(void()) chrout((byte) chrout::c) chrout: scope:[chrout] from main::@2 [11] *((const byte*) memA#0) ← (byte) chrout::c#0 asm { ldamemA jsr$ffd2 } diff --git a/src/test/ref/string-escapes-3.cfg b/src/test/ref/string-escapes-3.cfg index 0dcc33cb4..b4a7d3fe9 100644 --- a/src/test/ref/string-escapes-3.cfg +++ b/src/test/ref/string-escapes-3.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/string-escapes-3.log b/src/test/ref/string-escapes-3.log index 20240c963..f2f7e7db7 100644 --- a/src/test/ref/string-escapes-3.log +++ b/src/test/ref/string-escapes-3.log @@ -12,6 +12,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte[]) MESSAGE#0 ← (const string) $0 to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::line#0 ← ((byte*)) (number) $400 (byte*) main::cursor#0 ← (byte*) main::line#0 @@ -178,6 +180,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/string-pointer-problem.cfg b/src/test/ref/string-pointer-problem.cfg index 565e5fafe..c4aaaadbf 100644 --- a/src/test/ref/string-pointer-problem.cfg +++ b/src/test/ref/string-pointer-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call set_process_name @@ -14,6 +16,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [6] return to:@return + +(void()) set_process_name((byte*) set_process_name::name) set_process_name: scope:[set_process_name] from main [7] phi() to:set_process_name::@1 diff --git a/src/test/ref/string-pointer-problem.log b/src/test/ref/string-pointer-problem.log index eb77213d3..d79f1b03d 100644 --- a/src/test/ref/string-pointer-problem.log +++ b/src/test/ref/string-pointer-problem.log @@ -7,6 +7,8 @@ Culled Empty Block (label) set_process_name::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @2 (byte*) set_process_name::name#0 ← (const string) main::name call set_process_name @@ -19,6 +21,8 @@ main::@return: scope:[main] from main::@1 @1: scope:[] from @begin (byte*) process_name#0 ← ((byte*)) (number) $400 to:@2 + +(void()) set_process_name((byte*) set_process_name::name) set_process_name: scope:[set_process_name] from main (byte*) set_process_name::name#3 ← phi( main/(byte*) set_process_name::name#0 ) (signed word) set_process_name::j#0 ← (number) 0 @@ -140,6 +144,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call set_process_name @@ -147,6 +153,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [6] return to:@return + +(void()) set_process_name((byte*) set_process_name::name) set_process_name: scope:[set_process_name] from main [7] phi() to:set_process_name::@1 diff --git a/src/test/ref/strip.cfg b/src/test/ref/strip.cfg index 361dcc0b4..ece2a33ec 100644 --- a/src/test/ref/strip.cfg +++ b/src/test/ref/strip.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call strip @@ -26,6 +28,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [12] return to:@return + +(void()) print((byte*) print::msg) print: scope:[print] from main::@1 main::@3 [13] (byte*) screen#15 ← phi( main::@1/(byte*) 1024 main::@3/(byte*) screen#11 ) [13] (byte*) print::msg#4 ← phi( main::@1/(const byte[]) msg1#0 main::@3/(const byte[]) msg2#0 ) @@ -41,6 +45,8 @@ print::@1: scope:[print] from print print::@1 print::@return: scope:[print] from print::@1 [19] return to:@return + +(void()) strip((byte*) strip::p , (byte) strip::c) strip: scope:[strip] from main main::@2 [20] (byte) strip::c#3 ← phi( main/(byte) ' ' main::@2/(byte) 'y' ) [20] (byte*) strip::dest#0 ← phi( main/(const byte[]) msg1#0 main::@2/(const byte[]) msg2#0 ) diff --git a/src/test/ref/strip.log b/src/test/ref/strip.log index c136f48fc..ee46ad830 100644 --- a/src/test/ref/strip.log +++ b/src/test/ref/strip.log @@ -7,6 +7,8 @@ CONTROL FLOW GRAPH SSA (byte[]) msg1#0 ← (const string) $0 (byte[]) msg2#0 ← (const string) $1 to:@2 + +(void()) main() main: scope:[main] from @3 (byte*) screen#17 ← phi( @3/(byte*) screen#16 ) (byte*) strip::p#0 ← (byte[]) msg1#0 @@ -39,6 +41,8 @@ main::@return: scope:[main] from main::@4 (byte*) screen#2 ← (byte*) screen#9 return to:@return + +(void()) strip((byte*) strip::p , (byte) strip::c) strip: scope:[strip] from main main::@2 (byte) strip::c#3 ← phi( main/(byte) strip::c#0 main::@2/(byte) strip::c#1 ) (byte*) strip::p#3 ← phi( main/(byte*) strip::p#0 main::@2/(byte*) strip::p#1 ) @@ -73,6 +77,8 @@ strip::@return: scope:[strip] from strip::@2 @2: scope:[] from @begin (byte*) screen#3 ← ((byte*)) (number) $400 to:@3 + +(void()) print((byte*) print::msg) print: scope:[print] from main::@1 main::@3 (byte*) screen#15 ← phi( main::@1/(byte*) screen#13 main::@3/(byte*) screen#14 ) (byte*) print::msg#4 ← phi( main::@1/(byte*) print::msg#0 main::@3/(byte*) print::msg#1 ) @@ -298,6 +304,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call strip @@ -317,6 +325,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [12] return to:@return + +(void()) print((byte*) print::msg) print: scope:[print] from main::@1 main::@3 [13] (byte*) screen#15 ← phi( main::@1/(byte*) 1024 main::@3/(byte*) screen#11 ) [13] (byte*) print::msg#4 ← phi( main::@1/(const byte[]) msg1#0 main::@3/(const byte[]) msg2#0 ) @@ -332,6 +342,8 @@ print::@1: scope:[print] from print print::@1 print::@return: scope:[print] from print::@1 [19] return to:@return + +(void()) strip((byte*) strip::p , (byte) strip::c) strip: scope:[strip] from main main::@2 [20] (byte) strip::c#3 ← phi( main/(byte) ' ' main::@2/(byte) 'y' ) [20] (byte*) strip::dest#0 ← phi( main/(const byte[]) msg1#0 main::@2/(const byte[]) msg2#0 ) diff --git a/src/test/ref/struct-0.cfg b/src/test/ref/struct-0.cfg index 04634cd53..d933d7d89 100644 --- a/src/test/ref/struct-0.cfg +++ b/src/test/ref/struct-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) point_x#1 [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) point_y#1 diff --git a/src/test/ref/struct-0.log b/src/test/ref/struct-0.log index 9429fd52b..46f320bcb 100644 --- a/src/test/ref/struct-0.log +++ b/src/test/ref/struct-0.log @@ -13,6 +13,8 @@ CONTROL FLOW GRAPH SSA (byte) point_x#0 ← (byte) 0 (byte) point_y#0 ← (byte) 0 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) point_x#1 ← (number) 2 (byte) point_y#1 ← (number) 3 @@ -135,6 +137,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) point_x#1 [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) point_y#1 diff --git a/src/test/ref/struct-1.cfg b/src/test/ref/struct-1.cfg index d16c31a29..7f4563282 100644 --- a/src/test/ref/struct-1.cfg +++ b/src/test/ref/struct-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) point1_y#1 [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) point1_x#1 diff --git a/src/test/ref/struct-1.log b/src/test/ref/struct-1.log index 503a8a95c..1fa0cd882 100644 --- a/src/test/ref/struct-1.log +++ b/src/test/ref/struct-1.log @@ -24,6 +24,8 @@ CONTROL FLOW GRAPH SSA (byte) point2_x#0 ← (byte) 0 (byte) point2_y#0 ← (byte) 0 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) point1_x#1 ← (number) 2 (byte) point1_y#1 ← (number) 3 @@ -184,6 +186,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) point1_y#1 [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) point1_x#1 diff --git a/src/test/ref/struct-10.cfg b/src/test/ref/struct-10.cfg index 24ddf1201..f25f59aa4 100644 --- a/src/test/ref/struct-10.cfg +++ b/src/test/ref/struct-10.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const word*) main::SCREEN#0) ← *((const word[]) RADIX_DECIMAL_VALUES#0+(byte) 1*(const byte) SIZEOF_WORD) [5] *((const word*) main::SCREEN#0+(byte) 1*(const byte) SIZEOF_WORD) ← *((const word[]) RADIX_DECIMAL_VALUES#0+(byte) 1*(const byte) SIZEOF_WORD) diff --git a/src/test/ref/struct-10.log b/src/test/ref/struct-10.log index d1380c4c8..c8942a30a 100644 --- a/src/test/ref/struct-10.log +++ b/src/test/ref/struct-10.log @@ -11,6 +11,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (word[]) RADIX_DECIMAL_VALUES#0 ← { (number) $2710, (number) $3e8, (number) $64, (number) $a } to:@1 + +(void()) main() main: scope:[main] from @1 (word*) main::SCREEN#0 ← ((word*)) (number) $400 (word*) main::info_values#0 ← (word[]) RADIX_DECIMAL_VALUES#0 @@ -128,6 +130,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const word*) main::SCREEN#0) ← *((const word[]) RADIX_DECIMAL_VALUES#0+(byte) 1*(const byte) SIZEOF_WORD) [5] *((const word*) main::SCREEN#0+(byte) 1*(const byte) SIZEOF_WORD) ← *((const word[]) RADIX_DECIMAL_VALUES#0+(byte) 1*(const byte) SIZEOF_WORD) diff --git a/src/test/ref/struct-11.cfg b/src/test/ref/struct-11.cfg index df46312bb..eb147eb60 100644 --- a/src/test/ref/struct-11.cfg +++ b/src/test/ref/struct-11.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_person @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print_person((dword) print_person::person_id , (byte[3]) print_person::person_initials) print_person: scope:[print_person] from main main::@1 [9] (byte*) print_line_cursor#20 ← phi( main/(byte*) 1024 main::@1/(byte*) print_line_cursor#1 ) [9] (byte[3]) print_person::person_initials#2 ← phi( main/(const byte[3]) jesper_initials#0 main::@1/(const byte[3]) henry_initials#0 ) @@ -41,6 +45,8 @@ print_person::@3: scope:[print_person] from print_person::@2 print_person::@return: scope:[print_person] from print_person::@3 [18] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from print_person::@3 [19] phi() to:print_ln::@1 @@ -52,6 +58,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [23] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from print_dword_decimal::@1 print_person::@2 [24] (byte*) print_char_cursor#41 ← phi( print_dword_decimal::@1/(byte*) print_char_cursor#39 print_person::@2/(byte*) print_char_cursor#25 ) [24] (byte*) print_str::str#5 ← phi( print_dword_decimal::@1/(const byte[$b]) decimal_digits_long#0 print_person::@2/(byte*) print_str::str#2 ) @@ -69,6 +77,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [29] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#18 [30] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#3 to:print_str::@1 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_person::@1 [31] *((byte*) print_char_cursor#18) ← (const byte) print_char::ch#0 [32] (byte*) print_char_cursor#25 ← ++ (byte*) print_char_cursor#18 @@ -76,6 +86,8 @@ print_char: scope:[print_char] from print_person::@1 print_char::@return: scope:[print_char] from print_char [33] return to:@return + +(void()) print_dword_decimal((dword) print_dword_decimal::w) print_dword_decimal: scope:[print_dword_decimal] from print_person [34] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 [35] call ultoa @@ -87,6 +99,8 @@ print_dword_decimal::@1: scope:[print_dword_decimal] from print_dword_decimal print_dword_decimal::@return: scope:[print_dword_decimal] from print_dword_decimal::@1 [38] return to:@return + +(void()) ultoa((dword) ultoa::value , (byte*) ultoa::buffer , (byte) ultoa::radix) ultoa: scope:[ultoa] from print_dword_decimal [39] phi() to:ultoa::@1 @@ -131,6 +145,8 @@ ultoa::@6: scope:[ultoa] from ultoa::@5 [58] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 [59] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#11 to:ultoa::@4 + +(dword()) ultoa_append((byte*) ultoa_append::buffer , (dword) ultoa_append::value , (dword) ultoa_append::sub) ultoa_append: scope:[ultoa_append] from ultoa::@5 [60] phi() to:ultoa_append::@1 diff --git a/src/test/ref/struct-11.log b/src/test/ref/struct-11.log index 9e0bf7d61..aa9dd3e9e 100644 --- a/src/test/ref/struct-11.log +++ b/src/test/ref/struct-11.log @@ -99,6 +99,8 @@ CONTROL FLOW GRAPH SSA (dword[]) RADIX_DECIMAL_VALUES_LONG#0 ← { (number) $3b9aca00, (number) $5f5e100, (number) $989680, (number) $f4240, (number) $186a0, (number) $2710, (number) $3e8, (number) $64, (number) $a } (dword[]) RADIX_HEXADECIMAL_VALUES_LONG#0 ← { (number) $10000000, (number) $1000000, (number) $100000, (number) $10000, (number) $1000, (number) $100, (number) $10 } to:@12 + +(void()) ultoa((dword) ultoa::value , (byte*) ultoa::buffer , (byte) ultoa::radix) ultoa: scope:[ultoa] from print_dword_decimal (byte*) ultoa::buffer#21 ← phi( print_dword_decimal/(byte*) ultoa::buffer#5 ) (dword) ultoa::value#12 ← phi( print_dword_decimal/(dword) ultoa::value#1 ) @@ -240,6 +242,8 @@ ultoa::@26: scope:[ultoa] from ultoa::@24 (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#9 (byte) ultoa::started#1 ← (number) 1 to:ultoa::@21 + +(dword()) ultoa_append((byte*) ultoa_append::buffer , (dword) ultoa_append::value , (dword) ultoa_append::sub) ultoa_append: scope:[ultoa_append] from ultoa::@24 (byte*) ultoa_append::buffer#3 ← phi( ultoa::@24/(byte*) ultoa_append::buffer#0 ) (dword) ultoa_append::sub#3 ← phi( ultoa::@24/(dword) ultoa_append::sub#0 ) @@ -279,6 +283,8 @@ ultoa_append::@return: scope:[ultoa_append] from ultoa_append::@3 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@26 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from print_dword_decimal::@1 print_person::@2 (byte*) print_char_cursor#41 ← phi( print_dword_decimal::@1/(byte*) print_char_cursor#37 print_person::@2/(byte*) print_char_cursor#13 ) (byte*) print_str::str#5 ← phi( print_dword_decimal::@1/(byte*) print_str::str#1 print_person::@2/(byte*) print_str::str#2 ) @@ -301,6 +307,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#19 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from print_person::@3 (byte*) print_char_cursor#36 ← phi( print_person::@3/(byte*) print_char_cursor#14 ) (byte*) print_line_cursor#18 ← phi( print_person::@3/(byte*) print_line_cursor#20 ) @@ -329,6 +337,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_char_cursor#44 ← phi( @12/(byte*) print_char_cursor#0 ) (byte[$b]) decimal_digits_long#0 ← { fill( $b, 0) } to:@36 + +(void()) print_dword_decimal((dword) print_dword_decimal::w) print_dword_decimal: scope:[print_dword_decimal] from print_person (byte*) print_char_cursor#42 ← phi( print_person/(byte*) print_char_cursor#39 ) (dword) print_dword_decimal::w#1 ← phi( print_person/(dword) print_dword_decimal::w#0 ) @@ -351,6 +361,8 @@ print_dword_decimal::@return: scope:[print_dword_decimal] from print_dword_deci (byte*) print_char_cursor#6 ← (byte*) print_char_cursor#23 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_person::@1 (byte*) print_char_cursor#24 ← phi( print_person::@1/(byte*) print_char_cursor#12 ) (byte) print_char::ch#1 ← phi( print_person::@1/(byte) print_char::ch#0 ) @@ -370,6 +382,8 @@ print_char::@return: scope:[print_char] from print_char (dword) henry_id#0 ← (number) $4466d (byte[3]) henry_initials#0 ← (const string) $2 to:@38 + +(void()) main() main: scope:[main] from @38 (byte*) print_line_cursor#19 ← phi( @38/(byte*) print_line_cursor#21 ) (byte*) print_char_cursor#38 ← phi( @38/(byte*) print_char_cursor#40 ) @@ -399,6 +413,8 @@ main::@return: scope:[main] from main::@2 (byte*) print_line_cursor#5 ← (byte*) print_line_cursor#14 return to:@return + +(void()) print_person((dword) print_person::person_id , (byte[3]) print_person::person_initials) print_person: scope:[print_person] from main main::@1 (byte*) print_line_cursor#26 ← phi( main/(byte*) print_line_cursor#19 main::@1/(byte*) print_line_cursor#3 ) (byte[3]) print_person::person_initials#4 ← phi( main/(byte[3]) print_person::person_initials#0 main::@1/(byte[3]) print_person::person_initials#1 ) @@ -1223,6 +1239,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_person @@ -1234,6 +1252,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print_person((dword) print_person::person_id , (byte[3]) print_person::person_initials) print_person: scope:[print_person] from main main::@1 [9] (byte*) print_line_cursor#20 ← phi( main/(byte*) 1024 main::@1/(byte*) print_line_cursor#1 ) [9] (byte[3]) print_person::person_initials#2 ← phi( main/(const byte[3]) jesper_initials#0 main::@1/(const byte[3]) henry_initials#0 ) @@ -1257,6 +1277,8 @@ print_person::@3: scope:[print_person] from print_person::@2 print_person::@return: scope:[print_person] from print_person::@3 [18] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from print_person::@3 [19] phi() to:print_ln::@1 @@ -1268,6 +1290,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [23] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from print_dword_decimal::@1 print_person::@2 [24] (byte*) print_char_cursor#41 ← phi( print_dword_decimal::@1/(byte*) print_char_cursor#39 print_person::@2/(byte*) print_char_cursor#25 ) [24] (byte*) print_str::str#5 ← phi( print_dword_decimal::@1/(const byte[$b]) decimal_digits_long#0 print_person::@2/(byte*) print_str::str#2 ) @@ -1285,6 +1309,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [29] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#18 [30] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#3 to:print_str::@1 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_person::@1 [31] *((byte*) print_char_cursor#18) ← (const byte) print_char::ch#0 [32] (byte*) print_char_cursor#25 ← ++ (byte*) print_char_cursor#18 @@ -1292,6 +1318,8 @@ print_char: scope:[print_char] from print_person::@1 print_char::@return: scope:[print_char] from print_char [33] return to:@return + +(void()) print_dword_decimal((dword) print_dword_decimal::w) print_dword_decimal: scope:[print_dword_decimal] from print_person [34] (dword) ultoa::value#1 ← (dword) print_dword_decimal::w#0 [35] call ultoa @@ -1303,6 +1331,8 @@ print_dword_decimal::@1: scope:[print_dword_decimal] from print_dword_decimal print_dword_decimal::@return: scope:[print_dword_decimal] from print_dword_decimal::@1 [38] return to:@return + +(void()) ultoa((dword) ultoa::value , (byte*) ultoa::buffer , (byte) ultoa::radix) ultoa: scope:[ultoa] from print_dword_decimal [39] phi() to:ultoa::@1 @@ -1347,6 +1377,8 @@ ultoa::@6: scope:[ultoa] from ultoa::@5 [58] (dword) ultoa::value#0 ← (dword) ultoa_append::return#0 [59] (byte*) ultoa::buffer#4 ← ++ (byte*) ultoa::buffer#11 to:ultoa::@4 + +(dword()) ultoa_append((byte*) ultoa_append::buffer , (dword) ultoa_append::value , (dword) ultoa_append::sub) ultoa_append: scope:[ultoa_append] from ultoa::@5 [60] phi() to:ultoa_append::@1 diff --git a/src/test/ref/struct-12.cfg b/src/test/ref/struct-12.cfg index b30cf24a8..282d5391f 100644 --- a/src/test/ref/struct-12.cfg +++ b/src/test/ref/struct-12.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_person @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print_person((byte) print_person::person_id , (byte[$40]) print_person::person_name) print_person: scope:[print_person] from main main::@1 [9] (byte[$40]) print_person::person_name#4 ← phi( main/(const byte[$40]) main::jesper_name#1 main::@1/(const byte[$40]) main::henriette_name#1 ) [9] (byte) idx#13 ← phi( main/(byte) 0 main::@1/(byte) idx#16 ) diff --git a/src/test/ref/struct-12.log b/src/test/ref/struct-12.log index f34432fe0..a71210522 100644 --- a/src/test/ref/struct-12.log +++ b/src/test/ref/struct-12.log @@ -32,6 +32,8 @@ Culled Empty Block (label) print_person::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @2 (byte) idx#18 ← phi( @2/(byte) idx#20 ) (byte) main::jesper_id#0 ← (byte) 0 @@ -67,6 +69,8 @@ main::@return: scope:[main] from main::@2 (byte) idx#3 ← (number) 0 (byte[]) DIGIT#0 ← (const string) $0 to:@2 + +(void()) print_person((byte) print_person::person_id , (byte[$40]) print_person::person_name) print_person: scope:[print_person] from main main::@1 (byte[$40]) print_person::person_name#4 ← phi( main/(byte[$40]) print_person::person_name#0 main::@1/(byte[$40]) print_person::person_name#1 ) (byte) idx#13 ← phi( main/(byte) idx#18 main::@1/(byte) idx#0 ) @@ -309,6 +313,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_person @@ -320,6 +326,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print_person((byte) print_person::person_id , (byte[$40]) print_person::person_name) print_person: scope:[print_person] from main main::@1 [9] (byte[$40]) print_person::person_name#4 ← phi( main/(const byte[$40]) main::jesper_name#1 main::@1/(const byte[$40]) main::henriette_name#1 ) [9] (byte) idx#13 ← phi( main/(byte) 0 main::@1/(byte) idx#16 ) diff --git a/src/test/ref/struct-2.cfg b/src/test/ref/struct-2.cfg index 4ea32347d..dd68c6ccf 100644 --- a/src/test/ref/struct-2.cfg +++ b/src/test/ref/struct-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) point1_x#1 [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) point1_y#1 diff --git a/src/test/ref/struct-2.log b/src/test/ref/struct-2.log index 8bfaa613c..5b13bfab3 100644 --- a/src/test/ref/struct-2.log +++ b/src/test/ref/struct-2.log @@ -25,6 +25,8 @@ CONTROL FLOW GRAPH SSA (byte) point2_x#0 ← (byte) 0 (byte) point2_y#0 ← (byte) 0 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) point1_x#1 ← (number) 2 (byte) point1_y#1 ← (number) 3 @@ -203,6 +205,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) point1_x#1 [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) point1_y#1 diff --git a/src/test/ref/struct-3.cfg b/src/test/ref/struct-3.cfg index 7ec77e170..a0ca0c94e 100644 --- a/src/test/ref/struct-3.cfg +++ b/src/test/ref/struct-3.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print((byte) print::p_x , (byte) print::p_y) print: scope:[print] from main main::@1 [9] (byte) idx#11 ← phi( main/(byte) 0 main::@1/(byte) idx#12 ) [9] (byte) print::p_x#2 ← phi( main/(byte) 1 main::@1/(byte) 2 ) diff --git a/src/test/ref/struct-3.log b/src/test/ref/struct-3.log index 31216ec73..1a390ed5a 100644 --- a/src/test/ref/struct-3.log +++ b/src/test/ref/struct-3.log @@ -18,6 +18,8 @@ Replacing struct member reference (struct Point) print::p.y with member unwindin CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @2 (byte) idx#14 ← phi( @2/(byte) idx#15 ) (byte) main::p1_x#0 ← (byte) 0 @@ -50,6 +52,8 @@ main::@return: scope:[main] from main::@2 (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte) idx#3 ← (number) 0 to:@2 + +(void()) print((byte) print::p_x , (byte) print::p_y) print: scope:[print] from main main::@1 (byte) print::p_y#2 ← phi( main/(byte) print::p_y#0 main::@1/(byte) print::p_y#1 ) (byte) idx#11 ← phi( main/(byte) idx#14 main::@1/(byte) idx#0 ) @@ -226,6 +230,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print @@ -237,6 +243,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print((byte) print::p_x , (byte) print::p_y) print: scope:[print] from main main::@1 [9] (byte) idx#11 ← phi( main/(byte) 0 main::@1/(byte) idx#12 ) [9] (byte) print::p_x#2 ← phi( main/(byte) 1 main::@1/(byte) 2 ) diff --git a/src/test/ref/struct-4.cfg b/src/test/ref/struct-4.cfg index b88b3292a..dea09c0aa 100644 --- a/src/test/ref/struct-4.cfg +++ b/src/test/ref/struct-4.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::x#0 [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::p_y#0 diff --git a/src/test/ref/struct-4.log b/src/test/ref/struct-4.log index 3aaa3736f..1b50fa47b 100644 --- a/src/test/ref/struct-4.log +++ b/src/test/ref/struct-4.log @@ -11,6 +11,8 @@ Identified constant variable (byte) main::y CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::x#0 ← (number) 2 (byte) main::y#0 ← (number) 3 @@ -116,6 +118,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::x#0 [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::p_y#0 diff --git a/src/test/ref/struct-5.cfg b/src/test/ref/struct-5.cfg index d05eee137..becbe6006 100644 --- a/src/test/ref/struct-5.cfg +++ b/src/test/ref/struct-5.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call point @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(struct Point()) point() point: scope:[point] from main [9] phi() to:point::@return diff --git a/src/test/ref/struct-5.log b/src/test/ref/struct-5.log index 16a2fa686..d48b07ec6 100644 --- a/src/test/ref/struct-5.log +++ b/src/test/ref/struct-5.log @@ -36,6 +36,8 @@ Adding versioned struct unwinding for (struct Point) point::return#1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @2 (byte) main::q_x#0 ← (byte) 0 (byte) main::q_y#0 ← (byte) 0 @@ -57,6 +59,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 return to:@return + +(struct Point()) point() point: scope:[point] from main (byte) point::p_x#0 ← (number) 2 (byte) point::p_y#0 ← (number) 3 @@ -205,6 +209,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call point @@ -216,6 +222,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(struct Point()) point() point: scope:[point] from main [9] phi() to:point::@return diff --git a/src/test/ref/struct-6.cfg b/src/test/ref/struct-6.cfg index b55b9d0df..19f6b5082 100644 --- a/src/test/ref/struct-6.cfg +++ b/src/test/ref/struct-6.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::p_x#0 [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::p_y#0 diff --git a/src/test/ref/struct-6.log b/src/test/ref/struct-6.log index 2f9d6b89d..fb94360a1 100644 --- a/src/test/ref/struct-6.log +++ b/src/test/ref/struct-6.log @@ -25,6 +25,8 @@ Identified constant variable (byte) main::c_radius CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::p_x#0 ← (number) $a (byte) main::p_y#0 ← (number) $a @@ -134,6 +136,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::p_x#0 [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::p_y#0 diff --git a/src/test/ref/struct-7.cfg b/src/test/ref/struct-7.cfg index bb02bb150..37fb1795e 100644 --- a/src/test/ref/struct-7.cfg +++ b/src/test/ref/struct-7.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::t_c1_center_x#0 [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::t_c1_center_y#0 diff --git a/src/test/ref/struct-7.log b/src/test/ref/struct-7.log index 0a2c7371a..12a9cb2f4 100644 --- a/src/test/ref/struct-7.log +++ b/src/test/ref/struct-7.log @@ -49,6 +49,8 @@ Identified constant variable (byte) main::t_c2_center_y CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::t_c1_center_x#0 ← (number) 1 (byte) main::t_c1_center_y#0 ← (number) 2 @@ -190,6 +192,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::t_c1_center_x#0 [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::t_c1_center_y#0 diff --git a/src/test/ref/struct-8.cfg b/src/test/ref/struct-8.cfg index adea9bce0..ee057fb50 100644 --- a/src/test/ref/struct-8.cfg +++ b/src/test/ref/struct-8.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::p_x#0 [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::p_y#0 diff --git a/src/test/ref/struct-8.log b/src/test/ref/struct-8.log index 8ed53cdfe..af9cb3cc7 100644 --- a/src/test/ref/struct-8.log +++ b/src/test/ref/struct-8.log @@ -29,6 +29,8 @@ Identified constant variable (byte) main::c_radius CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::p_x#0 ← (number) $a (byte) main::p_y#0 ← (number) $a @@ -144,6 +146,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::p_x#0 [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::p_y#0 diff --git a/src/test/ref/struct-9.cfg b/src/test/ref/struct-9.cfg index 0bb74e299..5c8d09168 100644 --- a/src/test/ref/struct-9.cfg +++ b/src/test/ref/struct-9.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::p_x#0 [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::p_y#0 diff --git a/src/test/ref/struct-9.log b/src/test/ref/struct-9.log index 8f01af36e..d884824e1 100644 --- a/src/test/ref/struct-9.log +++ b/src/test/ref/struct-9.log @@ -28,6 +28,8 @@ Identified constant variable (byte) main::p_y CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::p_x#0 ← (number) $a (byte) main::p_y#0 ← (number) $a @@ -150,6 +152,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::p_x#0 [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) main::p_y#0 diff --git a/src/test/ref/struct-pos-fill.cfg b/src/test/ref/struct-pos-fill.cfg index 0146185ce..5e512705c 100644 --- a/src/test/ref/struct-pos-fill.cfg +++ b/src/test/ref/struct-pos-fill.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/struct-pos-fill.log b/src/test/ref/struct-pos-fill.log index c8b07f24b..9c9f77e13 100644 --- a/src/test/ref/struct-pos-fill.log +++ b/src/test/ref/struct-pos-fill.log @@ -24,6 +24,8 @@ CONTROL FLOW GRAPH SSA (byte) x#0 ← (byte) 0 (byte) y#0 ← (byte) 0 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) y#11 ← phi( @1/(byte) y#10 ) (byte) idx#10 ← phi( @1/(byte) idx#9 ) @@ -368,6 +370,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/struct-ptr-0.cfg b/src/test/ref/struct-ptr-0.cfg index 65047b6d9..583cc3406 100644 --- a/src/test/ref/struct-ptr-0.cfg +++ b/src/test/ref/struct-ptr-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/struct-ptr-0.log b/src/test/ref/struct-ptr-0.log index 1cdf959d8..0251492ee 100644 --- a/src/test/ref/struct-ptr-0.log +++ b/src/test/ref/struct-ptr-0.log @@ -12,6 +12,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (struct Point[4]) points#0 ← { fill( 4, 0) } to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -208,6 +210,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/struct-ptr-1.cfg b/src/test/ref/struct-ptr-1.cfg index f4dc21802..def0039b7 100644 --- a/src/test/ref/struct-ptr-1.cfg +++ b/src/test/ref/struct-ptr-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/struct-ptr-1.log b/src/test/ref/struct-ptr-1.log index 455adeec6..8be002f5c 100644 --- a/src/test/ref/struct-ptr-1.log +++ b/src/test/ref/struct-ptr-1.log @@ -7,6 +7,8 @@ CONTROL FLOW GRAPH SSA (byte) OFFS_X#0 ← (number) 0 (byte) OFFS_Y#0 ← (number) 1 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -258,6 +260,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/struct-ptr-10.cfg b/src/test/ref/struct-ptr-10.cfg index 6814b5fdd..5294e337a 100644 --- a/src/test/ref/struct-ptr-10.cfg +++ b/src/test/ref/struct-ptr-10.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/struct-ptr-10.log b/src/test/ref/struct-ptr-10.log index e216d24ac..a3bfea6d4 100644 --- a/src/test/ref/struct-ptr-10.log +++ b/src/test/ref/struct-ptr-10.log @@ -11,6 +11,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (struct Point[$1f4]) points#0 ← { fill( $1f4, 0) } to:@1 + +(void()) main() main: scope:[main] from @1 (word) main::i#0 ← (word) 0 to:main::@1 @@ -208,6 +210,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/struct-ptr-11.cfg b/src/test/ref/struct-ptr-11.cfg index f82e44c47..cf18fb50b 100644 --- a/src/test/ref/struct-ptr-11.cfg +++ b/src/test/ref/struct-ptr-11.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/struct-ptr-11.log b/src/test/ref/struct-ptr-11.log index df71e1e42..6765c9154 100644 --- a/src/test/ref/struct-ptr-11.log +++ b/src/test/ref/struct-ptr-11.log @@ -13,6 +13,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (struct Point[4]) points#0 ← { fill( 4, 0) } to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -233,6 +235,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/struct-ptr-12-ref.cfg b/src/test/ref/struct-ptr-12-ref.cfg index 7e34ccdf4..9a22635b6 100644 --- a/src/test/ref/struct-ptr-12-ref.cfg +++ b/src/test/ref/struct-ptr-12-ref.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (word) main::p#0 ← (byte) 2*(word) $100+(byte) 3 [5] (byte~) main::$1 ← < *((const word*) main::q#0) diff --git a/src/test/ref/struct-ptr-12-ref.log b/src/test/ref/struct-ptr-12-ref.log index b8bf1c934..0ca4215f9 100644 --- a/src/test/ref/struct-ptr-12-ref.log +++ b/src/test/ref/struct-ptr-12-ref.log @@ -3,6 +3,8 @@ Setting inferred volatile on symbol affected by address-of (word*~) main::$0 ← CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (word) main::p#0 ← ((word)) { (number) 2, (number) 3 } (word*~) main::$0 ← & (word) main::p#0 @@ -111,6 +113,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (word) main::p#0 ← (byte) 2*(word) $100+(byte) 3 [5] (byte~) main::$1 ← < *((const word*) main::q#0) diff --git a/src/test/ref/struct-ptr-12.cfg b/src/test/ref/struct-ptr-12.cfg index a6942fa86..734d8b1f9 100644 --- a/src/test/ref/struct-ptr-12.cfg +++ b/src/test/ref/struct-ptr-12.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::p_x#0 ← (byte) 2 [5] (byte) main::p_y#0 ← (byte) 3 diff --git a/src/test/ref/struct-ptr-12.log b/src/test/ref/struct-ptr-12.log index 97764ccc3..08f6cf7bf 100644 --- a/src/test/ref/struct-ptr-12.log +++ b/src/test/ref/struct-ptr-12.log @@ -11,6 +11,8 @@ Adding versioned struct unwinding for (struct Point) main::p#0 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::p_x#0 ← (number) 2 (byte) main::p_y#0 ← (number) 3 @@ -129,6 +131,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::p_x#0 ← (byte) 2 [5] (byte) main::p_y#0 ← (byte) 3 diff --git a/src/test/ref/struct-ptr-13.cfg b/src/test/ref/struct-ptr-13.cfg index 5a2bdf127..24b9315f2 100644 --- a/src/test/ref/struct-ptr-13.cfg +++ b/src/test/ref/struct-ptr-13.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((byte*)(const struct Point*) points#0) ← *((byte*)(const struct Point*) points#0) + (byte) 5 [5] *((byte*)(const struct Point*) points#0+(const byte) OFFSET_STRUCT_POINT_Y) ← *((byte*)(const struct Point*) points#0+(const byte) OFFSET_STRUCT_POINT_Y) + (byte) 5 diff --git a/src/test/ref/struct-ptr-13.log b/src/test/ref/struct-ptr-13.log index e97fdb17b..a5e706e01 100644 --- a/src/test/ref/struct-ptr-13.log +++ b/src/test/ref/struct-ptr-13.log @@ -10,6 +10,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (struct Point*) points#0 ← ((struct Point*)) (number) $1000 to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::$0 ← (byte*)(struct Point*) points#0 + (const byte) OFFSET_STRUCT_POINT_X (byte*) main::$1 ← (byte*)(struct Point*) points#0 + (const byte) OFFSET_STRUCT_POINT_X @@ -137,6 +139,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((byte*)(const struct Point*) points#0) ← *((byte*)(const struct Point*) points#0) + (byte) 5 [5] *((byte*)(const struct Point*) points#0+(const byte) OFFSET_STRUCT_POINT_Y) ← *((byte*)(const struct Point*) points#0+(const byte) OFFSET_STRUCT_POINT_Y) + (byte) 5 diff --git a/src/test/ref/struct-ptr-14.cfg b/src/test/ref/struct-ptr-14.cfg index 7a3301bf6..078f303eb 100644 --- a/src/test/ref/struct-ptr-14.cfg +++ b/src/test/ref/struct-ptr-14.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::p_x#0 ← (byte) 2 [5] (byte) main::p_y#0 ← (byte) 3 @@ -19,6 +21,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [9] return to:@return + +(void()) set((struct Point*) set::ptr) set: scope:[set] from main [10] *((byte*)(const struct Point*) main::q#0) ← (byte) 4 [11] *((byte*)(const struct Point*) main::q#0+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte) 5 diff --git a/src/test/ref/struct-ptr-14.log b/src/test/ref/struct-ptr-14.log index cd2f6d721..810054c46 100644 --- a/src/test/ref/struct-ptr-14.log +++ b/src/test/ref/struct-ptr-14.log @@ -14,6 +14,8 @@ Adding versioned struct unwinding for (struct Point) main::p#0 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @2 (byte) main::p_x#0 ← (number) 2 (byte) main::p_y#0 ← (number) 3 @@ -34,6 +36,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 return to:@return + +(void()) set((struct Point*) set::ptr) set: scope:[set] from main (struct Point*) set::ptr#1 ← phi( main/(struct Point*) set::ptr#0 ) (byte*) set::$0 ← (byte*)(struct Point*) set::ptr#1 + (const byte) OFFSET_STRUCT_POINT_X @@ -181,6 +185,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::p_x#0 ← (byte) 2 [5] (byte) main::p_y#0 ← (byte) 3 @@ -193,6 +199,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [9] return to:@return + +(void()) set((struct Point*) set::ptr) set: scope:[set] from main [10] *((byte*)(const struct Point*) main::q#0) ← (byte) 4 [11] *((byte*)(const struct Point*) main::q#0+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte) 5 diff --git a/src/test/ref/struct-ptr-15.cfg b/src/test/ref/struct-ptr-15.cfg index 5bc7c569d..687c3606c 100644 --- a/src/test/ref/struct-ptr-15.cfg +++ b/src/test/ref/struct-ptr-15.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((byte*)(struct Point*)(const struct Circle[2]) circles#0+(const byte) OFFSET_STRUCT_CIRCLE_CENTER) ← (byte) 2 [5] *((byte*)(struct Point*)(const struct Circle[2]) circles#0+(const byte) OFFSET_STRUCT_CIRCLE_CENTER+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte) 3 diff --git a/src/test/ref/struct-ptr-15.log b/src/test/ref/struct-ptr-15.log index 21543ad9e..ba5bb2e78 100644 --- a/src/test/ref/struct-ptr-15.log +++ b/src/test/ref/struct-ptr-15.log @@ -25,6 +25,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (struct Circle[2]) circles#0 ← { fill( 2, 0) } to:@1 + +(void()) main() main: scope:[main] from @1 (number~) main::$1 ← (number) 0 * (const byte) SIZEOF_STRUCT_CIRCLE (struct Point*) main::$7 ← (struct Point*)(struct Circle[2]) circles#0 + (const byte) OFFSET_STRUCT_CIRCLE_CENTER @@ -351,6 +353,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((byte*)(struct Point*)(const struct Circle[2]) circles#0+(const byte) OFFSET_STRUCT_CIRCLE_CENTER) ← (byte) 2 [5] *((byte*)(struct Point*)(const struct Circle[2]) circles#0+(const byte) OFFSET_STRUCT_CIRCLE_CENTER+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte) 3 diff --git a/src/test/ref/struct-ptr-16.cfg b/src/test/ref/struct-ptr-16.cfg index cd2e23f56..fb7f9e975 100644 --- a/src/test/ref/struct-ptr-16.cfg +++ b/src/test/ref/struct-ptr-16.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call get @@ -38,6 +40,8 @@ main::@3: scope:[main] from main::@1 main::@return: scope:[main] from main::@3 [24] return to:@return + +(struct Point()) get((byte) get::i) get: scope:[get] from main main::@1 [25] (byte) get::i#2 ← phi( main/(byte) 0 main::@1/(byte) get::i#1 ) [26] if((byte) get::i#2==(byte) 0) goto get::@1 diff --git a/src/test/ref/struct-ptr-16.log b/src/test/ref/struct-ptr-16.log index c7b730127..468c5d08a 100644 --- a/src/test/ref/struct-ptr-16.log +++ b/src/test/ref/struct-ptr-16.log @@ -48,6 +48,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (struct Point*) SCREEN#0 ← ((struct Point*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @2 (byte) get::i#0 ← (number) 0 call get @@ -95,6 +97,8 @@ main::@return: scope:[main] from main::@4 (struct Point*) p1#0 ← ((struct Point*)) (number) $b000 (struct Point*) p2#0 ← ((struct Point*)) (number) $e000 to:@2 + +(struct Point()) get((byte) get::i) get: scope:[get] from main main::@1 (byte) get::i#2 ← phi( main/(byte) get::i#0 main::@1/(byte) get::i#1 ) (bool~) get::$0 ← (byte) get::i#2 == (number) 0 @@ -386,6 +390,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call get @@ -417,6 +423,8 @@ main::@3: scope:[main] from main::@1 main::@return: scope:[main] from main::@3 [24] return to:@return + +(struct Point()) get((byte) get::i) get: scope:[get] from main main::@1 [25] (byte) get::i#2 ← phi( main/(byte) 0 main::@1/(byte) get::i#1 ) [26] if((byte) get::i#2==(byte) 0) goto get::@1 diff --git a/src/test/ref/struct-ptr-17.cfg b/src/test/ref/struct-ptr-17.cfg index d434af197..33b27f672 100644 --- a/src/test/ref/struct-ptr-17.cfg +++ b/src/test/ref/struct-ptr-17.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call get @@ -34,6 +36,8 @@ main::@3: scope:[main] from main::@1 main::@return: scope:[main] from main::@3 [20] return to:@return + +(struct Point()) get((byte) get::i) get: scope:[get] from main main::@1 [21] (byte) get::return_x#2 ← phi( main/(byte) 0 main::@1/(byte) get::i#1 ) to:get::@return diff --git a/src/test/ref/struct-ptr-17.log b/src/test/ref/struct-ptr-17.log index 58cee06e9..93b25731a 100644 --- a/src/test/ref/struct-ptr-17.log +++ b/src/test/ref/struct-ptr-17.log @@ -40,6 +40,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (struct Point*) SCREEN#0 ← ((struct Point*)) (number) $400 to:@2 + +(void()) main() main: scope:[main] from @2 (byte) get::i#0 ← (number) 0 call get @@ -82,6 +84,8 @@ main::@4: scope:[main] from main::@1 main::@return: scope:[main] from main::@4 return to:@return + +(struct Point()) get((byte) get::i) get: scope:[get] from main main::@1 (byte) get::i#2 ← phi( main/(byte) get::i#0 main::@1/(byte) get::i#1 ) (byte) get::p_x#0 ← (byte) get::i#2 @@ -286,6 +290,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call get @@ -313,6 +319,8 @@ main::@3: scope:[main] from main::@1 main::@return: scope:[main] from main::@3 [20] return to:@return + +(struct Point()) get((byte) get::i) get: scope:[get] from main main::@1 [21] (byte) get::return_x#2 ← phi( main/(byte) 0 main::@1/(byte) get::i#1 ) to:get::@return diff --git a/src/test/ref/struct-ptr-18.cfg b/src/test/ref/struct-ptr-18.cfg index 93fd16ad5..ffd4798a8 100644 --- a/src/test/ref/struct-ptr-18.cfg +++ b/src/test/ref/struct-ptr-18.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((byte*)(const struct Point[2]) points#0) ← (byte) 1 [5] *((byte*)(const struct Point[2]) points#0+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte) 2 @@ -28,6 +30,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [15] return to:@return + +(void()) print((byte) print::p_x , (byte) print::p_y) print: scope:[print] from main::@1 [16] *((const byte*) SCREEN#0 + (byte) idx#12) ← (byte) print::p_x#0 [17] (byte) idx#3 ← ++ (byte) idx#12 diff --git a/src/test/ref/struct-ptr-18.log b/src/test/ref/struct-ptr-18.log index eaf87b49e..ce22e8613 100644 --- a/src/test/ref/struct-ptr-18.log +++ b/src/test/ref/struct-ptr-18.log @@ -21,6 +21,8 @@ CONTROL FLOW GRAPH SSA (byte) idx#0 ← (number) 0 (struct Point[2]) points#0 ← { fill( 2, 0) } to:@2 + +(void()) main() main: scope:[main] from @2 (byte) idx#14 ← phi( @2/(byte) idx#13 ) (number~) main::$2 ← (number) 0 * (const byte) SIZEOF_STRUCT_POINT @@ -58,6 +60,8 @@ main::@return: scope:[main] from main::@3 (byte) idx#2 ← (byte) idx#8 return to:@return + +(void()) print((byte) print::p_x , (byte) print::p_y) print: scope:[print] from main::@1 (byte) print::p_y#1 ← phi( main::@1/(byte) print::p_y#0 ) (byte) idx#9 ← phi( main::@1/(byte) idx#12 ) @@ -288,6 +292,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((byte*)(const struct Point[2]) points#0) ← (byte) 1 [5] *((byte*)(const struct Point[2]) points#0+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte) 2 @@ -309,6 +315,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [15] return to:@return + +(void()) print((byte) print::p_x , (byte) print::p_y) print: scope:[print] from main::@1 [16] *((const byte*) SCREEN#0 + (byte) idx#12) ← (byte) print::p_x#0 [17] (byte) idx#3 ← ++ (byte) idx#12 diff --git a/src/test/ref/struct-ptr-19.cfg b/src/test/ref/struct-ptr-19.cfg index dfad00528..1a0254221 100644 --- a/src/test/ref/struct-ptr-19.cfg +++ b/src/test/ref/struct-ptr-19.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::point_x#0 ← (byte) 1 [5] (byte) main::point_y#0 ← (byte) 2 @@ -22,6 +24,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [12] return to:@return + +(void()) print((byte) print::p_x , (byte) print::p_y) print: scope:[print] from main main::@1 [13] (byte) print::p_y#2 ← phi( main/(byte) print::p_y#0 main::@1/(byte) print::p_y#1 ) [13] (byte) idx#11 ← phi( main/(byte) 0 main::@1/(byte) idx#12 ) diff --git a/src/test/ref/struct-ptr-19.log b/src/test/ref/struct-ptr-19.log index 30bf3e324..22e973d2d 100644 --- a/src/test/ref/struct-ptr-19.log +++ b/src/test/ref/struct-ptr-19.log @@ -20,6 +20,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte) idx#0 ← (number) 0 to:@2 + +(void()) main() main: scope:[main] from @2 (byte) idx#14 ← phi( @2/(byte) idx#15 ) (byte) main::point_x#0 ← (number) 1 @@ -51,6 +53,8 @@ main::@return: scope:[main] from main::@2 (byte) idx#3 ← (byte) idx#10 return to:@return + +(void()) print((byte) print::p_x , (byte) print::p_y) print: scope:[print] from main main::@1 (byte) print::p_y#2 ← phi( main/(byte) print::p_y#0 main::@1/(byte) print::p_y#1 ) (byte) idx#11 ← phi( main/(byte) idx#14 main::@1/(byte) idx#1 ) @@ -222,6 +226,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte) main::point_x#0 ← (byte) 1 [5] (byte) main::point_y#0 ← (byte) 2 @@ -237,6 +243,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [12] return to:@return + +(void()) print((byte) print::p_x , (byte) print::p_y) print: scope:[print] from main main::@1 [13] (byte) print::p_y#2 ← phi( main/(byte) print::p_y#0 main::@1/(byte) print::p_y#1 ) [13] (byte) idx#11 ← phi( main/(byte) 0 main::@1/(byte) idx#12 ) diff --git a/src/test/ref/struct-ptr-2.cfg b/src/test/ref/struct-ptr-2.cfg index 6b2d4a012..2b438a374 100644 --- a/src/test/ref/struct-ptr-2.cfg +++ b/src/test/ref/struct-ptr-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/struct-ptr-2.log b/src/test/ref/struct-ptr-2.log index 061f36873..9c2992c17 100644 --- a/src/test/ref/struct-ptr-2.log +++ b/src/test/ref/struct-ptr-2.log @@ -8,6 +8,8 @@ CONTROL FLOW GRAPH SSA (byte) OFFS_X#0 ← (number) 0 (byte) OFFS_Y#0 ← (number) 1 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -239,6 +241,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/struct-ptr-20.cfg b/src/test/ref/struct-ptr-20.cfg index 2ab6e4172..11620025c 100644 --- a/src/test/ref/struct-ptr-20.cfg +++ b/src/test/ref/struct-ptr-20.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/struct-ptr-20.log b/src/test/ref/struct-ptr-20.log index d96e68d2c..ebec4c6b5 100644 --- a/src/test/ref/struct-ptr-20.log +++ b/src/test/ref/struct-ptr-20.log @@ -13,6 +13,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (struct Setting[]) settings#0 ← { { (number) 0, (byte) 'a' }, { (number) 1, (byte) 'b' }, { (number) 0, (byte) 'c' } } to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::idx#0 ← (number) 0 (byte~) main::$0 ← sizeof (struct Setting[]) settings#0 @@ -236,6 +238,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/struct-ptr-21.cfg b/src/test/ref/struct-ptr-21.cfg index 6edb50a95..a0b69735a 100644 --- a/src/test/ref/struct-ptr-21.cfg +++ b/src/test/ref/struct-ptr-21.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/struct-ptr-21.log b/src/test/ref/struct-ptr-21.log index 706a1a49f..0713a6cff 100644 --- a/src/test/ref/struct-ptr-21.log +++ b/src/test/ref/struct-ptr-21.log @@ -18,6 +18,8 @@ CONTROL FLOW GRAPH SSA (word*~) $0 ← & *((word[]) seq#0 + (number~) $1) (struct Setting[]) settings#0 ← { { (number) 3, (word*~) $0 } } to:@1 + +(void()) main() main: scope:[main] from @1 (number~) main::$2 ← (number) 0 * (const byte) SIZEOF_STRUCT_SETTING (struct Setting*~) main::$0 ← & *((struct Setting[]) settings#0 + (number~) main::$2) @@ -206,6 +208,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/struct-ptr-22.cfg b/src/test/ref/struct-ptr-22.cfg index 7a8656f95..f2567879f 100644 --- a/src/test/ref/struct-ptr-22.cfg +++ b/src/test/ref/struct-ptr-22.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(signed word()) main() main: scope:[main] from @1 [4] *((byte**)(const struct fileentry[$a]) files#0) ← (byte*) 16384 [5] *(*((byte**)(const struct fileentry[$a]) files#0) + (byte) 3) ← (byte) $aa @@ -41,6 +43,8 @@ main::@6: scope:[main] from main::@5 main::@return: scope:[main] from main::@6 [21] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from main::@3 main::@6 [22] (byte*) print_line_cursor#19 ← phi( main::@3/(byte*) 1024 main::@6/(byte*) print_line_cursor#1 ) to:print_ln::@1 @@ -52,6 +56,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [26] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from main::@2 main::@5 [27] (byte) print_byte::b#2 ← phi( main::@2/(byte) print_byte::b#0 main::@5/(byte) print_byte::b#1 ) [28] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 @@ -66,6 +72,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [34] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 [35] (byte*) print_char_cursor#28 ← phi( print_byte/(byte*) print_char_cursor#2 print_byte::@1/(byte*) print_char_cursor#29 ) [35] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -75,6 +83,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char [38] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@1 main::@4 [39] (byte*) print_char_cursor#45 ← phi( main::@1/(byte*) 1024 main::@4/(byte*~) print_char_cursor#48 ) [39] (byte*) print_str::str#5 ← phi( main::@1/(const string) main::str main::@4/(const string) main::str1 ) @@ -92,6 +102,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [44] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [45] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#3 to:print_str::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main [46] phi() [47] call memset @@ -99,6 +111,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [48] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [49] phi() to:memset::@1 diff --git a/src/test/ref/struct-ptr-22.log b/src/test/ref/struct-ptr-22.log index 7bb806af3..6ce833455 100644 --- a/src/test/ref/struct-ptr-22.log +++ b/src/test/ref/struct-ptr-22.log @@ -60,6 +60,8 @@ Culled Empty Block (label) main::@1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@12 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -107,6 +109,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@29 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@2 main::@5 (byte*) print_char_cursor#45 ← phi( main::@2/(byte*) print_char_cursor#12 main::@5/(byte*) print_char_cursor#15 ) (byte*) print_str::str#5 ← phi( main::@2/(byte*) print_str::str#1 main::@5/(byte*) print_str::str#2 ) @@ -129,6 +133,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#22 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from main::@4 main::@7 (byte*) print_char_cursor#41 ← phi( main::@4/(byte*) print_char_cursor#14 main::@7/(byte*) print_char_cursor#17 ) (byte*) print_line_cursor#19 ← phi( main::@4/(byte*) print_line_cursor#21 main::@7/(byte*) print_line_cursor#22 ) @@ -158,6 +164,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_line_cursor#27 ← phi( @12/(byte*) print_line_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $0 to:@36 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from main::@3 main::@6 (byte*) print_char_cursor#42 ← phi( main::@3/(byte*) print_char_cursor#13 main::@6/(byte*) print_char_cursor#16 ) (byte) print_byte::b#2 ← phi( main::@3/(byte) print_byte::b#0 main::@6/(byte) print_byte::b#1 ) @@ -182,6 +190,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#7 ← (byte*) print_char_cursor#27 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 (byte*) print_char_cursor#28 ← phi( print_byte/(byte*) print_char_cursor#42 print_byte::@1/(byte*) print_char_cursor#5 ) (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -193,6 +203,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#9 ← (byte*) print_char_cursor#29 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main (byte*) print_screen#1 ← phi( main/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -220,6 +232,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (struct fileentry[$a]) files#0 ← { fill( $a, 0) } (struct fileentry*) file#0 ← (struct fileentry*) 0 to:@37 + +(signed word()) main() main: scope:[main] from @37 (byte*) print_char_cursor#43 ← phi( @37/(byte*) print_char_cursor#44 ) (byte*) print_line_cursor#20 ← phi( @37/(byte*) print_line_cursor#23 ) @@ -823,6 +837,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(signed word()) main() main: scope:[main] from @1 [4] *((byte**)(const struct fileentry[$a]) files#0) ← (byte*) 16384 [5] *(*((byte**)(const struct fileentry[$a]) files#0) + (byte) 3) ← (byte) $aa @@ -857,6 +873,8 @@ main::@6: scope:[main] from main::@5 main::@return: scope:[main] from main::@6 [21] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from main::@3 main::@6 [22] (byte*) print_line_cursor#19 ← phi( main::@3/(byte*) 1024 main::@6/(byte*) print_line_cursor#1 ) to:print_ln::@1 @@ -868,6 +886,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [26] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from main::@2 main::@5 [27] (byte) print_byte::b#2 ← phi( main::@2/(byte) print_byte::b#0 main::@5/(byte) print_byte::b#1 ) [28] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 @@ -882,6 +902,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [34] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 [35] (byte*) print_char_cursor#28 ← phi( print_byte/(byte*) print_char_cursor#2 print_byte::@1/(byte*) print_char_cursor#29 ) [35] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -891,6 +913,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_char::@return: scope:[print_char] from print_char [38] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from main::@1 main::@4 [39] (byte*) print_char_cursor#45 ← phi( main::@1/(byte*) 1024 main::@4/(byte*~) print_char_cursor#48 ) [39] (byte*) print_str::str#5 ← phi( main::@1/(const string) main::str main::@4/(const string) main::str1 ) @@ -908,6 +932,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [44] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [45] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#3 to:print_str::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main [46] phi() [47] call memset @@ -915,6 +941,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [48] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [49] phi() to:memset::@1 diff --git a/src/test/ref/struct-ptr-23.cfg b/src/test/ref/struct-ptr-23.cfg index b02b54612..f1a706fc9 100644 --- a/src/test/ref/struct-ptr-23.cfg +++ b/src/test/ref/struct-ptr-23.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_person @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print_person((struct Person*) print_person::person) print_person: scope:[print_person] from main main::@1 [9] (byte) idx#15 ← phi( main/(byte) 0 main::@1/(byte) idx#10 ) [9] (struct Person*) print_person::person#2 ← phi( main/(const struct Person[]) persons#0 main::@1/(const struct Person*) main::person#1 ) diff --git a/src/test/ref/struct-ptr-23.log b/src/test/ref/struct-ptr-23.log index ca002ef74..bd3d1d956 100644 --- a/src/test/ref/struct-ptr-23.log +++ b/src/test/ref/struct-ptr-23.log @@ -11,6 +11,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (struct Person[]) persons#0 ← { { (number) 1, (const string) $0 }, { (number) 8, (const string) $1 } } to:@1 + +(void()) main() main: scope:[main] from @2 (byte) idx#18 ← phi( @2/(byte) idx#19 ) (struct Person*) main::person#0 ← (struct Person[]) persons#0 @@ -38,6 +40,8 @@ main::@return: scope:[main] from main::@2 (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte) idx#3 ← (number) 0 to:@2 + +(void()) print_person((struct Person*) print_person::person) print_person: scope:[print_person] from main main::@1 (byte) idx#15 ← phi( main/(byte) idx#18 main::@1/(byte) idx#0 ) (struct Person*) print_person::person#2 ← phi( main/(struct Person*) print_person::person#0 main::@1/(struct Person*) print_person::person#1 ) @@ -245,6 +249,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_person @@ -256,6 +262,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print_person((struct Person*) print_person::person) print_person: scope:[print_person] from main main::@1 [9] (byte) idx#15 ← phi( main/(byte) 0 main::@1/(byte) idx#10 ) [9] (struct Person*) print_person::person#2 ← phi( main/(const struct Person[]) persons#0 main::@1/(const struct Person*) main::person#1 ) diff --git a/src/test/ref/struct-ptr-24.cfg b/src/test/ref/struct-ptr-24.cfg index c78e25209..657b08314 100644 --- a/src/test/ref/struct-ptr-24.cfg +++ b/src/test/ref/struct-ptr-24.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -24,6 +26,8 @@ main::@2: scope:[main] from main::@1 main::@3: scope:[main] from main::@2 [10] (struct fileentry*) main::file#1 ← (struct fileentry*) main::file#2 + (const byte) SIZEOF_STRUCT_FILEENTRY to:main::@1 + +(void()) PrintName((struct fileentry*) PrintName::file) PrintName: scope:[PrintName] from main::@2 [11] if((struct fileentry*) PrintName::file#0!=(const struct fileentry*) dir#0) goto PrintName::@return to:PrintName::@1 diff --git a/src/test/ref/struct-ptr-24.log b/src/test/ref/struct-ptr-24.log index 583acf2a6..fdf294224 100644 --- a/src/test/ref/struct-ptr-24.log +++ b/src/test/ref/struct-ptr-24.log @@ -13,6 +13,8 @@ CONTROL FLOW GRAPH SSA (struct fileentry*) filesEnd#0 ← (struct fileentry*) 0 (struct fileentry*) dir#0 ← (struct fileentry*) 0 to:@2 + +(void()) main() main: scope:[main] from @2 (struct fileentry*) main::file#0 ← (struct fileentry*) 0 to:main::@1 @@ -33,6 +35,8 @@ main::@7: scope:[main] from main::@2 main::@return: scope:[main] from main::@1 return to:@return + +(void()) PrintName((struct fileentry*) PrintName::file) PrintName: scope:[PrintName] from main::@2 (struct fileentry*) PrintName::file#1 ← phi( main::@2/(struct fileentry*) PrintName::file#0 ) (bool~) PrintName::$0 ← (struct fileentry*) PrintName::file#1 == (struct fileentry*) dir#0 @@ -146,6 +150,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -163,6 +169,8 @@ main::@2: scope:[main] from main::@1 main::@3: scope:[main] from main::@2 [10] (struct fileentry*) main::file#1 ← (struct fileentry*) main::file#2 + (const byte) SIZEOF_STRUCT_FILEENTRY to:main::@1 + +(void()) PrintName((struct fileentry*) PrintName::file) PrintName: scope:[PrintName] from main::@2 [11] if((struct fileentry*) PrintName::file#0!=(const struct fileentry*) dir#0) goto PrintName::@return to:PrintName::@1 diff --git a/src/test/ref/struct-ptr-25.cfg b/src/test/ref/struct-ptr-25.cfg index b25798f6d..42ac9065a 100644 --- a/src/test/ref/struct-ptr-25.cfg +++ b/src/test/ref/struct-ptr-25.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@return diff --git a/src/test/ref/struct-ptr-25.log b/src/test/ref/struct-ptr-25.log index f5a995d95..e02c6dac3 100644 --- a/src/test/ref/struct-ptr-25.log +++ b/src/test/ref/struct-ptr-25.log @@ -9,6 +9,8 @@ CONTROL FLOW GRAPH SSA (byte*) filesEnd#0 ← (byte*) 0 (byte*) file#0 ← (byte*) 0 to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) fileCur#10 ← phi( @1/(byte*) fileCur#12 ) (byte*) fileTop#4 ← phi( @1/(byte*) fileTop#10 ) @@ -213,6 +215,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@return diff --git a/src/test/ref/struct-ptr-26.cfg b/src/test/ref/struct-ptr-26.cfg index 2fc971fe4..51d737bd6 100644 --- a/src/test/ref/struct-ptr-26.cfg +++ b/src/test/ref/struct-ptr-26.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((byte**)(const struct fileentry*) main::file#1) ← (byte*) 4 [5] (word) main::uSize#1 ← *((word*)*((byte**)(const struct fileentry*) main::file#1) + (byte) $1e) @@ -16,6 +18,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [8] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from main [9] (byte) print_byte::b#0 ← > (word) print_word::w#0 [10] call print_byte @@ -27,6 +31,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [13] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [14] (byte*) print_char_cursor#24 ← phi( print_word/(byte*) 1024 print_word::@1/(byte*) print_char_cursor#19 ) [14] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -42,6 +48,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [21] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 [22] (byte*) print_char_cursor#18 ← phi( print_byte/(byte*) print_char_cursor#24 print_byte::@1/(byte*) print_char_cursor#19 ) [22] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) diff --git a/src/test/ref/struct-ptr-26.log b/src/test/ref/struct-ptr-26.log index 9e4dabf99..77ba89730 100644 --- a/src/test/ref/struct-ptr-26.log +++ b/src/test/ref/struct-ptr-26.log @@ -55,6 +55,8 @@ CONTROL FLOW GRAPH SSA (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@29 + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from main (byte*) print_char_cursor#23 ← phi( main/(byte*) print_char_cursor#25 ) (word) print_word::w#1 ← phi( main/(word) print_word::w#0 ) @@ -83,6 +85,8 @@ print_word::@return: scope:[print_word] from print_word::@2 (byte*) print_char_cursor#27 ← phi( @12/(byte*) print_char_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $0 to:@37 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) print_char_cursor#24 ← phi( print_word/(byte*) print_char_cursor#23 print_word::@1/(byte*) print_char_cursor#1 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -107,6 +111,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#6 ← (byte*) print_char_cursor#17 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 (byte*) print_char_cursor#18 ← phi( print_byte/(byte*) print_char_cursor#24 print_byte::@1/(byte*) print_char_cursor#4 ) (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -118,6 +124,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#8 ← (byte*) print_char_cursor#19 return to:@return + +(void()) main() main: scope:[main] from @37 (byte*) print_char_cursor#25 ← phi( @37/(byte*) print_char_cursor#26 ) (struct fileentry*) main::file#0 ← (struct fileentry*) 0 @@ -369,6 +377,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((byte**)(const struct fileentry*) main::file#1) ← (byte*) 4 [5] (word) main::uSize#1 ← *((word*)*((byte**)(const struct fileentry*) main::file#1) + (byte) $1e) @@ -378,6 +388,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [8] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from main [9] (byte) print_byte::b#0 ← > (word) print_word::w#0 [10] call print_byte @@ -389,6 +401,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [13] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [14] (byte*) print_char_cursor#24 ← phi( print_word/(byte*) 1024 print_word::@1/(byte*) print_char_cursor#19 ) [14] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -404,6 +418,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [21] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 [22] (byte*) print_char_cursor#18 ← phi( print_byte/(byte*) print_char_cursor#24 print_byte::@1/(byte*) print_char_cursor#19 ) [22] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) diff --git a/src/test/ref/struct-ptr-29.cfg b/src/test/ref/struct-ptr-29.cfg index 65bf66bbc..96c278a79 100644 --- a/src/test/ref/struct-ptr-29.cfg +++ b/src/test/ref/struct-ptr-29.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_person @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print_person((struct Person*) print_person::person) print_person: scope:[print_person] from main main::@1 [9] (byte) idx#13 ← phi( main/(byte) 0 main::@1/(byte) idx#16 ) [9] (struct Person*) print_person::person#2 ← phi( main/(const struct Person[2]) persons#0 main::@1/(const struct Person[2]) persons#0+(byte) 1*(const byte) SIZEOF_STRUCT_PERSON ) diff --git a/src/test/ref/struct-ptr-29.log b/src/test/ref/struct-ptr-29.log index ebad59ccd..a6acd640f 100644 --- a/src/test/ref/struct-ptr-29.log +++ b/src/test/ref/struct-ptr-29.log @@ -12,6 +12,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (struct Person[2]) persons#0 ← { { (number) 4, (const string) $0 }, { (number) 7, (const string) $1 } } to:@1 + +(void()) main() main: scope:[main] from @2 (byte) idx#18 ← phi( @2/(byte) idx#20 ) (number~) main::$4 ← (number) 0 * (const byte) SIZEOF_STRUCT_PERSON @@ -41,6 +43,8 @@ main::@return: scope:[main] from main::@2 (byte) idx#3 ← (number) 0 (byte[]) DIGIT#0 ← (const string) $2 to:@2 + +(void()) print_person((struct Person*) print_person::person) print_person: scope:[print_person] from main main::@1 (byte) idx#13 ← phi( main/(byte) idx#18 main::@1/(byte) idx#0 ) (struct Person*) print_person::person#2 ← phi( main/(struct Person*) print_person::person#0 main::@1/(struct Person*) print_person::person#1 ) @@ -297,6 +301,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_person @@ -308,6 +314,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print_person((struct Person*) print_person::person) print_person: scope:[print_person] from main main::@1 [9] (byte) idx#13 ← phi( main/(byte) 0 main::@1/(byte) idx#16 ) [9] (struct Person*) print_person::person#2 ← phi( main/(const struct Person[2]) persons#0 main::@1/(const struct Person[2]) persons#0+(byte) 1*(const byte) SIZEOF_STRUCT_PERSON ) diff --git a/src/test/ref/struct-ptr-3.cfg b/src/test/ref/struct-ptr-3.cfg index aaffdf5ba..007c54e08 100644 --- a/src/test/ref/struct-ptr-3.cfg +++ b/src/test/ref/struct-ptr-3.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← *((byte*)(struct Point*) 4096) [5] *((const byte*) main::SCREEN#0+(byte) 1) ← *((byte*)(struct Point*) 4096+(const byte) OFFSET_STRUCT_POINT_Y) diff --git a/src/test/ref/struct-ptr-3.log b/src/test/ref/struct-ptr-3.log index eaddbf6cc..dc5c4757d 100644 --- a/src/test/ref/struct-ptr-3.log +++ b/src/test/ref/struct-ptr-3.log @@ -8,6 +8,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (struct Point*) points#0 ← ((struct Point*)) (number) $1000 to:@1 + +(void()) main() main: scope:[main] from @1 (struct Point*) points#4 ← phi( @1/(struct Point*) points#7 ) (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 @@ -156,6 +158,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← *((byte*)(struct Point*) 4096) [5] *((const byte*) main::SCREEN#0+(byte) 1) ← *((byte*)(struct Point*) 4096+(const byte) OFFSET_STRUCT_POINT_Y) diff --git a/src/test/ref/struct-ptr-30.cfg b/src/test/ref/struct-ptr-30.cfg index 43dd2676a..8bffaf0eb 100644 --- a/src/test/ref/struct-ptr-30.cfg +++ b/src/test/ref/struct-ptr-30.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -26,6 +28,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [13] return to:@return + +(void()) print((byte) print::p_x , (signed word) print::p_y) print: scope:[print] from main::@1 [14] *((const byte*) SCREEN#0 + (byte) idx#14) ← (byte) print::p_x#0 [15] (byte) idx#3 ← ++ (byte) idx#14 diff --git a/src/test/ref/struct-ptr-30.log b/src/test/ref/struct-ptr-30.log index c55db77d1..8c58e4c21 100644 --- a/src/test/ref/struct-ptr-30.log +++ b/src/test/ref/struct-ptr-30.log @@ -13,6 +13,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (struct Point[4]) points#0 ← { { (number) 1, (number) $83f }, { (number) 3, (number) $107e } } to:@1 + +(void()) main() main: scope:[main] from @2 (byte) idx#16 ← phi( @2/(byte) idx#15 ) (byte) main::i#0 ← (byte) 0 @@ -44,6 +46,8 @@ main::@return: scope:[main] from main::@3 (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte) idx#2 ← (number) 0 to:@2 + +(void()) print((byte) print::p_x , (signed word) print::p_y) print: scope:[print] from main::@1 (signed word) print::p_y#1 ← phi( main::@1/(signed word) print::p_y#0 ) (byte) idx#11 ← phi( main::@1/(byte) idx#14 ) @@ -240,6 +244,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -259,6 +265,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [13] return to:@return + +(void()) print((byte) print::p_x , (signed word) print::p_y) print: scope:[print] from main::@1 [14] *((const byte*) SCREEN#0 + (byte) idx#14) ← (byte) print::p_x#0 [15] (byte) idx#3 ← ++ (byte) idx#14 diff --git a/src/test/ref/struct-ptr-31.cfg b/src/test/ref/struct-ptr-31.cfg index 45eb05b1a..91307495f 100644 --- a/src/test/ref/struct-ptr-31.cfg +++ b/src/test/ref/struct-ptr-31.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_person @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print_person((struct Person*) print_person::person) print_person: scope:[print_person] from main main::@1 [9] (byte) idx#13 ← phi( main/(byte) 0 main::@1/(byte) idx#16 ) [9] (struct Person*) print_person::person#2 ← phi( main/(const struct Person[]) persons#0 main::@1/(const struct Person[]) persons#0+(byte) 1*(const byte) SIZEOF_STRUCT_PERSON ) diff --git a/src/test/ref/struct-ptr-31.log b/src/test/ref/struct-ptr-31.log index cc8cbd6e9..7876d4077 100644 --- a/src/test/ref/struct-ptr-31.log +++ b/src/test/ref/struct-ptr-31.log @@ -13,6 +13,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (struct Person[]) persons#0 ← { { (number) 4, (const string) $0 }, { (number) 7, (const string) $1 } } to:@1 + +(void()) main() main: scope:[main] from @2 (byte) idx#18 ← phi( @2/(byte) idx#20 ) (struct Person*) print_person::person#0 ← (struct Person[]) persons#0 @@ -40,6 +42,8 @@ main::@return: scope:[main] from main::@2 (byte) idx#3 ← (number) 0 (byte[]) DIGIT#0 ← (const string) $2 to:@2 + +(void()) print_person((struct Person*) print_person::person) print_person: scope:[print_person] from main main::@1 (byte) idx#13 ← phi( main/(byte) idx#18 main::@1/(byte) idx#0 ) (struct Person*) print_person::person#2 ← phi( main/(struct Person*) print_person::person#0 main::@1/(struct Person*) print_person::person#1 ) @@ -279,6 +283,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_person @@ -290,6 +296,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print_person((struct Person*) print_person::person) print_person: scope:[print_person] from main main::@1 [9] (byte) idx#13 ← phi( main/(byte) 0 main::@1/(byte) idx#16 ) [9] (struct Person*) print_person::person#2 ← phi( main/(const struct Person[]) persons#0 main::@1/(const struct Person[]) persons#0+(byte) 1*(const byte) SIZEOF_STRUCT_PERSON ) diff --git a/src/test/ref/struct-ptr-32.cfg b/src/test/ref/struct-ptr-32.cfg index 33883bd35..89808b2f4 100644 --- a/src/test/ref/struct-ptr-32.cfg +++ b/src/test/ref/struct-ptr-32.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((byte*)(const struct Person[2]) persons#0) ← (byte) 7 [5] *((byte*)(const struct Person[2]) persons#0+(byte) 1*(const byte) SIZEOF_STRUCT_PERSON) ← (byte) 9 diff --git a/src/test/ref/struct-ptr-32.log b/src/test/ref/struct-ptr-32.log index 28af93f1e..301c8e7ab 100644 --- a/src/test/ref/struct-ptr-32.log +++ b/src/test/ref/struct-ptr-32.log @@ -20,6 +20,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (struct Person[2]) persons#0 ← { fill( 2, 0) } to:@1 + +(void()) main() main: scope:[main] from @1 (number~) main::$0 ← (number) 0 * (const byte) SIZEOF_STRUCT_PERSON (byte*) main::$6 ← (byte*)(struct Person[2]) persons#0 + (const byte) OFFSET_STRUCT_PERSON_ID @@ -283,6 +285,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((byte*)(const struct Person[2]) persons#0) ← (byte) 7 [5] *((byte*)(const struct Person[2]) persons#0+(byte) 1*(const byte) SIZEOF_STRUCT_PERSON) ← (byte) 9 diff --git a/src/test/ref/struct-ptr-33.cfg b/src/test/ref/struct-ptr-33.cfg index 77ea11b22..566948f74 100644 --- a/src/test/ref/struct-ptr-33.cfg +++ b/src/test/ref/struct-ptr-33.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← *((byte[$d])(const struct Person[2]) persons#0+(const byte) OFFSET_STRUCT_PERSON_NAME+(byte) 2) [5] *((const byte*) main::SCREEN#0+(byte) 1) ← *((byte[$d])(const struct Person*) main::person#1+(const byte) OFFSET_STRUCT_PERSON_NAME+(byte) 2) diff --git a/src/test/ref/struct-ptr-33.log b/src/test/ref/struct-ptr-33.log index 3e75827e7..c7f04efa8 100644 --- a/src/test/ref/struct-ptr-33.log +++ b/src/test/ref/struct-ptr-33.log @@ -8,6 +8,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (struct Person[2]) persons#0 ← { { (number) 7, (const string) $0, (number) $141 }, { (number) 9, (const string) $1, (number) $7b } } to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (struct Person*) main::person#0 ← (struct Person[2]) persons#0 @@ -137,6 +139,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← *((byte[$d])(const struct Person[2]) persons#0+(const byte) OFFSET_STRUCT_PERSON_NAME+(byte) 2) [5] *((const byte*) main::SCREEN#0+(byte) 1) ← *((byte[$d])(const struct Person*) main::person#1+(const byte) OFFSET_STRUCT_PERSON_NAME+(byte) 2) diff --git a/src/test/ref/struct-ptr-34.cfg b/src/test/ref/struct-ptr-34.cfg index 2a1b77108..35c43e312 100644 --- a/src/test/ref/struct-ptr-34.cfg +++ b/src/test/ref/struct-ptr-34.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_person @@ -18,6 +20,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print_person((byte) print_person::person_id , (byte[$10]) print_person::person_name) print_person: scope:[print_person] from main main::@1 [9] (byte[$10]) print_person::person_name#4 ← phi( main/(const byte[$10]) main::jesper_name#0 main::@1/(const byte[$10]) main::henriette_name#0 ) [9] (byte) idx#13 ← phi( main/(byte) 0 main::@1/(byte) idx#16 ) diff --git a/src/test/ref/struct-ptr-34.log b/src/test/ref/struct-ptr-34.log index a51786a27..3977ecc08 100644 --- a/src/test/ref/struct-ptr-34.log +++ b/src/test/ref/struct-ptr-34.log @@ -32,6 +32,8 @@ Culled Empty Block (label) print_person::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @2 (byte) idx#18 ← phi( @2/(byte) idx#20 ) (byte) main::jesper_id#0 ← (number) 4 @@ -63,6 +65,8 @@ main::@return: scope:[main] from main::@2 (byte) idx#3 ← (number) 0 (byte[]) DIGIT#0 ← (const string) $0 to:@2 + +(void()) print_person((byte) print_person::person_id , (byte[$10]) print_person::person_name) print_person: scope:[print_person] from main main::@1 (byte[$10]) print_person::person_name#4 ← phi( main/(byte[$10]) print_person::person_name#0 main::@1/(byte[$10]) print_person::person_name#1 ) (byte) idx#13 ← phi( main/(byte) idx#18 main::@1/(byte) idx#0 ) @@ -289,6 +293,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_person @@ -300,6 +306,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 [8] return to:@return + +(void()) print_person((byte) print_person::person_id , (byte[$10]) print_person::person_name) print_person: scope:[print_person] from main main::@1 [9] (byte[$10]) print_person::person_name#4 ← phi( main/(const byte[$10]) main::jesper_name#0 main::@1/(const byte[$10]) main::henriette_name#0 ) [9] (byte) idx#13 ← phi( main/(byte) 0 main::@1/(byte) idx#16 ) diff --git a/src/test/ref/struct-ptr-4.cfg b/src/test/ref/struct-ptr-4.cfg index eefba79a3..f5f49bfc8 100644 --- a/src/test/ref/struct-ptr-4.cfg +++ b/src/test/ref/struct-ptr-4.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/struct-ptr-4.log b/src/test/ref/struct-ptr-4.log index 7251eb70a..c31081f3e 100644 --- a/src/test/ref/struct-ptr-4.log +++ b/src/test/ref/struct-ptr-4.log @@ -11,6 +11,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (struct Point*) POINTS#0 ← ((struct Point*)) (number) $1000 to:@1 + +(void()) main() main: scope:[main] from @1 (struct Point*) main::points#0 ← (struct Point*) POINTS#0 (byte) main::i#0 ← (byte) 0 @@ -216,6 +218,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/struct-ptr-5.cfg b/src/test/ref/struct-ptr-5.cfg index c4791dca3..989f2a224 100644 --- a/src/test/ref/struct-ptr-5.cfg +++ b/src/test/ref/struct-ptr-5.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((struct Entry**)(const struct Entry*) ENTRIES#0+(const byte) OFFSET_STRUCT_ENTRY_NEXT) ← (const struct Entry*) main::entry2#0 [5] *((byte*)(const struct Entry*) ENTRIES#0) ← (byte) 1 diff --git a/src/test/ref/struct-ptr-5.log b/src/test/ref/struct-ptr-5.log index 950153e18..5957aa22f 100644 --- a/src/test/ref/struct-ptr-5.log +++ b/src/test/ref/struct-ptr-5.log @@ -22,6 +22,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (struct Entry*) ENTRIES#0 ← ((struct Entry*)) (number) $1000 to:@1 + +(void()) main() main: scope:[main] from @1 (struct Entry*) main::entry0#0 ← (struct Entry*) ENTRIES#0 (number~) main::$5 ← (number) 1 * (const byte) SIZEOF_STRUCT_ENTRY @@ -277,6 +279,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((struct Entry**)(const struct Entry*) ENTRIES#0+(const byte) OFFSET_STRUCT_ENTRY_NEXT) ← (const struct Entry*) main::entry2#0 [5] *((byte*)(const struct Entry*) ENTRIES#0) ← (byte) 1 diff --git a/src/test/ref/struct-ptr-6.cfg b/src/test/ref/struct-ptr-6.cfg index aaffdf5ba..007c54e08 100644 --- a/src/test/ref/struct-ptr-6.cfg +++ b/src/test/ref/struct-ptr-6.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← *((byte*)(struct Point*) 4096) [5] *((const byte*) main::SCREEN#0+(byte) 1) ← *((byte*)(struct Point*) 4096+(const byte) OFFSET_STRUCT_POINT_Y) diff --git a/src/test/ref/struct-ptr-6.log b/src/test/ref/struct-ptr-6.log index b6403d2cc..e2a480ae9 100644 --- a/src/test/ref/struct-ptr-6.log +++ b/src/test/ref/struct-ptr-6.log @@ -8,6 +8,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (struct Point*) points#0 ← ((struct Point*)) (number) $1000 to:@1 + +(void()) main() main: scope:[main] from @1 (struct Point*) points#4 ← phi( @1/(struct Point*) points#7 ) (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 @@ -156,6 +158,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← *((byte*)(struct Point*) 4096) [5] *((const byte*) main::SCREEN#0+(byte) 1) ← *((byte*)(struct Point*) 4096+(const byte) OFFSET_STRUCT_POINT_Y) diff --git a/src/test/ref/struct-ptr-7.cfg b/src/test/ref/struct-ptr-7.cfg index 2f62cb793..5c0e5e07b 100644 --- a/src/test/ref/struct-ptr-7.cfg +++ b/src/test/ref/struct-ptr-7.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((byte*)(const struct Point[2]) points#0) ← (byte) 2 [5] *((byte*)(const struct Point[2]) points#0+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte) 3 diff --git a/src/test/ref/struct-ptr-7.log b/src/test/ref/struct-ptr-7.log index 67782b1a2..03348fd25 100644 --- a/src/test/ref/struct-ptr-7.log +++ b/src/test/ref/struct-ptr-7.log @@ -19,6 +19,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (struct Point[2]) points#0 ← { fill( 2, 0) } to:@1 + +(void()) main() main: scope:[main] from @1 (number~) main::$0 ← (number) 0 * (const byte) SIZEOF_STRUCT_POINT (byte*) main::$8 ← (byte*)(struct Point[2]) points#0 + (const byte) OFFSET_STRUCT_POINT_X @@ -273,6 +275,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((byte*)(const struct Point[2]) points#0) ← (byte) 2 [5] *((byte*)(const struct Point[2]) points#0+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte) 3 diff --git a/src/test/ref/struct-ptr-8.cfg b/src/test/ref/struct-ptr-8.cfg index 29f5811d3..d591162d3 100644 --- a/src/test/ref/struct-ptr-8.cfg +++ b/src/test/ref/struct-ptr-8.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/struct-ptr-8.log b/src/test/ref/struct-ptr-8.log index 37370f841..cf62a7105 100644 --- a/src/test/ref/struct-ptr-8.log +++ b/src/test/ref/struct-ptr-8.log @@ -12,6 +12,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (struct Point[2]) points#0 ← { fill( 2, 0) } to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -227,6 +229,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/struct-ptr-9.cfg b/src/test/ref/struct-ptr-9.cfg index cf26c2a06..f21104491 100644 --- a/src/test/ref/struct-ptr-9.cfg +++ b/src/test/ref/struct-ptr-9.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/struct-ptr-9.log b/src/test/ref/struct-ptr-9.log index b60a1df39..30ac32e4a 100644 --- a/src/test/ref/struct-ptr-9.log +++ b/src/test/ref/struct-ptr-9.log @@ -11,6 +11,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (struct Point[2]) points#0 ← { fill( 2, 0) } to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -198,6 +200,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/subexpr-optimize-0.cfg b/src/test/ref/subexpr-optimize-0.cfg index 301776798..a4e68436a 100644 --- a/src/test/ref/subexpr-optimize-0.cfg +++ b/src/test/ref/subexpr-optimize-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/subexpr-optimize-0.log b/src/test/ref/subexpr-optimize-0.log index 891a51d61..a6bb3c718 100644 --- a/src/test/ref/subexpr-optimize-0.log +++ b/src/test/ref/subexpr-optimize-0.log @@ -3,6 +3,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -121,6 +123,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/subexpr-optimize-1.cfg b/src/test/ref/subexpr-optimize-1.cfg index 834512bfb..bccbcff17 100644 --- a/src/test/ref/subexpr-optimize-1.cfg +++ b/src/test/ref/subexpr-optimize-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/subexpr-optimize-1.log b/src/test/ref/subexpr-optimize-1.log index 73a0b7622..e353e5fae 100644 --- a/src/test/ref/subexpr-optimize-1.log +++ b/src/test/ref/subexpr-optimize-1.log @@ -4,6 +4,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -180,6 +182,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/subexpr-optimize-2.cfg b/src/test/ref/subexpr-optimize-2.cfg index b5098a6e8..e78d43044 100644 --- a/src/test/ref/subexpr-optimize-2.cfg +++ b/src/test/ref/subexpr-optimize-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/subexpr-optimize-2.log b/src/test/ref/subexpr-optimize-2.log index 7c48d05b9..db0583d53 100644 --- a/src/test/ref/subexpr-optimize-2.log +++ b/src/test/ref/subexpr-optimize-2.log @@ -3,6 +3,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -132,6 +134,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/subexpr-optimize-3.cfg b/src/test/ref/subexpr-optimize-3.cfg index 9b8689e10..bc3a15107 100644 --- a/src/test/ref/subexpr-optimize-3.cfg +++ b/src/test/ref/subexpr-optimize-3.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/subexpr-optimize-3.log b/src/test/ref/subexpr-optimize-3.log index 47c3308ac..5d52fc5b1 100644 --- a/src/test/ref/subexpr-optimize-3.log +++ b/src/test/ref/subexpr-optimize-3.log @@ -3,6 +3,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -143,6 +145,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/subexpr-optimize-4.cfg b/src/test/ref/subexpr-optimize-4.cfg index ad72299d2..432fd3e8b 100644 --- a/src/test/ref/subexpr-optimize-4.cfg +++ b/src/test/ref/subexpr-optimize-4.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/subexpr-optimize-4.log b/src/test/ref/subexpr-optimize-4.log index 2e429d6c9..a2161b35c 100644 --- a/src/test/ref/subexpr-optimize-4.log +++ b/src/test/ref/subexpr-optimize-4.log @@ -9,6 +9,8 @@ Culled Empty Block (label) main::@12 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -253,6 +255,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/summin.cfg b/src/test/ref/summin.cfg index 81fd856cd..ce37debe0 100644 --- a/src/test/ref/summin.cfg +++ b/src/test/ref/summin.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call sum @@ -31,6 +33,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [17] return to:@return + +(byte()) sum((byte) sum::a , (byte) sum::b) sum: scope:[sum] from main main::@1 main::@2 [18] (byte) sum::b#3 ← phi( main/(byte) 2 main::@1/(byte) 4 main::@2/(byte) $d ) [18] (byte) sum::a#3 ← phi( main/(byte) 1 main::@1/(byte) 3 main::@2/(byte) 9 ) diff --git a/src/test/ref/summin.log b/src/test/ref/summin.log index 9f641dc96..5cb20b84a 100644 --- a/src/test/ref/summin.log +++ b/src/test/ref/summin.log @@ -6,6 +6,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) screen#0 ← ((byte*)) (number) $400 to:@2 + +(void()) main() main: scope:[main] from @2 (byte) sum::a#0 ← (number) 1 (byte) sum::b#0 ← (number) 2 @@ -45,6 +47,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 return to:@return + +(byte()) sum((byte) sum::a , (byte) sum::b) sum: scope:[sum] from main main::@1 main::@2 (byte) sum::b#3 ← phi( main/(byte) sum::b#0 main::@1/(byte) sum::b#1 main::@2/(byte) sum::b#2 ) (byte) sum::a#3 ← phi( main/(byte) sum::a#0 main::@1/(byte) sum::a#1 main::@2/(byte) sum::a#2 ) @@ -203,6 +207,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call sum @@ -227,6 +233,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [17] return to:@return + +(byte()) sum((byte) sum::a , (byte) sum::b) sum: scope:[sum] from main main::@1 main::@2 [18] (byte) sum::b#3 ← phi( main/(byte) 2 main::@1/(byte) 4 main::@2/(byte) $d ) [18] (byte) sum::a#3 ← phi( main/(byte) 1 main::@1/(byte) 3 main::@2/(byte) 9 ) diff --git a/src/test/ref/switch-0.cfg b/src/test/ref/switch-0.cfg index 2f9ed6255..a421f8855 100644 --- a/src/test/ref/switch-0.cfg +++ b/src/test/ref/switch-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/switch-0.log b/src/test/ref/switch-0.log index 955372e06..3bd0499b3 100644 --- a/src/test/ref/switch-0.log +++ b/src/test/ref/switch-0.log @@ -9,6 +9,8 @@ Culled Empty Block (label) main::@16 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -171,6 +173,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/switch-1.cfg b/src/test/ref/switch-1.cfg index d4b38e7f4..7e2a992ac 100644 --- a/src/test/ref/switch-1.cfg +++ b/src/test/ref/switch-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/switch-1.log b/src/test/ref/switch-1.log index 9bcd666f0..b6e381a28 100644 --- a/src/test/ref/switch-1.log +++ b/src/test/ref/switch-1.log @@ -8,6 +8,8 @@ Culled Empty Block (label) main::@12 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -146,6 +148,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/switch-2.cfg b/src/test/ref/switch-2.cfg index 877a43ab7..5cf117640 100644 --- a/src/test/ref/switch-2.cfg +++ b/src/test/ref/switch-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/switch-2.log b/src/test/ref/switch-2.log index 81b3e7ce7..70b3e8e73 100644 --- a/src/test/ref/switch-2.log +++ b/src/test/ref/switch-2.log @@ -6,6 +6,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::b#0 ← (number) 0 @@ -117,6 +119,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/switch-4.cfg b/src/test/ref/switch-4.cfg index d34bea32b..61c03deee 100644 --- a/src/test/ref/switch-4.cfg +++ b/src/test/ref/switch-4.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/switch-4.log b/src/test/ref/switch-4.log index 9a22b99aa..958aa9a8b 100644 --- a/src/test/ref/switch-4.log +++ b/src/test/ref/switch-4.log @@ -9,6 +9,8 @@ Culled Empty Block (label) main::@11 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -133,6 +135,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/ternary-1.cfg b/src/test/ref/ternary-1.cfg index e09d5adcf..ffc9d9a10 100644 --- a/src/test/ref/ternary-1.cfg +++ b/src/test/ref/ternary-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/ternary-1.log b/src/test/ref/ternary-1.log index b4da7374e..08c46d9c9 100644 --- a/src/test/ref/ternary-1.log +++ b/src/test/ref/ternary-1.log @@ -5,6 +5,8 @@ Culled Empty Block (label) main::@7 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -134,6 +136,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/ternary-2.cfg b/src/test/ref/ternary-2.cfg index 3a2f20d80..3d8508781 100644 --- a/src/test/ref/ternary-2.cfg +++ b/src/test/ref/ternary-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/ternary-2.log b/src/test/ref/ternary-2.log index 382830312..801973f9a 100644 --- a/src/test/ref/ternary-2.log +++ b/src/test/ref/ternary-2.log @@ -6,6 +6,8 @@ Culled Empty Block (label) main::@10 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 if(true) goto main::@1 @@ -134,6 +136,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/ternary-3.cfg b/src/test/ref/ternary-3.cfg index 74fb382b4..8724ed14d 100644 --- a/src/test/ref/ternary-3.cfg +++ b/src/test/ref/ternary-3.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -45,18 +47,24 @@ main::@2: scope:[main] from main::@5 main::@6: scope:[main] from main::@2 [23] (byte~) main::$4 ← (byte) m1::return#0 to:main::@4 + +(byte()) m1((byte) m1::i) m1: scope:[m1] from main::@2 [24] (byte) m1::return#1 ← (byte) 5 + (byte) m1::i#0 to:m1::@return m1::@return: scope:[m1] from m1 [25] return to:@return + +(byte()) m2((byte) m2::i) m2: scope:[m2] from main::@3 [26] (byte) m2::return#1 ← (byte) $a + (byte) m2::i#0 to:m2::@return m2::@return: scope:[m2] from m2 [27] return to:@return + +(bool()) cond((byte) cond::b) cond: scope:[cond] from main::@1 [28] (bool) cond::return#1 ← (byte) cond::b#0 < (byte) 5 to:cond::@return diff --git a/src/test/ref/ternary-3.log b/src/test/ref/ternary-3.log index 1d40a0c2a..e1b8e7275 100644 --- a/src/test/ref/ternary-3.log +++ b/src/test/ref/ternary-3.log @@ -11,6 +11,8 @@ Culled Empty Block (label) m2::@1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@4 + +(void()) main() main: scope:[main] from @4 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -62,6 +64,8 @@ main::@4: scope:[main] from main::@10 main::@9 main::@return: scope:[main] from main::@4 return to:@return + +(bool()) cond((byte) cond::b) cond: scope:[cond] from main::@1 (byte) cond::b#1 ← phi( main::@1/(byte) cond::b#0 ) (bool~) cond::$0 ← (byte) cond::b#1 < (number) 5 @@ -72,6 +76,8 @@ cond::@return: scope:[cond] from cond (bool) cond::return#2 ← (bool) cond::return#4 return to:@return + +(byte()) m1((byte) m1::i) m1: scope:[m1] from main::@2 (byte) m1::i#1 ← phi( main::@2/(byte) m1::i#0 ) (number~) m1::$0 ← (number) 5 + (byte) m1::i#1 @@ -82,6 +88,8 @@ m1::@return: scope:[m1] from m1 (byte) m1::return#2 ← (byte) m1::return#4 return to:@return + +(byte()) m2((byte) m2::i) m2: scope:[m2] from main::@3 (byte) m2::i#1 ← phi( main::@3/(byte) m2::i#0 ) (number~) m2::$0 ← (number) $a + (byte) m2::i#1 @@ -256,6 +264,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -294,18 +304,24 @@ main::@2: scope:[main] from main::@5 main::@6: scope:[main] from main::@2 [23] (byte~) main::$4 ← (byte) m1::return#0 to:main::@4 + +(byte()) m1((byte) m1::i) m1: scope:[m1] from main::@2 [24] (byte) m1::return#1 ← (byte) 5 + (byte) m1::i#0 to:m1::@return m1::@return: scope:[m1] from m1 [25] return to:@return + +(byte()) m2((byte) m2::i) m2: scope:[m2] from main::@3 [26] (byte) m2::return#1 ← (byte) $a + (byte) m2::i#0 to:m2::@return m2::@return: scope:[m2] from m2 [27] return to:@return + +(bool()) cond((byte) cond::b) cond: scope:[cond] from main::@1 [28] (bool) cond::return#1 ← (byte) cond::b#0 < (byte) 5 to:cond::@return diff --git a/src/test/ref/ternary-inference.cfg b/src/test/ref/ternary-inference.cfg index 87fb263b1..4b8602182 100644 --- a/src/test/ref/ternary-inference.cfg +++ b/src/test/ref/ternary-inference.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/ternary-inference.log b/src/test/ref/ternary-inference.log index 9f2af3608..b6ac369c9 100644 --- a/src/test/ref/ternary-inference.log +++ b/src/test/ref/ternary-inference.log @@ -5,6 +5,8 @@ Culled Empty Block (label) main::@7 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -150,6 +152,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/test-comments-block.cfg b/src/test/ref/test-comments-block.cfg index 1f6ef7027..640d29f96 100644 --- a/src/test/ref/test-comments-block.cfg +++ b/src/test/ref/test-comments-block.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -27,6 +29,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [14] return to:@return + +(byte()) sum((byte) sum::a , (byte) sum::b) sum: scope:[sum] from main::@1 [15] (byte) sum::return#1 ← (const byte) a#0 + (byte) sum::b#0 to:sum::@return diff --git a/src/test/ref/test-comments-block.log b/src/test/ref/test-comments-block.log index dfd2a27e9..edc079f0d 100644 --- a/src/test/ref/test-comments-block.log +++ b/src/test/ref/test-comments-block.log @@ -8,6 +8,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte) a#0 ← (byte) 'a' to:@2 + +(void()) main() main: scope:[main] from @2 (byte) main::i#0 ← (number) 0 (byte) main::b#0 ← (byte) 0 @@ -34,6 +36,8 @@ main::@3: scope:[main] from main::@1 main::@return: scope:[main] from main::@3 return to:@return + +(byte()) sum((byte) sum::a , (byte) sum::b) sum: scope:[sum] from main::@1 (byte) sum::b#1 ← phi( main::@1/(byte) sum::b#0 ) (byte) sum::a#1 ← phi( main::@1/(byte) sum::a#0 ) @@ -170,6 +174,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -190,6 +196,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [14] return to:@return + +(byte()) sum((byte) sum::a , (byte) sum::b) sum: scope:[sum] from main::@1 [15] (byte) sum::return#1 ← (const byte) a#0 + (byte) sum::b#0 to:sum::@return diff --git a/src/test/ref/test-comments-loop.cfg b/src/test/ref/test-comments-loop.cfg index 17579e7b3..79436a4fe 100644 --- a/src/test/ref/test-comments-loop.cfg +++ b/src/test/ref/test-comments-loop.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/test-comments-loop.log b/src/test/ref/test-comments-loop.log index 942d1933e..1521f0aeb 100644 --- a/src/test/ref/test-comments-loop.log +++ b/src/test/ref/test-comments-loop.log @@ -3,6 +3,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::b#0 ← (byte) 0 @@ -89,6 +91,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/test-comments-single.cfg b/src/test/ref/test-comments-single.cfg index 1f6ef7027..640d29f96 100644 --- a/src/test/ref/test-comments-single.cfg +++ b/src/test/ref/test-comments-single.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -27,6 +29,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [14] return to:@return + +(byte()) sum((byte) sum::a , (byte) sum::b) sum: scope:[sum] from main::@1 [15] (byte) sum::return#1 ← (const byte) a#0 + (byte) sum::b#0 to:sum::@return diff --git a/src/test/ref/test-comments-single.log b/src/test/ref/test-comments-single.log index aedc89ffe..134c068ee 100644 --- a/src/test/ref/test-comments-single.log +++ b/src/test/ref/test-comments-single.log @@ -8,6 +8,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte) a#0 ← (byte) 'a' to:@2 + +(void()) main() main: scope:[main] from @2 (byte) main::i#0 ← (number) 0 (byte) main::b#0 ← (byte) 0 @@ -34,6 +36,8 @@ main::@3: scope:[main] from main::@1 main::@return: scope:[main] from main::@3 return to:@return + +(byte()) sum((byte) sum::a , (byte) sum::b) sum: scope:[sum] from main::@1 (byte) sum::b#1 ← phi( main::@1/(byte) sum::b#0 ) (byte) sum::a#1 ← phi( main::@1/(byte) sum::a#0 ) @@ -170,6 +174,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -190,6 +196,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [14] return to:@return + +(byte()) sum((byte) sum::a , (byte) sum::b) sum: scope:[sum] from main::@1 [15] (byte) sum::return#1 ← (const byte) a#0 + (byte) sum::b#0 to:sum::@return diff --git a/src/test/ref/test-comments-usage.cfg b/src/test/ref/test-comments-usage.cfg index 2ad1a6c23..a9f98ce37 100644 --- a/src/test/ref/test-comments-usage.cfg +++ b/src/test/ref/test-comments-usage.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) 'a' to:main::@return diff --git a/src/test/ref/test-comments-usage.log b/src/test/ref/test-comments-usage.log index 2d4747846..d5742e0f1 100644 --- a/src/test/ref/test-comments-usage.log +++ b/src/test/ref/test-comments-usage.log @@ -3,6 +3,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 *((byte*) SCREEN#0) ← (byte) 'a' to:main::@return @@ -56,6 +58,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) 'a' to:main::@return diff --git a/src/test/ref/test-comparisons-sword.cfg b/src/test/ref/test-comparisons-sword.cfg index 075dd342c..75effe661 100644 --- a/src/test/ref/test-comparisons-sword.cfg +++ b/src/test/ref/test-comparisons-sword.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -66,6 +68,8 @@ main::@7: scope:[main] from main::@6 main::@8: scope:[main] from main::@7 main::@8 [29] phi() to:main::@8 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@5 [30] phi() to:print_ln::@1 @@ -77,6 +81,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [34] return to:@return + +(void()) compare((signed word) compare::w1 , (signed word) compare::w2 , (byte) compare::op) compare: scope:[compare] from main::@3 [35] if((byte) compare::op#0==(const byte) LT#0) goto compare::@1 to:compare::@7 @@ -170,6 +176,8 @@ compare::@18: scope:[compare] from compare::@1 compare::@24: scope:[compare] from compare::@1 compare::@18 [68] (byte) compare::r#17 ← phi( compare::@1/(const byte) FF#0 compare::@18/(const byte) TT#0 ) to:compare::@6 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from compare::@27 print_byte print_byte::@1 print_sword::@1 print_sword::@3 [69] (byte*) print_char_cursor#43 ← phi( compare::@27/(byte*) print_char_cursor#15 print_byte/(byte*) print_char_cursor#15 print_byte::@1/(byte*) print_char_cursor#15 print_sword::@1/(byte*) print_char_cursor#58 print_sword::@3/(byte*) print_char_cursor#58 ) [69] (byte) print_char::ch#5 ← phi( compare::@27/(byte) print_char::ch#4 print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' ) @@ -179,6 +187,8 @@ print_char: scope:[print_char] from compare::@27 print_byte print_byte::@1 prin print_char::@return: scope:[print_char] from print_char [72] return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from compare::@26 compare::@6 [73] (byte*) print_char_cursor#58 ← phi( compare::@6/(byte*) print_char_cursor#64 compare::@26/(byte*) print_char_cursor#2 ) [73] (signed word) print_sword::w#3 ← phi( compare::@6/(signed word) print_sword::w#1 compare::@26/(signed word) print_sword::w#2 ) @@ -203,6 +213,8 @@ print_sword::@1: scope:[print_sword] from print_sword print_sword::@4: scope:[print_sword] from print_sword::@1 [83] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#3 to:print_sword::@2 + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_sword::@2 [84] (byte) print_byte::b#0 ← > (word) print_word::w#0 [85] call print_byte @@ -214,6 +226,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [88] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [89] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) [90] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 @@ -228,6 +242,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [96] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from compare::@25 [97] phi() to:print_str::@1 @@ -244,6 +260,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [102] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [103] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#2 to:print_str::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main [104] phi() [105] call memset @@ -251,6 +269,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [106] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [107] phi() to:memset::@1 diff --git a/src/test/ref/test-comparisons-sword.log b/src/test/ref/test-comparisons-sword.log index 84347a11d..fe9d5428c 100644 --- a/src/test/ref/test-comparisons-sword.log +++ b/src/test/ref/test-comparisons-sword.log @@ -80,6 +80,8 @@ Culled Empty Block (label) compare::@27 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@16 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -127,6 +129,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@33 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from compare::@35 (byte*) print_char_cursor#69 ← phi( compare::@35/(byte*) print_char_cursor#23 ) (byte*) print_str::str#4 ← phi( compare::@35/(byte*) print_str::str#1 ) @@ -149,6 +153,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#30 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from main::@5 (byte*) print_char_cursor#57 ← phi( main::@5/(byte*) print_char_cursor#65 ) (byte*) print_line_cursor#17 ← phi( main::@5/(byte*) print_line_cursor#19 ) @@ -172,6 +178,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#32 return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from compare::@11 compare::@36 (byte*) print_char_cursor#70 ← phi( compare::@11/(byte*) print_char_cursor#67 compare::@36/(byte*) print_char_cursor#24 ) (signed word) print_sword::w#3 ← phi( compare::@11/(signed word) print_sword::w#1 compare::@36/(signed word) print_sword::w#2 ) @@ -218,6 +226,8 @@ print_sword::@return: scope:[print_sword] from print_sword::@7 (byte*) print_char_cursor#8 ← (byte*) print_char_cursor#36 return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_sword::@2 (byte*) print_char_cursor#61 ← phi( print_sword::@2/(byte*) print_char_cursor#60 ) (word) print_word::w#1 ← phi( print_sword::@2/(word) print_word::w#0 ) @@ -248,6 +258,8 @@ print_word::@return: scope:[print_word] from print_word::@2 (byte*) print_line_cursor#28 ← phi( @16/(byte*) print_line_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $0 to:@40 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) print_char_cursor#62 ← phi( print_word/(byte*) print_char_cursor#61 print_word::@1/(byte*) print_char_cursor#9 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -272,6 +284,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#14 ← (byte*) print_char_cursor#42 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from compare::@37 print_byte print_byte::@1 print_sword::@1 print_sword::@3 (byte*) print_char_cursor#43 ← phi( compare::@37/(byte*) print_char_cursor#25 print_byte/(byte*) print_char_cursor#62 print_byte::@1/(byte*) print_char_cursor#12 print_sword::@1/(byte*) print_char_cursor#58 print_sword::@3/(byte*) print_char_cursor#59 ) (byte) print_char::ch#5 ← phi( compare::@37/(byte) print_char::ch#4 print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sword::@1/(byte) print_char::ch#0 print_sword::@3/(byte) print_char::ch#1 ) @@ -283,6 +297,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#16 ← (byte*) print_char_cursor#44 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main (byte*) print_screen#1 ← phi( main/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -309,6 +325,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte*) print_line_cursor#27 ← phi( @33/(byte*) print_line_cursor#28 ) (signed word[]) swords#0 ← { (number) -$6fed, (number) $12, (number) $7fed } to:@41 + +(void()) main() main: scope:[main] from @42 (byte*) print_char_cursor#63 ← phi( @42/(byte*) print_char_cursor#68 ) (byte*) print_line_cursor#18 ← phi( @42/(byte*) print_line_cursor#21 ) @@ -453,6 +471,8 @@ main::@return: scope:[main] from main::@9 (byte) FF#0 ← (number) $57 (byte) TT#0 ← (number) $51 to:@42 + +(void()) compare((signed word) compare::w1 , (signed word) compare::w2 , (byte) compare::op) compare: scope:[compare] from main::@3 (byte*) print_char_cursor#99 ← phi( main::@3/(byte*) print_char_cursor#64 ) (signed word) compare::w2#8 ← phi( main::@3/(signed word) compare::w2#0 ) @@ -1801,6 +1821,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -1860,6 +1882,8 @@ main::@7: scope:[main] from main::@6 main::@8: scope:[main] from main::@7 main::@8 [29] phi() to:main::@8 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@5 [30] phi() to:print_ln::@1 @@ -1871,6 +1895,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [34] return to:@return + +(void()) compare((signed word) compare::w1 , (signed word) compare::w2 , (byte) compare::op) compare: scope:[compare] from main::@3 [35] if((byte) compare::op#0==(const byte) LT#0) goto compare::@1 to:compare::@7 @@ -1964,6 +1990,8 @@ compare::@18: scope:[compare] from compare::@1 compare::@24: scope:[compare] from compare::@1 compare::@18 [68] (byte) compare::r#17 ← phi( compare::@1/(const byte) FF#0 compare::@18/(const byte) TT#0 ) to:compare::@6 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from compare::@27 print_byte print_byte::@1 print_sword::@1 print_sword::@3 [69] (byte*) print_char_cursor#43 ← phi( compare::@27/(byte*) print_char_cursor#15 print_byte/(byte*) print_char_cursor#15 print_byte::@1/(byte*) print_char_cursor#15 print_sword::@1/(byte*) print_char_cursor#58 print_sword::@3/(byte*) print_char_cursor#58 ) [69] (byte) print_char::ch#5 ← phi( compare::@27/(byte) print_char::ch#4 print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' ) @@ -1973,6 +2001,8 @@ print_char: scope:[print_char] from compare::@27 print_byte print_byte::@1 prin print_char::@return: scope:[print_char] from print_char [72] return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from compare::@26 compare::@6 [73] (byte*) print_char_cursor#58 ← phi( compare::@6/(byte*) print_char_cursor#64 compare::@26/(byte*) print_char_cursor#2 ) [73] (signed word) print_sword::w#3 ← phi( compare::@6/(signed word) print_sword::w#1 compare::@26/(signed word) print_sword::w#2 ) @@ -1997,6 +2027,8 @@ print_sword::@1: scope:[print_sword] from print_sword print_sword::@4: scope:[print_sword] from print_sword::@1 [83] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#3 to:print_sword::@2 + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_sword::@2 [84] (byte) print_byte::b#0 ← > (word) print_word::w#0 [85] call print_byte @@ -2008,6 +2040,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [88] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [89] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) [90] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 @@ -2022,6 +2056,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [96] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from compare::@25 [97] phi() to:print_str::@1 @@ -2038,6 +2074,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [102] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [103] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#2 to:print_str::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main [104] phi() [105] call memset @@ -2045,6 +2083,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [106] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [107] phi() to:memset::@1 diff --git a/src/test/ref/test-comparisons-word.cfg b/src/test/ref/test-comparisons-word.cfg index 6542823a4..7b48dc02c 100644 --- a/src/test/ref/test-comparisons-word.cfg +++ b/src/test/ref/test-comparisons-word.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -66,6 +68,8 @@ main::@7: scope:[main] from main::@6 main::@8: scope:[main] from main::@7 main::@8 [29] phi() to:main::@8 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@5 [30] phi() to:print_ln::@1 @@ -77,6 +81,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [34] return to:@return + +(void()) compare((word) compare::w1 , (word) compare::w2 , (byte) compare::op) compare: scope:[compare] from main::@3 [35] if((byte) compare::op#0==(byte) 0) goto compare::@1 to:compare::@7 @@ -174,6 +180,8 @@ compare::@18: scope:[compare] from compare::@1 compare::@24: scope:[compare] from compare::@1 compare::@18 [70] (byte) compare::r#17 ← phi( compare::@1/(const byte) FF#0 compare::@18/(const byte) TT#0 ) to:compare::@6 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from compare::@27 compare::@28 print_byte print_byte::@1 [71] (byte*) print_char_cursor#36 ← phi( compare::@27/(byte*) print_char_cursor#11 compare::@28/(byte*) print_char_cursor#11 print_byte/(byte*) print_char_cursor#53 print_byte::@1/(byte*) print_char_cursor#11 ) [71] (byte) print_char::ch#4 ← phi( compare::@27/(byte) print_char::ch#2 compare::@28/(byte) ' ' print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -183,6 +191,8 @@ print_char: scope:[print_char] from compare::@27 compare::@28 print_byte print_ print_char::@return: scope:[print_char] from print_char [74] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from compare::@26 compare::@6 [75] (byte*) print_char_cursor#52 ← phi( compare::@6/(byte*) print_char_cursor#55 compare::@26/(byte*) print_char_cursor#2 ) [75] (word) print_word::w#2 ← phi( compare::@6/(word) print_word::w#0 compare::@26/(word) print_word::w#1 ) @@ -196,6 +206,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [80] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [81] (byte*) print_char_cursor#53 ← phi( print_word/(byte*) print_char_cursor#52 print_word::@1/(byte*) print_char_cursor#11 ) [81] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -211,6 +223,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [88] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from compare::@25 [89] phi() to:print_str::@1 @@ -227,6 +241,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [94] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [95] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#2 to:print_str::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main [96] phi() [97] call memset @@ -234,6 +250,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [98] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [99] phi() to:memset::@1 diff --git a/src/test/ref/test-comparisons-word.log b/src/test/ref/test-comparisons-word.log index 162a0bc05..2395f4398 100644 --- a/src/test/ref/test-comparisons-word.log +++ b/src/test/ref/test-comparisons-word.log @@ -79,6 +79,8 @@ Culled Empty Block (label) compare::@27 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@16 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -126,6 +128,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@33 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from compare::@35 (byte*) print_char_cursor#60 ← phi( compare::@35/(byte*) print_char_cursor#19 ) (byte*) print_str::str#4 ← phi( compare::@35/(byte*) print_str::str#1 ) @@ -148,6 +152,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#27 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from main::@5 (byte*) print_char_cursor#51 ← phi( main::@5/(byte*) print_char_cursor#56 ) (byte*) print_line_cursor#17 ← phi( main::@5/(byte*) print_line_cursor#19 ) @@ -171,6 +177,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#29 return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from compare::@11 compare::@36 (byte*) print_char_cursor#52 ← phi( compare::@11/(byte*) print_char_cursor#58 compare::@36/(byte*) print_char_cursor#20 ) (word) print_word::w#2 ← phi( compare::@11/(word) print_word::w#0 compare::@36/(word) print_word::w#1 ) @@ -201,6 +209,8 @@ print_word::@return: scope:[print_word] from print_word::@2 (byte*) print_line_cursor#28 ← phi( @16/(byte*) print_line_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $0 to:@40 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) print_char_cursor#53 ← phi( print_word/(byte*) print_char_cursor#52 print_word::@1/(byte*) print_char_cursor#5 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -225,6 +235,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#10 ← (byte*) print_char_cursor#35 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from compare::@37 compare::@38 print_byte print_byte::@1 (byte*) print_char_cursor#36 ← phi( compare::@37/(byte*) print_char_cursor#21 compare::@38/(byte*) print_char_cursor#22 print_byte/(byte*) print_char_cursor#53 print_byte::@1/(byte*) print_char_cursor#8 ) (byte) print_char::ch#4 ← phi( compare::@37/(byte) print_char::ch#2 compare::@38/(byte) print_char::ch#3 print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -236,6 +248,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#12 ← (byte*) print_char_cursor#37 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main (byte*) print_screen#1 ← phi( main/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -262,6 +276,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte*) print_line_cursor#27 ← phi( @33/(byte*) print_line_cursor#28 ) (word[]) words#0 ← { (number) $12, (number) $3f34, (number) $cfed } to:@41 + +(void()) main() main: scope:[main] from @42 (byte*) print_char_cursor#54 ← phi( @42/(byte*) print_char_cursor#59 ) (byte*) print_line_cursor#18 ← phi( @42/(byte*) print_line_cursor#21 ) @@ -400,6 +416,8 @@ main::@return: scope:[main] from main::@9 (byte) FF#0 ← (number) $57 (byte) TT#0 ← (number) $51 to:@42 + +(void()) compare((word) compare::w1 , (word) compare::w2 , (byte) compare::op) compare: scope:[compare] from main::@3 (byte*) print_char_cursor#89 ← phi( main::@3/(byte*) print_char_cursor#55 ) (word) compare::w2#8 ← phi( main::@3/(word) compare::w2#0 ) @@ -1673,6 +1691,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -1732,6 +1752,8 @@ main::@7: scope:[main] from main::@6 main::@8: scope:[main] from main::@7 main::@8 [29] phi() to:main::@8 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@5 [30] phi() to:print_ln::@1 @@ -1743,6 +1765,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [34] return to:@return + +(void()) compare((word) compare::w1 , (word) compare::w2 , (byte) compare::op) compare: scope:[compare] from main::@3 [35] if((byte) compare::op#0==(byte) 0) goto compare::@1 to:compare::@7 @@ -1840,6 +1864,8 @@ compare::@18: scope:[compare] from compare::@1 compare::@24: scope:[compare] from compare::@1 compare::@18 [70] (byte) compare::r#17 ← phi( compare::@1/(const byte) FF#0 compare::@18/(const byte) TT#0 ) to:compare::@6 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from compare::@27 compare::@28 print_byte print_byte::@1 [71] (byte*) print_char_cursor#36 ← phi( compare::@27/(byte*) print_char_cursor#11 compare::@28/(byte*) print_char_cursor#11 print_byte/(byte*) print_char_cursor#53 print_byte::@1/(byte*) print_char_cursor#11 ) [71] (byte) print_char::ch#4 ← phi( compare::@27/(byte) print_char::ch#2 compare::@28/(byte) ' ' print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -1849,6 +1875,8 @@ print_char: scope:[print_char] from compare::@27 compare::@28 print_byte print_ print_char::@return: scope:[print_char] from print_char [74] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from compare::@26 compare::@6 [75] (byte*) print_char_cursor#52 ← phi( compare::@6/(byte*) print_char_cursor#55 compare::@26/(byte*) print_char_cursor#2 ) [75] (word) print_word::w#2 ← phi( compare::@6/(word) print_word::w#0 compare::@26/(word) print_word::w#1 ) @@ -1862,6 +1890,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [80] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [81] (byte*) print_char_cursor#53 ← phi( print_word/(byte*) print_char_cursor#52 print_word::@1/(byte*) print_char_cursor#11 ) [81] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -1877,6 +1907,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [88] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from compare::@25 [89] phi() to:print_str::@1 @@ -1893,6 +1925,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [94] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [95] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#2 to:print_str::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main [96] phi() [97] call memset @@ -1900,6 +1934,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [98] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [99] phi() to:memset::@1 diff --git a/src/test/ref/test-comparisons.cfg b/src/test/ref/test-comparisons.cfg index 1eea4f553..0266bfe0d 100644 --- a/src/test/ref/test-comparisons.cfg +++ b/src/test/ref/test-comparisons.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -306,6 +308,8 @@ main::@42: scope:[main] from main::@42 main::@67 main::@68: scope:[main] from main::@67 [161] (byte*~) print_char_cursor#151 ← (byte*) print_line_cursor#1 to:main::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@46 main::@51 main::@56 main::@61 main::@66 [162] (byte*) print_line_cursor#25 ← phi( main::@46/(byte*) print_line_cursor#27 main::@51/(byte*) print_line_cursor#1 main::@56/(byte*) print_line_cursor#1 main::@61/(byte*) print_line_cursor#1 main::@66/(byte*) print_line_cursor#1 ) to:print_ln::@1 @@ -317,6 +321,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [166] return to:@return + +(void()) printu((byte) printu::a , (byte[]) printu::op , (byte) printu::b , (byte) printu::res) printu: scope:[printu] from main::@10 main::@11 main::@12 main::@13 main::@14 main::@15 main::@16 main::@17 main::@18 main::@19 main::@2 main::@20 main::@21 main::@3 main::@4 main::@5 main::@6 main::@7 main::@8 main::@9 [167] (byte) printu::res#20 ← phi( main::@10/(byte) printu::res#8 main::@11/(byte) printu::res#9 main::@12/(byte) printu::res#10 main::@13/(byte) printu::res#11 main::@14/(byte) printu::res#12 main::@15/(byte) printu::res#13 main::@16/(byte) printu::res#14 main::@17/(byte) printu::res#15 main::@18/(byte) printu::res#16 main::@19/(byte) printu::res#17 main::@2/(byte) printu::res#0 main::@20/(byte) printu::res#18 main::@21/(byte) printu::res#19 main::@3/(byte) printu::res#1 main::@4/(byte) printu::res#2 main::@5/(byte) printu::res#3 main::@6/(byte) printu::res#4 main::@7/(byte) printu::res#5 main::@8/(byte) printu::res#6 main::@9/(byte) printu::res#7 ) [167] (byte) printu::b#20 ← phi( main::@10/(byte) printu::b#8 main::@11/(byte) $37 main::@12/(byte) printu::b#10 main::@13/(byte) printu::b#11 main::@14/(byte) printu::b#12 main::@15/(byte) $37 main::@16/(byte) printu::b#14 main::@17/(byte) printu::b#15 main::@18/(byte) printu::b#16 main::@19/(byte) $37 main::@2/(byte) printu::b#0 main::@20/(byte) printu::b#18 main::@21/(byte) printu::b#19 main::@3/(byte) $37 main::@4/(byte) printu::b#2 main::@5/(byte) printu::b#3 main::@6/(byte) printu::b#4 main::@7/(byte) $37 main::@8/(byte) printu::b#6 main::@9/(byte) printu::b#7 ) @@ -348,6 +354,8 @@ printu::@5: scope:[printu] from printu::@4 printu::@return: scope:[printu] from printu::@5 [179] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 printu printu::@4 printu::@5 [180] (byte*) print_char_cursor#54 ← phi( print_byte/(byte*) print_char_cursor#94 print_byte::@1/(byte*) print_char_cursor#55 printu/(byte*) print_char_cursor#95 printu::@4/(byte*) print_char_cursor#55 printu::@5/(byte*) print_char_cursor#55 ) [180] (byte) print_char::ch#5 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 printu/(byte) ' ' printu::@4/(byte) ' ' printu::@5/(byte) print_char::ch#4 ) @@ -357,6 +365,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 printu printu::@4 print_char::@return: scope:[print_char] from print_char [183] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from printu::@1 printu::@3 [184] (byte*) print_char_cursor#94 ← phi( printu::@1/(byte*) print_char_cursor#55 printu::@3/(byte*) print_char_cursor#2 ) [184] (byte) print_byte::b#2 ← phi( printu::@1/(byte) print_byte::b#0 printu::@3/(byte) print_byte::b#1 ) @@ -372,6 +382,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [191] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from printu::@2 [192] phi() to:print_str::@1 @@ -388,6 +400,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [197] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [198] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#2 to:print_str::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main [199] phi() [200] call memset @@ -395,6 +409,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [201] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [202] phi() to:memset::@1 diff --git a/src/test/ref/test-comparisons.log b/src/test/ref/test-comparisons.log index 9358a5cb7..ca17913d8 100644 --- a/src/test/ref/test-comparisons.log +++ b/src/test/ref/test-comparisons.log @@ -60,6 +60,8 @@ Culled Empty Block (label) @37 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@12 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -107,6 +109,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@29 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from printu::@2 (byte*) print_char_cursor#119 ← phi( printu::@2/(byte*) print_char_cursor#40 ) (byte*) print_str::str#4 ← phi( printu::@2/(byte*) print_str::str#1 ) @@ -129,6 +133,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#48 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from main::@49 main::@54 main::@59 main::@64 main::@69 (byte*) print_char_cursor#93 ← phi( main::@49/(byte*) print_char_cursor#16 main::@54/(byte*) print_char_cursor#21 main::@59/(byte*) print_char_cursor#26 main::@64/(byte*) print_char_cursor#31 main::@69/(byte*) print_char_cursor#36 ) (byte*) print_line_cursor#25 ← phi( main::@49/(byte*) print_line_cursor#27 main::@54/(byte*) print_line_cursor#28 main::@59/(byte*) print_line_cursor#29 main::@64/(byte*) print_line_cursor#30 main::@69/(byte*) print_line_cursor#31 ) @@ -158,6 +164,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_line_cursor#39 ← phi( @12/(byte*) print_line_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $0 to:@38 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from printu::@1 printu::@3 (byte*) print_char_cursor#94 ← phi( printu::@1/(byte*) print_char_cursor#39 printu::@3/(byte*) print_char_cursor#41 ) (byte) print_byte::b#2 ← phi( printu::@1/(byte) print_byte::b#0 printu::@3/(byte) print_byte::b#1 ) @@ -182,6 +190,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#7 ← (byte*) print_char_cursor#53 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 printu printu::@4 printu::@5 (byte*) print_char_cursor#54 ← phi( print_byte/(byte*) print_char_cursor#94 print_byte::@1/(byte*) print_char_cursor#5 printu/(byte*) print_char_cursor#95 printu::@4/(byte*) print_char_cursor#42 printu::@5/(byte*) print_char_cursor#43 ) (byte) print_char::ch#5 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 printu/(byte) print_char::ch#2 printu::@4/(byte) print_char::ch#3 printu::@5/(byte) print_char::ch#4 ) @@ -193,6 +203,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#9 ← (byte*) print_char_cursor#55 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main (byte*) print_screen#1 ← phi( main/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -213,6 +225,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte*) print_char_cursor#11 ← (byte*) print_char_cursor#56 return to:@return + +(void()) main() main: scope:[main] from @38 (byte*) print_char_cursor#96 ← phi( @38/(byte*) print_char_cursor#118 ) (byte*) print_line_cursor#26 ← phi( @38/(byte*) print_line_cursor#33 ) @@ -953,6 +967,8 @@ main::@return: scope:[main] from main::@43 (byte*) print_char_cursor#38 ← (byte*) print_char_cursor#83 return to:@return + +(void()) printu((byte) printu::a , (byte[]) printu::op , (byte) printu::b , (byte) printu::res) printu: scope:[printu] from main::@10 main::@11 main::@12 main::@13 main::@14 main::@15 main::@16 main::@17 main::@18 main::@19 main::@2 main::@20 main::@21 main::@3 main::@4 main::@5 main::@6 main::@7 main::@8 main::@9 (byte) printu::res#25 ← phi( main::@10/(byte) printu::res#8 main::@11/(byte) printu::res#9 main::@12/(byte) printu::res#10 main::@13/(byte) printu::res#11 main::@14/(byte) printu::res#12 main::@15/(byte) printu::res#13 main::@16/(byte) printu::res#14 main::@17/(byte) printu::res#15 main::@18/(byte) printu::res#16 main::@19/(byte) printu::res#17 main::@2/(byte) printu::res#0 main::@20/(byte) printu::res#18 main::@21/(byte) printu::res#19 main::@3/(byte) printu::res#1 main::@4/(byte) printu::res#2 main::@5/(byte) printu::res#3 main::@6/(byte) printu::res#4 main::@7/(byte) printu::res#5 main::@8/(byte) printu::res#6 main::@9/(byte) printu::res#7 ) (byte) printu::b#23 ← phi( main::@10/(byte) printu::b#8 main::@11/(byte) printu::b#9 main::@12/(byte) printu::b#10 main::@13/(byte) printu::b#11 main::@14/(byte) printu::b#12 main::@15/(byte) printu::b#13 main::@16/(byte) printu::b#14 main::@17/(byte) printu::b#15 main::@18/(byte) printu::b#16 main::@19/(byte) printu::b#17 main::@2/(byte) printu::b#0 main::@20/(byte) printu::b#18 main::@21/(byte) printu::b#19 main::@3/(byte) printu::b#1 main::@4/(byte) printu::b#2 main::@5/(byte) printu::b#3 main::@6/(byte) printu::b#4 main::@7/(byte) printu::b#5 main::@8/(byte) printu::b#6 main::@9/(byte) printu::b#7 ) @@ -2751,6 +2767,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -3050,6 +3068,8 @@ main::@42: scope:[main] from main::@42 main::@67 main::@68: scope:[main] from main::@67 [161] (byte*~) print_char_cursor#151 ← (byte*) print_line_cursor#1 to:main::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@46 main::@51 main::@56 main::@61 main::@66 [162] (byte*) print_line_cursor#25 ← phi( main::@46/(byte*) print_line_cursor#27 main::@51/(byte*) print_line_cursor#1 main::@56/(byte*) print_line_cursor#1 main::@61/(byte*) print_line_cursor#1 main::@66/(byte*) print_line_cursor#1 ) to:print_ln::@1 @@ -3061,6 +3081,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [166] return to:@return + +(void()) printu((byte) printu::a , (byte[]) printu::op , (byte) printu::b , (byte) printu::res) printu: scope:[printu] from main::@10 main::@11 main::@12 main::@13 main::@14 main::@15 main::@16 main::@17 main::@18 main::@19 main::@2 main::@20 main::@21 main::@3 main::@4 main::@5 main::@6 main::@7 main::@8 main::@9 [167] (byte) printu::res#20 ← phi( main::@10/(byte) printu::res#8 main::@11/(byte) printu::res#9 main::@12/(byte) printu::res#10 main::@13/(byte) printu::res#11 main::@14/(byte) printu::res#12 main::@15/(byte) printu::res#13 main::@16/(byte) printu::res#14 main::@17/(byte) printu::res#15 main::@18/(byte) printu::res#16 main::@19/(byte) printu::res#17 main::@2/(byte) printu::res#0 main::@20/(byte) printu::res#18 main::@21/(byte) printu::res#19 main::@3/(byte) printu::res#1 main::@4/(byte) printu::res#2 main::@5/(byte) printu::res#3 main::@6/(byte) printu::res#4 main::@7/(byte) printu::res#5 main::@8/(byte) printu::res#6 main::@9/(byte) printu::res#7 ) [167] (byte) printu::b#20 ← phi( main::@10/(byte) printu::b#8 main::@11/(byte) $37 main::@12/(byte) printu::b#10 main::@13/(byte) printu::b#11 main::@14/(byte) printu::b#12 main::@15/(byte) $37 main::@16/(byte) printu::b#14 main::@17/(byte) printu::b#15 main::@18/(byte) printu::b#16 main::@19/(byte) $37 main::@2/(byte) printu::b#0 main::@20/(byte) printu::b#18 main::@21/(byte) printu::b#19 main::@3/(byte) $37 main::@4/(byte) printu::b#2 main::@5/(byte) printu::b#3 main::@6/(byte) printu::b#4 main::@7/(byte) $37 main::@8/(byte) printu::b#6 main::@9/(byte) printu::b#7 ) @@ -3092,6 +3114,8 @@ printu::@5: scope:[printu] from printu::@4 printu::@return: scope:[printu] from printu::@5 [179] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 printu printu::@4 printu::@5 [180] (byte*) print_char_cursor#54 ← phi( print_byte/(byte*) print_char_cursor#94 print_byte::@1/(byte*) print_char_cursor#55 printu/(byte*) print_char_cursor#95 printu::@4/(byte*) print_char_cursor#55 printu::@5/(byte*) print_char_cursor#55 ) [180] (byte) print_char::ch#5 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 printu/(byte) ' ' printu::@4/(byte) ' ' printu::@5/(byte) print_char::ch#4 ) @@ -3101,6 +3125,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 printu printu::@4 print_char::@return: scope:[print_char] from print_char [183] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from printu::@1 printu::@3 [184] (byte*) print_char_cursor#94 ← phi( printu::@1/(byte*) print_char_cursor#55 printu::@3/(byte*) print_char_cursor#2 ) [184] (byte) print_byte::b#2 ← phi( printu::@1/(byte) print_byte::b#0 printu::@3/(byte) print_byte::b#1 ) @@ -3116,6 +3142,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [191] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from printu::@2 [192] phi() to:print_str::@1 @@ -3132,6 +3160,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [197] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 [198] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#2 to:print_str::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main [199] phi() [200] call memset @@ -3139,6 +3169,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [201] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [202] phi() to:memset::@1 diff --git a/src/test/ref/test-division.cfg b/src/test/ref/test-division.cfg index f8e5d0f24..7c6c91cb7 100644 --- a/src/test/ref/test-division.cfg +++ b/src/test/ref/test-division.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -30,6 +32,8 @@ main::@4: scope:[main] from main::@3 main::@return: scope:[main] from main::@4 [14] return to:@return + +(void()) test_16s() test_16s: scope:[test_16s] from main::@4 [15] phi() to:test_16s::@1 @@ -84,6 +88,8 @@ test_16s::@10: scope:[test_16s] from test_16s::@9 test_16s::@return: scope:[test_16s] from test_16s::@10 [44] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from test_16s::@9 test_16u::@9 test_8s::@9 test_8u::@9 [45] (byte*) print_line_cursor#39 ← phi( test_16s::@9/(byte*) print_line_cursor#1 test_16u::@9/(byte*) print_line_cursor#1 test_8s::@9/(byte*) print_line_cursor#1 test_8u::@9/(byte*) print_line_cursor#41 ) to:print_ln::@1 @@ -95,6 +101,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [49] return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from test_16s::@2 test_16s::@4 test_16s::@6 test_16s::@8 [50] (byte*) print_char_cursor#132 ← phi( test_16s::@2/(byte*~) print_char_cursor#164 test_16s::@4/(byte*) print_char_cursor#130 test_16s::@6/(byte*) print_char_cursor#130 test_16s::@8/(byte*) print_char_cursor#130 ) [50] (signed word) print_sword::w#10 ← phi( test_16s::@2/(signed word) print_sword::w#1 test_16s::@4/(signed word) print_sword::w#2 test_16s::@6/(signed word) print_sword::w#3 test_16s::@8/(signed word) print_sword::w#4 ) @@ -119,6 +127,8 @@ print_sword::@1: scope:[print_sword] from print_sword print_sword::@4: scope:[print_sword] from print_sword::@1 [60] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#10 to:print_sword::@2 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sbyte::@3 print_sword::@1 print_sword::@3 [61] (byte*) print_char_cursor#84 ← phi( print_byte/(byte*) print_char_cursor#139 print_byte::@1/(byte*) print_char_cursor#19 print_sbyte::@1/(byte*) print_char_cursor#135 print_sbyte::@3/(byte*) print_char_cursor#135 print_sword::@1/(byte*) print_char_cursor#132 print_sword::@3/(byte*) print_char_cursor#132 ) [61] (byte) print_char::ch#6 ← phi( print_byte/(byte) print_char::ch#4 print_byte::@1/(byte) print_char::ch#5 print_sbyte::@1/(byte) '-' print_sbyte::@3/(byte) ' ' print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' ) @@ -128,6 +138,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 p print_char::@return: scope:[print_char] from print_char [64] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_sword::@2 test_16u::@2 test_16u::@4 test_16u::@6 test_16u::@8 [65] (byte*) print_char_cursor#138 ← phi( print_sword::@2/(byte*) print_char_cursor#19 test_16u::@2/(byte*~) print_char_cursor#173 test_16u::@4/(byte*) print_char_cursor#130 test_16u::@6/(byte*) print_char_cursor#130 test_16u::@8/(byte*) print_char_cursor#130 ) [65] (word) print_word::w#5 ← phi( print_sword::@2/(word) print_word::w#0 test_16u::@2/(word) print_word::w#1 test_16u::@4/(word) print_word::w#2 test_16u::@6/(word) print_word::w#3 test_16u::@8/(word) print_word::w#4 ) @@ -141,6 +153,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [70] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_sbyte::@2 print_word print_word::@1 test_8u::@2 test_8u::@4 test_8u::@6 test_8u::@8 [71] (byte*) print_char_cursor#139 ← phi( print_sbyte::@2/(byte*) print_char_cursor#19 print_word/(byte*) print_char_cursor#138 print_word::@1/(byte*) print_char_cursor#19 test_8u::@2/(byte*) print_char_cursor#141 test_8u::@4/(byte*) print_char_cursor#130 test_8u::@6/(byte*) print_char_cursor#130 test_8u::@8/(byte*) print_char_cursor#130 ) [71] (byte) print_byte::b#7 ← phi( print_sbyte::@2/(byte) print_byte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 test_8u::@2/(byte) print_byte::b#3 test_8u::@4/(byte) print_byte::b#4 test_8u::@6/(byte) print_byte::b#5 test_8u::@8/(byte) print_byte::b#6 ) @@ -156,6 +170,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [78] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from test_16s::@3 test_16s::@5 test_16s::@7 test_16u::@3 test_16u::@5 test_16u::@7 test_8s::@3 test_8s::@5 test_8s::@7 test_8u::@3 test_8u::@5 test_8u::@7 [79] (byte*) print_str::str#15 ← phi( test_16s::@3/(const string) str test_16s::@5/(const string) str1 test_16s::@7/(const string) str2 test_16u::@3/(const string) str test_16u::@5/(const string) str1 test_16u::@7/(const string) str2 test_8s::@3/(const string) str test_8s::@5/(const string) str1 test_8s::@7/(const string) str2 test_8u::@3/(const string) str test_8u::@5/(const string) str1 test_8u::@7/(const string) str2 ) to:print_str::@1 @@ -172,6 +188,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [84] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#130 [85] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#13 to:print_str::@1 + +(signed word()) div16s((signed word) div16s::dividend , (signed word) div16s::divisor) div16s: scope:[div16s] from test_16s::@1 [86] (signed word) divr16s::dividend#0 ← (signed word) div16s::dividend#0 [87] (signed word) divr16s::divisor#0 ← (signed word) div16s::divisor#0 @@ -184,6 +202,8 @@ div16s::@1: scope:[div16s] from div16s div16s::@return: scope:[div16s] from div16s::@1 [91] return to:@return + +(signed word()) divr16s((signed word) divr16s::dividend , (signed word) divr16s::divisor , (signed word) divr16s::rem) divr16s: scope:[divr16s] from div16s [92] if((signed word) divr16s::dividend#0<(signed byte) 0) goto divr16s::@1 to:divr16s::@6 @@ -233,6 +253,8 @@ divr16s::@1: scope:[divr16s] from divr16s [114] (signed word) divr16s::dividendu#1 ← - (signed word) divr16s::dividend#0 [115] (word~) divr16s::dividendu#7 ← (word)(signed word) divr16s::dividendu#1 to:divr16s::@2 + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div16u divr16s::@4 [116] (word) divr16u::divisor#6 ← phi( div16u/(word) divr16u::divisor#0 divr16s::@4/(word) divr16u::divisor#1 ) [116] (word) divr16u::dividend#5 ← phi( div16u/(word) divr16u::dividend#1 divr16s::@4/(word) divr16u::dividend#2 ) @@ -272,6 +294,8 @@ divr16u::@6: scope:[divr16u] from divr16u::@3 divr16u::@return: scope:[divr16u] from divr16u::@6 [133] return to:@return + +(void()) test_8s() test_8s: scope:[test_8s] from main::@3 [134] phi() to:test_8s::@1 @@ -325,6 +349,8 @@ test_8s::@10: scope:[test_8s] from test_8s::@9 test_8s::@return: scope:[test_8s] from test_8s::@10 [162] return to:@return + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from test_8s::@2 test_8s::@4 test_8s::@6 test_8s::@8 [163] (byte*) print_char_cursor#135 ← phi( test_8s::@2/(byte*~) print_char_cursor#168 test_8s::@4/(byte*) print_char_cursor#130 test_8s::@6/(byte*) print_char_cursor#130 test_8s::@8/(byte*) print_char_cursor#130 ) [163] (signed byte) print_sbyte::b#10 ← phi( test_8s::@2/(signed byte) print_sbyte::b#1 test_8s::@4/(signed byte) print_sbyte::b#2 test_8s::@6/(signed byte) print_sbyte::b#3 test_8s::@8/(signed byte) print_sbyte::b#4 ) @@ -349,6 +375,8 @@ print_sbyte::@1: scope:[print_sbyte] from print_sbyte print_sbyte::@4: scope:[print_sbyte] from print_sbyte::@1 [173] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#10 to:print_sbyte::@2 + +(signed byte()) div8s((signed byte) div8s::dividend , (signed byte) div8s::divisor) div8s: scope:[div8s] from test_8s::@1 [174] if((signed byte) div8s::dividend#0<(signed byte) 0) goto div8s::@1 to:div8s::@6 @@ -398,6 +426,8 @@ div8s::@1: scope:[div8s] from div8s [196] (signed byte) div8s::dividendu#1 ← - (signed byte) div8s::dividend#0 [197] (byte~) div8s::dividendu#7 ← (byte)(signed byte) div8s::dividendu#1 to:div8s::@2 + +(byte()) div8u((byte) div8u::dividend , (byte) div8u::divisor) div8u: scope:[div8u] from div8s::@4 test_8u::@1 [198] (byte) div8u::divisor#2 ← phi( div8s::@4/(byte) div8u::divisor#0 test_8u::@1/(byte) div8u::divisor#1 ) [198] (byte) div8u::dividend#2 ← phi( div8s::@4/(byte) div8u::dividend#0 test_8u::@1/(byte) div8u::dividend#1 ) @@ -412,6 +442,8 @@ div8u::@1: scope:[div8u] from div8u div8u::@return: scope:[div8u] from div8u::@1 [204] return to:@return + +(byte()) divr8u((byte) divr8u::dividend , (byte) divr8u::divisor , (byte) divr8u::rem) divr8u: scope:[divr8u] from div8u [205] phi() to:divr8u::@1 @@ -449,6 +481,8 @@ divr8u::@6: scope:[divr8u] from divr8u::@3 divr8u::@return: scope:[divr8u] from divr8u::@6 [221] return to:@return + +(void()) test_16u() test_16u: scope:[test_16u] from main::@2 [222] phi() to:test_16u::@1 @@ -503,6 +537,8 @@ test_16u::@10: scope:[test_16u] from test_16u::@9 test_16u::@return: scope:[test_16u] from test_16u::@10 [251] return to:@return + +(word()) div16u((word) div16u::dividend , (word) div16u::divisor) div16u: scope:[div16u] from test_16u::@1 [252] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 [253] (word) divr16u::divisor#0 ← (word) div16u::divisor#0 @@ -515,6 +551,8 @@ div16u::@1: scope:[div16u] from div16u div16u::@return: scope:[div16u] from div16u::@1 [257] return to:@return + +(void()) test_8u() test_8u: scope:[test_8u] from main::@1 [258] phi() to:test_8u::@1 @@ -572,6 +610,8 @@ test_8u::@return: scope:[test_8u] from test_8u::@10 test_8u::@11: scope:[test_8u] from test_8u::@10 [286] (byte*~) print_char_cursor#190 ← (byte*) print_line_cursor#1 to:test_8u::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main [287] phi() [288] call memset @@ -579,6 +619,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [289] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [290] phi() to:memset::@1 diff --git a/src/test/ref/test-division.log b/src/test/ref/test-division.log index e411259eb..fe56ee3ab 100644 --- a/src/test/ref/test-division.log +++ b/src/test/ref/test-division.log @@ -93,6 +93,8 @@ Culled Empty Block (label) test_16s::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@12 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -140,6 +142,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@29 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from test_16s::@4 test_16s::@6 test_16s::@8 test_16u::@4 test_16u::@6 test_16u::@8 test_8s::@4 test_8s::@6 test_8s::@8 test_8u::@4 test_8u::@6 test_8u::@8 (byte*) print_char_cursor#146 ← phi( test_16s::@4/(byte*) print_char_cursor#56 test_16s::@6/(byte*) print_char_cursor#58 test_16s::@8/(byte*) print_char_cursor#60 test_16u::@4/(byte*) print_char_cursor#38 test_16u::@6/(byte*) print_char_cursor#40 test_16u::@8/(byte*) print_char_cursor#42 test_8s::@4/(byte*) print_char_cursor#47 test_8s::@6/(byte*) print_char_cursor#49 test_8s::@8/(byte*) print_char_cursor#51 test_8u::@4/(byte*) print_char_cursor#29 test_8u::@6/(byte*) print_char_cursor#31 test_8u::@8/(byte*) print_char_cursor#33 ) (byte*) print_str::str#15 ← phi( test_16s::@4/(byte*) print_str::str#10 test_16s::@6/(byte*) print_str::str#11 test_16s::@8/(byte*) print_str::str#12 test_16u::@4/(byte*) print_str::str#4 test_16u::@6/(byte*) print_str::str#5 test_16u::@8/(byte*) print_str::str#6 test_8s::@4/(byte*) print_str::str#7 test_8s::@6/(byte*) print_str::str#8 test_8s::@8/(byte*) print_str::str#9 test_8u::@4/(byte*) print_str::str#1 test_8u::@6/(byte*) print_str::str#2 test_8u::@8/(byte*) print_str::str#3 ) @@ -162,6 +166,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#67 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from test_16s::@10 test_16u::@10 test_8s::@10 test_8u::@10 (byte*) print_char_cursor#131 ← phi( test_16s::@10/(byte*) print_char_cursor#62 test_16u::@10/(byte*) print_char_cursor#44 test_8s::@10/(byte*) print_char_cursor#53 test_8u::@10/(byte*) print_char_cursor#35 ) (byte*) print_line_cursor#39 ← phi( test_16s::@10/(byte*) print_line_cursor#44 test_16u::@10/(byte*) print_line_cursor#42 test_8s::@10/(byte*) print_line_cursor#43 test_8u::@10/(byte*) print_line_cursor#41 ) @@ -185,6 +191,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#69 return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from test_16s::@3 test_16s::@5 test_16s::@7 test_16s::@9 (byte*) print_char_cursor#147 ← phi( test_16s::@3/(byte*) print_char_cursor#144 test_16s::@5/(byte*) print_char_cursor#57 test_16s::@7/(byte*) print_char_cursor#59 test_16s::@9/(byte*) print_char_cursor#61 ) (signed word) print_sword::w#5 ← phi( test_16s::@3/(signed word) print_sword::w#1 test_16s::@5/(signed word) print_sword::w#2 test_16s::@7/(signed word) print_sword::w#3 test_16s::@9/(signed word) print_sword::w#4 ) @@ -231,6 +239,8 @@ print_sword::@return: scope:[print_sword] from print_sword::@7 (byte*) print_char_cursor#8 ← (byte*) print_char_cursor#73 return to:@return + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from test_8s::@3 test_8s::@5 test_8s::@7 test_8s::@9 (byte*) print_char_cursor#148 ← phi( test_8s::@3/(byte*) print_char_cursor#143 test_8s::@5/(byte*) print_char_cursor#48 test_8s::@7/(byte*) print_char_cursor#50 test_8s::@9/(byte*) print_char_cursor#52 ) (signed byte) print_sbyte::b#5 ← phi( test_8s::@3/(signed byte) print_sbyte::b#1 test_8s::@5/(signed byte) print_sbyte::b#2 test_8s::@7/(signed byte) print_sbyte::b#3 test_8s::@9/(signed byte) print_sbyte::b#4 ) @@ -277,6 +287,8 @@ print_sbyte::@return: scope:[print_sbyte] from print_sbyte::@7 (byte*) print_char_cursor#12 ← (byte*) print_char_cursor#77 return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_sword::@2 test_16u::@3 test_16u::@5 test_16u::@7 test_16u::@9 (byte*) print_char_cursor#138 ← phi( print_sword::@2/(byte*) print_char_cursor#134 test_16u::@3/(byte*) print_char_cursor#142 test_16u::@5/(byte*) print_char_cursor#39 test_16u::@7/(byte*) print_char_cursor#41 test_16u::@9/(byte*) print_char_cursor#43 ) (word) print_word::w#5 ← phi( print_sword::@2/(word) print_word::w#0 test_16u::@3/(word) print_word::w#1 test_16u::@5/(word) print_word::w#2 test_16u::@7/(word) print_word::w#3 test_16u::@9/(word) print_word::w#4 ) @@ -307,6 +319,8 @@ print_word::@return: scope:[print_word] from print_word::@2 (byte*) print_line_cursor#66 ← phi( @12/(byte*) print_line_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $0 to:@36 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_sbyte::@2 print_word print_word::@1 test_8u::@3 test_8u::@5 test_8u::@7 test_8u::@9 (byte*) print_char_cursor#139 ← phi( print_sbyte::@2/(byte*) print_char_cursor#137 print_word/(byte*) print_char_cursor#138 print_word::@1/(byte*) print_char_cursor#13 test_8u::@3/(byte*) print_char_cursor#141 test_8u::@5/(byte*) print_char_cursor#30 test_8u::@7/(byte*) print_char_cursor#32 test_8u::@9/(byte*) print_char_cursor#34 ) (byte) print_byte::b#7 ← phi( print_sbyte::@2/(byte) print_byte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 test_8u::@3/(byte) print_byte::b#3 test_8u::@5/(byte) print_byte::b#4 test_8u::@7/(byte) print_byte::b#5 test_8u::@9/(byte) print_byte::b#6 ) @@ -331,6 +345,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#18 ← (byte*) print_char_cursor#83 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sbyte::@3 print_sword::@1 print_sword::@3 (byte*) print_char_cursor#84 ← phi( print_byte/(byte*) print_char_cursor#139 print_byte::@1/(byte*) print_char_cursor#16 print_sbyte::@1/(byte*) print_char_cursor#135 print_sbyte::@3/(byte*) print_char_cursor#136 print_sword::@1/(byte*) print_char_cursor#132 print_sword::@3/(byte*) print_char_cursor#133 ) (byte) print_char::ch#6 ← phi( print_byte/(byte) print_char::ch#4 print_byte::@1/(byte) print_char::ch#5 print_sbyte::@1/(byte) print_char::ch#2 print_sbyte::@3/(byte) print_char::ch#3 print_sword::@1/(byte) print_char::ch#0 print_sword::@3/(byte) print_char::ch#1 ) @@ -342,6 +358,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#20 ← (byte*) print_char_cursor#85 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main (byte*) print_screen#1 ← phi( main/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -368,6 +386,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte*) print_line_cursor#61 ← phi( @29/(byte*) print_line_cursor#66 ) (byte) rem8u#0 ← (number) 0 to:@38 + +(byte()) div8u((byte) div8u::dividend , (byte) div8u::divisor) div8u: scope:[div8u] from div8s::@4 test_8u::@1 (byte) rem8u#31 ← phi( div8s::@4/(byte) rem8u#32 test_8u::@1/(byte) rem8u#36 ) (byte) div8u::divisor#2 ← phi( div8s::@4/(byte) div8u::divisor#0 test_8u::@1/(byte) div8u::divisor#1 ) @@ -392,6 +412,8 @@ div8u::@return: scope:[div8u] from div8u::@2 (byte) rem8u#2 ← (byte) rem8u#16 return to:@return + +(byte()) divr8u((byte) divr8u::dividend , (byte) divr8u::divisor , (byte) divr8u::rem) divr8u: scope:[divr8u] from div8u (byte) divr8u::divisor#5 ← phi( div8u/(byte) divr8u::divisor#0 ) (byte) divr8u::dividend#4 ← phi( div8u/(byte) divr8u::dividend#0 ) @@ -475,6 +497,8 @@ divr8u::@return: scope:[divr8u] from divr8u::@6 (byte*) print_line_cursor#56 ← phi( @36/(byte*) print_line_cursor#61 ) (word) rem16u#0 ← (number) 0 to:@41 + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div16u divr16s::@4 (word) divr16u::divisor#6 ← phi( div16u/(word) divr16u::divisor#0 divr16s::@4/(word) divr16u::divisor#1 ) (word) divr16u::dividend#5 ← phi( div16u/(word) divr16u::dividend#1 divr16s::@4/(word) divr16u::dividend#2 ) @@ -552,6 +576,8 @@ divr16u::@return: scope:[divr16u] from divr16u::@6 (word) rem16u#2 ← (word) rem16u#17 return to:@return + +(word()) div16u((word) div16u::dividend , (word) div16u::divisor) div16u: scope:[div16u] from test_16u::@1 (word) rem16u#35 ← phi( test_16u::@1/(word) rem16u#40 ) (word) div16u::divisor#1 ← phi( test_16u::@1/(word) div16u::divisor#0 ) @@ -584,6 +610,8 @@ div16u::@return: scope:[div16u] from div16u::@2 (byte*) print_line_cursor#51 ← phi( @38/(byte*) print_line_cursor#56 ) (signed byte) rem8s#0 ← (number) 0 to:@42 + +(signed byte()) div8s((signed byte) div8s::dividend , (signed byte) div8s::divisor) div8s: scope:[div8s] from test_8s::@1 (byte) rem8u#60 ← phi( test_8s::@1/(byte) rem8u#39 ) (signed byte) div8s::divisor#6 ← phi( test_8s::@1/(signed byte) div8s::divisor#0 ) @@ -694,6 +722,8 @@ div8s::@return: scope:[div8s] from div8s::@11 div8s::@5 (byte*) print_line_cursor#50 ← phi( @41/(byte*) print_line_cursor#51 ) (signed word) rem16s#0 ← (number) 0 to:@49 + +(signed word()) divr16s((signed word) divr16s::dividend , (signed word) divr16s::divisor , (signed word) divr16s::rem) divr16s: scope:[divr16s] from div16s (word) rem16u#64 ← phi( div16s/(word) rem16u#37 ) (signed word) divr16s::divisor#6 ← phi( div16s/(signed word) divr16s::divisor#0 ) @@ -811,6 +841,8 @@ divr16s::@return: scope:[divr16s] from divr16s::@11 divr16s::@5 (signed word) rem16s#3 ← (signed word) rem16s#11 return to:@return + +(signed word()) div16s((signed word) div16s::dividend , (signed word) div16s::divisor) div16s: scope:[div16s] from test_16s::@1 (signed word) rem16s#20 ← phi( test_16s::@1/(signed word) rem16s#22 ) (word) rem16u#37 ← phi( test_16s::@1/(word) rem16u#43 ) @@ -840,6 +872,8 @@ div16s::@return: scope:[div16s] from div16s::@2 (signed word) rem16s#5 ← (signed word) rem16s#13 return to:@return + +(void()) main() main: scope:[main] from @49 (signed word) rem16s#34 ← phi( @49/(signed word) rem16s#25 ) (signed byte) rem8s#29 ← phi( @49/(signed byte) rem8s#21 ) @@ -925,6 +959,8 @@ main::@return: scope:[main] from main::@5 (signed word) rem16s#7 ← (signed word) rem16s#15 return to:@return + +(void()) test_8u() test_8u: scope:[test_8u] from main::@1 (byte*) print_line_cursor#83 ← phi( main::@1/(byte*) print_line_cursor#5 ) (byte*) print_char_cursor#155 ← phi( main::@1/(byte*) print_char_cursor#23 ) @@ -1047,6 +1083,8 @@ test_8u::@return: scope:[test_8u] from test_8u::@11 (byte*) print_line_cursor#12 ← (byte*) print_line_cursor#31 return to:@return + +(void()) test_16u() test_16u: scope:[test_16u] from main::@2 (byte*) print_line_cursor#84 ← phi( main::@2/(byte*) print_line_cursor#6 ) (byte*) print_char_cursor#156 ← phi( main::@2/(byte*) print_char_cursor#24 ) @@ -1171,6 +1209,8 @@ test_16u::@return: scope:[test_16u] from test_16u::@11 (byte*) print_line_cursor#14 ← (byte*) print_line_cursor#33 return to:@return + +(void()) test_8s() test_8s: scope:[test_8s] from main::@3 (byte*) print_line_cursor#85 ← phi( main::@3/(byte*) print_line_cursor#7 ) (byte*) print_char_cursor#157 ← phi( main::@3/(byte*) print_char_cursor#25 ) @@ -1307,6 +1347,8 @@ test_8s::@return: scope:[test_8s] from test_8s::@11 (byte*) print_line_cursor#16 ← (byte*) print_line_cursor#35 return to:@return + +(void()) test_16s() test_16s: scope:[test_16s] from main::@4 (byte*) print_line_cursor#86 ← phi( main::@4/(byte*) print_line_cursor#8 ) (byte*) print_char_cursor#158 ← phi( main::@4/(byte*) print_char_cursor#26 ) @@ -3955,6 +3997,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -3978,6 +4022,8 @@ main::@4: scope:[main] from main::@3 main::@return: scope:[main] from main::@4 [14] return to:@return + +(void()) test_16s() test_16s: scope:[test_16s] from main::@4 [15] phi() to:test_16s::@1 @@ -4032,6 +4078,8 @@ test_16s::@10: scope:[test_16s] from test_16s::@9 test_16s::@return: scope:[test_16s] from test_16s::@10 [44] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from test_16s::@9 test_16u::@9 test_8s::@9 test_8u::@9 [45] (byte*) print_line_cursor#39 ← phi( test_16s::@9/(byte*) print_line_cursor#1 test_16u::@9/(byte*) print_line_cursor#1 test_8s::@9/(byte*) print_line_cursor#1 test_8u::@9/(byte*) print_line_cursor#41 ) to:print_ln::@1 @@ -4043,6 +4091,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [49] return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from test_16s::@2 test_16s::@4 test_16s::@6 test_16s::@8 [50] (byte*) print_char_cursor#132 ← phi( test_16s::@2/(byte*~) print_char_cursor#164 test_16s::@4/(byte*) print_char_cursor#130 test_16s::@6/(byte*) print_char_cursor#130 test_16s::@8/(byte*) print_char_cursor#130 ) [50] (signed word) print_sword::w#10 ← phi( test_16s::@2/(signed word) print_sword::w#1 test_16s::@4/(signed word) print_sword::w#2 test_16s::@6/(signed word) print_sword::w#3 test_16s::@8/(signed word) print_sword::w#4 ) @@ -4067,6 +4117,8 @@ print_sword::@1: scope:[print_sword] from print_sword print_sword::@4: scope:[print_sword] from print_sword::@1 [60] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#10 to:print_sword::@2 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sbyte::@3 print_sword::@1 print_sword::@3 [61] (byte*) print_char_cursor#84 ← phi( print_byte/(byte*) print_char_cursor#139 print_byte::@1/(byte*) print_char_cursor#19 print_sbyte::@1/(byte*) print_char_cursor#135 print_sbyte::@3/(byte*) print_char_cursor#135 print_sword::@1/(byte*) print_char_cursor#132 print_sword::@3/(byte*) print_char_cursor#132 ) [61] (byte) print_char::ch#6 ← phi( print_byte/(byte) print_char::ch#4 print_byte::@1/(byte) print_char::ch#5 print_sbyte::@1/(byte) '-' print_sbyte::@3/(byte) ' ' print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' ) @@ -4076,6 +4128,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 p print_char::@return: scope:[print_char] from print_char [64] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_sword::@2 test_16u::@2 test_16u::@4 test_16u::@6 test_16u::@8 [65] (byte*) print_char_cursor#138 ← phi( print_sword::@2/(byte*) print_char_cursor#19 test_16u::@2/(byte*~) print_char_cursor#173 test_16u::@4/(byte*) print_char_cursor#130 test_16u::@6/(byte*) print_char_cursor#130 test_16u::@8/(byte*) print_char_cursor#130 ) [65] (word) print_word::w#5 ← phi( print_sword::@2/(word) print_word::w#0 test_16u::@2/(word) print_word::w#1 test_16u::@4/(word) print_word::w#2 test_16u::@6/(word) print_word::w#3 test_16u::@8/(word) print_word::w#4 ) @@ -4089,6 +4143,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [70] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_sbyte::@2 print_word print_word::@1 test_8u::@2 test_8u::@4 test_8u::@6 test_8u::@8 [71] (byte*) print_char_cursor#139 ← phi( print_sbyte::@2/(byte*) print_char_cursor#19 print_word/(byte*) print_char_cursor#138 print_word::@1/(byte*) print_char_cursor#19 test_8u::@2/(byte*) print_char_cursor#141 test_8u::@4/(byte*) print_char_cursor#130 test_8u::@6/(byte*) print_char_cursor#130 test_8u::@8/(byte*) print_char_cursor#130 ) [71] (byte) print_byte::b#7 ← phi( print_sbyte::@2/(byte) print_byte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 test_8u::@2/(byte) print_byte::b#3 test_8u::@4/(byte) print_byte::b#4 test_8u::@6/(byte) print_byte::b#5 test_8u::@8/(byte) print_byte::b#6 ) @@ -4104,6 +4160,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [78] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from test_16s::@3 test_16s::@5 test_16s::@7 test_16u::@3 test_16u::@5 test_16u::@7 test_8s::@3 test_8s::@5 test_8s::@7 test_8u::@3 test_8u::@5 test_8u::@7 [79] (byte*) print_str::str#15 ← phi( test_16s::@3/(const string) str test_16s::@5/(const string) str1 test_16s::@7/(const string) str2 test_16u::@3/(const string) str test_16u::@5/(const string) str1 test_16u::@7/(const string) str2 test_8s::@3/(const string) str test_8s::@5/(const string) str1 test_8s::@7/(const string) str2 test_8u::@3/(const string) str test_8u::@5/(const string) str1 test_8u::@7/(const string) str2 ) to:print_str::@1 @@ -4120,6 +4178,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [84] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#130 [85] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#13 to:print_str::@1 + +(signed word()) div16s((signed word) div16s::dividend , (signed word) div16s::divisor) div16s: scope:[div16s] from test_16s::@1 [86] (signed word) divr16s::dividend#0 ← (signed word) div16s::dividend#0 [87] (signed word) divr16s::divisor#0 ← (signed word) div16s::divisor#0 @@ -4132,6 +4192,8 @@ div16s::@1: scope:[div16s] from div16s div16s::@return: scope:[div16s] from div16s::@1 [91] return to:@return + +(signed word()) divr16s((signed word) divr16s::dividend , (signed word) divr16s::divisor , (signed word) divr16s::rem) divr16s: scope:[divr16s] from div16s [92] if((signed word) divr16s::dividend#0<(signed byte) 0) goto divr16s::@1 to:divr16s::@6 @@ -4181,6 +4243,8 @@ divr16s::@1: scope:[divr16s] from divr16s [114] (signed word) divr16s::dividendu#1 ← - (signed word) divr16s::dividend#0 [115] (word~) divr16s::dividendu#7 ← (word)(signed word) divr16s::dividendu#1 to:divr16s::@2 + +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) divr16u: scope:[divr16u] from div16u divr16s::@4 [116] (word) divr16u::divisor#6 ← phi( div16u/(word) divr16u::divisor#0 divr16s::@4/(word) divr16u::divisor#1 ) [116] (word) divr16u::dividend#5 ← phi( div16u/(word) divr16u::dividend#1 divr16s::@4/(word) divr16u::dividend#2 ) @@ -4220,6 +4284,8 @@ divr16u::@6: scope:[divr16u] from divr16u::@3 divr16u::@return: scope:[divr16u] from divr16u::@6 [133] return to:@return + +(void()) test_8s() test_8s: scope:[test_8s] from main::@3 [134] phi() to:test_8s::@1 @@ -4273,6 +4339,8 @@ test_8s::@10: scope:[test_8s] from test_8s::@9 test_8s::@return: scope:[test_8s] from test_8s::@10 [162] return to:@return + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from test_8s::@2 test_8s::@4 test_8s::@6 test_8s::@8 [163] (byte*) print_char_cursor#135 ← phi( test_8s::@2/(byte*~) print_char_cursor#168 test_8s::@4/(byte*) print_char_cursor#130 test_8s::@6/(byte*) print_char_cursor#130 test_8s::@8/(byte*) print_char_cursor#130 ) [163] (signed byte) print_sbyte::b#10 ← phi( test_8s::@2/(signed byte) print_sbyte::b#1 test_8s::@4/(signed byte) print_sbyte::b#2 test_8s::@6/(signed byte) print_sbyte::b#3 test_8s::@8/(signed byte) print_sbyte::b#4 ) @@ -4297,6 +4365,8 @@ print_sbyte::@1: scope:[print_sbyte] from print_sbyte print_sbyte::@4: scope:[print_sbyte] from print_sbyte::@1 [173] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#10 to:print_sbyte::@2 + +(signed byte()) div8s((signed byte) div8s::dividend , (signed byte) div8s::divisor) div8s: scope:[div8s] from test_8s::@1 [174] if((signed byte) div8s::dividend#0<(signed byte) 0) goto div8s::@1 to:div8s::@6 @@ -4346,6 +4416,8 @@ div8s::@1: scope:[div8s] from div8s [196] (signed byte) div8s::dividendu#1 ← - (signed byte) div8s::dividend#0 [197] (byte~) div8s::dividendu#7 ← (byte)(signed byte) div8s::dividendu#1 to:div8s::@2 + +(byte()) div8u((byte) div8u::dividend , (byte) div8u::divisor) div8u: scope:[div8u] from div8s::@4 test_8u::@1 [198] (byte) div8u::divisor#2 ← phi( div8s::@4/(byte) div8u::divisor#0 test_8u::@1/(byte) div8u::divisor#1 ) [198] (byte) div8u::dividend#2 ← phi( div8s::@4/(byte) div8u::dividend#0 test_8u::@1/(byte) div8u::dividend#1 ) @@ -4360,6 +4432,8 @@ div8u::@1: scope:[div8u] from div8u div8u::@return: scope:[div8u] from div8u::@1 [204] return to:@return + +(byte()) divr8u((byte) divr8u::dividend , (byte) divr8u::divisor , (byte) divr8u::rem) divr8u: scope:[divr8u] from div8u [205] phi() to:divr8u::@1 @@ -4397,6 +4471,8 @@ divr8u::@6: scope:[divr8u] from divr8u::@3 divr8u::@return: scope:[divr8u] from divr8u::@6 [221] return to:@return + +(void()) test_16u() test_16u: scope:[test_16u] from main::@2 [222] phi() to:test_16u::@1 @@ -4451,6 +4527,8 @@ test_16u::@10: scope:[test_16u] from test_16u::@9 test_16u::@return: scope:[test_16u] from test_16u::@10 [251] return to:@return + +(word()) div16u((word) div16u::dividend , (word) div16u::divisor) div16u: scope:[div16u] from test_16u::@1 [252] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 [253] (word) divr16u::divisor#0 ← (word) div16u::divisor#0 @@ -4463,6 +4541,8 @@ div16u::@1: scope:[div16u] from div16u div16u::@return: scope:[div16u] from div16u::@1 [257] return to:@return + +(void()) test_8u() test_8u: scope:[test_8u] from main::@1 [258] phi() to:test_8u::@1 @@ -4520,6 +4600,8 @@ test_8u::@return: scope:[test_8u] from test_8u::@10 test_8u::@11: scope:[test_8u] from test_8u::@10 [286] (byte*~) print_char_cursor#190 ← (byte*) print_line_cursor#1 to:test_8u::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main [287] phi() [288] call memset @@ -4527,6 +4609,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [289] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [290] phi() to:memset::@1 diff --git a/src/test/ref/test-interrupt-notype.cfg b/src/test/ref/test-interrupt-notype.cfg index a147b4ee2..98547adb2 100644 --- a/src/test/ref/test-interrupt-notype.cfg +++ b/src/test/ref/test-interrupt-notype.cfg @@ -7,12 +7,16 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_MIN)(void()) irq() to:main::@1 main::@1: scope:[main] from main main::@1 [5] *((const byte*) FGCOL#0) ← ++ *((const byte*) FGCOL#0) to:main::@1 + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from [6] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) asm { lda$dc0d } diff --git a/src/test/ref/test-interrupt-notype.log b/src/test/ref/test-interrupt-notype.log index 990ae095f..577cae5f8 100644 --- a/src/test/ref/test-interrupt-notype.log +++ b/src/test/ref/test-interrupt-notype.log @@ -11,6 +11,8 @@ CONTROL FLOW GRAPH SSA (byte*) BGCOL#0 ← ((byte*)) (number) $d020 (byte*) FGCOL#0 ← ((byte*)) (number) $d021 to:@2 + +(void()) main() main: scope:[main] from @2 (void()*~) main::$0 ← & interrupt(KERNEL_MIN)(void()) irq() *((void()**) KERNEL_IRQ#0) ← (void()*~) main::$0 @@ -24,6 +26,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@1 return to:@return + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from *((byte*) BGCOL#0) ← ++ *((byte*) BGCOL#0) asm { lda$dc0d } @@ -106,12 +110,16 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_MIN)(void()) irq() to:main::@1 main::@1: scope:[main] from main main::@1 [5] *((const byte*) FGCOL#0) ← ++ *((const byte*) FGCOL#0) to:main::@1 + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from [6] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) asm { lda$dc0d } diff --git a/src/test/ref/test-interrupt-volatile-write.cfg b/src/test/ref/test-interrupt-volatile-write.cfg index e169cae25..86c319461 100644 --- a/src/test/ref/test-interrupt-volatile-write.cfg +++ b/src/test/ref/test-interrupt-volatile-write.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_MIN)(void()) irq() to:main::@1 @@ -19,6 +21,8 @@ main::@2: scope:[main] from main::@1 main::@3: scope:[main] from main::@2 [7] (byte) col#1 ← (byte) 0 to:main::@1 + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from asm { lda$dc0d } [9] *((const byte*) BGCOL#0) ← (byte) col#0 diff --git a/src/test/ref/test-interrupt-volatile-write.log b/src/test/ref/test-interrupt-volatile-write.log index d3afa82e7..5430335f9 100644 --- a/src/test/ref/test-interrupt-volatile-write.log +++ b/src/test/ref/test-interrupt-volatile-write.log @@ -14,6 +14,8 @@ CONTROL FLOW GRAPH SSA (byte*) BGCOL#0 ← ((byte*)) (number) $d020 (byte) col#0 ← (number) 0 to:@2 + +(void()) main() main: scope:[main] from @2 (byte) col#16 ← phi( @2/(byte) col#15 ) (void()*~) main::$0 ← & interrupt(KERNEL_MIN)(void()) irq() @@ -37,6 +39,8 @@ main::@return: scope:[main] from main::@1 (byte) col#2 ← (byte) col#8 return to:@return + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from (byte) col#9 ← phi( @2/(byte) col#15 ) asm { lda$dc0d } @@ -201,6 +205,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_MIN)(void()) irq() to:main::@1 @@ -213,6 +219,8 @@ main::@2: scope:[main] from main::@1 main::@3: scope:[main] from main::@2 [7] (byte) col#1 ← (byte) 0 to:main::@1 + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from asm { lda$dc0d } [9] *((const byte*) BGCOL#0) ← (byte) col#0 diff --git a/src/test/ref/test-interrupt-volatile.cfg b/src/test/ref/test-interrupt-volatile.cfg index ed53b0257..995b98cc9 100644 --- a/src/test/ref/test-interrupt-volatile.cfg +++ b/src/test/ref/test-interrupt-volatile.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_MIN)(void()) irq() to:main::@1 @@ -16,6 +18,8 @@ main::@1: scope:[main] from main main::@2 main::@2: scope:[main] from main::@1 [6] (byte) col#1 ← ++ (byte) col#2 to:main::@1 + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from asm { lda$dc0d } [8] *((const byte*) BGCOL#0) ← (byte) col#0 diff --git a/src/test/ref/test-interrupt-volatile.log b/src/test/ref/test-interrupt-volatile.log index 6d2e5ac1b..cffd8535b 100644 --- a/src/test/ref/test-interrupt-volatile.log +++ b/src/test/ref/test-interrupt-volatile.log @@ -11,6 +11,8 @@ CONTROL FLOW GRAPH SSA (byte*) BGCOL#0 ← ((byte*)) (number) $d020 (byte) col#0 ← (number) 0 to:@2 + +(void()) main() main: scope:[main] from @2 (byte) col#10 ← phi( @2/(byte) col#9 ) (void()*~) main::$0 ← & interrupt(KERNEL_MIN)(void()) irq() @@ -29,6 +31,8 @@ main::@return: scope:[main] from main::@1 (byte) col#2 ← (byte) col#5 return to:@return + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from (byte) col#6 ← phi( @2/(byte) col#9 ) asm { lda$dc0d } @@ -133,6 +137,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_MIN)(void()) irq() to:main::@1 @@ -142,6 +148,8 @@ main::@1: scope:[main] from main main::@2 main::@2: scope:[main] from main::@1 [6] (byte) col#1 ← ++ (byte) col#2 to:main::@1 + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from asm { lda$dc0d } [8] *((const byte*) BGCOL#0) ← (byte) col#0 diff --git a/src/test/ref/test-interrupt.cfg b/src/test/ref/test-interrupt.cfg index a147b4ee2..98547adb2 100644 --- a/src/test/ref/test-interrupt.cfg +++ b/src/test/ref/test-interrupt.cfg @@ -7,12 +7,16 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_MIN)(void()) irq() to:main::@1 main::@1: scope:[main] from main main::@1 [5] *((const byte*) FGCOL#0) ← ++ *((const byte*) FGCOL#0) to:main::@1 + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from [6] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) asm { lda$dc0d } diff --git a/src/test/ref/test-interrupt.log b/src/test/ref/test-interrupt.log index 990ae095f..577cae5f8 100644 --- a/src/test/ref/test-interrupt.log +++ b/src/test/ref/test-interrupt.log @@ -11,6 +11,8 @@ CONTROL FLOW GRAPH SSA (byte*) BGCOL#0 ← ((byte*)) (number) $d020 (byte*) FGCOL#0 ← ((byte*)) (number) $d021 to:@2 + +(void()) main() main: scope:[main] from @2 (void()*~) main::$0 ← & interrupt(KERNEL_MIN)(void()) irq() *((void()**) KERNEL_IRQ#0) ← (void()*~) main::$0 @@ -24,6 +26,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@1 return to:@return + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from *((byte*) BGCOL#0) ← ++ *((byte*) BGCOL#0) asm { lda$dc0d } @@ -106,12 +110,16 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_MIN)(void()) irq() to:main::@1 main::@1: scope:[main] from main main::@1 [5] *((const byte*) FGCOL#0) ← ++ *((const byte*) FGCOL#0) to:main::@1 + +interrupt(KERNEL_MIN)(void()) irq() irq: scope:[irq] from [6] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) asm { lda$dc0d } diff --git a/src/test/ref/test-kasm-pc.cfg b/src/test/ref/test-kasm-pc.cfg index a4c8ece88..cc64ca098 100644 --- a/src/test/ref/test-kasm-pc.cfg +++ b/src/test/ref/test-kasm-pc.cfg @@ -8,6 +8,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/test-kasm-pc.log b/src/test/ref/test-kasm-pc.log index 1102d5075..a814370d1 100644 --- a/src/test/ref/test-kasm-pc.log +++ b/src/test/ref/test-kasm-pc.log @@ -9,6 +9,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) TABLE#0 ← ((byte*)) (number) $2000 to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::BORDERCOL#0 ← ((byte*)) (number) $d020 (byte) main::i#0 ← (number) 0 @@ -104,6 +106,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/test-kasm.cfg b/src/test/ref/test-kasm.cfg index 266e4ec4c..58e2de7da 100644 --- a/src/test/ref/test-kasm.cfg +++ b/src/test/ref/test-kasm.cfg @@ -8,6 +8,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/test-kasm.log b/src/test/ref/test-kasm.log index 40a1b4728..668643b58 100644 --- a/src/test/ref/test-kasm.log +++ b/src/test/ref/test-kasm.log @@ -6,6 +6,8 @@ Culled Empty Block (label) main::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 to:main::@1 main::@1: scope:[main] from main main::@2 @@ -69,6 +71,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/test-keyboard-space.cfg b/src/test/ref/test-keyboard-space.cfg index 830d414ce..8b330e077 100644 --- a/src/test/ref/test-keyboard-space.cfg +++ b/src/test/ref/test-keyboard-space.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call keyboard_init @@ -29,6 +31,8 @@ main::@3: scope:[main] from main::@5 main::@4: scope:[main] from main::@5 [13] *((const byte*) BGCOL#0) ← (const byte) GREEN#0 to:main::@1 + +(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key) keyboard_key_pressed: scope:[keyboard_key_pressed] from main::@2 [14] phi() [15] call keyboard_matrix_read @@ -41,6 +45,8 @@ keyboard_key_pressed::@1: scope:[keyboard_key_pressed] from keyboard_key_presse keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@1 [19] return to:@return + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed [20] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0+(const byte) keyboard_key_pressed::rowidx#0) [21] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) @@ -48,6 +54,8 @@ keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read [22] return to:@return + +(void()) keyboard_init() keyboard_init: scope:[keyboard_init] from main [23] *((const byte*) CIA1_PORT_A_DDR#0) ← (byte) $ff [24] *((const byte*) CIA1_PORT_B_DDR#0) ← (byte) 0 diff --git a/src/test/ref/test-keyboard-space.log b/src/test/ref/test-keyboard-space.log index 4c5315ac8..33e378f78 100644 --- a/src/test/ref/test-keyboard-space.log +++ b/src/test/ref/test-keyboard-space.log @@ -35,6 +35,8 @@ CONTROL FLOW GRAPH SSA (byte[8]) keyboard_matrix_row_bitmask#0 ← { (number) $fe, (number) $fd, (number) $fb, (number) $f7, (number) $ef, (number) $df, (number) $bf, (number) $7f } (byte[8]) keyboard_matrix_col_bitmask#0 ← { (number) 1, (number) 2, (number) 4, (number) 8, (number) $10, (number) $20, (number) $40, (number) $80 } to:@12 + +(void()) keyboard_init() keyboard_init: scope:[keyboard_init] from main *((byte*) CIA1_PORT_A_DDR#0) ← (number) $ff *((byte*) CIA1_PORT_B_DDR#0) ← (number) 0 @@ -42,6 +44,8 @@ keyboard_init: scope:[keyboard_init] from main keyboard_init::@return: scope:[keyboard_init] from keyboard_init return to:@return + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed (byte) keyboard_matrix_read::rowid#1 ← phi( keyboard_key_pressed/(byte) keyboard_matrix_read::rowid#0 ) *((byte*) CIA1_PORT_A#0) ← *((byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#1) @@ -54,6 +58,8 @@ keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matri (byte) keyboard_matrix_read::return#1 ← (byte) keyboard_matrix_read::return#3 return to:@return + +(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key) keyboard_key_pressed: scope:[keyboard_key_pressed] from main::@5 (byte) keyboard_key_pressed::key#1 ← phi( main::@5/(byte) keyboard_key_pressed::key#0 ) (number~) keyboard_key_pressed::$0 ← (byte) keyboard_key_pressed::key#1 & (number) 7 @@ -76,6 +82,8 @@ keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_p (byte) keyboard_key_pressed::return#1 ← (byte) keyboard_key_pressed::return#3 return to:@return + +(void()) main() main: scope:[main] from @12 call keyboard_init to:main::@13 @@ -355,6 +363,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call keyboard_init @@ -377,6 +387,8 @@ main::@3: scope:[main] from main::@5 main::@4: scope:[main] from main::@5 [13] *((const byte*) BGCOL#0) ← (const byte) GREEN#0 to:main::@1 + +(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key) keyboard_key_pressed: scope:[keyboard_key_pressed] from main::@2 [14] phi() [15] call keyboard_matrix_read @@ -389,6 +401,8 @@ keyboard_key_pressed::@1: scope:[keyboard_key_pressed] from keyboard_key_presse keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@1 [19] return to:@return + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed [20] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0+(const byte) keyboard_key_pressed::rowidx#0) [21] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) @@ -396,6 +410,8 @@ keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read [22] return to:@return + +(void()) keyboard_init() keyboard_init: scope:[keyboard_init] from main [23] *((const byte*) CIA1_PORT_A_DDR#0) ← (byte) $ff [24] *((const byte*) CIA1_PORT_B_DDR#0) ← (byte) 0 diff --git a/src/test/ref/test-keyboard.cfg b/src/test/ref/test-keyboard.cfg index 97e845488..e160a6398 100644 --- a/src/test/ref/test-keyboard.cfg +++ b/src/test/ref/test-keyboard.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -95,6 +97,8 @@ main::@2: scope:[main] from main::@1 [47] *((byte*) main::sc#2) ← (byte) ' ' [48] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 to:main::@1 + +(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key) keyboard_key_pressed: scope:[keyboard_key_pressed] from main::@14 [49] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#0 & (byte) 7 [50] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#0 >> (byte) 3 @@ -109,6 +113,8 @@ keyboard_key_pressed::@1: scope:[keyboard_key_pressed] from keyboard_key_presse keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@1 [56] return to:@return + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed main::@5 [57] (byte) keyboard_matrix_read::rowid#2 ← phi( keyboard_key_pressed/(byte) keyboard_matrix_read::rowid#0 main::@5/(byte) keyboard_matrix_read::rowid#1 ) [58] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#2) @@ -117,12 +123,16 @@ keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed ma keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read [60] return to:@return + +(byte()) keyboard_get_keycode((byte) keyboard_get_keycode::ch) keyboard_get_keycode: scope:[keyboard_get_keycode] from main::@12 [61] (byte) keyboard_get_keycode::return#0 ← *((const byte[]) keyboard_char_keycodes#0 + (byte) keyboard_get_keycode::ch#0) to:keyboard_get_keycode::@return keyboard_get_keycode::@return: scope:[keyboard_get_keycode] from keyboard_get_keycode [62] return to:@return + +(void()) keyboard_init() keyboard_init: scope:[keyboard_init] from main::@3 [63] *((const byte*) CIA1_PORT_A_DDR#0) ← (byte) $ff [64] *((const byte*) CIA1_PORT_B_DDR#0) ← (byte) 0 diff --git a/src/test/ref/test-keyboard.log b/src/test/ref/test-keyboard.log index 9ef9d01fe..86d8804e5 100644 --- a/src/test/ref/test-keyboard.log +++ b/src/test/ref/test-keyboard.log @@ -88,6 +88,8 @@ CONTROL FLOW GRAPH SSA (byte[8]) keyboard_matrix_row_bitmask#0 ← { (number) $fe, (number) $fd, (number) $fb, (number) $f7, (number) $ef, (number) $df, (number) $bf, (number) $7f } (byte[8]) keyboard_matrix_col_bitmask#0 ← { (number) 1, (number) 2, (number) 4, (number) 8, (number) $10, (number) $20, (number) $40, (number) $80 } to:@12 + +(void()) keyboard_init() keyboard_init: scope:[keyboard_init] from main::@3 *((byte*) CIA1_PORT_A_DDR#0) ← (number) $ff *((byte*) CIA1_PORT_B_DDR#0) ← (number) 0 @@ -95,6 +97,8 @@ keyboard_init: scope:[keyboard_init] from main::@3 keyboard_init::@return: scope:[keyboard_init] from keyboard_init return to:@return + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed main::@12 (byte) keyboard_matrix_read::rowid#2 ← phi( keyboard_key_pressed/(byte) keyboard_matrix_read::rowid#0 main::@12/(byte) keyboard_matrix_read::rowid#1 ) *((byte*) CIA1_PORT_A#0) ← *((byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#2) @@ -107,6 +111,8 @@ keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matri (byte) keyboard_matrix_read::return#1 ← (byte) keyboard_matrix_read::return#4 return to:@return + +(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key) keyboard_key_pressed: scope:[keyboard_key_pressed] from main::@23 (byte) keyboard_key_pressed::key#1 ← phi( main::@23/(byte) keyboard_key_pressed::key#0 ) (number~) keyboard_key_pressed::$0 ← (byte) keyboard_key_pressed::key#1 & (number) 7 @@ -129,6 +135,8 @@ keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_p (byte) keyboard_key_pressed::return#1 ← (byte) keyboard_key_pressed::return#3 return to:@return + +(byte()) keyboard_get_keycode((byte) keyboard_get_keycode::ch) keyboard_get_keycode: scope:[keyboard_get_keycode] from main::@20 (byte) keyboard_get_keycode::ch#1 ← phi( main::@20/(byte) keyboard_get_keycode::ch#0 ) (byte) keyboard_get_keycode::return#0 ← *((byte[]) keyboard_char_keycodes#0 + (byte) keyboard_get_keycode::ch#1) @@ -138,6 +146,8 @@ keyboard_get_keycode::@return: scope:[keyboard_get_keycode] from keyboard_get_k (byte) keyboard_get_keycode::return#1 ← (byte) keyboard_get_keycode::return#3 return to:@return + +(void()) main() main: scope:[main] from @12 (byte*) main::sc#0 ← ((byte*)) (number) $400 to:main::@1 @@ -1141,6 +1151,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -1229,6 +1241,8 @@ main::@2: scope:[main] from main::@1 [47] *((byte*) main::sc#2) ← (byte) ' ' [48] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 to:main::@1 + +(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key) keyboard_key_pressed: scope:[keyboard_key_pressed] from main::@14 [49] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#0 & (byte) 7 [50] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#0 >> (byte) 3 @@ -1243,6 +1257,8 @@ keyboard_key_pressed::@1: scope:[keyboard_key_pressed] from keyboard_key_presse keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@1 [56] return to:@return + +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed main::@5 [57] (byte) keyboard_matrix_read::rowid#2 ← phi( keyboard_key_pressed/(byte) keyboard_matrix_read::rowid#0 main::@5/(byte) keyboard_matrix_read::rowid#1 ) [58] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#2) @@ -1251,12 +1267,16 @@ keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed ma keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read [60] return to:@return + +(byte()) keyboard_get_keycode((byte) keyboard_get_keycode::ch) keyboard_get_keycode: scope:[keyboard_get_keycode] from main::@12 [61] (byte) keyboard_get_keycode::return#0 ← *((const byte[]) keyboard_char_keycodes#0 + (byte) keyboard_get_keycode::ch#0) to:keyboard_get_keycode::@return keyboard_get_keycode::@return: scope:[keyboard_get_keycode] from keyboard_get_keycode [62] return to:@return + +(void()) keyboard_init() keyboard_init: scope:[keyboard_init] from main::@3 [63] *((const byte*) CIA1_PORT_A_DDR#0) ← (byte) $ff [64] *((const byte*) CIA1_PORT_B_DDR#0) ← (byte) 0 diff --git a/src/test/ref/test-lohiconst.cfg b/src/test/ref/test-lohiconst.cfg index cbeb975f6..79a5749bb 100644 --- a/src/test/ref/test-lohiconst.cfg +++ b/src/test/ref/test-lohiconst.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← >>(const dword) PI_u4f28#0 [5] *((const byte*) main::SCREEN#0+(byte) 1) ← <>(const dword) PI_u4f28#0 diff --git a/src/test/ref/test-lohiconst.log b/src/test/ref/test-lohiconst.log index 46270e068..cfb2efade 100644 --- a/src/test/ref/test-lohiconst.log +++ b/src/test/ref/test-lohiconst.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (dword) PI_u4f28#0 ← (number) $3243f6a9 to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (word~) main::$0 ← > (dword) PI_u4f28#0 @@ -133,6 +135,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← >>(const dword) PI_u4f28#0 [5] *((const byte*) main::SCREEN#0+(byte) 1) ← <>(const dword) PI_u4f28#0 diff --git a/src/test/ref/test-lowhigh.cfg b/src/test/ref/test-lowhigh.cfg index e98071614..56d3aebae 100644 --- a/src/test/ref/test-lowhigh.cfg +++ b/src/test/ref/test-lowhigh.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -90,6 +92,8 @@ main::@16: scope:[main] from main::@15 [47] (dword) main::dw#1 ← ++ (dword) main::dw#10 [48] (byte*~) print_line_cursor#38 ← (byte*) print_line_cursor#1 to:main::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@15 [49] phi() to:print_ln::@1 @@ -104,6 +108,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@1 print_ln::@2: scope:[print_ln] from print_ln::@1 [54] (byte*~) print_line_cursor#37 ← (byte*) print_line_cursor#1 to:print_ln::@1 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from main::@10 main::@12 main::@14 main::@8 print_word print_word::@1 [55] (byte*) print_char_cursor#67 ← phi( main::@8/(byte*) print_char_cursor#12 main::@10/(byte*) print_char_cursor#12 main::@12/(byte*) print_char_cursor#12 main::@14/(byte*) print_char_cursor#12 print_word/(byte*) print_char_cursor#65 print_word::@1/(byte*) print_char_cursor#12 ) [55] (byte) print_byte::b#6 ← phi( main::@8/(byte) print_byte::b#2 main::@10/(byte) print_byte::b#3 main::@12/(byte) print_byte::b#4 main::@14/(byte) print_byte::b#5 print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -119,6 +125,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [62] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from main::@11 main::@13 main::@3 main::@5 main::@7 main::@9 print_byte print_byte::@1 [63] (byte*) print_char_cursor#44 ← phi( main::@5/(byte*) print_char_cursor#12 main::@7/(byte*) print_char_cursor#12 main::@9/(byte*) print_char_cursor#12 main::@11/(byte*) print_char_cursor#12 main::@13/(byte*) print_char_cursor#12 main::@3/(byte*) print_char_cursor#12 print_byte/(byte*) print_char_cursor#67 print_byte::@1/(byte*) print_char_cursor#12 ) [63] (byte) print_char::ch#8 ← phi( main::@5/(byte) ' ' main::@7/(byte) ' ' main::@9/(byte) ' ' main::@11/(byte) ' ' main::@13/(byte) ' ' main::@3/(byte) ' ' print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -128,6 +136,8 @@ print_char: scope:[print_char] from main::@11 main::@13 main::@3 main::@5 main: print_char::@return: scope:[print_char] from print_char [66] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from main::@4 main::@6 print_dword print_dword::@1 [67] (byte*) print_char_cursor#65 ← phi( main::@6/(byte*) print_char_cursor#12 main::@4/(byte*) print_char_cursor#12 print_dword/(byte*~) print_char_cursor#75 print_dword::@1/(byte*) print_char_cursor#12 ) [67] (word) print_word::w#4 ← phi( main::@6/(word) print_word::w#3 main::@4/(word) print_word::w#2 print_dword/(word) print_word::w#0 print_dword::@1/(word) print_word::w#1 ) @@ -141,6 +151,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [72] return to:@return + +(void()) print_dword((dword) print_dword::dw) print_dword: scope:[print_dword] from main::@2 [73] (word) print_word::w#0 ← > (dword) print_dword::dw#0 [74] (byte*~) print_char_cursor#75 ← (byte*) print_char_cursor#31 @@ -153,6 +165,8 @@ print_dword::@1: scope:[print_dword] from print_dword print_dword::@return: scope:[print_dword] from print_dword::@1 [78] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main [79] phi() [80] call memset @@ -160,6 +174,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [81] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [82] phi() to:memset::@1 diff --git a/src/test/ref/test-lowhigh.log b/src/test/ref/test-lowhigh.log index be72ce13e..47c732291 100644 --- a/src/test/ref/test-lowhigh.log +++ b/src/test/ref/test-lowhigh.log @@ -57,6 +57,8 @@ Culled Empty Block (label) main::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@12 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -104,6 +106,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@29 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@20 (byte*) print_char_cursor#64 ← phi( main::@20/(byte*) print_char_cursor#29 ) (byte*) print_line_cursor#17 ← phi( main::@20/(byte*) print_line_cursor#19 ) @@ -127,6 +131,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#34 return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from main::@11 main::@9 print_dword print_dword::@1 (byte*) print_char_cursor#65 ← phi( main::@11/(byte*) print_char_cursor#20 main::@9/(byte*) print_char_cursor#18 print_dword/(byte*) print_char_cursor#66 print_dword::@1/(byte*) print_char_cursor#6 ) (word) print_word::w#4 ← phi( main::@11/(word) print_word::w#3 main::@9/(word) print_word::w#2 print_dword/(word) print_word::w#0 print_dword::@1/(word) print_word::w#1 ) @@ -151,6 +157,8 @@ print_word::@return: scope:[print_word] from print_word::@2 (byte*) print_char_cursor#5 ← (byte*) print_char_cursor#37 return to:@return + +(void()) print_dword((dword) print_dword::dw) print_dword: scope:[print_dword] from main::@2 (byte*) print_char_cursor#66 ← phi( main::@2/(byte*) print_char_cursor#69 ) (dword) print_dword::dw#1 ← phi( main::@2/(dword) print_dword::dw#0 ) @@ -181,6 +189,8 @@ print_dword::@return: scope:[print_dword] from print_dword::@2 (byte*) print_line_cursor#23 ← phi( @12/(byte*) print_line_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $0 to:@37 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from main::@13 main::@15 main::@17 main::@19 print_word print_word::@1 (byte*) print_char_cursor#67 ← phi( main::@13/(byte*) print_char_cursor#22 main::@15/(byte*) print_char_cursor#24 main::@17/(byte*) print_char_cursor#26 main::@19/(byte*) print_char_cursor#28 print_word/(byte*) print_char_cursor#65 print_word::@1/(byte*) print_char_cursor#3 ) (byte) print_byte::b#6 ← phi( main::@13/(byte) print_byte::b#2 main::@15/(byte) print_byte::b#3 main::@17/(byte) print_byte::b#4 main::@19/(byte) print_byte::b#5 print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -205,6 +215,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#11 ← (byte*) print_char_cursor#43 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from main::@10 main::@12 main::@14 main::@16 main::@18 main::@8 print_byte print_byte::@1 (byte*) print_char_cursor#44 ← phi( main::@10/(byte*) print_char_cursor#19 main::@12/(byte*) print_char_cursor#21 main::@14/(byte*) print_char_cursor#23 main::@16/(byte*) print_char_cursor#25 main::@18/(byte*) print_char_cursor#27 main::@8/(byte*) print_char_cursor#17 print_byte/(byte*) print_char_cursor#67 print_byte::@1/(byte*) print_char_cursor#9 ) (byte) print_char::ch#8 ← phi( main::@10/(byte) print_char::ch#3 main::@12/(byte) print_char::ch#4 main::@14/(byte) print_char::ch#5 main::@16/(byte) print_char::ch#6 main::@18/(byte) print_char::ch#7 main::@8/(byte) print_char::ch#2 print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -216,6 +228,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#13 ← (byte*) print_char_cursor#45 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main (byte*) print_screen#1 ← phi( main/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -236,6 +250,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte*) print_char_cursor#15 ← (byte*) print_char_cursor#46 return to:@return + +(void()) main() main: scope:[main] from @37 (byte*) print_char_cursor#68 ← phi( @37/(byte*) print_char_cursor#71 ) (byte*) print_line_cursor#18 ← phi( @37/(byte*) print_line_cursor#21 ) @@ -1056,6 +1072,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -1139,6 +1157,8 @@ main::@16: scope:[main] from main::@15 [47] (dword) main::dw#1 ← ++ (dword) main::dw#10 [48] (byte*~) print_line_cursor#38 ← (byte*) print_line_cursor#1 to:main::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@15 [49] phi() to:print_ln::@1 @@ -1153,6 +1173,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@1 print_ln::@2: scope:[print_ln] from print_ln::@1 [54] (byte*~) print_line_cursor#37 ← (byte*) print_line_cursor#1 to:print_ln::@1 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from main::@10 main::@12 main::@14 main::@8 print_word print_word::@1 [55] (byte*) print_char_cursor#67 ← phi( main::@8/(byte*) print_char_cursor#12 main::@10/(byte*) print_char_cursor#12 main::@12/(byte*) print_char_cursor#12 main::@14/(byte*) print_char_cursor#12 print_word/(byte*) print_char_cursor#65 print_word::@1/(byte*) print_char_cursor#12 ) [55] (byte) print_byte::b#6 ← phi( main::@8/(byte) print_byte::b#2 main::@10/(byte) print_byte::b#3 main::@12/(byte) print_byte::b#4 main::@14/(byte) print_byte::b#5 print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -1168,6 +1190,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [62] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from main::@11 main::@13 main::@3 main::@5 main::@7 main::@9 print_byte print_byte::@1 [63] (byte*) print_char_cursor#44 ← phi( main::@5/(byte*) print_char_cursor#12 main::@7/(byte*) print_char_cursor#12 main::@9/(byte*) print_char_cursor#12 main::@11/(byte*) print_char_cursor#12 main::@13/(byte*) print_char_cursor#12 main::@3/(byte*) print_char_cursor#12 print_byte/(byte*) print_char_cursor#67 print_byte::@1/(byte*) print_char_cursor#12 ) [63] (byte) print_char::ch#8 ← phi( main::@5/(byte) ' ' main::@7/(byte) ' ' main::@9/(byte) ' ' main::@11/(byte) ' ' main::@13/(byte) ' ' main::@3/(byte) ' ' print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) @@ -1177,6 +1201,8 @@ print_char: scope:[print_char] from main::@11 main::@13 main::@3 main::@5 main: print_char::@return: scope:[print_char] from print_char [66] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from main::@4 main::@6 print_dword print_dword::@1 [67] (byte*) print_char_cursor#65 ← phi( main::@6/(byte*) print_char_cursor#12 main::@4/(byte*) print_char_cursor#12 print_dword/(byte*~) print_char_cursor#75 print_dword::@1/(byte*) print_char_cursor#12 ) [67] (word) print_word::w#4 ← phi( main::@6/(word) print_word::w#3 main::@4/(word) print_word::w#2 print_dword/(word) print_word::w#0 print_dword::@1/(word) print_word::w#1 ) @@ -1190,6 +1216,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [72] return to:@return + +(void()) print_dword((dword) print_dword::dw) print_dword: scope:[print_dword] from main::@2 [73] (word) print_word::w#0 ← > (dword) print_dword::dw#0 [74] (byte*~) print_char_cursor#75 ← (byte*) print_char_cursor#31 @@ -1202,6 +1230,8 @@ print_dword::@1: scope:[print_dword] from print_dword print_dword::@return: scope:[print_dword] from print_dword::@1 [78] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main [79] phi() [80] call memset @@ -1209,6 +1239,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [81] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [82] phi() to:memset::@1 diff --git a/src/test/ref/test-multiply-16bit.cfg b/src/test/ref/test-multiply-16bit.cfg index 1d2009d8a..abbe8c3ac 100644 --- a/src/test/ref/test-multiply-16bit.cfg +++ b/src/test/ref/test-multiply-16bit.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BGCOL#0) ← (byte) 5 [5] call print_cls @@ -26,6 +28,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [12] return to:@return + +(void()) mul16s_compare() mul16s_compare: scope:[mul16s_compare] from main::@3 [13] (byte*~) print_char_cursor#222 ← (byte*) print_line_cursor#1 to:mul16s_compare::@1 @@ -111,6 +115,8 @@ mul16s_compare::@14: scope:[mul16s_compare] from mul16s_compare::@13 [57] phi() [58] call print_ln to:mul16s_compare::@return + +(void()) print_ln() print_ln: scope:[print_ln] from mul16s_compare::@14 mul16s_compare::@9 mul16s_error::@10 mul16u_compare::@14 mul16u_compare::@9 mul16u_error::@10 [59] (byte*) print_char_cursor#133 ← phi( mul16s_compare::@9/(byte*) print_char_cursor#132 mul16s_compare::@14/(byte*) print_char_cursor#132 mul16s_error::@10/(byte*) print_char_cursor#22 mul16u_compare::@9/(byte*) print_char_cursor#132 mul16u_compare::@14/(byte*) print_char_cursor#132 mul16u_error::@10/(byte*) print_char_cursor#22 ) [59] (byte*) print_line_cursor#43 ← phi( mul16s_compare::@9/(byte*) print_line_cursor#1 mul16s_compare::@14/(byte*) print_line_cursor#1 mul16s_error::@10/(byte*) print_line_cursor#1 mul16u_compare::@9/(byte*) 1024 mul16u_compare::@14/(byte*) print_line_cursor#1 mul16u_error::@10/(byte*) 1024 ) @@ -123,6 +129,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [63] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from mul16s_compare::@1 mul16s_compare::@13 mul16s_error mul16s_error::@2 mul16s_error::@4 mul16s_error::@6 mul16s_error::@8 mul16u_compare::@1 mul16u_compare::@13 mul16u_error mul16u_error::@2 mul16u_error::@4 mul16u_error::@6 mul16u_error::@8 [64] (byte*) print_char_cursor#154 ← phi( mul16s_compare::@1/(byte*) print_char_cursor#149 mul16s_compare::@13/(byte*~) print_char_cursor#183 mul16s_error/(byte*) print_char_cursor#132 mul16s_error::@2/(byte*) print_char_cursor#22 mul16s_error::@4/(byte*) print_char_cursor#22 mul16s_error::@6/(byte*) print_char_cursor#22 mul16s_error::@8/(byte*) print_char_cursor#22 mul16u_compare::@1/(byte*) print_char_cursor#145 mul16u_compare::@13/(byte*~) print_char_cursor#190 mul16u_error/(byte*) print_char_cursor#132 mul16u_error::@2/(byte*) print_char_cursor#22 mul16u_error::@4/(byte*) print_char_cursor#22 mul16u_error::@6/(byte*) print_char_cursor#22 mul16u_error::@8/(byte*) print_char_cursor#22 ) [64] (byte*) print_str::str#17 ← phi( mul16s_compare::@1/(const string) str mul16s_compare::@13/(const string) mul16s_compare::str1 mul16s_error/(const string) mul16s_error::str mul16s_error::@2/(const string) str1 mul16s_error::@4/(const string) str2 mul16s_error::@6/(const string) str3 mul16s_error::@8/(const string) str4 mul16u_compare::@1/(const string) str mul16u_compare::@13/(const string) mul16u_compare::str1 mul16u_error/(const string) mul16u_error::str mul16u_error::@2/(const string) str1 mul16u_error::@4/(const string) str2 mul16u_error::@6/(const string) str3 mul16u_error::@8/(const string) str4 ) @@ -140,6 +148,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [69] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#132 [70] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#15 to:print_str::@1 + +(void()) mul16s_error((signed word) mul16s_error::a , (signed word) mul16s_error::b , (signed dword) mul16s_error::ms , (signed dword) mul16s_error::mn , (signed dword) mul16s_error::mf) mul16s_error: scope:[mul16s_error] from mul16s_compare::@7 [71] phi() [72] call print_str @@ -187,6 +197,8 @@ mul16s_error::@10: scope:[mul16s_error] from mul16s_error::@9 mul16s_error::@return: scope:[mul16s_error] from mul16s_error::@10 [93] return to:@return + +(void()) print_sdword((signed dword) print_sdword::dw) print_sdword: scope:[print_sdword] from mul16s_error::@5 mul16s_error::@7 mul16s_error::@9 [94] (signed dword) print_sdword::dw#4 ← phi( mul16s_error::@5/(signed dword) print_sdword::dw#1 mul16s_error::@7/(signed dword) print_sdword::dw#2 mul16s_error::@9/(signed dword) print_sdword::dw#3 ) [95] if((signed dword) print_sdword::dw#4<(signed byte) 0) goto print_sdword::@1 @@ -210,6 +222,8 @@ print_sdword::@1: scope:[print_sdword] from print_sdword print_sdword::@4: scope:[print_sdword] from print_sdword::@1 [104] (signed dword) print_sdword::dw#0 ← - (signed dword) print_sdword::dw#4 to:print_sdword::@2 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sdword::@1 print_sdword::@3 print_sword::@1 print_sword::@3 [105] (byte*) print_char_cursor#88 ← phi( print_byte/(byte*) print_char_cursor#142 print_byte::@1/(byte*) print_char_cursor#22 print_sdword::@1/(byte*) print_char_cursor#132 print_sdword::@3/(byte*) print_char_cursor#132 print_sword::@1/(byte*) print_char_cursor#132 print_sword::@3/(byte*) print_char_cursor#132 ) [105] (byte) print_char::ch#6 ← phi( print_byte/(byte) print_char::ch#4 print_byte::@1/(byte) print_char::ch#5 print_sdword::@1/(byte) '-' print_sdword::@3/(byte) ' ' print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' ) @@ -219,6 +233,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_sdword::@1 print_char::@return: scope:[print_char] from print_char [108] return to:@return + +(void()) print_dword((dword) print_dword::dw) print_dword: scope:[print_dword] from mul16u_error::@5 mul16u_error::@7 mul16u_error::@9 print_sdword::@2 [109] (byte*) print_char_cursor#138 ← phi( mul16u_error::@5/(byte*) print_char_cursor#132 mul16u_error::@7/(byte*) print_char_cursor#132 mul16u_error::@9/(byte*) print_char_cursor#132 print_sdword::@2/(byte*) print_char_cursor#22 ) [109] (dword) print_dword::dw#4 ← phi( mul16u_error::@5/(dword) print_dword::dw#1 mul16u_error::@7/(dword) print_dword::dw#2 mul16u_error::@9/(dword) print_dword::dw#3 print_sdword::@2/(dword) print_dword::dw#0 ) @@ -232,6 +248,8 @@ print_dword::@1: scope:[print_dword] from print_dword print_dword::@return: scope:[print_dword] from print_dword::@1 [114] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from mul16u_error::@1 mul16u_error::@3 print_dword print_dword::@1 print_sword::@2 [115] (byte*) print_char_cursor#137 ← phi( mul16u_error::@1/(byte*) print_char_cursor#132 mul16u_error::@3/(byte*) print_char_cursor#132 print_dword/(byte*) print_char_cursor#138 print_dword::@1/(byte*) print_char_cursor#22 print_sword::@2/(byte*) print_char_cursor#22 ) [115] (word) print_word::w#5 ← phi( mul16u_error::@1/(word) print_word::w#3 mul16u_error::@3/(word) print_word::w#4 print_dword/(word) print_word::w#1 print_dword::@1/(word) print_word::w#2 print_sword::@2/(word) print_word::w#0 ) @@ -245,6 +263,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [120] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [121] (byte*) print_char_cursor#142 ← phi( print_word/(byte*) print_char_cursor#137 print_word::@1/(byte*) print_char_cursor#22 ) [121] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -260,6 +280,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [128] return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from mul16s_error::@1 mul16s_error::@3 [129] (signed word) print_sword::w#3 ← phi( mul16s_error::@1/(signed word) print_sword::w#1 mul16s_error::@3/(signed word) print_sword::w#2 ) [130] if((signed word) print_sword::w#3<(signed byte) 0) goto print_sword::@1 @@ -283,6 +305,8 @@ print_sword::@1: scope:[print_sword] from print_sword print_sword::@4: scope:[print_sword] from print_sword::@1 [139] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#3 to:print_sword::@2 + +(signed dword()) mulf16s((signed word) mulf16s::a , (signed word) mulf16s::b) mulf16s: scope:[mulf16s] from mul16s_compare::@11 [140] (word) mulf16u::a#0 ← (word)(signed word) mulf16s::a#0 [141] (word) mulf16u::b#0 ← (word)(signed word) mulf16s::b#0 @@ -314,6 +338,8 @@ mulf16s::@2: scope:[mulf16s] from mulf16s::@1 mulf16s::@4 mulf16s::@return: scope:[mulf16s] from mulf16s::@2 [156] return to:@return + +(dword()) mulf16u((word) mulf16u::a , (word) mulf16u::b) mulf16u: scope:[mulf16u] from mul16u_compare::@11 mulf16s [157] (word) mulf16u::b#2 ← phi( mul16u_compare::@11/(word) mulf16u::b#1 mulf16s/(word) mulf16u::b#0 ) [157] (word) mulf16u::a#2 ← phi( mul16u_compare::@11/(word) mulf16u::a#1 mulf16s/(word) mulf16u::a#0 ) @@ -325,6 +351,8 @@ mulf16u: scope:[mulf16u] from mul16u_compare::@11 mulf16s mulf16u::@return: scope:[mulf16u] from mulf16u [162] return to:@return + +(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) mul16s: scope:[mul16s] from mul16s_compare::@10 [163] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#0 [164] (word) mul16u::b#0 ← (word)(signed word) mul16s::b#0 @@ -356,6 +384,8 @@ mul16s::@2: scope:[mul16s] from mul16s::@1 mul16s::@4 mul16s::@return: scope:[mul16s] from mul16s::@2 [179] return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mul16s mul16u_compare::@10 [180] (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mul16u_compare::@10/(word) mul16u::a#2 ) [180] (dword) mul16u::mb#0 ← phi( mul16s/(word) mul16u::b#0 mul16u_compare::@10/(word) mul16u::b#1 ) @@ -381,6 +411,8 @@ mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4 [188] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 [189] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 to:mul16u::@1 + +(signed dword()) muls16s((signed word) muls16s::a , (signed word) muls16s::b) muls16s: scope:[muls16s] from mul16s_compare::@2 [190] if((signed word) muls16s::a#0<(signed byte) 0) goto muls16s::@5 to:muls16s::@2 @@ -411,6 +443,8 @@ muls16s::@6: scope:[muls16s] from muls16s::@5 [200] (signed dword) muls16s::m#2 ← (signed dword) muls16s::m#5 - (signed word) muls16s::b#0 [201] (signed word) muls16s::i#1 ← -- (signed word) muls16s::i#2 to:muls16s::@5 + +(void()) mul16u_compare() mul16u_compare: scope:[mul16u_compare] from main::@2 [202] phi() to:mul16u_compare::@1 @@ -496,6 +530,8 @@ mul16u_compare::@14: scope:[mul16u_compare] from mul16u_compare::@13 [246] phi() [247] call print_ln to:mul16u_compare::@return + +(void()) mul16u_error((word) mul16u_error::a , (word) mul16u_error::b , (dword) mul16u_error::ms , (dword) mul16u_error::mn , (dword) mul16u_error::mf) mul16u_error: scope:[mul16u_error] from mul16u_compare::@7 [248] phi() [249] call print_str @@ -543,6 +579,8 @@ mul16u_error::@10: scope:[mul16u_error] from mul16u_error::@9 mul16u_error::@return: scope:[mul16u_error] from mul16u_error::@10 [270] return to:@return + +(dword()) muls16u((word) muls16u::a , (word) muls16u::b) muls16u: scope:[muls16u] from mul16u_compare::@2 [271] if((word) muls16u::a#0==(byte) 0) goto muls16u::@1 to:muls16u::@2 @@ -561,6 +599,8 @@ muls16u::@3: scope:[muls16u] from muls16u::@2 [276] (dword) muls16u::m#1 ← (dword) muls16u::m#3 + (word) muls16u::b#0 [277] (word) muls16u::i#1 ← ++ (word) muls16u::i#2 to:muls16u::@2 + +(void()) mulf_init() mulf_init: scope:[mulf_init] from main::@1 [278] phi() to:mulf_init::@1 @@ -620,6 +660,8 @@ mulf_init::@3: scope:[mulf_init] from mulf_init::@2 mulf_init::@4 [305] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 [306] (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#2 to:mulf_init::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main [307] phi() [308] call memset @@ -627,6 +669,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [309] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [310] phi() to:memset::@1 diff --git a/src/test/ref/test-multiply-16bit.log b/src/test/ref/test-multiply-16bit.log index 7fa12ac0b..04d62e73a 100644 --- a/src/test/ref/test-multiply-16bit.log +++ b/src/test/ref/test-multiply-16bit.log @@ -110,6 +110,8 @@ Culled Empty Block (label) @56 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@12 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -157,6 +159,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@29 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from mul16s_compare::@1 mul16s_compare::@17 mul16s_error mul16s_error::@2 mul16s_error::@4 mul16s_error::@6 mul16s_error::@8 mul16u_compare::@1 mul16u_compare::@17 mul16u_error mul16u_error::@2 mul16u_error::@4 mul16u_error::@6 mul16u_error::@8 (byte*) print_char_cursor#154 ← phi( mul16s_compare::@1/(byte*) print_char_cursor#149 mul16s_compare::@17/(byte*) print_char_cursor#51 mul16s_error/(byte*) print_char_cursor#152 mul16s_error::@2/(byte*) print_char_cursor#55 mul16s_error::@4/(byte*) print_char_cursor#57 mul16s_error::@6/(byte*) print_char_cursor#59 mul16s_error::@8/(byte*) print_char_cursor#61 mul16u_compare::@1/(byte*) print_char_cursor#145 mul16u_compare::@17/(byte*) print_char_cursor#33 mul16u_error/(byte*) print_char_cursor#148 mul16u_error::@2/(byte*) print_char_cursor#37 mul16u_error::@4/(byte*) print_char_cursor#39 mul16u_error::@6/(byte*) print_char_cursor#41 mul16u_error::@8/(byte*) print_char_cursor#43 ) (byte*) print_str::str#17 ← phi( mul16s_compare::@1/(byte*) print_str::str#8 mul16s_compare::@17/(byte*) print_str::str#9 mul16s_error/(byte*) print_str::str#10 mul16s_error::@2/(byte*) print_str::str#11 mul16s_error::@4/(byte*) print_str::str#12 mul16s_error::@6/(byte*) print_str::str#13 mul16s_error::@8/(byte*) print_str::str#14 mul16u_compare::@1/(byte*) print_str::str#1 mul16u_compare::@17/(byte*) print_str::str#2 mul16u_error/(byte*) print_str::str#3 mul16u_error::@2/(byte*) print_str::str#4 mul16u_error::@4/(byte*) print_str::str#5 mul16u_error::@6/(byte*) print_str::str#6 mul16u_error::@8/(byte*) print_str::str#7 ) @@ -179,6 +183,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#68 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from mul16s_compare::@11 mul16s_compare::@18 mul16s_error::@10 mul16u_compare::@11 mul16u_compare::@18 mul16u_error::@10 (byte*) print_char_cursor#133 ← phi( mul16s_compare::@11/(byte*) print_char_cursor#151 mul16s_compare::@18/(byte*) print_char_cursor#52 mul16s_error::@10/(byte*) print_char_cursor#63 mul16u_compare::@11/(byte*) print_char_cursor#147 mul16u_compare::@18/(byte*) print_char_cursor#34 mul16u_error::@10/(byte*) print_char_cursor#45 ) (byte*) print_line_cursor#43 ← phi( mul16s_compare::@11/(byte*) print_line_cursor#51 mul16s_compare::@18/(byte*) print_line_cursor#52 mul16s_error::@10/(byte*) print_line_cursor#53 mul16u_compare::@11/(byte*) print_line_cursor#47 mul16u_compare::@18/(byte*) print_line_cursor#48 mul16u_error::@10/(byte*) print_line_cursor#49 ) @@ -202,6 +208,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#70 return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from mul16s_error::@1 mul16s_error::@3 (byte*) print_char_cursor#155 ← phi( mul16s_error::@1/(byte*) print_char_cursor#54 mul16s_error::@3/(byte*) print_char_cursor#56 ) (signed word) print_sword::w#3 ← phi( mul16s_error::@1/(signed word) print_sword::w#1 mul16s_error::@3/(signed word) print_sword::w#2 ) @@ -248,6 +256,8 @@ print_sword::@return: scope:[print_sword] from print_sword::@7 (byte*) print_char_cursor#8 ← (byte*) print_char_cursor#74 return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from mul16u_error::@1 mul16u_error::@3 print_dword print_dword::@1 print_sword::@2 (byte*) print_char_cursor#137 ← phi( mul16u_error::@1/(byte*) print_char_cursor#36 mul16u_error::@3/(byte*) print_char_cursor#38 print_dword/(byte*) print_char_cursor#138 print_dword::@1/(byte*) print_char_cursor#12 print_sword::@2/(byte*) print_char_cursor#136 ) (word) print_word::w#5 ← phi( mul16u_error::@1/(word) print_word::w#3 mul16u_error::@3/(word) print_word::w#4 print_dword/(word) print_word::w#1 print_dword::@1/(word) print_word::w#2 print_sword::@2/(word) print_word::w#0 ) @@ -272,6 +282,8 @@ print_word::@return: scope:[print_word] from print_word::@2 (byte*) print_char_cursor#11 ← (byte*) print_char_cursor#77 return to:@return + +(void()) print_dword((dword) print_dword::dw) print_dword: scope:[print_dword] from mul16u_error::@5 mul16u_error::@7 mul16u_error::@9 print_sdword::@2 (byte*) print_char_cursor#138 ← phi( mul16u_error::@5/(byte*) print_char_cursor#40 mul16u_error::@7/(byte*) print_char_cursor#42 mul16u_error::@9/(byte*) print_char_cursor#44 print_sdword::@2/(byte*) print_char_cursor#141 ) (dword) print_dword::dw#4 ← phi( mul16u_error::@5/(dword) print_dword::dw#1 mul16u_error::@7/(dword) print_dword::dw#2 mul16u_error::@9/(dword) print_dword::dw#3 print_sdword::@2/(dword) print_dword::dw#0 ) @@ -296,6 +308,8 @@ print_dword::@return: scope:[print_dword] from print_dword::@2 (byte*) print_char_cursor#14 ← (byte*) print_char_cursor#80 return to:@return + +(void()) print_sdword((signed dword) print_sdword::dw) print_sdword: scope:[print_sdword] from mul16s_error::@5 mul16s_error::@7 mul16s_error::@9 (byte*) print_char_cursor#156 ← phi( mul16s_error::@5/(byte*) print_char_cursor#58 mul16s_error::@7/(byte*) print_char_cursor#60 mul16s_error::@9/(byte*) print_char_cursor#62 ) (signed dword) print_sdword::dw#4 ← phi( mul16s_error::@5/(signed dword) print_sdword::dw#1 mul16s_error::@7/(signed dword) print_sdword::dw#2 mul16s_error::@9/(signed dword) print_sdword::dw#3 ) @@ -348,6 +362,8 @@ print_sdword::@return: scope:[print_sdword] from print_sdword::@7 (byte*) print_line_cursor#71 ← phi( @12/(byte*) print_line_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $0 to:@41 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) print_char_cursor#142 ← phi( print_word/(byte*) print_char_cursor#137 print_word::@1/(byte*) print_char_cursor#9 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -372,6 +388,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#21 ← (byte*) print_char_cursor#87 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sdword::@1 print_sdword::@3 print_sword::@1 print_sword::@3 (byte*) print_char_cursor#88 ← phi( print_byte/(byte*) print_char_cursor#142 print_byte::@1/(byte*) print_char_cursor#19 print_sdword::@1/(byte*) print_char_cursor#139 print_sdword::@3/(byte*) print_char_cursor#140 print_sword::@1/(byte*) print_char_cursor#134 print_sword::@3/(byte*) print_char_cursor#135 ) (byte) print_char::ch#6 ← phi( print_byte/(byte) print_char::ch#4 print_byte::@1/(byte) print_char::ch#5 print_sdword::@1/(byte) print_char::ch#2 print_sdword::@3/(byte) print_char::ch#3 print_sword::@1/(byte) print_char::ch#0 print_sword::@3/(byte) print_char::ch#1 ) @@ -383,6 +401,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#23 ← (byte*) print_char_cursor#89 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main (byte*) print_screen#1 ← phi( main/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -403,6 +423,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte*) print_char_cursor#25 ← (byte*) print_char_cursor#90 return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mul16s mul16u_compare::@13 (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mul16u_compare::@13/(word) mul16u::a#2 ) (word) mul16u::b#2 ← phi( mul16s/(word) mul16u::b#0 mul16u_compare::@13/(word) mul16u::b#1 ) @@ -450,6 +472,8 @@ mul16u::@return: scope:[mul16u] from mul16u::@3 (dword) mul16u::return#1 ← (dword) mul16u::return#4 return to:@return + +(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) mul16s: scope:[mul16s] from mul16s_compare::@13 (signed word) mul16s::b#1 ← phi( mul16s_compare::@13/(signed word) mul16s::b#0 ) (signed word) mul16s::a#1 ← phi( mul16s_compare::@13/(signed word) mul16s::a#0 ) @@ -516,6 +540,8 @@ mul16s::@return: scope:[mul16s] from mul16s::@2 (byte[$200]) mulf_sqr2_lo#0 ← { fill( $200, 0) } (byte[$200]) mulf_sqr2_hi#0 ← { fill( $200, 0) } to:@50 + +(void()) mulf_init() mulf_init: scope:[mulf_init] from main::@1 (word) mulf_init::sqr#0 ← (number) 0 (byte) mulf_init::x_2#0 ← (number) 0 @@ -625,6 +651,8 @@ mulf_init::@15: scope:[mulf_init] from mulf_init::@10 mulf_init::@return: scope:[mulf_init] from mulf_init::@11 return to:@return + +(dword()) mulf16u((word) mulf16u::a , (word) mulf16u::b) mulf16u: scope:[mulf16u] from mul16u_compare::@14 mulf16s (word) mulf16u::b#2 ← phi( mul16u_compare::@14/(word) mulf16u::b#1 mulf16s/(word) mulf16u::b#0 ) (word) mulf16u::a#2 ← phi( mul16u_compare::@14/(word) mulf16u::a#1 mulf16s/(word) mulf16u::a#0 ) @@ -641,6 +669,8 @@ mulf16u::@return: scope:[mulf16u] from mulf16u (dword) mulf16u::return#1 ← (dword) mulf16u::return#4 return to:@return + +(signed dword()) mulf16s((signed word) mulf16s::a , (signed word) mulf16s::b) mulf16s: scope:[mulf16s] from mul16s_compare::@14 (signed word) mulf16s::b#1 ← phi( mul16s_compare::@14/(signed word) mulf16s::b#0 ) (signed word) mulf16s::a#1 ← phi( mul16s_compare::@14/(signed word) mulf16s::a#0 ) @@ -704,6 +734,8 @@ mulf16s::@return: scope:[mulf16s] from mulf16s::@2 (byte*) print_line_cursor#61 ← phi( @41/(byte*) print_line_cursor#62 ) (byte*) BGCOL#0 ← ((byte*)) (number) $d021 to:@57 + +(void()) main() main: scope:[main] from @57 (byte*) print_char_cursor#143 ← phi( @57/(byte*) print_char_cursor#153 ) (byte*) print_line_cursor#44 ← phi( @57/(byte*) print_line_cursor#54 ) @@ -743,6 +775,8 @@ main::@return: scope:[main] from main::@4 (byte*) print_char_cursor#29 ← (byte*) print_char_cursor#94 return to:@return + +(dword()) muls16u((word) muls16u::a , (word) muls16u::b) muls16u: scope:[muls16u] from mul16u_compare::@2 (word) muls16u::b#4 ← phi( mul16u_compare::@2/(word) muls16u::b#0 ) (word) muls16u::a#1 ← phi( mul16u_compare::@2/(word) muls16u::a#0 ) @@ -783,6 +817,8 @@ muls16u::@return: scope:[muls16u] from muls16u::@1 (dword) muls16u::return#1 ← (dword) muls16u::return#3 return to:@return + +(signed dword()) muls16s((signed word) muls16s::a , (signed word) muls16s::b) muls16s: scope:[muls16s] from mul16s_compare::@2 (signed word) muls16s::b#7 ← phi( mul16s_compare::@2/(signed word) muls16s::b#0 ) (signed word) muls16s::a#1 ← phi( mul16s_compare::@2/(signed word) muls16s::a#0 ) @@ -853,6 +889,8 @@ muls16s::@return: scope:[muls16s] from muls16s::@3 (signed dword) muls16s::return#1 ← (signed dword) muls16s::return#3 return to:@return + +(void()) mul16u_compare() mul16u_compare: scope:[mul16u_compare] from main::@2 (byte*) print_line_cursor#98 ← phi( main::@2/(byte*) print_line_cursor#45 ) (byte*) print_char_cursor#157 ← phi( main::@2/(byte*) print_char_cursor#144 ) @@ -1071,6 +1109,8 @@ mul16u_compare::@19: scope:[mul16u_compare] from mul16u_compare::@18 (byte*) print_line_cursor#12 ← (byte*) print_line_cursor#33 (byte*) print_char_cursor#35 ← (byte*) print_char_cursor#100 to:mul16u_compare::@return + +(void()) mul16u_error((word) mul16u_error::a , (word) mul16u_error::b , (dword) mul16u_error::ms , (dword) mul16u_error::mn , (dword) mul16u_error::mf) mul16u_error: scope:[mul16u_error] from mul16u_compare::@8 (byte*) print_line_cursor#102 ← phi( mul16u_compare::@8/(byte*) print_line_cursor#46 ) (dword) mul16u_error::mf#10 ← phi( mul16u_compare::@8/(dword) mul16u_error::mf#0 ) @@ -1189,6 +1229,8 @@ mul16u_error::@return: scope:[mul16u_error] from mul16u_error::@11 (byte*) print_line_cursor#14 ← (byte*) print_line_cursor#35 return to:@return + +(void()) mul16s_compare() mul16s_compare: scope:[mul16s_compare] from main::@3 (byte*) print_line_cursor#100 ← phi( main::@3/(byte*) print_line_cursor#6 ) (byte*) print_char_cursor#160 ← phi( main::@3/(byte*) print_char_cursor#27 ) @@ -1407,6 +1449,8 @@ mul16s_compare::@19: scope:[mul16s_compare] from mul16s_compare::@18 (byte*) print_line_cursor#18 ← (byte*) print_line_cursor#39 (byte*) print_char_cursor#53 ← (byte*) print_char_cursor#118 to:mul16s_compare::@return + +(void()) mul16s_error((signed word) mul16s_error::a , (signed word) mul16s_error::b , (signed dword) mul16s_error::ms , (signed dword) mul16s_error::mn , (signed dword) mul16s_error::mf) mul16s_error: scope:[mul16s_error] from mul16s_compare::@8 (byte*) print_line_cursor#103 ← phi( mul16s_compare::@8/(byte*) print_line_cursor#50 ) (signed dword) mul16s_error::mf#10 ← phi( mul16s_compare::@8/(signed dword) mul16s_error::mf#0 ) @@ -4068,6 +4112,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BGCOL#0) ← (byte) 5 [5] call print_cls @@ -4087,6 +4133,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [12] return to:@return + +(void()) mul16s_compare() mul16s_compare: scope:[mul16s_compare] from main::@3 [13] (byte*~) print_char_cursor#222 ← (byte*) print_line_cursor#1 to:mul16s_compare::@1 @@ -4172,6 +4220,8 @@ mul16s_compare::@14: scope:[mul16s_compare] from mul16s_compare::@13 [57] phi() [58] call print_ln to:mul16s_compare::@return + +(void()) print_ln() print_ln: scope:[print_ln] from mul16s_compare::@14 mul16s_compare::@9 mul16s_error::@10 mul16u_compare::@14 mul16u_compare::@9 mul16u_error::@10 [59] (byte*) print_char_cursor#133 ← phi( mul16s_compare::@9/(byte*) print_char_cursor#132 mul16s_compare::@14/(byte*) print_char_cursor#132 mul16s_error::@10/(byte*) print_char_cursor#22 mul16u_compare::@9/(byte*) print_char_cursor#132 mul16u_compare::@14/(byte*) print_char_cursor#132 mul16u_error::@10/(byte*) print_char_cursor#22 ) [59] (byte*) print_line_cursor#43 ← phi( mul16s_compare::@9/(byte*) print_line_cursor#1 mul16s_compare::@14/(byte*) print_line_cursor#1 mul16s_error::@10/(byte*) print_line_cursor#1 mul16u_compare::@9/(byte*) 1024 mul16u_compare::@14/(byte*) print_line_cursor#1 mul16u_error::@10/(byte*) 1024 ) @@ -4184,6 +4234,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [63] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from mul16s_compare::@1 mul16s_compare::@13 mul16s_error mul16s_error::@2 mul16s_error::@4 mul16s_error::@6 mul16s_error::@8 mul16u_compare::@1 mul16u_compare::@13 mul16u_error mul16u_error::@2 mul16u_error::@4 mul16u_error::@6 mul16u_error::@8 [64] (byte*) print_char_cursor#154 ← phi( mul16s_compare::@1/(byte*) print_char_cursor#149 mul16s_compare::@13/(byte*~) print_char_cursor#183 mul16s_error/(byte*) print_char_cursor#132 mul16s_error::@2/(byte*) print_char_cursor#22 mul16s_error::@4/(byte*) print_char_cursor#22 mul16s_error::@6/(byte*) print_char_cursor#22 mul16s_error::@8/(byte*) print_char_cursor#22 mul16u_compare::@1/(byte*) print_char_cursor#145 mul16u_compare::@13/(byte*~) print_char_cursor#190 mul16u_error/(byte*) print_char_cursor#132 mul16u_error::@2/(byte*) print_char_cursor#22 mul16u_error::@4/(byte*) print_char_cursor#22 mul16u_error::@6/(byte*) print_char_cursor#22 mul16u_error::@8/(byte*) print_char_cursor#22 ) [64] (byte*) print_str::str#17 ← phi( mul16s_compare::@1/(const string) str mul16s_compare::@13/(const string) mul16s_compare::str1 mul16s_error/(const string) mul16s_error::str mul16s_error::@2/(const string) str1 mul16s_error::@4/(const string) str2 mul16s_error::@6/(const string) str3 mul16s_error::@8/(const string) str4 mul16u_compare::@1/(const string) str mul16u_compare::@13/(const string) mul16u_compare::str1 mul16u_error/(const string) mul16u_error::str mul16u_error::@2/(const string) str1 mul16u_error::@4/(const string) str2 mul16u_error::@6/(const string) str3 mul16u_error::@8/(const string) str4 ) @@ -4201,6 +4253,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [69] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#132 [70] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#15 to:print_str::@1 + +(void()) mul16s_error((signed word) mul16s_error::a , (signed word) mul16s_error::b , (signed dword) mul16s_error::ms , (signed dword) mul16s_error::mn , (signed dword) mul16s_error::mf) mul16s_error: scope:[mul16s_error] from mul16s_compare::@7 [71] phi() [72] call print_str @@ -4248,6 +4302,8 @@ mul16s_error::@10: scope:[mul16s_error] from mul16s_error::@9 mul16s_error::@return: scope:[mul16s_error] from mul16s_error::@10 [93] return to:@return + +(void()) print_sdword((signed dword) print_sdword::dw) print_sdword: scope:[print_sdword] from mul16s_error::@5 mul16s_error::@7 mul16s_error::@9 [94] (signed dword) print_sdword::dw#4 ← phi( mul16s_error::@5/(signed dword) print_sdword::dw#1 mul16s_error::@7/(signed dword) print_sdword::dw#2 mul16s_error::@9/(signed dword) print_sdword::dw#3 ) [95] if((signed dword) print_sdword::dw#4<(signed byte) 0) goto print_sdword::@1 @@ -4271,6 +4327,8 @@ print_sdword::@1: scope:[print_sdword] from print_sdword print_sdword::@4: scope:[print_sdword] from print_sdword::@1 [104] (signed dword) print_sdword::dw#0 ← - (signed dword) print_sdword::dw#4 to:print_sdword::@2 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sdword::@1 print_sdword::@3 print_sword::@1 print_sword::@3 [105] (byte*) print_char_cursor#88 ← phi( print_byte/(byte*) print_char_cursor#142 print_byte::@1/(byte*) print_char_cursor#22 print_sdword::@1/(byte*) print_char_cursor#132 print_sdword::@3/(byte*) print_char_cursor#132 print_sword::@1/(byte*) print_char_cursor#132 print_sword::@3/(byte*) print_char_cursor#132 ) [105] (byte) print_char::ch#6 ← phi( print_byte/(byte) print_char::ch#4 print_byte::@1/(byte) print_char::ch#5 print_sdword::@1/(byte) '-' print_sdword::@3/(byte) ' ' print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' ) @@ -4280,6 +4338,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_sdword::@1 print_char::@return: scope:[print_char] from print_char [108] return to:@return + +(void()) print_dword((dword) print_dword::dw) print_dword: scope:[print_dword] from mul16u_error::@5 mul16u_error::@7 mul16u_error::@9 print_sdword::@2 [109] (byte*) print_char_cursor#138 ← phi( mul16u_error::@5/(byte*) print_char_cursor#132 mul16u_error::@7/(byte*) print_char_cursor#132 mul16u_error::@9/(byte*) print_char_cursor#132 print_sdword::@2/(byte*) print_char_cursor#22 ) [109] (dword) print_dword::dw#4 ← phi( mul16u_error::@5/(dword) print_dword::dw#1 mul16u_error::@7/(dword) print_dword::dw#2 mul16u_error::@9/(dword) print_dword::dw#3 print_sdword::@2/(dword) print_dword::dw#0 ) @@ -4293,6 +4353,8 @@ print_dword::@1: scope:[print_dword] from print_dword print_dword::@return: scope:[print_dword] from print_dword::@1 [114] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from mul16u_error::@1 mul16u_error::@3 print_dword print_dword::@1 print_sword::@2 [115] (byte*) print_char_cursor#137 ← phi( mul16u_error::@1/(byte*) print_char_cursor#132 mul16u_error::@3/(byte*) print_char_cursor#132 print_dword/(byte*) print_char_cursor#138 print_dword::@1/(byte*) print_char_cursor#22 print_sword::@2/(byte*) print_char_cursor#22 ) [115] (word) print_word::w#5 ← phi( mul16u_error::@1/(word) print_word::w#3 mul16u_error::@3/(word) print_word::w#4 print_dword/(word) print_word::w#1 print_dword::@1/(word) print_word::w#2 print_sword::@2/(word) print_word::w#0 ) @@ -4306,6 +4368,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [120] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [121] (byte*) print_char_cursor#142 ← phi( print_word/(byte*) print_char_cursor#137 print_word::@1/(byte*) print_char_cursor#22 ) [121] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -4321,6 +4385,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [128] return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from mul16s_error::@1 mul16s_error::@3 [129] (signed word) print_sword::w#3 ← phi( mul16s_error::@1/(signed word) print_sword::w#1 mul16s_error::@3/(signed word) print_sword::w#2 ) [130] if((signed word) print_sword::w#3<(signed byte) 0) goto print_sword::@1 @@ -4344,6 +4410,8 @@ print_sword::@1: scope:[print_sword] from print_sword print_sword::@4: scope:[print_sword] from print_sword::@1 [139] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#3 to:print_sword::@2 + +(signed dword()) mulf16s((signed word) mulf16s::a , (signed word) mulf16s::b) mulf16s: scope:[mulf16s] from mul16s_compare::@11 [140] (word) mulf16u::a#0 ← (word)(signed word) mulf16s::a#0 [141] (word) mulf16u::b#0 ← (word)(signed word) mulf16s::b#0 @@ -4375,6 +4443,8 @@ mulf16s::@2: scope:[mulf16s] from mulf16s::@1 mulf16s::@4 mulf16s::@return: scope:[mulf16s] from mulf16s::@2 [156] return to:@return + +(dword()) mulf16u((word) mulf16u::a , (word) mulf16u::b) mulf16u: scope:[mulf16u] from mul16u_compare::@11 mulf16s [157] (word) mulf16u::b#2 ← phi( mul16u_compare::@11/(word) mulf16u::b#1 mulf16s/(word) mulf16u::b#0 ) [157] (word) mulf16u::a#2 ← phi( mul16u_compare::@11/(word) mulf16u::a#1 mulf16s/(word) mulf16u::a#0 ) @@ -4386,6 +4456,8 @@ mulf16u: scope:[mulf16u] from mul16u_compare::@11 mulf16s mulf16u::@return: scope:[mulf16u] from mulf16u [162] return to:@return + +(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) mul16s: scope:[mul16s] from mul16s_compare::@10 [163] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#0 [164] (word) mul16u::b#0 ← (word)(signed word) mul16s::b#0 @@ -4417,6 +4489,8 @@ mul16s::@2: scope:[mul16s] from mul16s::@1 mul16s::@4 mul16s::@return: scope:[mul16s] from mul16s::@2 [179] return to:@return + +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) mul16u: scope:[mul16u] from mul16s mul16u_compare::@10 [180] (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mul16u_compare::@10/(word) mul16u::a#2 ) [180] (dword) mul16u::mb#0 ← phi( mul16s/(word) mul16u::b#0 mul16u_compare::@10/(word) mul16u::b#1 ) @@ -4442,6 +4516,8 @@ mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4 [188] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 [189] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 to:mul16u::@1 + +(signed dword()) muls16s((signed word) muls16s::a , (signed word) muls16s::b) muls16s: scope:[muls16s] from mul16s_compare::@2 [190] if((signed word) muls16s::a#0<(signed byte) 0) goto muls16s::@5 to:muls16s::@2 @@ -4472,6 +4548,8 @@ muls16s::@6: scope:[muls16s] from muls16s::@5 [200] (signed dword) muls16s::m#2 ← (signed dword) muls16s::m#5 - (signed word) muls16s::b#0 [201] (signed word) muls16s::i#1 ← -- (signed word) muls16s::i#2 to:muls16s::@5 + +(void()) mul16u_compare() mul16u_compare: scope:[mul16u_compare] from main::@2 [202] phi() to:mul16u_compare::@1 @@ -4557,6 +4635,8 @@ mul16u_compare::@14: scope:[mul16u_compare] from mul16u_compare::@13 [246] phi() [247] call print_ln to:mul16u_compare::@return + +(void()) mul16u_error((word) mul16u_error::a , (word) mul16u_error::b , (dword) mul16u_error::ms , (dword) mul16u_error::mn , (dword) mul16u_error::mf) mul16u_error: scope:[mul16u_error] from mul16u_compare::@7 [248] phi() [249] call print_str @@ -4604,6 +4684,8 @@ mul16u_error::@10: scope:[mul16u_error] from mul16u_error::@9 mul16u_error::@return: scope:[mul16u_error] from mul16u_error::@10 [270] return to:@return + +(dword()) muls16u((word) muls16u::a , (word) muls16u::b) muls16u: scope:[muls16u] from mul16u_compare::@2 [271] if((word) muls16u::a#0==(byte) 0) goto muls16u::@1 to:muls16u::@2 @@ -4622,6 +4704,8 @@ muls16u::@3: scope:[muls16u] from muls16u::@2 [276] (dword) muls16u::m#1 ← (dword) muls16u::m#3 + (word) muls16u::b#0 [277] (word) muls16u::i#1 ← ++ (word) muls16u::i#2 to:muls16u::@2 + +(void()) mulf_init() mulf_init: scope:[mulf_init] from main::@1 [278] phi() to:mulf_init::@1 @@ -4681,6 +4765,8 @@ mulf_init::@3: scope:[mulf_init] from mulf_init::@2 mulf_init::@4 [305] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 [306] (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#2 to:mulf_init::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main [307] phi() [308] call memset @@ -4688,6 +4774,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [309] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [310] phi() to:memset::@1 diff --git a/src/test/ref/test-multiply-8bit.cfg b/src/test/ref/test-multiply-8bit.cfg index 0de67b1fe..191b6a9f0 100644 --- a/src/test/ref/test-multiply-8bit.cfg +++ b/src/test/ref/test-multiply-8bit.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BGCOL#0) ← (byte) 5 [5] call print_cls @@ -34,6 +36,8 @@ main::@5: scope:[main] from main::@4 main::@return: scope:[main] from main::@5 [16] return to:@return + +(void()) mul8s_compare() mul8s_compare: scope:[mul8s_compare] from main::@5 [17] phi() to:mul8s_compare::@1 @@ -108,6 +112,8 @@ mul8s_compare::@10: scope:[mul8s_compare] from mul8s_compare::@7 mul8s_compare::@8: scope:[mul8s_compare] from mul8s_compare::@7 [56] (signed byte) mul8s_compare::b#1 ← ++ (signed byte) mul8s_compare::b#10 to:mul8s_compare::@3 + +(void()) mul8s_error((signed byte) mul8s_error::a , (signed byte) mul8s_error::b , (signed word) mul8s_error::ms , (signed word) mul8s_error::mn , (signed word) mul8s_error::mf) mul8s_error: scope:[mul8s_error] from mul8s_compare::@10 [57] (byte*~) print_char_cursor#194 ← (byte*) print_line_cursor#1 [58] call print_str @@ -155,6 +161,8 @@ mul8s_error::@10: scope:[mul8s_error] from mul8s_error::@9 mul8s_error::@return: scope:[mul8s_error] from mul8s_error::@10 [79] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from mul8s_compare::@11 mul8s_error::@10 mul8u_compare::@13 mul8u_error::@10 mulf_tables_cmp::@6 [80] (byte*) print_char_cursor#135 ← phi( mul8s_compare::@11/(byte*) print_char_cursor#134 mul8s_error::@10/(byte*) print_char_cursor#19 mul8u_compare::@13/(byte*) print_char_cursor#134 mul8u_error::@10/(byte*) print_char_cursor#19 mulf_tables_cmp::@6/(byte*) print_char_cursor#134 ) [80] (byte*) print_line_cursor#45 ← phi( mul8s_compare::@11/(byte*) print_line_cursor#1 mul8s_error::@10/(byte*) print_line_cursor#1 mul8u_compare::@13/(byte*) print_line_cursor#11 mul8u_error::@10/(byte*) print_line_cursor#11 mulf_tables_cmp::@6/(byte*) 1024 ) @@ -167,6 +175,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [84] return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from mul8s_error::@5 mul8s_error::@7 mul8s_error::@9 [85] (signed word) print_sword::w#4 ← phi( mul8s_error::@5/(signed word) print_sword::w#1 mul8s_error::@7/(signed word) print_sword::w#2 mul8s_error::@9/(signed word) print_sword::w#3 ) [86] if((signed word) print_sword::w#4<(signed byte) 0) goto print_sword::@1 @@ -190,6 +200,8 @@ print_sword::@1: scope:[print_sword] from print_sword print_sword::@4: scope:[print_sword] from print_sword::@1 [95] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#4 to:print_sword::@2 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sbyte::@3 print_sword::@1 print_sword::@3 [96] (byte*) print_char_cursor#86 ← phi( print_byte/(byte*) print_char_cursor#143 print_byte::@1/(byte*) print_char_cursor#19 print_sbyte::@1/(byte*) print_char_cursor#134 print_sbyte::@3/(byte*) print_char_cursor#134 print_sword::@1/(byte*) print_char_cursor#134 print_sword::@3/(byte*) print_char_cursor#134 ) [96] (byte) print_char::ch#6 ← phi( print_byte/(byte) print_char::ch#4 print_byte::@1/(byte) print_char::ch#5 print_sbyte::@1/(byte) '-' print_sbyte::@3/(byte) ' ' print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' ) @@ -199,6 +211,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 p print_char::@return: scope:[print_char] from print_char [99] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from mul8u_error::@5 mul8u_error::@7 mul8u_error::@9 mulf_tables_cmp::@10 mulf_tables_cmp::@8 print_sword::@2 [100] (byte*) print_char_cursor#142 ← phi( mul8u_error::@5/(byte*) print_char_cursor#134 mul8u_error::@7/(byte*) print_char_cursor#134 mul8u_error::@9/(byte*) print_char_cursor#134 mulf_tables_cmp::@8/(byte*) print_char_cursor#134 mulf_tables_cmp::@10/(byte*) print_char_cursor#134 print_sword::@2/(byte*) print_char_cursor#19 ) [100] (word) print_word::w#6 ← phi( mul8u_error::@5/(word) print_word::w#3 mul8u_error::@7/(word) print_word::w#4 mul8u_error::@9/(word) print_word::w#5 mulf_tables_cmp::@8/(word) print_word::w#1 mulf_tables_cmp::@10/(word) print_word::w#2 print_sword::@2/(word) print_word::w#0 ) @@ -212,6 +226,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [105] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from mul8u_error::@1 mul8u_error::@3 print_sbyte::@2 print_word print_word::@1 [106] (byte*) print_char_cursor#143 ← phi( mul8u_error::@1/(byte*) print_char_cursor#134 mul8u_error::@3/(byte*) print_char_cursor#134 print_sbyte::@2/(byte*) print_char_cursor#19 print_word/(byte*) print_char_cursor#142 print_word::@1/(byte*) print_char_cursor#19 ) [106] (byte) print_byte::b#5 ← phi( mul8u_error::@1/(byte) print_byte::b#3 mul8u_error::@3/(byte) print_byte::b#4 print_sbyte::@2/(byte) print_byte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 ) @@ -227,6 +243,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [113] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from mul8s_compare::@2 mul8s_error mul8s_error::@2 mul8s_error::@4 mul8s_error::@6 mul8s_error::@8 mul8u_compare::@9 mul8u_error mul8u_error::@2 mul8u_error::@4 mul8u_error::@6 mul8u_error::@8 mulf_tables_cmp::@3 mulf_tables_cmp::@5 mulf_tables_cmp::@9 [114] (byte*) print_char_cursor#155 ← phi( mul8s_compare::@2/(byte*~) print_char_cursor#193 mul8s_error/(byte*~) print_char_cursor#194 mul8s_error::@2/(byte*) print_char_cursor#19 mul8s_error::@4/(byte*) print_char_cursor#19 mul8s_error::@6/(byte*) print_char_cursor#19 mul8s_error::@8/(byte*) print_char_cursor#19 mul8u_compare::@9/(byte*) print_char_cursor#100 mul8u_error/(byte*) print_char_cursor#100 mul8u_error::@2/(byte*) print_char_cursor#19 mul8u_error::@4/(byte*) print_char_cursor#19 mul8u_error::@6/(byte*) print_char_cursor#19 mul8u_error::@8/(byte*) print_char_cursor#19 mulf_tables_cmp::@9/(byte*) print_char_cursor#19 mulf_tables_cmp::@3/(byte*) 1024 mulf_tables_cmp::@5/(byte*) 1024 ) [114] (byte*) print_str::str#18 ← phi( mul8s_compare::@2/(const string) mul8s_compare::str mul8s_error/(const string) mul8s_error::str mul8s_error::@2/(const string) str1 mul8s_error::@4/(const string) str2 mul8s_error::@6/(const string) str3 mul8s_error::@8/(const string) str4 mul8u_compare::@9/(const string) mul8u_compare::str mul8u_error/(const string) mul8u_error::str mul8u_error::@2/(const string) str1 mul8u_error::@4/(const string) str2 mul8u_error::@6/(const string) str3 mul8u_error::@8/(const string) str4 mulf_tables_cmp::@9/(const string) mulf_tables_cmp::str2 mulf_tables_cmp::@3/(const string) mulf_tables_cmp::str mulf_tables_cmp::@5/(const string) mulf_tables_cmp::str1 ) @@ -244,6 +262,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [119] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#134 [120] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#16 to:print_str::@1 + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from mul8s_error::@1 mul8s_error::@3 [121] (signed byte) print_sbyte::b#3 ← phi( mul8s_error::@1/(signed byte) print_sbyte::b#1 mul8s_error::@3/(signed byte) print_sbyte::b#2 ) [122] if((signed byte) print_sbyte::b#3<(signed byte) 0) goto print_sbyte::@1 @@ -267,6 +287,8 @@ print_sbyte::@1: scope:[print_sbyte] from print_sbyte print_sbyte::@4: scope:[print_sbyte] from print_sbyte::@1 [131] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#3 to:print_sbyte::@2 + +(signed word()) mul8s((signed byte) mul8s::a , (signed byte) mul8s::b) mul8s: scope:[mul8s] from mul8s_compare::@13 [132] (byte) mul8u::a#1 ← (byte)(signed byte) mul8s::a#0 [133] (byte) mul8u::b#0 ← (byte)(signed byte) mul8s::b#0 @@ -297,6 +319,8 @@ mul8s::@2: scope:[mul8s] from mul8s::@1 mul8s::@4 mul8s::@return: scope:[mul8s] from mul8s::@2 [147] return to:@return + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from mul8s mul8u_compare::@11 [148] (byte) mul8u::a#6 ← phi( mul8s/(byte) mul8u::a#1 mul8u_compare::@11/(byte) mul8u::a#2 ) [148] (word) mul8u::mb#0 ← phi( mul8s/(byte) mul8u::b#0 mul8u_compare::@11/(byte) mul8u::b#1 ) @@ -322,6 +346,8 @@ mul8u::@3: scope:[mul8u] from mul8u::@2 mul8u::@4 [156] (byte) mul8u::a#0 ← (byte) mul8u::a#3 >> (byte) 1 [157] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 to:mul8u::@1 + +(signed word()) mulf8s((signed byte) mulf8s::a , (signed byte) mulf8s::b) mulf8s: scope:[mulf8s] from mul8s_compare::@12 [158] phi() to:mulf8s::mulf8s_prepare1 @@ -339,6 +365,8 @@ mulf8s::@2: scope:[mulf8s] from mulf8s::@1 mulf8s::@return: scope:[mulf8s] from mulf8s::@2 [164] return to:@return + +(signed word()) mulf8s_prepared((signed byte) mulf8s_prepared::b) mulf8s_prepared: scope:[mulf8s_prepared] from mulf8s::@1 [165] (byte) mulf8u_prepared::b#1 ← (byte)(signed byte) mulf8s_prepared::b#0 [166] call mulf8u_prepared @@ -368,6 +396,8 @@ mulf8s_prepared::@2: scope:[mulf8s_prepared] from mulf8s_prepared::@1 mulf8s_pr mulf8s_prepared::@return: scope:[mulf8s_prepared] from mulf8s_prepared::@2 [179] return to:@return + +(word()) mulf8u_prepared((byte) mulf8u_prepared::b) mulf8u_prepared: scope:[mulf8u_prepared] from mulf8s_prepared mulf8u::@1 [180] (byte) mulf8u_prepared::b#2 ← phi( mulf8s_prepared/(byte) mulf8u_prepared::b#1 mulf8u::@1/(byte) mulf8u_prepared::b#0 ) [181] *((const byte*) mulf8u_prepared::memB#0) ← (byte) mulf8u_prepared::b#2 @@ -377,6 +407,8 @@ mulf8u_prepared: scope:[mulf8u_prepared] from mulf8s_prepared mulf8u::@1 mulf8u_prepared::@return: scope:[mulf8u_prepared] from mulf8u_prepared [184] return to:@return + +(void()) mulf8u_prepare((byte) mulf8u_prepare::a) mulf8u_prepare: scope:[mulf8u_prepare] from mulf8s::mulf8s_prepare1 mulf8u [185] (byte) mulf8u_prepare::a#2 ← phi( mulf8s::mulf8s_prepare1/(byte) mulf8u_prepare::a#1 mulf8u/(byte) mulf8u_prepare::a#0 ) [186] *((const byte*) mulf8u_prepare::memA#0) ← (byte) mulf8u_prepare::a#2 @@ -385,6 +417,8 @@ mulf8u_prepare: scope:[mulf8u_prepare] from mulf8s::mulf8s_prepare1 mulf8u mulf8u_prepare::@return: scope:[mulf8u_prepare] from mulf8u_prepare [188] return to:@return + +(signed word()) muls8s((signed byte) muls8s::a , (signed byte) muls8s::b) muls8s: scope:[muls8s] from mul8s_compare::@4 [189] if((signed byte) muls8s::a#0<(signed byte) 0) goto muls8s::@5 to:muls8s::@2 @@ -415,6 +449,8 @@ muls8s::@6: scope:[muls8s] from muls8s::@5 [199] (signed word) muls8s::m#2 ← (signed word) muls8s::m#5 - (signed byte) muls8s::b#0 [200] (signed byte) muls8s::i#1 ← -- (signed byte) muls8s::i#2 to:muls8s::@5 + +(void()) mul8u_compare() mul8u_compare: scope:[mul8u_compare] from main::@4 [201] phi() to:mul8u_compare::@1 @@ -488,6 +524,8 @@ mul8u_compare::@13: scope:[mul8u_compare] from mul8u_compare::@9 [240] phi() [241] call print_ln to:mul8u_compare::@return + +(void()) mul8u_error((byte) mul8u_error::a , (byte) mul8u_error::b , (word) mul8u_error::ms , (word) mul8u_error::mn , (word) mul8u_error::mf) mul8u_error: scope:[mul8u_error] from mul8u_compare::@7 [242] phi() [243] call print_str @@ -535,6 +573,8 @@ mul8u_error::@10: scope:[mul8u_error] from mul8u_error::@9 mul8u_error::@return: scope:[mul8u_error] from mul8u_error::@10 [264] return to:@return + +(word()) mulf8u((byte) mulf8u::a , (byte) mulf8u::b) mulf8u: scope:[mulf8u] from mul8u_compare::@10 [265] (byte) mulf8u_prepare::a#0 ← (byte) mulf8u::a#0 [266] call mulf8u_prepare @@ -550,6 +590,8 @@ mulf8u::@2: scope:[mulf8u] from mulf8u::@1 mulf8u::@return: scope:[mulf8u] from mulf8u::@2 [271] return to:@return + +(word()) muls8u((byte) muls8u::a , (byte) muls8u::b) muls8u: scope:[muls8u] from mul8u_compare::@2 [272] if((byte) muls8u::a#0==(byte) 0) goto muls8u::@1 to:muls8u::@2 @@ -568,6 +610,8 @@ muls8u::@3: scope:[muls8u] from muls8u::@2 [277] (word) muls8u::m#1 ← (word) muls8u::m#3 + (byte) muls8u::b#0 [278] (byte) muls8u::i#1 ← ++ (byte) muls8u::i#2 to:muls8u::@2 + +(void()) mulf_tables_cmp() mulf_tables_cmp: scope:[mulf_tables_cmp] from main::@3 [279] phi() to:mulf_tables_cmp::@1 @@ -615,6 +659,8 @@ mulf_tables_cmp::@4: scope:[mulf_tables_cmp] from mulf_tables_cmp::@2 [298] (byte*) mulf_tables_cmp::asm_sqr#1 ← ++ (byte*) mulf_tables_cmp::asm_sqr#2 [299] (byte*) mulf_tables_cmp::kc_sqr#1 ← ++ (byte*) mulf_tables_cmp::kc_sqr#2 to:mulf_tables_cmp::@1 + +(void()) mulf_init_asm() mulf_init_asm: scope:[mulf_init_asm] from main::@2 asm { ldx#$00 txa .byte$c9 lb1: tya adc#$00 ml1: stamula_sqr1_hi,x tay cmp#$40 txa ror ml9: adc#$00 staml9+1 inx ml0: stamula_sqr1_lo,x bnelb1 incml0+2 incml1+2 clc iny bnelb1 ldx#$00 ldy#$ff !: ldamula_sqr1_hi+1,x stamula_sqr2_hi+$100,x ldamula_sqr1_hi,x stamula_sqr2_hi,y ldamula_sqr1_lo+1,x stamula_sqr2_lo+$100,x ldamula_sqr1_lo,x stamula_sqr2_lo,y dey inx bne!- } [301] *((const byte*) mulf_init_asm::mem#0) ← *((const byte[$200]) mula_sqr1_lo#0) @@ -625,6 +671,8 @@ mulf_init_asm: scope:[mulf_init_asm] from main::@2 mulf_init_asm::@return: scope:[mulf_init_asm] from mulf_init_asm [305] return to:@return + +(void()) mulf_init() mulf_init: scope:[mulf_init] from main::@1 [306] phi() to:mulf_init::@1 @@ -684,6 +732,8 @@ mulf_init::@3: scope:[mulf_init] from mulf_init::@2 mulf_init::@4 [333] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 [334] (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#2 to:mulf_init::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main [335] phi() [336] call memset @@ -691,6 +741,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [337] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [338] phi() to:memset::@1 diff --git a/src/test/ref/test-multiply-8bit.log b/src/test/ref/test-multiply-8bit.log index 3e7e82351..d50693993 100644 --- a/src/test/ref/test-multiply-8bit.log +++ b/src/test/ref/test-multiply-8bit.log @@ -125,6 +125,8 @@ Culled Empty Block (label) @58 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@12 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -172,6 +174,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@29 + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from mul8s_compare::@3 mul8s_error mul8s_error::@2 mul8s_error::@4 mul8s_error::@6 mul8s_error::@8 mul8u_compare::@11 mul8u_error mul8u_error::@2 mul8u_error::@4 mul8u_error::@6 mul8u_error::@8 mulf_tables_cmp::@13 mulf_tables_cmp::@3 mulf_tables_cmp::@7 (byte*) print_char_cursor#155 ← phi( mul8s_compare::@3/(byte*) print_char_cursor#151 mul8s_error/(byte*) print_char_cursor#153 mul8s_error::@2/(byte*) print_char_cursor#56 mul8s_error::@4/(byte*) print_char_cursor#58 mul8s_error::@6/(byte*) print_char_cursor#60 mul8s_error::@8/(byte*) print_char_cursor#62 mul8u_compare::@11/(byte*) print_char_cursor#149 mul8u_error/(byte*) print_char_cursor#150 mul8u_error::@2/(byte*) print_char_cursor#40 mul8u_error::@4/(byte*) print_char_cursor#42 mul8u_error::@6/(byte*) print_char_cursor#44 mul8u_error::@8/(byte*) print_char_cursor#46 mulf_tables_cmp::@13/(byte*) print_char_cursor#31 mulf_tables_cmp::@3/(byte*) print_char_cursor#146 mulf_tables_cmp::@7/(byte*) print_char_cursor#147 ) (byte*) print_str::str#18 ← phi( mul8s_compare::@3/(byte*) print_str::str#10 mul8s_error/(byte*) print_str::str#11 mul8s_error::@2/(byte*) print_str::str#12 mul8s_error::@4/(byte*) print_str::str#13 mul8s_error::@6/(byte*) print_str::str#14 mul8s_error::@8/(byte*) print_str::str#15 mul8u_compare::@11/(byte*) print_str::str#4 mul8u_error/(byte*) print_str::str#5 mul8u_error::@2/(byte*) print_str::str#6 mul8u_error::@4/(byte*) print_str::str#7 mul8u_error::@6/(byte*) print_str::str#8 mul8u_error::@8/(byte*) print_str::str#9 mulf_tables_cmp::@13/(byte*) print_str::str#3 mulf_tables_cmp::@3/(byte*) print_str::str#1 mulf_tables_cmp::@7/(byte*) print_str::str#2 ) @@ -194,6 +198,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#69 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from mul8s_compare::@20 mul8s_error::@10 mul8u_compare::@16 mul8u_error::@10 mulf_tables_cmp::@10 (byte*) print_char_cursor#135 ← phi( mul8s_compare::@20/(byte*) print_char_cursor#51 mul8s_error::@10/(byte*) print_char_cursor#64 mul8u_compare::@16/(byte*) print_char_cursor#37 mul8u_error::@10/(byte*) print_char_cursor#48 mulf_tables_cmp::@10/(byte*) print_char_cursor#28 ) (byte*) print_line_cursor#45 ← phi( mul8s_compare::@20/(byte*) print_line_cursor#53 mul8s_error::@10/(byte*) print_line_cursor#55 mul8u_compare::@16/(byte*) print_line_cursor#51 mul8u_error::@10/(byte*) print_line_cursor#52 mulf_tables_cmp::@10/(byte*) print_line_cursor#48 ) @@ -217,6 +223,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#71 return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from mul8s_error::@5 mul8s_error::@7 mul8s_error::@9 (byte*) print_char_cursor#156 ← phi( mul8s_error::@5/(byte*) print_char_cursor#59 mul8s_error::@7/(byte*) print_char_cursor#61 mul8s_error::@9/(byte*) print_char_cursor#63 ) (signed word) print_sword::w#4 ← phi( mul8s_error::@5/(signed word) print_sword::w#1 mul8s_error::@7/(signed word) print_sword::w#2 mul8s_error::@9/(signed word) print_sword::w#3 ) @@ -263,6 +271,8 @@ print_sword::@return: scope:[print_sword] from print_sword::@7 (byte*) print_char_cursor#8 ← (byte*) print_char_cursor#75 return to:@return + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from mul8s_error::@1 mul8s_error::@3 (byte*) print_char_cursor#157 ← phi( mul8s_error::@1/(byte*) print_char_cursor#55 mul8s_error::@3/(byte*) print_char_cursor#57 ) (signed byte) print_sbyte::b#3 ← phi( mul8s_error::@1/(signed byte) print_sbyte::b#1 mul8s_error::@3/(signed byte) print_sbyte::b#2 ) @@ -309,6 +319,8 @@ print_sbyte::@return: scope:[print_sbyte] from print_sbyte::@7 (byte*) print_char_cursor#12 ← (byte*) print_char_cursor#79 return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from mul8u_error::@5 mul8u_error::@7 mul8u_error::@9 mulf_tables_cmp::@12 mulf_tables_cmp::@14 print_sword::@2 (byte*) print_char_cursor#142 ← phi( mul8u_error::@5/(byte*) print_char_cursor#43 mul8u_error::@7/(byte*) print_char_cursor#45 mul8u_error::@9/(byte*) print_char_cursor#47 mulf_tables_cmp::@12/(byte*) print_char_cursor#30 mulf_tables_cmp::@14/(byte*) print_char_cursor#32 print_sword::@2/(byte*) print_char_cursor#138 ) (word) print_word::w#6 ← phi( mul8u_error::@5/(word) print_word::w#3 mul8u_error::@7/(word) print_word::w#4 mul8u_error::@9/(word) print_word::w#5 mulf_tables_cmp::@12/(word) print_word::w#1 mulf_tables_cmp::@14/(word) print_word::w#2 print_sword::@2/(word) print_word::w#0 ) @@ -339,6 +351,8 @@ print_word::@return: scope:[print_word] from print_word::@2 (byte*) print_line_cursor#91 ← phi( @12/(byte*) print_line_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $0 to:@41 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from mul8u_error::@1 mul8u_error::@3 print_sbyte::@2 print_word print_word::@1 (byte*) print_char_cursor#143 ← phi( mul8u_error::@1/(byte*) print_char_cursor#39 mul8u_error::@3/(byte*) print_char_cursor#41 print_sbyte::@2/(byte*) print_char_cursor#141 print_word/(byte*) print_char_cursor#142 print_word::@1/(byte*) print_char_cursor#13 ) (byte) print_byte::b#5 ← phi( mul8u_error::@1/(byte) print_byte::b#3 mul8u_error::@3/(byte) print_byte::b#4 print_sbyte::@2/(byte) print_byte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 ) @@ -363,6 +377,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#18 ← (byte*) print_char_cursor#85 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sbyte::@3 print_sword::@1 print_sword::@3 (byte*) print_char_cursor#86 ← phi( print_byte/(byte*) print_char_cursor#143 print_byte::@1/(byte*) print_char_cursor#16 print_sbyte::@1/(byte*) print_char_cursor#139 print_sbyte::@3/(byte*) print_char_cursor#140 print_sword::@1/(byte*) print_char_cursor#136 print_sword::@3/(byte*) print_char_cursor#137 ) (byte) print_char::ch#6 ← phi( print_byte/(byte) print_char::ch#4 print_byte::@1/(byte) print_char::ch#5 print_sbyte::@1/(byte) print_char::ch#2 print_sbyte::@3/(byte) print_char::ch#3 print_sword::@1/(byte) print_char::ch#0 print_sword::@3/(byte) print_char::ch#1 ) @@ -374,6 +390,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#20 ← (byte*) print_char_cursor#87 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main (byte*) print_screen#1 ← phi( main/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -394,6 +412,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte*) print_char_cursor#22 ← (byte*) print_char_cursor#88 return to:@return + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from mul8s mul8u_compare::@13 (byte) mul8u::a#6 ← phi( mul8s/(byte) mul8u::a#1 mul8u_compare::@13/(byte) mul8u::a#2 ) (byte) mul8u::b#2 ← phi( mul8s/(byte) mul8u::b#0 mul8u_compare::@13/(byte) mul8u::b#1 ) @@ -441,6 +461,8 @@ mul8u::@return: scope:[mul8u] from mul8u::@3 (word) mul8u::return#1 ← (word) mul8u::return#4 return to:@return + +(signed word()) mul8s((signed byte) mul8s::a , (signed byte) mul8s::b) mul8s: scope:[mul8s] from mul8s_compare::@23 (signed byte) mul8s::b#1 ← phi( mul8s_compare::@23/(signed byte) mul8s::b#0 ) (signed byte) mul8s::a#1 ← phi( mul8s_compare::@23/(signed byte) mul8s::a#0 ) @@ -507,6 +529,8 @@ mul8s::@return: scope:[mul8s] from mul8s::@2 (byte[$200]) mulf_sqr2_lo#0 ← { fill( $200, 0) } (byte[$200]) mulf_sqr2_hi#0 ← { fill( $200, 0) } to:@50 + +(void()) mulf_init() mulf_init: scope:[mulf_init] from main::@1 (word) mulf_init::sqr#0 ← (number) 0 (byte) mulf_init::x_2#0 ← (number) 0 @@ -616,6 +640,8 @@ mulf_init::@15: scope:[mulf_init] from mulf_init::@10 mulf_init::@return: scope:[mulf_init] from mulf_init::@11 return to:@return + +(void()) mulf8u_prepare((byte) mulf8u_prepare::a) mulf8u_prepare: scope:[mulf8u_prepare] from mulf8s::mulf8s_prepare1 mulf8u (byte) mulf8u_prepare::a#2 ← phi( mulf8s::mulf8s_prepare1/(byte) mulf8u_prepare::a#1 mulf8u/(byte) mulf8u_prepare::a#0 ) (byte*) mulf8u_prepare::memA#0 ← ((byte*)) (number) $fd @@ -625,6 +651,8 @@ mulf8u_prepare: scope:[mulf8u_prepare] from mulf8s::mulf8s_prepare1 mulf8u mulf8u_prepare::@return: scope:[mulf8u_prepare] from mulf8u_prepare return to:@return + +(word()) mulf8u_prepared((byte) mulf8u_prepared::b) mulf8u_prepared: scope:[mulf8u_prepared] from mulf8s_prepared mulf8u::@2 (byte) mulf8u_prepared::b#2 ← phi( mulf8s_prepared/(byte) mulf8u_prepared::b#1 mulf8u::@2/(byte) mulf8u_prepared::b#0 ) (byte*) mulf8u_prepared::resL#0 ← ((byte*)) (number) $fe @@ -638,6 +666,8 @@ mulf8u_prepared::@return: scope:[mulf8u_prepared] from mulf8u_prepared (word) mulf8u_prepared::return#1 ← (word) mulf8u_prepared::return#4 return to:@return + +(word()) mulf8u((byte) mulf8u::a , (byte) mulf8u::b) mulf8u: scope:[mulf8u] from mul8u_compare::@12 (byte) mulf8u::b#2 ← phi( mul8u_compare::@12/(byte) mulf8u::b#0 ) (byte) mulf8u::a#1 ← phi( mul8u_compare::@12/(byte) mulf8u::a#0 ) @@ -660,6 +690,8 @@ mulf8u::@return: scope:[mulf8u] from mulf8u::@3 (word) mulf8u::return#1 ← (word) mulf8u::return#3 return to:@return + +(signed word()) mulf8s_prepared((signed byte) mulf8s_prepared::b) mulf8s_prepared: scope:[mulf8s_prepared] from mulf8s::@2 (signed byte) mulf8s_prepared::b#1 ← phi( mulf8s::@2/(signed byte) mulf8s_prepared::b#0 ) (signed byte*) mulf8s_prepared::memA#0 ← ((signed byte*)) (number) $fd @@ -711,6 +743,8 @@ mulf8s_prepared::@return: scope:[mulf8s_prepared] from mulf8s_prepared::@2 (signed word) mulf8s_prepared::return#1 ← (signed word) mulf8s_prepared::return#3 return to:@return + +(signed word()) mulf8s((signed byte) mulf8s::a , (signed byte) mulf8s::b) mulf8s: scope:[mulf8s] from mul8s_compare::@22 (signed byte) mulf8s::b#4 ← phi( mul8s_compare::@22/(signed byte) mulf8s::b#0 ) (signed byte) mulf8s::a#1 ← phi( mul8s_compare::@22/(signed byte) mulf8s::a#0 ) @@ -748,6 +782,8 @@ mulf8s::@return: scope:[mulf8s] from mulf8s::@4 (byte*) print_line_cursor#67 ← phi( @41/(byte*) print_line_cursor#78 ) (byte*) BGCOL#0 ← ((byte*)) (number) $d021 to:@53 + +(void()) main() main: scope:[main] from @59 (byte*) print_char_cursor#144 ← phi( @59/(byte*) print_char_cursor#154 ) (byte*) print_line_cursor#46 ← phi( @59/(byte*) print_line_cursor#56 ) @@ -799,6 +835,8 @@ main::@return: scope:[main] from main::@6 (byte*) print_char_cursor#27 ← (byte*) print_char_cursor#93 return to:@return + +(word()) muls8u((byte) muls8u::a , (byte) muls8u::b) muls8u: scope:[muls8u] from mul8u_compare::@2 (byte) muls8u::b#4 ← phi( mul8u_compare::@2/(byte) muls8u::b#0 ) (byte) muls8u::a#1 ← phi( mul8u_compare::@2/(byte) muls8u::a#0 ) @@ -839,6 +877,8 @@ muls8u::@return: scope:[muls8u] from muls8u::@1 (word) muls8u::return#1 ← (word) muls8u::return#3 return to:@return + +(signed word()) muls8s((signed byte) muls8s::a , (signed byte) muls8s::b) muls8s: scope:[muls8s] from mul8s_compare::@5 (signed byte) muls8s::b#7 ← phi( mul8s_compare::@5/(signed byte) muls8s::b#0 ) (signed byte) muls8s::a#1 ← phi( mul8s_compare::@5/(signed byte) muls8s::a#0 ) @@ -918,6 +958,8 @@ muls8s::@return: scope:[muls8s] from muls8s::@3 (byte[$200]) mula_sqr2_lo#0 ← { fill( $200, 0) } (byte[$200]) mula_sqr2_hi#0 ← { fill( $200, 0) } to:@59 + +(void()) mulf_init_asm() mulf_init_asm: scope:[mulf_init_asm] from main::@2 asm { ldx#$00 txa .byte$c9 lb1: tya adc#$00 ml1: stamula_sqr1_hi,x tay cmp#$40 txa ror ml9: adc#$00 staml9+1 inx ml0: stamula_sqr1_lo,x bnelb1 incml0+2 incml1+2 clc iny bnelb1 ldx#$00 ldy#$ff !: ldamula_sqr1_hi+1,x stamula_sqr2_hi+$100,x ldamula_sqr1_hi,x stamula_sqr2_hi,y ldamula_sqr1_lo+1,x stamula_sqr2_lo+$100,x ldamula_sqr1_lo,x stamula_sqr2_lo,y dey inx bne!- } (byte*) mulf_init_asm::mem#0 ← ((byte*)) (number) $ff @@ -929,6 +971,8 @@ mulf_init_asm: scope:[mulf_init_asm] from main::@2 mulf_init_asm::@return: scope:[mulf_init_asm] from mulf_init_asm return to:@return + +(void()) mulf_tables_cmp() mulf_tables_cmp: scope:[mulf_tables_cmp] from main::@3 (byte*) print_line_cursor#79 ← phi( main::@3/(byte*) print_line_cursor#47 ) (byte*) print_char_cursor#167 ← phi( main::@3/(byte*) print_char_cursor#145 ) @@ -1027,6 +1071,8 @@ mulf_tables_cmp::@return: scope:[mulf_tables_cmp] from mulf_tables_cmp::@11 mul (byte*) print_line_cursor#11 ← (byte*) print_line_cursor#33 return to:@return + +(void()) mul8u_compare() mul8u_compare: scope:[mul8u_compare] from main::@4 (byte*) print_line_cursor#112 ← phi( main::@4/(byte*) print_line_cursor#6 ) (byte*) print_char_cursor#192 ← phi( main::@4/(byte*) print_char_cursor#24 ) @@ -1200,6 +1246,8 @@ mul8u_compare::@17: scope:[mul8u_compare] from mul8u_compare::@16 (byte*) print_line_cursor#14 ← (byte*) print_line_cursor#36 (byte*) print_char_cursor#38 ← (byte*) print_char_cursor#104 to:mul8u_compare::@return + +(void()) mul8u_error((byte) mul8u_error::a , (byte) mul8u_error::b , (word) mul8u_error::ms , (word) mul8u_error::mn , (word) mul8u_error::mf) mul8u_error: scope:[mul8u_error] from mul8u_compare::@8 (byte*) print_line_cursor#117 ← phi( mul8u_compare::@8/(byte*) print_line_cursor#50 ) (word) mul8u_error::mf#10 ← phi( mul8u_compare::@8/(word) mul8u_error::mf#0 ) @@ -1318,6 +1366,8 @@ mul8u_error::@return: scope:[mul8u_error] from mul8u_error::@11 (byte*) print_line_cursor#16 ← (byte*) print_line_cursor#38 return to:@return + +(void()) mul8s_compare() mul8s_compare: scope:[mul8s_compare] from main::@5 (byte*) print_line_cursor#86 ← phi( main::@5/(byte*) print_line_cursor#7 ) (byte*) print_char_cursor#172 ← phi( main::@5/(byte*) print_char_cursor#25 ) @@ -1502,6 +1552,8 @@ mul8s_compare::@return: scope:[mul8s_compare] from mul8s_compare::@21 mul8s_com (byte*) print_line_cursor#19 ← (byte*) print_line_cursor#41 return to:@return + +(void()) mul8s_error((signed byte) mul8s_error::a , (signed byte) mul8s_error::b , (signed word) mul8s_error::ms , (signed word) mul8s_error::mn , (signed word) mul8s_error::mf) mul8s_error: scope:[mul8s_error] from mul8s_compare::@14 (byte*) print_line_cursor#118 ← phi( mul8s_compare::@14/(byte*) print_line_cursor#54 ) (signed word) mul8s_error::mf#10 ← phi( mul8s_compare::@14/(signed word) mul8s_error::mf#0 ) @@ -4224,6 +4276,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) BGCOL#0) ← (byte) 5 [5] call print_cls @@ -4251,6 +4305,8 @@ main::@5: scope:[main] from main::@4 main::@return: scope:[main] from main::@5 [16] return to:@return + +(void()) mul8s_compare() mul8s_compare: scope:[mul8s_compare] from main::@5 [17] phi() to:mul8s_compare::@1 @@ -4325,6 +4381,8 @@ mul8s_compare::@10: scope:[mul8s_compare] from mul8s_compare::@7 mul8s_compare::@8: scope:[mul8s_compare] from mul8s_compare::@7 [56] (signed byte) mul8s_compare::b#1 ← ++ (signed byte) mul8s_compare::b#10 to:mul8s_compare::@3 + +(void()) mul8s_error((signed byte) mul8s_error::a , (signed byte) mul8s_error::b , (signed word) mul8s_error::ms , (signed word) mul8s_error::mn , (signed word) mul8s_error::mf) mul8s_error: scope:[mul8s_error] from mul8s_compare::@10 [57] (byte*~) print_char_cursor#194 ← (byte*) print_line_cursor#1 [58] call print_str @@ -4372,6 +4430,8 @@ mul8s_error::@10: scope:[mul8s_error] from mul8s_error::@9 mul8s_error::@return: scope:[mul8s_error] from mul8s_error::@10 [79] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from mul8s_compare::@11 mul8s_error::@10 mul8u_compare::@13 mul8u_error::@10 mulf_tables_cmp::@6 [80] (byte*) print_char_cursor#135 ← phi( mul8s_compare::@11/(byte*) print_char_cursor#134 mul8s_error::@10/(byte*) print_char_cursor#19 mul8u_compare::@13/(byte*) print_char_cursor#134 mul8u_error::@10/(byte*) print_char_cursor#19 mulf_tables_cmp::@6/(byte*) print_char_cursor#134 ) [80] (byte*) print_line_cursor#45 ← phi( mul8s_compare::@11/(byte*) print_line_cursor#1 mul8s_error::@10/(byte*) print_line_cursor#1 mul8u_compare::@13/(byte*) print_line_cursor#11 mul8u_error::@10/(byte*) print_line_cursor#11 mulf_tables_cmp::@6/(byte*) 1024 ) @@ -4384,6 +4444,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [84] return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from mul8s_error::@5 mul8s_error::@7 mul8s_error::@9 [85] (signed word) print_sword::w#4 ← phi( mul8s_error::@5/(signed word) print_sword::w#1 mul8s_error::@7/(signed word) print_sword::w#2 mul8s_error::@9/(signed word) print_sword::w#3 ) [86] if((signed word) print_sword::w#4<(signed byte) 0) goto print_sword::@1 @@ -4407,6 +4469,8 @@ print_sword::@1: scope:[print_sword] from print_sword print_sword::@4: scope:[print_sword] from print_sword::@1 [95] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#4 to:print_sword::@2 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sbyte::@3 print_sword::@1 print_sword::@3 [96] (byte*) print_char_cursor#86 ← phi( print_byte/(byte*) print_char_cursor#143 print_byte::@1/(byte*) print_char_cursor#19 print_sbyte::@1/(byte*) print_char_cursor#134 print_sbyte::@3/(byte*) print_char_cursor#134 print_sword::@1/(byte*) print_char_cursor#134 print_sword::@3/(byte*) print_char_cursor#134 ) [96] (byte) print_char::ch#6 ← phi( print_byte/(byte) print_char::ch#4 print_byte::@1/(byte) print_char::ch#5 print_sbyte::@1/(byte) '-' print_sbyte::@3/(byte) ' ' print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' ) @@ -4416,6 +4480,8 @@ print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 p print_char::@return: scope:[print_char] from print_char [99] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from mul8u_error::@5 mul8u_error::@7 mul8u_error::@9 mulf_tables_cmp::@10 mulf_tables_cmp::@8 print_sword::@2 [100] (byte*) print_char_cursor#142 ← phi( mul8u_error::@5/(byte*) print_char_cursor#134 mul8u_error::@7/(byte*) print_char_cursor#134 mul8u_error::@9/(byte*) print_char_cursor#134 mulf_tables_cmp::@8/(byte*) print_char_cursor#134 mulf_tables_cmp::@10/(byte*) print_char_cursor#134 print_sword::@2/(byte*) print_char_cursor#19 ) [100] (word) print_word::w#6 ← phi( mul8u_error::@5/(word) print_word::w#3 mul8u_error::@7/(word) print_word::w#4 mul8u_error::@9/(word) print_word::w#5 mulf_tables_cmp::@8/(word) print_word::w#1 mulf_tables_cmp::@10/(word) print_word::w#2 print_sword::@2/(word) print_word::w#0 ) @@ -4429,6 +4495,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [105] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from mul8u_error::@1 mul8u_error::@3 print_sbyte::@2 print_word print_word::@1 [106] (byte*) print_char_cursor#143 ← phi( mul8u_error::@1/(byte*) print_char_cursor#134 mul8u_error::@3/(byte*) print_char_cursor#134 print_sbyte::@2/(byte*) print_char_cursor#19 print_word/(byte*) print_char_cursor#142 print_word::@1/(byte*) print_char_cursor#19 ) [106] (byte) print_byte::b#5 ← phi( mul8u_error::@1/(byte) print_byte::b#3 mul8u_error::@3/(byte) print_byte::b#4 print_sbyte::@2/(byte) print_byte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 ) @@ -4444,6 +4512,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [113] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from mul8s_compare::@2 mul8s_error mul8s_error::@2 mul8s_error::@4 mul8s_error::@6 mul8s_error::@8 mul8u_compare::@9 mul8u_error mul8u_error::@2 mul8u_error::@4 mul8u_error::@6 mul8u_error::@8 mulf_tables_cmp::@3 mulf_tables_cmp::@5 mulf_tables_cmp::@9 [114] (byte*) print_char_cursor#155 ← phi( mul8s_compare::@2/(byte*~) print_char_cursor#193 mul8s_error/(byte*~) print_char_cursor#194 mul8s_error::@2/(byte*) print_char_cursor#19 mul8s_error::@4/(byte*) print_char_cursor#19 mul8s_error::@6/(byte*) print_char_cursor#19 mul8s_error::@8/(byte*) print_char_cursor#19 mul8u_compare::@9/(byte*) print_char_cursor#100 mul8u_error/(byte*) print_char_cursor#100 mul8u_error::@2/(byte*) print_char_cursor#19 mul8u_error::@4/(byte*) print_char_cursor#19 mul8u_error::@6/(byte*) print_char_cursor#19 mul8u_error::@8/(byte*) print_char_cursor#19 mulf_tables_cmp::@9/(byte*) print_char_cursor#19 mulf_tables_cmp::@3/(byte*) 1024 mulf_tables_cmp::@5/(byte*) 1024 ) [114] (byte*) print_str::str#18 ← phi( mul8s_compare::@2/(const string) mul8s_compare::str mul8s_error/(const string) mul8s_error::str mul8s_error::@2/(const string) str1 mul8s_error::@4/(const string) str2 mul8s_error::@6/(const string) str3 mul8s_error::@8/(const string) str4 mul8u_compare::@9/(const string) mul8u_compare::str mul8u_error/(const string) mul8u_error::str mul8u_error::@2/(const string) str1 mul8u_error::@4/(const string) str2 mul8u_error::@6/(const string) str3 mul8u_error::@8/(const string) str4 mulf_tables_cmp::@9/(const string) mulf_tables_cmp::str2 mulf_tables_cmp::@3/(const string) mulf_tables_cmp::str mulf_tables_cmp::@5/(const string) mulf_tables_cmp::str1 ) @@ -4461,6 +4531,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [119] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#134 [120] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#16 to:print_str::@1 + +(void()) print_sbyte((signed byte) print_sbyte::b) print_sbyte: scope:[print_sbyte] from mul8s_error::@1 mul8s_error::@3 [121] (signed byte) print_sbyte::b#3 ← phi( mul8s_error::@1/(signed byte) print_sbyte::b#1 mul8s_error::@3/(signed byte) print_sbyte::b#2 ) [122] if((signed byte) print_sbyte::b#3<(signed byte) 0) goto print_sbyte::@1 @@ -4484,6 +4556,8 @@ print_sbyte::@1: scope:[print_sbyte] from print_sbyte print_sbyte::@4: scope:[print_sbyte] from print_sbyte::@1 [131] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#3 to:print_sbyte::@2 + +(signed word()) mul8s((signed byte) mul8s::a , (signed byte) mul8s::b) mul8s: scope:[mul8s] from mul8s_compare::@13 [132] (byte) mul8u::a#1 ← (byte)(signed byte) mul8s::a#0 [133] (byte) mul8u::b#0 ← (byte)(signed byte) mul8s::b#0 @@ -4514,6 +4588,8 @@ mul8s::@2: scope:[mul8s] from mul8s::@1 mul8s::@4 mul8s::@return: scope:[mul8s] from mul8s::@2 [147] return to:@return + +(word()) mul8u((byte) mul8u::a , (byte) mul8u::b) mul8u: scope:[mul8u] from mul8s mul8u_compare::@11 [148] (byte) mul8u::a#6 ← phi( mul8s/(byte) mul8u::a#1 mul8u_compare::@11/(byte) mul8u::a#2 ) [148] (word) mul8u::mb#0 ← phi( mul8s/(byte) mul8u::b#0 mul8u_compare::@11/(byte) mul8u::b#1 ) @@ -4539,6 +4615,8 @@ mul8u::@3: scope:[mul8u] from mul8u::@2 mul8u::@4 [156] (byte) mul8u::a#0 ← (byte) mul8u::a#3 >> (byte) 1 [157] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 to:mul8u::@1 + +(signed word()) mulf8s((signed byte) mulf8s::a , (signed byte) mulf8s::b) mulf8s: scope:[mulf8s] from mul8s_compare::@12 [158] phi() to:mulf8s::mulf8s_prepare1 @@ -4556,6 +4634,8 @@ mulf8s::@2: scope:[mulf8s] from mulf8s::@1 mulf8s::@return: scope:[mulf8s] from mulf8s::@2 [164] return to:@return + +(signed word()) mulf8s_prepared((signed byte) mulf8s_prepared::b) mulf8s_prepared: scope:[mulf8s_prepared] from mulf8s::@1 [165] (byte) mulf8u_prepared::b#1 ← (byte)(signed byte) mulf8s_prepared::b#0 [166] call mulf8u_prepared @@ -4585,6 +4665,8 @@ mulf8s_prepared::@2: scope:[mulf8s_prepared] from mulf8s_prepared::@1 mulf8s_pr mulf8s_prepared::@return: scope:[mulf8s_prepared] from mulf8s_prepared::@2 [179] return to:@return + +(word()) mulf8u_prepared((byte) mulf8u_prepared::b) mulf8u_prepared: scope:[mulf8u_prepared] from mulf8s_prepared mulf8u::@1 [180] (byte) mulf8u_prepared::b#2 ← phi( mulf8s_prepared/(byte) mulf8u_prepared::b#1 mulf8u::@1/(byte) mulf8u_prepared::b#0 ) [181] *((const byte*) mulf8u_prepared::memB#0) ← (byte) mulf8u_prepared::b#2 @@ -4594,6 +4676,8 @@ mulf8u_prepared: scope:[mulf8u_prepared] from mulf8s_prepared mulf8u::@1 mulf8u_prepared::@return: scope:[mulf8u_prepared] from mulf8u_prepared [184] return to:@return + +(void()) mulf8u_prepare((byte) mulf8u_prepare::a) mulf8u_prepare: scope:[mulf8u_prepare] from mulf8s::mulf8s_prepare1 mulf8u [185] (byte) mulf8u_prepare::a#2 ← phi( mulf8s::mulf8s_prepare1/(byte) mulf8u_prepare::a#1 mulf8u/(byte) mulf8u_prepare::a#0 ) [186] *((const byte*) mulf8u_prepare::memA#0) ← (byte) mulf8u_prepare::a#2 @@ -4602,6 +4686,8 @@ mulf8u_prepare: scope:[mulf8u_prepare] from mulf8s::mulf8s_prepare1 mulf8u mulf8u_prepare::@return: scope:[mulf8u_prepare] from mulf8u_prepare [188] return to:@return + +(signed word()) muls8s((signed byte) muls8s::a , (signed byte) muls8s::b) muls8s: scope:[muls8s] from mul8s_compare::@4 [189] if((signed byte) muls8s::a#0<(signed byte) 0) goto muls8s::@5 to:muls8s::@2 @@ -4632,6 +4718,8 @@ muls8s::@6: scope:[muls8s] from muls8s::@5 [199] (signed word) muls8s::m#2 ← (signed word) muls8s::m#5 - (signed byte) muls8s::b#0 [200] (signed byte) muls8s::i#1 ← -- (signed byte) muls8s::i#2 to:muls8s::@5 + +(void()) mul8u_compare() mul8u_compare: scope:[mul8u_compare] from main::@4 [201] phi() to:mul8u_compare::@1 @@ -4705,6 +4793,8 @@ mul8u_compare::@13: scope:[mul8u_compare] from mul8u_compare::@9 [240] phi() [241] call print_ln to:mul8u_compare::@return + +(void()) mul8u_error((byte) mul8u_error::a , (byte) mul8u_error::b , (word) mul8u_error::ms , (word) mul8u_error::mn , (word) mul8u_error::mf) mul8u_error: scope:[mul8u_error] from mul8u_compare::@7 [242] phi() [243] call print_str @@ -4752,6 +4842,8 @@ mul8u_error::@10: scope:[mul8u_error] from mul8u_error::@9 mul8u_error::@return: scope:[mul8u_error] from mul8u_error::@10 [264] return to:@return + +(word()) mulf8u((byte) mulf8u::a , (byte) mulf8u::b) mulf8u: scope:[mulf8u] from mul8u_compare::@10 [265] (byte) mulf8u_prepare::a#0 ← (byte) mulf8u::a#0 [266] call mulf8u_prepare @@ -4767,6 +4859,8 @@ mulf8u::@2: scope:[mulf8u] from mulf8u::@1 mulf8u::@return: scope:[mulf8u] from mulf8u::@2 [271] return to:@return + +(word()) muls8u((byte) muls8u::a , (byte) muls8u::b) muls8u: scope:[muls8u] from mul8u_compare::@2 [272] if((byte) muls8u::a#0==(byte) 0) goto muls8u::@1 to:muls8u::@2 @@ -4785,6 +4879,8 @@ muls8u::@3: scope:[muls8u] from muls8u::@2 [277] (word) muls8u::m#1 ← (word) muls8u::m#3 + (byte) muls8u::b#0 [278] (byte) muls8u::i#1 ← ++ (byte) muls8u::i#2 to:muls8u::@2 + +(void()) mulf_tables_cmp() mulf_tables_cmp: scope:[mulf_tables_cmp] from main::@3 [279] phi() to:mulf_tables_cmp::@1 @@ -4832,6 +4928,8 @@ mulf_tables_cmp::@4: scope:[mulf_tables_cmp] from mulf_tables_cmp::@2 [298] (byte*) mulf_tables_cmp::asm_sqr#1 ← ++ (byte*) mulf_tables_cmp::asm_sqr#2 [299] (byte*) mulf_tables_cmp::kc_sqr#1 ← ++ (byte*) mulf_tables_cmp::kc_sqr#2 to:mulf_tables_cmp::@1 + +(void()) mulf_init_asm() mulf_init_asm: scope:[mulf_init_asm] from main::@2 asm { ldx#$00 txa .byte$c9 lb1: tya adc#$00 ml1: stamula_sqr1_hi,x tay cmp#$40 txa ror ml9: adc#$00 staml9+1 inx ml0: stamula_sqr1_lo,x bnelb1 incml0+2 incml1+2 clc iny bnelb1 ldx#$00 ldy#$ff !: ldamula_sqr1_hi+1,x stamula_sqr2_hi+$100,x ldamula_sqr1_hi,x stamula_sqr2_hi,y ldamula_sqr1_lo+1,x stamula_sqr2_lo+$100,x ldamula_sqr1_lo,x stamula_sqr2_lo,y dey inx bne!- } [301] *((const byte*) mulf_init_asm::mem#0) ← *((const byte[$200]) mula_sqr1_lo#0) @@ -4842,6 +4940,8 @@ mulf_init_asm: scope:[mulf_init_asm] from main::@2 mulf_init_asm::@return: scope:[mulf_init_asm] from mulf_init_asm [305] return to:@return + +(void()) mulf_init() mulf_init: scope:[mulf_init] from main::@1 [306] phi() to:mulf_init::@1 @@ -4901,6 +5001,8 @@ mulf_init::@3: scope:[mulf_init] from mulf_init::@2 mulf_init::@4 [333] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 [334] (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#2 to:mulf_init::@1 + +(void()) print_cls() print_cls: scope:[print_cls] from main [335] phi() [336] call memset @@ -4908,6 +5010,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [337] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [338] phi() to:memset::@1 diff --git a/src/test/ref/test-scroll-up.cfg b/src/test/ref/test-scroll-up.cfg index a6213abf6..17ce3c244 100644 --- a/src/test/ref/test-scroll-up.cfg +++ b/src/test/ref/test-scroll-up.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call scrollup1 @@ -22,6 +24,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [10] return to:@return + +(void()) scrollup3() scrollup3: scope:[scrollup3] from main::@2 [11] phi() to:scrollup3::@1 @@ -50,6 +54,8 @@ scrollup3::@4: scope:[scrollup3] from scrollup3::@3 [22] (word) scrollup3::l2#1 ← ++ (word) scrollup3::l2#2 [23] (byte) scrollup3::c#1 ← ++ (byte) scrollup3::c#2 to:scrollup3::@3 + +(void()) scrollup2() scrollup2: scope:[scrollup2] from main::@1 [24] phi() to:scrollup2::@1 @@ -75,6 +81,8 @@ scrollup2::@3: scope:[scrollup2] from scrollup2::@2 scrollup2::@return: scope:[scrollup2] from scrollup2::@3 [34] return to:@return + +(void()) scrollup1() scrollup1: scope:[scrollup1] from main [35] phi() to:scrollup1::@1 diff --git a/src/test/ref/test-scroll-up.log b/src/test/ref/test-scroll-up.log index 3bf5ac403..1f68e1191 100644 --- a/src/test/ref/test-scroll-up.log +++ b/src/test/ref/test-scroll-up.log @@ -21,6 +21,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) screen#0 ← ((byte*)) (number) $400 to:@4 + +(void()) main() main: scope:[main] from @4 call scrollup1 to:main::@1 @@ -35,6 +37,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 return to:@return + +(void()) scrollup1() scrollup1: scope:[scrollup1] from main (word) scrollup1::line#0 ← (number) 0 to:scrollup1::@1 @@ -69,6 +73,8 @@ scrollup1::@6: scope:[scrollup1] from scrollup1::@4 scrollup1::@return: scope:[scrollup1] from scrollup1::@1 return to:@return + +(void()) scrollup2() scrollup2: scope:[scrollup2] from main::@1 (byte*) scrollup2::line1#0 ← (byte*) screen#0 (byte*~) scrollup2::$0 ← (byte*) screen#0 + (number) $28 @@ -104,6 +110,8 @@ scrollup2::@3: scope:[scrollup2] from scrollup2::@2 scrollup2::@return: scope:[scrollup2] from scrollup2::@3 return to:@return + +(void()) scrollup3() scrollup3: scope:[scrollup3] from main::@2 (word) scrollup3::line#0 ← (number) 0 to:scrollup3::@1 @@ -436,6 +444,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call scrollup1 @@ -451,6 +461,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [10] return to:@return + +(void()) scrollup3() scrollup3: scope:[scrollup3] from main::@2 [11] phi() to:scrollup3::@1 @@ -479,6 +491,8 @@ scrollup3::@4: scope:[scrollup3] from scrollup3::@3 [22] (word) scrollup3::l2#1 ← ++ (word) scrollup3::l2#2 [23] (byte) scrollup3::c#1 ← ++ (byte) scrollup3::c#2 to:scrollup3::@3 + +(void()) scrollup2() scrollup2: scope:[scrollup2] from main::@1 [24] phi() to:scrollup2::@1 @@ -504,6 +518,8 @@ scrollup2::@3: scope:[scrollup2] from scrollup2::@2 scrollup2::@return: scope:[scrollup2] from scrollup2::@3 [34] return to:@return + +(void()) scrollup1() scrollup1: scope:[scrollup1] from main [35] phi() to:scrollup1::@1 diff --git a/src/test/ref/test-signed-word-minus-byte.cfg b/src/test/ref/test-signed-word-minus-byte.cfg index ac6eb084b..e8286b460 100644 --- a/src/test/ref/test-signed-word-minus-byte.cfg +++ b/src/test/ref/test-signed-word-minus-byte.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -43,6 +45,8 @@ main::@return: scope:[main] from main::@5 main::@6: scope:[main] from main::@5 [20] (byte*~) print_char_cursor#64 ← (byte*) print_line_cursor#1 to:main::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@4 [21] phi() to:print_ln::@1 @@ -54,6 +58,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [25] return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from main::@1 main::@3 [26] (byte*) print_char_cursor#47 ← phi( main::@1/(byte*) print_char_cursor#53 main::@3/(byte*) print_char_cursor#13 ) [26] (signed word) print_sword::w#3 ← phi( main::@1/(signed word) print_sword::w#1 main::@3/(signed word) print_sword::w#2 ) @@ -78,6 +84,8 @@ print_sword::@1: scope:[print_sword] from print_sword print_sword::@4: scope:[print_sword] from print_sword::@1 [36] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#3 to:print_sword::@2 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from main::@2 print_byte print_byte::@1 print_sword::@1 print_sword::@3 [37] (byte*) print_char_cursor#36 ← phi( main::@2/(byte*) print_char_cursor#13 print_byte/(byte*) print_char_cursor#13 print_byte::@1/(byte*) print_char_cursor#13 print_sword::@1/(byte*) print_char_cursor#47 print_sword::@3/(byte*) print_char_cursor#47 ) [37] (byte) print_char::ch#5 ← phi( main::@2/(byte) ' ' print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' ) @@ -87,6 +95,8 @@ print_char: scope:[print_char] from main::@2 print_byte print_byte::@1 print_sw print_char::@return: scope:[print_char] from print_char [40] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_sword::@2 [41] (byte) print_byte::b#0 ← > (word) print_word::w#0 [42] call print_byte @@ -98,6 +108,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [45] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [46] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) [47] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 @@ -112,6 +124,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [53] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main [54] phi() [55] call memset @@ -119,6 +133,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [56] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [57] phi() to:memset::@1 diff --git a/src/test/ref/test-signed-word-minus-byte.log b/src/test/ref/test-signed-word-minus-byte.log index 442045805..3096aefb7 100644 --- a/src/test/ref/test-signed-word-minus-byte.log +++ b/src/test/ref/test-signed-word-minus-byte.log @@ -55,6 +55,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@12 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 ) (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 ) @@ -102,6 +104,8 @@ memset::@return: scope:[memset] from memset::@1 (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@29 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@6 (byte*) print_char_cursor#46 ← phi( main::@6/(byte*) print_char_cursor#20 ) (byte*) print_line_cursor#17 ← phi( main::@6/(byte*) print_line_cursor#19 ) @@ -125,6 +129,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#25 return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from main::@1 main::@5 (byte*) print_char_cursor#55 ← phi( main::@1/(byte*) print_char_cursor#53 main::@5/(byte*) print_char_cursor#19 ) (signed word) print_sword::w#3 ← phi( main::@1/(signed word) print_sword::w#1 main::@5/(signed word) print_sword::w#2 ) @@ -171,6 +177,8 @@ print_sword::@return: scope:[print_sword] from print_sword::@7 (byte*) print_char_cursor#6 ← (byte*) print_char_cursor#29 return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_sword::@2 (byte*) print_char_cursor#50 ← phi( print_sword::@2/(byte*) print_char_cursor#49 ) (word) print_word::w#1 ← phi( print_sword::@2/(word) print_word::w#0 ) @@ -201,6 +209,8 @@ print_word::@return: scope:[print_word] from print_word::@2 (byte*) print_line_cursor#22 ← phi( @12/(byte*) print_line_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $0 to:@37 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) print_char_cursor#51 ← phi( print_word/(byte*) print_char_cursor#50 print_word::@1/(byte*) print_char_cursor#7 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -225,6 +235,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#12 ← (byte*) print_char_cursor#35 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from main::@4 print_byte print_byte::@1 print_sword::@1 print_sword::@3 (byte*) print_char_cursor#36 ← phi( main::@4/(byte*) print_char_cursor#18 print_byte/(byte*) print_char_cursor#51 print_byte::@1/(byte*) print_char_cursor#10 print_sword::@1/(byte*) print_char_cursor#47 print_sword::@3/(byte*) print_char_cursor#48 ) (byte) print_char::ch#5 ← phi( main::@4/(byte) print_char::ch#4 print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sword::@1/(byte) print_char::ch#0 print_sword::@3/(byte) print_char::ch#1 ) @@ -236,6 +248,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#14 ← (byte*) print_char_cursor#37 return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main (byte*) print_screen#1 ← phi( main/(byte*) print_screen#3 ) (void*) memset::str#0 ← (void*)(byte*) print_screen#1 @@ -256,6 +270,8 @@ print_cls::@return: scope:[print_cls] from print_cls::@1 (byte*) print_char_cursor#16 ← (byte*) print_char_cursor#38 return to:@return + +(void()) main() main: scope:[main] from @37 (byte*) print_char_cursor#52 ← phi( @37/(byte*) print_char_cursor#54 ) (byte*) print_line_cursor#18 ← phi( @37/(byte*) print_line_cursor#20 ) @@ -864,6 +880,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print_cls @@ -900,6 +918,8 @@ main::@return: scope:[main] from main::@5 main::@6: scope:[main] from main::@5 [20] (byte*~) print_char_cursor#64 ← (byte*) print_line_cursor#1 to:main::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@4 [21] phi() to:print_ln::@1 @@ -911,6 +931,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [25] return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from main::@1 main::@3 [26] (byte*) print_char_cursor#47 ← phi( main::@1/(byte*) print_char_cursor#53 main::@3/(byte*) print_char_cursor#13 ) [26] (signed word) print_sword::w#3 ← phi( main::@1/(signed word) print_sword::w#1 main::@3/(signed word) print_sword::w#2 ) @@ -935,6 +957,8 @@ print_sword::@1: scope:[print_sword] from print_sword print_sword::@4: scope:[print_sword] from print_sword::@1 [36] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#3 to:print_sword::@2 + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from main::@2 print_byte print_byte::@1 print_sword::@1 print_sword::@3 [37] (byte*) print_char_cursor#36 ← phi( main::@2/(byte*) print_char_cursor#13 print_byte/(byte*) print_char_cursor#13 print_byte::@1/(byte*) print_char_cursor#13 print_sword::@1/(byte*) print_char_cursor#47 print_sword::@3/(byte*) print_char_cursor#47 ) [37] (byte) print_char::ch#5 ← phi( main::@2/(byte) ' ' print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' ) @@ -944,6 +968,8 @@ print_char: scope:[print_char] from main::@2 print_byte print_byte::@1 print_sw print_char::@return: scope:[print_char] from print_char [40] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from print_sword::@2 [41] (byte) print_byte::b#0 ← > (word) print_word::w#0 [42] call print_byte @@ -955,6 +981,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [45] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [46] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) [47] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 @@ -969,6 +997,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [53] return to:@return + +(void()) print_cls() print_cls: scope:[print_cls] from main [54] phi() [55] call memset @@ -976,6 +1006,8 @@ print_cls: scope:[print_cls] from main print_cls::@return: scope:[print_cls] from print_cls [56] return to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls [57] phi() to:memset::@1 diff --git a/src/test/ref/test-word-size-arrays.cfg b/src/test/ref/test-word-size-arrays.cfg index 894fef94d..7221bdec3 100644 --- a/src/test/ref/test-word-size-arrays.cfg +++ b/src/test/ref/test-word-size-arrays.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/test-word-size-arrays.log b/src/test/ref/test-word-size-arrays.log index 362649061..ac2307dfe 100644 --- a/src/test/ref/test-word-size-arrays.log +++ b/src/test/ref/test-word-size-arrays.log @@ -13,6 +13,8 @@ Culled Empty Block (label) main::@18 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::screen#0 ← ((byte*)) (number) $400 (word) main::line#0 ← (word) 0 @@ -227,6 +229,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/tetris-npe.cfg b/src/test/ref/tetris-npe.cfg index 5ccc63282..5f8739508 100644 --- a/src/test/ref/tetris-npe.cfg +++ b/src/test/ref/tetris-npe.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/tetris-npe.log b/src/test/ref/tetris-npe.log index 2307309e9..51bd337fa 100644 --- a/src/test/ref/tetris-npe.log +++ b/src/test/ref/tetris-npe.log @@ -20,6 +20,8 @@ CONTROL FLOW GRAPH SSA (byte) RATE#0 ← (number) $32 (byte) counter#0 ← (byte) RATE#0 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) ypos#10 ← phi( @1/(byte) ypos#9 ) (byte) counter#11 ← phi( @1/(byte) counter#10 ) @@ -209,6 +211,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/textbox.cfg b/src/test/ref/textbox.cfg index 483748135..13b1df68d 100644 --- a/src/test/ref/textbox.cfg +++ b/src/test/ref/textbox.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -47,6 +49,8 @@ main::@6: scope:[main] from main::@4 main::@5: scope:[main] from main::@4 [23] (word) main::wait#1 ← ++ (word) main::wait#2 to:main::@4 + +(void()) textbox((byte) textbox::x1 , (byte) textbox::y1 , (byte) textbox::x2 , (byte) textbox::y2 , (byte*) textbox::text) textbox: scope:[textbox] from main::@2 main::@3 main::@8 main::@9 [24] (byte*) textbox::text#12 ← phi( main::@8/(const byte[]) text#0 main::@9/(const byte[]) text#0 main::@2/(const byte[]) text2#0 main::@3/(const byte[]) text#0 ) [24] (byte) textbox::y2#4 ← phi( main::@8/(byte) 9 main::@9/(byte) $18 main::@2/(byte) textbox::y2#0 main::@3/(byte) $18 ) @@ -140,6 +144,8 @@ textbox::@4: scope:[textbox] from textbox::@14 [69] (byte) textbox::ls#1 ← ++ (byte) textbox::ls#2 [70] (byte) textbox::c#1 ← ++ (byte) textbox::c#2 to:textbox::@3 + +(void()) draw_window((byte) draw_window::x1 , (byte) draw_window::y1 , (byte) draw_window::x2 , (byte) draw_window::y2) draw_window: scope:[draw_window] from textbox [71] (byte) draw_window::$36 ← (byte) draw_window::y1#0 << (byte) 2 [72] (byte) draw_window::$37 ← (byte) draw_window::$36 + (byte) draw_window::y1#0 diff --git a/src/test/ref/textbox.log b/src/test/ref/textbox.log index 5229b2173..9103aaea1 100644 --- a/src/test/ref/textbox.log +++ b/src/test/ref/textbox.log @@ -46,6 +46,8 @@ CONTROL FLOW GRAPH SSA (byte[]) text#0 ← (const string) $0 (byte[]) text2#0 ← (const string) $1 to:@7 + +(void()) main() main: scope:[main] from @7 (byte) main::x#0 ← (number) 0 to:main::@1 @@ -117,6 +119,8 @@ main::@13: scope:[main] from main::@13 main::@18 main::@return: scope:[main] from main::@13 return to:@return + +(void()) textbox((byte) textbox::x1 , (byte) textbox::y1 , (byte) textbox::x2 , (byte) textbox::y2 , (byte*) textbox::text) textbox: scope:[textbox] from main::@16 main::@17 main::@2 main::@3 (byte*) textbox::text#12 ← phi( main::@16/(byte*) textbox::text#2 main::@17/(byte*) textbox::text#3 main::@2/(byte*) textbox::text#0 main::@3/(byte*) textbox::text#1 ) (byte) textbox::y2#4 ← phi( main::@16/(byte) textbox::y2#2 main::@17/(byte) textbox::y2#3 main::@2/(byte) textbox::y2#0 main::@3/(byte) textbox::y2#1 ) @@ -303,6 +307,8 @@ textbox::@18: scope:[textbox] from textbox::@20 (number~) textbox::$29 ← (byte) textbox::y#6 * (number) $28 (word) textbox::z#2 ← (number~) textbox::$29 to:textbox::@17 + +(void()) draw_window((byte) draw_window::x1 , (byte) draw_window::y1 , (byte) draw_window::x2 , (byte) draw_window::y2) draw_window: scope:[draw_window] from textbox (byte) draw_window::x2#6 ← phi( textbox/(byte) draw_window::x2#0 ) (byte) draw_window::x1#1 ← phi( textbox/(byte) draw_window::x1#0 ) @@ -1450,6 +1456,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -1490,6 +1498,8 @@ main::@6: scope:[main] from main::@4 main::@5: scope:[main] from main::@4 [23] (word) main::wait#1 ← ++ (word) main::wait#2 to:main::@4 + +(void()) textbox((byte) textbox::x1 , (byte) textbox::y1 , (byte) textbox::x2 , (byte) textbox::y2 , (byte*) textbox::text) textbox: scope:[textbox] from main::@2 main::@3 main::@8 main::@9 [24] (byte*) textbox::text#12 ← phi( main::@8/(const byte[]) text#0 main::@9/(const byte[]) text#0 main::@2/(const byte[]) text2#0 main::@3/(const byte[]) text#0 ) [24] (byte) textbox::y2#4 ← phi( main::@8/(byte) 9 main::@9/(byte) $18 main::@2/(byte) textbox::y2#0 main::@3/(byte) $18 ) @@ -1583,6 +1593,8 @@ textbox::@4: scope:[textbox] from textbox::@14 [69] (byte) textbox::ls#1 ← ++ (byte) textbox::ls#2 [70] (byte) textbox::c#1 ← ++ (byte) textbox::c#2 to:textbox::@3 + +(void()) draw_window((byte) draw_window::x1 , (byte) draw_window::y1 , (byte) draw_window::x2 , (byte) draw_window::y2) draw_window: scope:[draw_window] from textbox [71] (byte) draw_window::$36 ← (byte) draw_window::y1#0 << (byte) 2 [72] (byte) draw_window::$37 ← (byte) draw_window::$36 + (byte) draw_window::y1#0 diff --git a/src/test/ref/tod018-problem.cfg b/src/test/ref/tod018-problem.cfg index 47bdf41e8..7d7cc04ef 100644 --- a/src/test/ref/tod018-problem.cfg +++ b/src/test/ref/tod018-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::D018#0) ← (const byte) main::d018val#0 to:main::@return diff --git a/src/test/ref/tod018-problem.log b/src/test/ref/tod018-problem.log index 819cbb800..358dcd99b 100644 --- a/src/test/ref/tod018-problem.log +++ b/src/test/ref/tod018-problem.log @@ -2,6 +2,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::D018#0 ← ((byte*)) (number) $d018 (byte*) main::screen#0 ← ((byte*)) (number) $400 @@ -98,6 +100,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::D018#0) ← (const byte) main::d018val#0 to:main::@return diff --git a/src/test/ref/travis1.cfg b/src/test/ref/travis1.cfg index bbd461498..4344d3db3 100644 --- a/src/test/ref/travis1.cfg +++ b/src/test/ref/travis1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -36,6 +38,8 @@ main::@return: scope:[main] from main::@2 main::@5: scope:[main] from main::@2 [15] (byte*~) print_char_cursor#44 ← (byte*) print_line_cursor#14 to:main::@1 + +(void()) print_str_ln((byte*) print_str_ln::str) print_str_ln: scope:[print_str_ln] from game_ready::@1 main::@3 [16] (byte*) print_line_cursor#22 ← phi( game_ready::@1/(byte*) print_line_cursor#24 main::@3/(byte*) print_line_cursor#14 ) [16] (byte*) print_char_cursor#27 ← phi( game_ready::@1/(byte*) print_char_cursor#30 main::@3/(byte*~) print_char_cursor#41 ) @@ -50,6 +54,8 @@ print_str_ln::@1: scope:[print_str_ln] from print_str_ln print_str_ln::@return: scope:[print_str_ln] from print_str_ln::@1 [21] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from print_str_ln::@1 [22] phi() to:print_ln::@1 @@ -61,6 +67,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [26] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from print_str_ln [27] phi() to:print_str::@1 @@ -77,6 +85,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [32] (byte*) print_char_cursor#4 ← ++ (byte*) print_char_cursor#17 [33] (byte*) print_str::str#1 ← ++ (byte*) print_str::str#2 to:print_str::@1 + +(bool()) game_ready() game_ready: scope:[game_ready] from main::@1 [34] if((byte) action_count#13!=(byte) 0) goto game_ready::@3 to:game_ready::@1 diff --git a/src/test/ref/travis1.log b/src/test/ref/travis1.log index ab16e76f3..2c643c738 100644 --- a/src/test/ref/travis1.log +++ b/src/test/ref/travis1.log @@ -60,6 +60,8 @@ CONTROL FLOW GRAPH SSA (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@36 + +(void()) print_str_ln((byte*) print_str_ln::str) print_str_ln: scope:[print_str_ln] from game_ready::@1 main::@3 (byte*) print_line_cursor#29 ← phi( game_ready::@1/(byte*) print_line_cursor#27 main::@3/(byte*) print_line_cursor#25 ) (byte*) print_char_cursor#27 ← phi( game_ready::@1/(byte*) print_char_cursor#33 main::@3/(byte*) print_char_cursor#31 ) @@ -86,6 +88,8 @@ print_str_ln::@return: scope:[print_str_ln] from print_str_ln::@2 (byte*) print_line_cursor#2 ← (byte*) print_line_cursor#12 return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from print_str_ln (byte*) print_char_cursor#35 ← phi( print_str_ln/(byte*) print_char_cursor#27 ) (byte*) print_str::str#4 ← phi( print_str_ln/(byte*) print_str::str#0 ) @@ -108,6 +112,8 @@ print_str::@return: scope:[print_str] from print_str::@1 (byte*) print_char_cursor#5 ← (byte*) print_char_cursor#18 return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from print_str_ln::@1 (byte*) print_char_cursor#29 ← phi( print_str_ln::@1/(byte*) print_char_cursor#1 ) (byte*) print_line_cursor#23 ← phi( print_str_ln::@1/(byte*) print_line_cursor#22 ) @@ -137,6 +143,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte) action_count#0 ← (number) 0 (byte) READY_FRAMES#0 ← (number) 5 to:@38 + +(void()) main() main: scope:[main] from @38 (byte) action_count#17 ← phi( @38/(byte) action_count#16 ) (byte*) print_line_cursor#30 ← phi( @38/(byte*) print_line_cursor#28 ) @@ -198,6 +206,8 @@ main::@return: scope:[main] from main::@2 (byte) action_count#2 ← (byte) action_count#8 return to:@return + +(bool()) game_ready() game_ready: scope:[game_ready] from main::@1 (byte*) print_line_cursor#31 ← phi( main::@1/(byte*) print_line_cursor#24 ) (byte*) print_char_cursor#37 ← phi( main::@1/(byte*) print_char_cursor#30 ) @@ -625,6 +635,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -654,6 +666,8 @@ main::@return: scope:[main] from main::@2 main::@5: scope:[main] from main::@2 [15] (byte*~) print_char_cursor#44 ← (byte*) print_line_cursor#14 to:main::@1 + +(void()) print_str_ln((byte*) print_str_ln::str) print_str_ln: scope:[print_str_ln] from game_ready::@1 main::@3 [16] (byte*) print_line_cursor#22 ← phi( game_ready::@1/(byte*) print_line_cursor#24 main::@3/(byte*) print_line_cursor#14 ) [16] (byte*) print_char_cursor#27 ← phi( game_ready::@1/(byte*) print_char_cursor#30 main::@3/(byte*~) print_char_cursor#41 ) @@ -668,6 +682,8 @@ print_str_ln::@1: scope:[print_str_ln] from print_str_ln print_str_ln::@return: scope:[print_str_ln] from print_str_ln::@1 [21] return to:@return + +(void()) print_ln() print_ln: scope:[print_ln] from print_str_ln::@1 [22] phi() to:print_ln::@1 @@ -679,6 +695,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [26] return to:@return + +(void()) print_str((byte*) print_str::str) print_str: scope:[print_str] from print_str_ln [27] phi() to:print_str::@1 @@ -695,6 +713,8 @@ print_str::@2: scope:[print_str] from print_str::@1 [32] (byte*) print_char_cursor#4 ← ++ (byte*) print_char_cursor#17 [33] (byte*) print_str::str#1 ← ++ (byte*) print_str::str#2 to:print_str::@1 + +(bool()) game_ready() game_ready: scope:[game_ready] from main::@1 [34] if((byte) action_count#13!=(byte) 0) goto game_ready::@3 to:game_ready::@1 diff --git a/src/test/ref/true-inline-words.cfg b/src/test/ref/true-inline-words.cfg index 3a6976cd3..319e4fc3f 100644 --- a/src/test/ref/true-inline-words.cfg +++ b/src/test/ref/true-inline-words.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::sc#0) ← *((const byte[]) main::bs#0+(byte) 1) [5] if(*((const byte*) main::pos#0)==(byte) 'm') goto main::@1 diff --git a/src/test/ref/true-inline-words.log b/src/test/ref/true-inline-words.log index 9be682780..ad28712c8 100644 --- a/src/test/ref/true-inline-words.log +++ b/src/test/ref/true-inline-words.log @@ -7,6 +7,8 @@ Culled Empty Block (label) main::@4 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte[]) main::bs#0 ← { (byte) 'c', (byte) 'm' } (byte) main::b#0 ← (number) 4 @@ -198,6 +200,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::sc#0) ← *((const byte[]) main::bs#0+(byte) 1) [5] if(*((const byte*) main::pos#0)==(byte) 'm') goto main::@1 diff --git a/src/test/ref/type-inference.cfg b/src/test/ref/type-inference.cfg index 58cb82cb6..25ace34c2 100644 --- a/src/test/ref/type-inference.cfg +++ b/src/test/ref/type-inference.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/type-inference.log b/src/test/ref/type-inference.log index 0ce874a45..868322242 100644 --- a/src/test/ref/type-inference.log +++ b/src/test/ref/type-inference.log @@ -4,6 +4,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (word*) main::screen#0 ← ((word*)) (number) $400 (byte) main::b#0 ← (byte) 0 @@ -106,6 +108,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/type-mix.cfg b/src/test/ref/type-mix.cfg index 6f41cb97e..589662bab 100644 --- a/src/test/ref/type-mix.cfg +++ b/src/test/ref/type-mix.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/type-mix.log b/src/test/ref/type-mix.log index 5c99baa2a..544439cc9 100644 --- a/src/test/ref/type-mix.log +++ b/src/test/ref/type-mix.log @@ -4,6 +4,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (signed word) main::w#0 ← (number) 0 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 @@ -118,6 +120,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/type-signed.cfg b/src/test/ref/type-signed.cfg index cc4ce5e9a..4dc74af6a 100644 --- a/src/test/ref/type-signed.cfg +++ b/src/test/ref/type-signed.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -43,6 +45,8 @@ main::@return: scope:[main] from main::@5 main::@6: scope:[main] from main::@5 [19] (byte*~) print_char_cursor#57 ← (byte*) print_line_cursor#1 to:main::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@4 [20] phi() to:print_ln::@1 @@ -54,6 +58,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [24] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from main::@3 print_sword::@2 [25] (word) print_word::w#2 ← phi( main::@3/(word) print_word::w#1 print_sword::@2/(word) print_word::w#0 ) [26] (byte) print_byte::b#0 ← > (word) print_word::w#2 @@ -66,6 +72,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [30] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [31] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) [32] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 @@ -80,6 +88,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [38] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from main::@2 print_byte print_byte::@1 print_sword::@1 print_sword::@3 [39] (byte*) print_char_cursor#33 ← phi( main::@2/(byte*) print_char_cursor#13 print_byte/(byte*) print_char_cursor#13 print_byte::@1/(byte*) print_char_cursor#13 print_sword::@1/(byte*) print_char_cursor#47 print_sword::@3/(byte*) print_char_cursor#47 ) [39] (byte) print_char::ch#5 ← phi( main::@2/(byte) ' ' print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' ) @@ -89,6 +99,8 @@ print_char: scope:[print_char] from main::@2 print_byte print_byte::@1 print_sw print_char::@return: scope:[print_char] from print_char [42] return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from main::@1 [43] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 to:print_sword::@3 diff --git a/src/test/ref/type-signed.log b/src/test/ref/type-signed.log index 22094e5e8..d7ed5a22a 100644 --- a/src/test/ref/type-signed.log +++ b/src/test/ref/type-signed.log @@ -55,6 +55,8 @@ CONTROL FLOW GRAPH SSA (byte*) print_line_cursor#0 ← (byte*) print_screen#0 (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0 to:@29 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@5 (byte*) print_char_cursor#41 ← phi( main::@5/(byte*) print_char_cursor#17 ) (byte*) print_line_cursor#12 ← phi( main::@5/(byte*) print_line_cursor#13 ) @@ -78,6 +80,8 @@ print_ln::@return: scope:[print_ln] from print_ln::@2 (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#22 return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from main::@1 (byte*) print_char_cursor#49 ← phi( main::@1/(byte*) print_char_cursor#47 ) (signed word) print_sword::w#2 ← phi( main::@1/(signed word) print_sword::w#1 ) @@ -124,6 +128,8 @@ print_sword::@return: scope:[print_sword] from print_sword::@7 (byte*) print_char_cursor#6 ← (byte*) print_char_cursor#26 return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from main::@4 print_sword::@2 (byte*) print_char_cursor#45 ← phi( main::@4/(byte*) print_char_cursor#16 print_sword::@2/(byte*) print_char_cursor#44 ) (word) print_word::w#2 ← phi( main::@4/(word) print_word::w#1 print_sword::@2/(word) print_word::w#0 ) @@ -153,6 +159,8 @@ print_word::@return: scope:[print_word] from print_word::@2 (byte*) print_char_cursor#51 ← phi( @12/(byte*) print_char_cursor#0 ) (byte[]) print_hextab#0 ← (const string) $0 to:@37 + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 (byte*) print_char_cursor#46 ← phi( print_word/(byte*) print_char_cursor#45 print_word::@1/(byte*) print_char_cursor#7 ) (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) @@ -177,6 +185,8 @@ print_byte::@return: scope:[print_byte] from print_byte::@2 (byte*) print_char_cursor#12 ← (byte*) print_char_cursor#32 return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from main::@3 print_byte print_byte::@1 print_sword::@1 print_sword::@3 (byte*) print_char_cursor#33 ← phi( main::@3/(byte*) print_char_cursor#15 print_byte/(byte*) print_char_cursor#46 print_byte::@1/(byte*) print_char_cursor#10 print_sword::@1/(byte*) print_char_cursor#42 print_sword::@3/(byte*) print_char_cursor#43 ) (byte) print_char::ch#5 ← phi( main::@3/(byte) print_char::ch#4 print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sword::@1/(byte) print_char::ch#0 print_sword::@3/(byte) print_char::ch#1 ) @@ -188,6 +198,8 @@ print_char::@return: scope:[print_char] from print_char (byte*) print_char_cursor#14 ← (byte*) print_char_cursor#34 return to:@return + +(void()) main() main: scope:[main] from @37 (byte*) print_line_cursor#19 ← phi( @37/(byte*) print_line_cursor#14 ) (byte*) print_char_cursor#50 ← phi( @37/(byte*) print_char_cursor#48 ) @@ -656,6 +668,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -692,6 +706,8 @@ main::@return: scope:[main] from main::@5 main::@6: scope:[main] from main::@5 [19] (byte*~) print_char_cursor#57 ← (byte*) print_line_cursor#1 to:main::@1 + +(void()) print_ln() print_ln: scope:[print_ln] from main::@4 [20] phi() to:print_ln::@1 @@ -703,6 +719,8 @@ print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1 [24] return to:@return + +(void()) print_word((word) print_word::w) print_word: scope:[print_word] from main::@3 print_sword::@2 [25] (word) print_word::w#2 ← phi( main::@3/(word) print_word::w#1 print_sword::@2/(word) print_word::w#0 ) [26] (byte) print_byte::b#0 ← > (word) print_word::w#2 @@ -715,6 +733,8 @@ print_word::@1: scope:[print_word] from print_word print_word::@return: scope:[print_word] from print_word::@1 [30] return to:@return + +(void()) print_byte((byte) print_byte::b) print_byte: scope:[print_byte] from print_word print_word::@1 [31] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) [32] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 @@ -729,6 +749,8 @@ print_byte::@1: scope:[print_byte] from print_byte print_byte::@return: scope:[print_byte] from print_byte::@1 [38] return to:@return + +(void()) print_char((byte) print_char::ch) print_char: scope:[print_char] from main::@2 print_byte print_byte::@1 print_sword::@1 print_sword::@3 [39] (byte*) print_char_cursor#33 ← phi( main::@2/(byte*) print_char_cursor#13 print_byte/(byte*) print_char_cursor#13 print_byte::@1/(byte*) print_char_cursor#13 print_sword::@1/(byte*) print_char_cursor#47 print_sword::@3/(byte*) print_char_cursor#47 ) [39] (byte) print_char::ch#5 ← phi( main::@2/(byte) ' ' print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' ) @@ -738,6 +760,8 @@ print_char: scope:[print_char] from main::@2 print_byte print_byte::@1 print_sw print_char::@return: scope:[print_char] from print_char [42] return to:@return + +(void()) print_sword((signed word) print_sword::w) print_sword: scope:[print_sword] from main::@1 [43] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 to:print_sword::@3 diff --git a/src/test/ref/typedef-0.cfg b/src/test/ref/typedef-0.cfg index aa1bb1eda..b101d9e36 100644 --- a/src/test/ref/typedef-0.cfg +++ b/src/test/ref/typedef-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::b#0 to:main::@return diff --git a/src/test/ref/typedef-0.log b/src/test/ref/typedef-0.log index 657381628..5ee2ed7a8 100644 --- a/src/test/ref/typedef-0.log +++ b/src/test/ref/typedef-0.log @@ -4,6 +4,8 @@ Identified constant variable (byte*) main::SCREEN CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::b#0 ← (byte) 'a' (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 @@ -62,6 +64,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::b#0 to:main::@return diff --git a/src/test/ref/typedef-1.cfg b/src/test/ref/typedef-1.cfg index b59cc0531..b9a977bfd 100644 --- a/src/test/ref/typedef-1.cfg +++ b/src/test/ref/typedef-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((byte*)(const struct PointDef*) main::SCREEN#0) ← (const byte) main::p_x#0 [5] *((byte*)(const struct PointDef*) main::SCREEN#0+(const byte) OFFSET_STRUCT_POINTDEF_Y) ← (const byte) main::p_y#0 diff --git a/src/test/ref/typedef-1.log b/src/test/ref/typedef-1.log index 791cc9080..ba52906b8 100644 --- a/src/test/ref/typedef-1.log +++ b/src/test/ref/typedef-1.log @@ -12,6 +12,8 @@ Identified constant variable (byte) main::p_y CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::p_x#0 ← (number) 4 (byte) main::p_y#0 ← (number) 7 @@ -108,6 +110,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((byte*)(const struct PointDef*) main::SCREEN#0) ← (const byte) main::p_x#0 [5] *((byte*)(const struct PointDef*) main::SCREEN#0+(const byte) OFFSET_STRUCT_POINTDEF_Y) ← (const byte) main::p_y#0 diff --git a/src/test/ref/typedef-2.cfg b/src/test/ref/typedef-2.cfg index 63cc20a25..f36ec989f 100644 --- a/src/test/ref/typedef-2.cfg +++ b/src/test/ref/typedef-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← <(word)&(byte*) ptr#0+(byte) $32 to:main::@return diff --git a/src/test/ref/typedef-2.log b/src/test/ref/typedef-2.log index 1c20c4507..464388073 100644 --- a/src/test/ref/typedef-2.log +++ b/src/test/ref/typedef-2.log @@ -5,6 +5,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte*) ptr#0 ← ((byte*)) (number) $1000 to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) ptr#1 ← phi( @1/(byte*) ptr#2 ) (byte**~) main::$0 ← & (byte*) ptr#1 @@ -113,6 +115,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← <(word)&(byte*) ptr#0+(byte) $32 to:main::@return diff --git a/src/test/ref/typeid-plus-byte-problem.cfg b/src/test/ref/typeid-plus-byte-problem.cfg index de2d2c522..e9a864fd3 100644 --- a/src/test/ref/typeid-plus-byte-problem.cfg +++ b/src/test/ref/typeid-plus-byte-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (const byte) main::ubc1#0+(const byte) main::ubc2#0 to:main::@return diff --git a/src/test/ref/typeid-plus-byte-problem.log b/src/test/ref/typeid-plus-byte-problem.log index 702cb3254..d061cdbdd 100644 --- a/src/test/ref/typeid-plus-byte-problem.log +++ b/src/test/ref/typeid-plus-byte-problem.log @@ -5,6 +5,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::ubc1#0 ← (number) $c+(number) $d+(number) $e (byte) main::ubc2#0 ← (number) $fa @@ -89,6 +91,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (const byte) main::ubc1#0+(const byte) main::ubc2#0 to:main::@return diff --git a/src/test/ref/typeid-plus-bytes.cfg b/src/test/ref/typeid-plus-bytes.cfg index 142efb73e..561874757 100644 --- a/src/test/ref/typeid-plus-bytes.cfg +++ b/src/test/ref/typeid-plus-bytes.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call testUnsigned @@ -26,6 +28,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [12] return to:@return + +(void()) testSignedVals() testSignedVals: scope:[testSignedVals] from main::@3 [13] (signed byte) testSignedVals::sbv1#0 ← (signed byte) -$78 [14] *((const signed byte*) SSCREEN#0+(byte)(number) $28*(number) 3) ← (signed byte) -$78 @@ -48,6 +52,8 @@ testSignedVals: scope:[testSignedVals] from main::@3 testSignedVals::@return: scope:[testSignedVals] from testSignedVals [30] return to:@return + +(void()) testSigned() testSigned: scope:[testSigned] from main::@2 [31] (signed byte) testSigned::sbv1#0 ← (signed byte) -$78 [32] *((const byte*) SCREEN#0+(byte)(number) $28*(number) 2) ← (byte) 0 @@ -65,6 +71,8 @@ testSigned: scope:[testSigned] from main::@2 testSigned::@return: scope:[testSigned] from testSigned [43] return to:@return + +(void()) testUnsignedVals() testUnsignedVals: scope:[testUnsignedVals] from main::@1 [44] (byte) testUnsignedVals::ubv1#0 ← (byte) $fa [45] *((const byte*) SCREEN#0+(byte) $28) ← (byte) $fa @@ -87,6 +95,8 @@ testUnsignedVals: scope:[testUnsignedVals] from main::@1 testUnsignedVals::@return: scope:[testUnsignedVals] from testUnsignedVals [61] return to:@return + +(void()) testUnsigned() testUnsigned: scope:[testUnsigned] from main [62] (byte) testUnsigned::ubv1#0 ← (byte) $fa [63] *((const byte*) SCREEN#0) ← (byte) 0 diff --git a/src/test/ref/typeid-plus-bytes.log b/src/test/ref/typeid-plus-bytes.log index 847d97f42..4a5bc3cc5 100644 --- a/src/test/ref/typeid-plus-bytes.log +++ b/src/test/ref/typeid-plus-bytes.log @@ -23,6 +23,8 @@ CONTROL FLOW GRAPH SSA (signed byte*) SSCREEN#0 ← ((signed byte*)) (number) $400 (byte) idx#0 ← (number) 0 to:@5 + +(void()) main() main: scope:[main] from @5 (byte) idx#1 ← (number) 0 call testUnsigned @@ -54,6 +56,8 @@ main::@return: scope:[main] from main::@4 (byte) idx#9 ← (byte) idx#63 return to:@return + +(void()) testUnsigned() testUnsigned: scope:[testUnsigned] from main (byte) idx#64 ← phi( main/(byte) idx#1 ) (byte) testUnsigned::ubc1#0 ← (number) $fa @@ -101,6 +105,8 @@ testUnsigned::@return: scope:[testUnsigned] from testUnsigned (byte) idx#21 ← (byte) idx#65 return to:@return + +(void()) testUnsignedVals() testUnsignedVals: scope:[testUnsignedVals] from main::@1 (byte) idx#66 ← phi( main::@1/(byte) idx#3 ) (byte) testUnsignedVals::ubc1#0 ← (number) $fa @@ -140,6 +146,8 @@ testUnsignedVals::@return: scope:[testUnsignedVals] from testUnsignedVals (byte) idx#33 ← (byte) idx#67 return to:@return + +(void()) testSigned() testSigned: scope:[testSigned] from main::@2 (byte) idx#68 ← phi( main::@2/(byte) idx#5 ) (signed byte) testSigned::sbc1#0 ← (number) -$78 @@ -187,6 +195,8 @@ testSigned::@return: scope:[testSigned] from testSigned (byte) idx#45 ← (byte) idx#69 return to:@return + +(void()) testSignedVals() testSignedVals: scope:[testSignedVals] from main::@3 (byte) idx#70 ← phi( main::@3/(byte) idx#7 ) (signed byte) testSignedVals::sbc1#0 ← (number) -$78 @@ -985,6 +995,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call testUnsigned @@ -1004,6 +1016,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [12] return to:@return + +(void()) testSignedVals() testSignedVals: scope:[testSignedVals] from main::@3 [13] (signed byte) testSignedVals::sbv1#0 ← (signed byte) -$78 [14] *((const signed byte*) SSCREEN#0+(byte)(number) $28*(number) 3) ← (signed byte) -$78 @@ -1026,6 +1040,8 @@ testSignedVals: scope:[testSignedVals] from main::@3 testSignedVals::@return: scope:[testSignedVals] from testSignedVals [30] return to:@return + +(void()) testSigned() testSigned: scope:[testSigned] from main::@2 [31] (signed byte) testSigned::sbv1#0 ← (signed byte) -$78 [32] *((const byte*) SCREEN#0+(byte)(number) $28*(number) 2) ← (byte) 0 @@ -1043,6 +1059,8 @@ testSigned: scope:[testSigned] from main::@2 testSigned::@return: scope:[testSigned] from testSigned [43] return to:@return + +(void()) testUnsignedVals() testUnsignedVals: scope:[testUnsignedVals] from main::@1 [44] (byte) testUnsignedVals::ubv1#0 ← (byte) $fa [45] *((const byte*) SCREEN#0+(byte) $28) ← (byte) $fa @@ -1065,6 +1083,8 @@ testUnsignedVals: scope:[testUnsignedVals] from main::@1 testUnsignedVals::@return: scope:[testUnsignedVals] from testUnsignedVals [61] return to:@return + +(void()) testUnsigned() testUnsigned: scope:[testUnsigned] from main [62] (byte) testUnsigned::ubv1#0 ← (byte) $fa [63] *((const byte*) SCREEN#0) ← (byte) 0 diff --git a/src/test/ref/typeid-simple.cfg b/src/test/ref/typeid-simple.cfg index 656b5a59e..7aae78890 100644 --- a/src/test/ref/typeid-simple.cfg +++ b/src/test/ref/typeid-simple.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) TYPEID_VOID [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) TYPEID_BYTE diff --git a/src/test/ref/typeid-simple.log b/src/test/ref/typeid-simple.log index 7ac2388df..9838bfad2 100644 --- a/src/test/ref/typeid-simple.log +++ b/src/test/ref/typeid-simple.log @@ -2,6 +2,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::idx#0 ← (number) 0 @@ -409,6 +411,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::SCREEN#0) ← (const byte) TYPEID_VOID [5] *((const byte*) main::SCREEN#0+(byte) 1) ← (const byte) TYPEID_BYTE diff --git a/src/test/ref/typeinference-problem.cfg b/src/test/ref/typeinference-problem.cfg index e1ccf66ce..41f9acb7d 100644 --- a/src/test/ref/typeinference-problem.cfg +++ b/src/test/ref/typeinference-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/typeinference-problem.log b/src/test/ref/typeinference-problem.log index ee22b1273..6fdf9571c 100644 --- a/src/test/ref/typeinference-problem.log +++ b/src/test/ref/typeinference-problem.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte[$100]) table#0 ← { fill( $100, 0) } to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -102,6 +104,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/uninitialized.cfg b/src/test/ref/uninitialized.cfg index eff7c6468..d03a462de 100644 --- a/src/test/ref/uninitialized.cfg +++ b/src/test/ref/uninitialized.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (const byte) b#0 [5] *((const byte*) SCREEN#0+(byte) 2) ← (byte) 0 diff --git a/src/test/ref/uninitialized.log b/src/test/ref/uninitialized.log index b826059b9..7645617f7 100644 --- a/src/test/ref/uninitialized.log +++ b/src/test/ref/uninitialized.log @@ -9,6 +9,8 @@ CONTROL FLOW GRAPH SSA (byte*) ptr#0 ← (byte*) 0 (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 *((byte*) SCREEN#0 + (number) 0) ← (byte) b#0 (byte~) main::$0 ← < (word) w#0 @@ -141,6 +143,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (const byte) b#0 [5] *((const byte*) SCREEN#0+(byte) 2) ← (byte) 0 diff --git a/src/test/ref/unroll-for-min.cfg b/src/test/ref/unroll-for-min.cfg index a36a7f804..dd05264c3 100644 --- a/src/test/ref/unroll-for-min.cfg +++ b/src/test/ref/unroll-for-min.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/unroll-for-min.log b/src/test/ref/unroll-for-min.log index 8f508e96f..500c98658 100644 --- a/src/test/ref/unroll-for-min.log +++ b/src/test/ref/unroll-for-min.log @@ -4,6 +4,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (byte) 0 @@ -144,6 +146,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/unroll-loop-modifyvar.cfg b/src/test/ref/unroll-loop-modifyvar.cfg index f8da41d86..768d280e0 100644 --- a/src/test/ref/unroll-loop-modifyvar.cfg +++ b/src/test/ref/unroll-loop-modifyvar.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/unroll-loop-modifyvar.log b/src/test/ref/unroll-loop-modifyvar.log index 52fb81cdc..a0dadcf7c 100644 --- a/src/test/ref/unroll-loop-modifyvar.log +++ b/src/test/ref/unroll-loop-modifyvar.log @@ -3,6 +3,8 @@ Identified constant variable (byte*) main::SCREEN CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::a#0 ← (number) 3 @@ -334,6 +336,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/unroll-screenfill-for-double.cfg b/src/test/ref/unroll-screenfill-for-double.cfg index 845d0b432..0dbe36bf7 100644 --- a/src/test/ref/unroll-screenfill-for-double.cfg +++ b/src/test/ref/unroll-screenfill-for-double.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/unroll-screenfill-for-double.log b/src/test/ref/unroll-screenfill-for-double.log index 87d9c2ea4..8bfcb4f01 100644 --- a/src/test/ref/unroll-screenfill-for-double.log +++ b/src/test/ref/unroll-screenfill-for-double.log @@ -4,6 +4,8 @@ Culled Empty Block (label) main::@4 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::x#0 ← (byte) 0 @@ -950,6 +952,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/unroll-screenfill-for.cfg b/src/test/ref/unroll-screenfill-for.cfg index bde16cab1..d6a973c78 100644 --- a/src/test/ref/unroll-screenfill-for.cfg +++ b/src/test/ref/unroll-screenfill-for.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/unroll-screenfill-for.log b/src/test/ref/unroll-screenfill-for.log index afb40f652..2f5a5b77e 100644 --- a/src/test/ref/unroll-screenfill-for.log +++ b/src/test/ref/unroll-screenfill-for.log @@ -4,6 +4,8 @@ Culled Empty Block (label) main::@4 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::x#0 ← (byte) 0 @@ -743,6 +745,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/unroll-screenfill-while.cfg b/src/test/ref/unroll-screenfill-while.cfg index 4627bf7c1..3923c162f 100644 --- a/src/test/ref/unroll-screenfill-while.cfg +++ b/src/test/ref/unroll-screenfill-while.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/unroll-screenfill-while.log b/src/test/ref/unroll-screenfill-while.log index 200496a3b..8b944b0cb 100644 --- a/src/test/ref/unroll-screenfill-while.log +++ b/src/test/ref/unroll-screenfill-while.log @@ -7,6 +7,8 @@ Culled Empty Block (label) main::@8 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::x#0 ← (byte) 0 @@ -778,6 +780,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/unroll-while-min.cfg b/src/test/ref/unroll-while-min.cfg index 87802ba5a..c0f71b83d 100644 --- a/src/test/ref/unroll-while-min.cfg +++ b/src/test/ref/unroll-while-min.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/unroll-while-min.log b/src/test/ref/unroll-while-min.log index e0ae71155..1dab697f8 100644 --- a/src/test/ref/unroll-while-min.log +++ b/src/test/ref/unroll-while-min.log @@ -7,6 +7,8 @@ Culled Empty Block (label) main::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 (byte) main::i#0 ← (number) 0 @@ -154,6 +156,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/unused-irq.cfg b/src/test/ref/unused-irq.cfg index 6d61e4af4..e3ceb8f0b 100644 --- a/src/test/ref/unused-irq.cfg +++ b/src/test/ref/unused-irq.cfg @@ -7,18 +7,24 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) 'x' to:main::@return main::@return: scope:[main] from main [5] return to:@return + +interrupt(KERNEL_MIN)(void()) irq2() irq2: scope:[irq2] from [6] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(KERNEL_MIN)(void()) irq1() to:irq2::@return irq2::@return: scope:[irq2] from irq2 [7] return to:@return + +interrupt(KERNEL_MIN)(void()) irq1() irq1: scope:[irq1] from [8] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(KERNEL_MIN)(void()) irq2() to:irq1::@return diff --git a/src/test/ref/unused-irq.log b/src/test/ref/unused-irq.log index 02a25a612..acb1e6676 100644 --- a/src/test/ref/unused-irq.log +++ b/src/test/ref/unused-irq.log @@ -5,6 +5,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @3 *((byte*) SCREEN#0) ← (byte) 'x' to:main::@return @@ -14,6 +16,8 @@ main::@return: scope:[main] from main @1: scope:[] from @begin (void()**) HARDWARE_IRQ#0 ← ((void()**)) (number) $fffe to:@3 + +interrupt(KERNEL_MIN)(void()) irq1() irq1: scope:[irq1] from (void()*~) irq1::$0 ← & interrupt(KERNEL_MIN)(void()) irq2() *((void()**) HARDWARE_IRQ#0) ← (void()*~) irq1::$0 @@ -21,6 +25,8 @@ irq1: scope:[irq1] from irq1::@return: scope:[irq1] from irq1 return to:@return + +interrupt(KERNEL_MIN)(void()) irq2() irq2: scope:[irq2] from (void()*~) irq2::$0 ← & interrupt(KERNEL_MIN)(void()) irq1() *((void()**) HARDWARE_IRQ#0) ← (void()*~) irq2::$0 @@ -98,18 +104,24 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) 'x' to:main::@return main::@return: scope:[main] from main [5] return to:@return + +interrupt(KERNEL_MIN)(void()) irq2() irq2: scope:[irq2] from [6] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(KERNEL_MIN)(void()) irq1() to:irq2::@return irq2::@return: scope:[irq2] from irq2 [7] return to:@return + +interrupt(KERNEL_MIN)(void()) irq1() irq1: scope:[irq1] from [8] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(KERNEL_MIN)(void()) irq2() to:irq1::@return diff --git a/src/test/ref/unused-method.cfg b/src/test/ref/unused-method.cfg index 72606a709..3e43a2417 100644 --- a/src/test/ref/unused-method.cfg +++ b/src/test/ref/unused-method.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::screen#0) ← (byte) 1 to:main::@return diff --git a/src/test/ref/unused-method.log b/src/test/ref/unused-method.log index 615ceb628..677a8fba9 100644 --- a/src/test/ref/unused-method.log +++ b/src/test/ref/unused-method.log @@ -4,6 +4,8 @@ Culled Empty Block (label) @1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @2 (byte*) main::screen#0 ← ((byte*)) (number) $400 *((byte*) main::screen#0 + (number) 0) ← (number) 1 @@ -70,6 +72,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::screen#0) ← (byte) 1 to:main::@return diff --git a/src/test/ref/unused-vars.cfg b/src/test/ref/unused-vars.cfg index 9403bf80c..3e159809c 100644 --- a/src/test/ref/unused-vars.cfg +++ b/src/test/ref/unused-vars.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call s @@ -21,6 +23,8 @@ main::@1: scope:[main] from main main::@1 main::@return: scope:[main] from main::@1 [11] return to:@return + +(byte()) s() s: scope:[s] from main [12] phi() to:s::@return diff --git a/src/test/ref/unused-vars.log b/src/test/ref/unused-vars.log index 1a03203fb..963eedd33 100644 --- a/src/test/ref/unused-vars.log +++ b/src/test/ref/unused-vars.log @@ -12,6 +12,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte) b#0 ← (number) 2/(number) 2 to:@2 + +(void()) main() main: scope:[main] from @2 (byte) b#13 ← phi( @2/(byte) b#14 ) (byte) main::col#0 ← (number) 2 @@ -39,6 +41,8 @@ main::@return: scope:[main] from main::@1 (byte) b#3 ← (byte) b#9 return to:@return + +(byte()) s() s: scope:[s] from main (byte) b#10 ← phi( main/(byte) b#13 ) (byte) b#4 ← ++ (byte) b#10 @@ -213,6 +217,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call s @@ -227,6 +233,8 @@ main::@1: scope:[main] from main main::@1 main::@return: scope:[main] from main::@1 [11] return to:@return + +(byte()) s() s: scope:[s] from main [12] phi() to:s::@return diff --git a/src/test/ref/unusedblockproblem.cfg b/src/test/ref/unusedblockproblem.cfg index 14c12f2b7..3b8e342f2 100644 --- a/src/test/ref/unusedblockproblem.cfg +++ b/src/test/ref/unusedblockproblem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/unusedblockproblem.log b/src/test/ref/unusedblockproblem.log index cb02b81c3..e55a3541b 100644 --- a/src/test/ref/unusedblockproblem.log +++ b/src/test/ref/unusedblockproblem.log @@ -7,6 +7,8 @@ Culled Empty Block (label) main::@8 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 to:main::@1 @@ -106,6 +108,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/useglobal.cfg b/src/test/ref/useglobal.cfg index 4dc608bc3..cbc89c457 100644 --- a/src/test/ref/useglobal.cfg +++ b/src/test/ref/useglobal.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) 1 to:main::@return diff --git a/src/test/ref/useglobal.log b/src/test/ref/useglobal.log index b405b2002..003fca74a 100644 --- a/src/test/ref/useglobal.log +++ b/src/test/ref/useglobal.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 *((byte*) SCREEN#0) ← (number) 1 to:main::@return @@ -63,6 +65,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) 1 to:main::@return diff --git a/src/test/ref/useuninitialized.cfg b/src/test/ref/useuninitialized.cfg index bda5394a4..16f1bff64 100644 --- a/src/test/ref/useuninitialized.cfg +++ b/src/test/ref/useuninitialized.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::screen#0) ← (const byte) b#1 [5] *((const byte*) main::screen#0+(byte) 1) ← (const byte) s#1 diff --git a/src/test/ref/useuninitialized.log b/src/test/ref/useuninitialized.log index d66d459bd..479e100c7 100644 --- a/src/test/ref/useuninitialized.log +++ b/src/test/ref/useuninitialized.log @@ -6,6 +6,8 @@ CONTROL FLOW GRAPH SSA (byte) b#0 ← (byte) 0 (byte) s#0 ← (byte) 0 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) b#4 ← phi( @1/(byte) b#7 ) (number~) main::$0 ← (byte) b#4 + (number) 1 @@ -135,6 +137,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) main::screen#0) ← (const byte) b#1 [5] *((const byte*) main::screen#0+(byte) 1) ← (const byte) s#1 diff --git a/src/test/ref/var-export.cfg b/src/test/ref/var-export.cfg index df4c22e99..c71553960 100644 --- a/src/test/ref/var-export.cfg +++ b/src/test/ref/var-export.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) 'x' to:main::@return diff --git a/src/test/ref/var-export.log b/src/test/ref/var-export.log index 5d603fdcd..d7363e0cb 100644 --- a/src/test/ref/var-export.log +++ b/src/test/ref/var-export.log @@ -4,6 +4,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) SCREEN#0 ← ((byte*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 *((byte*) SCREEN#0 + (number) 0) ← (byte) 'x' to:main::@return @@ -71,6 +73,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) SCREEN#0) ← (byte) 'x' to:main::@return diff --git a/src/test/ref/var-forward-problem.cfg b/src/test/ref/var-forward-problem.cfg index 948b46b3c..0e9be5934 100644 --- a/src/test/ref/var-forward-problem.cfg +++ b/src/test/ref/var-forward-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) screen#0) ← (const byte) b#0 to:main::@return diff --git a/src/test/ref/var-forward-problem.log b/src/test/ref/var-forward-problem.log index a1d638959..bc0dcb959 100644 --- a/src/test/ref/var-forward-problem.log +++ b/src/test/ref/var-forward-problem.log @@ -4,6 +4,8 @@ Resolved forward reference screen to (byte*) screen CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 *((byte*) screen#0) ← (byte) b#0 to:main::@return @@ -62,6 +64,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) screen#0) ← (const byte) b#0 to:main::@return diff --git a/src/test/ref/var-forward-problem2.cfg b/src/test/ref/var-forward-problem2.cfg index 948b46b3c..0e9be5934 100644 --- a/src/test/ref/var-forward-problem2.cfg +++ b/src/test/ref/var-forward-problem2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) screen#0) ← (const byte) b#0 to:main::@return diff --git a/src/test/ref/var-forward-problem2.log b/src/test/ref/var-forward-problem2.log index f36f2bdc2..5ba0991f1 100644 --- a/src/test/ref/var-forward-problem2.log +++ b/src/test/ref/var-forward-problem2.log @@ -6,6 +6,8 @@ Resolved forward reference screen to (byte*) screen CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) screen#0 ← ((byte*)) (number) $400 (byte) b#0 ← (byte) 'a' @@ -97,6 +99,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) screen#0) ← (const byte) b#0 to:main::@return diff --git a/src/test/ref/var-init-problem.cfg b/src/test/ref/var-init-problem.cfg index ed0efe91e..cb03a55f3 100644 --- a/src/test/ref/var-init-problem.cfg +++ b/src/test/ref/var-init-problem.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) screen#1) ← (byte) 'a' to:main::@return diff --git a/src/test/ref/var-init-problem.log b/src/test/ref/var-init-problem.log index 1c4af5214..2d1b44b53 100644 --- a/src/test/ref/var-init-problem.log +++ b/src/test/ref/var-init-problem.log @@ -3,6 +3,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) screen#0 ← (byte*) 0 to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) screen#1 ← ((byte*)) (number) $400 *((byte*) screen#1) ← (byte) 'a' @@ -77,6 +79,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const byte*) screen#1) ← (byte) 'a' to:main::@return diff --git a/src/test/ref/var-register-noarg.cfg b/src/test/ref/var-register-noarg.cfg index 8acdabdd0..f2bb6096b 100644 --- a/src/test/ref/var-register-noarg.cfg +++ b/src/test/ref/var-register-noarg.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/var-register-noarg.log b/src/test/ref/var-register-noarg.log index 9d62a3801..5fa4a6142 100644 --- a/src/test/ref/var-register-noarg.log +++ b/src/test/ref/var-register-noarg.log @@ -9,6 +9,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte[]) MSG#0 ← (const string) $0 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (number) 0 to:main::@1 @@ -110,6 +112,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/var-register-zp-3.cfg b/src/test/ref/var-register-zp-3.cfg index dc71d46eb..2ed72c8be 100644 --- a/src/test/ref/var-register-zp-3.cfg +++ b/src/test/ref/var-register-zp-3.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print2 @@ -14,6 +16,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [6] return to:@return + +(void()) print2((byte*) print2::at , (byte*) print2::msg) print2: scope:[print2] from main [7] phi() to:print2::@1 @@ -37,6 +41,8 @@ print2::@3: scope:[print2] from print2::@2 [15] (byte) print2::j#1 ← (byte) print2::j#2 + (byte) 2 [16] (byte) print2::i#1 ← ++ (byte) print2::i#2 to:print2::@1 + +(void()) print_char((byte*) print_char::at , (byte) print_char::idx , (byte) print_char::ch) print_char: scope:[print_char] from print2::@2 [17] (byte) print_char::idx#1 ← phi( print2::@2/(byte) print_char::idx#0 ) [17] (byte*) print_char::at#1 ← phi( print2::@2/(byte*) print_char::at#0 ) diff --git a/src/test/ref/var-register-zp-3.log b/src/test/ref/var-register-zp-3.log index 73c32878f..b5ae710f3 100644 --- a/src/test/ref/var-register-zp-3.log +++ b/src/test/ref/var-register-zp-3.log @@ -11,6 +11,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (byte*) screen#0 ← ((byte*)) (number) $400 to:@3 + +(void()) main() main: scope:[main] from @3 (byte*) print2::at#0 ← (byte*) screen#0 (byte*) print2::msg#0 ← (const string) main::msg @@ -21,6 +23,8 @@ main::@1: scope:[main] from main main::@return: scope:[main] from main::@1 return to:@return + +(void()) print2((byte*) print2::at , (byte*) print2::msg) print2: scope:[print2] from main (byte*) print2::at#3 ← phi( main/(byte*) print2::at#0 ) (byte*) print2::msg#3 ← phi( main/(byte*) print2::msg#0 ) @@ -56,6 +60,8 @@ print2::@7: scope:[print2] from print2::@2 print2::@return: scope:[print2] from print2::@1 return to:@return + +(void()) print_char((byte*) print_char::at , (byte) print_char::idx , (byte) print_char::ch) print_char: scope:[print_char] from print2::@2 (byte) print_char::idx#1 ← phi( print2::@2/(byte) print_char::idx#0 ) (byte*) print_char::at#1 ← phi( print2::@2/(byte*) print_char::at#0 ) @@ -216,6 +222,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print2 @@ -223,6 +231,8 @@ main: scope:[main] from @1 main::@return: scope:[main] from main [6] return to:@return + +(void()) print2((byte*) print2::at , (byte*) print2::msg) print2: scope:[print2] from main [7] phi() to:print2::@1 @@ -246,6 +256,8 @@ print2::@3: scope:[print2] from print2::@2 [15] (byte) print2::j#1 ← (byte) print2::j#2 + (byte) 2 [16] (byte) print2::i#1 ← ++ (byte) print2::i#2 to:print2::@1 + +(void()) print_char((byte*) print_char::at , (byte) print_char::idx , (byte) print_char::ch) print_char: scope:[print_char] from print2::@2 [17] (byte) print_char::idx#1 ← phi( print2::@2/(byte) print_char::idx#0 ) [17] (byte*) print_char::at#1 ← phi( print2::@2/(byte*) print_char::at#0 ) diff --git a/src/test/ref/var-register-zp.cfg b/src/test/ref/var-register-zp.cfg index 3f8b10119..25a89fc2e 100644 --- a/src/test/ref/var-register-zp.cfg +++ b/src/test/ref/var-register-zp.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/var-register-zp.log b/src/test/ref/var-register-zp.log index 6c9392cd5..a101965ad 100644 --- a/src/test/ref/var-register-zp.log +++ b/src/test/ref/var-register-zp.log @@ -10,6 +10,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (signed word*) SCREEN#0 ← ((signed word*)) (number) $400 to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (number) 0 (signed word) main::j#0 ← (number) 0 @@ -147,6 +149,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/var-register.cfg b/src/test/ref/var-register.cfg index 40f434dbe..539e4594c 100644 --- a/src/test/ref/var-register.cfg +++ b/src/test/ref/var-register.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -40,6 +42,8 @@ main::@5: scope:[main] from main::@4 main::@return: scope:[main] from main::@5 [18] return to:@return + +(void()) print((byte) print::idx , (byte) print::val) print: scope:[print] from main::@3 [19] (byte) print::idx#1 ← phi( main::@3/(byte) print::idx#0 ) [20] *((const byte*) print::SCREEN#0 + (byte) print::idx#1) ← (byte) print::val#0 diff --git a/src/test/ref/var-register.log b/src/test/ref/var-register.log index c74633d39..1d030cae9 100644 --- a/src/test/ref/var-register.log +++ b/src/test/ref/var-register.log @@ -5,6 +5,8 @@ Culled Empty Block (label) @1 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@2 + +(void()) main() main: scope:[main] from @2 (byte) main::x#0 ← (byte) 0 to:main::@1 @@ -51,6 +53,8 @@ main::@5: scope:[main] from main::@4 main::@return: scope:[main] from main::@5 return to:@return + +(void()) print((byte) print::idx , (byte) print::val) print: scope:[print] from main::@3 (byte) print::idx#1 ← phi( main::@3/(byte) print::idx#0 ) (byte) print::val#1 ← phi( main::@3/(byte) print::val#0 ) @@ -207,6 +211,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -240,6 +246,8 @@ main::@5: scope:[main] from main::@4 main::@return: scope:[main] from main::@5 [18] return to:@return + +(void()) print((byte) print::idx , (byte) print::val) print: scope:[print] from main::@3 [19] (byte) print::idx#1 ← phi( main::@3/(byte) print::idx#0 ) [20] *((const byte*) print::SCREEN#0 + (byte) print::idx#1) ← (byte) print::val#0 diff --git a/src/test/ref/void-parameter.cfg b/src/test/ref/void-parameter.cfg index ed47be5a8..625ff3d63 100644 --- a/src/test/ref/void-parameter.cfg +++ b/src/test/ref/void-parameter.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print @@ -22,6 +24,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [10] return to:@return + +(void()) print() print: scope:[print] from main main::@1 main::@2 [11] (byte) idx#12 ← phi( main/(byte) 0 main::@1/(byte) idx#13 main::@2/(byte) idx#13 ) [12] *((const byte*) SCREEN#0 + (byte) idx#12) ← (byte) '.' diff --git a/src/test/ref/void-parameter.log b/src/test/ref/void-parameter.log index 852e2eb2f..032c078f6 100644 --- a/src/test/ref/void-parameter.log +++ b/src/test/ref/void-parameter.log @@ -2,6 +2,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @2 (byte) idx#15 ← phi( @2/(byte) idx#16 ) call print @@ -29,6 +31,8 @@ main::@return: scope:[main] from main::@3 (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte) idx#4 ← (number) 0 to:@2 + +(void()) print() print: scope:[print] from main main::@1 main::@2 (byte) idx#12 ← phi( main/(byte) idx#15 main::@1/(byte) idx#0 main::@2/(byte) idx#1 ) *((byte*) SCREEN#0 + (byte) idx#12) ← (byte) '.' @@ -148,6 +152,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call print @@ -163,6 +169,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [10] return to:@return + +(void()) print() print: scope:[print] from main main::@1 main::@2 [11] (byte) idx#12 ← phi( main/(byte) 0 main::@1/(byte) idx#13 main::@2/(byte) idx#13 ) [12] *((const byte*) SCREEN#0 + (byte) idx#12) ← (byte) '.' diff --git a/src/test/ref/voronoi.cfg b/src/test/ref/voronoi.cfg index 47c5d7d21..ce046d433 100644 --- a/src/test/ref/voronoi.cfg +++ b/src/test/ref/voronoi.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call initscreen @@ -19,6 +21,8 @@ main::@2: scope:[main] from main::@1 [8] phi() [9] call animate to:main::@1 + +(void()) animate() animate: scope:[animate] from main::@2 [10] (byte~) animate::$0 ← *((const byte[]) XPOS#0) + (byte) 1 [11] *((const byte[]) XPOS#0) ← (byte~) animate::$0 @@ -69,6 +73,8 @@ animate::@10: scope:[animate] from animate::@9 animate::@return: scope:[animate] from animate::@10 animate::@4 animate::@9 [35] return to:@return + +(void()) render() render: scope:[render] from main::@1 [36] phi() to:render::@1 @@ -97,6 +103,8 @@ render::@3: scope:[render] from render::@4 render::@return: scope:[render] from render::@3 [50] return to:@return + +(byte()) findcol((byte) findcol::x , (byte) findcol::y) findcol: scope:[findcol] from render::@2 [51] phi() to:findcol::@1 @@ -155,6 +163,8 @@ findcol::@6: scope:[findcol] from findcol::@5 findcol::@4: scope:[findcol] from findcol::@3 [75] (byte) findcol::diff#1 ← (byte) findcol::xp#0 - (byte) findcol::x#0 to:findcol::@5 + +(void()) initscreen() initscreen: scope:[initscreen] from main [76] phi() to:initscreen::@1 diff --git a/src/test/ref/voronoi.log b/src/test/ref/voronoi.log index 93e481224..6f3fa5dcc 100644 --- a/src/test/ref/voronoi.log +++ b/src/test/ref/voronoi.log @@ -33,6 +33,8 @@ CONTROL FLOW GRAPH SSA (byte[]) YPOS#0 ← { (number) 5, (number) 8, (number) $e, (number) 2, (number) $11, (number) $16 } (byte[]) COLS#0 ← { (number) 1, (number) 2, (number) 3, (number) 4, (number) 5, (number) 7 } to:@5 + +(void()) main() main: scope:[main] from @5 call initscreen to:main::@3 @@ -50,6 +52,8 @@ main::@5: scope:[main] from main::@4 main::@return: scope:[main] from main::@5 return to:@return + +(void()) animate() animate: scope:[animate] from main::@4 (number~) animate::$0 ← *((byte[]) XPOS#0 + (number) 0) + (number) 1 *((byte[]) XPOS#0 + (number) 0) ← (number~) animate::$0 @@ -112,6 +116,8 @@ animate::@11: scope:[animate] from animate::@10 animate::@return: scope:[animate] from animate::@10 animate::@11 animate::@4 return to:@return + +(void()) initscreen() initscreen: scope:[initscreen] from main (byte*) initscreen::screen#0 ← (byte*) SCREEN#0 to:initscreen::@1 @@ -129,6 +135,8 @@ initscreen::@2: scope:[initscreen] from initscreen::@1 initscreen::@return: scope:[initscreen] from initscreen::@1 return to:@return + +(void()) render() render: scope:[render] from main::@1 (byte*) render::colline#0 ← (byte*) COLORS#0 (byte) render::y#0 ← (byte) 0 @@ -171,6 +179,8 @@ render::@3: scope:[render] from render::@5 render::@return: scope:[render] from render::@3 return to:@return + +(byte()) findcol((byte) findcol::x , (byte) findcol::y) findcol: scope:[findcol] from render::@2 (byte) findcol::y#10 ← phi( render::@2/(byte) findcol::y#0 ) (byte) findcol::x#7 ← phi( render::@2/(byte) findcol::x#0 ) @@ -1026,6 +1036,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() [5] call initscreen @@ -1038,6 +1050,8 @@ main::@2: scope:[main] from main::@1 [8] phi() [9] call animate to:main::@1 + +(void()) animate() animate: scope:[animate] from main::@2 [10] (byte~) animate::$0 ← *((const byte[]) XPOS#0) + (byte) 1 [11] *((const byte[]) XPOS#0) ← (byte~) animate::$0 @@ -1088,6 +1102,8 @@ animate::@10: scope:[animate] from animate::@9 animate::@return: scope:[animate] from animate::@10 animate::@4 animate::@9 [35] return to:@return + +(void()) render() render: scope:[render] from main::@1 [36] phi() to:render::@1 @@ -1116,6 +1132,8 @@ render::@3: scope:[render] from render::@4 render::@return: scope:[render] from render::@3 [50] return to:@return + +(byte()) findcol((byte) findcol::x , (byte) findcol::y) findcol: scope:[findcol] from render::@2 [51] phi() to:findcol::@1 @@ -1174,6 +1192,8 @@ findcol::@6: scope:[findcol] from findcol::@5 findcol::@4: scope:[findcol] from findcol::@3 [75] (byte) findcol::diff#1 ← (byte) findcol::xp#0 - (byte) findcol::x#0 to:findcol::@5 + +(void()) initscreen() initscreen: scope:[initscreen] from main [76] phi() to:initscreen::@1 diff --git a/src/test/ref/wfragment1.cfg b/src/test/ref/wfragment1.cfg index 12275da3d..2c1db54a7 100644 --- a/src/test/ref/wfragment1.cfg +++ b/src/test/ref/wfragment1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -22,6 +24,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [10] return to:@return + +(bool()) move_enemy((byte) move_enemy::obj_slot) move_enemy: scope:[move_enemy] from main::@1 [11] (byte~) move_enemy::$0 ← (byte) move_enemy::obj_slot#0 << (byte) 1 [12] *((const word[MAX_OBJECTS#0]) OBJ_WORLD_X#0 + (byte~) move_enemy::$0) ← *((const word[MAX_OBJECTS#0]) OBJ_WORLD_X#0 + (byte~) move_enemy::$0) - (byte) 1 diff --git a/src/test/ref/wfragment1.log b/src/test/ref/wfragment1.log index 1d50beaab..a1934ee03 100644 --- a/src/test/ref/wfragment1.log +++ b/src/test/ref/wfragment1.log @@ -59,6 +59,8 @@ CONTROL FLOW GRAPH SSA (byte) MAX_OBJECTS#0 ← (number) $10 (word[MAX_OBJECTS#0]) OBJ_WORLD_X#0 ← { fill( MAX_OBJECTS#0, 0) } to:@39 + +(void()) main() main: scope:[main] from @39 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -77,6 +79,8 @@ main::@3: scope:[main] from main::@1 main::@return: scope:[main] from main::@3 return to:@return + +(bool()) move_enemy((byte) move_enemy::obj_slot) move_enemy: scope:[move_enemy] from main::@1 (byte) move_enemy::obj_slot#1 ← phi( main::@1/(byte) move_enemy::obj_slot#0 ) (byte~) move_enemy::$0 ← (byte) move_enemy::obj_slot#1 * (const byte) SIZEOF_WORD @@ -213,6 +217,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -228,6 +234,8 @@ main::@2: scope:[main] from main::@1 main::@return: scope:[main] from main::@2 [10] return to:@return + +(bool()) move_enemy((byte) move_enemy::obj_slot) move_enemy: scope:[move_enemy] from main::@1 [11] (byte~) move_enemy::$0 ← (byte) move_enemy::obj_slot#0 << (byte) 1 [12] *((const word[MAX_OBJECTS#0]) OBJ_WORLD_X#0 + (byte~) move_enemy::$0) ← *((const word[MAX_OBJECTS#0]) OBJ_WORLD_X#0 + (byte~) move_enemy::$0) - (byte) 1 diff --git a/src/test/ref/word-array-0.cfg b/src/test/ref/word-array-0.cfg index 32b51f63d..6c4bc9ae0 100644 --- a/src/test/ref/word-array-0.cfg +++ b/src/test/ref/word-array-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (word) main::w1#0 ← *((const word[3]) main::words#0+(byte) 1*(const byte) SIZEOF_WORD) [5] (byte~) main::$0 ← < (word) main::w1#0 diff --git a/src/test/ref/word-array-0.log b/src/test/ref/word-array-0.log index 18ad857d6..ac7f439d6 100644 --- a/src/test/ref/word-array-0.log +++ b/src/test/ref/word-array-0.log @@ -4,6 +4,8 @@ Fixing pointer array-indexing *((word[3]) main::words + (number) 2) CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400+(number) 6*(number) $28 (word[3]) main::words#0 ← ((word[3])) (number) $400 @@ -126,6 +128,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (word) main::w1#0 ← *((const word[3]) main::words#0+(byte) 1*(const byte) SIZEOF_WORD) [5] (byte~) main::$0 ← < (word) main::w1#0 diff --git a/src/test/ref/word-array-1.cfg b/src/test/ref/word-array-1.cfg index 666543c27..5b8369469 100644 --- a/src/test/ref/word-array-1.cfg +++ b/src/test/ref/word-array-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/word-array-1.log b/src/test/ref/word-array-1.log index 8a38d7e3d..2dba42737 100644 --- a/src/test/ref/word-array-1.log +++ b/src/test/ref/word-array-1.log @@ -4,6 +4,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (word[]) main::words#0 ← { (number) $3031, (number) $3233, (number) $3435, (number) $3637 } (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 @@ -138,6 +140,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/word-array-2.cfg b/src/test/ref/word-array-2.cfg index 65f6bea81..ca3c26410 100644 --- a/src/test/ref/word-array-2.cfg +++ b/src/test/ref/word-array-2.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/word-array-2.log b/src/test/ref/word-array-2.log index 95cf0b7f9..f020fc413 100644 --- a/src/test/ref/word-array-2.log +++ b/src/test/ref/word-array-2.log @@ -6,6 +6,8 @@ CONTROL FLOW GRAPH SSA @begin: scope:[] from (word[$100]) words#0 ← { fill( $100, 0) } to:@1 + +(void()) main() main: scope:[main] from @1 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -162,6 +164,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/word-pointer-compound.cfg b/src/test/ref/word-pointer-compound.cfg index 1fcd28067..0dcfd8929 100644 --- a/src/test/ref/word-pointer-compound.cfg +++ b/src/test/ref/word-pointer-compound.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/word-pointer-compound.log b/src/test/ref/word-pointer-compound.log index 9bb0e34a0..2a724b6c7 100644 --- a/src/test/ref/word-pointer-compound.log +++ b/src/test/ref/word-pointer-compound.log @@ -10,6 +10,8 @@ Fixing pointer array-indexing *((word[]) main::words + (number) 2) CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (word[]) main::words#0 ← { (number) $3031, (number) $3233, (number) $3435 } (byte) main::i#0 ← (byte) 0 @@ -235,6 +237,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/word-pointer-iteration-0.cfg b/src/test/ref/word-pointer-iteration-0.cfg index 7d5d6a6cc..1d045cb81 100644 --- a/src/test/ref/word-pointer-iteration-0.cfg +++ b/src/test/ref/word-pointer-iteration-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte~) main::$0 ← < *((word*) 1024+(const byte) SIZEOF_WORD) [5] *((const byte*) main::SCREEN#0) ← (byte~) main::$0 diff --git a/src/test/ref/word-pointer-iteration-0.log b/src/test/ref/word-pointer-iteration-0.log index 9671cdab5..42cf22ba6 100644 --- a/src/test/ref/word-pointer-iteration-0.log +++ b/src/test/ref/word-pointer-iteration-0.log @@ -5,6 +5,8 @@ Fixing pointer decrement (word*) main::wp ← -- (word*) main::wp CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400+(number) $28*(number) 6 (word*) main::wp#0 ← ((word*)) (number) $400 @@ -139,6 +141,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (byte~) main::$0 ← < *((word*) 1024+(const byte) SIZEOF_WORD) [5] *((const byte*) main::SCREEN#0) ← (byte~) main::$0 diff --git a/src/test/ref/word-pointer-iteration.cfg b/src/test/ref/word-pointer-iteration.cfg index adbc2a988..80cc7ecd2 100644 --- a/src/test/ref/word-pointer-iteration.cfg +++ b/src/test/ref/word-pointer-iteration.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/word-pointer-iteration.log b/src/test/ref/word-pointer-iteration.log index ccff8b3e4..fcea497fd 100644 --- a/src/test/ref/word-pointer-iteration.log +++ b/src/test/ref/word-pointer-iteration.log @@ -4,6 +4,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (word[]) main::words#0 ← { (number) $3130, (number) $3332, (number) $3534, (number) $3736 } (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 @@ -142,6 +144,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/word-pointer-math-0.cfg b/src/test/ref/word-pointer-math-0.cfg index c7d1a1916..0f8ca8e47 100644 --- a/src/test/ref/word-pointer-math-0.cfg +++ b/src/test/ref/word-pointer-math-0.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (word) main::w1#0 ← *((const word*) main::words#0+(byte) 1*(const byte) SIZEOF_WORD) [5] (byte~) main::$1 ← < (word) main::w1#0 diff --git a/src/test/ref/word-pointer-math-0.log b/src/test/ref/word-pointer-math-0.log index f2005b359..8b3749667 100644 --- a/src/test/ref/word-pointer-math-0.log +++ b/src/test/ref/word-pointer-math-0.log @@ -5,6 +5,8 @@ Identified constant variable (word*) main::words CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (word*) main::words#0 ← ((word*)) (number) $400 (byte*) main::SCREEN#0 ← ((byte*)) (number) $400+(number) 6*(number) $28 @@ -137,6 +139,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (word) main::w1#0 ← *((const word*) main::words#0+(byte) 1*(const byte) SIZEOF_WORD) [5] (byte~) main::$1 ← < (word) main::w1#0 diff --git a/src/test/ref/word-pointer-math-1.cfg b/src/test/ref/word-pointer-math-1.cfg index 85ffab70b..a3ef63eb3 100644 --- a/src/test/ref/word-pointer-math-1.cfg +++ b/src/test/ref/word-pointer-math-1.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const word*) main::SCREEN#0) ← (const word) main::wd#0 to:main::@return diff --git a/src/test/ref/word-pointer-math-1.log b/src/test/ref/word-pointer-math-1.log index ef7b629c8..1663ade9e 100644 --- a/src/test/ref/word-pointer-math-1.log +++ b/src/test/ref/word-pointer-math-1.log @@ -5,6 +5,8 @@ Identified constant variable (word*) main::w2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (word*) main::w1#0 ← ((word*)) (number) $1000 (word*) main::w2#0 ← ((word*)) (number) $1140 @@ -91,6 +93,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] *((const word*) main::SCREEN#0) ← (const word) main::wd#0 to:main::@return diff --git a/src/test/ref/word-pointer-math.cfg b/src/test/ref/word-pointer-math.cfg index 32e17b495..e1aed364b 100644 --- a/src/test/ref/word-pointer-math.cfg +++ b/src/test/ref/word-pointer-math.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/word-pointer-math.log b/src/test/ref/word-pointer-math.log index c7861bb21..f59c396cd 100644 --- a/src/test/ref/word-pointer-math.log +++ b/src/test/ref/word-pointer-math.log @@ -4,6 +4,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (word[]) main::words#0 ← { (number) $3130, (number) $3332, (number) $3534, (number) $3736 } (byte*) main::SCREEN#0 ← ((byte*)) (number) $400 @@ -144,6 +146,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/wordexpr.cfg b/src/test/ref/wordexpr.cfg index b4c3c6701..995307da9 100644 --- a/src/test/ref/wordexpr.cfg +++ b/src/test/ref/wordexpr.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/wordexpr.log b/src/test/ref/wordexpr.log index 724fb7aa9..dbdf90dc7 100644 --- a/src/test/ref/wordexpr.log +++ b/src/test/ref/wordexpr.log @@ -3,6 +3,8 @@ Culled Empty Block (label) main::@2 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (word) main::b#0 ← (number) 0 (byte) main::i#0 ← (byte) 0 @@ -106,6 +108,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/zeropage-detect-advanced.cfg b/src/test/ref/zeropage-detect-advanced.cfg index 9c8a5b8cd..fe3cfc47e 100644 --- a/src/test/ref/zeropage-detect-advanced.cfg +++ b/src/test/ref/zeropage-detect-advanced.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (dword) main::t#0 ← (dword) 0 [5] *((byte*) 1024) ← *((const byte*) main::c#0) diff --git a/src/test/ref/zeropage-detect-advanced.log b/src/test/ref/zeropage-detect-advanced.log index d7d70f179..8eeca59f4 100644 --- a/src/test/ref/zeropage-detect-advanced.log +++ b/src/test/ref/zeropage-detect-advanced.log @@ -3,6 +3,8 @@ Setting inferred volatile on symbol affected by address-of (dword*~) main::$0 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (dword) main::t#0 ← (dword) 0 (dword*~) main::$0 ← & (dword) main::t#0 @@ -86,6 +88,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] (dword) main::t#0 ← (dword) 0 [5] *((byte*) 1024) ← *((const byte*) main::c#0) diff --git a/src/test/ref/zeropage-sinus.cfg b/src/test/ref/zeropage-sinus.cfg index ff2d272ba..2626eeeb3 100644 --- a/src/test/ref/zeropage-sinus.cfg +++ b/src/test/ref/zeropage-sinus.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) SPRITES_ENABLE#0) ← (byte) 1 @@ -30,12 +32,16 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [16] return to:@return + +(void()) restoreZeropage() restoreZeropage: scope:[restoreZeropage] from main::@3 asm { ldx#0 !: ldaZP_STORAGE,x sta$00,x inx bne!- } to:restoreZeropage::@return restoreZeropage::@return: scope:[restoreZeropage] from restoreZeropage [18] return to:@return + +(void()) animSprite() animSprite: scope:[animSprite] from main::@2 kickasm() {{ ldx #$00 repeat: @@ -62,12 +68,16 @@ animSprite: scope:[animSprite] from main::@2 animSprite::@return: scope:[animSprite] from animSprite [20] return to:@return + +(void()) sinZeropage() sinZeropage: scope:[sinZeropage] from main::@1 asm { ldx#0 !: ldaSINTABLE,x sta$00,x inx bne!- } to:sinZeropage::@return sinZeropage::@return: scope:[sinZeropage] from sinZeropage [22] return to:@return + +(void()) saveZeropage() saveZeropage: scope:[saveZeropage] from main asm { ldx#0 !: lda$00,x staZP_STORAGE,x inx bne!- } to:saveZeropage::@return diff --git a/src/test/ref/zeropage-sinus.log b/src/test/ref/zeropage-sinus.log index f4608d6f8..b7d0d1e84 100644 --- a/src/test/ref/zeropage-sinus.log +++ b/src/test/ref/zeropage-sinus.log @@ -22,6 +22,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte[$40]) SPRITE#0 ← kickasm {{ .fill $40,$ff }} to:@9 + +(void()) main() main: scope:[main] from @9 asm { sei } *((byte*) SPRITES_ENABLE#0) ← (number) 1 @@ -47,24 +49,32 @@ main::@4: scope:[main] from main::@3 main::@return: scope:[main] from main::@4 return to:@return + +(void()) saveZeropage() saveZeropage: scope:[saveZeropage] from main asm { ldx#0 !: lda$00,x staZP_STORAGE,x inx bne!- } to:saveZeropage::@return saveZeropage::@return: scope:[saveZeropage] from saveZeropage return to:@return + +(void()) restoreZeropage() restoreZeropage: scope:[restoreZeropage] from main::@3 asm { ldx#0 !: ldaZP_STORAGE,x sta$00,x inx bne!- } to:restoreZeropage::@return restoreZeropage::@return: scope:[restoreZeropage] from restoreZeropage return to:@return + +(void()) sinZeropage() sinZeropage: scope:[sinZeropage] from main::@1 asm { ldx#0 !: ldaSINTABLE,x sta$00,x inx bne!- } to:sinZeropage::@return sinZeropage::@return: scope:[sinZeropage] from sinZeropage return to:@return + +(void()) animSprite() animSprite: scope:[animSprite] from main::@2 kickasm() {{ ldx #$00 repeat: @@ -242,6 +252,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 asm { sei } [5] *((const byte*) SPRITES_ENABLE#0) ← (byte) 1 @@ -265,12 +277,16 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [16] return to:@return + +(void()) restoreZeropage() restoreZeropage: scope:[restoreZeropage] from main::@3 asm { ldx#0 !: ldaZP_STORAGE,x sta$00,x inx bne!- } to:restoreZeropage::@return restoreZeropage::@return: scope:[restoreZeropage] from restoreZeropage [18] return to:@return + +(void()) animSprite() animSprite: scope:[animSprite] from main::@2 kickasm() {{ ldx #$00 repeat: @@ -297,12 +313,16 @@ animSprite: scope:[animSprite] from main::@2 animSprite::@return: scope:[animSprite] from animSprite [20] return to:@return + +(void()) sinZeropage() sinZeropage: scope:[sinZeropage] from main::@1 asm { ldx#0 !: ldaSINTABLE,x sta$00,x inx bne!- } to:sinZeropage::@return sinZeropage::@return: scope:[sinZeropage] from sinZeropage [22] return to:@return + +(void()) saveZeropage() saveZeropage: scope:[saveZeropage] from main asm { ldx#0 !: lda$00,x staZP_STORAGE,x inx bne!- } to:saveZeropage::@return diff --git a/src/test/ref/zpparammin.cfg b/src/test/ref/zpparammin.cfg index 38a041c66..92cbb54dc 100644 --- a/src/test/ref/zpparammin.cfg +++ b/src/test/ref/zpparammin.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -36,6 +38,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [22] return to:@return + +(byte()) sum2((byte) sum2::a , (byte) sum2::b , (byte) sum2::c) sum2: scope:[sum2] from main::@2 [23] (byte~) sum2::$0 ← (byte) sum2::a#0 + (byte) sum2::b#0 [24] (byte) sum2::return#1 ← (byte~) sum2::$0 + (byte) sum2::c#0 @@ -43,6 +47,8 @@ sum2: scope:[sum2] from main::@2 sum2::@return: scope:[sum2] from sum2 [25] return to:@return + +(byte()) sum((byte) sum::a , (byte) sum::b , (byte) sum::c) sum: scope:[sum] from main::@1 [26] (byte~) sum::$0 ← (byte) sum::a#0 + (byte) sum::b#0 [27] (byte) sum::return#1 ← (byte~) sum::$0 + (byte) sum::c#0 diff --git a/src/test/ref/zpparammin.log b/src/test/ref/zpparammin.log index bac70cdab..fd53a4616 100644 --- a/src/test/ref/zpparammin.log +++ b/src/test/ref/zpparammin.log @@ -11,6 +11,8 @@ CONTROL FLOW GRAPH SSA (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte*) SCREEN2#0 ← ((byte*)) (number) $400+(number) $28 to:@3 + +(void()) main() main: scope:[main] from @3 (byte) main::i#0 ← (byte) 0 to:main::@1 @@ -49,6 +51,8 @@ main::@4: scope:[main] from main::@3 main::@return: scope:[main] from main::@4 return to:@return + +(byte()) sum((byte) sum::a , (byte) sum::b , (byte) sum::c) sum: scope:[sum] from main::@1 (byte) sum::c#1 ← phi( main::@1/(byte) sum::c#0 ) (byte) sum::b#1 ← phi( main::@1/(byte) sum::b#0 ) @@ -62,6 +66,8 @@ sum::@return: scope:[sum] from sum (byte) sum::return#2 ← (byte) sum::return#4 return to:@return + +(byte()) sum2((byte) sum2::a , (byte) sum2::b , (byte) sum2::c) sum2: scope:[sum2] from main::@3 (byte) sum2::c#1 ← phi( main::@3/(byte) sum2::c#0 ) (byte) sum2::b#1 ← phi( main::@3/(byte) sum2::b#0 ) @@ -244,6 +250,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 @@ -273,6 +281,8 @@ main::@3: scope:[main] from main::@2 main::@return: scope:[main] from main::@3 [22] return to:@return + +(byte()) sum2((byte) sum2::a , (byte) sum2::b , (byte) sum2::c) sum2: scope:[sum2] from main::@2 [23] (byte~) sum2::$0 ← (byte) sum2::a#0 + (byte) sum2::b#0 [24] (byte) sum2::return#1 ← (byte~) sum2::$0 + (byte) sum2::c#0 @@ -280,6 +290,8 @@ sum2: scope:[sum2] from main::@2 sum2::@return: scope:[sum2] from sum2 [25] return to:@return + +(byte()) sum((byte) sum::a , (byte) sum::b , (byte) sum::c) sum: scope:[sum] from main::@1 [26] (byte~) sum::$0 ← (byte) sum::a#0 + (byte) sum::b#0 [27] (byte) sum::return#1 ← (byte~) sum::$0 + (byte) sum::c#0 diff --git a/src/test/ref/zpptr.cfg b/src/test/ref/zpptr.cfg index 36228cc4e..56e224a64 100644 --- a/src/test/ref/zpptr.cfg +++ b/src/test/ref/zpptr.cfg @@ -7,6 +7,8 @@ to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1 diff --git a/src/test/ref/zpptr.log b/src/test/ref/zpptr.log index 5dba8ea59..f3619b708 100644 --- a/src/test/ref/zpptr.log +++ b/src/test/ref/zpptr.log @@ -4,6 +4,8 @@ Culled Empty Block (label) main::@6 CONTROL FLOW GRAPH SSA @begin: scope:[] from to:@1 + +(void()) main() main: scope:[main] from @1 (byte*) main::zpptr#0 ← ((byte*)) (number) $1000 (byte) main::j#0 ← (byte) 0 @@ -184,6 +186,8 @@ FINAL CONTROL FLOW GRAPH to:@end @end: scope:[] from @1 [3] phi() + +(void()) main() main: scope:[main] from @1 [4] phi() to:main::@1