1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-26 12:49:21 +00:00

Expanded DuplicateRValueIdentification to also find RValues in different blocks as long as the scope is the same and the first block dominates the last block. Closes #525

This commit is contained in:
Jesper Gravgaard 2020-10-01 00:18:56 +02:00
parent e92f72e490
commit 1e0d21d06e
51 changed files with 13636 additions and 14102 deletions

View File

@ -18504,3 +18504,90 @@ sta {c1}+1,y
ldy {z1}
dey
dey
//FRAGMENT _deref_(_deref_qbuc1)=pbuc2_derefidx_vbuz1
ldy {z1}
lda {c2},y
ldy {c1}
sty $fe
ldy {c1}+1
sty $ff
ldy #0
sta ($fe),y
//FRAGMENT _deref_(_deref_qbuc1)=pbuc2_derefidx_vbuaa
tay
lda {c2},y
ldy {c1}
sty $fe
ldy {c1}+1
sty $ff
ldy #0
sta ($fe),y
//FRAGMENT _deref_(_deref_qbuc1)=pbuc2_derefidx_vbuxx
lda {c2},x
ldy {c1}
sty $fe
ldy {c1}+1
sty $ff
ldy #0
sta ($fe),y
//FRAGMENT _deref_(_deref_qbuc1)=pbuc2_derefidx_vbuyy
lda {c2},y
ldy {c1}
sty $fe
ldy {c1}+1
sty $ff
ldy #0
sta ($fe),y
//FRAGMENT vbuz1=_deref_pbuc1_ror_1
lda {c1}
lsr
sta {z1}
//FRAGMENT vwuz1_ge_pwuc1_derefidx_vbuz2_then_la1
ldy {z2}
lda {c1}+1,y
cmp {z1}+1
bne !+
lda {c1},y
cmp {z1}
beq {la1}
!:
bcc {la1}
//FRAGMENT vbuaa=_deref_pbuc1_ror_1
lda {c1}
lsr
//FRAGMENT vbuxx=_deref_pbuc1_ror_1
lda {c1}
lsr
tax
//FRAGMENT vbuyy=_deref_pbuc1_ror_1
lda {c1}
lsr
tay
//FRAGMENT vwuz1_ge_pwuc1_derefidx_vbuaa_then_la1
tay
lda {c1}+1,y
cmp {z1}+1
bne !+
lda {c1},y
cmp {z1}
beq {la1}
!:
bcc {la1}
//FRAGMENT vwuz1_ge_pwuc1_derefidx_vbuxx_then_la1
lda {c1}+1,x
cmp {z1}+1
bne !+
lda {c1},x
cmp {z1}
beq {la1}
!:
bcc {la1}
//FRAGMENT vwuz1_ge_pwuc1_derefidx_vbuyy_then_la1
lda {c1}+1,y
cmp {z1}+1
bne !+
lda {c1},y
cmp {z1}
beq {la1}
!:
bcc {la1}

View File

@ -55,11 +55,11 @@ public class Pass2DuplicateRValueIdentification extends Pass2SsaOptimization {
duplicate |= deduplicateRValue(otherRValue, thisRValue);
} else if(thisDominators.contains(otherRValue.block.getLabel())) {
// The other assignment is guaranteed to be executed before this assignment
if(scopeMatch(thisRValue.rValue1, thisRValue.block) && scopeMatch(thisRValue.rValue2, thisRValue.block))
if(scopeMatch(thisRValue, otherRValue))
duplicate |= deduplicateRValue(otherRValue, thisRValue);
} else if(otherDominators.contains(thisRValue.block.getLabel())) {
// This assignment is guaranteed to be executed before the other assignment
if(scopeMatch(thisRValue.rValue1, thisRValue.block) && scopeMatch(thisRValue.rValue2, thisRValue.block))
if(scopeMatch(thisRValue, otherRValue))
duplicate |= deduplicateRValue(thisRValue, otherRValue);
}
}
@ -76,27 +76,45 @@ public class Pass2DuplicateRValueIdentification extends Pass2SsaOptimization {
return modified;
}
/**
* Check that the scopes match for all involved variables.
*
* @param thisRValue This RValue
* @param otherRValue This duplicate RValue
* @return true if all scopes match
*/
private boolean scopeMatch(AssignmentWithRValue thisRValue, AssignmentWithRValue otherRValue) {
if(!thisRValue.block.getScope().equals(otherRValue.block.getScope()))
return false;
ScopeRef scope = thisRValue.block.getScope();
return
scopeMatch(thisRValue.assignment.getlValue(), scope) &&
scopeMatch(otherRValue.assignment.getlValue(), scope) &&
scopeMatch(thisRValue.rValue1, scope) &&
scopeMatch(thisRValue.rValue2, scope);
}
/**
* Check that the scope of the values inside an RValue matches the scope of a block.
* We only know that a specific variable version has the same value if it is from the same scope as the block.
* Otherwise it might be modified inside some called function.
*
* @param rValue The RValue to examine (may be null)
* @param value The RValue to examine (may be null)
* @param block The block to examine
* @return true if the scope match
*/
private boolean scopeMatch(RValue rValue, ControlFlowBlock block) {
if(rValue == null)
private boolean scopeMatch(Value value, ScopeRef scopeRef) {
if(value == null)
return true;
List<SymbolVariableRef> varRefs = new ArrayList<>();
ProgramValueIterator.execute(new ProgramValue.GenericValue(rValue),
ProgramValueIterator.execute(new ProgramValue.GenericValue(value),
(programValue, currentStmt, stmtIt, currentBlock) -> {
if(programValue.get() instanceof SymbolVariableRef) varRefs.add((SymbolVariableRef) programValue.get());
}
, null, null, null);
for(SymbolVariableRef varRef : varRefs) {
Variable var = getScope().getVariable(varRef);
if(!var.getScope().getRef().equals(block.getScope()))
if(!var.getScope().getRef().equals(scopeRef))
return false;
}
return true;
@ -186,8 +204,6 @@ public class Pass2DuplicateRValueIdentification extends Pass2SsaOptimization {
private boolean isTrivial() {
if(operator == null) return true;
if(operator instanceof OperatorCast) return true;
if(operator.equals(Operators.PLUS)) return true;
if(operator.equals(Operators.MINUS)) return true;
if(operator.equals(Operators.LE)) return true;
if(operator.equals(Operators.LT)) return true;
if(operator.equals(Operators.GE)) return true;
@ -199,6 +215,8 @@ public class Pass2DuplicateRValueIdentification extends Pass2SsaOptimization {
if(operator.equals(Operators.LOGIC_OR)) return true;
if(operator.equals(Operators.HIBYTE)) return true;
if(operator.equals(Operators.LOWBYTE)) return true;
if(operator.equals(Operators.PLUS) && rValue2 instanceof ConstantValue) return true;
if(operator.equals(Operators.PLUS) && rValue1 instanceof ConstantValue) return true;
return false;
}

View File

@ -169,7 +169,7 @@
.label form_vic_bg2_lo = form_fields_val+$21
.label form_vic_bg3_hi = form_fields_val+$22
.label form_vic_bg3_lo = form_fields_val+$23
.label print_char_cursor = $18
.label print_char_cursor = $1a
.label print_line_cursor = 7
.label print_screen = 7
// Keyboard event buffer size. The number of events currently in the event buffer
@ -400,11 +400,13 @@ form_mode: {
// Change graphics mode to show the selected graphics mode
gfx_mode: {
.label __20 = 9
.label __24 = $1d
.label __26 = $1f
.label __22 = $23
.label __24 = $13
.label __26 = $1a
.label __34 = 9
.label __38 = $18
.label __40 = $1a
.label __36 = $1c
.label __38 = $1e
.label __40 = $21
.label __47 = 3
.label __48 = 3
.label __50 = 7
@ -532,15 +534,19 @@ gfx_mode: {
sta.z plane_a+3
// < plane_a
lda.z plane_a
sta.z __22
lda.z plane_a+1
sta.z __22+1
// < < plane_a
lda.z __22
// *DTV_PLANEA_START_LO = < < plane_a
sta DTV_PLANEA_START_LO
// < plane_a
lda.z plane_a
sta.z __24
lda.z plane_a+1
sta.z __24+1
// < < plane_a
lda.z __24
// *DTV_PLANEA_START_LO = < < plane_a
sta DTV_PLANEA_START_LO
// > < plane_a
lda.z __24+1
// *DTV_PLANEA_START_MI = > < plane_a
sta DTV_PLANEA_START_MI
// > plane_a
@ -604,15 +610,19 @@ gfx_mode: {
sta.z plane_b+3
// < plane_b
lda.z plane_b
sta.z __36
lda.z plane_b+1
sta.z __36+1
// < < plane_b
lda.z __36
// *DTV_PLANEB_START_LO = < < plane_b
sta DTV_PLANEB_START_LO
// < plane_b
lda.z plane_b
sta.z __38
lda.z plane_b+1
sta.z __38+1
// < < plane_b
lda.z __38
// *DTV_PLANEB_START_LO = < < plane_b
sta DTV_PLANEB_START_LO
// > < plane_b
lda.z __38+1
// *DTV_PLANEB_START_MI = > < plane_b
sta DTV_PLANEB_START_MI
// > plane_b
@ -1135,7 +1145,7 @@ gfx_init_vic_bitmap: {
}
// Initialize 8BPP Chunky Bitmap (contains 8bpp pixels)
gfx_init_plane_8bppchunky: {
.label __5 = $1d
.label __5 = $23
.label gfxb = 5
.label x = 3
.label y = 2
@ -1523,9 +1533,9 @@ print_cls: {
}
// Print a number of zero-terminated strings, each followed by a newline.
// The sequence of lines is terminated by another zero.
// print_str_lines(byte* zp($1a) str)
// print_str_lines(byte* zp($13) str)
print_str_lines: {
.label str = $1a
.label str = $13
lda.z print_screen
sta.z print_char_cursor
lda.z print_screen+1
@ -1621,7 +1631,7 @@ form_render_values: {
// idx is the ID of the preset
// render_preset_name(byte register(A) idx)
render_preset_name: {
.label name = $1a
.label name = $13
// if(idx==0)
cmp #0
beq __b3
@ -1752,7 +1762,7 @@ render_preset_name: {
// Reads keyboard and allows the user to navigate and change the fields of the form
// Returns 0 if space is not pressed, non-0 if space is pressed
form_control: {
.label field = $1f
.label field = $13
// form_field_ptr(form_field_idx)
ldx.z form_field_idx
jsr form_field_ptr
@ -1889,7 +1899,7 @@ form_control: {
// idx is the ID of the preset
// apply_preset(byte register(A) idx)
apply_preset: {
.label preset = $18
.label preset = $1a
// if(idx==0)
cmp #0
beq __b3
@ -2286,7 +2296,7 @@ get_vic_charset: {
// Handles debounce and only generates events when the status of a key changes.
// Also stores current status of modifiers in keyboard_modifiers.
keyboard_event_scan: {
.label row_scan = $13
.label row_scan = $15
.label keycode = $f
.label row = $d
lda #0
@ -2441,7 +2451,7 @@ keyboard_event_get: {
}
// Initialize the bitmap plotter tables for a specific bitmap
bitmap_init: {
.label __10 = $13
.label __10 = $15
.label yoffs = 7
ldy #$80
ldx #0
@ -2510,7 +2520,7 @@ bitmap_init: {
}
// Clear all graphics on the bitmap
bitmap_clear: {
.label bitmap = $1a
.label bitmap = $13
.label y = $f
// bitmap = (char*) { bitmap_plot_xhi[0], bitmap_plot_xlo[0] }
lda bitmap_plot_xlo
@ -2544,11 +2554,11 @@ bitmap_clear: {
rts
}
// Draw a line on the bitmap
// bitmap_line(byte zp($11) x0, byte zp($13) x1, byte register(X) y0, byte zp($10) y1)
// bitmap_line(byte zp($11) x0, byte zp($15) x1, byte register(X) y0, byte zp($10) y1)
bitmap_line: {
.label xd = $f
.label x0 = $11
.label x1 = $13
.label x1 = $15
.label y1 = $10
// if(x0<x1)
lda.z x0
@ -2689,11 +2699,11 @@ dtvSetCpuBankSegment1: {
// Initialize 320*200 1bpp pixel ($2000) plane with identical bytes
// gfx_init_plane_fill(dword zp(9) plane_addr, byte zp($10) fill)
gfx_init_plane_fill: {
.label __0 = $14
.label __1 = $18
.label __4 = $1a
.label __5 = $1a
.label gfxb = $1a
.label __0 = $16
.label __1 = $1a
.label __4 = $13
.label __5 = $13
.label gfxb = $13
.label by = $12
.label plane_addr = 9
.label fill = $10
@ -2774,13 +2784,13 @@ gfx_init_plane_fill: {
rts
}
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
// memset(void* zp($18) str)
// memset(void* zp($1a) str)
memset: {
.const c = ' '
.const num = $3e8
.label end = $1a
.label dst = $18
.label str = $18
.label end = $1c
.label dst = $1a
.label str = $1a
// end = (char*)str + num
lda.z str
clc
@ -2852,9 +2862,9 @@ print_ln: {
// field_idx is the index of the field to get the screen address for
// form_field_ptr(byte register(X) field_idx)
form_field_ptr: {
.label line = $1d
.label x = $1c
.label return = $1f
.label line = $1e
.label x = $20
.label return = $13
// y = form_fields_y[field_idx]
ldy form_fields_y,x
// line = (byte*) { form_line_hi[y], form_line_lo[y] }
@ -2876,10 +2886,10 @@ form_field_ptr: {
rts
}
// Print a string at a specific screen position
// print_str_at(byte* zp($1a) str, byte* zp($18) at)
// print_str_at(byte* zp($13) str, byte* zp($1a) at)
print_str_at: {
.label at = $18
.label str = $1a
.label at = $1a
.label str = $13
lda #<FORM_SCREEN+$28*2+$a
sta.z at
lda #>FORM_SCREEN+$28*2+$a
@ -2928,7 +2938,7 @@ keyboard_matrix_read: {
// Returns 0 is not pressed and non-0 if pressed
// keyboard_event_pressed(byte zp($12) keycode)
keyboard_event_pressed: {
.label row_bits = $1c
.label row_bits = $20
.label keycode = $12
// keycode>>3
lda.z keycode
@ -2956,7 +2966,7 @@ bitmap_line_ydxi: {
.label y1 = $10
.label yd = $d
.label xd = $f
.label e = $13
.label e = $15
// e = xd>>1
lda.z xd
lsr
@ -2994,10 +3004,10 @@ bitmap_line_ydxi: {
// }
rts
}
// bitmap_line_xdyi(byte zp($e) x, byte register(X) y, byte zp($13) x1, byte zp($f) xd, byte zp($d) yd)
// bitmap_line_xdyi(byte zp($e) x, byte register(X) y, byte zp($15) x1, byte zp($f) xd, byte zp($d) yd)
bitmap_line_xdyi: {
.label x = $e
.label x1 = $13
.label x1 = $15
.label xd = $f
.label yd = $d
.label e = $12
@ -3045,7 +3055,7 @@ bitmap_line_ydxd: {
.label y1 = $10
.label yd = $12
.label xd = $f
.label e = $1c
.label e = $20
// e = xd>>1
lda.z xd
lsr
@ -3083,9 +3093,9 @@ bitmap_line_ydxd: {
// }
rts
}
// bitmap_line_xdyd(byte zp($1c) x, byte register(X) y, byte zp($11) x1, byte zp($f) xd, byte zp($e) yd)
// bitmap_line_xdyd(byte zp($20) x, byte register(X) y, byte zp($11) x1, byte zp($f) xd, byte zp($e) yd)
bitmap_line_xdyd: {
.label x = $1c
.label x = $20
.label x1 = $11
.label xd = $f
.label yd = $e
@ -3129,9 +3139,9 @@ bitmap_line_xdyd: {
}
// bitmap_plot(byte register(Y) x, byte register(X) y)
bitmap_plot: {
.label plotter_x = $1d
.label plotter_y = $1f
.label plotter = $1d
.label plotter_x = $21
.label plotter_y = $23
.label plotter = $21
// plotter_x = { bitmap_plot_xhi[x], bitmap_plot_xlo[x] }
lda bitmap_plot_xhi,y
sta.z plotter_x+1

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -198,18 +198,18 @@
(byte) apply_preset::idx
(byte) apply_preset::idx#0 reg byte a 100910.18181818182
(byte*) apply_preset::preset
(byte*) apply_preset::preset#15 preset zp[2]:24 2.00000002E7
(byte*) apply_preset::preset#15 preset zp[2]:26 2.00000002E7
(void()) bitmap_clear()
(label) bitmap_clear::@1
(label) bitmap_clear::@2
(label) bitmap_clear::@3
(label) bitmap_clear::@return
(byte*) bitmap_clear::bitmap
(word) bitmap_clear::bitmap#0 bitmap zp[2]:26 1001.0
(byte*) bitmap_clear::bitmap#1 bitmap zp[2]:26 42000.600000000006
(byte*) bitmap_clear::bitmap#2 bitmap zp[2]:26 155002.0
(byte*) bitmap_clear::bitmap#3 bitmap zp[2]:26 21003.0
(byte*) bitmap_clear::bitmap#5 bitmap zp[2]:26 2002.0
(word) bitmap_clear::bitmap#0 bitmap zp[2]:19 1001.0
(byte*) bitmap_clear::bitmap#1 bitmap zp[2]:19 42000.600000000006
(byte*) bitmap_clear::bitmap#2 bitmap zp[2]:19 155002.0
(byte*) bitmap_clear::bitmap#3 bitmap zp[2]:19 21003.0
(byte*) bitmap_clear::bitmap#5 bitmap zp[2]:19 2002.0
(byte) bitmap_clear::x
(byte) bitmap_clear::x#1 reg byte x 150001.5
(byte) bitmap_clear::x#2 reg byte x 66667.33333333333
@ -218,7 +218,7 @@
(byte) bitmap_clear::y#4 y zp[1]:15 3333.6666666666665
(void()) bitmap_init((byte*) bitmap_init::bitmap)
(byte~) bitmap_init::$0 reg byte a 20002.0
(byte~) bitmap_init::$10 zp[1]:19 5000.5
(byte~) bitmap_init::$10 zp[1]:21 5000.5
(byte~) bitmap_init::$7 reg byte a 20002.0
(byte~) bitmap_init::$8 reg byte a 20002.0
(byte~) bitmap_init::$9 reg byte a 20002.0
@ -263,7 +263,7 @@
(byte) bitmap_line::x0
(byte) bitmap_line::x0#0 x0 zp[1]:17 3956.956521739131
(byte) bitmap_line::x1
(byte) bitmap_line::x1#0 x1 zp[1]:19 4136.818181818182
(byte) bitmap_line::x1#0 x1 zp[1]:21 4136.818181818182
(byte) bitmap_line::xd
(byte) bitmap_line::xd#1 xd zp[1]:15 3500.3500000000004
(byte) bitmap_line::xd#2 xd zp[1]:15 3500.3500000000004
@ -290,11 +290,11 @@
(byte) bitmap_line_xdyd::e#3 e zp[1]:18 4020000.5999999996
(byte) bitmap_line_xdyd::e#6 e zp[1]:18 1.0000001E7
(byte) bitmap_line_xdyd::x
(byte) bitmap_line_xdyd::x#0 x zp[1]:28 4000.4
(byte) bitmap_line_xdyd::x#1 x zp[1]:28 4000.4
(byte) bitmap_line_xdyd::x#2 x zp[1]:28 3750000.375
(byte) bitmap_line_xdyd::x#3 x zp[1]:28 7525001.0
(byte) bitmap_line_xdyd::x#6 x zp[1]:28 60001.5
(byte) bitmap_line_xdyd::x#0 x zp[1]:32 4000.4
(byte) bitmap_line_xdyd::x#1 x zp[1]:32 4000.4
(byte) bitmap_line_xdyd::x#2 x zp[1]:32 3750000.375
(byte) bitmap_line_xdyd::x#3 x zp[1]:32 7525001.0
(byte) bitmap_line_xdyd::x#6 x zp[1]:32 60001.5
(byte) bitmap_line_xdyd::x1
(byte) bitmap_line_xdyd::x1#0 x1 zp[1]:17 6667.333333333333
(byte) bitmap_line_xdyd::x1#1 x1 zp[1]:17 6667.333333333333
@ -334,9 +334,9 @@
(byte) bitmap_line_xdyi::x#3 x zp[1]:14 7525001.0
(byte) bitmap_line_xdyi::x#6 x zp[1]:14 60001.5
(byte) bitmap_line_xdyi::x1
(byte) bitmap_line_xdyi::x1#0 x1 zp[1]:19 6667.333333333333
(byte) bitmap_line_xdyi::x1#1 x1 zp[1]:19 6667.333333333333
(byte) bitmap_line_xdyi::x1#6 x1 zp[1]:19 715714.5
(byte) bitmap_line_xdyi::x1#0 x1 zp[1]:21 6667.333333333333
(byte) bitmap_line_xdyi::x1#1 x1 zp[1]:21 6667.333333333333
(byte) bitmap_line_xdyi::x1#6 x1 zp[1]:21 715714.5
(byte) bitmap_line_xdyi::xd
(byte) bitmap_line_xdyi::xd#0 xd zp[1]:15 10001.0
(byte) bitmap_line_xdyi::xd#1 xd zp[1]:15 10001.0
@ -360,11 +360,11 @@
(label) bitmap_line_ydxd::@4
(label) bitmap_line_ydxd::@return
(byte) bitmap_line_ydxd::e
(byte) bitmap_line_ydxd::e#0 e zp[1]:28 200002.0
(byte) bitmap_line_ydxd::e#1 e zp[1]:28 1.3333334666666666E7
(byte) bitmap_line_ydxd::e#2 e zp[1]:28 2.0000002E7
(byte) bitmap_line_ydxd::e#3 e zp[1]:28 4020000.5999999996
(byte) bitmap_line_ydxd::e#6 e zp[1]:28 1.0000001E7
(byte) bitmap_line_ydxd::e#0 e zp[1]:32 200002.0
(byte) bitmap_line_ydxd::e#1 e zp[1]:32 1.3333334666666666E7
(byte) bitmap_line_ydxd::e#2 e zp[1]:32 2.0000002E7
(byte) bitmap_line_ydxd::e#3 e zp[1]:32 4020000.5999999996
(byte) bitmap_line_ydxd::e#6 e zp[1]:32 1.0000001E7
(byte) bitmap_line_ydxd::x
(byte) bitmap_line_ydxd::x#0 x zp[1]:17 5000.5
(byte) bitmap_line_ydxd::x#1 x zp[1]:17 5000.5
@ -398,11 +398,11 @@
(label) bitmap_line_ydxi::@4
(label) bitmap_line_ydxi::@return
(byte) bitmap_line_ydxi::e
(byte) bitmap_line_ydxi::e#0 e zp[1]:19 200002.0
(byte) bitmap_line_ydxi::e#1 e zp[1]:19 1.3333334666666666E7
(byte) bitmap_line_ydxi::e#2 e zp[1]:19 2.0000002E7
(byte) bitmap_line_ydxi::e#3 e zp[1]:19 4020000.5999999996
(byte) bitmap_line_ydxi::e#6 e zp[1]:19 1.0000001E7
(byte) bitmap_line_ydxi::e#0 e zp[1]:21 200002.0
(byte) bitmap_line_ydxi::e#1 e zp[1]:21 1.3333334666666666E7
(byte) bitmap_line_ydxi::e#2 e zp[1]:21 2.0000002E7
(byte) bitmap_line_ydxi::e#3 e zp[1]:21 4020000.5999999996
(byte) bitmap_line_ydxi::e#6 e zp[1]:21 1.0000001E7
(byte) bitmap_line_ydxi::x
(byte) bitmap_line_ydxi::x#0 x zp[1]:17 5000.5
(byte) bitmap_line_ydxi::x#1 x zp[1]:17 5000.5
@ -432,11 +432,11 @@
(byte~) bitmap_plot::$1 reg byte a 2.00000002E8
(label) bitmap_plot::@return
(byte*) bitmap_plot::plotter
(word) bitmap_plot::plotter#0 plotter zp[2]:29 5.00000005E7
(word) bitmap_plot::plotter#0 plotter zp[2]:33 5.00000005E7
(word) bitmap_plot::plotter_x
(word) bitmap_plot::plotter_x#0 plotter_x zp[2]:29 1.00000001E8
(word) bitmap_plot::plotter_x#0 plotter_x zp[2]:33 1.00000001E8
(word) bitmap_plot::plotter_y
(word) bitmap_plot::plotter_y#0 plotter_y zp[2]:31 2.00000002E8
(word) bitmap_plot::plotter_y#0 plotter_y zp[2]:35 2.00000002E8
(byte) bitmap_plot::x
(byte) bitmap_plot::x#0 reg byte y 1.0000001E7
(byte) bitmap_plot::x#1 reg byte y 1.0000001E7
@ -506,7 +506,7 @@
(label) form_control::@9
(label) form_control::@return
(byte*) form_control::field
(byte*) form_control::field#0 field zp[2]:31 296296.5925925926
(byte*) form_control::field#0 field zp[2]:19 296296.5925925926
(byte) form_control::key_event
(byte) form_control::key_event#0 reg byte a 1333334.6666666667
(byte) form_control::return
@ -543,12 +543,12 @@
(byte) form_field_ptr::field_idx#1 reg byte x 2000002.0
(byte) form_field_ptr::field_idx#2 reg byte x 7.003333346666667E8
(byte*) form_field_ptr::line
(word) form_field_ptr::line#0 line zp[2]:29 2.000000002E8
(word) form_field_ptr::line#0 line zp[2]:30 2.000000002E8
(byte*) form_field_ptr::return
(byte*) form_field_ptr::return#0 return zp[2]:31 3.336666673333334E8
(byte*) form_field_ptr::return#3 return zp[2]:31 2000002.0
(byte*) form_field_ptr::return#0 return zp[2]:19 3.336666673333334E8
(byte*) form_field_ptr::return#3 return zp[2]:19 2000002.0
(byte) form_field_ptr::x
(byte) form_field_ptr::x#0 x zp[1]:28 5.2500000075E8
(byte) form_field_ptr::x#0 x zp[1]:32 5.2500000075E8
(byte) form_field_ptr::y
(byte) form_field_ptr::y#0 reg byte y 3.000000003E9
(const byte) form_fields_cnt = (byte) $24
@ -704,7 +704,7 @@
(byte) gfx_init_charset::l#1 reg byte x 15001.5
(byte) gfx_init_charset::l#2 reg byte x 5000.5
(void()) gfx_init_plane_8bppchunky()
(word~) gfx_init_plane_8bppchunky::$5 zp[2]:29 10001.0
(word~) gfx_init_plane_8bppchunky::$5 zp[2]:35 10001.0
(label) gfx_init_plane_8bppchunky::@1
(label) gfx_init_plane_8bppchunky::@2
(label) gfx_init_plane_8bppchunky::@3
@ -778,10 +778,10 @@
(byte) gfx_init_plane_charset8::gfxbCpuBank
(const byte) gfx_init_plane_charset8::gfxbCpuBank#0 gfxbCpuBank = (byte)(const nomodify dword) PLANE_CHARSET8/(word) $4000
(void()) gfx_init_plane_fill((dword) gfx_init_plane_fill::plane_addr , (byte) gfx_init_plane_fill::fill)
(dword~) gfx_init_plane_fill::$0 zp[4]:20 2002.0
(word~) gfx_init_plane_fill::$1 zp[2]:24 2002.0
(word~) gfx_init_plane_fill::$4 zp[2]:26 2002.0
(word~) gfx_init_plane_fill::$5 zp[2]:26 2002.0
(dword~) gfx_init_plane_fill::$0 zp[4]:22 2002.0
(word~) gfx_init_plane_fill::$1 zp[2]:26 2002.0
(word~) gfx_init_plane_fill::$4 zp[2]:19 2002.0
(word~) gfx_init_plane_fill::$5 zp[2]:19 2002.0
(label) gfx_init_plane_fill::@1
(label) gfx_init_plane_fill::@2
(label) gfx_init_plane_fill::@3
@ -797,11 +797,11 @@
(byte) gfx_init_plane_fill::fill
(byte) gfx_init_plane_fill::fill#6 fill zp[1]:16 5555.611111111111
(byte*) gfx_init_plane_fill::gfxb
(word) gfx_init_plane_fill::gfxb#0 gfxb zp[2]:26 1001.0
(byte*) gfx_init_plane_fill::gfxb#1 gfxb zp[2]:26 42000.600000000006
(byte*) gfx_init_plane_fill::gfxb#2 gfxb zp[2]:26 155002.0
(byte*) gfx_init_plane_fill::gfxb#3 gfxb zp[2]:26 21003.0
(byte*) gfx_init_plane_fill::gfxb#6 gfxb zp[2]:26 2002.0
(word) gfx_init_plane_fill::gfxb#0 gfxb zp[2]:19 1001.0
(byte*) gfx_init_plane_fill::gfxb#1 gfxb zp[2]:19 42000.600000000006
(byte*) gfx_init_plane_fill::gfxb#2 gfxb zp[2]:19 155002.0
(byte*) gfx_init_plane_fill::gfxb#3 gfxb zp[2]:19 21003.0
(byte*) gfx_init_plane_fill::gfxb#6 gfxb zp[2]:19 2002.0
(byte) gfx_init_plane_fill::gfxbCpuBank
(byte) gfx_init_plane_fill::gfxbCpuBank#0 reg byte a 2002.0
(dword) gfx_init_plane_fill::plane_addr
@ -981,10 +981,11 @@
(void()) gfx_mode()
(byte~) gfx_mode::$18 reg byte a 202.0
(dword~) gfx_mode::$20 zp[4]:9 202.0
(word~) gfx_mode::$22 zp[2]:35 202.0
(byte~) gfx_mode::$23 reg byte a 202.0
(word~) gfx_mode::$24 zp[2]:29 101.0
(word~) gfx_mode::$24 zp[2]:19 202.0
(byte~) gfx_mode::$25 reg byte a 202.0
(word~) gfx_mode::$26 zp[2]:31 202.0
(word~) gfx_mode::$26 zp[2]:26 202.0
(byte~) gfx_mode::$27 reg byte a 202.0
(byte~) gfx_mode::$28 reg byte a 202.0
(byte~) gfx_mode::$29 reg byte a 202.0
@ -992,10 +993,11 @@
(byte~) gfx_mode::$31 reg byte a 202.0
(byte~) gfx_mode::$32 reg byte a 202.0
(dword~) gfx_mode::$34 zp[4]:9 202.0
(word~) gfx_mode::$36 zp[2]:28 202.0
(byte~) gfx_mode::$37 reg byte a 202.0
(word~) gfx_mode::$38 zp[2]:24 101.0
(word~) gfx_mode::$38 zp[2]:30 202.0
(byte~) gfx_mode::$39 reg byte a 202.0
(word~) gfx_mode::$40 zp[2]:26 202.0
(word~) gfx_mode::$40 zp[2]:33 202.0
(byte~) gfx_mode::$41 reg byte a 202.0
(byte~) gfx_mode::$42 reg byte a 202.0
(byte~) gfx_mode::$43 reg byte a 202.0
@ -1083,11 +1085,11 @@
(byte) gfx_mode::keyboard_event
(byte) gfx_mode::keyboard_event#0 reg byte a 20002.0
(dword) gfx_mode::plane_a
(dword) gfx_mode::plane_a#0 plane_a zp[4]:9 50.5
(dword) gfx_mode::plane_a#0 plane_a zp[4]:9 57.714285714285715
(byte) gfx_mode::plane_a_offs
(byte) gfx_mode::plane_a_offs#0 reg byte x 40.4
(dword) gfx_mode::plane_b
(dword) gfx_mode::plane_b#0 plane_b zp[4]:9 50.5
(dword) gfx_mode::plane_b#0 plane_b zp[4]:9 57.714285714285715
(byte) gfx_mode::plane_b_offs
(byte) gfx_mode::plane_b_offs#0 reg byte x 40.4
(byte*) gfx_mode::vic_colors
@ -1122,7 +1124,7 @@
(byte) keyboard_event_pressed::return#2 reg byte a 2.0000002E7
(byte) keyboard_event_pressed::return#3 reg byte a 2.0000002E7
(byte) keyboard_event_pressed::row_bits
(byte) keyboard_event_pressed::row_bits#0 row_bits zp[1]:28 1.00000001E8
(byte) keyboard_event_pressed::row_bits#0 row_bits zp[1]:32 1.00000001E8
(void()) keyboard_event_scan()
(byte~) keyboard_event_scan::$0 reg byte a 2.0000002E7
(byte~) keyboard_event_scan::$15 reg byte a 2.000000000002E12
@ -1170,7 +1172,7 @@
(byte) keyboard_event_scan::row#1 row zp[1]:13 1.500000000015E11
(byte) keyboard_event_scan::row#2 row zp[1]:13 6.000000000024E10
(byte) keyboard_event_scan::row_scan
(byte) keyboard_event_scan::row_scan#0 row_scan zp[1]:19 1.2777777777805557E11
(byte) keyboard_event_scan::row_scan#0 row_scan zp[1]:21 1.2777777777805557E11
(const byte*) keyboard_events[(number) 8] = { fill( 8, 0) }
(byte) keyboard_events_size
(byte) keyboard_events_size#0 keyboard_events_size zp[1]:16 2.000000000002E12
@ -1179,7 +1181,7 @@
(byte) keyboard_events_size#106 keyboard_events_size zp[1]:16 1.0200000000012E12
(byte) keyboard_events_size#107 keyboard_events_size zp[1]:16 4.285857142914285E10
(byte) keyboard_events_size#19 keyboard_events_size zp[1]:16 8.100000000008999E11
(byte) keyboard_events_size#25 keyboard_events_size zp[1]:16 111777.86666666667
(byte) keyboard_events_size#25 keyboard_events_size zp[1]:16 110549.53846153847
(byte) keyboard_events_size#28 keyboard_events_size zp[1]:16 2.871794871794872
(byte) keyboard_events_size#3 keyboard_events_size zp[1]:16 1.50000015E7
(byte) keyboard_events_size#49 keyboard_events_size zp[1]:16 65300.23529411765
@ -1218,16 +1220,16 @@
(byte) memset::c
(const byte) memset::c#0 c = (byte) ' '
(byte*) memset::dst
(byte*) memset::dst#1 dst zp[2]:24 2000002.0
(byte*) memset::dst#2 dst zp[2]:24 1336668.3333333335
(byte*) memset::dst#4 dst zp[2]:24 20002.0
(byte*) memset::dst#1 dst zp[2]:26 2000002.0
(byte*) memset::dst#2 dst zp[2]:26 1336668.3333333335
(byte*) memset::dst#4 dst zp[2]:26 20002.0
(byte*) memset::end
(byte*) memset::end#0 end zp[2]:26 168333.6666666667
(byte*) memset::end#0 end zp[2]:28 168333.6666666667
(word) memset::num
(const word) memset::num#0 num = (word) $3e8
(void*) memset::return
(void*) memset::str
(void*) memset::str#0 str zp[2]:24 333.6666666666667
(void*) memset::str#0 str zp[2]:26 333.6666666666667
(const byte*) preset_8bpppixelcell[] = { (byte) $a, (byte) 0, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) $b, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 }
(const byte*) preset_chunky[] = { (byte) 7, (byte) 0, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 6, (byte) 0, (byte) 0, (byte) 0, (byte) 8, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 }
(const byte*) preset_ecmchar[] = { (byte) 1, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 2, (byte) 0, (byte) 5, (byte) 0, (byte) 6 }
@ -1244,12 +1246,12 @@
(byte) print_char::ch
(byte) print_char::ch#0 reg byte a 1.1000002E7
(byte*) print_char_cursor
(byte*) print_char_cursor#2 print_char_cursor zp[2]:24 100501.5
(byte*) print_char_cursor#29 print_char_cursor zp[2]:24 3666667.333333333
(byte*) print_char_cursor#43 print_char_cursor zp[2]:24 3683334.1666666665
(byte*) print_char_cursor#44 print_char_cursor zp[2]:24 1.4328571485714287E8
(byte*) print_char_cursor#72 print_char_cursor zp[2]:24 2002.0
(byte*) print_char_cursor#73 print_char_cursor zp[2]:24 200002.0
(byte*) print_char_cursor#2 print_char_cursor zp[2]:26 100501.5
(byte*) print_char_cursor#29 print_char_cursor zp[2]:26 3666667.333333333
(byte*) print_char_cursor#43 print_char_cursor zp[2]:26 3683334.1666666665
(byte*) print_char_cursor#44 print_char_cursor zp[2]:26 1.4328571485714287E8
(byte*) print_char_cursor#72 print_char_cursor zp[2]:26 2002.0
(byte*) print_char_cursor#73 print_char_cursor zp[2]:26 200002.0
(void()) print_cls()
(label) print_cls::@return
(const to_nomodify byte*) print_hextab[] = (byte*) "0123456789abcdef"z
@ -1271,12 +1273,12 @@
(label) print_str_at::@2
(label) print_str_at::@return
(byte*) print_str_at::at
(byte*) print_str_at::at#0 at zp[2]:24 1.000000001E9
(byte*) print_str_at::at#2 at zp[2]:24 1.000000001E9
(byte*) print_str_at::at#0 at zp[2]:26 1.000000001E9
(byte*) print_str_at::at#2 at zp[2]:26 1.000000001E9
(byte*) print_str_at::str
(byte*) print_str_at::str#0 str zp[2]:26 2.000000002E9
(byte*) print_str_at::str#1 str zp[2]:26 550001.0
(byte*) print_str_at::str#2 str zp[2]:26 1.00025000125E9
(byte*) print_str_at::str#0 str zp[2]:19 2.000000002E9
(byte*) print_str_at::str#1 str zp[2]:19 550001.0
(byte*) print_str_at::str#2 str zp[2]:19 1.00025000125E9
(void()) print_str_lines((byte*) print_str_lines::str)
(label) print_str_lines::@1
(label) print_str_lines::@2
@ -1288,10 +1290,10 @@
(byte) print_str_lines::ch
(byte) print_str_lines::ch#0 reg byte a 666667.3333333334
(byte*) print_str_lines::str
(byte*) print_str_lines::str#0 str zp[2]:26 233333.66666666666
(byte*) print_str_lines::str#3 str zp[2]:26 150502.0
(byte*) print_str_lines::str#4 str zp[2]:26 1550002.0
(byte*) print_str_lines::str#5 str zp[2]:26 500.5
(byte*) print_str_lines::str#0 str zp[2]:19 233333.66666666666
(byte*) print_str_lines::str#3 str zp[2]:19 150502.0
(byte*) print_str_lines::str#4 str zp[2]:19 1550002.0
(byte*) print_str_lines::str#5 str zp[2]:19 500.5
(void()) render_preset_name((byte) render_preset_name::idx)
(label) render_preset_name::@1
(label) render_preset_name::@10
@ -1314,7 +1316,7 @@
(const byte*) render_preset_name::name#1 name_1 = (byte*) "Standard Charset "
(const byte*) render_preset_name::name#10 name_10 = (byte*) "Sixs Fred 2 "
(const byte*) render_preset_name::name#11 name_11 = (byte*) "8bpp Pixel Cell "
(byte*) render_preset_name::name#13 name zp[2]:26 100001.0
(byte*) render_preset_name::name#13 name zp[2]:19 100001.0
(const byte*) render_preset_name::name#2 name_2 = (byte*) "Extended Color Charset "
(const byte*) render_preset_name::name#3 name_3 = (byte*) "Standard Bitmap "
(const byte*) render_preset_name::name#4 name_4 = (byte*) "Multicolor Bitmap "
@ -1432,6 +1434,7 @@ reg byte a [ print_str_lines::ch#0 ]
reg byte a [ print_char::ch#0 ]
reg byte a [ form_set_screen::$0 ]
reg byte a [ form_set_screen::$1 ]
zp[2]:19 [ form_field_ptr::return#3 form_control::field#0 form_field_ptr::return#0 gfx_mode::$24 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#6 gfx_init_plane_fill::gfxb#0 gfx_init_plane_fill::$4 gfx_init_plane_fill::$5 bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 bitmap_clear::bitmap#0 render_preset_name::name#13 print_str_at::str#2 print_str_at::str#1 print_str_at::str#0 print_str_lines::str#4 print_str_lines::str#3 print_str_lines::str#5 print_str_lines::str#0 ]
reg byte a [ form_control::$12 ]
reg byte a [ keyboard_event_get::return#4 ]
reg byte a [ form_control::key_event#0 ]
@ -1454,7 +1457,7 @@ reg byte a [ keyboard_event_scan::$16 ]
reg byte a [ keyboard_event_scan::event_type#0 ]
reg byte a [ keyboard_event_scan::$23 ]
reg byte a [ bitmap_init::$0 ]
zp[1]:19 [ bitmap_init::$10 keyboard_event_scan::row_scan#0 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#1 bitmap_line_xdyi::x1#0 bitmap_line::x1#0 bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 ]
zp[1]:21 [ bitmap_init::$10 keyboard_event_scan::row_scan#0 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#1 bitmap_line_xdyi::x1#0 bitmap_line::x1#0 bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 ]
reg byte a [ bitmap_init::$7 ]
reg byte a [ bitmap_init::$8 ]
reg byte a [ bitmap_init::$9 ]
@ -1462,20 +1465,21 @@ reg byte y [ bitmap_line::yd#2 ]
reg byte y [ bitmap_line::yd#1 ]
reg byte y [ bitmap_line::yd#10 ]
reg byte y [ bitmap_line::yd#11 ]
zp[4]:20 [ gfx_init_plane_fill::$0 ]
zp[2]:24 [ gfx_init_plane_fill::$1 gfx_mode::$38 print_str_at::at#2 print_str_at::at#0 memset::dst#2 memset::dst#4 memset::dst#1 memset::str#0 apply_preset::preset#15 print_char_cursor#43 print_char_cursor#2 print_char_cursor#72 print_char_cursor#73 print_char_cursor#44 print_char_cursor#29 ]
zp[4]:22 [ gfx_init_plane_fill::$0 ]
zp[2]:26 [ gfx_init_plane_fill::$1 gfx_mode::$26 print_str_at::at#2 print_str_at::at#0 memset::dst#2 memset::dst#4 memset::dst#1 memset::str#0 apply_preset::preset#15 print_char_cursor#43 print_char_cursor#2 print_char_cursor#72 print_char_cursor#73 print_char_cursor#44 print_char_cursor#29 ]
reg byte a [ gfx_init_plane_fill::gfxbCpuBank#0 ]
zp[2]:26 [ memset::end#0 gfx_mode::$40 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#6 gfx_init_plane_fill::gfxb#0 gfx_init_plane_fill::$4 gfx_init_plane_fill::$5 bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 bitmap_clear::bitmap#0 render_preset_name::name#13 print_str_at::str#2 print_str_at::str#1 print_str_at::str#0 print_str_lines::str#4 print_str_lines::str#3 print_str_lines::str#5 print_str_lines::str#0 ]
zp[2]:28 [ memset::end#0 gfx_mode::$36 ]
reg byte y [ form_field_ptr::y#0 ]
zp[2]:30 [ form_field_ptr::line#0 gfx_mode::$38 ]
reg byte a [ keyboard_matrix_read::return#0 ]
reg byte a [ keyboard_event_pressed::$0 ]
zp[1]:28 [ keyboard_event_pressed::row_bits#0 form_field_ptr::x#0 bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#2 bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ]
zp[1]:32 [ keyboard_event_pressed::row_bits#0 form_field_ptr::x#0 bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#2 bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ]
reg byte a [ keyboard_event_pressed::$1 ]
reg byte a [ keyboard_event_pressed::return#10 ]
reg byte x [ bitmap_line_ydxi::$6 ]
reg byte a [ bitmap_line_xdyi::$6 ]
reg byte x [ bitmap_line_ydxd::$6 ]
reg byte a [ bitmap_line_xdyd::$6 ]
zp[2]:29 [ bitmap_plot::plotter_x#0 bitmap_plot::plotter#0 form_field_ptr::line#0 gfx_init_plane_8bppchunky::$5 gfx_mode::$24 ]
zp[2]:31 [ bitmap_plot::plotter_y#0 form_field_ptr::return#3 form_control::field#0 form_field_ptr::return#0 gfx_mode::$26 ]
zp[2]:33 [ bitmap_plot::plotter_x#0 bitmap_plot::plotter#0 gfx_mode::$40 ]
zp[2]:35 [ bitmap_plot::plotter_y#0 gfx_init_plane_8bppchunky::$5 gfx_mode::$22 ]
reg byte a [ bitmap_plot::$1 ]

View File

@ -4,7 +4,6 @@
.pc = $80d "Program"
main: {
.label SCREEN = $400
.label e = 3
.label a = 2
ldx #0
txa
@ -16,14 +15,8 @@ main: {
tya
clc
adc.z a
sta.z e
// f = d+a
tya
clc
adc.z a
// g = e+f
clc
adc.z e
asl
// SCREEN[idx++] = g
sta SCREEN,x
// SCREEN[idx++] = g;

View File

@ -10,18 +10,17 @@ main::@1: scope:[main] from main main::@3
main::@2: scope:[main] from main::@1 main::@2
[2] (byte) main::idx#2 ← phi( main::@1/(byte) main::idx#3 main::@2/(byte) main::idx#1 )
[2] (byte) main::d#0 ← phi( main::@1/(byte) 0 main::@2/(byte) main::b#1 )
[3] (byte) main::e#0 ← (byte) main::d#0 + (byte) main::a#4
[4] (byte) main::f#0 ← (byte) main::d#0 + (byte) main::a#4
[5] (byte) main::g#0 ← (byte) main::e#0 + (byte) main::f#0
[6] *((const nomodify byte*) main::SCREEN + (byte) main::idx#2) ← (byte) main::g#0
[7] (byte) main::idx#1 ← ++ (byte) main::idx#2
[8] (byte) main::b#1 ← ++ (byte) main::d#0
[9] if((byte) main::b#1!=(byte) 6) goto main::@2
[3] (byte) main::f#0 ← (byte) main::d#0 + (byte) main::a#4
[4] (byte) main::g#0 ← (byte) main::f#0 + (byte) main::f#0
[5] *((const nomodify byte*) main::SCREEN + (byte) main::idx#2) ← (byte) main::g#0
[6] (byte) main::idx#1 ← ++ (byte) main::idx#2
[7] (byte) main::b#1 ← ++ (byte) main::d#0
[8] if((byte) main::b#1!=(byte) 6) goto main::@2
to:main::@3
main::@3: scope:[main] from main::@2
[10] (byte) main::a#1 ← ++ (byte) main::a#4
[11] if((byte) main::a#1!=(byte) 6) goto main::@1
[9] (byte) main::a#1 ← ++ (byte) main::a#4
[10] if((byte) main::a#1!=(byte) 6) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@3
[12] return
[11] return
to:@return

View File

@ -103,6 +103,8 @@ Alias main::idx#1 = main::idx#4
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte) main::a#2 (byte) main::a#4
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [9] (byte) main::f#0 ← (byte) main::d#0 + (byte) main::a#4
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition (bool~) main::$3 [12] if((byte) main::b#1!=rangelast(0,5)) goto main::@2
Simple Condition (bool~) main::$4 [15] if((byte) main::a#1!=rangelast(0,5)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
@ -128,6 +130,8 @@ Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 6
Finalized unsigned number type (byte) 6
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias main::f#0 = main::e#0
Successful SSA optimization Pass2AliasElimination
Inlining constant with var siblings (const byte) main::idx#0
Inlining constant with var siblings (const byte) main::a#0
Inlining constant with var siblings (const byte) main::b#0
@ -142,10 +146,10 @@ CALL GRAPH
Created 4 initial phi equivalence classes
Coalesced [2] main::idx#6 ← main::idx#3
Coalesced [14] main::a#5 ← main::a#1
Coalesced [15] main::idx#5 ← main::idx#1
Coalesced [16] main::d#1 ← main::b#1
Coalesced (already) [17] main::idx#7 ← main::idx#1
Coalesced [13] main::a#5 ← main::a#1
Coalesced [14] main::idx#5 ← main::idx#1
Coalesced [15] main::d#1 ← main::b#1
Coalesced (already) [16] main::idx#7 ← main::idx#1
Coalesced down to 3 phi equivalence classes
Culled Empty Block (label) main::@4
Culled Empty Block (label) main::@5
@ -164,20 +168,19 @@ main::@1: scope:[main] from main main::@3
main::@2: scope:[main] from main::@1 main::@2
[2] (byte) main::idx#2 ← phi( main::@1/(byte) main::idx#3 main::@2/(byte) main::idx#1 )
[2] (byte) main::d#0 ← phi( main::@1/(byte) 0 main::@2/(byte) main::b#1 )
[3] (byte) main::e#0 ← (byte) main::d#0 + (byte) main::a#4
[4] (byte) main::f#0 ← (byte) main::d#0 + (byte) main::a#4
[5] (byte) main::g#0 ← (byte) main::e#0 + (byte) main::f#0
[6] *((const nomodify byte*) main::SCREEN + (byte) main::idx#2) ← (byte) main::g#0
[7] (byte) main::idx#1 ← ++ (byte) main::idx#2
[8] (byte) main::b#1 ← ++ (byte) main::d#0
[9] if((byte) main::b#1!=(byte) 6) goto main::@2
[3] (byte) main::f#0 ← (byte) main::d#0 + (byte) main::a#4
[4] (byte) main::g#0 ← (byte) main::f#0 + (byte) main::f#0
[5] *((const nomodify byte*) main::SCREEN + (byte) main::idx#2) ← (byte) main::g#0
[6] (byte) main::idx#1 ← ++ (byte) main::idx#2
[7] (byte) main::b#1 ← ++ (byte) main::d#0
[8] if((byte) main::b#1!=(byte) 6) goto main::@2
to:main::@3
main::@3: scope:[main] from main::@2
[10] (byte) main::a#1 ← ++ (byte) main::a#4
[11] if((byte) main::a#1!=(byte) 6) goto main::@1
[9] (byte) main::a#1 ← ++ (byte) main::a#4
[10] if((byte) main::a#1!=(byte) 6) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@3
[12] return
[11] return
to:@return
@ -185,43 +188,39 @@ VARIABLE REGISTER WEIGHTS
(void()) main()
(byte) main::a
(byte) main::a#1 16.5
(byte) main::a#4 24.888888888888886
(byte) main::a#4 15.375
(byte) main::b
(byte) main::b#1 151.5
(byte) main::c
(byte) main::d
(byte) main::d#0 67.33333333333333
(byte) main::d#0 60.599999999999994
(byte) main::e
(byte) main::e#0 101.0
(byte) main::f
(byte) main::f#0 202.0
(byte) main::f#0 303.0
(byte) main::g
(byte) main::g#0 202.0
(byte) main::idx
(byte) main::idx#1 42.599999999999994
(byte) main::idx#2 62.8
(byte) main::idx#2 78.5
(byte) main::idx#3 22.0
Initial phi equivalence classes
[ main::a#4 main::a#1 ]
[ main::d#0 main::b#1 ]
[ main::idx#2 main::idx#3 main::idx#1 ]
Added variable main::e#0 to live range equivalence class [ main::e#0 ]
Added variable main::f#0 to live range equivalence class [ main::f#0 ]
Added variable main::g#0 to live range equivalence class [ main::g#0 ]
Complete equivalence classes
[ main::a#4 main::a#1 ]
[ main::d#0 main::b#1 ]
[ main::idx#2 main::idx#3 main::idx#1 ]
[ main::e#0 ]
[ main::f#0 ]
[ main::g#0 ]
Allocated zp[1]:2 [ main::a#4 main::a#1 ]
Allocated zp[1]:3 [ main::d#0 main::b#1 ]
Allocated zp[1]:4 [ main::idx#2 main::idx#3 main::idx#1 ]
Allocated zp[1]:5 [ main::e#0 ]
Allocated zp[1]:6 [ main::f#0 ]
Allocated zp[1]:7 [ main::g#0 ]
Allocated zp[1]:5 [ main::f#0 ]
Allocated zp[1]:6 [ main::g#0 ]
INITIAL ASM
Target platform is c64basic / MOS6502X
@ -236,9 +235,8 @@ Target platform is c64basic / MOS6502X
main: {
.label SCREEN = $400
.label d = 3
.label e = 5
.label f = 6
.label g = 7
.label f = 5
.label g = 6
.label idx = 4
.label b = 3
.label a = 2
@ -272,80 +270,67 @@ main: {
jmp __b2
// main::@2
__b2:
// [3] (byte) main::e#0 ← (byte) main::d#0 + (byte) main::a#4 -- vbuz1=vbuz2_plus_vbuz3
lda.z d
clc
adc.z a
sta.z e
// [4] (byte) main::f#0 ← (byte) main::d#0 + (byte) main::a#4 -- vbuz1=vbuz2_plus_vbuz3
// [3] (byte) main::f#0 ← (byte) main::d#0 + (byte) main::a#4 -- vbuz1=vbuz2_plus_vbuz3
lda.z d
clc
adc.z a
sta.z f
// [5] (byte) main::g#0 ← (byte) main::e#0 + (byte) main::f#0 -- vbuz1=vbuz2_plus_vbuz3
lda.z e
clc
adc.z f
// [4] (byte) main::g#0 ← (byte) main::f#0 + (byte) main::f#0 -- vbuz1=vbuz2_plus_vbuz2
lda.z f
asl
sta.z g
// [6] *((const nomodify byte*) main::SCREEN + (byte) main::idx#2) ← (byte) main::g#0 -- pbuc1_derefidx_vbuz1=vbuz2
// [5] *((const nomodify byte*) main::SCREEN + (byte) main::idx#2) ← (byte) main::g#0 -- pbuc1_derefidx_vbuz1=vbuz2
lda.z g
ldy.z idx
sta SCREEN,y
// [7] (byte) main::idx#1 ← ++ (byte) main::idx#2 -- vbuz1=_inc_vbuz1
// [6] (byte) main::idx#1 ← ++ (byte) main::idx#2 -- vbuz1=_inc_vbuz1
inc.z idx
// [8] (byte) main::b#1 ← ++ (byte) main::d#0 -- vbuz1=_inc_vbuz1
// [7] (byte) main::b#1 ← ++ (byte) main::d#0 -- vbuz1=_inc_vbuz1
inc.z b
// [9] if((byte) main::b#1!=(byte) 6) goto main::@2 -- vbuz1_neq_vbuc1_then_la1
// [8] if((byte) main::b#1!=(byte) 6) goto main::@2 -- vbuz1_neq_vbuc1_then_la1
lda #6
cmp.z b
bne __b2_from___b2
jmp __b3
// main::@3
__b3:
// [10] (byte) main::a#1 ← ++ (byte) main::a#4 -- vbuz1=_inc_vbuz1
// [9] (byte) main::a#1 ← ++ (byte) main::a#4 -- vbuz1=_inc_vbuz1
inc.z a
// [11] if((byte) main::a#1!=(byte) 6) goto main::@1 -- vbuz1_neq_vbuc1_then_la1
// [10] if((byte) main::a#1!=(byte) 6) goto main::@1 -- vbuz1_neq_vbuc1_then_la1
lda #6
cmp.z a
bne __b1_from___b3
jmp __breturn
// main::@return
__breturn:
// [12] return
// [11] return
rts
}
// File Data
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [3] (byte) main::e#0 ← (byte) main::d#0 + (byte) main::a#4 [ main::a#4 main::d#0 main::idx#2 main::e#0 ] ( [ main::a#4 main::d#0 main::idx#2 main::e#0 ] { } ) always clobbers reg byte a
Statement [3] (byte) main::f#0 ← (byte) main::d#0 + (byte) main::a#4 [ main::a#4 main::d#0 main::idx#2 main::f#0 ] ( [ main::a#4 main::d#0 main::idx#2 main::f#0 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::a#4 main::a#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:3 [ main::d#0 main::b#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:4 [ main::idx#2 main::idx#3 main::idx#1 ]
Statement [4] (byte) main::f#0 ← (byte) main::d#0 + (byte) main::a#4 [ main::a#4 main::d#0 main::idx#2 main::e#0 main::f#0 ] ( [ main::a#4 main::d#0 main::idx#2 main::e#0 main::f#0 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:5 [ main::e#0 ]
Statement [5] (byte) main::g#0 ← (byte) main::e#0 + (byte) main::f#0 [ main::a#4 main::d#0 main::idx#2 main::g#0 ] ( [ main::a#4 main::d#0 main::idx#2 main::g#0 ] { } ) always clobbers reg byte a
Statement [3] (byte) main::e#0 ← (byte) main::d#0 + (byte) main::a#4 [ main::a#4 main::d#0 main::idx#2 main::e#0 ] ( [ main::a#4 main::d#0 main::idx#2 main::e#0 ] { } ) always clobbers reg byte a
Statement [4] (byte) main::f#0 ← (byte) main::d#0 + (byte) main::a#4 [ main::a#4 main::d#0 main::idx#2 main::e#0 main::f#0 ] ( [ main::a#4 main::d#0 main::idx#2 main::e#0 main::f#0 ] { } ) always clobbers reg byte a
Statement [5] (byte) main::g#0 ← (byte) main::e#0 + (byte) main::f#0 [ main::a#4 main::d#0 main::idx#2 main::g#0 ] ( [ main::a#4 main::d#0 main::idx#2 main::g#0 ] { } ) always clobbers reg byte a
Statement [4] (byte) main::g#0 ← (byte) main::f#0 + (byte) main::f#0 [ main::a#4 main::d#0 main::idx#2 main::g#0 ] ( [ main::a#4 main::d#0 main::idx#2 main::g#0 ] { } ) always clobbers reg byte a
Statement [3] (byte) main::f#0 ← (byte) main::d#0 + (byte) main::a#4 [ main::a#4 main::d#0 main::idx#2 main::f#0 ] ( [ main::a#4 main::d#0 main::idx#2 main::f#0 ] { } ) always clobbers reg byte a
Statement [4] (byte) main::g#0 ← (byte) main::f#0 + (byte) main::f#0 [ main::a#4 main::d#0 main::idx#2 main::g#0 ] ( [ main::a#4 main::d#0 main::idx#2 main::g#0 ] { } ) always clobbers reg byte a
Potential registers zp[1]:2 [ main::a#4 main::a#1 ] : zp[1]:2 , reg byte x , reg byte y ,
Potential registers zp[1]:3 [ main::d#0 main::b#1 ] : zp[1]:3 , reg byte x , reg byte y ,
Potential registers zp[1]:4 [ main::idx#2 main::idx#3 main::idx#1 ] : zp[1]:4 , reg byte x , reg byte y ,
Potential registers zp[1]:5 [ main::e#0 ] : zp[1]:5 , reg byte x , reg byte y ,
Potential registers zp[1]:6 [ main::f#0 ] : zp[1]:6 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:7 [ main::g#0 ] : zp[1]:7 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:5 [ main::f#0 ] : zp[1]:5 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:6 [ main::g#0 ] : zp[1]:6 , reg byte a , reg byte x , reg byte y ,
REGISTER UPLIFT SCOPES
Uplift Scope [main] 218.83: zp[1]:3 [ main::d#0 main::b#1 ] 202: zp[1]:6 [ main::f#0 ] 202: zp[1]:7 [ main::g#0 ] 127.4: zp[1]:4 [ main::idx#2 main::idx#3 main::idx#1 ] 101: zp[1]:5 [ main::e#0 ] 41.39: zp[1]:2 [ main::a#4 main::a#1 ]
Uplift Scope [main] 303: zp[1]:5 [ main::f#0 ] 212.1: zp[1]:3 [ main::d#0 main::b#1 ] 202: zp[1]:6 [ main::g#0 ] 143.1: zp[1]:4 [ main::idx#2 main::idx#3 main::idx#1 ] 31.88: zp[1]:2 [ main::a#4 main::a#1 ]
Uplift Scope []
Uplifting [main] best 4941 combination reg byte y [ main::d#0 main::b#1 ] reg byte a [ main::f#0 ] reg byte a [ main::g#0 ] reg byte x [ main::idx#2 main::idx#3 main::idx#1 ] zp[1]:5 [ main::e#0 ] zp[1]:2 [ main::a#4 main::a#1 ]
Limited combination testing to 100 combinations of 1296 possible.
Uplifting [] best 4941 combination
Attempting to uplift remaining variables inzp[1]:5 [ main::e#0 ]
Uplifting [main] best 4941 combination zp[1]:5 [ main::e#0 ]
Uplifting [main] best 3641 combination reg byte a [ main::f#0 ] reg byte y [ main::d#0 main::b#1 ] reg byte a [ main::g#0 ] reg byte x [ main::idx#2 main::idx#3 main::idx#1 ] zp[1]:2 [ main::a#4 main::a#1 ]
Limited combination testing to 100 combinations of 432 possible.
Uplifting [] best 3641 combination
Attempting to uplift remaining variables inzp[1]:2 [ main::a#4 main::a#1 ]
Uplifting [main] best 4941 combination zp[1]:2 [ main::a#4 main::a#1 ]
Allocated (was zp[1]:5) zp[1]:3 [ main::e#0 ]
Uplifting [main] best 3641 combination zp[1]:2 [ main::a#4 main::a#1 ]
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
@ -358,7 +343,6 @@ ASSEMBLER BEFORE OPTIMIZATION
// main
main: {
.label SCREEN = $400
.label e = 3
.label a = 2
// [1] phi from main to main::@1 [phi:main->main::@1]
__b1_from_main:
@ -388,40 +372,34 @@ main: {
jmp __b2
// main::@2
__b2:
// [3] (byte) main::e#0 ← (byte) main::d#0 + (byte) main::a#4 -- vbuz1=vbuyy_plus_vbuz2
// [3] (byte) main::f#0 ← (byte) main::d#0 + (byte) main::a#4 -- vbuaa=vbuyy_plus_vbuz1
tya
clc
adc.z a
sta.z e
// [4] (byte) main::f#0 ← (byte) main::d#0 + (byte) main::a#4 -- vbuaa=vbuyy_plus_vbuz1
tya
clc
adc.z a
// [5] (byte) main::g#0 ← (byte) main::e#0 + (byte) main::f#0 -- vbuaa=vbuz1_plus_vbuaa
clc
adc.z e
// [6] *((const nomodify byte*) main::SCREEN + (byte) main::idx#2) ← (byte) main::g#0 -- pbuc1_derefidx_vbuxx=vbuaa
// [4] (byte) main::g#0 ← (byte) main::f#0 + (byte) main::f#0 -- vbuaa=vbuaa_plus_vbuaa
asl
// [5] *((const nomodify byte*) main::SCREEN + (byte) main::idx#2) ← (byte) main::g#0 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN,x
// [7] (byte) main::idx#1 ← ++ (byte) main::idx#2 -- vbuxx=_inc_vbuxx
// [6] (byte) main::idx#1 ← ++ (byte) main::idx#2 -- vbuxx=_inc_vbuxx
inx
// [8] (byte) main::b#1 ← ++ (byte) main::d#0 -- vbuyy=_inc_vbuyy
// [7] (byte) main::b#1 ← ++ (byte) main::d#0 -- vbuyy=_inc_vbuyy
iny
// [9] if((byte) main::b#1!=(byte) 6) goto main::@2 -- vbuyy_neq_vbuc1_then_la1
// [8] if((byte) main::b#1!=(byte) 6) goto main::@2 -- vbuyy_neq_vbuc1_then_la1
cpy #6
bne __b2_from___b2
jmp __b3
// main::@3
__b3:
// [10] (byte) main::a#1 ← ++ (byte) main::a#4 -- vbuz1=_inc_vbuz1
// [9] (byte) main::a#1 ← ++ (byte) main::a#4 -- vbuz1=_inc_vbuz1
inc.z a
// [11] if((byte) main::a#1!=(byte) 6) goto main::@1 -- vbuz1_neq_vbuc1_then_la1
// [10] if((byte) main::a#1!=(byte) 6) goto main::@1 -- vbuz1_neq_vbuc1_then_la1
lda #6
cmp.z a
bne __b1_from___b3
jmp __breturn
// main::@return
__breturn:
// [12] return
// [11] return
rts
}
// File Data
@ -456,33 +434,31 @@ FINAL SYMBOL TABLE
(const nomodify byte*) main::SCREEN = (byte*) 1024
(byte) main::a
(byte) main::a#1 a zp[1]:2 16.5
(byte) main::a#4 a zp[1]:2 24.888888888888886
(byte) main::a#4 a zp[1]:2 15.375
(byte) main::b
(byte) main::b#1 reg byte y 151.5
(byte) main::c
(byte) main::d
(byte) main::d#0 reg byte y 67.33333333333333
(byte) main::d#0 reg byte y 60.599999999999994
(byte) main::e
(byte) main::e#0 e zp[1]:3 101.0
(byte) main::f
(byte) main::f#0 reg byte a 202.0
(byte) main::f#0 reg byte a 303.0
(byte) main::g
(byte) main::g#0 reg byte a 202.0
(byte) main::idx
(byte) main::idx#1 reg byte x 42.599999999999994
(byte) main::idx#2 reg byte x 62.8
(byte) main::idx#2 reg byte x 78.5
(byte) main::idx#3 reg byte x 22.0
zp[1]:2 [ main::a#4 main::a#1 ]
reg byte y [ main::d#0 main::b#1 ]
reg byte x [ main::idx#2 main::idx#3 main::idx#1 ]
zp[1]:3 [ main::e#0 ]
reg byte a [ main::f#0 ]
reg byte a [ main::g#0 ]
FINAL ASSEMBLER
Score: 3951
Score: 2651
// File Comments
// Tests variable coalescing over assignments
@ -494,7 +470,6 @@ Score: 3951
// main
main: {
.label SCREEN = $400
.label e = 3
.label a = 2
// [1] phi from main to main::@1 [phi:main->main::@1]
// [1] phi (byte) main::idx#3 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1
@ -517,43 +492,36 @@ main: {
// main::@2
__b2:
// e = b+c
// [3] (byte) main::e#0 ← (byte) main::d#0 + (byte) main::a#4 -- vbuz1=vbuyy_plus_vbuz2
tya
clc
adc.z a
sta.z e
// f = d+a
// [4] (byte) main::f#0 ← (byte) main::d#0 + (byte) main::a#4 -- vbuaa=vbuyy_plus_vbuz1
// [3] (byte) main::f#0 ← (byte) main::d#0 + (byte) main::a#4 -- vbuaa=vbuyy_plus_vbuz1
tya
clc
adc.z a
// g = e+f
// [5] (byte) main::g#0 ← (byte) main::e#0 + (byte) main::f#0 -- vbuaa=vbuz1_plus_vbuaa
clc
adc.z e
// [4] (byte) main::g#0 ← (byte) main::f#0 + (byte) main::f#0 -- vbuaa=vbuaa_plus_vbuaa
asl
// SCREEN[idx++] = g
// [6] *((const nomodify byte*) main::SCREEN + (byte) main::idx#2) ← (byte) main::g#0 -- pbuc1_derefidx_vbuxx=vbuaa
// [5] *((const nomodify byte*) main::SCREEN + (byte) main::idx#2) ← (byte) main::g#0 -- pbuc1_derefidx_vbuxx=vbuaa
sta SCREEN,x
// SCREEN[idx++] = g;
// [7] (byte) main::idx#1 ← ++ (byte) main::idx#2 -- vbuxx=_inc_vbuxx
// [6] (byte) main::idx#1 ← ++ (byte) main::idx#2 -- vbuxx=_inc_vbuxx
inx
// for( byte b: 0..5)
// [8] (byte) main::b#1 ← ++ (byte) main::d#0 -- vbuyy=_inc_vbuyy
// [7] (byte) main::b#1 ← ++ (byte) main::d#0 -- vbuyy=_inc_vbuyy
iny
// [9] if((byte) main::b#1!=(byte) 6) goto main::@2 -- vbuyy_neq_vbuc1_then_la1
// [8] if((byte) main::b#1!=(byte) 6) goto main::@2 -- vbuyy_neq_vbuc1_then_la1
cpy #6
bne __b2
// main::@3
// for( byte a: 0..5)
// [10] (byte) main::a#1 ← ++ (byte) main::a#4 -- vbuz1=_inc_vbuz1
// [9] (byte) main::a#1 ← ++ (byte) main::a#4 -- vbuz1=_inc_vbuz1
inc.z a
// [11] if((byte) main::a#1!=(byte) 6) goto main::@1 -- vbuz1_neq_vbuc1_then_la1
// [10] if((byte) main::a#1!=(byte) 6) goto main::@1 -- vbuz1_neq_vbuc1_then_la1
lda #6
cmp.z a
bne __b1
// main::@return
// }
// [12] return
// [11] return
rts
}
// File Data

View File

@ -6,26 +6,24 @@
(const nomodify byte*) main::SCREEN = (byte*) 1024
(byte) main::a
(byte) main::a#1 a zp[1]:2 16.5
(byte) main::a#4 a zp[1]:2 24.888888888888886
(byte) main::a#4 a zp[1]:2 15.375
(byte) main::b
(byte) main::b#1 reg byte y 151.5
(byte) main::c
(byte) main::d
(byte) main::d#0 reg byte y 67.33333333333333
(byte) main::d#0 reg byte y 60.599999999999994
(byte) main::e
(byte) main::e#0 e zp[1]:3 101.0
(byte) main::f
(byte) main::f#0 reg byte a 202.0
(byte) main::f#0 reg byte a 303.0
(byte) main::g
(byte) main::g#0 reg byte a 202.0
(byte) main::idx
(byte) main::idx#1 reg byte x 42.599999999999994
(byte) main::idx#2 reg byte x 62.8
(byte) main::idx#2 reg byte x 78.5
(byte) main::idx#3 reg byte x 22.0
zp[1]:2 [ main::a#4 main::a#1 ]
reg byte y [ main::d#0 main::b#1 ]
reg byte x [ main::idx#2 main::idx#3 main::idx#1 ]
zp[1]:3 [ main::e#0 ]
reg byte a [ main::f#0 ]
reg byte a [ main::g#0 ]

View File

@ -302,6 +302,7 @@ bitmap_clear: {
}
// show_letter(byte zp(2) angle)
show_letter: {
.label __17 = $18
.label angle = 2
.label to_x = 8
.label to_y = $a
@ -318,7 +319,6 @@ show_letter: {
.label current_y = 6
.label current_x_1 = $19
.label current_y_1 = $1b
.label __21 = $18
lda #<0
sta.z current_y
sta.z current_y+1
@ -331,17 +331,17 @@ show_letter: {
asl
asl
asl
sta.z __21
clc
adc.z i
tax
lda letter_c+OFFSET_STRUCT_SEGMENT_TO,x
sta.z __17
tay
lda letter_c+OFFSET_STRUCT_SEGMENT_TO,y
sta.z to_x
lda letter_c+OFFSET_STRUCT_SEGMENT_TO+1,x
lda letter_c+OFFSET_STRUCT_SEGMENT_TO+1,y
sta.z to_x+1
lda letter_c+OFFSET_STRUCT_SEGMENT_TO+OFFSET_STRUCT_SPLINEVECTOR16_Y,x
lda letter_c+OFFSET_STRUCT_SEGMENT_TO+OFFSET_STRUCT_SPLINEVECTOR16_Y,y
sta.z to_y
lda letter_c+OFFSET_STRUCT_SEGMENT_TO+OFFSET_STRUCT_SPLINEVECTOR16_Y+1,x
lda letter_c+OFFSET_STRUCT_SEGMENT_TO+OFFSET_STRUCT_SPLINEVECTOR16_Y+1,y
sta.z to_y+1
// to = { to.x - 50, to.y - 150}
lda.z to_x
@ -379,17 +379,14 @@ show_letter: {
adc #>$64
sta.z current_y_1+1
// via = letter_c[i].via
lda.z __21
clc
adc.z i
tax
lda letter_c+OFFSET_STRUCT_SEGMENT_VIA,x
ldy.z __17
lda letter_c+OFFSET_STRUCT_SEGMENT_VIA,y
sta.z via_x
lda letter_c+OFFSET_STRUCT_SEGMENT_VIA+1,x
lda letter_c+OFFSET_STRUCT_SEGMENT_VIA+1,y
sta.z via_x+1
lda letter_c+OFFSET_STRUCT_SEGMENT_VIA+OFFSET_STRUCT_SPLINEVECTOR16_Y,x
lda letter_c+OFFSET_STRUCT_SEGMENT_VIA+OFFSET_STRUCT_SPLINEVECTOR16_Y,y
sta.z via_y
lda letter_c+OFFSET_STRUCT_SEGMENT_VIA+OFFSET_STRUCT_SPLINEVECTOR16_Y+1,x
lda letter_c+OFFSET_STRUCT_SEGMENT_VIA+OFFSET_STRUCT_SPLINEVECTOR16_Y+1,y
sta.z via_y+1
// via = { via.x - 50, via.y - 150}
lda.z via_x
@ -427,10 +424,7 @@ show_letter: {
adc #>$64
sta.z segment_via_y+1
// segment = { letter_c[i].type, to, via}
lda.z __21
clc
adc.z i
tay
ldy.z __17
lda letter_c,y
// if(segment.type==MOVE_TO)
cmp #MOVE_TO

View File

@ -179,9 +179,9 @@ show_letter::@1: scope:[show_letter] from show_letter show_letter::@9
[80] (signed word) show_letter::current_x#4 ← phi( show_letter/(signed word) 0 show_letter::@9/(signed word) show_letter::current_x#11 )
[80] (byte) show_letter::i#10 ← phi( show_letter/(byte) 0 show_letter::@9/(byte) show_letter::i#1 )
[81] (byte~) show_letter::$21 ← (byte) show_letter::i#10 << (byte) 3
[82] (byte~) show_letter::$16 ← (byte~) show_letter::$21 + (byte) show_letter::i#10
[83] (signed word) show_letter::to_x#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TO + (byte~) show_letter::$16)
[84] (signed word) show_letter::to_y#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) show_letter::$16)
[82] (byte~) show_letter::$17 ← (byte~) show_letter::$21 + (byte) show_letter::i#10
[83] (signed word) show_letter::to_x#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TO + (byte~) show_letter::$17)
[84] (signed word) show_letter::to_y#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) show_letter::$17)
[85] (signed word) show_letter::to_x#1 ← (signed word) show_letter::to_x#0 - (signed byte) $32
[86] (signed word) show_letter::to_y#1 ← (signed word) show_letter::to_y#0 - (signed word) $96
[87] (signed word) rotate::vector_x#0 ← (signed word) show_letter::to_x#1
@ -196,408 +196,406 @@ show_letter::@6: scope:[show_letter] from show_letter::@1
[94] (signed word) show_letter::to_y#2 ← (signed word) rotate::return_y#0
[95] (signed word) show_letter::current_x#10 ← (signed word) show_letter::to_x#2 + (signed byte) $64
[96] (signed word) show_letter::current_y#10 ← (signed word) show_letter::to_y#2 + (signed byte) $64
[97] (byte~) show_letter::$17 ← (byte~) show_letter::$21 + (byte) show_letter::i#10
[98] (signed word) show_letter::via_x#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_VIA + (byte~) show_letter::$17)
[99] (signed word) show_letter::via_y#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) show_letter::$17)
[100] (signed word) show_letter::via_x#1 ← (signed word) show_letter::via_x#0 - (signed byte) $32
[101] (signed word) show_letter::via_y#1 ← (signed word) show_letter::via_y#0 - (signed word) $96
[102] (signed word) rotate::vector_x#1 ← (signed word) show_letter::via_x#1
[103] (signed word) rotate::vector_y#1 ← (signed word) show_letter::via_y#1
[104] (byte) rotate::angle#1 ← (byte) show_letter::angle#0
[105] call rotate
[106] (signed word) rotate::return_x#1 ← (signed word) rotate::return_x#2
[107] (signed word) rotate::return_y#1 ← (signed word) rotate::return_y#2
[97] (signed word) show_letter::via_x#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_VIA + (byte~) show_letter::$17)
[98] (signed word) show_letter::via_y#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) show_letter::$17)
[99] (signed word) show_letter::via_x#1 ← (signed word) show_letter::via_x#0 - (signed byte) $32
[100] (signed word) show_letter::via_y#1 ← (signed word) show_letter::via_y#0 - (signed word) $96
[101] (signed word) rotate::vector_x#1 ← (signed word) show_letter::via_x#1
[102] (signed word) rotate::vector_y#1 ← (signed word) show_letter::via_y#1
[103] (byte) rotate::angle#1 ← (byte) show_letter::angle#0
[104] call rotate
[105] (signed word) rotate::return_x#1 ← (signed word) rotate::return_x#2
[106] (signed word) rotate::return_y#1 ← (signed word) rotate::return_y#2
to:show_letter::@7
show_letter::@7: scope:[show_letter] from show_letter::@6
[108] (signed word) show_letter::via_x#2 ← (signed word) rotate::return_x#1
[109] (signed word) show_letter::via_y#2 ← (signed word) rotate::return_y#1
[110] (signed word) show_letter::segment_via_x#0 ← (signed word) show_letter::via_x#2 + (signed byte) $64
[111] (signed word) show_letter::segment_via_y#0 ← (signed word) show_letter::via_y#2 + (signed byte) $64
[112] (byte~) show_letter::$18 ← (byte~) show_letter::$21 + (byte) show_letter::i#10
[113] (byte) show_letter::segment_type#0 ← *((byte*)(const struct Segment*) letter_c + (byte~) show_letter::$18)
[114] if((byte) show_letter::segment_type#0==(const byte) MOVE_TO) goto show_letter::@3
[107] (signed word) show_letter::via_x#2 ← (signed word) rotate::return_x#1
[108] (signed word) show_letter::via_y#2 ← (signed word) rotate::return_y#1
[109] (signed word) show_letter::segment_via_x#0 ← (signed word) show_letter::via_x#2 + (signed byte) $64
[110] (signed word) show_letter::segment_via_y#0 ← (signed word) show_letter::via_y#2 + (signed byte) $64
[111] (byte) show_letter::segment_type#0 ← *((byte*)(const struct Segment*) letter_c + (byte~) show_letter::$17)
[112] if((byte) show_letter::segment_type#0==(const byte) MOVE_TO) goto show_letter::@3
to:show_letter::@4
show_letter::@4: scope:[show_letter] from show_letter::@7
[115] if((byte) show_letter::segment_type#0==(const byte) SPLINE_TO) goto show_letter::@2
[113] if((byte) show_letter::segment_type#0==(const byte) SPLINE_TO) goto show_letter::@2
to:show_letter::@5
show_letter::@5: scope:[show_letter] from show_letter::@4
[116] (word) bitmap_line::x1#0 ← (word)(signed word) show_letter::current_x#4
[117] (word) bitmap_line::y1#0 ← (word)(signed word) show_letter::current_y#4
[118] (word) bitmap_line::x2#0 ← (word)(signed word) show_letter::current_x#10
[119] (word) bitmap_line::y2#0 ← (word)(signed word) show_letter::current_y#10
[120] call bitmap_line
[114] (word) bitmap_line::x1#0 ← (word)(signed word) show_letter::current_x#4
[115] (word) bitmap_line::y1#0 ← (word)(signed word) show_letter::current_y#4
[116] (word) bitmap_line::x2#0 ← (word)(signed word) show_letter::current_x#10
[117] (word) bitmap_line::y2#0 ← (word)(signed word) show_letter::current_y#10
[118] call bitmap_line
to:show_letter::@3
show_letter::@3: scope:[show_letter] from show_letter::@5 show_letter::@7 show_letter::@8
[121] (byte) show_letter::i#1 ← ++ (byte) show_letter::i#10
[122] if((byte) show_letter::i#1!=(byte) $16) goto show_letter::@9
[119] (byte) show_letter::i#1 ← ++ (byte) show_letter::i#10
[120] if((byte) show_letter::i#1!=(byte) $16) goto show_letter::@9
to:show_letter::@return
show_letter::@return: scope:[show_letter] from show_letter::@3
[123] return
[121] return
to:@return
show_letter::@9: scope:[show_letter] from show_letter::@3
[124] (signed word) show_letter::current_x#11 ← (signed word) show_letter::current_x#10
[125] (signed word) show_letter::current_y#11 ← (signed word) show_letter::current_y#10
[122] (signed word) show_letter::current_x#11 ← (signed word) show_letter::current_x#10
[123] (signed word) show_letter::current_y#11 ← (signed word) show_letter::current_y#10
to:show_letter::@1
show_letter::@2: scope:[show_letter] from show_letter::@4
[126] (signed word) spline_8segB::p0_x#0 ← (signed word) show_letter::current_x#4
[127] (signed word) spline_8segB::p0_y#0 ← (signed word) show_letter::current_y#4
[128] (signed word) spline_8segB::p1_x#0 ← (signed word) show_letter::segment_via_x#0
[129] (signed word) spline_8segB::p1_y#0 ← (signed word) show_letter::segment_via_y#0
[130] (signed word) spline_8segB::p2_x#0 ← (signed word) show_letter::current_x#10
[131] (signed word) spline_8segB::p2_y#0 ← (signed word) show_letter::current_y#10
[132] call spline_8segB
[124] (signed word) spline_8segB::p0_x#0 ← (signed word) show_letter::current_x#4
[125] (signed word) spline_8segB::p0_y#0 ← (signed word) show_letter::current_y#4
[126] (signed word) spline_8segB::p1_x#0 ← (signed word) show_letter::segment_via_x#0
[127] (signed word) spline_8segB::p1_y#0 ← (signed word) show_letter::segment_via_y#0
[128] (signed word) spline_8segB::p2_x#0 ← (signed word) show_letter::current_x#10
[129] (signed word) spline_8segB::p2_y#0 ← (signed word) show_letter::current_y#10
[130] call spline_8segB
to:show_letter::@8
show_letter::@8: scope:[show_letter] from show_letter::@2
[133] phi()
[134] call bitmap_plot_spline_8seg
[131] phi()
[132] call bitmap_plot_spline_8seg
to:show_letter::@3
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from bitmap_clear bitmap_clear::@1
[135] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 )
[135] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const nomodify byte*) BITMAP_SCREEN bitmap_clear::@1/(void*)(const nomodify byte*) BITMAP_GRAPHICS )
[135] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 )
[136] if((word) memset::num#2<=(byte) 0) goto memset::@return
[133] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 )
[133] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const nomodify byte*) BITMAP_SCREEN bitmap_clear::@1/(void*)(const nomodify byte*) BITMAP_GRAPHICS )
[133] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 )
[134] if((word) memset::num#2<=(byte) 0) goto memset::@return
to:memset::@1
memset::@1: scope:[memset] from memset
[137] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
[138] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
[135] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
[136] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
to:memset::@2
memset::@2: scope:[memset] from memset::@1 memset::@3
[139] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
[140] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
[137] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
[138] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
to:memset::@return
memset::@return: scope:[memset] from memset memset::@2
[141] return
[139] return
to:@return
memset::@3: scope:[memset] from memset::@2
[142] *((byte*) memset::dst#2) ← (byte) memset::c#4
[143] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
[140] *((byte*) memset::dst#2) ← (byte) memset::c#4
[141] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
to:memset::@2
(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
[144] (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 )
[144] (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 )
[144] (byte) rotate::angle#2 ← phi( show_letter::@1/(byte) rotate::angle#0 show_letter::@6/(byte) rotate::angle#1 )
[145] (signed word) rotate::cos_a#0 ← (signed word)*((const signed byte*) COS + (byte) rotate::angle#2)
[146] (signed word) mulf16s::a#0 ← (signed word) rotate::cos_a#0
[147] (signed word) mulf16s::b#0 ← (signed word) rotate::vector_x#2
[148] call mulf16s
[149] (signed dword) mulf16s::return#2 ← (signed dword) mulf16s::return#0
[142] (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 )
[142] (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 )
[142] (byte) rotate::angle#2 ← phi( show_letter::@1/(byte) rotate::angle#0 show_letter::@6/(byte) rotate::angle#1 )
[143] (signed word) rotate::cos_a#0 ← (signed word)*((const signed byte*) COS + (byte) rotate::angle#2)
[144] (signed word) mulf16s::a#0 ← (signed word) rotate::cos_a#0
[145] (signed word) mulf16s::b#0 ← (signed word) rotate::vector_x#2
[146] call mulf16s
[147] (signed dword) mulf16s::return#2 ← (signed dword) mulf16s::return#0
to:rotate::@1
rotate::@1: scope:[rotate] from rotate
[150] (signed dword~) rotate::$0 ← (signed dword) mulf16s::return#2
[151] (signed word~) rotate::$10 ← (signed word)(signed dword~) rotate::$0
[152] (signed word) rotate::xr#0 ← (signed word~) rotate::$10 << (byte) 1
[153] (signed word) mulf16s::a#1 ← (signed word) rotate::cos_a#0
[154] (signed word) mulf16s::b#1 ← (signed word) rotate::vector_y#2
[155] call mulf16s
[156] (signed dword) mulf16s::return#3 ← (signed dword) mulf16s::return#0
[148] (signed dword~) rotate::$0 ← (signed dword) mulf16s::return#2
[149] (signed word~) rotate::$10 ← (signed word)(signed dword~) rotate::$0
[150] (signed word) rotate::xr#0 ← (signed word~) rotate::$10 << (byte) 1
[151] (signed word) mulf16s::a#1 ← (signed word) rotate::cos_a#0
[152] (signed word) mulf16s::b#1 ← (signed word) rotate::vector_y#2
[153] call mulf16s
[154] (signed dword) mulf16s::return#3 ← (signed dword) mulf16s::return#0
to:rotate::@2
rotate::@2: scope:[rotate] from rotate::@1
[157] (signed dword~) rotate::$2 ← (signed dword) mulf16s::return#3
[158] (signed word~) rotate::$11 ← (signed word)(signed dword~) rotate::$2
[159] (signed word) rotate::yr#0 ← (signed word~) rotate::$11 << (byte) 1
[160] (signed word) rotate::sin_a#0 ← (signed word)*((const signed byte*) SIN + (byte) rotate::angle#2)
[161] (signed word) mulf16s::a#2 ← (signed word) rotate::sin_a#0
[162] (signed word) mulf16s::b#2 ← (signed word) rotate::vector_y#2
[163] call mulf16s
[164] (signed dword) mulf16s::return#4 ← (signed dword) mulf16s::return#0
[155] (signed dword~) rotate::$2 ← (signed dword) mulf16s::return#3
[156] (signed word~) rotate::$11 ← (signed word)(signed dword~) rotate::$2
[157] (signed word) rotate::yr#0 ← (signed word~) rotate::$11 << (byte) 1
[158] (signed word) rotate::sin_a#0 ← (signed word)*((const signed byte*) SIN + (byte) rotate::angle#2)
[159] (signed word) mulf16s::a#2 ← (signed word) rotate::sin_a#0
[160] (signed word) mulf16s::b#2 ← (signed word) rotate::vector_y#2
[161] call mulf16s
[162] (signed dword) mulf16s::return#4 ← (signed dword) mulf16s::return#0
to:rotate::@3
rotate::@3: scope:[rotate] from rotate::@2
[165] (signed dword~) rotate::$4 ← (signed dword) mulf16s::return#4
[166] (signed word~) rotate::$12 ← (signed word)(signed dword~) rotate::$4
[167] (signed word~) rotate::$5 ← (signed word~) rotate::$12 << (byte) 1
[168] (signed word) rotate::xr#1 ← (signed word) rotate::xr#0 - (signed word~) rotate::$5
[169] (signed word) mulf16s::a#3 ← (signed word) rotate::sin_a#0
[170] (signed word) mulf16s::b#3 ← (signed word) rotate::vector_x#2
[171] call mulf16s
[172] (signed dword) mulf16s::return#10 ← (signed dword) mulf16s::return#0
[163] (signed dword~) rotate::$4 ← (signed dword) mulf16s::return#4
[164] (signed word~) rotate::$12 ← (signed word)(signed dword~) rotate::$4
[165] (signed word~) rotate::$5 ← (signed word~) rotate::$12 << (byte) 1
[166] (signed word) rotate::xr#1 ← (signed word) rotate::xr#0 - (signed word~) rotate::$5
[167] (signed word) mulf16s::a#3 ← (signed word) rotate::sin_a#0
[168] (signed word) mulf16s::b#3 ← (signed word) rotate::vector_x#2
[169] call mulf16s
[170] (signed dword) mulf16s::return#10 ← (signed dword) mulf16s::return#0
to:rotate::@4
rotate::@4: scope:[rotate] from rotate::@3
[173] (signed dword~) rotate::$6 ← (signed dword) mulf16s::return#10
[174] (signed word~) rotate::$13 ← (signed word)(signed dword~) rotate::$6
[175] (signed word~) rotate::$7 ← (signed word~) rotate::$13 << (byte) 1
[176] (signed word) rotate::yr#1 ← (signed word) rotate::yr#0 + (signed word~) rotate::$7
[177] (byte~) rotate::$8 ← > (signed word) rotate::xr#1
[178] (byte~) rotate::$9 ← > (signed word) rotate::yr#1
[179] (signed word) rotate::return_x#2 ← (signed word)(signed byte)(byte~) rotate::$8
[180] (signed word) rotate::return_y#2 ← (signed word)(signed byte)(byte~) rotate::$9
[171] (signed dword~) rotate::$6 ← (signed dword) mulf16s::return#10
[172] (signed word~) rotate::$13 ← (signed word)(signed dword~) rotate::$6
[173] (signed word~) rotate::$7 ← (signed word~) rotate::$13 << (byte) 1
[174] (signed word) rotate::yr#1 ← (signed word) rotate::yr#0 + (signed word~) rotate::$7
[175] (byte~) rotate::$8 ← > (signed word) rotate::xr#1
[176] (byte~) rotate::$9 ← > (signed word) rotate::yr#1
[177] (signed word) rotate::return_x#2 ← (signed word)(signed byte)(byte~) rotate::$8
[178] (signed word) rotate::return_y#2 ← (signed word)(signed byte)(byte~) rotate::$9
to:rotate::@return
rotate::@return: scope:[rotate] from rotate::@4
[181] return
[179] 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
[182] (word) bitmap_line::y2#11 ← phi( bitmap_plot_spline_8seg::@1/(word) bitmap_line::y2#13 show_letter::@5/(word) bitmap_line::y2#0 )
[182] (word) bitmap_line::x2#10 ← phi( bitmap_plot_spline_8seg::@1/(word) bitmap_line::x2#13 show_letter::@5/(word) bitmap_line::x2#0 )
[182] (word) bitmap_line::y#0 ← phi( bitmap_plot_spline_8seg::@1/(word) bitmap_line::y1#1 show_letter::@5/(word) bitmap_line::y1#0 )
[182] (word) bitmap_line::x#0 ← phi( bitmap_plot_spline_8seg::@1/(word) bitmap_line::x1#1 show_letter::@5/(word) bitmap_line::x1#0 )
[183] (word) abs_u16::w#0 ← (word) bitmap_line::x2#10 - (word) bitmap_line::x#0
[184] call abs_u16
[185] (word) abs_u16::return#0 ← (word) abs_u16::return#4
[180] (word) bitmap_line::y2#11 ← phi( bitmap_plot_spline_8seg::@1/(word) bitmap_line::y2#13 show_letter::@5/(word) bitmap_line::y2#0 )
[180] (word) bitmap_line::x2#10 ← phi( bitmap_plot_spline_8seg::@1/(word) bitmap_line::x2#13 show_letter::@5/(word) bitmap_line::x2#0 )
[180] (word) bitmap_line::y#0 ← phi( bitmap_plot_spline_8seg::@1/(word) bitmap_line::y1#1 show_letter::@5/(word) bitmap_line::y1#0 )
[180] (word) bitmap_line::x#0 ← phi( bitmap_plot_spline_8seg::@1/(word) bitmap_line::x1#1 show_letter::@5/(word) bitmap_line::x1#0 )
[181] (word) abs_u16::w#0 ← (word) bitmap_line::x2#10 - (word) bitmap_line::x#0
[182] call abs_u16
[183] (word) abs_u16::return#0 ← (word) abs_u16::return#4
to:bitmap_line::@12
bitmap_line::@12: scope:[bitmap_line] from bitmap_line
[186] (word) bitmap_line::dx#0 ← (word) abs_u16::return#0
[187] (word) abs_u16::w#1 ← (word) bitmap_line::y2#11 - (word) bitmap_line::y#0
[188] call abs_u16
[189] (word) abs_u16::return#1 ← (word) abs_u16::return#4
[184] (word) bitmap_line::dx#0 ← (word) abs_u16::return#0
[185] (word) abs_u16::w#1 ← (word) bitmap_line::y2#11 - (word) bitmap_line::y#0
[186] call abs_u16
[187] (word) abs_u16::return#1 ← (word) abs_u16::return#4
to:bitmap_line::@13
bitmap_line::@13: scope:[bitmap_line] from bitmap_line::@12
[190] (word) bitmap_line::dy#0 ← (word) abs_u16::return#1
[191] if((word) bitmap_line::dx#0!=(byte) 0) goto bitmap_line::@1
[188] (word) bitmap_line::dy#0 ← (word) abs_u16::return#1
[189] if((word) bitmap_line::dx#0!=(byte) 0) goto bitmap_line::@1
to:bitmap_line::@18
bitmap_line::@18: scope:[bitmap_line] from bitmap_line::@13
[192] if((word) bitmap_line::dy#0==(byte) 0) goto bitmap_line::@4
[190] if((word) bitmap_line::dy#0==(byte) 0) goto bitmap_line::@4
to:bitmap_line::@1
bitmap_line::@1: scope:[bitmap_line] from bitmap_line::@13 bitmap_line::@18
[193] (word) sgn_u16::w#0 ← (word) bitmap_line::x2#10 - (word) bitmap_line::x#0
[194] call sgn_u16
[195] (word) sgn_u16::return#0 ← (word) sgn_u16::return#4
[191] (word) sgn_u16::w#0 ← (word) bitmap_line::x2#10 - (word) bitmap_line::x#0
[192] call sgn_u16
[193] (word) sgn_u16::return#0 ← (word) sgn_u16::return#4
to:bitmap_line::@14
bitmap_line::@14: scope:[bitmap_line] from bitmap_line::@1
[196] (word) bitmap_line::sx#0 ← (word) sgn_u16::return#0
[197] (word) sgn_u16::w#1 ← (word) bitmap_line::y2#11 - (word) bitmap_line::y#0
[198] call sgn_u16
[199] (word) sgn_u16::return#1 ← (word) sgn_u16::return#4
[194] (word) bitmap_line::sx#0 ← (word) sgn_u16::return#0
[195] (word) sgn_u16::w#1 ← (word) bitmap_line::y2#11 - (word) bitmap_line::y#0
[196] call sgn_u16
[197] (word) sgn_u16::return#1 ← (word) sgn_u16::return#4
to:bitmap_line::@15
bitmap_line::@15: scope:[bitmap_line] from bitmap_line::@14
[200] (word) bitmap_line::sy#0 ← (word) sgn_u16::return#1
[201] if((word) bitmap_line::dx#0>(word) bitmap_line::dy#0) goto bitmap_line::@2
[198] (word) bitmap_line::sy#0 ← (word) sgn_u16::return#1
[199] if((word) bitmap_line::dx#0>(word) bitmap_line::dy#0) goto bitmap_line::@2
to:bitmap_line::@5
bitmap_line::@5: scope:[bitmap_line] from bitmap_line::@15
[202] (word) bitmap_line::e#0 ← (word) bitmap_line::dx#0 >> (byte) 1
[200] (word) bitmap_line::e#0 ← (word) bitmap_line::dx#0 >> (byte) 1
to:bitmap_line::@6
bitmap_line::@6: scope:[bitmap_line] from bitmap_line::@5 bitmap_line::@7
[203] (word) bitmap_line::e#3 ← phi( bitmap_line::@5/(word) bitmap_line::e#0 bitmap_line::@7/(word) bitmap_line::e#6 )
[203] (word) bitmap_line::y#4 ← phi( bitmap_line::@5/(word) bitmap_line::y#0 bitmap_line::@7/(word) bitmap_line::y#1 )
[203] (word) bitmap_line::x#13 ← phi( bitmap_line::@5/(word) bitmap_line::x#0 bitmap_line::@7/(word) bitmap_line::x#12 )
[204] (word) bitmap_plot::x#1 ← (word) bitmap_line::x#13
[205] (byte) bitmap_plot::y#1 ← (byte)(word) bitmap_line::y#4
[206] call bitmap_plot
[201] (word) bitmap_line::e#3 ← phi( bitmap_line::@5/(word) bitmap_line::e#0 bitmap_line::@7/(word) bitmap_line::e#6 )
[201] (word) bitmap_line::y#4 ← phi( bitmap_line::@5/(word) bitmap_line::y#0 bitmap_line::@7/(word) bitmap_line::y#1 )
[201] (word) bitmap_line::x#13 ← phi( bitmap_line::@5/(word) bitmap_line::x#0 bitmap_line::@7/(word) bitmap_line::x#12 )
[202] (word) bitmap_plot::x#1 ← (word) bitmap_line::x#13
[203] (byte) bitmap_plot::y#1 ← (byte)(word) bitmap_line::y#4
[204] call bitmap_plot
to:bitmap_line::@16
bitmap_line::@16: scope:[bitmap_line] from bitmap_line::@6
[207] (word) bitmap_line::y#1 ← (word) bitmap_line::y#4 + (word) bitmap_line::sy#0
[208] (word) bitmap_line::e#1 ← (word) bitmap_line::e#3 + (word) bitmap_line::dx#0
[209] if((word) bitmap_line::dy#0>=(word) bitmap_line::e#1) goto bitmap_line::@7
[205] (word) bitmap_line::y#1 ← (word) bitmap_line::y#4 + (word) bitmap_line::sy#0
[206] (word) bitmap_line::e#1 ← (word) bitmap_line::e#3 + (word) bitmap_line::dx#0
[207] if((word) bitmap_line::dy#0>=(word) bitmap_line::e#1) goto bitmap_line::@7
to:bitmap_line::@8
bitmap_line::@8: scope:[bitmap_line] from bitmap_line::@16
[210] (word) bitmap_line::x#1 ← (word) bitmap_line::x#13 + (word) bitmap_line::sx#0
[211] (word) bitmap_line::e#2 ← (word) bitmap_line::e#1 - (word) bitmap_line::dy#0
[208] (word) bitmap_line::x#1 ← (word) bitmap_line::x#13 + (word) bitmap_line::sx#0
[209] (word) bitmap_line::e#2 ← (word) bitmap_line::e#1 - (word) bitmap_line::dy#0
to:bitmap_line::@7
bitmap_line::@7: scope:[bitmap_line] from bitmap_line::@16 bitmap_line::@8
[212] (word) bitmap_line::e#6 ← phi( bitmap_line::@16/(word) bitmap_line::e#1 bitmap_line::@8/(word) bitmap_line::e#2 )
[212] (word) bitmap_line::x#12 ← phi( bitmap_line::@16/(word) bitmap_line::x#13 bitmap_line::@8/(word) bitmap_line::x#1 )
[213] if((word) bitmap_line::y#1!=(word) bitmap_line::y2#11) goto bitmap_line::@6
[210] (word) bitmap_line::e#6 ← phi( bitmap_line::@16/(word) bitmap_line::e#1 bitmap_line::@8/(word) bitmap_line::e#2 )
[210] (word) bitmap_line::x#12 ← phi( bitmap_line::@16/(word) bitmap_line::x#13 bitmap_line::@8/(word) bitmap_line::x#1 )
[211] if((word) bitmap_line::y#1!=(word) bitmap_line::y2#11) goto bitmap_line::@6
to:bitmap_line::@3
bitmap_line::@3: scope:[bitmap_line] from bitmap_line::@10 bitmap_line::@7
[214] (word) bitmap_line::y#7 ← phi( bitmap_line::@10/(word) bitmap_line::y#13 bitmap_line::@7/(word) bitmap_line::y#1 )
[214] (word) bitmap_line::x#6 ← phi( bitmap_line::@10/(word) bitmap_line::x#15 bitmap_line::@7/(word) bitmap_line::x#12 )
[215] (word) bitmap_plot::x#2 ← (word) bitmap_line::x#6
[216] (byte) bitmap_plot::y#2 ← (byte)(word) bitmap_line::y#7
[217] call bitmap_plot
[212] (word) bitmap_line::y#7 ← phi( bitmap_line::@10/(word) bitmap_line::y#13 bitmap_line::@7/(word) bitmap_line::y#1 )
[212] (word) bitmap_line::x#6 ← phi( bitmap_line::@10/(word) bitmap_line::x#15 bitmap_line::@7/(word) bitmap_line::x#12 )
[213] (word) bitmap_plot::x#2 ← (word) bitmap_line::x#6
[214] (byte) bitmap_plot::y#2 ← (byte)(word) bitmap_line::y#7
[215] call bitmap_plot
to:bitmap_line::@return
bitmap_line::@return: scope:[bitmap_line] from bitmap_line::@3 bitmap_line::@4
[218] return
[216] return
to:@return
bitmap_line::@2: scope:[bitmap_line] from bitmap_line::@15
[219] (word) bitmap_line::e1#0 ← (word) bitmap_line::dy#0 >> (byte) 1
[217] (word) bitmap_line::e1#0 ← (word) bitmap_line::dy#0 >> (byte) 1
to:bitmap_line::@9
bitmap_line::@9: scope:[bitmap_line] from bitmap_line::@10 bitmap_line::@2
[220] (word) bitmap_line::e1#3 ← phi( bitmap_line::@10/(word) bitmap_line::e1#6 bitmap_line::@2/(word) bitmap_line::e1#0 )
[220] (word) bitmap_line::y#15 ← phi( bitmap_line::@10/(word) bitmap_line::y#13 bitmap_line::@2/(word) bitmap_line::y#0 )
[220] (word) bitmap_line::x#7 ← phi( bitmap_line::@10/(word) bitmap_line::x#15 bitmap_line::@2/(word) bitmap_line::x#0 )
[221] (word) bitmap_plot::x#3 ← (word) bitmap_line::x#7
[222] (byte) bitmap_plot::y#3 ← (byte)(word) bitmap_line::y#15
[223] call bitmap_plot
[218] (word) bitmap_line::e1#3 ← phi( bitmap_line::@10/(word) bitmap_line::e1#6 bitmap_line::@2/(word) bitmap_line::e1#0 )
[218] (word) bitmap_line::y#15 ← phi( bitmap_line::@10/(word) bitmap_line::y#13 bitmap_line::@2/(word) bitmap_line::y#0 )
[218] (word) bitmap_line::x#7 ← phi( bitmap_line::@10/(word) bitmap_line::x#15 bitmap_line::@2/(word) bitmap_line::x#0 )
[219] (word) bitmap_plot::x#3 ← (word) bitmap_line::x#7
[220] (byte) bitmap_plot::y#3 ← (byte)(word) bitmap_line::y#15
[221] call bitmap_plot
to:bitmap_line::@17
bitmap_line::@17: scope:[bitmap_line] from bitmap_line::@9
[224] (word) bitmap_line::x#15 ← (word) bitmap_line::x#7 + (word) bitmap_line::sx#0
[225] (word) bitmap_line::e1#1 ← (word) bitmap_line::e1#3 + (word) bitmap_line::dy#0
[226] if((word) bitmap_line::dx#0>=(word) bitmap_line::e1#1) goto bitmap_line::@10
[222] (word) bitmap_line::x#15 ← (word) bitmap_line::x#7 + (word) bitmap_line::sx#0
[223] (word) bitmap_line::e1#1 ← (word) bitmap_line::e1#3 + (word) bitmap_line::dy#0
[224] if((word) bitmap_line::dx#0>=(word) bitmap_line::e1#1) goto bitmap_line::@10
to:bitmap_line::@11
bitmap_line::@11: scope:[bitmap_line] from bitmap_line::@17
[227] (word) bitmap_line::y#2 ← (word) bitmap_line::y#15 + (word) bitmap_line::sy#0
[228] (word) bitmap_line::e1#2 ← (word) bitmap_line::e1#1 - (word) bitmap_line::dx#0
[225] (word) bitmap_line::y#2 ← (word) bitmap_line::y#15 + (word) bitmap_line::sy#0
[226] (word) bitmap_line::e1#2 ← (word) bitmap_line::e1#1 - (word) bitmap_line::dx#0
to:bitmap_line::@10
bitmap_line::@10: scope:[bitmap_line] from bitmap_line::@11 bitmap_line::@17
[229] (word) bitmap_line::e1#6 ← phi( bitmap_line::@11/(word) bitmap_line::e1#2 bitmap_line::@17/(word) bitmap_line::e1#1 )
[229] (word) bitmap_line::y#13 ← phi( bitmap_line::@11/(word) bitmap_line::y#2 bitmap_line::@17/(word) bitmap_line::y#15 )
[230] if((word) bitmap_line::x#15!=(word) bitmap_line::x2#10) goto bitmap_line::@9
[227] (word) bitmap_line::e1#6 ← phi( bitmap_line::@11/(word) bitmap_line::e1#2 bitmap_line::@17/(word) bitmap_line::e1#1 )
[227] (word) bitmap_line::y#13 ← phi( bitmap_line::@11/(word) bitmap_line::y#2 bitmap_line::@17/(word) bitmap_line::y#15 )
[228] if((word) bitmap_line::x#15!=(word) bitmap_line::x2#10) goto bitmap_line::@9
to:bitmap_line::@3
bitmap_line::@4: scope:[bitmap_line] from bitmap_line::@18
[231] (word) bitmap_plot::x#0 ← (word) bitmap_line::x#0
[232] (byte) bitmap_plot::y#0 ← (byte)(word) bitmap_line::y#0
[233] call bitmap_plot
[229] (word) bitmap_plot::x#0 ← (word) bitmap_line::x#0
[230] (byte) bitmap_plot::y#0 ← (byte)(word) bitmap_line::y#0
[231] call bitmap_plot
to:bitmap_line::@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
[234] (signed word~) spline_8segB::$0 ← (signed word) spline_8segB::p1_x#0 << (byte) 1
[235] (signed word~) spline_8segB::$1 ← (signed word) spline_8segB::p2_x#0 - (signed word~) spline_8segB::$0
[236] (signed word) spline_8segB::a_x#0 ← (signed word~) spline_8segB::$1 + (signed word) spline_8segB::p0_x#0
[237] (signed word~) spline_8segB::$3 ← (signed word) spline_8segB::p1_y#0 << (byte) 1
[238] (signed word~) spline_8segB::$4 ← (signed word) spline_8segB::p2_y#0 - (signed word~) spline_8segB::$3
[239] (signed word) spline_8segB::a_y#0 ← (signed word~) spline_8segB::$4 + (signed word) spline_8segB::p0_y#0
[240] (signed word~) spline_8segB::$6 ← (signed word) spline_8segB::p1_x#0 - (signed word) spline_8segB::p0_x#0
[241] (signed word) spline_8segB::b_x#0 ← (signed word~) spline_8segB::$6 << (byte) 1
[242] (signed word~) spline_8segB::$8 ← (signed word) spline_8segB::p1_y#0 - (signed word) spline_8segB::p0_y#0
[243] (signed word) spline_8segB::b_y#0 ← (signed word~) spline_8segB::$8 << (byte) 1
[244] (signed word~) spline_8segB::$10 ← (signed word) spline_8segB::b_x#0 << (byte) 3
[245] (signed word) spline_8segB::i_x#0 ← (signed word) spline_8segB::a_x#0 + (signed word~) spline_8segB::$10
[246] (signed word~) spline_8segB::$12 ← (signed word) spline_8segB::b_y#0 << (byte) 3
[247] (signed word) spline_8segB::i_y#0 ← (signed word) spline_8segB::a_y#0 + (signed word~) spline_8segB::$12
[248] (signed word) spline_8segB::j_x#0 ← (signed word) spline_8segB::a_x#0 << (byte) 1
[249] (signed word) spline_8segB::j_y#0 ← (signed word) spline_8segB::a_y#0 << (byte) 1
[250] (signed word) spline_8segB::p_x#0 ← (signed word) spline_8segB::p0_x#0 << (byte) 6
[251] (signed word) spline_8segB::p_y#0 ← (signed word) spline_8segB::p0_y#0 << (byte) 6
[232] (signed word~) spline_8segB::$0 ← (signed word) spline_8segB::p1_x#0 << (byte) 1
[233] (signed word~) spline_8segB::$1 ← (signed word) spline_8segB::p2_x#0 - (signed word~) spline_8segB::$0
[234] (signed word) spline_8segB::a_x#0 ← (signed word~) spline_8segB::$1 + (signed word) spline_8segB::p0_x#0
[235] (signed word~) spline_8segB::$3 ← (signed word) spline_8segB::p1_y#0 << (byte) 1
[236] (signed word~) spline_8segB::$4 ← (signed word) spline_8segB::p2_y#0 - (signed word~) spline_8segB::$3
[237] (signed word) spline_8segB::a_y#0 ← (signed word~) spline_8segB::$4 + (signed word) spline_8segB::p0_y#0
[238] (signed word~) spline_8segB::$6 ← (signed word) spline_8segB::p1_x#0 - (signed word) spline_8segB::p0_x#0
[239] (signed word) spline_8segB::b_x#0 ← (signed word~) spline_8segB::$6 << (byte) 1
[240] (signed word~) spline_8segB::$8 ← (signed word) spline_8segB::p1_y#0 - (signed word) spline_8segB::p0_y#0
[241] (signed word) spline_8segB::b_y#0 ← (signed word~) spline_8segB::$8 << (byte) 1
[242] (signed word~) spline_8segB::$10 ← (signed word) spline_8segB::b_x#0 << (byte) 3
[243] (signed word) spline_8segB::i_x#0 ← (signed word) spline_8segB::a_x#0 + (signed word~) spline_8segB::$10
[244] (signed word~) spline_8segB::$12 ← (signed word) spline_8segB::b_y#0 << (byte) 3
[245] (signed word) spline_8segB::i_y#0 ← (signed word) spline_8segB::a_y#0 + (signed word~) spline_8segB::$12
[246] (signed word) spline_8segB::j_x#0 ← (signed word) spline_8segB::a_x#0 << (byte) 1
[247] (signed word) spline_8segB::j_y#0 ← (signed word) spline_8segB::a_y#0 << (byte) 1
[248] (signed word) spline_8segB::p_x#0 ← (signed word) spline_8segB::p0_x#0 << (byte) 6
[249] (signed word) spline_8segB::p_y#0 ← (signed word) spline_8segB::p0_y#0 << (byte) 6
to:spline_8segB::@1
spline_8segB::@1: scope:[spline_8segB] from spline_8segB spline_8segB::@1
[252] (signed word) spline_8segB::i_y#2 ← phi( spline_8segB/(signed word) spline_8segB::i_y#0 spline_8segB::@1/(signed word) spline_8segB::i_y#1 )
[252] (signed word) spline_8segB::i_x#2 ← phi( spline_8segB/(signed word) spline_8segB::i_x#0 spline_8segB::@1/(signed word) spline_8segB::i_x#1 )
[252] (byte) spline_8segB::n#2 ← phi( spline_8segB/(byte) 0 spline_8segB::@1/(byte) spline_8segB::n#1 )
[252] (signed word) spline_8segB::p_y#2 ← phi( spline_8segB/(signed word) spline_8segB::p_y#0 spline_8segB::@1/(signed word) spline_8segB::p_y#1 )
[252] (signed word) spline_8segB::p_x#2 ← phi( spline_8segB/(signed word) spline_8segB::p_x#0 spline_8segB::@1/(signed word) spline_8segB::p_x#1 )
[253] (signed word~) spline_8segB::$22 ← (signed word) spline_8segB::p_x#2 + (signed byte) $20
[254] (signed word~) spline_8segB::$23 ← (signed word~) spline_8segB::$22 >> (byte) 6
[255] (signed word~) spline_8segB::$24 ← (signed word) spline_8segB::p_y#2 + (signed byte) $20
[256] (signed word~) spline_8segB::$25 ← (signed word~) spline_8segB::$24 >> (byte) 6
[257] (byte~) spline_8segB::$31 ← (byte) spline_8segB::n#2 << (byte) 2
[258] *((signed word*)(const struct SplineVector16*) SPLINE_8SEG + (byte~) spline_8segB::$31) ← (signed word~) spline_8segB::$23
[259] *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) spline_8segB::$31) ← (signed word~) spline_8segB::$25
[260] (signed word) spline_8segB::p_x#1 ← (signed word) spline_8segB::p_x#2 + (signed word) spline_8segB::i_x#2
[261] (signed word) spline_8segB::p_y#1 ← (signed word) spline_8segB::p_y#2 + (signed word) spline_8segB::i_y#2
[262] (signed word) spline_8segB::i_x#1 ← (signed word) spline_8segB::i_x#2 + (signed word) spline_8segB::j_x#0
[263] (signed word) spline_8segB::i_y#1 ← (signed word) spline_8segB::i_y#2 + (signed word) spline_8segB::j_y#0
[264] (byte) spline_8segB::n#1 ← ++ (byte) spline_8segB::n#2
[265] if((byte) spline_8segB::n#1!=(byte) 8) goto spline_8segB::@1
[250] (signed word) spline_8segB::i_y#2 ← phi( spline_8segB/(signed word) spline_8segB::i_y#0 spline_8segB::@1/(signed word) spline_8segB::i_y#1 )
[250] (signed word) spline_8segB::i_x#2 ← phi( spline_8segB/(signed word) spline_8segB::i_x#0 spline_8segB::@1/(signed word) spline_8segB::i_x#1 )
[250] (byte) spline_8segB::n#2 ← phi( spline_8segB/(byte) 0 spline_8segB::@1/(byte) spline_8segB::n#1 )
[250] (signed word) spline_8segB::p_y#2 ← phi( spline_8segB/(signed word) spline_8segB::p_y#0 spline_8segB::@1/(signed word) spline_8segB::p_y#1 )
[250] (signed word) spline_8segB::p_x#2 ← phi( spline_8segB/(signed word) spline_8segB::p_x#0 spline_8segB::@1/(signed word) spline_8segB::p_x#1 )
[251] (signed word~) spline_8segB::$22 ← (signed word) spline_8segB::p_x#2 + (signed byte) $20
[252] (signed word~) spline_8segB::$23 ← (signed word~) spline_8segB::$22 >> (byte) 6
[253] (signed word~) spline_8segB::$24 ← (signed word) spline_8segB::p_y#2 + (signed byte) $20
[254] (signed word~) spline_8segB::$25 ← (signed word~) spline_8segB::$24 >> (byte) 6
[255] (byte~) spline_8segB::$31 ← (byte) spline_8segB::n#2 << (byte) 2
[256] *((signed word*)(const struct SplineVector16*) SPLINE_8SEG + (byte~) spline_8segB::$31) ← (signed word~) spline_8segB::$23
[257] *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) spline_8segB::$31) ← (signed word~) spline_8segB::$25
[258] (signed word) spline_8segB::p_x#1 ← (signed word) spline_8segB::p_x#2 + (signed word) spline_8segB::i_x#2
[259] (signed word) spline_8segB::p_y#1 ← (signed word) spline_8segB::p_y#2 + (signed word) spline_8segB::i_y#2
[260] (signed word) spline_8segB::i_x#1 ← (signed word) spline_8segB::i_x#2 + (signed word) spline_8segB::j_x#0
[261] (signed word) spline_8segB::i_y#1 ← (signed word) spline_8segB::i_y#2 + (signed word) spline_8segB::j_y#0
[262] (byte) spline_8segB::n#1 ← ++ (byte) spline_8segB::n#2
[263] if((byte) spline_8segB::n#1!=(byte) 8) goto spline_8segB::@1
to:spline_8segB::@2
spline_8segB::@2: scope:[spline_8segB] from spline_8segB::@1
[266] (signed word~) spline_8segB::$18 ← (signed word) spline_8segB::p_x#1 + (signed byte) $20
[267] (signed word~) spline_8segB::$19 ← (signed word~) spline_8segB::$18 >> (byte) 6
[268] (signed word~) spline_8segB::$20 ← (signed word) spline_8segB::p_y#1 + (signed byte) $20
[269] (signed word~) spline_8segB::$21 ← (signed word~) spline_8segB::$20 >> (byte) 6
[270] *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(byte) 8*(const byte) SIZEOF_STRUCT_SPLINEVECTOR16) ← (signed word~) spline_8segB::$19
[271] *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) 8*(const byte) SIZEOF_STRUCT_SPLINEVECTOR16) ← (signed word~) spline_8segB::$21
[264] (signed word~) spline_8segB::$18 ← (signed word) spline_8segB::p_x#1 + (signed byte) $20
[265] (signed word~) spline_8segB::$19 ← (signed word~) spline_8segB::$18 >> (byte) 6
[266] (signed word~) spline_8segB::$20 ← (signed word) spline_8segB::p_y#1 + (signed byte) $20
[267] (signed word~) spline_8segB::$21 ← (signed word~) spline_8segB::$20 >> (byte) 6
[268] *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(byte) 8*(const byte) SIZEOF_STRUCT_SPLINEVECTOR16) ← (signed word~) spline_8segB::$19
[269] *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y+(byte) 8*(const byte) SIZEOF_STRUCT_SPLINEVECTOR16) ← (signed word~) spline_8segB::$21
to:spline_8segB::@return
spline_8segB::@return: scope:[spline_8segB] from spline_8segB::@2
[272] return
[270] return
to:@return
(void()) bitmap_plot_spline_8seg()
bitmap_plot_spline_8seg: scope:[bitmap_plot_spline_8seg] from show_letter::@8
[273] (signed word) bitmap_plot_spline_8seg::current_x#0 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG)
[274] (signed word) bitmap_plot_spline_8seg::current_y#0 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y)
[271] (signed word) bitmap_plot_spline_8seg::current_x#0 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG)
[272] (signed word) bitmap_plot_spline_8seg::current_y#0 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y)
to:bitmap_plot_spline_8seg::@1
bitmap_plot_spline_8seg::@1: scope:[bitmap_plot_spline_8seg] from bitmap_plot_spline_8seg bitmap_plot_spline_8seg::@2
[275] (signed word) bitmap_plot_spline_8seg::current_y#2 ← phi( bitmap_plot_spline_8seg/(signed word) bitmap_plot_spline_8seg::current_y#0 bitmap_plot_spline_8seg::@2/(signed word) bitmap_plot_spline_8seg::current_y#1 )
[275] (signed word) bitmap_plot_spline_8seg::current_x#2 ← phi( bitmap_plot_spline_8seg/(signed word) bitmap_plot_spline_8seg::current_x#0 bitmap_plot_spline_8seg::@2/(signed word) bitmap_plot_spline_8seg::current_x#1 )
[275] (byte) bitmap_plot_spline_8seg::n#2 ← phi( bitmap_plot_spline_8seg/(byte) 1 bitmap_plot_spline_8seg::@2/(byte) bitmap_plot_spline_8seg::n#1 )
[276] (byte~) bitmap_plot_spline_8seg::$4 ← (byte) bitmap_plot_spline_8seg::n#2 << (byte) 2
[277] (word) bitmap_line::x1#1 ← (word)(signed word) bitmap_plot_spline_8seg::current_x#2
[278] (word) bitmap_line::y1#1 ← (word)(signed word) bitmap_plot_spline_8seg::current_y#2
[279] (word) bitmap_line::x2#13 ← (word)*((signed word*)(const struct SplineVector16*) SPLINE_8SEG + (byte~) bitmap_plot_spline_8seg::$4)
[280] (word) bitmap_line::y2#13 ← (word)*((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) bitmap_plot_spline_8seg::$4)
[281] call bitmap_line
[273] (signed word) bitmap_plot_spline_8seg::current_y#2 ← phi( bitmap_plot_spline_8seg/(signed word) bitmap_plot_spline_8seg::current_y#0 bitmap_plot_spline_8seg::@2/(signed word) bitmap_plot_spline_8seg::current_y#1 )
[273] (signed word) bitmap_plot_spline_8seg::current_x#2 ← phi( bitmap_plot_spline_8seg/(signed word) bitmap_plot_spline_8seg::current_x#0 bitmap_plot_spline_8seg::@2/(signed word) bitmap_plot_spline_8seg::current_x#1 )
[273] (byte) bitmap_plot_spline_8seg::n#2 ← phi( bitmap_plot_spline_8seg/(byte) 1 bitmap_plot_spline_8seg::@2/(byte) bitmap_plot_spline_8seg::n#1 )
[274] (byte~) bitmap_plot_spline_8seg::$4 ← (byte) bitmap_plot_spline_8seg::n#2 << (byte) 2
[275] (word) bitmap_line::x1#1 ← (word)(signed word) bitmap_plot_spline_8seg::current_x#2
[276] (word) bitmap_line::y1#1 ← (word)(signed word) bitmap_plot_spline_8seg::current_y#2
[277] (word) bitmap_line::x2#13 ← (word)*((signed word*)(const struct SplineVector16*) SPLINE_8SEG + (byte~) bitmap_plot_spline_8seg::$4)
[278] (word) bitmap_line::y2#13 ← (word)*((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) bitmap_plot_spline_8seg::$4)
[279] call bitmap_line
to:bitmap_plot_spline_8seg::@2
bitmap_plot_spline_8seg::@2: scope:[bitmap_plot_spline_8seg] from bitmap_plot_spline_8seg::@1
[282] (signed word) bitmap_plot_spline_8seg::current_x#1 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG + (byte~) bitmap_plot_spline_8seg::$4)
[283] (signed word) bitmap_plot_spline_8seg::current_y#1 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) bitmap_plot_spline_8seg::$4)
[284] (byte) bitmap_plot_spline_8seg::n#1 ← ++ (byte) bitmap_plot_spline_8seg::n#2
[285] if((byte) bitmap_plot_spline_8seg::n#1!=(byte) 9) goto bitmap_plot_spline_8seg::@1
[280] (signed word) bitmap_plot_spline_8seg::current_x#1 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG + (byte~) bitmap_plot_spline_8seg::$4)
[281] (signed word) bitmap_plot_spline_8seg::current_y#1 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (byte~) bitmap_plot_spline_8seg::$4)
[282] (byte) bitmap_plot_spline_8seg::n#1 ← ++ (byte) bitmap_plot_spline_8seg::n#2
[283] if((byte) bitmap_plot_spline_8seg::n#1!=(byte) 9) goto bitmap_plot_spline_8seg::@1
to:bitmap_plot_spline_8seg::@return
bitmap_plot_spline_8seg::@return: scope:[bitmap_plot_spline_8seg] from bitmap_plot_spline_8seg::@2
[286] return
[284] 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
[287] (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 )
[287] (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 )
[288] (word) mulf16u::a#0 ← (word)(signed word) mulf16s::a#4
[289] (word) mulf16u::b#0 ← (word)(signed word) mulf16s::b#4
[290] call mulf16u
[291] (dword) mulf16u::return#2 ← (dword) mulf16u::return#0
[285] (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 )
[285] (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 )
[286] (word) mulf16u::a#0 ← (word)(signed word) mulf16s::a#4
[287] (word) mulf16u::b#0 ← (word)(signed word) mulf16s::b#4
[288] call mulf16u
[289] (dword) mulf16u::return#2 ← (dword) mulf16u::return#0
to:mulf16s::@5
mulf16s::@5: scope:[mulf16s] from mulf16s
[292] (dword) mulf16s::m#0 ← (dword) mulf16u::return#2
[293] if((signed word) mulf16s::a#4>=(signed byte) 0) goto mulf16s::@1
[290] (dword) mulf16s::m#0 ← (dword) mulf16u::return#2
[291] if((signed word) mulf16s::a#4>=(signed byte) 0) goto mulf16s::@1
to:mulf16s::@3
mulf16s::@3: scope:[mulf16s] from mulf16s::@5
[294] (word~) mulf16s::$6 ← > (dword) mulf16s::m#0
[295] (word~) mulf16s::$11 ← (word~) mulf16s::$6 - (word)(signed word) mulf16s::b#4
[296] (dword) mulf16s::m#1 ← (dword) mulf16s::m#0 hi= (word~) mulf16s::$11
[292] (word~) mulf16s::$6 ← > (dword) mulf16s::m#0
[293] (word~) mulf16s::$11 ← (word~) mulf16s::$6 - (word)(signed word) mulf16s::b#4
[294] (dword) mulf16s::m#1 ← (dword) mulf16s::m#0 hi= (word~) mulf16s::$11
to:mulf16s::@1
mulf16s::@1: scope:[mulf16s] from mulf16s::@3 mulf16s::@5
[297] (dword) mulf16s::m#5 ← phi( mulf16s::@3/(dword) mulf16s::m#1 mulf16s::@5/(dword) mulf16s::m#0 )
[298] if((signed word) mulf16s::b#4>=(signed byte) 0) goto mulf16s::@2
[295] (dword) mulf16s::m#5 ← phi( mulf16s::@3/(dword) mulf16s::m#1 mulf16s::@5/(dword) mulf16s::m#0 )
[296] if((signed word) mulf16s::b#4>=(signed byte) 0) goto mulf16s::@2
to:mulf16s::@4
mulf16s::@4: scope:[mulf16s] from mulf16s::@1
[299] (word~) mulf16s::$9 ← > (dword) mulf16s::m#5
[300] (word~) mulf16s::$12 ← (word~) mulf16s::$9 - (word)(signed word) mulf16s::a#4
[301] (dword) mulf16s::m#2 ← (dword) mulf16s::m#5 hi= (word~) mulf16s::$12
[297] (word~) mulf16s::$9 ← > (dword) mulf16s::m#5
[298] (word~) mulf16s::$12 ← (word~) mulf16s::$9 - (word)(signed word) mulf16s::a#4
[299] (dword) mulf16s::m#2 ← (dword) mulf16s::m#5 hi= (word~) mulf16s::$12
to:mulf16s::@2
mulf16s::@2: scope:[mulf16s] from mulf16s::@1 mulf16s::@4
[302] (dword) mulf16s::m#4 ← phi( mulf16s::@1/(dword) mulf16s::m#5 mulf16s::@4/(dword) mulf16s::m#2 )
[303] (signed dword) mulf16s::return#0 ← (signed dword)(dword) mulf16s::m#4
[300] (dword) mulf16s::m#4 ← phi( mulf16s::@1/(dword) mulf16s::m#5 mulf16s::@4/(dword) mulf16s::m#2 )
[301] (signed dword) mulf16s::return#0 ← (signed dword)(dword) mulf16s::m#4
to:mulf16s::@return
mulf16s::@return: scope:[mulf16s] from mulf16s::@2
[304] return
[302] return
to:@return
(word()) abs_u16((word) abs_u16::w)
abs_u16: scope:[abs_u16] from bitmap_line bitmap_line::@12
[305] (word) abs_u16::w#2 ← phi( bitmap_line/(word) abs_u16::w#0 bitmap_line::@12/(word) abs_u16::w#1 )
[306] (byte~) abs_u16::$0 ← > (word) abs_u16::w#2
[307] (byte~) abs_u16::$1 ← (byte~) abs_u16::$0 & (byte) $80
[308] if((byte) 0!=(byte~) abs_u16::$1) goto abs_u16::@1
[303] (word) abs_u16::w#2 ← phi( bitmap_line/(word) abs_u16::w#0 bitmap_line::@12/(word) abs_u16::w#1 )
[304] (byte~) abs_u16::$0 ← > (word) abs_u16::w#2
[305] (byte~) abs_u16::$1 ← (byte~) abs_u16::$0 & (byte) $80
[306] if((byte) 0!=(byte~) abs_u16::$1) goto abs_u16::@1
to:abs_u16::@return
abs_u16::@1: scope:[abs_u16] from abs_u16
[309] (word) abs_u16::return#2 ← - (word) abs_u16::w#2
[307] (word) abs_u16::return#2 ← - (word) abs_u16::w#2
to:abs_u16::@return
abs_u16::@return: scope:[abs_u16] from abs_u16 abs_u16::@1
[310] (word) abs_u16::return#4 ← phi( abs_u16::@1/(word) abs_u16::return#2 abs_u16/(word) abs_u16::w#2 )
[311] return
[308] (word) abs_u16::return#4 ← phi( abs_u16::@1/(word) abs_u16::return#2 abs_u16/(word) abs_u16::w#2 )
[309] return
to:@return
(word()) sgn_u16((word) sgn_u16::w)
sgn_u16: scope:[sgn_u16] from bitmap_line::@1 bitmap_line::@14
[312] (word) sgn_u16::w#2 ← phi( bitmap_line::@1/(word) sgn_u16::w#0 bitmap_line::@14/(word) sgn_u16::w#1 )
[313] (byte~) sgn_u16::$0 ← > (word) sgn_u16::w#2
[314] (byte~) sgn_u16::$1 ← (byte~) sgn_u16::$0 & (byte) $80
[315] if((byte) 0!=(byte~) sgn_u16::$1) goto sgn_u16::@1
[310] (word) sgn_u16::w#2 ← phi( bitmap_line::@1/(word) sgn_u16::w#0 bitmap_line::@14/(word) sgn_u16::w#1 )
[311] (byte~) sgn_u16::$0 ← > (word) sgn_u16::w#2
[312] (byte~) sgn_u16::$1 ← (byte~) sgn_u16::$0 & (byte) $80
[313] if((byte) 0!=(byte~) sgn_u16::$1) goto sgn_u16::@1
to:sgn_u16::@return
sgn_u16::@1: scope:[sgn_u16] from sgn_u16
[316] phi()
[314] phi()
to:sgn_u16::@return
sgn_u16::@return: scope:[sgn_u16] from sgn_u16 sgn_u16::@1
[317] (word) sgn_u16::return#4 ← phi( sgn_u16::@1/(byte) -1 sgn_u16/(byte) 1 )
[318] return
[315] (word) sgn_u16::return#4 ← phi( sgn_u16::@1/(byte) -1 sgn_u16/(byte) 1 )
[316] return
to:@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
[319] (word) bitmap_plot::x#4 ← phi( bitmap_line::@3/(word) bitmap_plot::x#2 bitmap_line::@4/(word) bitmap_plot::x#0 bitmap_line::@6/(word) bitmap_plot::x#1 bitmap_line::@9/(word) bitmap_plot::x#3 )
[319] (byte) bitmap_plot::y#4 ← phi( bitmap_line::@3/(byte) bitmap_plot::y#2 bitmap_line::@4/(byte) bitmap_plot::y#0 bitmap_line::@6/(byte) bitmap_plot::y#1 bitmap_line::@9/(byte) bitmap_plot::y#3 )
[320] (word) bitmap_plot::plotter#0 ← *((const to_nomodify byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#4) w= *((const to_nomodify byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#4)
[321] (word~) bitmap_plot::$0 ← (word) bitmap_plot::x#4 & (word) $fff8
[322] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$0
[323] (byte~) bitmap_plot::$1 ← < (word) bitmap_plot::x#4
[324] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const to_nomodify byte*) bitmap_plot_bit + (byte~) bitmap_plot::$1)
[317] (word) bitmap_plot::x#4 ← phi( bitmap_line::@3/(word) bitmap_plot::x#2 bitmap_line::@4/(word) bitmap_plot::x#0 bitmap_line::@6/(word) bitmap_plot::x#1 bitmap_line::@9/(word) bitmap_plot::x#3 )
[317] (byte) bitmap_plot::y#4 ← phi( bitmap_line::@3/(byte) bitmap_plot::y#2 bitmap_line::@4/(byte) bitmap_plot::y#0 bitmap_line::@6/(byte) bitmap_plot::y#1 bitmap_line::@9/(byte) bitmap_plot::y#3 )
[318] (word) bitmap_plot::plotter#0 ← *((const to_nomodify byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#4) w= *((const to_nomodify byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#4)
[319] (word~) bitmap_plot::$0 ← (word) bitmap_plot::x#4 & (word) $fff8
[320] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$0
[321] (byte~) bitmap_plot::$1 ← < (word) bitmap_plot::x#4
[322] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const to_nomodify byte*) bitmap_plot_bit + (byte~) bitmap_plot::$1)
to:bitmap_plot::@return
bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot
[325] return
[323] return
to:@return
(dword()) mulf16u((word) mulf16u::a , (word) mulf16u::b)
mulf16u: scope:[mulf16u] from mulf16s
[326] *((const nomodify word*) mulf16u::memA) ← (word) mulf16u::a#0
[327] *((const nomodify word*) mulf16u::memB) ← (word) mulf16u::b#0
[324] *((const nomodify word*) mulf16u::memA) ← (word) mulf16u::a#0
[325] *((const nomodify word*) mulf16u::memB) ← (word) mulf16u::b#0
asm { ldamemA stasm1a+1 stasm3a+1 stasm5a+1 stasm7a+1 eor#$ff stasm2a+1 stasm4a+1 stasm6a+1 stasm8a+1 ldamemA+1 stasm1b+1 stasm3b+1 stasm5b+1 stasm7b+1 eor#$ff stasm2b+1 stasm4b+1 stasm6b+1 stasm8b+1 ldxmemB sec sm1a: ldamulf_sqr1_lo,x sm2a: sbcmulf_sqr2_lo,x stamemR+0 sm3a: ldamulf_sqr1_hi,x sm4a: sbcmulf_sqr2_hi,x sta_AA+1 sec sm1b: ldamulf_sqr1_lo,x sm2b: sbcmulf_sqr2_lo,x sta_cc+1 sm3b: ldamulf_sqr1_hi,x sm4b: sbcmulf_sqr2_hi,x sta_CC+1 ldxmemB+1 sec sm5a: ldamulf_sqr1_lo,x sm6a: sbcmulf_sqr2_lo,x sta_bb+1 sm7a: ldamulf_sqr1_hi,x sm8a: sbcmulf_sqr2_hi,x sta_BB+1 sec sm5b: ldamulf_sqr1_lo,x sm6b: sbcmulf_sqr2_lo,x sta_dd+1 sm7b: ldamulf_sqr1_hi,x sm8b: sbcmulf_sqr2_hi,x stamemR+3 clc _AA: lda#0 _bb: adc#0 stamemR+1 _BB: lda#0 _CC: adc#0 stamemR+2 bcc!+ incmemR+3 clc !: _cc: lda#0 adcmemR+1 stamemR+1 _dd: lda#0 adcmemR+2 stamemR+2 bcc!+ incmemR+3 !: }
[329] (dword) mulf16u::return#0 ← *((const nomodify dword*) mulf16u::memR)
[327] (dword) mulf16u::return#0 ← *((const nomodify dword*) mulf16u::memR)
to:mulf16u::@return
mulf16u::@return: scope:[mulf16u] from mulf16u
[330] return
[328] return
to:@return

File diff suppressed because one or more lines are too long

View File

@ -487,10 +487,8 @@
(word) sgn_u16::w#1 w zp[2]:44 2.000000002E9
(word) sgn_u16::w#2 w zp[2]:44 1.2000000003E10
(void()) show_letter((byte) show_letter::angle)
(byte~) show_letter::$16 reg byte x 15001.5
(byte~) show_letter::$17 reg byte x 15001.5
(byte~) show_letter::$18 reg byte a 20002.0
(byte~) show_letter::$21 zp[1]:24 1290.4516129032259
(byte~) show_letter::$17 zp[1]:24 2069.1724137931037
(byte~) show_letter::$21 reg byte a 20002.0
(label) show_letter::@1
(label) show_letter::@2
(label) show_letter::@3
@ -502,18 +500,18 @@
(label) show_letter::@9
(label) show_letter::@return
(byte) show_letter::angle
(byte) show_letter::angle#0 angle zp[1]:2 357.375
(byte) show_letter::angle#0 angle zp[1]:2 370.6111111111111
(signed word) show_letter::current_x
(signed word) show_letter::current_x#10 current_x_1 zp[2]:25 810.8918918918919
(signed word) show_letter::current_x#10 current_x_1 zp[2]:25 857.2285714285714
(signed word) show_letter::current_x#11 current_x zp[2]:4 10001.0
(signed word) show_letter::current_x#4 current_x zp[2]:4 555.6111111111111
(signed word) show_letter::current_x#4 current_x zp[2]:4 588.2941176470588
(signed word) show_letter::current_y
(signed word) show_letter::current_y#10 current_y_1 zp[2]:27 810.8918918918919
(signed word) show_letter::current_y#10 current_y_1 zp[2]:27 857.2285714285714
(signed word) show_letter::current_y#11 current_y zp[2]:6 20002.0
(signed word) show_letter::current_y#4 current_y zp[2]:6 526.3684210526316
(signed word) show_letter::current_y#4 current_y zp[2]:6 555.6111111111111
(byte) show_letter::i
(byte) show_letter::i#1 i zp[1]:3 7500.75
(byte) show_letter::i#10 i zp[1]:3 1200.1200000000001
(byte) show_letter::i#10 i zp[1]:3 833.4166666666666
(struct SplineVector16) show_letter::segment_to
(signed word) show_letter::segment_to_x
(signed word) show_letter::segment_to_y
@ -521,9 +519,9 @@
(byte) show_letter::segment_type#0 reg byte a 15001.5
(struct SplineVector16) show_letter::segment_via
(signed word) show_letter::segment_via_x
(signed word) show_letter::segment_via_x#0 segment_via_x zp[2]:12 2500.25
(signed word) show_letter::segment_via_x#0 segment_via_x zp[2]:12 2857.4285714285716
(signed word) show_letter::segment_via_y
(signed word) show_letter::segment_via_y#0 segment_via_y zp[2]:14 2500.25
(signed word) show_letter::segment_via_y#0 segment_via_y zp[2]:14 2857.4285714285716
(signed word) show_letter::to_x
(signed word) show_letter::to_x#0 to_x zp[2]:8 10001.0
(signed word) show_letter::to_x#1 to_x zp[2]:8 10001.0
@ -635,12 +633,10 @@ reg byte a [ mulf_init::$5 ]
reg byte a [ bitmap_init::$4 ]
reg byte a [ bitmap_init::$5 ]
reg byte a [ bitmap_init::$6 ]
zp[1]:24 [ show_letter::$21 bitmap_init::$7 bitmap_plot_spline_8seg::n#2 bitmap_plot_spline_8seg::n#1 mulf_init::dir#2 mulf_init::dir#4 ]
reg byte x [ show_letter::$16 ]
reg byte a [ show_letter::$21 ]
zp[1]:24 [ show_letter::$17 bitmap_init::$7 bitmap_plot_spline_8seg::n#2 bitmap_plot_spline_8seg::n#1 mulf_init::dir#2 mulf_init::dir#4 ]
zp[2]:25 [ show_letter::current_x#10 spline_8segB::p2_x#0 ]
zp[2]:27 [ show_letter::current_y#10 spline_8segB::p2_y#0 ]
reg byte x [ show_letter::$17 ]
reg byte a [ show_letter::$18 ]
reg byte a [ show_letter::segment_type#0 ]
zp[2]:29 [ rotate::$10 rotate::xr#0 rotate::xr#1 abs_u16::return#4 abs_u16::return#2 abs_u16::w#2 abs_u16::w#0 abs_u16::w#1 abs_u16::return#0 abs_u16::return#1 bitmap_line::dy#0 ]
zp[2]:31 [ rotate::$12 rotate::$5 sgn_u16::return#4 sgn_u16::return#0 sgn_u16::return#1 bitmap_line::sy#0 ]

View File

@ -444,6 +444,7 @@ font_2x2: {
sta (next_2x2_left_1),y
// l2+1
iny
// >glyph_bits_2x2
// next_2x2_left[l2+1] = >glyph_bits_2x2
sta (next_2x2_left_1),y
// <glyph_bits_2x2
@ -453,6 +454,7 @@ font_2x2: {
sta (next_2x2_right),y
// l2+1
iny
// <glyph_bits_2x2
// next_2x2_right[l2+1] = <glyph_bits_2x2
sta (next_2x2_right),y
// l2 += 2

View File

@ -216,201 +216,203 @@ font_2x2::@5: scope:[font_2x2] from font_2x2::@3 font_2x2::@4
[108] if((byte) font_2x2::b#1!=(byte) 8) goto font_2x2::@3
to:font_2x2::@6
font_2x2::@6: scope:[font_2x2] from font_2x2::@5
[109] (byte~) font_2x2::$12 ← > (word) font_2x2::glyph_bits_2x2#2
[110] *((byte*) font_2x2::next_2x2_left#7 + (byte) font_2x2::l2#8) ← (byte~) font_2x2::$12
[109] (byte~) font_2x2::$10 ← > (word) font_2x2::glyph_bits_2x2#2
[110] *((byte*) font_2x2::next_2x2_left#7 + (byte) font_2x2::l2#8) ← (byte~) font_2x2::$10
[111] (byte~) font_2x2::$11 ← (byte) font_2x2::l2#8 + (byte) 1
[112] *((byte*) font_2x2::next_2x2_left#7 + (byte~) font_2x2::$11) ← (byte~) font_2x2::$12
[113] (byte~) font_2x2::$15 ← < (word) font_2x2::glyph_bits_2x2#2
[114] *((byte*) font_2x2::next_2x2_right#7 + (byte) font_2x2::l2#8) ← (byte~) font_2x2::$15
[115] (byte~) font_2x2::$14 ← (byte) font_2x2::l2#8 + (byte) 1
[116] *((byte*) font_2x2::next_2x2_right#7 + (byte~) font_2x2::$14) ← (byte~) font_2x2::$15
[117] (byte) font_2x2::l2#1 ← (byte) font_2x2::l2#8 + (byte) 2
[118] if((byte) font_2x2::l2#1!=(byte) 8) goto font_2x2::@8
[112] (byte~) font_2x2::$12 ← > (word) font_2x2::glyph_bits_2x2#2
[113] *((byte*) font_2x2::next_2x2_left#7 + (byte~) font_2x2::$11) ← (byte~) font_2x2::$12
[114] (byte~) font_2x2::$13 ← < (word) font_2x2::glyph_bits_2x2#2
[115] *((byte*) font_2x2::next_2x2_right#7 + (byte) font_2x2::l2#8) ← (byte~) font_2x2::$13
[116] (byte~) font_2x2::$14 ← (byte) font_2x2::l2#8 + (byte) 1
[117] (byte~) font_2x2::$15 ← < (word) font_2x2::glyph_bits_2x2#2
[118] *((byte*) font_2x2::next_2x2_right#7 + (byte~) font_2x2::$14) ← (byte~) font_2x2::$15
[119] (byte) font_2x2::l2#1 ← (byte) font_2x2::l2#8 + (byte) 2
[120] if((byte) font_2x2::l2#1!=(byte) 8) goto font_2x2::@8
to:font_2x2::@7
font_2x2::@7: scope:[font_2x2] from font_2x2::@6
[119] (byte*) font_2x2::next_2x2_left#1 ← (byte*) font_2x2::next_2x2_left#0 + (word)(number) $80*(number) 8
[120] (byte*) font_2x2::next_2x2_right#1 ← (byte*) font_2x2::next_2x2_left#0 + (word)(number) $c0*(number) 8
[121] (byte*) font_2x2::next_2x2_left#1 ← (byte*) font_2x2::next_2x2_left#0 + (word)(number) $80*(number) 8
[122] (byte*) font_2x2::next_2x2_right#1 ← (byte*) font_2x2::next_2x2_left#0 + (word)(number) $c0*(number) 8
to:font_2x2::@8
font_2x2::@8: scope:[font_2x2] from font_2x2::@6 font_2x2::@7
[121] (byte*) font_2x2::next_2x2_right#8 ← phi( font_2x2::@6/(byte*) font_2x2::next_2x2_right#7 font_2x2::@7/(byte*) font_2x2::next_2x2_right#1 )
[121] (byte) font_2x2::l2#9 ← phi( font_2x2::@6/(byte) font_2x2::l2#1 font_2x2::@7/(byte) 0 )
[121] (byte*) font_2x2::next_2x2_left#8 ← phi( font_2x2::@6/(byte*) font_2x2::next_2x2_left#7 font_2x2::@7/(byte*) font_2x2::next_2x2_left#1 )
[122] (byte) font_2x2::l#1 ← ++ (byte) font_2x2::l#2
[123] if((byte) font_2x2::l#1!=(byte) 8) goto font_2x2::@2
[123] (byte*) font_2x2::next_2x2_right#8 ← phi( font_2x2::@6/(byte*) font_2x2::next_2x2_right#7 font_2x2::@7/(byte*) font_2x2::next_2x2_right#1 )
[123] (byte) font_2x2::l2#9 ← phi( font_2x2::@6/(byte) font_2x2::l2#1 font_2x2::@7/(byte) 0 )
[123] (byte*) font_2x2::next_2x2_left#8 ← phi( font_2x2::@6/(byte*) font_2x2::next_2x2_left#7 font_2x2::@7/(byte*) font_2x2::next_2x2_left#1 )
[124] (byte) font_2x2::l#1 ← ++ (byte) font_2x2::l#2
[125] if((byte) font_2x2::l#1!=(byte) 8) goto font_2x2::@2
to:font_2x2::@9
font_2x2::@9: scope:[font_2x2] from font_2x2::@8
[124] (byte*) font_2x2::next_2x2#1 ← (byte*) font_2x2::next_2x2_left#0 + (byte) 8
[125] (byte*) font_2x2::next_original#1 ← (byte*) font_2x2::next_original#4 + (byte) 8
[126] (byte) font_2x2::c#1 ← ++ (byte) font_2x2::c#11
[127] if((byte) font_2x2::c#1!=(byte) $40) goto font_2x2::@1
[126] (byte*) font_2x2::next_2x2#1 ← (byte*) font_2x2::next_2x2_left#0 + (byte) 8
[127] (byte*) font_2x2::next_original#1 ← (byte*) font_2x2::next_original#4 + (byte) 8
[128] (byte) font_2x2::c#1 ← ++ (byte) font_2x2::c#11
[129] if((byte) font_2x2::c#1!=(byte) $40) goto font_2x2::@1
to:font_2x2::@return
font_2x2::@return: scope:[font_2x2] from font_2x2::@9
[128] return
[130] return
to:@return
(void()) font_2x2_to_sprites((byte*) font_2x2_to_sprites::font_2x2 , (byte*) font_2x2_to_sprites::sprites , (byte) font_2x2_to_sprites::num_chars)
font_2x2_to_sprites: scope:[font_2x2_to_sprites] from main::@9
[129] phi()
[131] phi()
to:font_2x2_to_sprites::@1
font_2x2_to_sprites::@1: scope:[font_2x2_to_sprites] from font_2x2_to_sprites font_2x2_to_sprites::@7
[130] (byte*) font_2x2_to_sprites::sprite#4 ← phi( font_2x2_to_sprites/(const nomodify byte*) SPRITES font_2x2_to_sprites::@7/(byte*) font_2x2_to_sprites::sprite#1 )
[130] (byte*) font_2x2_to_sprites::char_current#2 ← phi( font_2x2_to_sprites/(const byte*) FONT font_2x2_to_sprites::@7/(byte*) font_2x2_to_sprites::char_current#1 )
[130] (byte) font_2x2_to_sprites::c#2 ← phi( font_2x2_to_sprites/(byte) 0 font_2x2_to_sprites::@7/(byte) font_2x2_to_sprites::c#1 )
[131] if((byte) font_2x2_to_sprites::c#2<(const byte) font_2x2_to_sprites::num_chars#0) goto font_2x2_to_sprites::@2
[132] (byte*) font_2x2_to_sprites::sprite#4 ← phi( font_2x2_to_sprites/(const nomodify byte*) SPRITES font_2x2_to_sprites::@7/(byte*) font_2x2_to_sprites::sprite#1 )
[132] (byte*) font_2x2_to_sprites::char_current#2 ← phi( font_2x2_to_sprites/(const byte*) FONT font_2x2_to_sprites::@7/(byte*) font_2x2_to_sprites::char_current#1 )
[132] (byte) font_2x2_to_sprites::c#2 ← phi( font_2x2_to_sprites/(byte) 0 font_2x2_to_sprites::@7/(byte) font_2x2_to_sprites::c#1 )
[133] if((byte) font_2x2_to_sprites::c#2<(const byte) font_2x2_to_sprites::num_chars#0) goto font_2x2_to_sprites::@2
to:font_2x2_to_sprites::@return
font_2x2_to_sprites::@return: scope:[font_2x2_to_sprites] from font_2x2_to_sprites::@1
[132] return
[134] return
to:@return
font_2x2_to_sprites::@2: scope:[font_2x2_to_sprites] from font_2x2_to_sprites::@1
[133] (byte*) font_2x2_to_sprites::char_right#0 ← (byte*) font_2x2_to_sprites::char_current#2 + (word)(number) $40*(number) 8
[134] (byte*) font_2x2_to_sprites::char_left#6 ← (byte*) font_2x2_to_sprites::char_current#2
[135] (byte*) font_2x2_to_sprites::char_right#0 ← (byte*) font_2x2_to_sprites::char_current#2 + (word)(number) $40*(number) 8
[136] (byte*) font_2x2_to_sprites::char_left#6 ← (byte*) font_2x2_to_sprites::char_current#2
to:font_2x2_to_sprites::@3
font_2x2_to_sprites::@3: scope:[font_2x2_to_sprites] from font_2x2_to_sprites::@2 font_2x2_to_sprites::@5
[135] (byte*) font_2x2_to_sprites::char_right#3 ← phi( font_2x2_to_sprites::@2/(byte*) font_2x2_to_sprites::char_right#0 font_2x2_to_sprites::@5/(byte*) font_2x2_to_sprites::char_right#4 )
[135] (byte) font_2x2_to_sprites::sprite_idx#4 ← phi( font_2x2_to_sprites::@2/(byte) 0 font_2x2_to_sprites::@5/(byte) font_2x2_to_sprites::sprite_idx#3 )
[135] (byte*) font_2x2_to_sprites::char_left#3 ← phi( font_2x2_to_sprites::@2/(byte*) font_2x2_to_sprites::char_left#6 font_2x2_to_sprites::@5/(byte*) font_2x2_to_sprites::char_left#4 )
[135] (byte) font_2x2_to_sprites::i#2 ← phi( font_2x2_to_sprites::@2/(byte) 0 font_2x2_to_sprites::@5/(byte) font_2x2_to_sprites::i#1 )
[136] (byte~) font_2x2_to_sprites::$3 ← (byte) font_2x2_to_sprites::i#2 & (byte) 7
[137] *((byte*) font_2x2_to_sprites::sprite#4 + (byte) font_2x2_to_sprites::sprite_idx#4) ← *((byte*) font_2x2_to_sprites::char_left#3 + (byte~) font_2x2_to_sprites::$3)
[138] (byte) font_2x2_to_sprites::sprite_idx#1 ← ++ (byte) font_2x2_to_sprites::sprite_idx#4
[139] *((byte*) font_2x2_to_sprites::sprite#4 + (byte) font_2x2_to_sprites::sprite_idx#1) ← *((byte*) font_2x2_to_sprites::char_right#3 + (byte~) font_2x2_to_sprites::$3)
[140] (byte) font_2x2_to_sprites::sprite_idx#2 ← ++ (byte) font_2x2_to_sprites::sprite_idx#1
[141] *((byte*) font_2x2_to_sprites::sprite#4 + (byte) font_2x2_to_sprites::sprite_idx#2) ← (byte) 0
[142] (byte) font_2x2_to_sprites::sprite_idx#3 ← ++ (byte) font_2x2_to_sprites::sprite_idx#2
[143] if((byte) font_2x2_to_sprites::i#2==(byte) 7) goto font_2x2_to_sprites::@4
[137] (byte*) font_2x2_to_sprites::char_right#3 ← phi( font_2x2_to_sprites::@2/(byte*) font_2x2_to_sprites::char_right#0 font_2x2_to_sprites::@5/(byte*) font_2x2_to_sprites::char_right#4 )
[137] (byte) font_2x2_to_sprites::sprite_idx#4 ← phi( font_2x2_to_sprites::@2/(byte) 0 font_2x2_to_sprites::@5/(byte) font_2x2_to_sprites::sprite_idx#3 )
[137] (byte*) font_2x2_to_sprites::char_left#3 ← phi( font_2x2_to_sprites::@2/(byte*) font_2x2_to_sprites::char_left#6 font_2x2_to_sprites::@5/(byte*) font_2x2_to_sprites::char_left#4 )
[137] (byte) font_2x2_to_sprites::i#2 ← phi( font_2x2_to_sprites::@2/(byte) 0 font_2x2_to_sprites::@5/(byte) font_2x2_to_sprites::i#1 )
[138] (byte~) font_2x2_to_sprites::$3 ← (byte) font_2x2_to_sprites::i#2 & (byte) 7
[139] *((byte*) font_2x2_to_sprites::sprite#4 + (byte) font_2x2_to_sprites::sprite_idx#4) ← *((byte*) font_2x2_to_sprites::char_left#3 + (byte~) font_2x2_to_sprites::$3)
[140] (byte) font_2x2_to_sprites::sprite_idx#1 ← ++ (byte) font_2x2_to_sprites::sprite_idx#4
[141] *((byte*) font_2x2_to_sprites::sprite#4 + (byte) font_2x2_to_sprites::sprite_idx#1) ← *((byte*) font_2x2_to_sprites::char_right#3 + (byte~) font_2x2_to_sprites::$3)
[142] (byte) font_2x2_to_sprites::sprite_idx#2 ← ++ (byte) font_2x2_to_sprites::sprite_idx#1
[143] *((byte*) font_2x2_to_sprites::sprite#4 + (byte) font_2x2_to_sprites::sprite_idx#2) ← (byte) 0
[144] (byte) font_2x2_to_sprites::sprite_idx#3 ← ++ (byte) font_2x2_to_sprites::sprite_idx#2
[145] if((byte) font_2x2_to_sprites::i#2==(byte) 7) goto font_2x2_to_sprites::@4
to:font_2x2_to_sprites::@6
font_2x2_to_sprites::@6: scope:[font_2x2_to_sprites] from font_2x2_to_sprites::@3
[144] if((byte) font_2x2_to_sprites::i#2!=(byte) $f) goto font_2x2_to_sprites::@8
[146] if((byte) font_2x2_to_sprites::i#2!=(byte) $f) goto font_2x2_to_sprites::@8
to:font_2x2_to_sprites::@5
font_2x2_to_sprites::@8: scope:[font_2x2_to_sprites] from font_2x2_to_sprites::@6
[145] phi()
[147] phi()
to:font_2x2_to_sprites::@5
font_2x2_to_sprites::@5: scope:[font_2x2_to_sprites] from font_2x2_to_sprites::@4 font_2x2_to_sprites::@6 font_2x2_to_sprites::@8
[146] (byte*) font_2x2_to_sprites::char_right#4 ← phi( font_2x2_to_sprites::@4/(byte*) font_2x2_to_sprites::char_right#1 font_2x2_to_sprites::@8/(byte*) font_2x2_to_sprites::char_right#3 font_2x2_to_sprites::@6/(const byte*) FONT+(byte) ' '*(byte) 8 )
[146] (byte*) font_2x2_to_sprites::char_left#4 ← phi( font_2x2_to_sprites::@4/(byte*) font_2x2_to_sprites::char_left#1 font_2x2_to_sprites::@8/(byte*) font_2x2_to_sprites::char_left#3 font_2x2_to_sprites::@6/(const byte*) FONT+(byte) ' '*(byte) 8 )
[147] (byte) font_2x2_to_sprites::i#1 ← ++ (byte) font_2x2_to_sprites::i#2
[148] if((byte) font_2x2_to_sprites::i#1!=(byte) $15) goto font_2x2_to_sprites::@3
[148] (byte*) font_2x2_to_sprites::char_right#4 ← phi( font_2x2_to_sprites::@4/(byte*) font_2x2_to_sprites::char_right#1 font_2x2_to_sprites::@8/(byte*) font_2x2_to_sprites::char_right#3 font_2x2_to_sprites::@6/(const byte*) FONT+(byte) ' '*(byte) 8 )
[148] (byte*) font_2x2_to_sprites::char_left#4 ← phi( font_2x2_to_sprites::@4/(byte*) font_2x2_to_sprites::char_left#1 font_2x2_to_sprites::@8/(byte*) font_2x2_to_sprites::char_left#3 font_2x2_to_sprites::@6/(const byte*) FONT+(byte) ' '*(byte) 8 )
[149] (byte) font_2x2_to_sprites::i#1 ← ++ (byte) font_2x2_to_sprites::i#2
[150] if((byte) font_2x2_to_sprites::i#1!=(byte) $15) goto font_2x2_to_sprites::@3
to:font_2x2_to_sprites::@7
font_2x2_to_sprites::@7: scope:[font_2x2_to_sprites] from font_2x2_to_sprites::@5
[149] (byte*) font_2x2_to_sprites::char_current#1 ← (byte*) font_2x2_to_sprites::char_current#2 + (byte) 8
[150] (byte*) font_2x2_to_sprites::sprite#1 ← (byte*) font_2x2_to_sprites::sprite#4 + (byte) $40
[151] (byte) font_2x2_to_sprites::c#1 ← ++ (byte) font_2x2_to_sprites::c#2
[151] (byte*) font_2x2_to_sprites::char_current#1 ← (byte*) font_2x2_to_sprites::char_current#2 + (byte) 8
[152] (byte*) font_2x2_to_sprites::sprite#1 ← (byte*) font_2x2_to_sprites::sprite#4 + (byte) $40
[153] (byte) font_2x2_to_sprites::c#1 ← ++ (byte) font_2x2_to_sprites::c#2
to:font_2x2_to_sprites::@1
font_2x2_to_sprites::@4: scope:[font_2x2_to_sprites] from font_2x2_to_sprites::@3
[152] (byte*) font_2x2_to_sprites::char_left#1 ← (byte*) font_2x2_to_sprites::char_current#2 + (word)(number) $80*(number) 8
[153] (byte*) font_2x2_to_sprites::char_right#1 ← (byte*) font_2x2_to_sprites::char_current#2 + (word)(number) $c0*(number) 8
[154] (byte*) font_2x2_to_sprites::char_left#1 ← (byte*) font_2x2_to_sprites::char_current#2 + (word)(number) $80*(number) 8
[155] (byte*) font_2x2_to_sprites::char_right#1 ← (byte*) font_2x2_to_sprites::char_current#2 + (word)(number) $c0*(number) 8
to:font_2x2_to_sprites::@5
(void()) plexInit((byte*) plexInit::screen)
plexInit: scope:[plexInit] from main::@10
[154] phi()
[156] phi()
to:plexInit::plexSetScreen1
plexInit::plexSetScreen1: scope:[plexInit] from plexInit
[155] phi()
[157] phi()
to:plexInit::@1
plexInit::@1: scope:[plexInit] from plexInit::@1 plexInit::plexSetScreen1
[156] (byte) plexInit::i#2 ← phi( plexInit::@1/(byte) plexInit::i#1 plexInit::plexSetScreen1/(byte) 0 )
[157] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2
[158] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2
[159] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1
[158] (byte) plexInit::i#2 ← phi( plexInit::@1/(byte) plexInit::i#1 plexInit::plexSetScreen1/(byte) 0 )
[159] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2
[160] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2
[161] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1
to:plexInit::@return
plexInit::@return: scope:[plexInit] from plexInit::@1
[160] return
[162] return
to:@return
(void()) plex_move()
plex_move: scope:[plex_move] from main::@5 main::@7
[161] (byte*) scroll_text_next#27 ← phi( main::@5/(const byte*) SCROLL_TEXT main::@7/(byte*) scroll_text_next#14 )
[161] (byte) x_movement_idx#11 ← phi( main::@5/(byte) 0 main::@7/(byte) x_movement_idx#13 )
[161] (byte) y_sin_idx#11 ← phi( main::@5/(byte) 0 main::@7/(byte) y_sin_idx#13 )
[162] (byte) plex_move::y_idx#0 ← (byte) y_sin_idx#11
[163] (byte) plex_move::x_idx#0 ← (byte) x_movement_idx#11
[163] (byte*) scroll_text_next#27 ← phi( main::@5/(const byte*) SCROLL_TEXT main::@7/(byte*) scroll_text_next#14 )
[163] (byte) x_movement_idx#11 ← phi( main::@5/(byte) 0 main::@7/(byte) x_movement_idx#13 )
[163] (byte) y_sin_idx#11 ← phi( main::@5/(byte) 0 main::@7/(byte) y_sin_idx#13 )
[164] (byte) plex_move::y_idx#0 ← (byte) y_sin_idx#11
[165] (byte) plex_move::x_idx#0 ← (byte) x_movement_idx#11
to:plex_move::@1
plex_move::@1: scope:[plex_move] from plex_move plex_move::@2
[164] (byte*) scroll_text_next#12 ← phi( plex_move/(byte*) scroll_text_next#27 plex_move::@2/(byte*) scroll_text_next#14 )
[164] (byte) plex_move::x_idx#2 ← phi( plex_move/(byte) plex_move::x_idx#0 plex_move::@2/(byte) plex_move::x_idx#1 )
[164] (byte) plex_move::s#2 ← phi( plex_move/(byte) 0 plex_move::@2/(byte) plex_move::s#1 )
[164] (byte) plex_move::y_idx#2 ← phi( plex_move/(byte) plex_move::y_idx#0 plex_move::@2/(byte) plex_move::y_idx#1 )
[165] *((const byte*) PLEX_YPOS + (byte) plex_move::s#2) ← *((const byte*) YSIN + (byte) plex_move::y_idx#2)
[166] (byte) plex_move::y_idx#1 ← (byte) plex_move::y_idx#2 + (byte) 8
[167] (byte~) plex_move::$6 ← (byte) plex_move::s#2 << (byte) 1
[168] (word~) plex_move::$7 ← *((const nomodify byte*) XMOVEMENT_HI + (byte) plex_move::x_idx#2) w= *((const byte*) XMOVEMENT + (byte) plex_move::x_idx#2)
[169] *((const word*) PLEX_XPOS + (byte~) plex_move::$6) ← (word~) plex_move::$7
[170] if((byte) plex_move::x_idx#2!=(byte) 0) goto plex_move::@2
[166] (byte*) scroll_text_next#12 ← phi( plex_move/(byte*) scroll_text_next#27 plex_move::@2/(byte*) scroll_text_next#14 )
[166] (byte) plex_move::x_idx#2 ← phi( plex_move/(byte) plex_move::x_idx#0 plex_move::@2/(byte) plex_move::x_idx#1 )
[166] (byte) plex_move::s#2 ← phi( plex_move/(byte) 0 plex_move::@2/(byte) plex_move::s#1 )
[166] (byte) plex_move::y_idx#2 ← phi( plex_move/(byte) plex_move::y_idx#0 plex_move::@2/(byte) plex_move::y_idx#1 )
[167] *((const byte*) PLEX_YPOS + (byte) plex_move::s#2) ← *((const byte*) YSIN + (byte) plex_move::y_idx#2)
[168] (byte) plex_move::y_idx#1 ← (byte) plex_move::y_idx#2 + (byte) 8
[169] (byte~) plex_move::$6 ← (byte) plex_move::s#2 << (byte) 1
[170] (word~) plex_move::$7 ← *((const nomodify byte*) XMOVEMENT_HI + (byte) plex_move::x_idx#2) w= *((const byte*) XMOVEMENT + (byte) plex_move::x_idx#2)
[171] *((const word*) PLEX_XPOS + (byte~) plex_move::$6) ← (word~) plex_move::$7
[172] if((byte) plex_move::x_idx#2!=(byte) 0) goto plex_move::@2
to:plex_move::@4
plex_move::@4: scope:[plex_move] from plex_move::@1
[171] if(*((byte*) scroll_text_next#12)!=(byte) 0) goto plex_move::@6
[173] if(*((byte*) scroll_text_next#12)!=(byte) 0) goto plex_move::@6
to:plex_move::@3
plex_move::@6: scope:[plex_move] from plex_move::@4
[172] phi()
[174] phi()
to:plex_move::@3
plex_move::@3: scope:[plex_move] from plex_move::@4 plex_move::@6
[173] (byte*) scroll_text_next#13 ← phi( plex_move::@6/(byte*) scroll_text_next#12 plex_move::@4/(const byte*) SCROLL_TEXT )
[174] (byte~) plex_move::$4 ← (const byte) SPRITE_0#0 + *((byte*) scroll_text_next#13)
[175] *((const byte*) PLEX_PTR + (byte) plex_move::s#2) ← (byte~) plex_move::$4
[176] (byte*) scroll_text_next#3 ← ++ (byte*) scroll_text_next#13
[175] (byte*) scroll_text_next#13 ← phi( plex_move::@6/(byte*) scroll_text_next#12 plex_move::@4/(const byte*) SCROLL_TEXT )
[176] (byte~) plex_move::$4 ← (const byte) SPRITE_0#0 + *((byte*) scroll_text_next#13)
[177] *((const byte*) PLEX_PTR + (byte) plex_move::s#2) ← (byte~) plex_move::$4
[178] (byte*) scroll_text_next#3 ← ++ (byte*) scroll_text_next#13
to:plex_move::@2
plex_move::@2: scope:[plex_move] from plex_move::@1 plex_move::@3
[177] (byte*) scroll_text_next#14 ← phi( plex_move::@1/(byte*) scroll_text_next#12 plex_move::@3/(byte*) scroll_text_next#3 )
[178] (byte) plex_move::x_idx#1 ← (byte) plex_move::x_idx#2 + (byte) 8
[179] (byte) plex_move::s#1 ← ++ (byte) plex_move::s#2
[180] if((byte) plex_move::s#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plex_move::@1
[179] (byte*) scroll_text_next#14 ← phi( plex_move::@1/(byte*) scroll_text_next#12 plex_move::@3/(byte*) scroll_text_next#3 )
[180] (byte) plex_move::x_idx#1 ← (byte) plex_move::x_idx#2 + (byte) 8
[181] (byte) plex_move::s#1 ← ++ (byte) plex_move::s#2
[182] if((byte) plex_move::s#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plex_move::@1
to:plex_move::@5
plex_move::@5: scope:[plex_move] from plex_move::@2
[181] (byte) y_sin_idx#13 ← (byte) y_sin_idx#11 + (byte) 3
[182] (byte) x_movement_idx#13 ← ++ (byte) x_movement_idx#11
[183] (byte) y_sin_idx#13 ← (byte) y_sin_idx#11 + (byte) 3
[184] (byte) x_movement_idx#13 ← ++ (byte) x_movement_idx#11
to:plex_move::@return
plex_move::@return: scope:[plex_move] from plex_move::@5
[183] return
[185] return
to:@return
(void()) plexSort()
plexSort: scope:[plexSort] from main::@11 main::@13
[184] phi()
[186] phi()
to:plexSort::@1
plexSort::@1: scope:[plexSort] from plexSort plexSort::@2
[185] (byte) plexSort::m#2 ← phi( plexSort/(byte) 0 plexSort::@2/(byte) plexSort::m#1 )
[186] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2)
[187] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0)
[188] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2
[187] (byte) plexSort::m#2 ← phi( plexSort/(byte) 0 plexSort::@2/(byte) plexSort::m#1 )
[188] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2)
[189] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0)
[190] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2
to:plexSort::@5
plexSort::@5: scope:[plexSort] from plexSort::@1
[189] (byte) plexSort::s#6 ← (byte) plexSort::m#2
[191] (byte) plexSort::s#6 ← (byte) plexSort::m#2
to:plexSort::@3
plexSort::@3: scope:[plexSort] from plexSort::@5 plexSort::@7
[190] (byte) plexSort::s#3 ← phi( plexSort::@7/(byte) plexSort::s#1 plexSort::@5/(byte) plexSort::s#6 )
[191] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3)
[192] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3
[193] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4
[192] (byte) plexSort::s#3 ← phi( plexSort::@7/(byte) plexSort::s#1 plexSort::@5/(byte) plexSort::s#6 )
[193] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3)
[194] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3
[195] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4
to:plexSort::@7
plexSort::@7: scope:[plexSort] from plexSort::@3
[194] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3
[196] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3
to:plexSort::@4
plexSort::@4: scope:[plexSort] from plexSort::@3 plexSort::@7
[195] (byte) plexSort::s#2 ← ++ (byte) plexSort::s#1
[196] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0
[197] (byte) plexSort::s#2 ← ++ (byte) plexSort::s#1
[198] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0
to:plexSort::@2
plexSort::@2: scope:[plexSort] from plexSort::@1 plexSort::@4
[197] (byte) plexSort::m#1 ← ++ (byte) plexSort::m#2
[198] if((byte) plexSort::m#1!=(const nomodify byte) PLEX_COUNT-(byte) 2+(byte) 1) goto plexSort::@1
[199] (byte) plexSort::m#1 ← ++ (byte) plexSort::m#2
[200] if((byte) plexSort::m#1!=(const nomodify byte) PLEX_COUNT-(byte) 2+(byte) 1) goto plexSort::@1
to:plexSort::@6
plexSort::@6: scope:[plexSort] from plexSort::@2
[199] (volatile byte) plex_show_idx ← (byte) 0
[200] (volatile byte) plex_sprite_idx ← (byte) 0
[201] (volatile byte) plex_sprite_msb ← (byte) 1
[201] (volatile byte) plex_show_idx ← (byte) 0
[202] (volatile byte) plex_sprite_idx ← (byte) 0
[203] (volatile byte) plex_sprite_msb ← (byte) 1
to:plexSort::plexFreePrepare1
plexSort::plexFreePrepare1: scope:[plexSort] from plexSort::@6
[202] phi()
[204] phi()
to:plexSort::plexFreePrepare1_@1
plexSort::plexFreePrepare1_@1: scope:[plexSort] from plexSort::plexFreePrepare1 plexSort::plexFreePrepare1_@1
[203] (byte) plexSort::plexFreePrepare1_s#2 ← phi( plexSort::plexFreePrepare1/(byte) 0 plexSort::plexFreePrepare1_@1/(byte) plexSort::plexFreePrepare1_s#1 )
[204] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0
[205] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2
[206] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1
[205] (byte) plexSort::plexFreePrepare1_s#2 ← phi( plexSort::plexFreePrepare1/(byte) 0 plexSort::plexFreePrepare1_@1/(byte) plexSort::plexFreePrepare1_s#1 )
[206] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0
[207] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2
[208] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1
to:plexSort::plexFreePrepare1_@2
plexSort::plexFreePrepare1_@2: scope:[plexSort] from plexSort::plexFreePrepare1_@1
[207] (volatile byte) plex_free_next ← (byte) 0
[209] (volatile byte) plex_free_next ← (byte) 0
to:plexSort::@return
plexSort::@return: scope:[plexSort] from plexSort::plexFreePrepare1_@2
[208] return
[210] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -135,10 +135,12 @@
(byte*) __start::__init1_toSpritePtr1_sprite
(void()) font_2x2((byte*) font_2x2::font_original , (byte*) font_2x2::font_2x2)
(byte~) font_2x2::$1 reg byte a 200002.0
(byte~) font_2x2::$11 reg byte y 20002.0
(byte~) font_2x2::$12 reg byte a 10001.0
(byte~) font_2x2::$14 reg byte y 20002.0
(byte~) font_2x2::$15 reg byte a 10001.0
(byte~) font_2x2::$10 reg byte a 20002.0
(byte~) font_2x2::$11 reg byte y 10001.0
(byte~) font_2x2::$12 reg byte a 20002.0
(byte~) font_2x2::$13 reg byte a 20002.0
(byte~) font_2x2::$14 reg byte y 10001.0
(byte~) font_2x2::$15 reg byte a 20002.0
(word~) font_2x2::$5 zp[2]:23 200002.0
(word~) font_2x2::$7 zp[2]:23 200002.0
(label) font_2x2::@1
@ -156,7 +158,7 @@
(byte) font_2x2::b#2 reg byte y 20000.2
(byte) font_2x2::c
(byte) font_2x2::c#1 c zp[1]:16 1501.5
(byte) font_2x2::c#11 c zp[1]:16 58.88235294117647
(byte) font_2x2::c#11 c zp[1]:16 55.611111111111114
(byte*) font_2x2::font_2x2
(byte*) font_2x2::font_original
(byte) font_2x2::glyph_bit
@ -167,31 +169,31 @@
(byte) font_2x2::glyph_bits#2 glyph_bits zp[1]:13 34444.88888888889
(word) font_2x2::glyph_bits_2x2
(word) font_2x2::glyph_bits_2x2#1 glyph_bits_2x2 zp[2]:23 200002.0
(word) font_2x2::glyph_bits_2x2#2 glyph_bits_2x2 zp[2]:23 27500.5
(word) font_2x2::glyph_bits_2x2#2 glyph_bits_2x2 zp[2]:23 20000.500000000004
(word) font_2x2::glyph_bits_2x2#3 glyph_bits_2x2 zp[2]:23 40000.4
(byte) font_2x2::l
(byte) font_2x2::l#1 l zp[1]:29 15001.5
(byte) font_2x2::l#2 l zp[1]:29 1111.2222222222222
(byte) font_2x2::l#2 l zp[1]:29 1034.5862068965519
(byte) font_2x2::l2
(byte) font_2x2::l2#1 l2 zp[1]:28 15001.5
(byte) font_2x2::l2#8 l2 zp[1]:28 2727.5454545454545
(byte) font_2x2::l2#8 l2 zp[1]:28 2500.25
(byte) font_2x2::l2#9 l2 zp[1]:28 6667.333333333333
(byte*) font_2x2::next_2x2
(byte*) font_2x2::next_2x2#1 next_2x2 zp[2]:26 500.5
(byte*) font_2x2::next_2x2_left
(byte*) font_2x2::next_2x2_left#0 next_2x2_left zp[2]:26 750.1875
(byte*) font_2x2::next_2x2_left#0 next_2x2_left zp[2]:26 706.0588235294117
(byte*) font_2x2::next_2x2_left#1 next_2x2_left_1 zp[2]:7 10001.0
(byte*) font_2x2::next_2x2_left#10 next_2x2_left_1 zp[2]:7 2002.0
(byte*) font_2x2::next_2x2_left#7 next_2x2_left_1 zp[2]:7 1708.5416666666665
(byte*) font_2x2::next_2x2_left#7 next_2x2_left_1 zp[2]:7 1577.1153846153845
(byte*) font_2x2::next_2x2_left#8 next_2x2_left_1 zp[2]:7 10001.0
(byte*) font_2x2::next_2x2_right
(byte*) font_2x2::next_2x2_right#0 next_2x2_right zp[2]:9 1001.0
(byte*) font_2x2::next_2x2_right#1 next_2x2_right zp[2]:9 20002.0
(byte*) font_2x2::next_2x2_right#7 next_2x2_right zp[2]:9 1708.5416666666665
(byte*) font_2x2::next_2x2_right#7 next_2x2_right zp[2]:9 1577.1153846153845
(byte*) font_2x2::next_2x2_right#8 next_2x2_right zp[2]:9 10001.0
(byte*) font_2x2::next_original
(byte*) font_2x2::next_original#1 next_original zp[2]:5 667.3333333333334
(byte*) font_2x2::next_original#4 next_original zp[2]:5 363.7272727272727
(byte*) font_2x2::next_original#4 next_original zp[2]:5 342.9428571428572
(void()) font_2x2_to_sprites((byte*) font_2x2_to_sprites::font_2x2 , (byte*) font_2x2_to_sprites::sprites , (byte) font_2x2_to_sprites::num_chars)
(byte~) font_2x2_to_sprites::$3 zp[1]:28 10001.0
(label) font_2x2_to_sprites::@1
@ -418,10 +420,12 @@ reg byte a [ plexShowSprite::$9 ]
reg byte x [ plexShowSprite::$5 ]
reg byte a [ plexShowSprite::$6 ]
reg byte a [ font_2x2::$1 ]
reg byte a [ font_2x2::$12 ]
reg byte a [ font_2x2::$10 ]
reg byte y [ font_2x2::$11 ]
reg byte a [ font_2x2::$15 ]
reg byte a [ font_2x2::$12 ]
reg byte a [ font_2x2::$13 ]
reg byte y [ font_2x2::$14 ]
reg byte a [ font_2x2::$15 ]
reg byte y [ font_2x2_to_sprites::sprite_idx#2 ]
reg byte x [ plex_move::$6 ]
zp[2]:26 [ plex_move::$7 font_2x2_to_sprites::char_current#2 font_2x2_to_sprites::char_current#1 font_2x2::next_2x2_left#0 font_2x2::next_2x2#1 ]

View File

@ -82,13 +82,7 @@ mulf_init: {
// mulf_sqr2[1-i] = val
lda.z val
sta mulf_sqr2,x
// 1-i
tya
eor #$ff
tax
axs #-1-1
// (mulf_sqr2+$100)[1-i] = val
lda.z val
sta mulf_sqr2+$100,x
// sqr += add
lda.z sqr

View File

@ -33,195 +33,194 @@ mulf_init::@1: scope:[mulf_init] from mulf_init mulf_init::@1
[15] *((const byte*) mulf_sqr1+(word) $100 + (byte~) mulf_init::$2) ← (byte) mulf_init::val#0
[16] *((const byte*) mulf_sqr2+(byte) 1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0
[17] *((const byte*) mulf_sqr2+(word) $100+(byte) 1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0
[18] (byte~) mulf_init::$5 ← (byte) 1 - (byte) mulf_init::i#2
[19] *((const byte*) mulf_sqr2 + (byte~) mulf_init::$5) ← (byte) mulf_init::val#0
[20] (byte~) mulf_init::$6 ← (byte) 1 - (byte) mulf_init::i#2
[21] *((const byte*) mulf_sqr2+(word) $100 + (byte~) mulf_init::$6) ← (byte) mulf_init::val#0
[22] (signed word) mulf_init::sqr#1 ← (signed word) mulf_init::sqr#2 + (signed word) mulf_init::add#2
[23] (signed word) mulf_init::add#1 ← (signed word) mulf_init::add#2 + (signed byte) 2
[24] (byte) mulf_init::i#1 ← ++ (byte) mulf_init::i#2
[25] if((byte) mulf_init::i#1!=(byte) $81) goto mulf_init::@1
[18] (byte~) mulf_init::$6 ← (byte) 1 - (byte) mulf_init::i#2
[19] *((const byte*) mulf_sqr2 + (byte~) mulf_init::$6) ← (byte) mulf_init::val#0
[20] *((const byte*) mulf_sqr2+(word) $100 + (byte~) mulf_init::$6) ← (byte) mulf_init::val#0
[21] (signed word) mulf_init::sqr#1 ← (signed word) mulf_init::sqr#2 + (signed word) mulf_init::add#2
[22] (signed word) mulf_init::add#1 ← (signed word) mulf_init::add#2 + (signed byte) 2
[23] (byte) mulf_init::i#1 ← ++ (byte) mulf_init::i#2
[24] if((byte) mulf_init::i#1!=(byte) $81) goto mulf_init::@1
to:mulf_init::@return
mulf_init::@return: scope:[mulf_init] from mulf_init::@1
[26] return
[25] return
to:@return
(void()) print_cls()
print_cls: scope:[print_cls] from main::@1
[27] phi()
[28] call memset
[26] phi()
[27] call memset
to:print_cls::@return
print_cls::@return: scope:[print_cls] from print_cls
[29] return
[28] 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
[30] phi()
[31] call print_str
[29] phi()
[30] call print_str
to:do_perspective::@1
do_perspective::@1: scope:[do_perspective] from do_perspective
[32] phi()
[33] call print_schar
[31] phi()
[32] call print_schar
to:do_perspective::@2
do_perspective::@2: scope:[do_perspective] from do_perspective::@1
[34] phi()
[35] call print_str
[33] phi()
[34] call print_str
to:do_perspective::@3
do_perspective::@3: scope:[do_perspective] from do_perspective::@2
[36] phi()
[37] call print_schar
[35] phi()
[36] call print_schar
to:do_perspective::@4
do_perspective::@4: scope:[do_perspective] from do_perspective::@3
[38] phi()
[39] call print_str
[37] phi()
[38] call print_str
to:do_perspective::@5
do_perspective::@5: scope:[do_perspective] from do_perspective::@4
[40] phi()
[41] call print_schar
[39] phi()
[40] call print_schar
to:do_perspective::@6
do_perspective::@6: scope:[do_perspective] from do_perspective::@5
[42] phi()
[43] call print_str
[41] phi()
[42] call print_str
to:do_perspective::@7
do_perspective::@7: scope:[do_perspective] from do_perspective::@6
[44] phi()
[45] call perspective
[43] phi()
[44] call perspective
to:do_perspective::@8
do_perspective::@8: scope:[do_perspective] from do_perspective::@7
[46] (byte) print_uchar::b#6 ← (byte)*((const signed byte*) xr)
[47] call print_uchar
[45] (byte) print_uchar::b#6 ← (byte)*((const signed byte*) xr)
[46] call print_uchar
to:do_perspective::@9
do_perspective::@9: scope:[do_perspective] from do_perspective::@8
[48] phi()
[49] call print_str
[47] phi()
[48] call print_str
to:do_perspective::@10
do_perspective::@10: scope:[do_perspective] from do_perspective::@9
[50] (byte) print_uchar::b#5 ← (byte)*((const signed byte*) yr)
[51] call print_uchar
[49] (byte) print_uchar::b#5 ← (byte)*((const signed byte*) yr)
[50] call print_uchar
to:do_perspective::@11
do_perspective::@11: scope:[do_perspective] from do_perspective::@10
[52] phi()
[53] call print_str
[51] phi()
[52] call print_str
to:do_perspective::@12
do_perspective::@12: scope:[do_perspective] from do_perspective::@11
[54] phi()
[55] call print_ln
[53] phi()
[54] call print_ln
to:do_perspective::@return
do_perspective::@return: scope:[do_perspective] from do_perspective::@12
[56] return
[55] return
to:@return
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from print_cls
[57] phi()
[56] phi()
to:memset::@1
memset::@1: scope:[memset] from memset memset::@2
[58] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@2/(byte*) memset::dst#1 )
[59] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2
[57] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@2/(byte*) memset::dst#1 )
[58] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2
to:memset::@return
memset::@return: scope:[memset] from memset::@1
[60] return
[59] return
to:@return
memset::@2: scope:[memset] from memset::@1
[61] *((byte*) memset::dst#2) ← (const byte) memset::c#0
[62] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
[60] *((byte*) memset::dst#2) ← (const byte) memset::c#0
[61] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
to:memset::@1
(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
[63] (byte*) print_char_cursor#77 ← phi( do_perspective/(const byte*) print_screen#0 do_perspective::@11/(byte*) print_char_cursor#11 do_perspective::@2/(byte*) print_char_cursor#11 do_perspective::@4/(byte*) print_char_cursor#11 do_perspective::@6/(byte*) print_char_cursor#11 do_perspective::@9/(byte*) print_char_cursor#11 )
[63] (byte*) print_str::str#10 ← phi( do_perspective/(const byte*) do_perspective::str do_perspective::@11/(const byte*) do_perspective::str5 do_perspective::@2/(const byte*) do_perspective::str1 do_perspective::@4/(const byte*) do_perspective::str1 do_perspective::@6/(const byte*) do_perspective::str3 do_perspective::@9/(const byte*) do_perspective::str1 )
[62] (byte*) print_char_cursor#77 ← phi( do_perspective/(const byte*) print_screen#0 do_perspective::@11/(byte*) print_char_cursor#11 do_perspective::@2/(byte*) print_char_cursor#11 do_perspective::@4/(byte*) print_char_cursor#11 do_perspective::@6/(byte*) print_char_cursor#11 do_perspective::@9/(byte*) print_char_cursor#11 )
[62] (byte*) print_str::str#10 ← phi( do_perspective/(const byte*) do_perspective::str do_perspective::@11/(const byte*) do_perspective::str5 do_perspective::@2/(const byte*) do_perspective::str1 do_perspective::@4/(const byte*) do_perspective::str1 do_perspective::@6/(const byte*) do_perspective::str3 do_perspective::@9/(const byte*) do_perspective::str1 )
to:print_str::@1
print_str::@1: scope:[print_str] from print_str print_str::@3
[64] (byte*) print_char_cursor#1 ← phi( print_str/(byte*) print_char_cursor#77 print_str::@3/(byte*) print_char_cursor#11 )
[64] (byte*) print_str::str#7 ← phi( print_str/(byte*) print_str::str#10 print_str::@3/(byte*) print_str::str#0 )
[65] if((byte) 0!=*((byte*) print_str::str#7)) goto print_str::@2
[63] (byte*) print_char_cursor#1 ← phi( print_str/(byte*) print_char_cursor#77 print_str::@3/(byte*) print_char_cursor#11 )
[63] (byte*) print_str::str#7 ← phi( print_str/(byte*) print_str::str#10 print_str::@3/(byte*) print_str::str#0 )
[64] if((byte) 0!=*((byte*) print_str::str#7)) goto print_str::@2
to:print_str::@return
print_str::@return: scope:[print_str] from print_str::@1
[66] return
[65] return
to:@return
print_str::@2: scope:[print_str] from print_str::@1
[67] (byte) print_char::ch#0 ← *((byte*) print_str::str#7)
[68] call print_char
[66] (byte) print_char::ch#0 ← *((byte*) print_str::str#7)
[67] call print_char
to:print_str::@3
print_str::@3: scope:[print_str] from print_str::@2
[69] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#7
[68] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#7
to:print_str::@1
(void()) print_schar((signed byte) print_schar::b)
print_schar: scope:[print_schar] from do_perspective::@1 do_perspective::@3 do_perspective::@5
[70] (signed byte) print_schar::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 )
[71] if((signed byte) print_schar::b#4<(signed byte) 0) goto print_schar::@1
[69] (signed byte) print_schar::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 )
[70] if((signed byte) print_schar::b#4<(signed byte) 0) goto print_schar::@1
to:print_schar::@3
print_schar::@3: scope:[print_schar] from print_schar
[72] phi()
[73] call print_char
[71] phi()
[72] call print_char
to:print_schar::@2
print_schar::@2: scope:[print_schar] from print_schar::@3 print_schar::@4
[74] (signed byte) print_schar::b#6 ← phi( print_schar::@4/(signed byte) print_schar::b#0 print_schar::@3/(signed byte) print_schar::b#4 )
[75] (byte) print_uchar::b#0 ← (byte)(signed byte) print_schar::b#6
[76] call print_uchar
[73] (signed byte) print_schar::b#6 ← phi( print_schar::@4/(signed byte) print_schar::b#0 print_schar::@3/(signed byte) print_schar::b#4 )
[74] (byte) print_uchar::b#0 ← (byte)(signed byte) print_schar::b#6
[75] call print_uchar
to:print_schar::@return
print_schar::@return: scope:[print_schar] from print_schar::@2
[77] return
[76] return
to:@return
print_schar::@1: scope:[print_schar] from print_schar
[78] phi()
[79] call print_char
[77] phi()
[78] call print_char
to:print_schar::@4
print_schar::@4: scope:[print_schar] from print_schar::@1
[80] (signed byte) print_schar::b#0 ← - (signed byte) print_schar::b#4
[79] (signed byte) print_schar::b#0 ← - (signed byte) print_schar::b#4
to:print_schar::@2
(void()) perspective((signed byte) perspective::x , (signed byte) perspective::y , (signed byte) perspective::z)
perspective: scope:[perspective] from do_perspective::@7
[81] *((const signed byte*) xr) ← (const signed byte) do_perspective::x#0
[82] *((const signed byte*) yr) ← (const signed byte) do_perspective::y#0
[83] *((const signed byte*) zr) ← (const signed byte) do_perspective::z#0
[80] *((const signed byte*) xr) ← (const signed byte) do_perspective::x#0
[81] *((const signed byte*) yr) ← (const signed byte) do_perspective::y#0
[82] *((const signed byte*) zr) ← (const signed byte) do_perspective::z#0
asm { ldazr staPP+1 PP: ldaPERSP_Z stapsp1 eor#$ff stapsp2 clc ldyyr lda(psp1),y sbc(psp2),y adc#$80 stayr clc ldyxr lda(psp1),y sbc(psp2),y adc#$80 staxr }
to:perspective::@return
perspective::@return: scope:[perspective] from perspective
[85] return
[84] return
to:@return
(void()) print_uchar((byte) print_uchar::b)
print_uchar: scope:[print_uchar] from do_perspective::@10 do_perspective::@8 print_schar::@2
[86] (byte*) print_char_cursor#72 ← phi( do_perspective::@10/(byte*) print_char_cursor#1 do_perspective::@8/(byte*) print_char_cursor#1 print_schar::@2/(byte*) print_char_cursor#11 )
[86] (byte) print_uchar::b#3 ← phi( do_perspective::@10/(byte) print_uchar::b#5 do_perspective::@8/(byte) print_uchar::b#6 print_schar::@2/(byte) print_uchar::b#0 )
[87] (byte~) print_uchar::$0 ← (byte) print_uchar::b#3 >> (byte) 4
[88] (byte) print_char::ch#3 ← *((const to_nomodify byte*) print_hextab + (byte~) print_uchar::$0)
[89] call print_char
[85] (byte*) print_char_cursor#72 ← phi( do_perspective::@10/(byte*) print_char_cursor#1 do_perspective::@8/(byte*) print_char_cursor#1 print_schar::@2/(byte*) print_char_cursor#11 )
[85] (byte) print_uchar::b#3 ← phi( do_perspective::@10/(byte) print_uchar::b#5 do_perspective::@8/(byte) print_uchar::b#6 print_schar::@2/(byte) print_uchar::b#0 )
[86] (byte~) print_uchar::$0 ← (byte) print_uchar::b#3 >> (byte) 4
[87] (byte) print_char::ch#3 ← *((const to_nomodify byte*) print_hextab + (byte~) print_uchar::$0)
[88] call print_char
to:print_uchar::@1
print_uchar::@1: scope:[print_uchar] from print_uchar
[90] (byte~) print_uchar::$2 ← (byte) print_uchar::b#3 & (byte) $f
[91] (byte) print_char::ch#4 ← *((const to_nomodify byte*) print_hextab + (byte~) print_uchar::$2)
[92] call print_char
[89] (byte~) print_uchar::$2 ← (byte) print_uchar::b#3 & (byte) $f
[90] (byte) print_char::ch#4 ← *((const to_nomodify byte*) print_hextab + (byte~) print_uchar::$2)
[91] call print_char
to:print_uchar::@return
print_uchar::@return: scope:[print_uchar] from print_uchar::@1
[93] return
[92] return
to:@return
(void()) print_ln()
print_ln: scope:[print_ln] from do_perspective::@12
[94] phi()
[93] phi()
to:print_ln::@1
print_ln::@1: scope:[print_ln] from print_ln print_ln::@1
[95] (byte*) print_line_cursor#12 ← phi( print_ln/(const byte*) print_screen#0 print_ln::@1/(byte*) print_line_cursor#0 )
[96] (byte*) print_line_cursor#0 ← (byte*) print_line_cursor#12 + (byte) $28
[97] if((byte*) print_line_cursor#0<(byte*) print_char_cursor#1) goto print_ln::@1
[94] (byte*) print_line_cursor#12 ← phi( print_ln/(const byte*) print_screen#0 print_ln::@1/(byte*) print_line_cursor#0 )
[95] (byte*) print_line_cursor#0 ← (byte*) print_line_cursor#12 + (byte) $28
[96] if((byte*) print_line_cursor#0<(byte*) print_char_cursor#1) goto print_ln::@1
to:print_ln::@return
print_ln::@return: scope:[print_ln] from print_ln::@1
[98] return
[97] return
to:@return
(void()) print_char((byte) print_char::ch)
print_char: scope:[print_char] from print_schar::@1 print_schar::@3 print_str::@2 print_uchar print_uchar::@1
[99] (byte*) print_char_cursor#45 ← phi( print_schar::@1/(byte*) print_char_cursor#1 print_schar::@3/(byte*) print_char_cursor#1 print_str::@2/(byte*) print_char_cursor#1 print_uchar/(byte*) print_char_cursor#72 print_uchar::@1/(byte*) print_char_cursor#11 )
[99] (byte) print_char::ch#5 ← phi( print_schar::@1/(byte) '-' print_schar::@3/(byte) ' ' print_str::@2/(byte) print_char::ch#0 print_uchar/(byte) print_char::ch#3 print_uchar::@1/(byte) print_char::ch#4 )
[100] *((byte*) print_char_cursor#45) ← (byte) print_char::ch#5
[101] (byte*) print_char_cursor#11 ← ++ (byte*) print_char_cursor#45
[98] (byte*) print_char_cursor#45 ← phi( print_schar::@1/(byte*) print_char_cursor#1 print_schar::@3/(byte*) print_char_cursor#1 print_str::@2/(byte*) print_char_cursor#1 print_uchar/(byte*) print_char_cursor#72 print_uchar::@1/(byte*) print_char_cursor#11 )
[98] (byte) print_char::ch#5 ← phi( print_schar::@1/(byte) '-' print_schar::@3/(byte) ' ' print_str::@2/(byte) print_char::ch#0 print_uchar/(byte) print_char::ch#3 print_uchar::@1/(byte) print_char::ch#4 )
[99] *((byte*) print_char_cursor#45) ← (byte) print_char::ch#5
[100] (byte*) print_char_cursor#11 ← ++ (byte*) print_char_cursor#45
to:print_char::@return
print_char::@return: scope:[print_char] from print_char
[102] return
[101] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -144,21 +144,20 @@
(const void*) memset::str#0 str = (void*)(const byte*) print_screen#0
(void()) mulf_init()
(byte~) mulf_init::$2 reg byte x 151.5
(byte~) mulf_init::$5 reg byte x 202.0
(byte~) mulf_init::$6 reg byte x 202.0
(byte~) mulf_init::$6 reg byte x 151.5
(label) mulf_init::@1
(label) mulf_init::@return
(signed word) mulf_init::add
(signed word) mulf_init::add#1 add zp[2]:2 67.33333333333333
(signed word) mulf_init::add#2 add zp[2]:2 21.642857142857142
(signed word) mulf_init::add#2 add zp[2]:2 23.307692307692307
(byte) mulf_init::i
(byte) mulf_init::i#1 reg byte y 151.5
(byte) mulf_init::i#2 reg byte y 60.6
(byte) mulf_init::i#2 reg byte y 57.714285714285715
(signed word) mulf_init::sqr
(signed word) mulf_init::sqr#1 sqr zp[2]:4 50.5
(signed word) mulf_init::sqr#2 sqr zp[2]:4 23.307692307692307
(signed word) mulf_init::sqr#2 sqr zp[2]:4 25.25
(byte) mulf_init::val
(byte) mulf_init::val#0 val zp[1]:8 82.63636363636364
(byte) mulf_init::val#0 val zp[1]:8 90.89999999999999
(const byte*) mulf_sqr1[(number) $200] = { fill( $200, 0) }
(const byte*) mulf_sqr2[(number) $200] = { fill( $200, 0) }
(void()) perspective((signed byte) perspective::x , (signed byte) perspective::y , (signed byte) perspective::z)
@ -234,7 +233,6 @@ reg byte a [ print_char::ch#5 print_char::ch#0 print_char::ch#3 print_char::ch#4
zp[2]:6 [ print_char_cursor#45 print_char_cursor#72 print_char_cursor#1 print_char_cursor#77 print_char_cursor#11 ]
zp[1]:8 [ mulf_init::val#0 ]
reg byte x [ mulf_init::$2 ]
reg byte x [ mulf_init::$5 ]
reg byte x [ mulf_init::$6 ]
reg byte a [ print_uchar::$0 ]
reg byte x [ print_uchar::$2 ]

View File

@ -160,6 +160,7 @@ font_2x2: {
sta (next_2x2_left_1),y
// l2+1
iny
// >glyph_bits_2x2
// next_2x2_left[l2+1] = >glyph_bits_2x2
sta (next_2x2_left_1),y
// <glyph_bits_2x2
@ -169,6 +170,7 @@ font_2x2: {
sta (next_2x2_right),y
// l2+1
iny
// <glyph_bits_2x2
// next_2x2_right[l2+1] = <glyph_bits_2x2
sta (next_2x2_right),y
// l2 += 2

View File

@ -82,149 +82,151 @@ font_2x2::@5: scope:[font_2x2] from font_2x2::@3 font_2x2::@4
[39] if((byte) font_2x2::b#1!=(byte) 8) goto font_2x2::@3
to:font_2x2::@6
font_2x2::@6: scope:[font_2x2] from font_2x2::@5
[40] (byte~) font_2x2::$12 ← > (word) font_2x2::glyph_bits_2x2#2
[41] *((byte*) font_2x2::next_2x2_left#7 + (byte) font_2x2::l2#8) ← (byte~) font_2x2::$12
[40] (byte~) font_2x2::$10 ← > (word) font_2x2::glyph_bits_2x2#2
[41] *((byte*) font_2x2::next_2x2_left#7 + (byte) font_2x2::l2#8) ← (byte~) font_2x2::$10
[42] (byte~) font_2x2::$11 ← (byte) font_2x2::l2#8 + (byte) 1
[43] *((byte*) font_2x2::next_2x2_left#7 + (byte~) font_2x2::$11) ← (byte~) font_2x2::$12
[44] (byte~) font_2x2::$15 ← < (word) font_2x2::glyph_bits_2x2#2
[45] *((byte*) font_2x2::next_2x2_right#7 + (byte) font_2x2::l2#8) ← (byte~) font_2x2::$15
[46] (byte~) font_2x2::$14 ← (byte) font_2x2::l2#8 + (byte) 1
[47] *((byte*) font_2x2::next_2x2_right#7 + (byte~) font_2x2::$14) ← (byte~) font_2x2::$15
[48] (byte) font_2x2::l2#1 ← (byte) font_2x2::l2#8 + (byte) 2
[49] if((byte) font_2x2::l2#1!=(byte) 8) goto font_2x2::@8
[43] (byte~) font_2x2::$12 ← > (word) font_2x2::glyph_bits_2x2#2
[44] *((byte*) font_2x2::next_2x2_left#7 + (byte~) font_2x2::$11) ← (byte~) font_2x2::$12
[45] (byte~) font_2x2::$13 ← < (word) font_2x2::glyph_bits_2x2#2
[46] *((byte*) font_2x2::next_2x2_right#7 + (byte) font_2x2::l2#8) ← (byte~) font_2x2::$13
[47] (byte~) font_2x2::$14 ← (byte) font_2x2::l2#8 + (byte) 1
[48] (byte~) font_2x2::$15 ← < (word) font_2x2::glyph_bits_2x2#2
[49] *((byte*) font_2x2::next_2x2_right#7 + (byte~) font_2x2::$14) ← (byte~) font_2x2::$15
[50] (byte) font_2x2::l2#1 ← (byte) font_2x2::l2#8 + (byte) 2
[51] if((byte) font_2x2::l2#1!=(byte) 8) goto font_2x2::@8
to:font_2x2::@7
font_2x2::@7: scope:[font_2x2] from font_2x2::@6
[50] (byte*) font_2x2::next_2x2_left#1 ← (byte*) font_2x2::next_2x2_left#0 + (word)(number) $80*(number) 8
[51] (byte*) font_2x2::next_2x2_right#1 ← (byte*) font_2x2::next_2x2_left#0 + (word)(number) $c0*(number) 8
[52] (byte*) font_2x2::next_2x2_left#1 ← (byte*) font_2x2::next_2x2_left#0 + (word)(number) $80*(number) 8
[53] (byte*) font_2x2::next_2x2_right#1 ← (byte*) font_2x2::next_2x2_left#0 + (word)(number) $c0*(number) 8
to:font_2x2::@8
font_2x2::@8: scope:[font_2x2] from font_2x2::@6 font_2x2::@7
[52] (byte*) font_2x2::next_2x2_right#8 ← phi( font_2x2::@6/(byte*) font_2x2::next_2x2_right#7 font_2x2::@7/(byte*) font_2x2::next_2x2_right#1 )
[52] (byte) font_2x2::l2#9 ← phi( font_2x2::@6/(byte) font_2x2::l2#1 font_2x2::@7/(byte) 0 )
[52] (byte*) font_2x2::next_2x2_left#8 ← phi( font_2x2::@6/(byte*) font_2x2::next_2x2_left#7 font_2x2::@7/(byte*) font_2x2::next_2x2_left#1 )
[53] (byte) font_2x2::l#1 ← ++ (byte) font_2x2::l#2
[54] if((byte) font_2x2::l#1!=(byte) 8) goto font_2x2::@2
[54] (byte*) font_2x2::next_2x2_right#8 ← phi( font_2x2::@6/(byte*) font_2x2::next_2x2_right#7 font_2x2::@7/(byte*) font_2x2::next_2x2_right#1 )
[54] (byte) font_2x2::l2#9 ← phi( font_2x2::@6/(byte) font_2x2::l2#1 font_2x2::@7/(byte) 0 )
[54] (byte*) font_2x2::next_2x2_left#8 ← phi( font_2x2::@6/(byte*) font_2x2::next_2x2_left#7 font_2x2::@7/(byte*) font_2x2::next_2x2_left#1 )
[55] (byte) font_2x2::l#1 ← ++ (byte) font_2x2::l#2
[56] if((byte) font_2x2::l#1!=(byte) 8) goto font_2x2::@2
to:font_2x2::@9
font_2x2::@9: scope:[font_2x2] from font_2x2::@8
[55] (byte*) font_2x2::next_2x2#1 ← (byte*) font_2x2::next_2x2_left#0 + (byte) 8
[56] (byte*) font_2x2::next_original#1 ← (byte*) font_2x2::next_original#4 + (byte) 8
[57] (byte) font_2x2::c#1 ← ++ (byte) font_2x2::c#11
[58] if((byte) font_2x2::c#1!=(byte) $40) goto font_2x2::@1
[57] (byte*) font_2x2::next_2x2#1 ← (byte*) font_2x2::next_2x2_left#0 + (byte) 8
[58] (byte*) font_2x2::next_original#1 ← (byte*) font_2x2::next_original#4 + (byte) 8
[59] (byte) font_2x2::c#1 ← ++ (byte) font_2x2::c#11
[60] if((byte) font_2x2::c#1!=(byte) $40) goto font_2x2::@1
to:font_2x2::@return
font_2x2::@return: scope:[font_2x2] from font_2x2::@9
[59] return
[61] return
to:@return
(byte()) font_compress((byte*) font_compress::font_original , (byte*) font_compress::font_compressed , (byte*) font_compress::compress_mapping)
font_compress: scope:[font_compress] from main::@6
[60] phi()
[62] phi()
to:font_compress::@1
font_compress::@1: scope:[font_compress] from font_compress font_compress::@6
[61] (byte*) font_compress::next_compressed#4 ← phi( font_compress/(const nomodify byte*) FONT_COMPRESSED font_compress::@6/(byte*) font_compress::next_compressed#7 )
[61] (byte) font_compress::i#4 ← phi( font_compress/(byte) 0 font_compress::@6/(byte) font_compress::i#1 )
[61] (byte) font_compress::font_size#2 ← phi( font_compress/(byte) 0 font_compress::@6/(byte) font_compress::font_size#9 )
[61] (byte*) font_compress::next_original#2 ← phi( font_compress/(const nomodify byte*) FONT_ORIGINAL font_compress::@6/(byte*) font_compress::next_original#1 )
[62] (byte*) font_find::glyph#0 ← (byte*) font_compress::next_original#2
[63] (byte) font_find::font_size#0 ← (byte) font_compress::font_size#2
[64] call font_find
[65] (byte) font_find::return#0 ← (byte) font_find::return#3
[63] (byte*) font_compress::next_compressed#4 ← phi( font_compress/(const nomodify byte*) FONT_COMPRESSED font_compress::@6/(byte*) font_compress::next_compressed#7 )
[63] (byte) font_compress::i#4 ← phi( font_compress/(byte) 0 font_compress::@6/(byte) font_compress::i#1 )
[63] (byte) font_compress::font_size#2 ← phi( font_compress/(byte) 0 font_compress::@6/(byte) font_compress::font_size#9 )
[63] (byte*) font_compress::next_original#2 ← phi( font_compress/(const nomodify byte*) FONT_ORIGINAL font_compress::@6/(byte*) font_compress::next_original#1 )
[64] (byte*) font_find::glyph#0 ← (byte*) font_compress::next_original#2
[65] (byte) font_find::font_size#0 ← (byte) font_compress::font_size#2
[66] call font_find
[67] (byte) font_find::return#0 ← (byte) font_find::return#3
to:font_compress::@5
font_compress::@5: scope:[font_compress] from font_compress::@1
[66] (byte) font_compress::found#0 ← (byte) font_find::return#0
[67] if((byte) font_compress::found#0!=(byte) $ff) goto font_compress::@7
[68] (byte) font_compress::found#0 ← (byte) font_find::return#0
[69] if((byte) font_compress::found#0!=(byte) $ff) goto font_compress::@7
to:font_compress::@3
font_compress::@3: scope:[font_compress] from font_compress::@3 font_compress::@5
[68] (byte) font_compress::l#2 ← phi( font_compress::@3/(byte) font_compress::l#1 font_compress::@5/(byte) 0 )
[69] *((byte*) font_compress::next_compressed#4 + (byte) font_compress::l#2) ← *((byte*) font_compress::next_original#2 + (byte) font_compress::l#2)
[70] (byte) font_compress::l#1 ← ++ (byte) font_compress::l#2
[71] if((byte) font_compress::l#1!=(byte) 8) goto font_compress::@3
[70] (byte) font_compress::l#2 ← phi( font_compress::@3/(byte) font_compress::l#1 font_compress::@5/(byte) 0 )
[71] *((byte*) font_compress::next_compressed#4 + (byte) font_compress::l#2) ← *((byte*) font_compress::next_original#2 + (byte) font_compress::l#2)
[72] (byte) font_compress::l#1 ← ++ (byte) font_compress::l#2
[73] if((byte) font_compress::l#1!=(byte) 8) goto font_compress::@3
to:font_compress::@4
font_compress::@4: scope:[font_compress] from font_compress::@3
[72] (byte*) font_compress::next_compressed#1 ← (byte*) font_compress::next_compressed#4 + (byte) 8
[73] (byte) font_compress::font_size#1 ← ++ (byte) font_compress::font_size#2
[74] (byte) font_compress::found#3 ← (byte) font_compress::font_size#2
[74] (byte*) font_compress::next_compressed#1 ← (byte*) font_compress::next_compressed#4 + (byte) 8
[75] (byte) font_compress::font_size#1 ← ++ (byte) font_compress::font_size#2
[76] (byte) font_compress::found#3 ← (byte) font_compress::font_size#2
to:font_compress::@2
font_compress::@2: scope:[font_compress] from font_compress::@4 font_compress::@7
[75] (byte*) font_compress::next_compressed#7 ← phi( font_compress::@4/(byte*) font_compress::next_compressed#1 font_compress::@7/(byte*) font_compress::next_compressed#4 )
[75] (byte) font_compress::return#1 ← phi( font_compress::@4/(byte) font_compress::font_size#1 font_compress::@7/(byte) font_compress::return#5 )
[75] (byte) font_compress::found#2 ← phi( font_compress::@4/(byte) font_compress::found#3 font_compress::@7/(byte) font_compress::found#0 )
[76] *((const byte*) FONT_COMPRESSED_MAP + (byte) font_compress::i#4) ← (byte) font_compress::found#2
[77] (byte*) font_compress::next_original#1 ← (byte*) font_compress::next_original#2 + (byte) 8
[78] (byte) font_compress::i#1 ← ++ (byte) font_compress::i#4
[79] if((byte) font_compress::i#1!=(byte) 0) goto font_compress::@6
[77] (byte*) font_compress::next_compressed#7 ← phi( font_compress::@4/(byte*) font_compress::next_compressed#1 font_compress::@7/(byte*) font_compress::next_compressed#4 )
[77] (byte) font_compress::return#1 ← phi( font_compress::@4/(byte) font_compress::font_size#1 font_compress::@7/(byte) font_compress::return#5 )
[77] (byte) font_compress::found#2 ← phi( font_compress::@4/(byte) font_compress::found#3 font_compress::@7/(byte) font_compress::found#0 )
[78] *((const byte*) FONT_COMPRESSED_MAP + (byte) font_compress::i#4) ← (byte) font_compress::found#2
[79] (byte*) font_compress::next_original#1 ← (byte*) font_compress::next_original#2 + (byte) 8
[80] (byte) font_compress::i#1 ← ++ (byte) font_compress::i#4
[81] if((byte) font_compress::i#1!=(byte) 0) goto font_compress::@6
to:font_compress::@return
font_compress::@return: scope:[font_compress] from font_compress::@2
[80] return
[82] return
to:@return
font_compress::@6: scope:[font_compress] from font_compress::@2
[81] (byte) font_compress::font_size#9 ← (byte) font_compress::return#1
[83] (byte) font_compress::font_size#9 ← (byte) font_compress::return#1
to:font_compress::@1
font_compress::@7: scope:[font_compress] from font_compress::@5
[82] (byte) font_compress::return#5 ← (byte) font_compress::font_size#2
[84] (byte) font_compress::return#5 ← (byte) font_compress::font_size#2
to:font_compress::@2
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from main::@5
[83] phi()
[85] phi()
to:memset::@1
memset::@1: scope:[memset] from memset memset::@2
[84] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@2/(byte*) memset::dst#1 )
[85] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2
[86] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@2/(byte*) memset::dst#1 )
[87] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2
to:memset::@return
memset::@return: scope:[memset] from memset::@1
[86] return
[88] return
to:@return
memset::@2: scope:[memset] from memset::@1
[87] *((byte*) memset::dst#2) ← (byte) memset::c#0
[88] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
[89] *((byte*) memset::dst#2) ← (byte) memset::c#0
[90] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
to:memset::@1
(void()) show((byte) show::c , (byte) show::x , (byte) show::y , (byte*) show::font_mapping)
show: scope:[show] from main::@2
[89] (word~) show::$7 ← (word)(byte) show::y#0
[90] (word~) show::$8 ← (word~) show::$7 << (byte) 2
[91] (word~) show::$9 ← (word~) show::$8 + (word~) show::$7
[92] (word~) show::$0 ← (word~) show::$9 << (byte) 4
[93] (byte*~) show::$1 ← (const nomodify byte*) SCREEN + (word~) show::$0
[94] (byte~) show::$2 ← (byte) show::x#0 << (byte) 1
[95] (byte*) show::ptr#0 ← (byte*~) show::$1 + (byte~) show::$2
[96] *((byte*) show::ptr#0) ← *((const byte*) FONT_COMPRESSED_MAP + (byte) show::c#0)
[97] (byte~) show::$4 ← (byte) show::c#0
[98] *((byte*) show::ptr#0 + (byte) 1) ← *((const byte*) FONT_COMPRESSED_MAP+(byte) $40 + (byte~) show::$4)
[99] (byte~) show::$5 ← (byte) show::c#0
[100] *((byte*) show::ptr#0 + (byte) $28) ← *((const byte*) FONT_COMPRESSED_MAP+(byte) $80 + (byte~) show::$5)
[101] (byte~) show::$6 ← (byte) show::c#0
[102] *((byte*) show::ptr#0 + (byte) $29) ← *((const byte*) FONT_COMPRESSED_MAP+(byte) $c0 + (byte~) show::$6)
[91] (word~) show::$7 ← (word)(byte) show::y#0
[92] (word~) show::$8 ← (word~) show::$7 << (byte) 2
[93] (word~) show::$9 ← (word~) show::$8 + (word~) show::$7
[94] (word~) show::$0 ← (word~) show::$9 << (byte) 4
[95] (byte*~) show::$1 ← (const nomodify byte*) SCREEN + (word~) show::$0
[96] (byte~) show::$2 ← (byte) show::x#0 << (byte) 1
[97] (byte*) show::ptr#0 ← (byte*~) show::$1 + (byte~) show::$2
[98] *((byte*) show::ptr#0) ← *((const byte*) FONT_COMPRESSED_MAP + (byte) show::c#0)
[99] (byte~) show::$4 ← (byte) show::c#0
[100] *((byte*) show::ptr#0 + (byte) 1) ← *((const byte*) FONT_COMPRESSED_MAP+(byte) $40 + (byte~) show::$4)
[101] (byte~) show::$5 ← (byte) show::c#0
[102] *((byte*) show::ptr#0 + (byte) $28) ← *((const byte*) FONT_COMPRESSED_MAP+(byte) $80 + (byte~) show::$5)
[103] (byte~) show::$6 ← (byte) show::c#0
[104] *((byte*) show::ptr#0 + (byte) $29) ← *((const byte*) FONT_COMPRESSED_MAP+(byte) $c0 + (byte~) show::$6)
to:show::@return
show::@return: scope:[show] from show
[103] return
[105] return
to:@return
(byte()) font_find((byte*) font_find::glyph , (byte*) font_find::font , (byte) font_find::font_size)
font_find: scope:[font_find] from font_compress::@1
[104] phi()
[106] phi()
to:font_find::@1
font_find::@1: scope:[font_find] from font_find font_find::@5
[105] (byte*) font_find::font#4 ← phi( font_find/(const nomodify byte*) FONT_COMPRESSED font_find::@5/(byte*) font_find::font#1 )
[105] (byte) font_find::i#2 ← phi( font_find/(byte) 0 font_find::@5/(byte) font_find::i#1 )
[106] if((byte) font_find::i#2<(byte) font_find::font_size#0) goto font_find::@2
[107] (byte*) font_find::font#4 ← phi( font_find/(const nomodify byte*) FONT_COMPRESSED font_find::@5/(byte*) font_find::font#1 )
[107] (byte) font_find::i#2 ← phi( font_find/(byte) 0 font_find::@5/(byte) font_find::i#1 )
[108] if((byte) font_find::i#2<(byte) font_find::font_size#0) goto font_find::@2
to:font_find::@return
font_find::@return: scope:[font_find] from font_find::@1 font_find::@4
[107] (byte) font_find::return#3 ← phi( font_find::@1/(byte) $ff font_find::@4/(byte) font_find::i#2 )
[108] return
[109] (byte) font_find::return#3 ← phi( font_find::@1/(byte) $ff font_find::@4/(byte) font_find::i#2 )
[110] return
to:@return
font_find::@2: scope:[font_find] from font_find::@1 font_find::@3
[109] (byte) font_find::l#2 ← phi( font_find::@1/(byte) 0 font_find::@3/(byte) font_find::l#1 )
[110] if(*((byte*) font_find::glyph#0 + (byte) font_find::l#2)==*((byte*) font_find::font#4 + (byte) font_find::l#2)) goto font_find::@3
[111] (byte) font_find::l#2 ← phi( font_find::@1/(byte) 0 font_find::@3/(byte) font_find::l#1 )
[112] if(*((byte*) font_find::glyph#0 + (byte) font_find::l#2)==*((byte*) font_find::font#4 + (byte) font_find::l#2)) goto font_find::@3
to:font_find::@4
font_find::@3: scope:[font_find] from font_find::@2
[111] (byte) font_find::l#1 ← ++ (byte) font_find::l#2
[112] if((byte) font_find::l#1!=(byte) 8) goto font_find::@2
[113] (byte) font_find::l#1 ← ++ (byte) font_find::l#2
[114] if((byte) font_find::l#1!=(byte) 8) goto font_find::@2
to:font_find::@4
font_find::@4: scope:[font_find] from font_find::@2 font_find::@3
[113] (byte) font_find::found#2 ← phi( font_find::@3/(byte) 1 font_find::@2/(byte) 0 )
[114] if((byte) 0==(byte) font_find::found#2) goto font_find::@5
[115] (byte) font_find::found#2 ← phi( font_find::@3/(byte) 1 font_find::@2/(byte) 0 )
[116] if((byte) 0==(byte) font_find::found#2) goto font_find::@5
to:font_find::@return
font_find::@5: scope:[font_find] from font_find::@4
[115] (byte*) font_find::font#1 ← (byte*) font_find::font#4 + (byte) 8
[116] (byte) font_find::i#1 ← ++ (byte) font_find::i#2
[117] (byte*) font_find::font#1 ← (byte*) font_find::font#4 + (byte) 8
[118] (byte) font_find::i#1 ← ++ (byte) font_find::i#2
to:font_find::@1

File diff suppressed because it is too large Load Diff

View File

@ -93,10 +93,12 @@
(const nomodify byte*) SCREEN = (byte*) 1024
(void()) font_2x2((byte*) font_2x2::font_original , (byte*) font_2x2::font_2x2)
(byte~) font_2x2::$1 reg byte a 20002.0
(byte~) font_2x2::$11 reg byte y 2002.0
(byte~) font_2x2::$12 reg byte a 1001.0
(byte~) font_2x2::$14 reg byte y 2002.0
(byte~) font_2x2::$15 reg byte a 1001.0
(byte~) font_2x2::$10 reg byte a 2002.0
(byte~) font_2x2::$11 reg byte y 1001.0
(byte~) font_2x2::$12 reg byte a 2002.0
(byte~) font_2x2::$13 reg byte a 2002.0
(byte~) font_2x2::$14 reg byte y 1001.0
(byte~) font_2x2::$15 reg byte a 2002.0
(word~) font_2x2::$5 zp[2]:15 20002.0
(word~) font_2x2::$7 zp[2]:15 20002.0
(label) font_2x2::@1
@ -114,7 +116,7 @@
(byte) font_2x2::b#2 reg byte y 2000.2
(byte) font_2x2::c
(byte) font_2x2::c#1 c zp[1]:7 151.5
(byte) font_2x2::c#11 c zp[1]:7 5.9411764705882355
(byte) font_2x2::c#11 c zp[1]:7 5.611111111111111
(byte*) font_2x2::font_2x2
(byte*) font_2x2::font_original
(byte) font_2x2::glyph_bit
@ -125,31 +127,31 @@
(byte) font_2x2::glyph_bits#2 glyph_bits zp[1]:6 3444.8888888888887
(word) font_2x2::glyph_bits_2x2
(word) font_2x2::glyph_bits_2x2#1 glyph_bits_2x2 zp[2]:15 20002.0
(word) font_2x2::glyph_bits_2x2#2 glyph_bits_2x2 zp[2]:15 2750.5
(word) font_2x2::glyph_bits_2x2#2 glyph_bits_2x2 zp[2]:15 2000.5000000000002
(word) font_2x2::glyph_bits_2x2#3 glyph_bits_2x2 zp[2]:15 4000.4
(byte) font_2x2::l
(byte) font_2x2::l#1 l zp[1]:8 1501.5
(byte) font_2x2::l#2 l zp[1]:8 111.22222222222223
(byte) font_2x2::l#2 l zp[1]:8 103.55172413793102
(byte) font_2x2::l2
(byte) font_2x2::l2#1 l2 zp[1]:5 1501.5
(byte) font_2x2::l2#8 l2 zp[1]:5 273.0
(byte) font_2x2::l2#8 l2 zp[1]:5 250.25000000000003
(byte) font_2x2::l2#9 l2 zp[1]:5 667.3333333333334
(byte*) font_2x2::next_2x2
(byte*) font_2x2::next_2x2#1 next_2x2 zp[2]:17 50.5
(byte*) font_2x2::next_2x2_left
(byte*) font_2x2::next_2x2_left#0 next_2x2_left zp[2]:17 75.1875
(byte*) font_2x2::next_2x2_left#0 next_2x2_left zp[2]:17 70.76470588235294
(byte*) font_2x2::next_2x2_left#1 next_2x2_left_1 zp[2]:11 1001.0
(byte*) font_2x2::next_2x2_left#10 next_2x2_left_1 zp[2]:11 202.0
(byte*) font_2x2::next_2x2_left#7 next_2x2_left_1 zp[2]:11 171.04166666666669
(byte*) font_2x2::next_2x2_left#7 next_2x2_left_1 zp[2]:11 157.8846153846154
(byte*) font_2x2::next_2x2_left#8 next_2x2_left_1 zp[2]:11 1001.0
(byte*) font_2x2::next_2x2_right
(byte*) font_2x2::next_2x2_right#0 next_2x2_right zp[2]:13 101.0
(byte*) font_2x2::next_2x2_right#1 next_2x2_right zp[2]:13 2002.0
(byte*) font_2x2::next_2x2_right#7 next_2x2_right zp[2]:13 171.04166666666669
(byte*) font_2x2::next_2x2_right#7 next_2x2_right zp[2]:13 157.8846153846154
(byte*) font_2x2::next_2x2_right#8 next_2x2_right zp[2]:13 1001.0
(byte*) font_2x2::next_original
(byte*) font_2x2::next_original#1 next_original zp[2]:9 67.33333333333333
(byte*) font_2x2::next_original#4 next_original zp[2]:9 36.45454545454545
(byte*) font_2x2::next_original#4 next_original zp[2]:9 34.371428571428574
(byte()) font_compress((byte*) font_compress::font_original , (byte*) font_compress::font_compressed , (byte*) font_compress::compress_mapping)
(label) font_compress::@1
(label) font_compress::@2
@ -293,10 +295,12 @@ reg byte x [ memset::c#0 ]
reg byte x [ show::x#0 ]
reg byte a [ show::y#0 ]
reg byte a [ font_2x2::$1 ]
reg byte a [ font_2x2::$12 ]
reg byte a [ font_2x2::$10 ]
reg byte y [ font_2x2::$11 ]
reg byte a [ font_2x2::$15 ]
reg byte a [ font_2x2::$12 ]
reg byte a [ font_2x2::$13 ]
reg byte y [ font_2x2::$14 ]
reg byte a [ font_2x2::$15 ]
reg byte a [ font_find::return#0 ]
zp[2]:15 [ show::$7 show::$9 show::$0 show::$1 show::ptr#0 font_2x2::glyph_bits_2x2#3 font_2x2::glyph_bits_2x2#2 font_2x2::$5 font_2x2::$7 font_2x2::glyph_bits_2x2#1 ]
zp[2]:17 [ show::$8 font_compress::next_original#2 font_compress::next_original#1 font_find::glyph#0 font_2x2::next_2x2_left#0 font_2x2::next_2x2#1 ]

View File

@ -127,7 +127,7 @@ main: {
// Ie. the memory that will be pointed to is $100 * the passed page address. Only the lower 12bits of the passed value is used.
// memoryRemapBlock(byte register(X) blockPage)
memoryRemapBlock: {
.label pageOffset = $d
.label pageOffset = $b
// pageOffset = memoryPage-blockPage
stx.z $ff
lda #<$100
@ -188,16 +188,16 @@ memoryRemapBlock: {
// - If block 5 ($a000-$bfff) is remapped it will point to upperPageOffset*$100 + $a000.
// - If block 6 ($c000-$dfff) is remapped it will point to upperPageOffset*$100 + $c000.
// - If block 7 ($e000-$ffff) is remapped it will point to upperPageOffset*$100 + $e000.
// memoryRemap(byte register(Z) remapBlocks, word zp($d) lowerPageOffset, word zp(2) upperPageOffset)
// memoryRemap(byte register(Z) remapBlocks, word zp($b) lowerPageOffset, word zp($e) upperPageOffset)
memoryRemap: {
.label aVal = $fc
.label xVal = $fd
.label yVal = $fe
.label zVal = $ff
.label __1 = $f
.label __6 = 8
.label lowerPageOffset = $d
.label upperPageOffset = 2
.label __1 = $d
.label __6 = 6
.label lowerPageOffset = $b
.label upperPageOffset = $e
// <lowerPageOffset
lda.z lowerPageOffset
// *aVal = <lowerPageOffset
@ -268,7 +268,7 @@ memoryRemap: {
// - If block 5 ($a000-$bfff) is remapped it will point to upperPageOffset*$100 + $a000.
// - If block 6 ($c000-$dfff) is remapped it will point to upperPageOffset*$100 + $c000.
// - If block 7 ($e000-$ffff) is remapped it will point to upperPageOffset*$100 + $e000.
// memoryRemap256M(byte register(Z) remapBlocks, dword zp(4) lowerPageOffset)
// memoryRemap256M(byte register(Z) remapBlocks, dword zp(2) lowerPageOffset)
memoryRemap256M: {
.label lMb = $fa
.label uMb = $fb
@ -276,10 +276,11 @@ memoryRemap256M: {
.label xVal = $fd
.label yVal = $fe
.label zVal = $ff
.label __0 = 9
.label __6 = $f
.label __7 = $d
.label lowerPageOffset = 4
.label __0 = 7
.label __4 = $b
.label __6 = $d
.label __7 = $e
.label lowerPageOffset = 2
// lowerPageOffset>>4
lda.z lowerPageOffset+3
lsr
@ -314,11 +315,11 @@ memoryRemap256M: {
sta uMb
// <lowerPageOffset
lda.z lowerPageOffset
sta.z __7
sta.z __4
lda.z lowerPageOffset+1
sta.z __7+1
sta.z __4+1
// < <lowerPageOffset
lda.z __7
lda.z __4
// *aVal = < <lowerPageOffset
sta aVal
// remapBlocks << 4
@ -328,8 +329,12 @@ memoryRemap256M: {
asl
asl
sta.z __6
// <lowerPageOffset
lda.z lowerPageOffset
sta.z __7
lda.z lowerPageOffset+1
sta.z __7+1
// > <lowerPageOffset
lda.z __7+1
// > <lowerPageOffset & 0xf
and #$f
// (remapBlocks << 4) | (> <lowerPageOffset & 0xf)

View File

@ -95,19 +95,20 @@ memoryRemap256M: scope:[memoryRemap256M] from main::@3 main::@6
[52] (byte~) memoryRemap256M::$1 ← > (word)(dword~) memoryRemap256M::$0
[53] *((const byte*) memoryRemap256M::lMb) ← (byte~) memoryRemap256M::$1
[54] *((const byte*) memoryRemap256M::uMb) ← (byte) 0
[55] (word~) memoryRemap256M::$7 ← < (dword) memoryRemap256M::lowerPageOffset#2
[56] (byte~) memoryRemap256M::$5 ← < (word~) memoryRemap256M::$7
[55] (word~) memoryRemap256M::$4 ← < (dword) memoryRemap256M::lowerPageOffset#2
[56] (byte~) memoryRemap256M::$5 ← < (word~) memoryRemap256M::$4
[57] *((const byte*) memoryRemap256M::aVal) ← (byte~) memoryRemap256M::$5
[58] (byte~) memoryRemap256M::$6 ← (byte) memoryRemap256M::remapBlocks#2 << (byte) 4
[59] (byte~) memoryRemap256M::$8 ← > (word~) memoryRemap256M::$7
[60] (byte~) memoryRemap256M::$9 ← (byte~) memoryRemap256M::$8 & (byte) $f
[61] (byte~) memoryRemap256M::$10 ← (byte~) memoryRemap256M::$6 | (byte~) memoryRemap256M::$9
[62] *((const byte*) memoryRemap256M::xVal) ← (byte~) memoryRemap256M::$10
[63] *((const byte*) memoryRemap256M::yVal) ← (byte) 0
[64] (byte~) memoryRemap256M::$17 ← (byte) memoryRemap256M::remapBlocks#2 & (byte) $f0
[65] *((const byte*) memoryRemap256M::zVal) ← (byte~) memoryRemap256M::$17
[59] (word~) memoryRemap256M::$7 ← < (dword) memoryRemap256M::lowerPageOffset#2
[60] (byte~) memoryRemap256M::$8 ← > (word~) memoryRemap256M::$7
[61] (byte~) memoryRemap256M::$9 ← (byte~) memoryRemap256M::$8 & (byte) $f
[62] (byte~) memoryRemap256M::$10 ← (byte~) memoryRemap256M::$6 | (byte~) memoryRemap256M::$9
[63] *((const byte*) memoryRemap256M::xVal) ← (byte~) memoryRemap256M::$10
[64] *((const byte*) memoryRemap256M::yVal) ← (byte) 0
[65] (byte~) memoryRemap256M::$17 ← (byte) memoryRemap256M::remapBlocks#2 & (byte) $f0
[66] *((const byte*) memoryRemap256M::zVal) ← (byte~) memoryRemap256M::$17
asm { ldalMb ldx#$0f ldyuMb ldz#$00 map ldaaVal ldxxVal ldyyVal ldzzVal map eom }
to:memoryRemap256M::@return
memoryRemap256M::@return: scope:[memoryRemap256M] from memoryRemap256M
[67] return
[68] return
to:@return

View File

@ -761,9 +761,6 @@ Alias memoryRemapBlock::blockBits#0 = memoryRemapBlock::$2
Alias main::i#2 = main::i#3
Alias main::i1#2 = main::i1#3
Successful SSA optimization Pass2AliasElimination
Identified duplicate assignment right side [40] (word~) memoryRemap256M::$7 ← < (dword) memoryRemap256M::lowerPageOffset#2
Identified duplicate assignment right side [49] (word~) memoryRemap256M::$14 ← < (dword) memoryRemap256M::upperPageOffset#2
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition (bool~) main::$5 [72] if((byte) main::i#2<(byte) 6) goto main::@2
Simple Condition (bool~) main::$6 [82] if((byte) main::i1#2<(byte) $10) goto main::@5
Successful SSA optimization Pass2ConditionalJumpSimplification
@ -792,9 +789,6 @@ Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Alias memoryRemap256M::$7 = memoryRemap256M::$4
Alias memoryRemap256M::$14 = memoryRemap256M::$11
Successful SSA optimization Pass2AliasElimination
Rewriting division to use shift [19] (byte) memoryRemapBlock::block#0 ← (byte) memoryRemapBlock::blockPage#2 / (byte) $20
Successful SSA optimization Pass2MultiplyToShiftRewriting
Inlining constant with var siblings (const byte) memoryRemap::remapBlocks#1
@ -840,24 +834,28 @@ Identical Phi Values (word) memoryRemapBlock::memoryPage#2 (word) $100
Identical Phi Values (dword) memoryRemap256M::upperPageOffset#2 (byte) 0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [30] (dword~) memoryRemap256M::$2 ← (byte) 0 >> (byte) 4
Constant right-side identified [41] (word~) memoryRemap256M::$14 ← < (byte) 0
Constant right-side identified [42] (word~) memoryRemap256M::$11 ← < (byte) 0
Constant right-side identified [46] (word~) memoryRemap256M::$14 ← < (byte) 0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const dword) memoryRemap256M::$2 = 0>>4
Constant (const word) memoryRemap256M::$11 = <0
Constant (const word) memoryRemap256M::$14 = <0
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (word)memoryRemap256M::$2 in [31] (byte~) memoryRemap256M::$3 ← > (word)(const dword) memoryRemap256M::$2
Successful SSA optimization Pass2ConstantValues
Simplifying constant evaluating to zero (byte) 0>>(byte) 4 in
Simplifying constant evaluating to zero <(byte) 0 in
Simplifying constant evaluating to zero <(byte) 0 in
Simplifying constant evaluating to zero (word)(const dword) memoryRemap256M::$2 in [31] (byte~) memoryRemap256M::$3 ← > (word)(const dword) memoryRemap256M::$2
Successful SSA optimization PassNSimplifyConstantZero
Eliminating unused constant (const dword) memoryRemap256M::$2
Successful SSA optimization PassNEliminateUnusedVars
Constant inlined memoryRemap256M::$11 = (byte) 0
Constant inlined memoryRemap256M::$14 = (byte) 0
Successful SSA optimization Pass2ConstantInlining
Constant right-side identified [30] (byte~) memoryRemap256M::$3 ← > (word) 0
Constant right-side identified [40] (byte~) memoryRemap256M::$12 ← < (byte) 0
Constant right-side identified [43] (byte~) memoryRemap256M::$15 ← > (byte) 0
Constant right-side identified [41] (byte~) memoryRemap256M::$12 ← < (byte) 0
Constant right-side identified [44] (byte~) memoryRemap256M::$15 ← > (byte) 0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) memoryRemap256M::$3 = >0
Constant (const byte) memoryRemap256M::$12 = <0
@ -871,13 +869,13 @@ Constant inlined memoryRemap256M::$15 = (byte) 0
Constant inlined memoryRemap256M::$12 = (byte) 0
Constant inlined memoryRemap256M::$3 = (byte) 0
Successful SSA optimization Pass2ConstantInlining
Constant right-side identified [41] (byte~) memoryRemap256M::$16 ← (byte) 0 & (byte) $f
Constant right-side identified [42] (byte~) memoryRemap256M::$16 ← (byte) 0 & (byte) $f
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) memoryRemap256M::$16 = 0&$f
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero (byte) 0&(byte) $f in
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero memoryRemap256M::$13 in [42] (byte~) memoryRemap256M::$17 ← (byte~) memoryRemap256M::$13 | (const byte) memoryRemap256M::$16
Simplifying expression containing zero memoryRemap256M::$13 in [43] (byte~) memoryRemap256M::$17 ← (byte~) memoryRemap256M::$13 | (const byte) memoryRemap256M::$16
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant (const byte) memoryRemap256M::$16
Successful SSA optimization PassNEliminateUnusedVars
@ -1005,21 +1003,22 @@ memoryRemap256M: scope:[memoryRemap256M] from main::@3 main::@6
[52] (byte~) memoryRemap256M::$1 ← > (word)(dword~) memoryRemap256M::$0
[53] *((const byte*) memoryRemap256M::lMb) ← (byte~) memoryRemap256M::$1
[54] *((const byte*) memoryRemap256M::uMb) ← (byte) 0
[55] (word~) memoryRemap256M::$7 ← < (dword) memoryRemap256M::lowerPageOffset#2
[56] (byte~) memoryRemap256M::$5 ← < (word~) memoryRemap256M::$7
[55] (word~) memoryRemap256M::$4 ← < (dword) memoryRemap256M::lowerPageOffset#2
[56] (byte~) memoryRemap256M::$5 ← < (word~) memoryRemap256M::$4
[57] *((const byte*) memoryRemap256M::aVal) ← (byte~) memoryRemap256M::$5
[58] (byte~) memoryRemap256M::$6 ← (byte) memoryRemap256M::remapBlocks#2 << (byte) 4
[59] (byte~) memoryRemap256M::$8 ← > (word~) memoryRemap256M::$7
[60] (byte~) memoryRemap256M::$9 ← (byte~) memoryRemap256M::$8 & (byte) $f
[61] (byte~) memoryRemap256M::$10 ← (byte~) memoryRemap256M::$6 | (byte~) memoryRemap256M::$9
[62] *((const byte*) memoryRemap256M::xVal) ← (byte~) memoryRemap256M::$10
[63] *((const byte*) memoryRemap256M::yVal) ← (byte) 0
[64] (byte~) memoryRemap256M::$17 ← (byte) memoryRemap256M::remapBlocks#2 & (byte) $f0
[65] *((const byte*) memoryRemap256M::zVal) ← (byte~) memoryRemap256M::$17
[59] (word~) memoryRemap256M::$7 ← < (dword) memoryRemap256M::lowerPageOffset#2
[60] (byte~) memoryRemap256M::$8 ← > (word~) memoryRemap256M::$7
[61] (byte~) memoryRemap256M::$9 ← (byte~) memoryRemap256M::$8 & (byte) $f
[62] (byte~) memoryRemap256M::$10 ← (byte~) memoryRemap256M::$6 | (byte~) memoryRemap256M::$9
[63] *((const byte*) memoryRemap256M::xVal) ← (byte~) memoryRemap256M::$10
[64] *((const byte*) memoryRemap256M::yVal) ← (byte) 0
[65] (byte~) memoryRemap256M::$17 ← (byte) memoryRemap256M::remapBlocks#2 & (byte) $f0
[66] *((const byte*) memoryRemap256M::zVal) ← (byte~) memoryRemap256M::$17
asm { ldalMb ldx#$0f ldyuMb ldz#$00 map ldaaVal ldxxVal ldyyVal ldzzVal map eom }
to:memoryRemap256M::@return
memoryRemap256M::@return: scope:[memoryRemap256M] from memoryRemap256M
[67] return
[68] return
to:@return
@ -1365,15 +1364,16 @@ VARIABLE REGISTER WEIGHTS
(byte~) memoryRemap256M::$1 22.0
(byte~) memoryRemap256M::$10 22.0
(byte~) memoryRemap256M::$17 22.0
(word~) memoryRemap256M::$4 22.0
(byte~) memoryRemap256M::$5 22.0
(byte~) memoryRemap256M::$6 7.333333333333333
(word~) memoryRemap256M::$7 8.25
(byte~) memoryRemap256M::$6 5.5
(word~) memoryRemap256M::$7 22.0
(byte~) memoryRemap256M::$8 22.0
(byte~) memoryRemap256M::$9 22.0
(dword) memoryRemap256M::lowerPageOffset
(dword) memoryRemap256M::lowerPageOffset#2 4.4
(dword) memoryRemap256M::lowerPageOffset#2 3.666666666666667
(byte) memoryRemap256M::remapBlocks
(byte) memoryRemap256M::remapBlocks#2 1.5714285714285714
(byte) memoryRemap256M::remapBlocks#2 1.4666666666666666
(dword) memoryRemap256M::upperPageOffset
(void()) memoryRemapBlock((byte) memoryRemapBlock::blockPage , (word) memoryRemapBlock::memoryPage)
(byte) memoryRemapBlock::block
@ -1411,9 +1411,10 @@ Added variable memoryRemap::$8 to live range equivalence class [ memoryRemap::$8
Added variable memoryRemap::$9 to live range equivalence class [ memoryRemap::$9 ]
Added variable memoryRemap256M::$0 to live range equivalence class [ memoryRemap256M::$0 ]
Added variable memoryRemap256M::$1 to live range equivalence class [ memoryRemap256M::$1 ]
Added variable memoryRemap256M::$7 to live range equivalence class [ memoryRemap256M::$7 ]
Added variable memoryRemap256M::$4 to live range equivalence class [ memoryRemap256M::$4 ]
Added variable memoryRemap256M::$5 to live range equivalence class [ memoryRemap256M::$5 ]
Added variable memoryRemap256M::$6 to live range equivalence class [ memoryRemap256M::$6 ]
Added variable memoryRemap256M::$7 to live range equivalence class [ memoryRemap256M::$7 ]
Added variable memoryRemap256M::$8 to live range equivalence class [ memoryRemap256M::$8 ]
Added variable memoryRemap256M::$9 to live range equivalence class [ memoryRemap256M::$9 ]
Added variable memoryRemap256M::$10 to live range equivalence class [ memoryRemap256M::$10 ]
@ -1443,9 +1444,10 @@ Complete equivalence classes
[ memoryRemap::$9 ]
[ memoryRemap256M::$0 ]
[ memoryRemap256M::$1 ]
[ memoryRemap256M::$7 ]
[ memoryRemap256M::$4 ]
[ memoryRemap256M::$5 ]
[ memoryRemap256M::$6 ]
[ memoryRemap256M::$7 ]
[ memoryRemap256M::$8 ]
[ memoryRemap256M::$9 ]
[ memoryRemap256M::$10 ]
@ -1474,13 +1476,14 @@ Allocated zp[1]:28 [ memoryRemap::$8 ]
Allocated zp[1]:29 [ memoryRemap::$9 ]
Allocated zp[4]:30 [ memoryRemap256M::$0 ]
Allocated zp[1]:34 [ memoryRemap256M::$1 ]
Allocated zp[2]:35 [ memoryRemap256M::$7 ]
Allocated zp[2]:35 [ memoryRemap256M::$4 ]
Allocated zp[1]:37 [ memoryRemap256M::$5 ]
Allocated zp[1]:38 [ memoryRemap256M::$6 ]
Allocated zp[1]:39 [ memoryRemap256M::$8 ]
Allocated zp[1]:40 [ memoryRemap256M::$9 ]
Allocated zp[1]:41 [ memoryRemap256M::$10 ]
Allocated zp[1]:42 [ memoryRemap256M::$17 ]
Allocated zp[2]:39 [ memoryRemap256M::$7 ]
Allocated zp[1]:41 [ memoryRemap256M::$8 ]
Allocated zp[1]:42 [ memoryRemap256M::$9 ]
Allocated zp[1]:43 [ memoryRemap256M::$10 ]
Allocated zp[1]:44 [ memoryRemap256M::$17 ]
INITIAL ASM
Target platform is mega65 / MEGA45GS02
@ -1895,13 +1898,14 @@ memoryRemap256M: {
.label zVal = $ff
.label __0 = $1e
.label __1 = $22
.label __4 = $23
.label __5 = $25
.label __6 = $26
.label __7 = $23
.label __8 = $27
.label __9 = $28
.label __10 = $29
.label __17 = $2a
.label __7 = $27
.label __8 = $29
.label __9 = $2a
.label __10 = $2b
.label __17 = $2c
.label lowerPageOffset = $a
.label remapBlocks = $e
// [51] (dword~) memoryRemap256M::$0 ← (dword) memoryRemap256M::lowerPageOffset#2 >> (byte) 4 -- vduz1=vduz2_ror_4
@ -1938,13 +1942,13 @@ memoryRemap256M: {
// [54] *((const byte*) memoryRemap256M::uMb) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta uMb
// [55] (word~) memoryRemap256M::$7 ← < (dword) memoryRemap256M::lowerPageOffset#2 -- vwuz1=_lo_vduz2
// [55] (word~) memoryRemap256M::$4 ← < (dword) memoryRemap256M::lowerPageOffset#2 -- vwuz1=_lo_vduz2
lda.z lowerPageOffset
sta.z __7
sta.z __4
lda.z lowerPageOffset+1
sta.z __7+1
// [56] (byte~) memoryRemap256M::$5 ← < (word~) memoryRemap256M::$7 -- vbuz1=_lo_vwuz2
lda.z __7
sta.z __4+1
// [56] (byte~) memoryRemap256M::$5 ← < (word~) memoryRemap256M::$4 -- vbuz1=_lo_vwuz2
lda.z __4
sta.z __5
// [57] *((const byte*) memoryRemap256M::aVal) ← (byte~) memoryRemap256M::$5 -- _deref_pbuc1=vbuz1
lda.z __5
@ -1956,28 +1960,33 @@ memoryRemap256M: {
asl
asl
sta.z __6
// [59] (byte~) memoryRemap256M::$8 ← > (word~) memoryRemap256M::$7 -- vbuz1=_hi_vwuz2
// [59] (word~) memoryRemap256M::$7 ← < (dword) memoryRemap256M::lowerPageOffset#2 -- vwuz1=_lo_vduz2
lda.z lowerPageOffset
sta.z __7
lda.z lowerPageOffset+1
sta.z __7+1
// [60] (byte~) memoryRemap256M::$8 ← > (word~) memoryRemap256M::$7 -- vbuz1=_hi_vwuz2
lda.z __7+1
sta.z __8
// [60] (byte~) memoryRemap256M::$9 ← (byte~) memoryRemap256M::$8 & (byte) $f -- vbuz1=vbuz2_band_vbuc1
// [61] (byte~) memoryRemap256M::$9 ← (byte~) memoryRemap256M::$8 & (byte) $f -- vbuz1=vbuz2_band_vbuc1
lda #$f
and.z __8
sta.z __9
// [61] (byte~) memoryRemap256M::$10 ← (byte~) memoryRemap256M::$6 | (byte~) memoryRemap256M::$9 -- vbuz1=vbuz2_bor_vbuz3
// [62] (byte~) memoryRemap256M::$10 ← (byte~) memoryRemap256M::$6 | (byte~) memoryRemap256M::$9 -- vbuz1=vbuz2_bor_vbuz3
lda.z __6
ora.z __9
sta.z __10
// [62] *((const byte*) memoryRemap256M::xVal) ← (byte~) memoryRemap256M::$10 -- _deref_pbuc1=vbuz1
// [63] *((const byte*) memoryRemap256M::xVal) ← (byte~) memoryRemap256M::$10 -- _deref_pbuc1=vbuz1
lda.z __10
sta xVal
// [63] *((const byte*) memoryRemap256M::yVal) ← (byte) 0 -- _deref_pbuc1=vbuc2
// [64] *((const byte*) memoryRemap256M::yVal) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta yVal
// [64] (byte~) memoryRemap256M::$17 ← (byte) memoryRemap256M::remapBlocks#2 & (byte) $f0 -- vbuz1=vbuz2_band_vbuc1
// [65] (byte~) memoryRemap256M::$17 ← (byte) memoryRemap256M::remapBlocks#2 & (byte) $f0 -- vbuz1=vbuz2_band_vbuc1
lda #$f0
and.z remapBlocks
sta.z __17
// [65] *((const byte*) memoryRemap256M::zVal) ← (byte~) memoryRemap256M::$17 -- _deref_pbuc1=vbuz1
// [66] *((const byte*) memoryRemap256M::zVal) ← (byte~) memoryRemap256M::$17 -- _deref_pbuc1=vbuz1
lda.z __17
sta zVal
// asm { ldalMb ldx#$0f ldyuMb ldz#$00 map ldaaVal ldxxVal ldyyVal ldzzVal map eom }
@ -1995,7 +2004,7 @@ memoryRemap256M: {
jmp __breturn
// memoryRemap256M::@return
__breturn:
// [67] return
// [68] return
rts
}
// File Data
@ -2028,12 +2037,13 @@ Statement asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom } always clobbers reg b
Statement [51] (dword~) memoryRemap256M::$0 ← (dword) memoryRemap256M::lowerPageOffset#2 >> (byte) 4 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 memoryRemap256M::$0 ] ( memoryRemap256M:13 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 memoryRemap256M::$0 ] { } memoryRemap256M:17 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 memoryRemap256M::$0 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:14 [ memoryRemap256M::remapBlocks#2 ]
Statement [54] *((const byte*) memoryRemap256M::uMb) ← (byte) 0 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 ] ( memoryRemap256M:13 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 ] { } memoryRemap256M:17 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 ] { } ) always clobbers reg byte a
Statement [55] (word~) memoryRemap256M::$7 ← < (dword) memoryRemap256M::lowerPageOffset#2 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$7 ] ( memoryRemap256M:13 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$7 ] { } memoryRemap256M:17 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$7 ] { } ) always clobbers reg byte a
Statement [58] (byte~) memoryRemap256M::$6 ← (byte) memoryRemap256M::remapBlocks#2 << (byte) 4 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$7 memoryRemap256M::$6 ] ( memoryRemap256M:13 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$7 memoryRemap256M::$6 ] { } memoryRemap256M:17 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$7 memoryRemap256M::$6 ] { } ) always clobbers reg byte a
Statement [60] (byte~) memoryRemap256M::$9 ← (byte~) memoryRemap256M::$8 & (byte) $f [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 memoryRemap256M::$9 ] ( memoryRemap256M:13 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 memoryRemap256M::$9 ] { } memoryRemap256M:17 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 memoryRemap256M::$9 ] { } ) always clobbers reg byte a
Statement [55] (word~) memoryRemap256M::$4 ← < (dword) memoryRemap256M::lowerPageOffset#2 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 memoryRemap256M::$4 ] ( memoryRemap256M:13 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 memoryRemap256M::$4 ] { } memoryRemap256M:17 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 memoryRemap256M::$4 ] { } ) always clobbers reg byte a
Statement [58] (byte~) memoryRemap256M::$6 ← (byte) memoryRemap256M::remapBlocks#2 << (byte) 4 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 ] ( memoryRemap256M:13 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 ] { } memoryRemap256M:17 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 ] { } ) always clobbers reg byte a
Statement [59] (word~) memoryRemap256M::$7 ← < (dword) memoryRemap256M::lowerPageOffset#2 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 memoryRemap256M::$7 ] ( memoryRemap256M:13 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 memoryRemap256M::$7 ] { } memoryRemap256M:17 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 memoryRemap256M::$7 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:38 [ memoryRemap256M::$6 ]
Statement [63] *((const byte*) memoryRemap256M::yVal) ← (byte) 0 [ memoryRemap256M::remapBlocks#2 ] ( memoryRemap256M:13 [ memoryRemap256M::remapBlocks#2 ] { } memoryRemap256M:17 [ memoryRemap256M::remapBlocks#2 ] { } ) always clobbers reg byte a
Statement [64] (byte~) memoryRemap256M::$17 ← (byte) memoryRemap256M::remapBlocks#2 & (byte) $f0 [ memoryRemap256M::$17 ] ( memoryRemap256M:13 [ memoryRemap256M::$17 ] { } memoryRemap256M:17 [ memoryRemap256M::$17 ] { } ) always clobbers reg byte a
Statement [61] (byte~) memoryRemap256M::$9 ← (byte~) memoryRemap256M::$8 & (byte) $f [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 memoryRemap256M::$9 ] ( memoryRemap256M:13 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 memoryRemap256M::$9 ] { } memoryRemap256M:17 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 memoryRemap256M::$9 ] { } ) always clobbers reg byte a
Statement [64] *((const byte*) memoryRemap256M::yVal) ← (byte) 0 [ memoryRemap256M::remapBlocks#2 ] ( memoryRemap256M:13 [ memoryRemap256M::remapBlocks#2 ] { } memoryRemap256M:17 [ memoryRemap256M::remapBlocks#2 ] { } ) always clobbers reg byte a
Statement [65] (byte~) memoryRemap256M::$17 ← (byte) memoryRemap256M::remapBlocks#2 & (byte) $f0 [ memoryRemap256M::$17 ] ( memoryRemap256M:13 [ memoryRemap256M::$17 ] { } memoryRemap256M:17 [ memoryRemap256M::$17 ] { } ) always clobbers reg byte a
Statement asm { ldalMb ldx#$0f ldyuMb ldz#$00 map ldaaVal ldxxVal ldyyVal ldzzVal map eom } always clobbers reg byte a reg byte x reg byte y reg byte z
Statement [2] *((const byte*) main::BLOCK_4000) ← (byte) '-' [ ] ( [ ] { } ) always clobbers reg byte a
Statement [3] *((const byte*) main::BLOCK_4000+(byte) 1) ← (byte) '*' [ ] ( [ ] { } ) always clobbers reg byte a
@ -2055,11 +2065,12 @@ Statement [45] (byte~) memoryRemap::$8 ← (byte~) memoryRemap::$7 & (byte) $f [
Statement asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom } always clobbers reg byte a reg byte x reg byte y reg byte z
Statement [51] (dword~) memoryRemap256M::$0 ← (dword) memoryRemap256M::lowerPageOffset#2 >> (byte) 4 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 memoryRemap256M::$0 ] ( memoryRemap256M:13 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 memoryRemap256M::$0 ] { } memoryRemap256M:17 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 memoryRemap256M::$0 ] { } ) always clobbers reg byte a
Statement [54] *((const byte*) memoryRemap256M::uMb) ← (byte) 0 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 ] ( memoryRemap256M:13 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 ] { } memoryRemap256M:17 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 ] { } ) always clobbers reg byte a
Statement [55] (word~) memoryRemap256M::$7 ← < (dword) memoryRemap256M::lowerPageOffset#2 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$7 ] ( memoryRemap256M:13 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$7 ] { } memoryRemap256M:17 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$7 ] { } ) always clobbers reg byte a
Statement [58] (byte~) memoryRemap256M::$6 ← (byte) memoryRemap256M::remapBlocks#2 << (byte) 4 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$7 memoryRemap256M::$6 ] ( memoryRemap256M:13 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$7 memoryRemap256M::$6 ] { } memoryRemap256M:17 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$7 memoryRemap256M::$6 ] { } ) always clobbers reg byte a
Statement [60] (byte~) memoryRemap256M::$9 ← (byte~) memoryRemap256M::$8 & (byte) $f [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 memoryRemap256M::$9 ] ( memoryRemap256M:13 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 memoryRemap256M::$9 ] { } memoryRemap256M:17 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 memoryRemap256M::$9 ] { } ) always clobbers reg byte a
Statement [63] *((const byte*) memoryRemap256M::yVal) ← (byte) 0 [ memoryRemap256M::remapBlocks#2 ] ( memoryRemap256M:13 [ memoryRemap256M::remapBlocks#2 ] { } memoryRemap256M:17 [ memoryRemap256M::remapBlocks#2 ] { } ) always clobbers reg byte a
Statement [64] (byte~) memoryRemap256M::$17 ← (byte) memoryRemap256M::remapBlocks#2 & (byte) $f0 [ memoryRemap256M::$17 ] ( memoryRemap256M:13 [ memoryRemap256M::$17 ] { } memoryRemap256M:17 [ memoryRemap256M::$17 ] { } ) always clobbers reg byte a
Statement [55] (word~) memoryRemap256M::$4 ← < (dword) memoryRemap256M::lowerPageOffset#2 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 memoryRemap256M::$4 ] ( memoryRemap256M:13 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 memoryRemap256M::$4 ] { } memoryRemap256M:17 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 memoryRemap256M::$4 ] { } ) always clobbers reg byte a
Statement [58] (byte~) memoryRemap256M::$6 ← (byte) memoryRemap256M::remapBlocks#2 << (byte) 4 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 ] ( memoryRemap256M:13 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 ] { } memoryRemap256M:17 [ memoryRemap256M::lowerPageOffset#2 memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 ] { } ) always clobbers reg byte a
Statement [59] (word~) memoryRemap256M::$7 ← < (dword) memoryRemap256M::lowerPageOffset#2 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 memoryRemap256M::$7 ] ( memoryRemap256M:13 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 memoryRemap256M::$7 ] { } memoryRemap256M:17 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 memoryRemap256M::$7 ] { } ) always clobbers reg byte a
Statement [61] (byte~) memoryRemap256M::$9 ← (byte~) memoryRemap256M::$8 & (byte) $f [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 memoryRemap256M::$9 ] ( memoryRemap256M:13 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 memoryRemap256M::$9 ] { } memoryRemap256M:17 [ memoryRemap256M::remapBlocks#2 memoryRemap256M::$6 memoryRemap256M::$9 ] { } ) always clobbers reg byte a
Statement [64] *((const byte*) memoryRemap256M::yVal) ← (byte) 0 [ memoryRemap256M::remapBlocks#2 ] ( memoryRemap256M:13 [ memoryRemap256M::remapBlocks#2 ] { } memoryRemap256M:17 [ memoryRemap256M::remapBlocks#2 ] { } ) always clobbers reg byte a
Statement [65] (byte~) memoryRemap256M::$17 ← (byte) memoryRemap256M::remapBlocks#2 & (byte) $f0 [ memoryRemap256M::$17 ] ( memoryRemap256M:13 [ memoryRemap256M::$17 ] { } memoryRemap256M:17 [ memoryRemap256M::$17 ] { } ) always clobbers reg byte a
Statement asm { ldalMb ldx#$0f ldyuMb ldz#$00 map ldaaVal ldxxVal ldyyVal ldzzVal map eom } always clobbers reg byte a reg byte x reg byte y reg byte z
Potential registers zp[1]:2 [ main::i#2 main::i#1 ] : zp[1]:2 , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:3 [ main::i1#2 main::i1#1 ] : zp[1]:3 , reg byte x , reg byte y , reg byte z ,
@ -2085,17 +2096,18 @@ Potential registers zp[1]:28 [ memoryRemap::$8 ] : zp[1]:28 , reg byte a , reg b
Potential registers zp[1]:29 [ memoryRemap::$9 ] : zp[1]:29 , reg byte a , reg byte x , reg byte y , reg byte z ,
Potential registers zp[4]:30 [ memoryRemap256M::$0 ] : zp[4]:30 ,
Potential registers zp[1]:34 [ memoryRemap256M::$1 ] : zp[1]:34 , reg byte a , reg byte x , reg byte y , reg byte z ,
Potential registers zp[2]:35 [ memoryRemap256M::$7 ] : zp[2]:35 ,
Potential registers zp[2]:35 [ memoryRemap256M::$4 ] : zp[2]:35 ,
Potential registers zp[1]:37 [ memoryRemap256M::$5 ] : zp[1]:37 , reg byte a , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:38 [ memoryRemap256M::$6 ] : zp[1]:38 , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:39 [ memoryRemap256M::$8 ] : zp[1]:39 , reg byte a , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:40 [ memoryRemap256M::$9 ] : zp[1]:40 , reg byte a , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:41 [ memoryRemap256M::$10 ] : zp[1]:41 , reg byte a , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:42 [ memoryRemap256M::$17 ] : zp[1]:42 , reg byte a , reg byte x , reg byte y , reg byte z ,
Potential registers zp[2]:39 [ memoryRemap256M::$7 ] : zp[2]:39 ,
Potential registers zp[1]:41 [ memoryRemap256M::$8 ] : zp[1]:41 , reg byte a , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:42 [ memoryRemap256M::$9 ] : zp[1]:42 , reg byte a , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:43 [ memoryRemap256M::$10 ] : zp[1]:43 , reg byte a , reg byte x , reg byte y , reg byte z ,
Potential registers zp[1]:44 [ memoryRemap256M::$17 ] : zp[1]:44 , reg byte a , reg byte x , reg byte y , reg byte z ,
REGISTER UPLIFT SCOPES
Uplift Scope [memoryRemap] 202: zp[1]:20 [ memoryRemap::$0 ] 202: zp[1]:22 [ memoryRemap::$2 ] 202: zp[1]:23 [ memoryRemap::$3 ] 202: zp[1]:24 [ memoryRemap::$4 ] 202: zp[1]:25 [ memoryRemap::$5 ] 202: zp[1]:27 [ memoryRemap::$7 ] 202: zp[1]:28 [ memoryRemap::$8 ] 202: zp[1]:29 [ memoryRemap::$9 ] 67.33: zp[1]:21 [ memoryRemap::$1 ] 67.33: zp[1]:26 [ memoryRemap::$6 ] 64.25: zp[2]:5 [ memoryRemap::lowerPageOffset#2 memoryRemap::lowerPageOffset#0 ] 41.36: zp[2]:8 [ memoryRemap::upperPageOffset#2 memoryRemap::upperPageOffset#0 ] 28.63: zp[1]:7 [ memoryRemap::remapBlocks#2 memoryRemap::remapBlocks#0 ]
Uplift Scope [memoryRemap256M] 22: zp[1]:34 [ memoryRemap256M::$1 ] 22: zp[1]:37 [ memoryRemap256M::$5 ] 22: zp[1]:39 [ memoryRemap256M::$8 ] 22: zp[1]:40 [ memoryRemap256M::$9 ] 22: zp[1]:41 [ memoryRemap256M::$10 ] 22: zp[1]:42 [ memoryRemap256M::$17 ] 11: zp[4]:30 [ memoryRemap256M::$0 ] 8.25: zp[2]:35 [ memoryRemap256M::$7 ] 7.33: zp[1]:38 [ memoryRemap256M::$6 ] 4.4: zp[4]:10 [ memoryRemap256M::lowerPageOffset#2 ] 1.57: zp[1]:14 [ memoryRemap256M::remapBlocks#2 ]
Uplift Scope [memoryRemap256M] 22: zp[1]:34 [ memoryRemap256M::$1 ] 22: zp[2]:35 [ memoryRemap256M::$4 ] 22: zp[1]:37 [ memoryRemap256M::$5 ] 22: zp[2]:39 [ memoryRemap256M::$7 ] 22: zp[1]:41 [ memoryRemap256M::$8 ] 22: zp[1]:42 [ memoryRemap256M::$9 ] 22: zp[1]:43 [ memoryRemap256M::$10 ] 22: zp[1]:44 [ memoryRemap256M::$17 ] 11: zp[4]:30 [ memoryRemap256M::$0 ] 5.5: zp[1]:38 [ memoryRemap256M::$6 ] 3.67: zp[4]:10 [ memoryRemap256M::lowerPageOffset#2 ] 1.47: zp[1]:14 [ memoryRemap256M::remapBlocks#2 ]
Uplift Scope [main] 40.33: zp[1]:2 [ main::i#2 main::i#1 ] 35.75: zp[1]:3 [ main::i1#2 main::i1#1 ] 22: zp[1]:15 [ main::$7 ]
Uplift Scope [memoryRemapBlock] 22: zp[1]:18 [ memoryRemapBlock::block#0 ] 22: zp[1]:19 [ memoryRemapBlock::blockBits#0 ] 11: zp[1]:4 [ memoryRemapBlock::blockPage#2 ] 6.6: zp[2]:16 [ memoryRemapBlock::pageOffset#0 ]
Uplift Scope [MOS6526_CIA]
@ -2108,56 +2120,57 @@ Uplift Scope [DMA_LIST_F018A]
Uplift Scope [DMA_LIST_F018B]
Uplift Scope []
Uplifting [memoryRemap] best 1438 combination reg byte a [ memoryRemap::$0 ] reg byte a [ memoryRemap::$2 ] reg byte a [ memoryRemap::$3 ] zp[1]:24 [ memoryRemap::$4 ] zp[1]:25 [ memoryRemap::$5 ] zp[1]:27 [ memoryRemap::$7 ] zp[1]:28 [ memoryRemap::$8 ] zp[1]:29 [ memoryRemap::$9 ] zp[1]:21 [ memoryRemap::$1 ] zp[1]:26 [ memoryRemap::$6 ] zp[2]:5 [ memoryRemap::lowerPageOffset#2 memoryRemap::lowerPageOffset#0 ] zp[2]:8 [ memoryRemap::upperPageOffset#2 memoryRemap::upperPageOffset#0 ] zp[1]:7 [ memoryRemap::remapBlocks#2 memoryRemap::remapBlocks#0 ]
Uplifting [memoryRemap] best 1450 combination reg byte a [ memoryRemap::$0 ] reg byte a [ memoryRemap::$2 ] reg byte a [ memoryRemap::$3 ] zp[1]:24 [ memoryRemap::$4 ] zp[1]:25 [ memoryRemap::$5 ] zp[1]:27 [ memoryRemap::$7 ] zp[1]:28 [ memoryRemap::$8 ] zp[1]:29 [ memoryRemap::$9 ] zp[1]:21 [ memoryRemap::$1 ] zp[1]:26 [ memoryRemap::$6 ] zp[2]:5 [ memoryRemap::lowerPageOffset#2 memoryRemap::lowerPageOffset#0 ] zp[2]:8 [ memoryRemap::upperPageOffset#2 memoryRemap::upperPageOffset#0 ] zp[1]:7 [ memoryRemap::remapBlocks#2 memoryRemap::remapBlocks#0 ]
Limited combination testing to 100 combinations of 25000000 possible.
Uplifting [memoryRemap256M] best 1420 combination reg byte a [ memoryRemap256M::$1 ] reg byte a [ memoryRemap256M::$5 ] reg byte a [ memoryRemap256M::$8 ] zp[1]:40 [ memoryRemap256M::$9 ] zp[1]:41 [ memoryRemap256M::$10 ] zp[1]:42 [ memoryRemap256M::$17 ] zp[4]:30 [ memoryRemap256M::$0 ] zp[2]:35 [ memoryRemap256M::$7 ] zp[1]:38 [ memoryRemap256M::$6 ] zp[4]:10 [ memoryRemap256M::lowerPageOffset#2 ] zp[1]:14 [ memoryRemap256M::remapBlocks#2 ]
Uplifting [memoryRemap256M] best 1432 combination reg byte a [ memoryRemap256M::$1 ] zp[2]:35 [ memoryRemap256M::$4 ] reg byte a [ memoryRemap256M::$5 ] zp[2]:39 [ memoryRemap256M::$7 ] reg byte a [ memoryRemap256M::$8 ] zp[1]:42 [ memoryRemap256M::$9 ] zp[1]:43 [ memoryRemap256M::$10 ] zp[1]:44 [ memoryRemap256M::$17 ] zp[4]:30 [ memoryRemap256M::$0 ] zp[1]:38 [ memoryRemap256M::$6 ] zp[4]:10 [ memoryRemap256M::lowerPageOffset#2 ] zp[1]:14 [ memoryRemap256M::remapBlocks#2 ]
Limited combination testing to 100 combinations of 250000 possible.
Uplifting [main] best 1110 combination reg byte x [ main::i#2 main::i#1 ] reg byte x [ main::i1#2 main::i1#1 ] reg byte a [ main::$7 ]
Uplifting [memoryRemapBlock] best 1096 combination reg byte a [ memoryRemapBlock::block#0 ] reg byte a [ memoryRemapBlock::blockBits#0 ] reg byte x [ memoryRemapBlock::blockPage#2 ] zp[2]:16 [ memoryRemapBlock::pageOffset#0 ]
Uplifting [MOS6526_CIA] best 1096 combination
Uplifting [MOS6569_VICII] best 1096 combination
Uplifting [MOS6581_SID] best 1096 combination
Uplifting [MOS4569_VICIII] best 1096 combination
Uplifting [MEGA65_VICIV] best 1096 combination
Uplifting [F018_DMAGIC] best 1096 combination
Uplifting [DMA_LIST_F018A] best 1096 combination
Uplifting [DMA_LIST_F018B] best 1096 combination
Uplifting [] best 1096 combination
Uplifting [main] best 1122 combination reg byte x [ main::i#2 main::i#1 ] reg byte x [ main::i1#2 main::i1#1 ] reg byte a [ main::$7 ]
Uplifting [memoryRemapBlock] best 1108 combination reg byte a [ memoryRemapBlock::block#0 ] reg byte a [ memoryRemapBlock::blockBits#0 ] reg byte x [ memoryRemapBlock::blockPage#2 ] zp[2]:16 [ memoryRemapBlock::pageOffset#0 ]
Uplifting [MOS6526_CIA] best 1108 combination
Uplifting [MOS6569_VICII] best 1108 combination
Uplifting [MOS6581_SID] best 1108 combination
Uplifting [MOS4569_VICIII] best 1108 combination
Uplifting [MEGA65_VICIV] best 1108 combination
Uplifting [F018_DMAGIC] best 1108 combination
Uplifting [DMA_LIST_F018A] best 1108 combination
Uplifting [DMA_LIST_F018B] best 1108 combination
Uplifting [] best 1108 combination
Attempting to uplift remaining variables inzp[1]:24 [ memoryRemap::$4 ]
Uplifting [memoryRemap] best 1090 combination reg byte a [ memoryRemap::$4 ]
Uplifting [memoryRemap] best 1102 combination reg byte a [ memoryRemap::$4 ]
Attempting to uplift remaining variables inzp[1]:25 [ memoryRemap::$5 ]
Uplifting [memoryRemap] best 1084 combination reg byte a [ memoryRemap::$5 ]
Uplifting [memoryRemap] best 1096 combination reg byte a [ memoryRemap::$5 ]
Attempting to uplift remaining variables inzp[1]:27 [ memoryRemap::$7 ]
Uplifting [memoryRemap] best 1078 combination reg byte a [ memoryRemap::$7 ]
Uplifting [memoryRemap] best 1090 combination reg byte a [ memoryRemap::$7 ]
Attempting to uplift remaining variables inzp[1]:28 [ memoryRemap::$8 ]
Uplifting [memoryRemap] best 1072 combination reg byte a [ memoryRemap::$8 ]
Uplifting [memoryRemap] best 1084 combination reg byte a [ memoryRemap::$8 ]
Attempting to uplift remaining variables inzp[1]:29 [ memoryRemap::$9 ]
Uplifting [memoryRemap] best 1066 combination reg byte a [ memoryRemap::$9 ]
Uplifting [memoryRemap] best 1078 combination reg byte a [ memoryRemap::$9 ]
Attempting to uplift remaining variables inzp[1]:21 [ memoryRemap::$1 ]
Uplifting [memoryRemap] best 1066 combination zp[1]:21 [ memoryRemap::$1 ]
Uplifting [memoryRemap] best 1078 combination zp[1]:21 [ memoryRemap::$1 ]
Attempting to uplift remaining variables inzp[1]:26 [ memoryRemap::$6 ]
Uplifting [memoryRemap] best 1066 combination zp[1]:26 [ memoryRemap::$6 ]
Uplifting [memoryRemap] best 1078 combination zp[1]:26 [ memoryRemap::$6 ]
Attempting to uplift remaining variables inzp[1]:7 [ memoryRemap::remapBlocks#2 memoryRemap::remapBlocks#0 ]
Uplifting [memoryRemap] best 1057 combination reg byte z [ memoryRemap::remapBlocks#2 memoryRemap::remapBlocks#0 ]
Attempting to uplift remaining variables inzp[1]:40 [ memoryRemap256M::$9 ]
Uplifting [memoryRemap256M] best 1051 combination reg byte a [ memoryRemap256M::$9 ]
Attempting to uplift remaining variables inzp[1]:41 [ memoryRemap256M::$10 ]
Uplifting [memoryRemap256M] best 1045 combination reg byte a [ memoryRemap256M::$10 ]
Attempting to uplift remaining variables inzp[1]:42 [ memoryRemap256M::$17 ]
Uplifting [memoryRemap256M] best 1039 combination reg byte a [ memoryRemap256M::$17 ]
Uplifting [memoryRemap] best 1069 combination reg byte z [ memoryRemap::remapBlocks#2 memoryRemap::remapBlocks#0 ]
Attempting to uplift remaining variables inzp[1]:42 [ memoryRemap256M::$9 ]
Uplifting [memoryRemap256M] best 1063 combination reg byte a [ memoryRemap256M::$9 ]
Attempting to uplift remaining variables inzp[1]:43 [ memoryRemap256M::$10 ]
Uplifting [memoryRemap256M] best 1057 combination reg byte a [ memoryRemap256M::$10 ]
Attempting to uplift remaining variables inzp[1]:44 [ memoryRemap256M::$17 ]
Uplifting [memoryRemap256M] best 1051 combination reg byte a [ memoryRemap256M::$17 ]
Attempting to uplift remaining variables inzp[1]:38 [ memoryRemap256M::$6 ]
Uplifting [memoryRemap256M] best 1039 combination zp[1]:38 [ memoryRemap256M::$6 ]
Uplifting [memoryRemap256M] best 1051 combination zp[1]:38 [ memoryRemap256M::$6 ]
Attempting to uplift remaining variables inzp[1]:14 [ memoryRemap256M::remapBlocks#2 ]
Uplifting [memoryRemap256M] best 1029 combination reg byte z [ memoryRemap256M::remapBlocks#2 ]
Uplifting [memoryRemap256M] best 1041 combination reg byte z [ memoryRemap256M::remapBlocks#2 ]
Coalescing zero page register [ zp[2]:5 [ memoryRemap::lowerPageOffset#2 memoryRemap::lowerPageOffset#0 ] ] with [ zp[2]:16 [ memoryRemapBlock::pageOffset#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:35 [ memoryRemap256M::$7 ] ] with [ zp[2]:5 [ memoryRemap::lowerPageOffset#2 memoryRemap::lowerPageOffset#0 memoryRemapBlock::pageOffset#0 ] ]
Coalescing zero page register [ zp[2]:35 [ memoryRemap256M::$4 ] ] with [ zp[2]:5 [ memoryRemap::lowerPageOffset#2 memoryRemap::lowerPageOffset#0 memoryRemapBlock::pageOffset#0 ] ]
Coalescing zero page register [ zp[1]:38 [ memoryRemap256M::$6 ] ] with [ zp[1]:21 [ memoryRemap::$1 ] ]
Allocated (was zp[2]:8) zp[2]:2 [ memoryRemap::upperPageOffset#2 memoryRemap::upperPageOffset#0 ]
Allocated (was zp[4]:10) zp[4]:4 [ memoryRemap256M::lowerPageOffset#2 ]
Allocated (was zp[1]:26) zp[1]:8 [ memoryRemap::$6 ]
Allocated (was zp[4]:30) zp[4]:9 [ memoryRemap256M::$0 ]
Allocated (was zp[2]:35) zp[2]:13 [ memoryRemap256M::$7 memoryRemap::lowerPageOffset#2 memoryRemap::lowerPageOffset#0 memoryRemapBlock::pageOffset#0 ]
Allocated (was zp[1]:38) zp[1]:15 [ memoryRemap256M::$6 memoryRemap::$1 ]
Coalescing zero page register [ zp[2]:39 [ memoryRemap256M::$7 ] ] with [ zp[2]:8 [ memoryRemap::upperPageOffset#2 memoryRemap::upperPageOffset#0 ] ]
Allocated (was zp[4]:10) zp[4]:2 [ memoryRemap256M::lowerPageOffset#2 ]
Allocated (was zp[1]:26) zp[1]:6 [ memoryRemap::$6 ]
Allocated (was zp[4]:30) zp[4]:7 [ memoryRemap256M::$0 ]
Allocated (was zp[2]:35) zp[2]:11 [ memoryRemap256M::$4 memoryRemap::lowerPageOffset#2 memoryRemap::lowerPageOffset#0 memoryRemapBlock::pageOffset#0 ]
Allocated (was zp[1]:38) zp[1]:13 [ memoryRemap256M::$6 memoryRemap::$1 ]
Allocated (was zp[2]:39) zp[2]:14 [ memoryRemap256M::$7 memoryRemap::upperPageOffset#2 memoryRemap::upperPageOffset#0 ]
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
@ -2354,7 +2367,7 @@ main: {
// Ie. the memory that will be pointed to is $100 * the passed page address. Only the lower 12bits of the passed value is used.
// memoryRemapBlock(byte register(X) blockPage)
memoryRemapBlock: {
.label pageOffset = $d
.label pageOffset = $b
// [25] (word) memoryRemapBlock::pageOffset#0 ← (word) $100 - (byte) memoryRemapBlock::blockPage#2 -- vwuz1=vwuc1_minus_vbuxx
stx.z $ff
lda #<$100
@ -2427,16 +2440,16 @@ memoryRemapBlock: {
// - If block 5 ($a000-$bfff) is remapped it will point to upperPageOffset*$100 + $a000.
// - If block 6 ($c000-$dfff) is remapped it will point to upperPageOffset*$100 + $c000.
// - If block 7 ($e000-$ffff) is remapped it will point to upperPageOffset*$100 + $e000.
// memoryRemap(byte register(Z) remapBlocks, word zp($d) lowerPageOffset, word zp(2) upperPageOffset)
// memoryRemap(byte register(Z) remapBlocks, word zp($b) lowerPageOffset, word zp($e) upperPageOffset)
memoryRemap: {
.label aVal = $fc
.label xVal = $fd
.label yVal = $fe
.label zVal = $ff
.label __1 = $f
.label __6 = 8
.label lowerPageOffset = $d
.label upperPageOffset = 2
.label __1 = $d
.label __6 = 6
.label lowerPageOffset = $b
.label upperPageOffset = $e
// [34] (byte~) memoryRemap::$0 ← < (word) memoryRemap::lowerPageOffset#2 -- vbuaa=_lo_vwuz1
lda.z lowerPageOffset
// [35] *((const byte*) memoryRemap::aVal) ← (byte~) memoryRemap::$0 -- _deref_pbuc1=vbuaa
@ -2511,7 +2524,7 @@ memoryRemap: {
// - If block 5 ($a000-$bfff) is remapped it will point to upperPageOffset*$100 + $a000.
// - If block 6 ($c000-$dfff) is remapped it will point to upperPageOffset*$100 + $c000.
// - If block 7 ($e000-$ffff) is remapped it will point to upperPageOffset*$100 + $e000.
// memoryRemap256M(byte register(Z) remapBlocks, dword zp(4) lowerPageOffset)
// memoryRemap256M(byte register(Z) remapBlocks, dword zp(2) lowerPageOffset)
memoryRemap256M: {
.label lMb = $fa
.label uMb = $fb
@ -2519,10 +2532,11 @@ memoryRemap256M: {
.label xVal = $fd
.label yVal = $fe
.label zVal = $ff
.label __0 = 9
.label __6 = $f
.label __7 = $d
.label lowerPageOffset = 4
.label __0 = 7
.label __4 = $b
.label __6 = $d
.label __7 = $e
.label lowerPageOffset = 2
// [51] (dword~) memoryRemap256M::$0 ← (dword) memoryRemap256M::lowerPageOffset#2 >> (byte) 4 -- vduz1=vduz2_ror_4
lda.z lowerPageOffset+3
lsr
@ -2555,13 +2569,13 @@ memoryRemap256M: {
// [54] *((const byte*) memoryRemap256M::uMb) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta uMb
// [55] (word~) memoryRemap256M::$7 ← < (dword) memoryRemap256M::lowerPageOffset#2 -- vwuz1=_lo_vduz2
// [55] (word~) memoryRemap256M::$4 ← < (dword) memoryRemap256M::lowerPageOffset#2 -- vwuz1=_lo_vduz2
lda.z lowerPageOffset
sta.z __7
sta.z __4
lda.z lowerPageOffset+1
sta.z __7+1
// [56] (byte~) memoryRemap256M::$5 ← < (word~) memoryRemap256M::$7 -- vbuaa=_lo_vwuz1
lda.z __7
sta.z __4+1
// [56] (byte~) memoryRemap256M::$5 ← < (word~) memoryRemap256M::$4 -- vbuaa=_lo_vwuz1
lda.z __4
// [57] *((const byte*) memoryRemap256M::aVal) ← (byte~) memoryRemap256M::$5 -- _deref_pbuc1=vbuaa
sta aVal
// [58] (byte~) memoryRemap256M::$6 ← (byte) memoryRemap256M::remapBlocks#2 << (byte) 4 -- vbuz1=vbuzz_rol_4
@ -2571,21 +2585,26 @@ memoryRemap256M: {
asl
asl
sta.z __6
// [59] (byte~) memoryRemap256M::$8 ← > (word~) memoryRemap256M::$7 -- vbuaa=_hi_vwuz1
// [59] (word~) memoryRemap256M::$7 ← < (dword) memoryRemap256M::lowerPageOffset#2 -- vwuz1=_lo_vduz2
lda.z lowerPageOffset
sta.z __7
lda.z lowerPageOffset+1
sta.z __7+1
// [60] (byte~) memoryRemap256M::$8 ← > (word~) memoryRemap256M::$7 -- vbuaa=_hi_vwuz1
lda.z __7+1
// [60] (byte~) memoryRemap256M::$9 ← (byte~) memoryRemap256M::$8 & (byte) $f -- vbuaa=vbuaa_band_vbuc1
// [61] (byte~) memoryRemap256M::$9 ← (byte~) memoryRemap256M::$8 & (byte) $f -- vbuaa=vbuaa_band_vbuc1
and #$f
// [61] (byte~) memoryRemap256M::$10 ← (byte~) memoryRemap256M::$6 | (byte~) memoryRemap256M::$9 -- vbuaa=vbuz1_bor_vbuaa
// [62] (byte~) memoryRemap256M::$10 ← (byte~) memoryRemap256M::$6 | (byte~) memoryRemap256M::$9 -- vbuaa=vbuz1_bor_vbuaa
ora.z __6
// [62] *((const byte*) memoryRemap256M::xVal) ← (byte~) memoryRemap256M::$10 -- _deref_pbuc1=vbuaa
// [63] *((const byte*) memoryRemap256M::xVal) ← (byte~) memoryRemap256M::$10 -- _deref_pbuc1=vbuaa
sta xVal
// [63] *((const byte*) memoryRemap256M::yVal) ← (byte) 0 -- _deref_pbuc1=vbuc2
// [64] *((const byte*) memoryRemap256M::yVal) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta yVal
// [64] (byte~) memoryRemap256M::$17 ← (byte) memoryRemap256M::remapBlocks#2 & (byte) $f0 -- vbuaa=vbuzz_band_vbuc1
// [65] (byte~) memoryRemap256M::$17 ← (byte) memoryRemap256M::remapBlocks#2 & (byte) $f0 -- vbuaa=vbuzz_band_vbuc1
tza
and #$f0
// [65] *((const byte*) memoryRemap256M::zVal) ← (byte~) memoryRemap256M::$17 -- _deref_pbuc1=vbuaa
// [66] *((const byte*) memoryRemap256M::zVal) ← (byte~) memoryRemap256M::$17 -- _deref_pbuc1=vbuaa
sta zVal
// asm { ldalMb ldx#$0f ldyuMb ldz#$00 map ldaaVal ldxxVal ldyyVal ldzzVal map eom }
lda lMb
@ -2602,7 +2621,7 @@ memoryRemap256M: {
jmp __breturn
// memoryRemap256M::@return
__breturn:
// [67] return
// [68] return
rts
}
// File Data
@ -2621,6 +2640,7 @@ Removing instruction jmp __breturn
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #0
Removing instruction lda.z __7+1
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction __b3_from___b1:
Removing instruction __b6_from___b4:
@ -2981,46 +3001,47 @@ FINAL SYMBOL TABLE
(byte) main::i1#2 reg byte x 13.75
(void()) memoryRemap((byte) memoryRemap::remapBlocks , (word) memoryRemap::lowerPageOffset , (word) memoryRemap::upperPageOffset)
(byte~) memoryRemap::$0 reg byte a 202.0
(byte~) memoryRemap::$1 zp[1]:15 67.33333333333333
(byte~) memoryRemap::$1 zp[1]:13 67.33333333333333
(byte~) memoryRemap::$2 reg byte a 202.0
(byte~) memoryRemap::$3 reg byte a 202.0
(byte~) memoryRemap::$4 reg byte a 202.0
(byte~) memoryRemap::$5 reg byte a 202.0
(byte~) memoryRemap::$6 zp[1]:8 67.33333333333333
(byte~) memoryRemap::$6 zp[1]:6 67.33333333333333
(byte~) memoryRemap::$7 reg byte a 202.0
(byte~) memoryRemap::$8 reg byte a 202.0
(byte~) memoryRemap::$9 reg byte a 202.0
(label) memoryRemap::@return
(const byte*) memoryRemap::aVal = (byte*) 252
(word) memoryRemap::lowerPageOffset
(word) memoryRemap::lowerPageOffset#0 lowerPageOffset zp[2]:13 11.0
(word) memoryRemap::lowerPageOffset#2 lowerPageOffset zp[2]:13 53.25
(word) memoryRemap::lowerPageOffset#0 lowerPageOffset zp[2]:11 11.0
(word) memoryRemap::lowerPageOffset#2 lowerPageOffset zp[2]:11 53.25
(byte) memoryRemap::remapBlocks
(byte) memoryRemap::remapBlocks#0 reg byte z 7.333333333333333
(byte) memoryRemap::remapBlocks#2 reg byte z 21.299999999999997
(word) memoryRemap::upperPageOffset
(word) memoryRemap::upperPageOffset#0 upperPageOffset zp[2]:2 22.0
(word) memoryRemap::upperPageOffset#2 upperPageOffset zp[2]:2 19.363636363636363
(word) memoryRemap::upperPageOffset#0 upperPageOffset zp[2]:14 22.0
(word) memoryRemap::upperPageOffset#2 upperPageOffset zp[2]:14 19.363636363636363
(const byte*) memoryRemap::xVal = (byte*) 253
(const byte*) memoryRemap::yVal = (byte*) 254
(const byte*) memoryRemap::zVal = (byte*) 255
(void()) memoryRemap256M((byte) memoryRemap256M::remapBlocks , (dword) memoryRemap256M::lowerPageOffset , (dword) memoryRemap256M::upperPageOffset)
(dword~) memoryRemap256M::$0 zp[4]:9 11.0
(dword~) memoryRemap256M::$0 zp[4]:7 11.0
(byte~) memoryRemap256M::$1 reg byte a 22.0
(byte~) memoryRemap256M::$10 reg byte a 22.0
(byte~) memoryRemap256M::$17 reg byte a 22.0
(word~) memoryRemap256M::$4 zp[2]:11 22.0
(byte~) memoryRemap256M::$5 reg byte a 22.0
(byte~) memoryRemap256M::$6 zp[1]:15 7.333333333333333
(word~) memoryRemap256M::$7 zp[2]:13 8.25
(byte~) memoryRemap256M::$6 zp[1]:13 5.5
(word~) memoryRemap256M::$7 zp[2]:14 22.0
(byte~) memoryRemap256M::$8 reg byte a 22.0
(byte~) memoryRemap256M::$9 reg byte a 22.0
(label) memoryRemap256M::@return
(const byte*) memoryRemap256M::aVal = (byte*) 252
(const byte*) memoryRemap256M::lMb = (byte*) 250
(dword) memoryRemap256M::lowerPageOffset
(dword) memoryRemap256M::lowerPageOffset#2 lowerPageOffset zp[4]:4 4.4
(dword) memoryRemap256M::lowerPageOffset#2 lowerPageOffset zp[4]:2 3.666666666666667
(byte) memoryRemap256M::remapBlocks
(byte) memoryRemap256M::remapBlocks#2 reg byte z 1.5714285714285714
(byte) memoryRemap256M::remapBlocks#2 reg byte z 1.4666666666666666
(const byte*) memoryRemap256M::uMb = (byte*) 251
(dword) memoryRemap256M::upperPageOffset
(const byte*) memoryRemap256M::xVal = (byte*) 253
@ -3036,14 +3057,13 @@ FINAL SYMBOL TABLE
(byte) memoryRemapBlock::blockPage#2 reg byte x 11.0
(word) memoryRemapBlock::memoryPage
(word) memoryRemapBlock::pageOffset
(word) memoryRemapBlock::pageOffset#0 pageOffset zp[2]:13 6.6000000000000005
(word) memoryRemapBlock::pageOffset#0 pageOffset zp[2]:11 6.6000000000000005
reg byte x [ main::i#2 main::i#1 ]
reg byte x [ main::i1#2 main::i1#1 ]
reg byte x [ memoryRemapBlock::blockPage#2 ]
reg byte z [ memoryRemap::remapBlocks#2 memoryRemap::remapBlocks#0 ]
zp[2]:2 [ memoryRemap::upperPageOffset#2 memoryRemap::upperPageOffset#0 ]
zp[4]:4 [ memoryRemap256M::lowerPageOffset#2 ]
zp[4]:2 [ memoryRemap256M::lowerPageOffset#2 ]
reg byte z [ memoryRemap256M::remapBlocks#2 ]
reg byte a [ main::$7 ]
reg byte a [ memoryRemapBlock::block#0 ]
@ -3053,15 +3073,16 @@ reg byte a [ memoryRemap::$2 ]
reg byte a [ memoryRemap::$3 ]
reg byte a [ memoryRemap::$4 ]
reg byte a [ memoryRemap::$5 ]
zp[1]:8 [ memoryRemap::$6 ]
zp[1]:6 [ memoryRemap::$6 ]
reg byte a [ memoryRemap::$7 ]
reg byte a [ memoryRemap::$8 ]
reg byte a [ memoryRemap::$9 ]
zp[4]:9 [ memoryRemap256M::$0 ]
zp[4]:7 [ memoryRemap256M::$0 ]
reg byte a [ memoryRemap256M::$1 ]
zp[2]:13 [ memoryRemap256M::$7 memoryRemap::lowerPageOffset#2 memoryRemap::lowerPageOffset#0 memoryRemapBlock::pageOffset#0 ]
zp[2]:11 [ memoryRemap256M::$4 memoryRemap::lowerPageOffset#2 memoryRemap::lowerPageOffset#0 memoryRemapBlock::pageOffset#0 ]
reg byte a [ memoryRemap256M::$5 ]
zp[1]:15 [ memoryRemap256M::$6 memoryRemap::$1 ]
zp[1]:13 [ memoryRemap256M::$6 memoryRemap::$1 ]
zp[2]:14 [ memoryRemap256M::$7 memoryRemap::upperPageOffset#2 memoryRemap::upperPageOffset#0 ]
reg byte a [ memoryRemap256M::$8 ]
reg byte a [ memoryRemap256M::$9 ]
reg byte a [ memoryRemap256M::$10 ]
@ -3069,7 +3090,7 @@ reg byte a [ memoryRemap256M::$17 ]
FINAL ASSEMBLER
Score: 928
Score: 937
// File Comments
// Test the MAP instruction for remapping memory
@ -3258,7 +3279,7 @@ main: {
// Ie. the memory that will be pointed to is $100 * the passed page address. Only the lower 12bits of the passed value is used.
// memoryRemapBlock(byte register(X) blockPage)
memoryRemapBlock: {
.label pageOffset = $d
.label pageOffset = $b
// pageOffset = memoryPage-blockPage
// [25] (word) memoryRemapBlock::pageOffset#0 ← (word) $100 - (byte) memoryRemapBlock::blockPage#2 -- vwuz1=vwuc1_minus_vbuxx
stx.z $ff
@ -3333,16 +3354,16 @@ memoryRemapBlock: {
// - If block 5 ($a000-$bfff) is remapped it will point to upperPageOffset*$100 + $a000.
// - If block 6 ($c000-$dfff) is remapped it will point to upperPageOffset*$100 + $c000.
// - If block 7 ($e000-$ffff) is remapped it will point to upperPageOffset*$100 + $e000.
// memoryRemap(byte register(Z) remapBlocks, word zp($d) lowerPageOffset, word zp(2) upperPageOffset)
// memoryRemap(byte register(Z) remapBlocks, word zp($b) lowerPageOffset, word zp($e) upperPageOffset)
memoryRemap: {
.label aVal = $fc
.label xVal = $fd
.label yVal = $fe
.label zVal = $ff
.label __1 = $f
.label __6 = 8
.label lowerPageOffset = $d
.label upperPageOffset = 2
.label __1 = $d
.label __6 = 6
.label lowerPageOffset = $b
.label upperPageOffset = $e
// <lowerPageOffset
// [34] (byte~) memoryRemap::$0 ← < (word) memoryRemap::lowerPageOffset#2 -- vbuaa=_lo_vwuz1
lda.z lowerPageOffset
@ -3431,7 +3452,7 @@ memoryRemap: {
// - If block 5 ($a000-$bfff) is remapped it will point to upperPageOffset*$100 + $a000.
// - If block 6 ($c000-$dfff) is remapped it will point to upperPageOffset*$100 + $c000.
// - If block 7 ($e000-$ffff) is remapped it will point to upperPageOffset*$100 + $e000.
// memoryRemap256M(byte register(Z) remapBlocks, dword zp(4) lowerPageOffset)
// memoryRemap256M(byte register(Z) remapBlocks, dword zp(2) lowerPageOffset)
memoryRemap256M: {
.label lMb = $fa
.label uMb = $fb
@ -3439,10 +3460,11 @@ memoryRemap256M: {
.label xVal = $fd
.label yVal = $fe
.label zVal = $ff
.label __0 = 9
.label __6 = $f
.label __7 = $d
.label lowerPageOffset = 4
.label __0 = 7
.label __4 = $b
.label __6 = $d
.label __7 = $e
.label lowerPageOffset = 2
// lowerPageOffset>>4
// [51] (dword~) memoryRemap256M::$0 ← (dword) memoryRemap256M::lowerPageOffset#2 >> (byte) 4 -- vduz1=vduz2_ror_4
lda.z lowerPageOffset+3
@ -3480,14 +3502,14 @@ memoryRemap256M: {
lda #0
sta uMb
// <lowerPageOffset
// [55] (word~) memoryRemap256M::$7 ← < (dword) memoryRemap256M::lowerPageOffset#2 -- vwuz1=_lo_vduz2
// [55] (word~) memoryRemap256M::$4 ← < (dword) memoryRemap256M::lowerPageOffset#2 -- vwuz1=_lo_vduz2
lda.z lowerPageOffset
sta.z __7
sta.z __4
lda.z lowerPageOffset+1
sta.z __7+1
sta.z __4+1
// < <lowerPageOffset
// [56] (byte~) memoryRemap256M::$5 ← < (word~) memoryRemap256M::$7 -- vbuaa=_lo_vwuz1
lda.z __7
// [56] (byte~) memoryRemap256M::$5 ← < (word~) memoryRemap256M::$4 -- vbuaa=_lo_vwuz1
lda.z __4
// *aVal = < <lowerPageOffset
// [57] *((const byte*) memoryRemap256M::aVal) ← (byte~) memoryRemap256M::$5 -- _deref_pbuc1=vbuaa
sta aVal
@ -3499,28 +3521,33 @@ memoryRemap256M: {
asl
asl
sta.z __6
// <lowerPageOffset
// [59] (word~) memoryRemap256M::$7 ← < (dword) memoryRemap256M::lowerPageOffset#2 -- vwuz1=_lo_vduz2
lda.z lowerPageOffset
sta.z __7
lda.z lowerPageOffset+1
sta.z __7+1
// > <lowerPageOffset
// [59] (byte~) memoryRemap256M::$8 ← > (word~) memoryRemap256M::$7 -- vbuaa=_hi_vwuz1
lda.z __7+1
// [60] (byte~) memoryRemap256M::$8 ← > (word~) memoryRemap256M::$7 -- vbuaa=_hi_vwuz1
// > <lowerPageOffset & 0xf
// [60] (byte~) memoryRemap256M::$9 ← (byte~) memoryRemap256M::$8 & (byte) $f -- vbuaa=vbuaa_band_vbuc1
// [61] (byte~) memoryRemap256M::$9 ← (byte~) memoryRemap256M::$8 & (byte) $f -- vbuaa=vbuaa_band_vbuc1
and #$f
// (remapBlocks << 4) | (> <lowerPageOffset & 0xf)
// [61] (byte~) memoryRemap256M::$10 ← (byte~) memoryRemap256M::$6 | (byte~) memoryRemap256M::$9 -- vbuaa=vbuz1_bor_vbuaa
// [62] (byte~) memoryRemap256M::$10 ← (byte~) memoryRemap256M::$6 | (byte~) memoryRemap256M::$9 -- vbuaa=vbuz1_bor_vbuaa
ora.z __6
// *xVal = (remapBlocks << 4) | (> <lowerPageOffset & 0xf)
// [62] *((const byte*) memoryRemap256M::xVal) ← (byte~) memoryRemap256M::$10 -- _deref_pbuc1=vbuaa
// [63] *((const byte*) memoryRemap256M::xVal) ← (byte~) memoryRemap256M::$10 -- _deref_pbuc1=vbuaa
sta xVal
// *yVal = < <upperPageOffset
// [63] *((const byte*) memoryRemap256M::yVal) ← (byte) 0 -- _deref_pbuc1=vbuc2
// [64] *((const byte*) memoryRemap256M::yVal) ← (byte) 0 -- _deref_pbuc1=vbuc2
lda #0
sta yVal
// (remapBlocks & 0xf0) | (> <upperPageOffset & 0xf)
// [64] (byte~) memoryRemap256M::$17 ← (byte) memoryRemap256M::remapBlocks#2 & (byte) $f0 -- vbuaa=vbuzz_band_vbuc1
// [65] (byte~) memoryRemap256M::$17 ← (byte) memoryRemap256M::remapBlocks#2 & (byte) $f0 -- vbuaa=vbuzz_band_vbuc1
tza
and #$f0
// *zVal = (remapBlocks & 0xf0) | (> <upperPageOffset & 0xf)
// [65] *((const byte*) memoryRemap256M::zVal) ← (byte~) memoryRemap256M::$17 -- _deref_pbuc1=vbuaa
// [66] *((const byte*) memoryRemap256M::zVal) ← (byte~) memoryRemap256M::$17 -- _deref_pbuc1=vbuaa
sta zVal
// asm
// asm { ldalMb ldx#$0f ldyuMb ldz#$00 map ldaaVal ldxxVal ldyyVal ldzzVal map eom }
@ -3537,7 +3564,7 @@ memoryRemap256M: {
eom
// memoryRemap256M::@return
// }
// [67] return
// [68] return
rts
}
// File Data

View File

@ -332,46 +332,47 @@
(byte) main::i1#2 reg byte x 13.75
(void()) memoryRemap((byte) memoryRemap::remapBlocks , (word) memoryRemap::lowerPageOffset , (word) memoryRemap::upperPageOffset)
(byte~) memoryRemap::$0 reg byte a 202.0
(byte~) memoryRemap::$1 zp[1]:15 67.33333333333333
(byte~) memoryRemap::$1 zp[1]:13 67.33333333333333
(byte~) memoryRemap::$2 reg byte a 202.0
(byte~) memoryRemap::$3 reg byte a 202.0
(byte~) memoryRemap::$4 reg byte a 202.0
(byte~) memoryRemap::$5 reg byte a 202.0
(byte~) memoryRemap::$6 zp[1]:8 67.33333333333333
(byte~) memoryRemap::$6 zp[1]:6 67.33333333333333
(byte~) memoryRemap::$7 reg byte a 202.0
(byte~) memoryRemap::$8 reg byte a 202.0
(byte~) memoryRemap::$9 reg byte a 202.0
(label) memoryRemap::@return
(const byte*) memoryRemap::aVal = (byte*) 252
(word) memoryRemap::lowerPageOffset
(word) memoryRemap::lowerPageOffset#0 lowerPageOffset zp[2]:13 11.0
(word) memoryRemap::lowerPageOffset#2 lowerPageOffset zp[2]:13 53.25
(word) memoryRemap::lowerPageOffset#0 lowerPageOffset zp[2]:11 11.0
(word) memoryRemap::lowerPageOffset#2 lowerPageOffset zp[2]:11 53.25
(byte) memoryRemap::remapBlocks
(byte) memoryRemap::remapBlocks#0 reg byte z 7.333333333333333
(byte) memoryRemap::remapBlocks#2 reg byte z 21.299999999999997
(word) memoryRemap::upperPageOffset
(word) memoryRemap::upperPageOffset#0 upperPageOffset zp[2]:2 22.0
(word) memoryRemap::upperPageOffset#2 upperPageOffset zp[2]:2 19.363636363636363
(word) memoryRemap::upperPageOffset#0 upperPageOffset zp[2]:14 22.0
(word) memoryRemap::upperPageOffset#2 upperPageOffset zp[2]:14 19.363636363636363
(const byte*) memoryRemap::xVal = (byte*) 253
(const byte*) memoryRemap::yVal = (byte*) 254
(const byte*) memoryRemap::zVal = (byte*) 255
(void()) memoryRemap256M((byte) memoryRemap256M::remapBlocks , (dword) memoryRemap256M::lowerPageOffset , (dword) memoryRemap256M::upperPageOffset)
(dword~) memoryRemap256M::$0 zp[4]:9 11.0
(dword~) memoryRemap256M::$0 zp[4]:7 11.0
(byte~) memoryRemap256M::$1 reg byte a 22.0
(byte~) memoryRemap256M::$10 reg byte a 22.0
(byte~) memoryRemap256M::$17 reg byte a 22.0
(word~) memoryRemap256M::$4 zp[2]:11 22.0
(byte~) memoryRemap256M::$5 reg byte a 22.0
(byte~) memoryRemap256M::$6 zp[1]:15 7.333333333333333
(word~) memoryRemap256M::$7 zp[2]:13 8.25
(byte~) memoryRemap256M::$6 zp[1]:13 5.5
(word~) memoryRemap256M::$7 zp[2]:14 22.0
(byte~) memoryRemap256M::$8 reg byte a 22.0
(byte~) memoryRemap256M::$9 reg byte a 22.0
(label) memoryRemap256M::@return
(const byte*) memoryRemap256M::aVal = (byte*) 252
(const byte*) memoryRemap256M::lMb = (byte*) 250
(dword) memoryRemap256M::lowerPageOffset
(dword) memoryRemap256M::lowerPageOffset#2 lowerPageOffset zp[4]:4 4.4
(dword) memoryRemap256M::lowerPageOffset#2 lowerPageOffset zp[4]:2 3.666666666666667
(byte) memoryRemap256M::remapBlocks
(byte) memoryRemap256M::remapBlocks#2 reg byte z 1.5714285714285714
(byte) memoryRemap256M::remapBlocks#2 reg byte z 1.4666666666666666
(const byte*) memoryRemap256M::uMb = (byte*) 251
(dword) memoryRemap256M::upperPageOffset
(const byte*) memoryRemap256M::xVal = (byte*) 253
@ -387,14 +388,13 @@
(byte) memoryRemapBlock::blockPage#2 reg byte x 11.0
(word) memoryRemapBlock::memoryPage
(word) memoryRemapBlock::pageOffset
(word) memoryRemapBlock::pageOffset#0 pageOffset zp[2]:13 6.6000000000000005
(word) memoryRemapBlock::pageOffset#0 pageOffset zp[2]:11 6.6000000000000005
reg byte x [ main::i#2 main::i#1 ]
reg byte x [ main::i1#2 main::i1#1 ]
reg byte x [ memoryRemapBlock::blockPage#2 ]
reg byte z [ memoryRemap::remapBlocks#2 memoryRemap::remapBlocks#0 ]
zp[2]:2 [ memoryRemap::upperPageOffset#2 memoryRemap::upperPageOffset#0 ]
zp[4]:4 [ memoryRemap256M::lowerPageOffset#2 ]
zp[4]:2 [ memoryRemap256M::lowerPageOffset#2 ]
reg byte z [ memoryRemap256M::remapBlocks#2 ]
reg byte a [ main::$7 ]
reg byte a [ memoryRemapBlock::block#0 ]
@ -404,15 +404,16 @@ reg byte a [ memoryRemap::$2 ]
reg byte a [ memoryRemap::$3 ]
reg byte a [ memoryRemap::$4 ]
reg byte a [ memoryRemap::$5 ]
zp[1]:8 [ memoryRemap::$6 ]
zp[1]:6 [ memoryRemap::$6 ]
reg byte a [ memoryRemap::$7 ]
reg byte a [ memoryRemap::$8 ]
reg byte a [ memoryRemap::$9 ]
zp[4]:9 [ memoryRemap256M::$0 ]
zp[4]:7 [ memoryRemap256M::$0 ]
reg byte a [ memoryRemap256M::$1 ]
zp[2]:13 [ memoryRemap256M::$7 memoryRemap::lowerPageOffset#2 memoryRemap::lowerPageOffset#0 memoryRemapBlock::pageOffset#0 ]
zp[2]:11 [ memoryRemap256M::$4 memoryRemap::lowerPageOffset#2 memoryRemap::lowerPageOffset#0 memoryRemapBlock::pageOffset#0 ]
reg byte a [ memoryRemap256M::$5 ]
zp[1]:15 [ memoryRemap256M::$6 memoryRemap::$1 ]
zp[1]:13 [ memoryRemap256M::$6 memoryRemap::$1 ]
zp[2]:14 [ memoryRemap256M::$7 memoryRemap::upperPageOffset#2 memoryRemap::upperPageOffset#0 ]
reg byte a [ memoryRemap256M::$8 ]
reg byte a [ memoryRemap256M::$9 ]
reg byte a [ memoryRemap256M::$10 ]

View File

@ -13,7 +13,6 @@ main: {
// Move the entities
.label line = 4
.label i1 = 3
.label __25 = 6
// asm
sei
lda #-1
@ -22,9 +21,7 @@ main: {
__b1:
// for(char i=0;i<NUM_ENTITIES;i++)
cpx #$19
bcs !__b2+
jmp __b2
!__b2:
bcc __b2
// Wait for raster refresh
__b3:
// while(*VIC_RASTER!=0xff)
@ -53,7 +50,6 @@ main: {
// line[entities[i].x_pos] = ' '
lda.z i1
asl
sta.z __25
clc
adc.z i1
tax
@ -80,10 +76,6 @@ main: {
bmi __b8
__b9:
// -entities[i].x_vel
lda.z __25
clc
adc.z i1
tax
lda entities+OFFSET_STRUCT_ENTITY_X_VEL,x
eor #$ff
clc
@ -97,11 +89,7 @@ main: {
sta entities,x
__b8:
// line[entities[i].x_pos] = entities[i].symbol
lda.z __25
clc
adc.z i1
// Draw symbol
tax
lda entities+OFFSET_STRUCT_ENTITY_SYMBOL,x
ldy entities,x
sta (line),y

View File

@ -24,32 +24,30 @@ main::@7: scope:[main] from main::@5
to:main::@3
main::@6: scope:[main] from main::@5
[8] (byte~) main::$25 ← (byte) main::i1#2 << (byte) 1
[9] (byte~) main::$13 ← (byte~) main::$25 + (byte) main::i1#2
[10] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$13)) ← (byte) ' '
[11] *((signed byte*)(const struct Entity*) entities + (byte~) main::$13) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$13) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$13)
[12] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$13)<(signed byte) 0) goto main::@9
[9] (byte~) main::$16 ← (byte~) main::$25 + (byte) main::i1#2
[10] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$16)) ← (byte) ' '
[11] *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16)
[12] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$16)<(signed byte) 0) goto main::@9
to:main::@10
main::@10: scope:[main] from main::@6
[13] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$13)<(signed byte) $27+(signed byte) 1) goto main::@8
[13] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$16)<(signed byte) $27+(signed byte) 1) goto main::@8
to:main::@9
main::@9: scope:[main] from main::@10 main::@6
[14] (byte~) main::$18 ← (byte~) main::$25 + (byte) main::i1#2
[15] (signed byte~) main::$8 ← - *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$18)
[16] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$18) ← (signed byte~) main::$8
[17] *((signed byte*)(const struct Entity*) entities + (byte~) main::$18) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$18) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$18)
[14] (signed byte~) main::$8 ← - *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16)
[15] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16) ← (signed byte~) main::$8
[16] *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16)
to:main::@8
main::@8: scope:[main] from main::@10 main::@9
[18] (byte~) main::$16 ← (byte~) main::$25 + (byte) main::i1#2
[19] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$16)) ← *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$16)
[20] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28
[21] (byte) main::i1#1 ← ++ (byte) main::i1#2
[17] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$16)) ← *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$16)
[18] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28
[19] (byte) main::i1#1 ← ++ (byte) main::i1#2
to:main::@5
main::@2: scope:[main] from main::@1
[22] (byte~) main::$21 ← (byte) main::i#2 << (byte) 1
[23] (byte~) main::$10 ← (byte~) main::$21 + (byte) main::i#2
[24] *((signed byte*)(const struct Entity*) entities + (byte~) main::$10) ← (signed byte)(byte) main::i#2
[25] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$10) ← (signed byte) main::v#2
[26] *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$10) ← (byte) main::i#2
[27] (signed byte) main::v#1 ← - (signed byte) main::v#2
[28] (byte) main::i#1 ← ++ (byte) main::i#2
[20] (byte~) main::$21 ← (byte) main::i#2 << (byte) 1
[21] (byte~) main::$10 ← (byte~) main::$21 + (byte) main::i#2
[22] *((signed byte*)(const struct Entity*) entities + (byte~) main::$10) ← (signed byte)(byte) main::i#2
[23] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$10) ← (signed byte) main::v#2
[24] *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$10) ← (byte) main::i#2
[25] (signed byte) main::v#1 ← - (signed byte) main::v#2
[26] (byte) main::i#1 ← ++ (byte) main::i#2
to:main::@1

View File

@ -295,14 +295,19 @@ Eliminating unused constant (const byte) SIZEOF_STRUCT_ENTITY
Successful SSA optimization PassNEliminateUnusedVars
Alias main::$25 = main::$23 main::$27
Successful SSA optimization Pass2AliasElimination
Identified duplicate assignment right side [21] (byte~) main::$16 ← (byte~) main::$25 + (byte) main::i1#2
Identified duplicate assignment right side [26] (byte~) main::$18 ← (byte~) main::$25 + (byte) main::i1#2
Successful SSA optimization Pass2DuplicateRValueIdentification
Alias main::$16 = main::$13 main::$18
Successful SSA optimization Pass2AliasElimination
Adding NOP phi() at start of main::@3
CALL GRAPH
Created 4 initial phi equivalence classes
Coalesced [23] main::i1#6 ← main::i1#1
Coalesced [24] main::line#6 ← main::line#1
Coalesced [32] main::i#4 ← main::i#1
Coalesced [33] main::v#4 ← main::v#1
Coalesced [21] main::i1#6 ← main::i1#1
Coalesced [22] main::line#6 ← main::line#1
Coalesced [30] main::i#4 ← main::i#1
Coalesced [31] main::v#4 ← main::v#1
Coalesced down to 4 phi equivalence classes
Culled Empty Block (label) main::@3
Renumbering block main::@4 to main::@3
@ -341,34 +346,32 @@ main::@7: scope:[main] from main::@5
to:main::@3
main::@6: scope:[main] from main::@5
[8] (byte~) main::$25 ← (byte) main::i1#2 << (byte) 1
[9] (byte~) main::$13 ← (byte~) main::$25 + (byte) main::i1#2
[10] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$13)) ← (byte) ' '
[11] *((signed byte*)(const struct Entity*) entities + (byte~) main::$13) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$13) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$13)
[12] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$13)<(signed byte) 0) goto main::@9
[9] (byte~) main::$16 ← (byte~) main::$25 + (byte) main::i1#2
[10] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$16)) ← (byte) ' '
[11] *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16)
[12] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$16)<(signed byte) 0) goto main::@9
to:main::@10
main::@10: scope:[main] from main::@6
[13] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$13)<(signed byte) $27+(signed byte) 1) goto main::@8
[13] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$16)<(signed byte) $27+(signed byte) 1) goto main::@8
to:main::@9
main::@9: scope:[main] from main::@10 main::@6
[14] (byte~) main::$18 ← (byte~) main::$25 + (byte) main::i1#2
[15] (signed byte~) main::$8 ← - *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$18)
[16] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$18) ← (signed byte~) main::$8
[17] *((signed byte*)(const struct Entity*) entities + (byte~) main::$18) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$18) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$18)
[14] (signed byte~) main::$8 ← - *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16)
[15] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16) ← (signed byte~) main::$8
[16] *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16)
to:main::@8
main::@8: scope:[main] from main::@10 main::@9
[18] (byte~) main::$16 ← (byte~) main::$25 + (byte) main::i1#2
[19] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$16)) ← *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$16)
[20] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28
[21] (byte) main::i1#1 ← ++ (byte) main::i1#2
[17] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$16)) ← *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$16)
[18] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28
[19] (byte) main::i1#1 ← ++ (byte) main::i1#2
to:main::@5
main::@2: scope:[main] from main::@1
[22] (byte~) main::$21 ← (byte) main::i#2 << (byte) 1
[23] (byte~) main::$10 ← (byte~) main::$21 + (byte) main::i#2
[24] *((signed byte*)(const struct Entity*) entities + (byte~) main::$10) ← (signed byte)(byte) main::i#2
[25] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$10) ← (signed byte) main::v#2
[26] *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$10) ← (byte) main::i#2
[27] (signed byte) main::v#1 ← - (signed byte) main::v#2
[28] (byte) main::i#1 ← ++ (byte) main::i#2
[20] (byte~) main::$21 ← (byte) main::i#2 << (byte) 1
[21] (byte~) main::$10 ← (byte~) main::$21 + (byte) main::i#2
[22] *((signed byte*)(const struct Entity*) entities + (byte~) main::$10) ← (signed byte)(byte) main::i#2
[23] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$10) ← (signed byte) main::v#2
[24] *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$10) ← (byte) main::i#2
[25] (signed byte) main::v#1 ← - (signed byte) main::v#2
[26] (byte) main::i#1 ← ++ (byte) main::i#2
to:main::@1
@ -378,21 +381,19 @@ VARIABLE REGISTER WEIGHTS
(signed byte) Entity::x_vel
(void()) main()
(byte~) main::$10 14.666666666666666
(byte~) main::$13 176.75
(byte~) main::$16 303.0
(byte~) main::$18 201.99999999999997
(byte~) main::$16 176.75
(byte~) main::$21 22.0
(byte~) main::$25 40.4
(byte~) main::$25 202.0
(signed byte~) main::$8 202.0
(byte) main::i
(byte) main::i#1 22.0
(byte) main::i#2 8.25
(byte) main::i1
(byte) main::i1#1 202.0
(byte) main::i1#2 47.13333333333333
(byte) main::i1#2 38.84615384615385
(byte*) main::line
(byte*) main::line#1 101.0
(byte*) main::line#2 28.857142857142858
(byte*) main::line#2 33.666666666666664
(signed byte) main::v
(signed byte) main::v#1 11.0
(signed byte) main::v#2 4.714285714285714
@ -403,10 +404,8 @@ Initial phi equivalence classes
[ main::i1#2 main::i1#1 ]
[ main::line#2 main::line#1 ]
Added variable main::$25 to live range equivalence class [ main::$25 ]
Added variable main::$13 to live range equivalence class [ main::$13 ]
Added variable main::$18 to live range equivalence class [ main::$18 ]
Added variable main::$8 to live range equivalence class [ main::$8 ]
Added variable main::$16 to live range equivalence class [ main::$16 ]
Added variable main::$8 to live range equivalence class [ main::$8 ]
Added variable main::$21 to live range equivalence class [ main::$21 ]
Added variable main::$10 to live range equivalence class [ main::$10 ]
Complete equivalence classes
@ -415,10 +414,8 @@ Complete equivalence classes
[ main::i1#2 main::i1#1 ]
[ main::line#2 main::line#1 ]
[ main::$25 ]
[ main::$13 ]
[ main::$18 ]
[ main::$8 ]
[ main::$16 ]
[ main::$8 ]
[ main::$21 ]
[ main::$10 ]
Allocated zp[1]:2 [ main::i#2 main::i#1 ]
@ -426,12 +423,10 @@ Allocated zp[1]:3 [ main::v#2 main::v#1 ]
Allocated zp[1]:4 [ main::i1#2 main::i1#1 ]
Allocated zp[2]:5 [ main::line#2 main::line#1 ]
Allocated zp[1]:7 [ main::$25 ]
Allocated zp[1]:8 [ main::$13 ]
Allocated zp[1]:9 [ main::$18 ]
Allocated zp[1]:10 [ main::$8 ]
Allocated zp[1]:11 [ main::$16 ]
Allocated zp[1]:12 [ main::$21 ]
Allocated zp[1]:13 [ main::$10 ]
Allocated zp[1]:8 [ main::$16 ]
Allocated zp[1]:9 [ main::$8 ]
Allocated zp[1]:10 [ main::$21 ]
Allocated zp[1]:11 [ main::$10 ]
INITIAL ASM
Target platform is c64basic / MOS6502X
@ -449,18 +444,16 @@ Target platform is c64basic / MOS6502X
.label SCREEN = $400
// main
main: {
.label __8 = $a
.label __10 = $d
.label __13 = 8
.label __16 = $b
.label __18 = 9
.label __8 = 9
.label __10 = $b
.label __16 = 8
// Initialize velocities
.label v = 3
.label i = 2
// Move the entities
.label line = 5
.label i1 = 4
.label __21 = $c
.label __21 = $a
.label __25 = 7
// asm { sei }
sei
@ -523,34 +516,34 @@ main: {
lda.z i1
asl
sta.z __25
// [9] (byte~) main::$13 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuz1=vbuz2_plus_vbuz3
// [9] (byte~) main::$16 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuz1=vbuz2_plus_vbuz3
lda.z __25
clc
adc.z i1
sta.z __13
// [10] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$13)) ← (byte) ' ' -- pbuz1_derefidx_(pbsc1_derefidx_vbuz2)=vbuc2
sta.z __16
// [10] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$16)) ← (byte) ' ' -- pbuz1_derefidx_(pbsc1_derefidx_vbuz2)=vbuc2
// Delete old symbol
lda #' '
ldx.z __13
ldx.z __16
ldy entities,x
sta (line),y
// [11] *((signed byte*)(const struct Entity*) entities + (byte~) main::$13) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$13) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$13) -- pbsc1_derefidx_vbuz1=pbsc1_derefidx_vbuz1_plus_pbsc2_derefidx_vbuz1
// [11] *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16) -- pbsc1_derefidx_vbuz1=pbsc1_derefidx_vbuz1_plus_pbsc2_derefidx_vbuz1
// Move by velocity
ldy.z __13
ldy.z __16
clc
lda entities,y
adc entities+OFFSET_STRUCT_ENTITY_X_VEL,y
sta entities,y
// [12] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$13)<(signed byte) 0) goto main::@9 -- pbsc1_derefidx_vbuz1_lt_0_then_la1
ldy.z __13
// [12] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$16)<(signed byte) 0) goto main::@9 -- pbsc1_derefidx_vbuz1_lt_0_then_la1
ldy.z __16
lda entities,y
cmp #0
bmi __b9
jmp __b10
// main::@10
__b10:
// [13] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$13)<(signed byte) $27+(signed byte) 1) goto main::@8 -- pbsc1_derefidx_vbuz1_lt_vbsc2_then_la1
ldy.z __13
// [13] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$16)<(signed byte) $27+(signed byte) 1) goto main::@8 -- pbsc1_derefidx_vbuz1_lt_vbsc2_then_la1
ldy.z __16
lda entities,y
sec
sbc #$27+1
@ -561,24 +554,19 @@ main: {
jmp __b9
// main::@9
__b9:
// [14] (byte~) main::$18 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuz1=vbuz2_plus_vbuz3
lda.z __25
clc
adc.z i1
sta.z __18
// [15] (signed byte~) main::$8 ← - *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$18) -- vbsz1=_neg_pbsc1_derefidx_vbuz2
ldy.z __18
// [14] (signed byte~) main::$8 ← - *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16) -- vbsz1=_neg_pbsc1_derefidx_vbuz2
ldy.z __16
lda entities+OFFSET_STRUCT_ENTITY_X_VEL,y
eor #$ff
clc
adc #1
sta.z __8
// [16] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$18) ← (signed byte~) main::$8 -- pbsc1_derefidx_vbuz1=vbsz2
// [15] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16) ← (signed byte~) main::$8 -- pbsc1_derefidx_vbuz1=vbsz2
lda.z __8
ldy.z __18
ldy.z __16
sta entities+OFFSET_STRUCT_ENTITY_X_VEL,y
// [17] *((signed byte*)(const struct Entity*) entities + (byte~) main::$18) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$18) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$18) -- pbsc1_derefidx_vbuz1=pbsc1_derefidx_vbuz1_plus_pbsc2_derefidx_vbuz1
ldy.z __18
// [16] *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16) -- pbsc1_derefidx_vbuz1=pbsc1_derefidx_vbuz1_plus_pbsc2_derefidx_vbuz1
ldy.z __16
clc
lda entities,y
adc entities+OFFSET_STRUCT_ENTITY_X_VEL,y
@ -586,18 +574,13 @@ main: {
jmp __b8
// main::@8
__b8:
// [18] (byte~) main::$16 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuz1=vbuz2_plus_vbuz3
lda.z __25
clc
adc.z i1
sta.z __16
// [19] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$16)) ← *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$16) -- pbuz1_derefidx_(pbsc1_derefidx_vbuz2)=pbuc2_derefidx_vbuz2
// [17] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$16)) ← *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$16) -- pbuz1_derefidx_(pbsc1_derefidx_vbuz2)=pbuc2_derefidx_vbuz2
// Draw symbol
ldx.z __16
lda entities+OFFSET_STRUCT_ENTITY_SYMBOL,x
ldy entities,x
sta (line),y
// [20] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1
// [18] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1
// Next line
lda #$28
clc
@ -606,7 +589,7 @@ main: {
bcc !+
inc.z line+1
!:
// [21] (byte) main::i1#1 ← ++ (byte) main::i1#2 -- vbuz1=_inc_vbuz1
// [19] (byte) main::i1#1 ← ++ (byte) main::i1#2 -- vbuz1=_inc_vbuz1
inc.z i1
// [5] phi from main::@8 to main::@5 [phi:main::@8->main::@5]
__b5_from___b8:
@ -615,34 +598,34 @@ main: {
jmp __b5
// main::@2
__b2:
// [22] (byte~) main::$21 ← (byte) main::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1
// [20] (byte~) main::$21 ← (byte) main::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1
lda.z i
asl
sta.z __21
// [23] (byte~) main::$10 ← (byte~) main::$21 + (byte) main::i#2 -- vbuz1=vbuz2_plus_vbuz3
// [21] (byte~) main::$10 ← (byte~) main::$21 + (byte) main::i#2 -- vbuz1=vbuz2_plus_vbuz3
lda.z __21
clc
adc.z i
sta.z __10
// [24] *((signed byte*)(const struct Entity*) entities + (byte~) main::$10) ← (signed byte)(byte) main::i#2 -- pbsc1_derefidx_vbuz1=vbsz2
// [22] *((signed byte*)(const struct Entity*) entities + (byte~) main::$10) ← (signed byte)(byte) main::i#2 -- pbsc1_derefidx_vbuz1=vbsz2
lda.z i
ldy.z __10
sta entities,y
// [25] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$10) ← (signed byte) main::v#2 -- pbsc1_derefidx_vbuz1=vbsz2
// [23] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$10) ← (signed byte) main::v#2 -- pbsc1_derefidx_vbuz1=vbsz2
lda.z v
ldy.z __10
sta entities+OFFSET_STRUCT_ENTITY_X_VEL,y
// [26] *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$10) ← (byte) main::i#2 -- pbuc1_derefidx_vbuz1=vbuz2
// [24] *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$10) ← (byte) main::i#2 -- pbuc1_derefidx_vbuz1=vbuz2
lda.z i
ldy.z __10
sta entities+OFFSET_STRUCT_ENTITY_SYMBOL,y
// [27] (signed byte) main::v#1 ← - (signed byte) main::v#2 -- vbsz1=_neg_vbsz1
// [25] (signed byte) main::v#1 ← - (signed byte) main::v#2 -- vbsz1=_neg_vbsz1
lda.z v
eor #$ff
clc
adc #1
sta.z v
// [28] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1
// [26] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1
inc.z i
// [1] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
__b1_from___b2:
@ -659,92 +642,78 @@ Statement [4] *((const nomodify byte*) VIC_BG_COLOR) ← (byte) 0 [ ] ( [ ] { }
Statement [7] *((const nomodify byte*) VIC_BG_COLOR) ← (byte) $f [ ] ( [ ] { } ) always clobbers reg byte a
Statement [8] (byte~) main::$25 ← (byte) main::i1#2 << (byte) 1 [ main::i1#2 main::line#2 main::$25 ] ( [ main::i1#2 main::line#2 main::$25 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:4 [ main::i1#2 main::i1#1 ]
Statement [9] (byte~) main::$13 ← (byte~) main::$25 + (byte) main::i1#2 [ main::i1#2 main::line#2 main::$25 main::$13 ] ( [ main::i1#2 main::line#2 main::$25 main::$13 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:7 [ main::$25 ]
Statement [10] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$13)) ← (byte) ' ' [ main::i1#2 main::line#2 main::$25 main::$13 ] ( [ main::i1#2 main::line#2 main::$25 main::$13 ] { } ) always clobbers reg byte a reg byte y
Statement [9] (byte~) main::$16 ← (byte~) main::$25 + (byte) main::i1#2 [ main::i1#2 main::line#2 main::$16 ] ( [ main::i1#2 main::line#2 main::$16 ] { } ) always clobbers reg byte a
Statement [10] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$16)) ← (byte) ' ' [ main::i1#2 main::line#2 main::$16 ] ( [ main::i1#2 main::line#2 main::$16 ] { } ) always clobbers reg byte a reg byte y
Removing always clobbered register reg byte y as potential for zp[1]:4 [ main::i1#2 main::i1#1 ]
Removing always clobbered register reg byte y as potential for zp[1]:7 [ main::$25 ]
Removing always clobbered register reg byte a as potential for zp[1]:8 [ main::$13 ]
Removing always clobbered register reg byte y as potential for zp[1]:8 [ main::$13 ]
Statement [11] *((signed byte*)(const struct Entity*) entities + (byte~) main::$13) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$13) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$13) [ main::i1#2 main::line#2 main::$25 main::$13 ] ( [ main::i1#2 main::line#2 main::$25 main::$13 ] { } ) always clobbers reg byte a
Statement [12] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$13)<(signed byte) 0) goto main::@9 [ main::i1#2 main::line#2 main::$25 main::$13 ] ( [ main::i1#2 main::line#2 main::$25 main::$13 ] { } ) always clobbers reg byte a
Statement [13] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$13)<(signed byte) $27+(signed byte) 1) goto main::@8 [ main::i1#2 main::line#2 main::$25 ] ( [ main::i1#2 main::line#2 main::$25 ] { } ) always clobbers reg byte a
Statement [14] (byte~) main::$18 ← (byte~) main::$25 + (byte) main::i1#2 [ main::i1#2 main::line#2 main::$25 main::$18 ] ( [ main::i1#2 main::line#2 main::$25 main::$18 ] { } ) always clobbers reg byte a
Statement [15] (signed byte~) main::$8 ← - *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$18) [ main::i1#2 main::line#2 main::$25 main::$18 main::$8 ] ( [ main::i1#2 main::line#2 main::$25 main::$18 main::$8 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:9 [ main::$18 ]
Statement [17] *((signed byte*)(const struct Entity*) entities + (byte~) main::$18) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$18) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$18) [ main::i1#2 main::line#2 main::$25 ] ( [ main::i1#2 main::line#2 main::$25 ] { } ) always clobbers reg byte a
Statement [18] (byte~) main::$16 ← (byte~) main::$25 + (byte) main::i1#2 [ main::i1#2 main::line#2 main::$16 ] ( [ main::i1#2 main::line#2 main::$16 ] { } ) always clobbers reg byte a
Statement [19] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$16)) ← *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$16) [ main::i1#2 main::line#2 ] ( [ main::i1#2 main::line#2 ] { } ) always clobbers reg byte a reg byte y
Statement [20] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 [ main::i1#2 main::line#1 ] ( [ main::i1#2 main::line#1 ] { } ) always clobbers reg byte a
Statement [22] (byte~) main::$21 ← (byte) main::i#2 << (byte) 1 [ main::i#2 main::v#2 main::$21 ] ( [ main::i#2 main::v#2 main::$21 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:8 [ main::$16 ]
Removing always clobbered register reg byte y as potential for zp[1]:8 [ main::$16 ]
Statement [11] *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16) [ main::i1#2 main::line#2 main::$16 ] ( [ main::i1#2 main::line#2 main::$16 ] { } ) always clobbers reg byte a
Statement [12] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$16)<(signed byte) 0) goto main::@9 [ main::i1#2 main::line#2 main::$16 ] ( [ main::i1#2 main::line#2 main::$16 ] { } ) always clobbers reg byte a
Statement [13] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$16)<(signed byte) $27+(signed byte) 1) goto main::@8 [ main::i1#2 main::line#2 main::$16 ] ( [ main::i1#2 main::line#2 main::$16 ] { } ) always clobbers reg byte a
Statement [14] (signed byte~) main::$8 ← - *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16) [ main::i1#2 main::line#2 main::$16 main::$8 ] ( [ main::i1#2 main::line#2 main::$16 main::$8 ] { } ) always clobbers reg byte a
Statement [16] *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16) [ main::i1#2 main::line#2 main::$16 ] ( [ main::i1#2 main::line#2 main::$16 ] { } ) always clobbers reg byte a
Statement [17] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$16)) ← *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$16) [ main::i1#2 main::line#2 ] ( [ main::i1#2 main::line#2 ] { } ) always clobbers reg byte a reg byte y
Statement [18] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 [ main::i1#2 main::line#1 ] ( [ main::i1#2 main::line#1 ] { } ) always clobbers reg byte a
Statement [20] (byte~) main::$21 ← (byte) main::i#2 << (byte) 1 [ main::i#2 main::v#2 main::$21 ] ( [ main::i#2 main::v#2 main::$21 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::i#2 main::i#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:3 [ main::v#2 main::v#1 ]
Statement [23] (byte~) main::$10 ← (byte~) main::$21 + (byte) main::i#2 [ main::i#2 main::v#2 main::$10 ] ( [ main::i#2 main::v#2 main::$10 ] { } ) always clobbers reg byte a
Statement [24] *((signed byte*)(const struct Entity*) entities + (byte~) main::$10) ← (signed byte)(byte) main::i#2 [ main::i#2 main::v#2 main::$10 ] ( [ main::i#2 main::v#2 main::$10 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:13 [ main::$10 ]
Statement [25] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$10) ← (signed byte) main::v#2 [ main::i#2 main::v#2 main::$10 ] ( [ main::i#2 main::v#2 main::$10 ] { } ) always clobbers reg byte a
Statement [26] *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$10) ← (byte) main::i#2 [ main::i#2 main::v#2 ] ( [ main::i#2 main::v#2 ] { } ) always clobbers reg byte a
Statement [27] (signed byte) main::v#1 ← - (signed byte) main::v#2 [ main::i#2 main::v#1 ] ( [ main::i#2 main::v#1 ] { } ) always clobbers reg byte a
Statement [21] (byte~) main::$10 ← (byte~) main::$21 + (byte) main::i#2 [ main::i#2 main::v#2 main::$10 ] ( [ main::i#2 main::v#2 main::$10 ] { } ) always clobbers reg byte a
Statement [22] *((signed byte*)(const struct Entity*) entities + (byte~) main::$10) ← (signed byte)(byte) main::i#2 [ main::i#2 main::v#2 main::$10 ] ( [ main::i#2 main::v#2 main::$10 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:11 [ main::$10 ]
Statement [23] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$10) ← (signed byte) main::v#2 [ main::i#2 main::v#2 main::$10 ] ( [ main::i#2 main::v#2 main::$10 ] { } ) always clobbers reg byte a
Statement [24] *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$10) ← (byte) main::i#2 [ main::i#2 main::v#2 ] ( [ main::i#2 main::v#2 ] { } ) always clobbers reg byte a
Statement [25] (signed byte) main::v#1 ← - (signed byte) main::v#2 [ main::i#2 main::v#1 ] ( [ main::i#2 main::v#1 ] { } ) always clobbers reg byte a
Statement [3] if(*((const nomodify byte*) VIC_RASTER)!=(byte) $ff) goto main::@3 [ ] ( [ ] { } ) always clobbers reg byte a
Statement [4] *((const nomodify byte*) VIC_BG_COLOR) ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a
Statement [7] *((const nomodify byte*) VIC_BG_COLOR) ← (byte) $f [ ] ( [ ] { } ) always clobbers reg byte a
Statement [8] (byte~) main::$25 ← (byte) main::i1#2 << (byte) 1 [ main::i1#2 main::line#2 main::$25 ] ( [ main::i1#2 main::line#2 main::$25 ] { } ) always clobbers reg byte a
Statement [9] (byte~) main::$13 ← (byte~) main::$25 + (byte) main::i1#2 [ main::i1#2 main::line#2 main::$25 main::$13 ] ( [ main::i1#2 main::line#2 main::$25 main::$13 ] { } ) always clobbers reg byte a
Statement [10] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$13)) ← (byte) ' ' [ main::i1#2 main::line#2 main::$25 main::$13 ] ( [ main::i1#2 main::line#2 main::$25 main::$13 ] { } ) always clobbers reg byte a reg byte y
Statement [11] *((signed byte*)(const struct Entity*) entities + (byte~) main::$13) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$13) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$13) [ main::i1#2 main::line#2 main::$25 main::$13 ] ( [ main::i1#2 main::line#2 main::$25 main::$13 ] { } ) always clobbers reg byte a
Statement [12] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$13)<(signed byte) 0) goto main::@9 [ main::i1#2 main::line#2 main::$25 main::$13 ] ( [ main::i1#2 main::line#2 main::$25 main::$13 ] { } ) always clobbers reg byte a
Statement [13] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$13)<(signed byte) $27+(signed byte) 1) goto main::@8 [ main::i1#2 main::line#2 main::$25 ] ( [ main::i1#2 main::line#2 main::$25 ] { } ) always clobbers reg byte a
Statement [14] (byte~) main::$18 ← (byte~) main::$25 + (byte) main::i1#2 [ main::i1#2 main::line#2 main::$25 main::$18 ] ( [ main::i1#2 main::line#2 main::$25 main::$18 ] { } ) always clobbers reg byte a
Statement [15] (signed byte~) main::$8 ← - *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$18) [ main::i1#2 main::line#2 main::$25 main::$18 main::$8 ] ( [ main::i1#2 main::line#2 main::$25 main::$18 main::$8 ] { } ) always clobbers reg byte a
Statement [17] *((signed byte*)(const struct Entity*) entities + (byte~) main::$18) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$18) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$18) [ main::i1#2 main::line#2 main::$25 ] ( [ main::i1#2 main::line#2 main::$25 ] { } ) always clobbers reg byte a
Statement [18] (byte~) main::$16 ← (byte~) main::$25 + (byte) main::i1#2 [ main::i1#2 main::line#2 main::$16 ] ( [ main::i1#2 main::line#2 main::$16 ] { } ) always clobbers reg byte a
Statement [19] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$16)) ← *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$16) [ main::i1#2 main::line#2 ] ( [ main::i1#2 main::line#2 ] { } ) always clobbers reg byte a reg byte y
Statement [20] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 [ main::i1#2 main::line#1 ] ( [ main::i1#2 main::line#1 ] { } ) always clobbers reg byte a
Statement [22] (byte~) main::$21 ← (byte) main::i#2 << (byte) 1 [ main::i#2 main::v#2 main::$21 ] ( [ main::i#2 main::v#2 main::$21 ] { } ) always clobbers reg byte a
Statement [23] (byte~) main::$10 ← (byte~) main::$21 + (byte) main::i#2 [ main::i#2 main::v#2 main::$10 ] ( [ main::i#2 main::v#2 main::$10 ] { } ) always clobbers reg byte a
Statement [24] *((signed byte*)(const struct Entity*) entities + (byte~) main::$10) ← (signed byte)(byte) main::i#2 [ main::i#2 main::v#2 main::$10 ] ( [ main::i#2 main::v#2 main::$10 ] { } ) always clobbers reg byte a
Statement [25] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$10) ← (signed byte) main::v#2 [ main::i#2 main::v#2 main::$10 ] ( [ main::i#2 main::v#2 main::$10 ] { } ) always clobbers reg byte a
Statement [26] *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$10) ← (byte) main::i#2 [ main::i#2 main::v#2 ] ( [ main::i#2 main::v#2 ] { } ) always clobbers reg byte a
Statement [27] (signed byte) main::v#1 ← - (signed byte) main::v#2 [ main::i#2 main::v#1 ] ( [ main::i#2 main::v#1 ] { } ) always clobbers reg byte a
Statement [9] (byte~) main::$16 ← (byte~) main::$25 + (byte) main::i1#2 [ main::i1#2 main::line#2 main::$16 ] ( [ main::i1#2 main::line#2 main::$16 ] { } ) always clobbers reg byte a
Statement [10] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$16)) ← (byte) ' ' [ main::i1#2 main::line#2 main::$16 ] ( [ main::i1#2 main::line#2 main::$16 ] { } ) always clobbers reg byte a reg byte y
Statement [11] *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16) [ main::i1#2 main::line#2 main::$16 ] ( [ main::i1#2 main::line#2 main::$16 ] { } ) always clobbers reg byte a
Statement [12] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$16)<(signed byte) 0) goto main::@9 [ main::i1#2 main::line#2 main::$16 ] ( [ main::i1#2 main::line#2 main::$16 ] { } ) always clobbers reg byte a
Statement [13] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$16)<(signed byte) $27+(signed byte) 1) goto main::@8 [ main::i1#2 main::line#2 main::$16 ] ( [ main::i1#2 main::line#2 main::$16 ] { } ) always clobbers reg byte a
Statement [14] (signed byte~) main::$8 ← - *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16) [ main::i1#2 main::line#2 main::$16 main::$8 ] ( [ main::i1#2 main::line#2 main::$16 main::$8 ] { } ) always clobbers reg byte a
Statement [16] *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16) [ main::i1#2 main::line#2 main::$16 ] ( [ main::i1#2 main::line#2 main::$16 ] { } ) always clobbers reg byte a
Statement [17] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$16)) ← *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$16) [ main::i1#2 main::line#2 ] ( [ main::i1#2 main::line#2 ] { } ) always clobbers reg byte a reg byte y
Statement [18] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 [ main::i1#2 main::line#1 ] ( [ main::i1#2 main::line#1 ] { } ) always clobbers reg byte a
Statement [20] (byte~) main::$21 ← (byte) main::i#2 << (byte) 1 [ main::i#2 main::v#2 main::$21 ] ( [ main::i#2 main::v#2 main::$21 ] { } ) always clobbers reg byte a
Statement [21] (byte~) main::$10 ← (byte~) main::$21 + (byte) main::i#2 [ main::i#2 main::v#2 main::$10 ] ( [ main::i#2 main::v#2 main::$10 ] { } ) always clobbers reg byte a
Statement [22] *((signed byte*)(const struct Entity*) entities + (byte~) main::$10) ← (signed byte)(byte) main::i#2 [ main::i#2 main::v#2 main::$10 ] ( [ main::i#2 main::v#2 main::$10 ] { } ) always clobbers reg byte a
Statement [23] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$10) ← (signed byte) main::v#2 [ main::i#2 main::v#2 main::$10 ] ( [ main::i#2 main::v#2 main::$10 ] { } ) always clobbers reg byte a
Statement [24] *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$10) ← (byte) main::i#2 [ main::i#2 main::v#2 ] ( [ main::i#2 main::v#2 ] { } ) always clobbers reg byte a
Statement [25] (signed byte) main::v#1 ← - (signed byte) main::v#2 [ main::i#2 main::v#1 ] ( [ main::i#2 main::v#1 ] { } ) always clobbers reg byte a
Potential registers zp[1]:2 [ main::i#2 main::i#1 ] : zp[1]:2 , reg byte x , reg byte y ,
Potential registers zp[1]:3 [ main::v#2 main::v#1 ] : zp[1]:3 , reg byte x , reg byte y ,
Potential registers zp[1]:4 [ main::i1#2 main::i1#1 ] : zp[1]:4 , reg byte x ,
Potential registers zp[2]:5 [ main::line#2 main::line#1 ] : zp[2]:5 ,
Potential registers zp[1]:7 [ main::$25 ] : zp[1]:7 , reg byte x ,
Potential registers zp[1]:8 [ main::$13 ] : zp[1]:8 , reg byte x ,
Potential registers zp[1]:9 [ main::$18 ] : zp[1]:9 , reg byte x , reg byte y ,
Potential registers zp[1]:10 [ main::$8 ] : zp[1]:10 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:11 [ main::$16 ] : zp[1]:11 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:12 [ main::$21 ] : zp[1]:12 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:13 [ main::$10 ] : zp[1]:13 , reg byte x , reg byte y ,
Potential registers zp[1]:7 [ main::$25 ] : zp[1]:7 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:8 [ main::$16 ] : zp[1]:8 , reg byte x ,
Potential registers zp[1]:9 [ main::$8 ] : zp[1]:9 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:10 [ main::$21 ] : zp[1]:10 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:11 [ main::$10 ] : zp[1]:11 , reg byte x , reg byte y ,
REGISTER UPLIFT SCOPES
Uplift Scope [main] 303: zp[1]:11 [ main::$16 ] 249.13: zp[1]:4 [ main::i1#2 main::i1#1 ] 202: zp[1]:10 [ main::$8 ] 202: zp[1]:9 [ main::$18 ] 176.75: zp[1]:8 [ main::$13 ] 129.86: zp[2]:5 [ main::line#2 main::line#1 ] 40.4: zp[1]:7 [ main::$25 ] 30.25: zp[1]:2 [ main::i#2 main::i#1 ] 22: zp[1]:12 [ main::$21 ] 15.71: zp[1]:3 [ main::v#2 main::v#1 ] 14.67: zp[1]:13 [ main::$10 ]
Uplift Scope [main] 240.85: zp[1]:4 [ main::i1#2 main::i1#1 ] 202: zp[1]:7 [ main::$25 ] 202: zp[1]:9 [ main::$8 ] 176.75: zp[1]:8 [ main::$16 ] 134.67: zp[2]:5 [ main::line#2 main::line#1 ] 30.25: zp[1]:2 [ main::i#2 main::i#1 ] 22: zp[1]:10 [ main::$21 ] 15.71: zp[1]:3 [ main::v#2 main::v#1 ] 14.67: zp[1]:11 [ main::$10 ]
Uplift Scope [Entity]
Uplift Scope []
Uplifting [main] best 23607 combination reg byte a [ main::$16 ] zp[1]:4 [ main::i1#2 main::i1#1 ] reg byte a [ main::$8 ] reg byte x [ main::$18 ] zp[1]:8 [ main::$13 ] zp[2]:5 [ main::line#2 main::line#1 ] zp[1]:7 [ main::$25 ] zp[1]:2 [ main::i#2 main::i#1 ] zp[1]:12 [ main::$21 ] zp[1]:3 [ main::v#2 main::v#1 ] zp[1]:13 [ main::$10 ]
Limited combination testing to 100 combinations of 41472 possible.
Uplifting [Entity] best 23607 combination
Uplifting [] best 23607 combination
Uplifting [main] best 19707 combination zp[1]:4 [ main::i1#2 main::i1#1 ] reg byte a [ main::$25 ] reg byte a [ main::$8 ] reg byte x [ main::$16 ] zp[2]:5 [ main::line#2 main::line#1 ] zp[1]:2 [ main::i#2 main::i#1 ] zp[1]:10 [ main::$21 ] zp[1]:3 [ main::v#2 main::v#1 ] zp[1]:11 [ main::$10 ]
Limited combination testing to 100 combinations of 6912 possible.
Uplifting [Entity] best 19707 combination
Uplifting [] best 19707 combination
Attempting to uplift remaining variables inzp[1]:4 [ main::i1#2 main::i1#1 ]
Uplifting [main] best 23607 combination zp[1]:4 [ main::i1#2 main::i1#1 ]
Attempting to uplift remaining variables inzp[1]:8 [ main::$13 ]
Uplifting [main] best 22307 combination reg byte x [ main::$13 ]
Attempting to uplift remaining variables inzp[1]:7 [ main::$25 ]
Uplifting [main] best 22307 combination zp[1]:7 [ main::$25 ]
Uplifting [main] best 19707 combination zp[1]:4 [ main::i1#2 main::i1#1 ]
Attempting to uplift remaining variables inzp[1]:2 [ main::i#2 main::i#1 ]
Uplifting [main] best 22177 combination reg byte x [ main::i#2 main::i#1 ]
Attempting to uplift remaining variables inzp[1]:12 [ main::$21 ]
Uplifting [main] best 22157 combination reg byte a [ main::$21 ]
Uplifting [main] best 19577 combination reg byte x [ main::i#2 main::i#1 ]
Attempting to uplift remaining variables inzp[1]:10 [ main::$21 ]
Uplifting [main] best 19557 combination reg byte a [ main::$21 ]
Attempting to uplift remaining variables inzp[1]:3 [ main::v#2 main::v#1 ]
Uplifting [main] best 22157 combination zp[1]:3 [ main::v#2 main::v#1 ]
Attempting to uplift remaining variables inzp[1]:13 [ main::$10 ]
Uplifting [main] best 22057 combination reg byte y [ main::$10 ]
Uplifting [main] best 19557 combination zp[1]:3 [ main::v#2 main::v#1 ]
Attempting to uplift remaining variables inzp[1]:11 [ main::$10 ]
Uplifting [main] best 19457 combination reg byte y [ main::$10 ]
Allocated (was zp[1]:3) zp[1]:2 [ main::v#2 main::v#1 ]
Allocated (was zp[1]:4) zp[1]:3 [ main::i1#2 main::i1#1 ]
Allocated (was zp[2]:5) zp[2]:4 [ main::line#2 main::line#1 ]
Allocated (was zp[1]:7) zp[1]:6 [ main::$25 ]
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
@ -766,7 +735,6 @@ main: {
// Move the entities
.label line = 4
.label i1 = 3
.label __25 = 6
// asm { sei }
sei
// [1] phi from main to main::@1 [phi:main->main::@1]
@ -822,34 +790,32 @@ main: {
jmp __b3
// main::@6
__b6:
// [8] (byte~) main::$25 ← (byte) main::i1#2 << (byte) 1 -- vbuz1=vbuz2_rol_1
// [8] (byte~) main::$25 ← (byte) main::i1#2 << (byte) 1 -- vbuaa=vbuz1_rol_1
lda.z i1
asl
sta.z __25
// [9] (byte~) main::$13 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuxx=vbuz1_plus_vbuz2
lda.z __25
// [9] (byte~) main::$16 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuxx=vbuaa_plus_vbuz1
clc
adc.z i1
tax
// [10] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$13)) ← (byte) ' ' -- pbuz1_derefidx_(pbsc1_derefidx_vbuxx)=vbuc2
// [10] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$16)) ← (byte) ' ' -- pbuz1_derefidx_(pbsc1_derefidx_vbuxx)=vbuc2
// Delete old symbol
lda #' '
ldy entities,x
sta (line),y
// [11] *((signed byte*)(const struct Entity*) entities + (byte~) main::$13) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$13) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$13) -- pbsc1_derefidx_vbuxx=pbsc1_derefidx_vbuxx_plus_pbsc2_derefidx_vbuxx
// [11] *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16) -- pbsc1_derefidx_vbuxx=pbsc1_derefidx_vbuxx_plus_pbsc2_derefidx_vbuxx
// Move by velocity
clc
lda entities,x
adc entities+OFFSET_STRUCT_ENTITY_X_VEL,x
sta entities,x
// [12] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$13)<(signed byte) 0) goto main::@9 -- pbsc1_derefidx_vbuxx_lt_0_then_la1
// [12] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$16)<(signed byte) 0) goto main::@9 -- pbsc1_derefidx_vbuxx_lt_0_then_la1
lda entities,x
cmp #0
bmi __b9
jmp __b10
// main::@10
__b10:
// [13] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$13)<(signed byte) $27+(signed byte) 1) goto main::@8 -- pbsc1_derefidx_vbuxx_lt_vbsc2_then_la1
// [13] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$16)<(signed byte) $27+(signed byte) 1) goto main::@8 -- pbsc1_derefidx_vbuxx_lt_vbsc2_then_la1
lda entities,x
sec
sbc #$27+1
@ -860,19 +826,14 @@ main: {
jmp __b9
// main::@9
__b9:
// [14] (byte~) main::$18 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuxx=vbuz1_plus_vbuz2
lda.z __25
clc
adc.z i1
tax
// [15] (signed byte~) main::$8 ← - *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$18) -- vbsaa=_neg_pbsc1_derefidx_vbuxx
// [14] (signed byte~) main::$8 ← - *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16) -- vbsaa=_neg_pbsc1_derefidx_vbuxx
lda entities+OFFSET_STRUCT_ENTITY_X_VEL,x
eor #$ff
clc
adc #1
// [16] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$18) ← (signed byte~) main::$8 -- pbsc1_derefidx_vbuxx=vbsaa
// [15] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16) ← (signed byte~) main::$8 -- pbsc1_derefidx_vbuxx=vbsaa
sta entities+OFFSET_STRUCT_ENTITY_X_VEL,x
// [17] *((signed byte*)(const struct Entity*) entities + (byte~) main::$18) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$18) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$18) -- pbsc1_derefidx_vbuxx=pbsc1_derefidx_vbuxx_plus_pbsc2_derefidx_vbuxx
// [16] *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16) -- pbsc1_derefidx_vbuxx=pbsc1_derefidx_vbuxx_plus_pbsc2_derefidx_vbuxx
clc
lda entities,x
adc entities+OFFSET_STRUCT_ENTITY_X_VEL,x
@ -880,17 +841,12 @@ main: {
jmp __b8
// main::@8
__b8:
// [18] (byte~) main::$16 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuaa=vbuz1_plus_vbuz2
lda.z __25
clc
adc.z i1
// [19] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$16)) ← *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$16) -- pbuz1_derefidx_(pbsc1_derefidx_vbuaa)=pbuc2_derefidx_vbuaa
// [17] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$16)) ← *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$16) -- pbuz1_derefidx_(pbsc1_derefidx_vbuxx)=pbuc2_derefidx_vbuxx
// Draw symbol
tax
lda entities+OFFSET_STRUCT_ENTITY_SYMBOL,x
ldy entities,x
sta (line),y
// [20] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1
// [18] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1
// Next line
lda #$28
clc
@ -899,7 +855,7 @@ main: {
bcc !+
inc.z line+1
!:
// [21] (byte) main::i1#1 ← ++ (byte) main::i1#2 -- vbuz1=_inc_vbuz1
// [19] (byte) main::i1#1 ← ++ (byte) main::i1#2 -- vbuz1=_inc_vbuz1
inc.z i1
// [5] phi from main::@8 to main::@5 [phi:main::@8->main::@5]
__b5_from___b8:
@ -908,30 +864,30 @@ main: {
jmp __b5
// main::@2
__b2:
// [22] (byte~) main::$21 ← (byte) main::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1
// [20] (byte~) main::$21 ← (byte) main::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1
txa
asl
// [23] (byte~) main::$10 ← (byte~) main::$21 + (byte) main::i#2 -- vbuyy=vbuaa_plus_vbuxx
// [21] (byte~) main::$10 ← (byte~) main::$21 + (byte) main::i#2 -- vbuyy=vbuaa_plus_vbuxx
stx.z $ff
clc
adc.z $ff
tay
// [24] *((signed byte*)(const struct Entity*) entities + (byte~) main::$10) ← (signed byte)(byte) main::i#2 -- pbsc1_derefidx_vbuyy=vbsxx
// [22] *((signed byte*)(const struct Entity*) entities + (byte~) main::$10) ← (signed byte)(byte) main::i#2 -- pbsc1_derefidx_vbuyy=vbsxx
txa
sta entities,y
// [25] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$10) ← (signed byte) main::v#2 -- pbsc1_derefidx_vbuyy=vbsz1
// [23] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$10) ← (signed byte) main::v#2 -- pbsc1_derefidx_vbuyy=vbsz1
lda.z v
sta entities+OFFSET_STRUCT_ENTITY_X_VEL,y
// [26] *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$10) ← (byte) main::i#2 -- pbuc1_derefidx_vbuyy=vbuxx
// [24] *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$10) ← (byte) main::i#2 -- pbuc1_derefidx_vbuyy=vbuxx
txa
sta entities+OFFSET_STRUCT_ENTITY_SYMBOL,y
// [27] (signed byte) main::v#1 ← - (signed byte) main::v#2 -- vbsz1=_neg_vbsz1
// [25] (signed byte) main::v#1 ← - (signed byte) main::v#2 -- vbsz1=_neg_vbsz1
lda.z v
eor #$ff
clc
adc #1
sta.z v
// [28] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx
// [26] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx
inx
// [1] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
__b1_from___b2:
@ -952,8 +908,6 @@ Removing instruction jmp __b10
Removing instruction jmp __b9
Removing instruction jmp __b8
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda.z __25
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction __b1_from_main:
Removing instruction __b4:
Removing instruction __b5_from___b4:
@ -962,7 +916,6 @@ Removing instruction __b10:
Removing instruction __b5_from___b8:
Removing instruction __b1_from___b2:
Succesful ASM optimization Pass5UnusedLabelElimination
Fixing long branch [22] bcc __b2 to bcs
FINAL SYMBOL TABLE
(byte) Entity::symbol
@ -976,11 +929,9 @@ FINAL SYMBOL TABLE
(const struct Entity*) entities[(number) $19] = { fill( $19, 0) }
(void()) main()
(byte~) main::$10 reg byte y 14.666666666666666
(byte~) main::$13 reg byte x 176.75
(byte~) main::$16 reg byte a 303.0
(byte~) main::$18 reg byte x 201.99999999999997
(byte~) main::$16 reg byte x 176.75
(byte~) main::$21 reg byte a 22.0
(byte~) main::$25 zp[1]:6 40.4
(byte~) main::$25 reg byte a 202.0
(signed byte~) main::$8 reg byte a 202.0
(label) main::@1
(label) main::@10
@ -997,10 +948,10 @@ FINAL SYMBOL TABLE
(byte) main::i#2 reg byte x 8.25
(byte) main::i1
(byte) main::i1#1 i1 zp[1]:3 202.0
(byte) main::i1#2 i1 zp[1]:3 47.13333333333333
(byte) main::i1#2 i1 zp[1]:3 38.84615384615385
(byte*) main::line
(byte*) main::line#1 line zp[2]:4 101.0
(byte*) main::line#2 line zp[2]:4 28.857142857142858
(byte*) main::line#2 line zp[2]:4 33.666666666666664
(signed byte) main::v
(signed byte) main::v#1 v zp[1]:2 11.0
(signed byte) main::v#2 v zp[1]:2 4.714285714285714
@ -1009,17 +960,15 @@ reg byte x [ main::i#2 main::i#1 ]
zp[1]:2 [ main::v#2 main::v#1 ]
zp[1]:3 [ main::i1#2 main::i1#1 ]
zp[2]:4 [ main::line#2 main::line#1 ]
zp[1]:6 [ main::$25 ]
reg byte x [ main::$13 ]
reg byte x [ main::$18 ]
reg byte a [ main::$25 ]
reg byte x [ main::$16 ]
reg byte a [ main::$8 ]
reg byte a [ main::$16 ]
reg byte a [ main::$21 ]
reg byte y [ main::$10 ]
FINAL ASSEMBLER
Score: 19927
Score: 17597
// File Comments
// Test that the multiplication of a idx*sizeof(element) is reused inside loops
@ -1040,7 +989,6 @@ main: {
// Move the entities
.label line = 4
.label i1 = 3
.label __25 = 6
// asm
// asm { sei }
sei
@ -1055,9 +1003,7 @@ main: {
// for(char i=0;i<NUM_ENTITIES;i++)
// [2] if((byte) main::i#2<(byte) $19) goto main::@2 -- vbuxx_lt_vbuc1_then_la1
cpx #$19
bcs !__b2+
jmp __b2
!__b2:
bcc __b2
// Wait for raster refresh
// main::@3
__b3:
@ -1096,33 +1042,32 @@ main: {
// main::@6
__b6:
// line[entities[i].x_pos] = ' '
// [8] (byte~) main::$25 ← (byte) main::i1#2 << (byte) 1 -- vbuz1=vbuz2_rol_1
// [8] (byte~) main::$25 ← (byte) main::i1#2 << (byte) 1 -- vbuaa=vbuz1_rol_1
lda.z i1
asl
sta.z __25
// [9] (byte~) main::$13 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuxx=vbuz1_plus_vbuz2
// [9] (byte~) main::$16 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuxx=vbuaa_plus_vbuz1
clc
adc.z i1
tax
// [10] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$13)) ← (byte) ' ' -- pbuz1_derefidx_(pbsc1_derefidx_vbuxx)=vbuc2
// [10] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$16)) ← (byte) ' ' -- pbuz1_derefidx_(pbsc1_derefidx_vbuxx)=vbuc2
// Delete old symbol
lda #' '
ldy entities,x
sta (line),y
// entities[i].x_pos += entities[i].x_vel
// [11] *((signed byte*)(const struct Entity*) entities + (byte~) main::$13) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$13) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$13) -- pbsc1_derefidx_vbuxx=pbsc1_derefidx_vbuxx_plus_pbsc2_derefidx_vbuxx
// [11] *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16) -- pbsc1_derefidx_vbuxx=pbsc1_derefidx_vbuxx_plus_pbsc2_derefidx_vbuxx
// Move by velocity
clc
lda entities,x
adc entities+OFFSET_STRUCT_ENTITY_X_VEL,x
sta entities,x
// if(entities[i].x_pos<0 || entities[i].x_pos>39)
// [12] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$13)<(signed byte) 0) goto main::@9 -- pbsc1_derefidx_vbuxx_lt_0_then_la1
// [12] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$16)<(signed byte) 0) goto main::@9 -- pbsc1_derefidx_vbuxx_lt_0_then_la1
lda entities,x
cmp #0
bmi __b9
// main::@10
// [13] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$13)<(signed byte) $27+(signed byte) 1) goto main::@8 -- pbsc1_derefidx_vbuxx_lt_vbsc2_then_la1
// [13] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$16)<(signed byte) $27+(signed byte) 1) goto main::@8 -- pbsc1_derefidx_vbuxx_lt_vbsc2_then_la1
lda entities,x
sec
sbc #$27+1
@ -1133,21 +1078,16 @@ main: {
// main::@9
__b9:
// -entities[i].x_vel
// [14] (byte~) main::$18 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuxx=vbuz1_plus_vbuz2
lda.z __25
clc
adc.z i1
tax
// [15] (signed byte~) main::$8 ← - *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$18) -- vbsaa=_neg_pbsc1_derefidx_vbuxx
// [14] (signed byte~) main::$8 ← - *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16) -- vbsaa=_neg_pbsc1_derefidx_vbuxx
lda entities+OFFSET_STRUCT_ENTITY_X_VEL,x
eor #$ff
clc
adc #1
// entities[i].x_vel = -entities[i].x_vel
// [16] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$18) ← (signed byte~) main::$8 -- pbsc1_derefidx_vbuxx=vbsaa
// [15] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16) ← (signed byte~) main::$8 -- pbsc1_derefidx_vbuxx=vbsaa
sta entities+OFFSET_STRUCT_ENTITY_X_VEL,x
// entities[i].x_pos += entities[i].x_vel
// [17] *((signed byte*)(const struct Entity*) entities + (byte~) main::$18) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$18) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$18) -- pbsc1_derefidx_vbuxx=pbsc1_derefidx_vbuxx_plus_pbsc2_derefidx_vbuxx
// [16] *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) ← *((signed byte*)(const struct Entity*) entities + (byte~) main::$16) + *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$16) -- pbsc1_derefidx_vbuxx=pbsc1_derefidx_vbuxx_plus_pbsc2_derefidx_vbuxx
clc
lda entities,x
adc entities+OFFSET_STRUCT_ENTITY_X_VEL,x
@ -1155,18 +1095,13 @@ main: {
// main::@8
__b8:
// line[entities[i].x_pos] = entities[i].symbol
// [18] (byte~) main::$16 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuaa=vbuz1_plus_vbuz2
lda.z __25
clc
adc.z i1
// [19] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$16)) ← *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$16) -- pbuz1_derefidx_(pbsc1_derefidx_vbuaa)=pbuc2_derefidx_vbuaa
// [17] *((byte*) main::line#2 + *((signed byte*)(const struct Entity*) entities + (byte~) main::$16)) ← *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$16) -- pbuz1_derefidx_(pbsc1_derefidx_vbuxx)=pbuc2_derefidx_vbuxx
// Draw symbol
tax
lda entities+OFFSET_STRUCT_ENTITY_SYMBOL,x
ldy entities,x
sta (line),y
// line +=40
// [20] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1
// [18] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1
// Next line
lda #$28
clc
@ -1176,7 +1111,7 @@ main: {
inc.z line+1
!:
// for(char i=0;i<NUM_ENTITIES;i++)
// [21] (byte) main::i1#1 ← ++ (byte) main::i1#2 -- vbuz1=_inc_vbuz1
// [19] (byte) main::i1#1 ← ++ (byte) main::i1#2 -- vbuz1=_inc_vbuz1
inc.z i1
// [5] phi from main::@8 to main::@5 [phi:main::@8->main::@5]
// [5] phi (byte*) main::line#2 = (byte*) main::line#1 [phi:main::@8->main::@5#0] -- register_copy
@ -1185,34 +1120,34 @@ main: {
// main::@2
__b2:
// entities[i].x_pos = (signed char)i
// [22] (byte~) main::$21 ← (byte) main::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1
// [20] (byte~) main::$21 ← (byte) main::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1
txa
asl
// [23] (byte~) main::$10 ← (byte~) main::$21 + (byte) main::i#2 -- vbuyy=vbuaa_plus_vbuxx
// [21] (byte~) main::$10 ← (byte~) main::$21 + (byte) main::i#2 -- vbuyy=vbuaa_plus_vbuxx
stx.z $ff
clc
adc.z $ff
tay
// [24] *((signed byte*)(const struct Entity*) entities + (byte~) main::$10) ← (signed byte)(byte) main::i#2 -- pbsc1_derefidx_vbuyy=vbsxx
// [22] *((signed byte*)(const struct Entity*) entities + (byte~) main::$10) ← (signed byte)(byte) main::i#2 -- pbsc1_derefidx_vbuyy=vbsxx
txa
sta entities,y
// entities[i].x_vel = v
// [25] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$10) ← (signed byte) main::v#2 -- pbsc1_derefidx_vbuyy=vbsz1
// [23] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$10) ← (signed byte) main::v#2 -- pbsc1_derefidx_vbuyy=vbsz1
lda.z v
sta entities+OFFSET_STRUCT_ENTITY_X_VEL,y
// entities[i].symbol = i
// [26] *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$10) ← (byte) main::i#2 -- pbuc1_derefidx_vbuyy=vbuxx
// [24] *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$10) ← (byte) main::i#2 -- pbuc1_derefidx_vbuyy=vbuxx
txa
sta entities+OFFSET_STRUCT_ENTITY_SYMBOL,y
// v = -v
// [27] (signed byte) main::v#1 ← - (signed byte) main::v#2 -- vbsz1=_neg_vbsz1
// [25] (signed byte) main::v#1 ← - (signed byte) main::v#2 -- vbsz1=_neg_vbsz1
lda.z v
eor #$ff
clc
adc #1
sta.z v
// for(char i=0;i<NUM_ENTITIES;i++)
// [28] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx
// [26] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx
inx
// [1] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
// [1] phi (signed byte) main::v#2 = (signed byte) main::v#1 [phi:main::@2->main::@1#0] -- register_copy

View File

@ -9,11 +9,9 @@
(const struct Entity*) entities[(number) $19] = { fill( $19, 0) }
(void()) main()
(byte~) main::$10 reg byte y 14.666666666666666
(byte~) main::$13 reg byte x 176.75
(byte~) main::$16 reg byte a 303.0
(byte~) main::$18 reg byte x 201.99999999999997
(byte~) main::$16 reg byte x 176.75
(byte~) main::$21 reg byte a 22.0
(byte~) main::$25 zp[1]:6 40.4
(byte~) main::$25 reg byte a 202.0
(signed byte~) main::$8 reg byte a 202.0
(label) main::@1
(label) main::@10
@ -30,10 +28,10 @@
(byte) main::i#2 reg byte x 8.25
(byte) main::i1
(byte) main::i1#1 i1 zp[1]:3 202.0
(byte) main::i1#2 i1 zp[1]:3 47.13333333333333
(byte) main::i1#2 i1 zp[1]:3 38.84615384615385
(byte*) main::line
(byte*) main::line#1 line zp[2]:4 101.0
(byte*) main::line#2 line zp[2]:4 28.857142857142858
(byte*) main::line#2 line zp[2]:4 33.666666666666664
(signed byte) main::v
(signed byte) main::v#1 v zp[1]:2 11.0
(signed byte) main::v#2 v zp[1]:2 4.714285714285714
@ -42,10 +40,8 @@ reg byte x [ main::i#2 main::i#1 ]
zp[1]:2 [ main::v#2 main::v#1 ]
zp[1]:3 [ main::i1#2 main::i1#1 ]
zp[2]:4 [ main::line#2 main::line#1 ]
zp[1]:6 [ main::$25 ]
reg byte x [ main::$13 ]
reg byte x [ main::$18 ]
reg byte a [ main::$25 ]
reg byte x [ main::$16 ]
reg byte a [ main::$8 ]
reg byte a [ main::$16 ]
reg byte a [ main::$21 ]
reg byte y [ main::$10 ]

View File

@ -4,8 +4,8 @@
.pc = $80d "Program"
main: {
.label SCREEN = $400
.label __16 = 2
.label __18 = 3
.label __21 = 2
.label __46 = 3
ldx #0
__b1:
// (SCREEN+0*40)[i] = i*1
@ -14,43 +14,39 @@ main: {
// i*2
txa
asl
sta.z __16
// (SCREEN+1*40)[i] = i*2
sta SCREEN+1*$28,x
// i*3
txa
stx.z $ff
clc
adc.z __16
adc.z $ff
sta.z __21
// (SCREEN+2*40)[i] = i*3
sta SCREEN+2*$28,x
// i*4
txa
asl
asl
sta.z __18
// (SCREEN+3*40)[i] = i*4
sta SCREEN+3*$28,x
// i*5
txa
stx.z $ff
clc
adc.z __18
adc.z $ff
tay
// (SCREEN+4*40)[i] = i*5
tya
sta SCREEN+4*$28,x
// i*6
txa
clc
adc.z __16
lda.z __21
asl
// (SCREEN+5*40)[i] = i*6
sta SCREEN+5*$28,x
// i*7
txa
clc
adc.z __16
asl
stx.z $ff
clc
adc.z $ff
sta.z __46
// (SCREEN+6*40)[i] = i*7
sta SCREEN+6*$28,x
// i*8
@ -67,61 +63,34 @@ main: {
// (SCREEN+8*40)[i] = i*9
sta SCREEN+8*$28,x
// i*10
txa
clc
adc.z __18
tya
asl
// (SCREEN+9*40)[i] = i*10
sta SCREEN+9*$28,x
// i*11
txa
clc
adc.z __18
asl
stx.z $ff
clc
adc.z $ff
// (SCREEN+10*40)[i] = i*11
sta SCREEN+$a*$28,x
// i*12
txa
clc
adc.z __16
lda.z __21
asl
asl
// (SCREEN+11*40)[i] = i*12
sta SCREEN+$b*$28,x
// i*13
txa
clc
adc.z __16
asl
asl
stx.z $ff
clc
adc.z $ff
// (SCREEN+12*40)[i] = i*13
sta SCREEN+$c*$28,x
// i*14
txa
clc
adc.z __16
asl
stx.z $ff
clc
adc.z $ff
lda.z __46
asl
// (SCREEN+13*40)[i] = i*14
sta SCREEN+$d*$28,x
// i*15
txa
clc
adc.z __16
asl
stx.z $ff
clc
adc.z $ff
asl
stx.z $ff
clc
adc.z $ff
@ -130,9 +99,7 @@ main: {
// for(byte i: 0..17)
inx
cpx #$12
beq !__b1+
jmp __b1
!__b1:
bne __b1
// }
rts
}

View File

@ -8,51 +8,35 @@ main::@1: scope:[main] from main main::@1
[2] *((const nomodify byte*) main::SCREEN + (byte) main::i#2) ← (byte) main::i#2
[3] (byte~) main::$16 ← (byte) main::i#2 << (byte) 1
[4] *((const nomodify byte*) main::SCREEN+(byte)(number) 1*(number) $28 + (byte) main::i#2) ← (byte~) main::$16
[5] (byte~) main::$2 ← (byte~) main::$16 + (byte) main::i#2
[6] *((const nomodify byte*) main::SCREEN+(byte)(number) 2*(number) $28 + (byte) main::i#2) ← (byte~) main::$2
[5] (byte~) main::$21 ← (byte~) main::$16 + (byte) main::i#2
[6] *((const nomodify byte*) main::SCREEN+(byte)(number) 2*(number) $28 + (byte) main::i#2) ← (byte~) main::$21
[7] (byte~) main::$18 ← (byte) main::i#2 << (byte) 2
[8] *((const nomodify byte*) main::SCREEN+(byte)(number) 3*(number) $28 + (byte) main::i#2) ← (byte~) main::$18
[9] (byte~) main::$4 ← (byte~) main::$18 + (byte) main::i#2
[10] *((const nomodify byte*) main::SCREEN+(byte)(number) 4*(number) $28 + (byte) main::i#2) ← (byte~) main::$4
[11] (byte~) main::$21 ← (byte~) main::$16 + (byte) main::i#2
[12] (byte~) main::$5 ← (byte~) main::$21 << (byte) 1
[13] *((const nomodify byte*) main::SCREEN+(byte)(number) 5*(number) $28 + (byte) main::i#2) ← (byte~) main::$5
[14] (byte~) main::$24 ← (byte~) main::$16 + (byte) main::i#2
[15] (byte~) main::$25 ← (byte~) main::$24 << (byte) 1
[16] (byte~) main::$6 ← (byte~) main::$25 + (byte) main::i#2
[17] *((const nomodify byte*) main::SCREEN+(byte)(number) 6*(number) $28 + (byte) main::i#2) ← (byte~) main::$6
[18] (byte~) main::$27 ← (byte) main::i#2 << (byte) 3
[19] *((const nomodify byte*) main::SCREEN+(word)(number) 7*(number) $28 + (byte) main::i#2) ← (byte~) main::$27
[20] (byte~) main::$8 ← (byte~) main::$27 + (byte) main::i#2
[21] *((const nomodify byte*) main::SCREEN+(word)(number) 8*(number) $28 + (byte) main::i#2) ← (byte~) main::$8
[22] (byte~) main::$30 ← (byte~) main::$18 + (byte) main::i#2
[23] (byte~) main::$9 ← (byte~) main::$30 << (byte) 1
[24] *((const nomodify byte*) main::SCREEN+(word)(number) 9*(number) $28 + (byte) main::i#2) ← (byte~) main::$9
[25] (byte~) main::$33 ← (byte~) main::$18 + (byte) main::i#2
[26] (byte~) main::$34 ← (byte~) main::$33 << (byte) 1
[27] (byte~) main::$10 ← (byte~) main::$34 + (byte) main::i#2
[28] *((const nomodify byte*) main::SCREEN+(word)(number) $a*(number) $28 + (byte) main::i#2) ← (byte~) main::$10
[29] (byte~) main::$37 ← (byte~) main::$16 + (byte) main::i#2
[30] (byte~) main::$11 ← (byte~) main::$37 << (byte) 2
[31] *((const nomodify byte*) main::SCREEN+(word)(number) $b*(number) $28 + (byte) main::i#2) ← (byte~) main::$11
[32] (byte~) main::$40 ← (byte~) main::$16 + (byte) main::i#2
[33] (byte~) main::$41 ← (byte~) main::$40 << (byte) 2
[34] (byte~) main::$12 ← (byte~) main::$41 + (byte) main::i#2
[35] *((const nomodify byte*) main::SCREEN+(word)(number) $c*(number) $28 + (byte) main::i#2) ← (byte~) main::$12
[36] (byte~) main::$44 ← (byte~) main::$16 + (byte) main::i#2
[37] (byte~) main::$45 ← (byte~) main::$44 << (byte) 1
[38] (byte~) main::$46 ← (byte~) main::$45 + (byte) main::i#2
[39] (byte~) main::$13 ← (byte~) main::$46 << (byte) 1
[40] *((const nomodify byte*) main::SCREEN+(word)(number) $d*(number) $28 + (byte) main::i#2) ← (byte~) main::$13
[41] (byte~) main::$49 ← (byte~) main::$16 + (byte) main::i#2
[42] (byte~) main::$50 ← (byte~) main::$49 << (byte) 1
[43] (byte~) main::$51 ← (byte~) main::$50 + (byte) main::i#2
[44] (byte~) main::$52 ← (byte~) main::$51 << (byte) 1
[45] (byte~) main::$14 ← (byte~) main::$52 + (byte) main::i#2
[46] *((const nomodify byte*) main::SCREEN+(word)(number) $e*(number) $28 + (byte) main::i#2) ← (byte~) main::$14
[47] (byte) main::i#1 ← ++ (byte) main::i#2
[48] if((byte) main::i#1!=(byte) $12) goto main::@1
[9] (byte~) main::$30 ← (byte~) main::$18 + (byte) main::i#2
[10] *((const nomodify byte*) main::SCREEN+(byte)(number) 4*(number) $28 + (byte) main::i#2) ← (byte~) main::$30
[11] (byte~) main::$25 ← (byte~) main::$21 << (byte) 1
[12] *((const nomodify byte*) main::SCREEN+(byte)(number) 5*(number) $28 + (byte) main::i#2) ← (byte~) main::$25
[13] (byte~) main::$46 ← (byte~) main::$25 + (byte) main::i#2
[14] *((const nomodify byte*) main::SCREEN+(byte)(number) 6*(number) $28 + (byte) main::i#2) ← (byte~) main::$46
[15] (byte~) main::$27 ← (byte) main::i#2 << (byte) 3
[16] *((const nomodify byte*) main::SCREEN+(word)(number) 7*(number) $28 + (byte) main::i#2) ← (byte~) main::$27
[17] (byte~) main::$8 ← (byte~) main::$27 + (byte) main::i#2
[18] *((const nomodify byte*) main::SCREEN+(word)(number) 8*(number) $28 + (byte) main::i#2) ← (byte~) main::$8
[19] (byte~) main::$34 ← (byte~) main::$30 << (byte) 1
[20] *((const nomodify byte*) main::SCREEN+(word)(number) 9*(number) $28 + (byte) main::i#2) ← (byte~) main::$34
[21] (byte~) main::$10 ← (byte~) main::$34 + (byte) main::i#2
[22] *((const nomodify byte*) main::SCREEN+(word)(number) $a*(number) $28 + (byte) main::i#2) ← (byte~) main::$10
[23] (byte~) main::$41 ← (byte~) main::$21 << (byte) 2
[24] *((const nomodify byte*) main::SCREEN+(word)(number) $b*(number) $28 + (byte) main::i#2) ← (byte~) main::$41
[25] (byte~) main::$12 ← (byte~) main::$41 + (byte) main::i#2
[26] *((const nomodify byte*) main::SCREEN+(word)(number) $c*(number) $28 + (byte) main::i#2) ← (byte~) main::$12
[27] (byte~) main::$52 ← (byte~) main::$46 << (byte) 1
[28] *((const nomodify byte*) main::SCREEN+(word)(number) $d*(number) $28 + (byte) main::i#2) ← (byte~) main::$52
[29] (byte~) main::$14 ← (byte~) main::$52 + (byte) main::i#2
[30] *((const nomodify byte*) main::SCREEN+(word)(number) $e*(number) $28 + (byte) main::i#2) ← (byte~) main::$14
[31] (byte) main::i#1 ← ++ (byte) main::i#2
[32] if((byte) main::i#1!=(byte) $12) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@1
[49] return
[33] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -1,69 +1,37 @@
(void()) main()
(byte~) main::$10 reg byte a 22.0
(byte~) main::$11 reg byte a 22.0
(byte~) main::$12 reg byte a 22.0
(byte~) main::$13 reg byte a 22.0
(byte~) main::$14 reg byte a 22.0
(byte~) main::$16 zp[1]:2 2.605263157894737
(byte~) main::$18 zp[1]:3 3.055555555555556
(byte~) main::$2 reg byte a 22.0
(byte~) main::$21 reg byte a 22.0
(byte~) main::$24 reg byte a 22.0
(byte~) main::$25 reg byte a 22.0
(byte~) main::$16 reg byte a 16.5
(byte~) main::$18 reg byte a 16.5
(byte~) main::$21 zp[1]:2 2.4444444444444446
(byte~) main::$25 reg byte a 16.5
(byte~) main::$27 reg byte a 16.5
(byte~) main::$30 reg byte a 22.0
(byte~) main::$33 reg byte a 22.0
(byte~) main::$34 reg byte a 22.0
(byte~) main::$37 reg byte a 22.0
(byte~) main::$4 reg byte a 22.0
(byte~) main::$40 reg byte a 22.0
(byte~) main::$41 reg byte a 22.0
(byte~) main::$44 reg byte a 22.0
(byte~) main::$45 reg byte a 22.0
(byte~) main::$46 reg byte a 22.0
(byte~) main::$49 reg byte a 22.0
(byte~) main::$5 reg byte a 22.0
(byte~) main::$50 reg byte a 22.0
(byte~) main::$51 reg byte a 22.0
(byte~) main::$52 reg byte a 22.0
(byte~) main::$6 reg byte a 22.0
(byte~) main::$30 reg byte y 3.3000000000000003
(byte~) main::$34 reg byte a 16.5
(byte~) main::$41 reg byte a 16.5
(byte~) main::$46 zp[1]:3 2.357142857142857
(byte~) main::$52 reg byte a 16.5
(byte~) main::$8 reg byte a 22.0
(byte~) main::$9 reg byte a 22.0
(label) main::@1
(label) main::@return
(const nomodify byte*) main::SCREEN = (byte*) 1024
(byte) main::i
(byte) main::i#1 reg byte x 16.5
(byte) main::i#2 reg byte x 9.086956521739129
(byte) main::i#2 reg byte x 10.266666666666666
reg byte x [ main::i#2 main::i#1 ]
zp[1]:2 [ main::$16 ]
reg byte a [ main::$2 ]
zp[1]:3 [ main::$18 ]
reg byte a [ main::$4 ]
reg byte a [ main::$21 ]
reg byte a [ main::$5 ]
reg byte a [ main::$24 ]
reg byte a [ main::$16 ]
zp[1]:2 [ main::$21 ]
reg byte a [ main::$18 ]
reg byte y [ main::$30 ]
reg byte a [ main::$25 ]
reg byte a [ main::$6 ]
zp[1]:3 [ main::$46 ]
reg byte a [ main::$27 ]
reg byte a [ main::$8 ]
reg byte a [ main::$30 ]
reg byte a [ main::$9 ]
reg byte a [ main::$33 ]
reg byte a [ main::$34 ]
reg byte a [ main::$10 ]
reg byte a [ main::$37 ]
reg byte a [ main::$11 ]
reg byte a [ main::$40 ]
reg byte a [ main::$41 ]
reg byte a [ main::$12 ]
reg byte a [ main::$44 ]
reg byte a [ main::$45 ]
reg byte a [ main::$46 ]
reg byte a [ main::$13 ]
reg byte a [ main::$49 ]
reg byte a [ main::$50 ]
reg byte a [ main::$51 ]
reg byte a [ main::$52 ]
reg byte a [ main::$14 ]

View File

@ -243,9 +243,6 @@ Identical Phi Values (byte*) screen#19 (byte*) screen#17
Identical Phi Values (byte*) screen#10 (byte*) screen#1
Identical Phi Values (byte*) screen#12 (byte*) screen#10
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [16] (byte~) printf_uint::$2 ← > (word) printf_uint::uvalue#0
Identified duplicate assignment right side [24] (byte~) printf_uint::$6 ← < (word) printf_uint::uvalue#0
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition (bool~) cputs::$0 [3] if((byte) 0!=*((byte*) cputs::str#3)) goto cputs::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) cputs::str#1 = main::str
@ -275,29 +272,31 @@ Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Alias printf_uint::$2 = printf_uint::$0
Alias printf_uint::$6 = printf_uint::$4
Successful SSA optimization Pass2AliasElimination
Constant right-side identified [7] (byte~) printf_uint::$2 ← > (const word) printf_uint::uvalue#0
Constant right-side identified [14] (byte~) printf_uint::$6 ← < (const word) printf_uint::uvalue#0
Constant right-side identified [7] (byte~) printf_uint::$0 ← > (const word) printf_uint::uvalue#0
Constant right-side identified [11] (byte~) printf_uint::$2 ← > (const word) printf_uint::uvalue#0
Constant right-side identified [15] (byte~) printf_uint::$4 ← < (const word) printf_uint::uvalue#0
Constant right-side identified [19] (byte~) printf_uint::$6 ← < (const word) printf_uint::uvalue#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) printf_uint::$0 = >printf_uint::uvalue#0
Constant (const byte) printf_uint::$2 = >printf_uint::uvalue#0
Constant (const byte) printf_uint::$4 = <printf_uint::uvalue#0
Constant (const byte) printf_uint::$6 = <printf_uint::uvalue#0
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [7] (byte~) printf_uint::$1 ← (const byte) printf_uint::$2 >> (byte) 4
Constant right-side identified [7] (byte~) printf_uint::$1 ← (const byte) printf_uint::$0 >> (byte) 4
Constant right-side identified [10] (byte~) printf_uint::$3 ← (const byte) printf_uint::$2 & (byte) $f
Constant right-side identified [13] (byte~) printf_uint::$5 ← (const byte) printf_uint::$6 >> (byte) 4
Constant right-side identified [13] (byte~) printf_uint::$5 ← (const byte) printf_uint::$4 >> (byte) 4
Constant right-side identified [16] (byte~) printf_uint::$7 ← (const byte) printf_uint::$6 & (byte) $f
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) printf_uint::$1 = printf_uint::$2>>4
Constant (const byte) printf_uint::$1 = printf_uint::$0>>4
Constant (const byte) printf_uint::$3 = printf_uint::$2&$f
Constant (const byte) printf_uint::$5 = printf_uint::$6>>4
Constant (const byte) printf_uint::$5 = printf_uint::$4>>4
Constant (const byte) printf_uint::$7 = printf_uint::$6&$f
Successful SSA optimization Pass2ConstantIdentification
Simplifying constant evaluating to zero (const byte) printf_uint::$2>>(byte) 4 in
Simplifying constant evaluating to zero (const byte) printf_uint::$0>>(byte) 4 in
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero printf_hextab in [8] *((byte*) screen#1) ← *((const to_nomodify byte*) printf_hextab + (const byte) printf_uint::$1)
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant (const byte) printf_uint::$0
Eliminating unused constant (const byte) printf_uint::$1
Successful SSA optimization PassNEliminateUnusedVars
Inlining constant with var siblings (const byte*) cputs::str#1
@ -310,6 +309,7 @@ Constant inlined printf_uint::$3 = >(const word) main::pct&(byte) $f
Constant inlined printf_uint::uvalue#0 = (const word) main::pct
Constant inlined printf_uint::$2 = >(const word) main::pct
Constant inlined printf_uint::$5 = <(const word) main::pct>>(byte) 4
Constant inlined printf_uint::$4 = <(const word) main::pct
Constant inlined printf_uint::$7 = <(const word) main::pct&(byte) $f
Constant inlined printf_uint::$6 = <(const word) main::pct
Successful SSA optimization Pass2ConstantInlining

View File

@ -3,7 +3,7 @@
:BasicUpstart(main)
.pc = $80d "Program"
main: {
.label __3 = 4
.label __4 = 4
.label screen = 2
lda #<$400
sta.z screen
@ -14,14 +14,15 @@ main: {
// i*2
txa
asl
sta.z __3
// i*2+i
txa
stx.z $ff
clc
adc.z __3
adc.z $ff
sta.z __4
// i*2+i+3
lda #3
clc
adc #3
adc.z __4
// *screen++ = i*2+i+3
ldy #0
sta (screen),y
@ -30,13 +31,10 @@ main: {
bne !+
inc.z screen+1
!:
// i*2+i
txa
clc
adc.z __3
// i*2+i+3
lda #3
clc
adc #3
adc.z __4
// *screen++ = i*2+i+3
ldy #0
sta (screen),y

View File

@ -7,17 +7,16 @@ main::@1: scope:[main] from main main::@1
[1] (byte*) main::screen#3 ← phi( main/(byte*) 1024 main::@1/(byte*) main::screen#2 )
[1] (byte) main::i#2 ← phi( main/(byte) 0 main::@1/(byte) main::i#1 )
[2] (byte~) main::$3 ← (byte) main::i#2 << (byte) 1
[3] (byte~) main::$1 ← (byte~) main::$3 + (byte) main::i#2
[4] (byte~) main::$2 ← (byte~) main::$1 + (byte) 3
[3] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#2
[4] (byte~) main::$2 ← (byte~) main::$4 + (byte) 3
[5] *((byte*) main::screen#3) ← (byte~) main::$2
[6] (byte*) main::screen#1 ← ++ (byte*) main::screen#3
[7] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#2
[8] (byte~) main::$5 ← (byte~) main::$4 + (byte) 3
[9] *((byte*) main::screen#1) ← (byte~) main::$5
[10] (byte*) main::screen#2 ← ++ (byte*) main::screen#1
[11] (byte) main::i#1 ← ++ (byte) main::i#2
[12] if((byte) main::i#1!=(byte) 3) goto main::@1
[7] (byte~) main::$5 ← (byte~) main::$4 + (byte) 3
[8] *((byte*) main::screen#1) ← (byte~) main::$5
[9] (byte*) main::screen#2 ← ++ (byte*) main::screen#1
[10] (byte) main::i#1 ← ++ (byte) main::i#2
[11] if((byte) main::i#1!=(byte) 3) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@1
[13] return
[12] return
to:@return

View File

@ -111,6 +111,10 @@ Finalized unsigned number type (byte) 3
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias main::$3 = main::$0
Successful SSA optimization Pass2AliasElimination
Identified duplicate assignment right side [7] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#2
Successful SSA optimization Pass2DuplicateRValueIdentification
Alias main::$4 = main::$1
Successful SSA optimization Pass2AliasElimination
Rewriting multiplication to use shift [1] (byte~) main::$3 ← (byte) main::i#2 * (byte) 2
Successful SSA optimization Pass2MultiplyToShiftRewriting
Inlining constant with var siblings (const byte*) main::screen#0
@ -123,8 +127,8 @@ Adding NOP phi() at start of main
CALL GRAPH
Created 2 initial phi equivalence classes
Coalesced [14] main::i#3 ← main::i#1
Coalesced [15] main::screen#4 ← main::screen#2
Coalesced [13] main::i#3 ← main::i#1
Coalesced [14] main::screen#4 ← main::screen#2
Coalesced down to 2 phi equivalence classes
Culled Empty Block (label) main::@2
Adding NOP phi() at start of main
@ -139,34 +143,32 @@ main::@1: scope:[main] from main main::@1
[1] (byte*) main::screen#3 ← phi( main/(byte*) 1024 main::@1/(byte*) main::screen#2 )
[1] (byte) main::i#2 ← phi( main/(byte) 0 main::@1/(byte) main::i#1 )
[2] (byte~) main::$3 ← (byte) main::i#2 << (byte) 1
[3] (byte~) main::$1 ← (byte~) main::$3 + (byte) main::i#2
[4] (byte~) main::$2 ← (byte~) main::$1 + (byte) 3
[3] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#2
[4] (byte~) main::$2 ← (byte~) main::$4 + (byte) 3
[5] *((byte*) main::screen#3) ← (byte~) main::$2
[6] (byte*) main::screen#1 ← ++ (byte*) main::screen#3
[7] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#2
[8] (byte~) main::$5 ← (byte~) main::$4 + (byte) 3
[9] *((byte*) main::screen#1) ← (byte~) main::$5
[10] (byte*) main::screen#2 ← ++ (byte*) main::screen#1
[11] (byte) main::i#1 ← ++ (byte) main::i#2
[12] if((byte) main::i#1!=(byte) 3) goto main::@1
[7] (byte~) main::$5 ← (byte~) main::$4 + (byte) 3
[8] *((byte*) main::screen#1) ← (byte~) main::$5
[9] (byte*) main::screen#2 ← ++ (byte*) main::screen#1
[10] (byte) main::i#1 ← ++ (byte) main::i#2
[11] if((byte) main::i#1!=(byte) 3) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@1
[13] return
[12] return
to:@return
VARIABLE REGISTER WEIGHTS
(void()) main()
(byte~) main::$1 22.0
(byte~) main::$2 22.0
(byte~) main::$3 6.6000000000000005
(byte~) main::$4 22.0
(byte~) main::$3 22.0
(byte~) main::$4 8.25
(byte~) main::$5 22.0
(byte) main::i
(byte) main::i#1 16.5
(byte) main::i#2 5.5
(byte) main::i#2 4.888888888888889
(byte*) main::screen
(byte*) main::screen#1 8.25
(byte*) main::screen#1 11.0
(byte*) main::screen#2 7.333333333333333
(byte*) main::screen#3 6.6000000000000005
@ -174,28 +176,25 @@ Initial phi equivalence classes
[ main::i#2 main::i#1 ]
[ main::screen#3 main::screen#2 ]
Added variable main::$3 to live range equivalence class [ main::$3 ]
Added variable main::$1 to live range equivalence class [ main::$1 ]
Added variable main::$4 to live range equivalence class [ main::$4 ]
Added variable main::$2 to live range equivalence class [ main::$2 ]
Added variable main::screen#1 to live range equivalence class [ main::screen#1 ]
Added variable main::$4 to live range equivalence class [ main::$4 ]
Added variable main::$5 to live range equivalence class [ main::$5 ]
Complete equivalence classes
[ main::i#2 main::i#1 ]
[ main::screen#3 main::screen#2 ]
[ main::$3 ]
[ main::$1 ]
[ main::$4 ]
[ main::$2 ]
[ main::screen#1 ]
[ main::$4 ]
[ main::$5 ]
Allocated zp[1]:2 [ main::i#2 main::i#1 ]
Allocated zp[2]:3 [ main::screen#3 main::screen#2 ]
Allocated zp[1]:5 [ main::$3 ]
Allocated zp[1]:6 [ main::$1 ]
Allocated zp[1]:6 [ main::$4 ]
Allocated zp[1]:7 [ main::$2 ]
Allocated zp[2]:8 [ main::screen#1 ]
Allocated zp[1]:10 [ main::$4 ]
Allocated zp[1]:11 [ main::$5 ]
Allocated zp[1]:10 [ main::$5 ]
INITIAL ASM
Target platform is c64basic / MOS6502X
@ -208,11 +207,10 @@ Target platform is c64basic / MOS6502X
// Global Constants & labels
// main
main: {
.label __1 = 6
.label __2 = 7
.label __3 = 5
.label __4 = $a
.label __5 = $b
.label __4 = 6
.label __5 = $a
.label screen = 8
.label screen_1 = 3
.label i = 2
@ -238,13 +236,13 @@ main: {
lda.z i
asl
sta.z __3
// [3] (byte~) main::$1 ← (byte~) main::$3 + (byte) main::i#2 -- vbuz1=vbuz2_plus_vbuz3
// [3] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#2 -- vbuz1=vbuz2_plus_vbuz3
lda.z __3
clc
adc.z i
sta.z __1
// [4] (byte~) main::$2 ← (byte~) main::$1 + (byte) 3 -- vbuz1=vbuz2_plus_vbuc1
lax.z __1
sta.z __4
// [4] (byte~) main::$2 ← (byte~) main::$4 + (byte) 3 -- vbuz1=vbuz2_plus_vbuc1
lax.z __4
axs #-[3]
stx.z __2
// [5] *((byte*) main::screen#3) ← (byte~) main::$2 -- _deref_pbuz1=vbuz2
@ -259,20 +257,15 @@ main: {
lda.z screen_1+1
adc #0
sta.z screen+1
// [7] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#2 -- vbuz1=vbuz2_plus_vbuz3
lda.z __3
clc
adc.z i
sta.z __4
// [8] (byte~) main::$5 ← (byte~) main::$4 + (byte) 3 -- vbuz1=vbuz2_plus_vbuc1
// [7] (byte~) main::$5 ← (byte~) main::$4 + (byte) 3 -- vbuz1=vbuz2_plus_vbuc1
lax.z __4
axs #-[3]
stx.z __5
// [9] *((byte*) main::screen#1) ← (byte~) main::$5 -- _deref_pbuz1=vbuz2
// [8] *((byte*) main::screen#1) ← (byte~) main::$5 -- _deref_pbuz1=vbuz2
lda.z __5
ldy #0
sta (screen),y
// [10] (byte*) main::screen#2 ← ++ (byte*) main::screen#1 -- pbuz1=_inc_pbuz2
// [9] (byte*) main::screen#2 ← ++ (byte*) main::screen#1 -- pbuz1=_inc_pbuz2
lda.z screen
clc
adc #1
@ -280,16 +273,16 @@ main: {
lda.z screen+1
adc #0
sta.z screen_1+1
// [11] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1
// [10] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1
inc.z i
// [12] if((byte) main::i#1!=(byte) 3) goto main::@1 -- vbuz1_neq_vbuc1_then_la1
// [11] if((byte) main::i#1!=(byte) 3) goto main::@1 -- vbuz1_neq_vbuc1_then_la1
lda #3
cmp.z i
bne __b1_from___b1
jmp __breturn
// main::@return
__breturn:
// [13] return
// [12] return
rts
}
// File Data
@ -297,45 +290,43 @@ main: {
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [2] (byte~) main::$3 ← (byte) main::i#2 << (byte) 1 [ main::i#2 main::screen#3 main::$3 ] ( [ main::i#2 main::screen#3 main::$3 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::i#2 main::i#1 ]
Statement [3] (byte~) main::$1 ← (byte~) main::$3 + (byte) main::i#2 [ main::i#2 main::screen#3 main::$3 main::$1 ] ( [ main::i#2 main::screen#3 main::$3 main::$1 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:5 [ main::$3 ]
Statement [5] *((byte*) main::screen#3) ← (byte~) main::$2 [ main::i#2 main::screen#3 main::$3 ] ( [ main::i#2 main::screen#3 main::$3 ] { } ) always clobbers reg byte y
Statement [3] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#2 [ main::i#2 main::screen#3 main::$4 ] ( [ main::i#2 main::screen#3 main::$4 ] { } ) always clobbers reg byte a
Statement [5] *((byte*) main::screen#3) ← (byte~) main::$2 [ main::i#2 main::screen#3 main::$4 ] ( [ main::i#2 main::screen#3 main::$4 ] { } ) always clobbers reg byte y
Removing always clobbered register reg byte y as potential for zp[1]:2 [ main::i#2 main::i#1 ]
Removing always clobbered register reg byte y as potential for zp[1]:5 [ main::$3 ]
Statement [6] (byte*) main::screen#1 ← ++ (byte*) main::screen#3 [ main::i#2 main::$3 main::screen#1 ] ( [ main::i#2 main::$3 main::screen#1 ] { } ) always clobbers reg byte a
Statement [7] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#2 [ main::i#2 main::screen#1 main::$4 ] ( [ main::i#2 main::screen#1 main::$4 ] { } ) always clobbers reg byte a
Statement [9] *((byte*) main::screen#1) ← (byte~) main::$5 [ main::i#2 main::screen#1 ] ( [ main::i#2 main::screen#1 ] { } ) always clobbers reg byte y
Statement [10] (byte*) main::screen#2 ← ++ (byte*) main::screen#1 [ main::i#2 main::screen#2 ] ( [ main::i#2 main::screen#2 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte y as potential for zp[1]:6 [ main::$4 ]
Statement [6] (byte*) main::screen#1 ← ++ (byte*) main::screen#3 [ main::i#2 main::$4 main::screen#1 ] ( [ main::i#2 main::$4 main::screen#1 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:6 [ main::$4 ]
Statement [7] (byte~) main::$5 ← (byte~) main::$4 + (byte) 3 [ main::i#2 main::screen#1 main::$5 ] ( [ main::i#2 main::screen#1 main::$5 ] { } ) always clobbers reg byte a
Statement [8] *((byte*) main::screen#1) ← (byte~) main::$5 [ main::i#2 main::screen#1 ] ( [ main::i#2 main::screen#1 ] { } ) always clobbers reg byte y
Statement [9] (byte*) main::screen#2 ← ++ (byte*) main::screen#1 [ main::i#2 main::screen#2 ] ( [ main::i#2 main::screen#2 ] { } ) always clobbers reg byte a
Statement [2] (byte~) main::$3 ← (byte) main::i#2 << (byte) 1 [ main::i#2 main::screen#3 main::$3 ] ( [ main::i#2 main::screen#3 main::$3 ] { } ) always clobbers reg byte a
Statement [3] (byte~) main::$1 ← (byte~) main::$3 + (byte) main::i#2 [ main::i#2 main::screen#3 main::$3 main::$1 ] ( [ main::i#2 main::screen#3 main::$3 main::$1 ] { } ) always clobbers reg byte a
Statement [5] *((byte*) main::screen#3) ← (byte~) main::$2 [ main::i#2 main::screen#3 main::$3 ] ( [ main::i#2 main::screen#3 main::$3 ] { } ) always clobbers reg byte y
Statement [6] (byte*) main::screen#1 ← ++ (byte*) main::screen#3 [ main::i#2 main::$3 main::screen#1 ] ( [ main::i#2 main::$3 main::screen#1 ] { } ) always clobbers reg byte a
Statement [7] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#2 [ main::i#2 main::screen#1 main::$4 ] ( [ main::i#2 main::screen#1 main::$4 ] { } ) always clobbers reg byte a
Statement [9] *((byte*) main::screen#1) ← (byte~) main::$5 [ main::i#2 main::screen#1 ] ( [ main::i#2 main::screen#1 ] { } ) always clobbers reg byte y
Statement [10] (byte*) main::screen#2 ← ++ (byte*) main::screen#1 [ main::i#2 main::screen#2 ] ( [ main::i#2 main::screen#2 ] { } ) always clobbers reg byte a
Statement [3] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#2 [ main::i#2 main::screen#3 main::$4 ] ( [ main::i#2 main::screen#3 main::$4 ] { } ) always clobbers reg byte a
Statement [4] (byte~) main::$2 ← (byte~) main::$4 + (byte) 3 [ main::i#2 main::screen#3 main::$4 main::$2 ] ( [ main::i#2 main::screen#3 main::$4 main::$2 ] { } ) always clobbers reg byte a
Statement [5] *((byte*) main::screen#3) ← (byte~) main::$2 [ main::i#2 main::screen#3 main::$4 ] ( [ main::i#2 main::screen#3 main::$4 ] { } ) always clobbers reg byte y
Statement [6] (byte*) main::screen#1 ← ++ (byte*) main::screen#3 [ main::i#2 main::$4 main::screen#1 ] ( [ main::i#2 main::$4 main::screen#1 ] { } ) always clobbers reg byte a
Statement [7] (byte~) main::$5 ← (byte~) main::$4 + (byte) 3 [ main::i#2 main::screen#1 main::$5 ] ( [ main::i#2 main::screen#1 main::$5 ] { } ) always clobbers reg byte a
Statement [8] *((byte*) main::screen#1) ← (byte~) main::$5 [ main::i#2 main::screen#1 ] ( [ main::i#2 main::screen#1 ] { } ) always clobbers reg byte y
Statement [9] (byte*) main::screen#2 ← ++ (byte*) main::screen#1 [ main::i#2 main::screen#2 ] ( [ main::i#2 main::screen#2 ] { } ) always clobbers reg byte a
Potential registers zp[1]:2 [ main::i#2 main::i#1 ] : zp[1]:2 , reg byte x ,
Potential registers zp[2]:3 [ main::screen#3 main::screen#2 ] : zp[2]:3 ,
Potential registers zp[1]:5 [ main::$3 ] : zp[1]:5 , reg byte x ,
Potential registers zp[1]:6 [ main::$1 ] : zp[1]:6 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:5 [ main::$3 ] : zp[1]:5 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:6 [ main::$4 ] : zp[1]:6 , reg byte x ,
Potential registers zp[1]:7 [ main::$2 ] : zp[1]:7 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[2]:8 [ main::screen#1 ] : zp[2]:8 ,
Potential registers zp[1]:10 [ main::$4 ] : zp[1]:10 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:11 [ main::$5 ] : zp[1]:11 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:10 [ main::$5 ] : zp[1]:10 , reg byte a , reg byte x , reg byte y ,
REGISTER UPLIFT SCOPES
Uplift Scope [main] 22: zp[1]:2 [ main::i#2 main::i#1 ] 22: zp[1]:6 [ main::$1 ] 22: zp[1]:7 [ main::$2 ] 22: zp[1]:10 [ main::$4 ] 22: zp[1]:11 [ main::$5 ] 13.93: zp[2]:3 [ main::screen#3 main::screen#2 ] 8.25: zp[2]:8 [ main::screen#1 ] 6.6: zp[1]:5 [ main::$3 ]
Uplift Scope [main] 22: zp[1]:5 [ main::$3 ] 22: zp[1]:7 [ main::$2 ] 22: zp[1]:10 [ main::$5 ] 21.39: zp[1]:2 [ main::i#2 main::i#1 ] 13.93: zp[2]:3 [ main::screen#3 main::screen#2 ] 11: zp[2]:8 [ main::screen#1 ] 8.25: zp[1]:6 [ main::$4 ]
Uplift Scope []
Uplifting [main] best 1151 combination reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::$1 ] reg byte a [ main::$2 ] reg byte a [ main::$4 ] zp[1]:11 [ main::$5 ] zp[2]:3 [ main::screen#3 main::screen#2 ] zp[2]:8 [ main::screen#1 ] zp[1]:5 [ main::$3 ]
Limited combination testing to 100 combinations of 1024 possible.
Uplifting [] best 1151 combination
Attempting to uplift remaining variables inzp[1]:11 [ main::$5 ]
Uplifting [main] best 1091 combination reg byte a [ main::$5 ]
Attempting to uplift remaining variables inzp[1]:5 [ main::$3 ]
Uplifting [main] best 1091 combination zp[1]:5 [ main::$3 ]
Uplifting [main] best 1091 combination reg byte a [ main::$3 ] reg byte a [ main::$2 ] reg byte a [ main::$5 ] reg byte x [ main::i#2 main::i#1 ] zp[2]:3 [ main::screen#3 main::screen#2 ] zp[2]:8 [ main::screen#1 ] zp[1]:6 [ main::$4 ]
Limited combination testing to 100 combinations of 256 possible.
Uplifting [] best 1091 combination
Attempting to uplift remaining variables inzp[1]:6 [ main::$4 ]
Uplifting [main] best 1091 combination zp[1]:6 [ main::$4 ]
Coalescing zero page register [ zp[2]:3 [ main::screen#3 main::screen#2 ] ] with [ zp[2]:8 [ main::screen#1 ] ] - score: 2
Allocated (was zp[2]:3) zp[2]:2 [ main::screen#3 main::screen#2 main::screen#1 ]
Allocated (was zp[1]:5) zp[1]:4 [ main::$3 ]
Allocated (was zp[1]:6) zp[1]:4 [ main::$4 ]
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
@ -347,7 +338,7 @@ ASSEMBLER BEFORE OPTIMIZATION
// Global Constants & labels
// main
main: {
.label __3 = 4
.label __4 = 4
.label screen = 2
// [1] phi from main to main::@1 [phi:main->main::@1]
__b1_from_main:
@ -366,17 +357,18 @@ main: {
jmp __b1
// main::@1
__b1:
// [2] (byte~) main::$3 ← (byte) main::i#2 << (byte) 1 -- vbuz1=vbuxx_rol_1
// [2] (byte~) main::$3 ← (byte) main::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1
txa
asl
sta.z __3
// [3] (byte~) main::$1 ← (byte~) main::$3 + (byte) main::i#2 -- vbuaa=vbuz1_plus_vbuxx
txa
// [3] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#2 -- vbuz1=vbuaa_plus_vbuxx
stx.z $ff
clc
adc.z __3
// [4] (byte~) main::$2 ← (byte~) main::$1 + (byte) 3 -- vbuaa=vbuaa_plus_vbuc1
adc.z $ff
sta.z __4
// [4] (byte~) main::$2 ← (byte~) main::$4 + (byte) 3 -- vbuaa=vbuz1_plus_vbuc1
lda #3
clc
adc #3
adc.z __4
// [5] *((byte*) main::screen#3) ← (byte~) main::$2 -- _deref_pbuz1=vbuaa
ldy #0
sta (screen),y
@ -385,30 +377,27 @@ main: {
bne !+
inc.z screen+1
!:
// [7] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#2 -- vbuaa=vbuz1_plus_vbuxx
txa
// [7] (byte~) main::$5 ← (byte~) main::$4 + (byte) 3 -- vbuaa=vbuz1_plus_vbuc1
lda #3
clc
adc.z __3
// [8] (byte~) main::$5 ← (byte~) main::$4 + (byte) 3 -- vbuaa=vbuaa_plus_vbuc1
clc
adc #3
// [9] *((byte*) main::screen#1) ← (byte~) main::$5 -- _deref_pbuz1=vbuaa
adc.z __4
// [8] *((byte*) main::screen#1) ← (byte~) main::$5 -- _deref_pbuz1=vbuaa
ldy #0
sta (screen),y
// [10] (byte*) main::screen#2 ← ++ (byte*) main::screen#1 -- pbuz1=_inc_pbuz1
// [9] (byte*) main::screen#2 ← ++ (byte*) main::screen#1 -- pbuz1=_inc_pbuz1
inc.z screen
bne !+
inc.z screen+1
!:
// [11] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx
// [10] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx
inx
// [12] if((byte) main::i#1!=(byte) 3) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
// [11] if((byte) main::i#1!=(byte) 3) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
cpx #3
bne __b1_from___b1
jmp __breturn
// main::@return
__breturn:
// [13] return
// [12] return
rts
}
// File Data
@ -428,27 +417,25 @@ Succesful ASM optimization Pass5NextJumpElimination
FINAL SYMBOL TABLE
(void()) main()
(byte~) main::$1 reg byte a 22.0
(byte~) main::$2 reg byte a 22.0
(byte~) main::$3 zp[1]:4 6.6000000000000005
(byte~) main::$4 reg byte a 22.0
(byte~) main::$3 reg byte a 22.0
(byte~) main::$4 zp[1]:4 8.25
(byte~) main::$5 reg byte a 22.0
(label) main::@1
(label) main::@return
(byte) main::i
(byte) main::i#1 reg byte x 16.5
(byte) main::i#2 reg byte x 5.5
(byte) main::i#2 reg byte x 4.888888888888889
(byte*) main::screen
(byte*) main::screen#1 screen zp[2]:2 8.25
(byte*) main::screen#1 screen zp[2]:2 11.0
(byte*) main::screen#2 screen zp[2]:2 7.333333333333333
(byte*) main::screen#3 screen zp[2]:2 6.6000000000000005
reg byte x [ main::i#2 main::i#1 ]
zp[2]:2 [ main::screen#3 main::screen#2 main::screen#1 ]
zp[1]:4 [ main::$3 ]
reg byte a [ main::$1 ]
reg byte a [ main::$3 ]
zp[1]:4 [ main::$4 ]
reg byte a [ main::$2 ]
reg byte a [ main::$4 ]
reg byte a [ main::$5 ]
@ -464,7 +451,7 @@ Score: 891
// Global Constants & labels
// main
main: {
.label __3 = 4
.label __4 = 4
.label screen = 2
// [1] phi from main to main::@1 [phi:main->main::@1]
// [1] phi (byte*) main::screen#3 = (byte*) 1024 [phi:main->main::@1#0] -- pbuz1=pbuc1
@ -480,19 +467,20 @@ main: {
// main::@1
__b1:
// i*2
// [2] (byte~) main::$3 ← (byte) main::i#2 << (byte) 1 -- vbuz1=vbuxx_rol_1
// [2] (byte~) main::$3 ← (byte) main::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1
txa
asl
sta.z __3
// i*2+i
// [3] (byte~) main::$1 ← (byte~) main::$3 + (byte) main::i#2 -- vbuaa=vbuz1_plus_vbuxx
txa
// [3] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#2 -- vbuz1=vbuaa_plus_vbuxx
stx.z $ff
clc
adc.z __3
adc.z $ff
sta.z __4
// i*2+i+3
// [4] (byte~) main::$2 ← (byte~) main::$1 + (byte) 3 -- vbuaa=vbuaa_plus_vbuc1
// [4] (byte~) main::$2 ← (byte~) main::$4 + (byte) 3 -- vbuaa=vbuz1_plus_vbuc1
lda #3
clc
adc #3
adc.z __4
// *screen++ = i*2+i+3
// [5] *((byte*) main::screen#3) ← (byte~) main::$2 -- _deref_pbuz1=vbuaa
ldy #0
@ -503,34 +491,30 @@ main: {
bne !+
inc.z screen+1
!:
// i*2+i
// [7] (byte~) main::$4 ← (byte~) main::$3 + (byte) main::i#2 -- vbuaa=vbuz1_plus_vbuxx
txa
clc
adc.z __3
// i*2+i+3
// [8] (byte~) main::$5 ← (byte~) main::$4 + (byte) 3 -- vbuaa=vbuaa_plus_vbuc1
// [7] (byte~) main::$5 ← (byte~) main::$4 + (byte) 3 -- vbuaa=vbuz1_plus_vbuc1
lda #3
clc
adc #3
adc.z __4
// *screen++ = i*2+i+3
// [9] *((byte*) main::screen#1) ← (byte~) main::$5 -- _deref_pbuz1=vbuaa
// [8] *((byte*) main::screen#1) ← (byte~) main::$5 -- _deref_pbuz1=vbuaa
ldy #0
sta (screen),y
// *screen++ = i*2+i+3;
// [10] (byte*) main::screen#2 ← ++ (byte*) main::screen#1 -- pbuz1=_inc_pbuz1
// [9] (byte*) main::screen#2 ← ++ (byte*) main::screen#1 -- pbuz1=_inc_pbuz1
inc.z screen
bne !+
inc.z screen+1
!:
// for( byte i: 0..2)
// [11] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx
// [10] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx
inx
// [12] if((byte) main::i#1!=(byte) 3) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
// [11] if((byte) main::i#1!=(byte) 3) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
cpx #3
bne __b1
// main::@return
// }
// [13] return
// [12] return
rts
}
// File Data

View File

@ -1,23 +1,21 @@
(void()) main()
(byte~) main::$1 reg byte a 22.0
(byte~) main::$2 reg byte a 22.0
(byte~) main::$3 zp[1]:4 6.6000000000000005
(byte~) main::$4 reg byte a 22.0
(byte~) main::$3 reg byte a 22.0
(byte~) main::$4 zp[1]:4 8.25
(byte~) main::$5 reg byte a 22.0
(label) main::@1
(label) main::@return
(byte) main::i
(byte) main::i#1 reg byte x 16.5
(byte) main::i#2 reg byte x 5.5
(byte) main::i#2 reg byte x 4.888888888888889
(byte*) main::screen
(byte*) main::screen#1 screen zp[2]:2 8.25
(byte*) main::screen#1 screen zp[2]:2 11.0
(byte*) main::screen#2 screen zp[2]:2 7.333333333333333
(byte*) main::screen#3 screen zp[2]:2 6.6000000000000005
reg byte x [ main::i#2 main::i#1 ]
zp[2]:2 [ main::screen#3 main::screen#2 main::screen#1 ]
zp[1]:4 [ main::$3 ]
reg byte a [ main::$1 ]
reg byte a [ main::$3 ]
zp[1]:4 [ main::$4 ]
reg byte a [ main::$2 ]
reg byte a [ main::$4 ]
reg byte a [ main::$5 ]

View File

@ -14,8 +14,7 @@ main: {
rts
}
scrollup1: {
.label __2 = 5
.label __4 = 7
.label __4 = 5
.label line = 9
.label __5 = 7
.label __6 = 5
@ -54,24 +53,16 @@ scrollup1: {
txa
clc
adc.z line
sta.z __2
lda #0
adc.z line+1
sta.z __2+1
// line+c+40
txa
clc
adc.z line
sta.z __4
lda #0
adc.z line+1
sta.z __4+1
// screen[line+c] = screen[line+c+40]
lda.z __4
clc
lda.z __5
adc #<screen+$28
sta.z __5
lda.z __5+1
lda.z __4+1
adc #>screen+$28
sta.z __5+1
clc

View File

@ -35,67 +35,66 @@ scrollup1::@4: scope:[scrollup1] from scrollup1::@2
[13] (word) scrollup1::line#1 ← (word) scrollup1::line#2 + (byte) $28
to:scrollup1::@1
scrollup1::@3: scope:[scrollup1] from scrollup1::@2
[14] (word~) scrollup1::$2 ← (word) scrollup1::line#2 + (byte) scrollup1::c#2
[15] (word~) scrollup1::$4 ← (word) scrollup1::line#2 + (byte) scrollup1::c#2
[16] (byte*~) scrollup1::$5 ← (const nomodify byte*) screen+(byte) $28 + (word~) scrollup1::$4
[17] (byte*~) scrollup1::$6 ← (const nomodify byte*) screen + (word~) scrollup1::$2
[18] *((byte*~) scrollup1::$6) ← *((byte*~) scrollup1::$5)
[19] (byte) scrollup1::c#1 ← ++ (byte) scrollup1::c#2
[14] (word~) scrollup1::$4 ← (word) scrollup1::line#2 + (byte) scrollup1::c#2
[15] (byte*~) scrollup1::$5 ← (const nomodify byte*) screen+(byte) $28 + (word~) scrollup1::$4
[16] (byte*~) scrollup1::$6 ← (const nomodify byte*) screen + (word~) scrollup1::$4
[17] *((byte*~) scrollup1::$6) ← *((byte*~) scrollup1::$5)
[18] (byte) scrollup1::c#1 ← ++ (byte) scrollup1::c#2
to:scrollup1::@2
(void()) scrollup2()
scrollup2: scope:[scrollup2] from main::@1
[20] phi()
[19] phi()
to:scrollup2::@1
scrollup2::@1: scope:[scrollup2] from scrollup2 scrollup2::@3
[21] (byte) scrollup2::l#4 ← phi( scrollup2/(byte) 0 scrollup2::@3/(byte) scrollup2::l#1 )
[21] (byte*) scrollup2::line1#3 ← phi( scrollup2/(const nomodify byte*) screen scrollup2::@3/(byte*) scrollup2::line1#1 )
[21] (byte*) scrollup2::line2#3 ← phi( scrollup2/(const nomodify byte*) screen+(byte) $28 scrollup2::@3/(byte*) scrollup2::line2#1 )
[20] (byte) scrollup2::l#4 ← phi( scrollup2/(byte) 0 scrollup2::@3/(byte) scrollup2::l#1 )
[20] (byte*) scrollup2::line1#3 ← phi( scrollup2/(const nomodify byte*) screen scrollup2::@3/(byte*) scrollup2::line1#1 )
[20] (byte*) scrollup2::line2#3 ← phi( scrollup2/(const nomodify byte*) screen+(byte) $28 scrollup2::@3/(byte*) scrollup2::line2#1 )
to:scrollup2::@2
scrollup2::@2: scope:[scrollup2] from scrollup2::@1 scrollup2::@2
[22] (byte) scrollup2::c#2 ← phi( scrollup2::@1/(byte) 0 scrollup2::@2/(byte) scrollup2::c#1 )
[22] (byte*) scrollup2::line1#2 ← phi( scrollup2::@1/(byte*) scrollup2::line1#3 scrollup2::@2/(byte*) scrollup2::line1#1 )
[22] (byte*) scrollup2::line2#2 ← phi( scrollup2::@1/(byte*) scrollup2::line2#3 scrollup2::@2/(byte*) scrollup2::line2#1 )
[23] *((byte*) scrollup2::line1#2) ← *((byte*) scrollup2::line2#2)
[24] (byte*) scrollup2::line1#1 ← ++ (byte*) scrollup2::line1#2
[25] (byte*) scrollup2::line2#1 ← ++ (byte*) scrollup2::line2#2
[26] (byte) scrollup2::c#1 ← ++ (byte) scrollup2::c#2
[27] if((byte) scrollup2::c#1!=(byte) $28) goto scrollup2::@2
[21] (byte) scrollup2::c#2 ← phi( scrollup2::@1/(byte) 0 scrollup2::@2/(byte) scrollup2::c#1 )
[21] (byte*) scrollup2::line1#2 ← phi( scrollup2::@1/(byte*) scrollup2::line1#3 scrollup2::@2/(byte*) scrollup2::line1#1 )
[21] (byte*) scrollup2::line2#2 ← phi( scrollup2::@1/(byte*) scrollup2::line2#3 scrollup2::@2/(byte*) scrollup2::line2#1 )
[22] *((byte*) scrollup2::line1#2) ← *((byte*) scrollup2::line2#2)
[23] (byte*) scrollup2::line1#1 ← ++ (byte*) scrollup2::line1#2
[24] (byte*) scrollup2::line2#1 ← ++ (byte*) scrollup2::line2#2
[25] (byte) scrollup2::c#1 ← ++ (byte) scrollup2::c#2
[26] if((byte) scrollup2::c#1!=(byte) $28) goto scrollup2::@2
to:scrollup2::@3
scrollup2::@3: scope:[scrollup2] from scrollup2::@2
[28] (byte) scrollup2::l#1 ← ++ (byte) scrollup2::l#4
[29] if((byte) scrollup2::l#1!=(byte) $18) goto scrollup2::@1
[27] (byte) scrollup2::l#1 ← ++ (byte) scrollup2::l#4
[28] if((byte) scrollup2::l#1!=(byte) $18) goto scrollup2::@1
to:scrollup2::@return
scrollup2::@return: scope:[scrollup2] from scrollup2::@3
[30] return
[29] return
to:@return
(void()) scrollup3()
scrollup3: scope:[scrollup3] from main::@2
[31] phi()
[30] phi()
to:scrollup3::@1
scrollup3::@1: scope:[scrollup3] from scrollup3 scrollup3::@5
[32] (word) scrollup3::line#2 ← phi( scrollup3/(word) 0 scrollup3::@5/(word) scrollup3::line#1 )
[33] if((word) scrollup3::line#2<(word)(number) $28*(number) $18) goto scrollup3::@2
[31] (word) scrollup3::line#2 ← phi( scrollup3/(word) 0 scrollup3::@5/(word) scrollup3::line#1 )
[32] if((word) scrollup3::line#2<(word)(number) $28*(number) $18) goto scrollup3::@2
to:scrollup3::@return
scrollup3::@return: scope:[scrollup3] from scrollup3::@1
[34] return
[33] return
to:@return
scrollup3::@2: scope:[scrollup3] from scrollup3::@1
[35] (word) scrollup3::l2#4 ← (word) scrollup3::line#2
[34] (word) scrollup3::l2#4 ← (word) scrollup3::line#2
to:scrollup3::@3
scrollup3::@3: scope:[scrollup3] from scrollup3::@2 scrollup3::@4
[36] (word) scrollup3::l2#2 ← phi( scrollup3::@2/(word) scrollup3::l2#4 scrollup3::@4/(word) scrollup3::l2#1 )
[36] (byte) scrollup3::c#2 ← phi( scrollup3::@2/(byte) 0 scrollup3::@4/(byte) scrollup3::c#1 )
[37] if((byte) scrollup3::c#2<(byte) $28) goto scrollup3::@4
[35] (word) scrollup3::l2#2 ← phi( scrollup3::@2/(word) scrollup3::l2#4 scrollup3::@4/(word) scrollup3::l2#1 )
[35] (byte) scrollup3::c#2 ← phi( scrollup3::@2/(byte) 0 scrollup3::@4/(byte) scrollup3::c#1 )
[36] if((byte) scrollup3::c#2<(byte) $28) goto scrollup3::@4
to:scrollup3::@5
scrollup3::@5: scope:[scrollup3] from scrollup3::@3
[38] (word) scrollup3::line#1 ← (word) scrollup3::line#2 + (byte) $28
[37] (word) scrollup3::line#1 ← (word) scrollup3::line#2 + (byte) $28
to:scrollup3::@1
scrollup3::@4: scope:[scrollup3] from scrollup3::@3
[39] (byte*~) scrollup3::$3 ← (const nomodify byte*) screen+(byte) $28 + (word) scrollup3::l2#2
[40] (byte*~) scrollup3::$4 ← (const nomodify byte*) screen + (word) scrollup3::l2#2
[41] *((byte*~) scrollup3::$4) ← *((byte*~) scrollup3::$3)
[42] (word) scrollup3::l2#1 ← ++ (word) scrollup3::l2#2
[43] (byte) scrollup3::c#1 ← ++ (byte) scrollup3::c#2
[38] (byte*~) scrollup3::$3 ← (const nomodify byte*) screen+(byte) $28 + (word) scrollup3::l2#2
[39] (byte*~) scrollup3::$4 ← (const nomodify byte*) screen + (word) scrollup3::l2#2
[40] *((byte*~) scrollup3::$4) ← *((byte*~) scrollup3::$3)
[41] (word) scrollup3::l2#1 ← ++ (word) scrollup3::l2#2
[42] (byte) scrollup3::c#1 ← ++ (byte) scrollup3::c#2
to:scrollup3::@3

File diff suppressed because it is too large Load Diff

View File

@ -4,8 +4,7 @@
(label) main::@return
(const nomodify byte*) screen = (byte*) 1024
(void()) scrollup1()
(word~) scrollup1::$2 zp[2]:5 667.3333333333334
(word~) scrollup1::$4 zp[2]:7 2002.0
(word~) scrollup1::$4 zp[2]:5 1501.5
(byte*~) scrollup1::$5 zp[2]:7 1001.0
(byte*~) scrollup1::$6 zp[2]:5 2002.0
(label) scrollup1::@1
@ -15,10 +14,10 @@
(label) scrollup1::@return
(byte) scrollup1::c
(byte) scrollup1::c#1 reg byte x 2002.0
(byte) scrollup1::c#2 reg byte x 715.0
(byte) scrollup1::c#2 reg byte x 667.3333333333334
(word) scrollup1::line
(word) scrollup1::line#1 line zp[2]:9 202.0
(word) scrollup1::line#2 line zp[2]:9 230.49999999999997
(word) scrollup1::line#2 line zp[2]:9 144.88888888888889
(void()) scrollup2()
(label) scrollup2::@1
(label) scrollup2::@2
@ -63,6 +62,6 @@ zp[1]:2 [ scrollup2::l#4 scrollup2::l#1 ]
reg byte x [ scrollup2::c#2 scrollup2::c#1 ]
zp[2]:3 [ scrollup3::line#2 scrollup3::line#1 scrollup2::line1#2 scrollup2::line1#3 scrollup2::line1#1 ]
reg byte x [ scrollup3::c#2 scrollup3::c#1 ]
zp[2]:5 [ scrollup1::$2 scrollup1::$6 scrollup3::l2#2 scrollup3::l2#4 scrollup3::l2#1 ]
zp[2]:7 [ scrollup3::$3 scrollup1::$4 scrollup1::$5 ]
zp[2]:5 [ scrollup1::$4 scrollup1::$6 scrollup3::l2#2 scrollup3::l2#4 scrollup3::l2#1 ]
zp[2]:7 [ scrollup3::$3 scrollup1::$5 ]
zp[2]:9 [ scrollup3::$4 scrollup2::line2#2 scrollup2::line2#3 scrollup2::line2#1 scrollup1::line#2 scrollup1::line#1 ]

View File

@ -3,8 +3,7 @@
.pc = $80d "Program"
main: {
.label screen = $400
.label __2 = 6
.label __4 = 8
.label __4 = 6
.label __6 = 4
.label line = 2
.label __7 = 8
@ -74,24 +73,16 @@ main: {
txa
clc
adc.z line
sta.z __2
lda #0
adc.z line+1
sta.z __2+1
// line+c+40
txa
clc
adc.z line
sta.z __4
lda #0
adc.z line+1
sta.z __4+1
// screen[line+c] = screen[line+c+40]
lda.z __4
clc
lda.z __7
adc #<screen+$28
sta.z __7
lda.z __7+1
lda.z __4+1
adc #>screen+$28
sta.z __7+1
clc

View File

@ -28,10 +28,9 @@ main::@4: scope:[main] from main::@2
[12] (word) main::line#2 ← (word) main::line#10 + (byte) $28
to:main::@1
main::@3: scope:[main] from main::@2
[13] (word~) main::$2 ← (word) main::line#10 + (byte) main::c#2
[14] (word~) main::$4 ← (word) main::line#10 + (byte) main::c#2
[15] (byte*~) main::$7 ← (const byte*) main::screen+(byte) $28 + (word~) main::$4
[16] (byte*~) main::$8 ← (const byte*) main::screen + (word~) main::$2
[17] *((byte*~) main::$8) ← *((byte*~) main::$7)
[18] (byte) main::c#1 ← ++ (byte) main::c#2
[13] (word~) main::$4 ← (word) main::line#10 + (byte) main::c#2
[14] (byte*~) main::$7 ← (const byte*) main::screen+(byte) $28 + (word~) main::$4
[15] (byte*~) main::$8 ← (const byte*) main::screen + (word~) main::$4
[16] *((byte*~) main::$8) ← *((byte*~) main::$7)
[17] (byte) main::c#1 ← ++ (byte) main::c#2
to:main::@2

View File

@ -143,6 +143,8 @@ Successful SSA optimization Pass2AliasElimination
Identical Phi Values (word) main::line#4 (word) main::line#10
Identical Phi Values (word) main::line#6 (word) main::line#10
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [14] (word~) main::$3 ← (word) main::line#10 + (byte) main::c#2
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition (bool~) main::$0 [4] if((word) main::line#10<(word)(number) $28*(number) $18) goto main::@2
Simple Condition (bool~) main::$1 [9] if((byte) main::c#2<(byte) $28) goto main::@5
Simple Condition (bool~) main::$5 [18] if((byte) main::c1#2<(byte) $28) goto main::@8
@ -163,6 +165,8 @@ Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Alias main::$3 = main::$2
Successful SSA optimization Pass2AliasElimination
Inlining constant with var siblings (const word) main::line#1
Inlining constant with var siblings (const byte) main::c#0
Inlining constant with var siblings (const byte) main::c1#0
@ -182,7 +186,7 @@ CALL GRAPH
Created 3 initial phi equivalence classes
Coalesced [11] main::c1#4 ← main::c1#1
Coalesced [16] main::line#11 ← main::line#2
Coalesced [23] main::c#4 ← main::c#1
Coalesced [22] main::c#4 ← main::c#1
Coalesced down to 3 phi equivalence classes
Culled Empty Block (label) main::@3
Culled Empty Block (label) main::@2
@ -224,31 +228,29 @@ main::@4: scope:[main] from main::@2
[12] (word) main::line#2 ← (word) main::line#10 + (byte) $28
to:main::@1
main::@3: scope:[main] from main::@2
[13] (word~) main::$2 ← (word) main::line#10 + (byte) main::c#2
[14] (word~) main::$4 ← (word) main::line#10 + (byte) main::c#2
[15] (byte*~) main::$7 ← (const byte*) main::screen+(byte) $28 + (word~) main::$4
[16] (byte*~) main::$8 ← (const byte*) main::screen + (word~) main::$2
[17] *((byte*~) main::$8) ← *((byte*~) main::$7)
[18] (byte) main::c#1 ← ++ (byte) main::c#2
[13] (word~) main::$4 ← (word) main::line#10 + (byte) main::c#2
[14] (byte*~) main::$7 ← (const byte*) main::screen+(byte) $28 + (word~) main::$4
[15] (byte*~) main::$8 ← (const byte*) main::screen + (word~) main::$4
[16] *((byte*~) main::$8) ← *((byte*~) main::$7)
[17] (byte) main::c#1 ← ++ (byte) main::c#2
to:main::@2
VARIABLE REGISTER WEIGHTS
(void()) main()
(word~) main::$2 67.33333333333333
(word~) main::$4 202.0
(word~) main::$4 151.5
(word~) main::$6 22.0
(byte*~) main::$7 101.0
(byte*~) main::$8 202.0
(byte*~) main::$9 22.0
(byte) main::c
(byte) main::c#1 202.0
(byte) main::c#2 72.14285714285714
(byte) main::c#2 67.33333333333333
(byte) main::c1
(byte) main::c1#1 22.0
(byte) main::c1#2 8.8
(word) main::line
(word) main::line#10 15.375
(word) main::line#10 9.666666666666666
(word) main::line#2 22.0
Initial phi equivalence classes
@ -257,7 +259,6 @@ Initial phi equivalence classes
[ main::c#2 main::c#1 ]
Added variable main::$6 to live range equivalence class [ main::$6 ]
Added variable main::$9 to live range equivalence class [ main::$9 ]
Added variable main::$2 to live range equivalence class [ main::$2 ]
Added variable main::$4 to live range equivalence class [ main::$4 ]
Added variable main::$7 to live range equivalence class [ main::$7 ]
Added variable main::$8 to live range equivalence class [ main::$8 ]
@ -267,7 +268,6 @@ Complete equivalence classes
[ main::c#2 main::c#1 ]
[ main::$6 ]
[ main::$9 ]
[ main::$2 ]
[ main::$4 ]
[ main::$7 ]
[ main::$8 ]
@ -276,10 +276,9 @@ Allocated zp[1]:4 [ main::c1#2 main::c1#1 ]
Allocated zp[1]:5 [ main::c#2 main::c#1 ]
Allocated zp[2]:6 [ main::$6 ]
Allocated zp[2]:8 [ main::$9 ]
Allocated zp[2]:10 [ main::$2 ]
Allocated zp[2]:12 [ main::$4 ]
Allocated zp[2]:14 [ main::$7 ]
Allocated zp[2]:16 [ main::$8 ]
Allocated zp[2]:10 [ main::$4 ]
Allocated zp[2]:12 [ main::$7 ]
Allocated zp[2]:14 [ main::$8 ]
INITIAL ASM
Target platform is c64basic / MOS6502X
@ -292,14 +291,13 @@ Target platform is c64basic / MOS6502X
// main
main: {
.label screen = $400
.label __2 = $a
.label __4 = $c
.label __4 = $a
.label __6 = 6
.label c = 5
.label line = 2
.label c1 = 4
.label __7 = $e
.label __8 = $10
.label __7 = $c
.label __8 = $e
.label __9 = 8
// [1] phi from main to main::@1 [phi:main->main::@1]
__b1_from_main:
@ -395,15 +393,7 @@ main: {
jmp __b1
// main::@3
__b3:
// [13] (word~) main::$2 ← (word) main::line#10 + (byte) main::c#2 -- vwuz1=vwuz2_plus_vbuz3
lda.z c
clc
adc.z line
sta.z __2
lda #0
adc.z line+1
sta.z __2+1
// [14] (word~) main::$4 ← (word) main::line#10 + (byte) main::c#2 -- vwuz1=vwuz2_plus_vbuz3
// [13] (word~) main::$4 ← (word) main::line#10 + (byte) main::c#2 -- vwuz1=vwuz2_plus_vbuz3
lda.z c
clc
adc.z line
@ -411,7 +401,7 @@ main: {
lda #0
adc.z line+1
sta.z __4+1
// [15] (byte*~) main::$7 ← (const byte*) main::screen+(byte) $28 + (word~) main::$4 -- pbuz1=pbuc1_plus_vwuz2
// [14] (byte*~) main::$7 ← (const byte*) main::screen+(byte) $28 + (word~) main::$4 -- pbuz1=pbuc1_plus_vwuz2
lda.z __4
clc
adc #<screen+$28
@ -419,20 +409,20 @@ main: {
lda.z __4+1
adc #>screen+$28
sta.z __7+1
// [16] (byte*~) main::$8 ← (const byte*) main::screen + (word~) main::$2 -- pbuz1=pbuc1_plus_vwuz2
lda.z __2
// [15] (byte*~) main::$8 ← (const byte*) main::screen + (word~) main::$4 -- pbuz1=pbuc1_plus_vwuz2
lda.z __4
clc
adc #<screen
sta.z __8
lda.z __2+1
lda.z __4+1
adc #>screen
sta.z __8+1
// [17] *((byte*~) main::$8) ← *((byte*~) main::$7) -- _deref_pbuz1=_deref_pbuz2
// [16] *((byte*~) main::$8) ← *((byte*~) main::$7) -- _deref_pbuz1=_deref_pbuz2
ldy #0
lda (__7),y
ldy #0
sta (__8),y
// [18] (byte) main::c#1 ← ++ (byte) main::c#2 -- vbuz1=_inc_vbuz1
// [17] (byte) main::c#1 ← ++ (byte) main::c#2 -- vbuz1=_inc_vbuz1
inc.z c
// [10] phi from main::@3 to main::@2 [phi:main::@3->main::@2]
__b2_from___b3:
@ -449,45 +439,41 @@ Statement [7] (byte*~) main::$9 ← (const byte*) main::screen + (word~) main::$
Statement [8] *((byte*~) main::$9) ← (byte) ' ' [ main::line#10 main::c1#2 ] ( [ main::line#10 main::c1#2 ] { } ) always clobbers reg byte a reg byte y
Removing always clobbered register reg byte y as potential for zp[1]:4 [ main::c1#2 main::c1#1 ]
Statement [12] (word) main::line#2 ← (word) main::line#10 + (byte) $28 [ main::line#2 ] ( [ main::line#2 ] { } ) always clobbers reg byte a
Statement [13] (word~) main::$2 ← (word) main::line#10 + (byte) main::c#2 [ main::line#10 main::c#2 main::$2 ] ( [ main::line#10 main::c#2 main::$2 ] { } ) always clobbers reg byte a
Statement [13] (word~) main::$4 ← (word) main::line#10 + (byte) main::c#2 [ main::line#10 main::c#2 main::$4 ] ( [ main::line#10 main::c#2 main::$4 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:5 [ main::c#2 main::c#1 ]
Statement [14] (word~) main::$4 ← (word) main::line#10 + (byte) main::c#2 [ main::line#10 main::c#2 main::$2 main::$4 ] ( [ main::line#10 main::c#2 main::$2 main::$4 ] { } ) always clobbers reg byte a
Statement [15] (byte*~) main::$7 ← (const byte*) main::screen+(byte) $28 + (word~) main::$4 [ main::line#10 main::c#2 main::$2 main::$7 ] ( [ main::line#10 main::c#2 main::$2 main::$7 ] { } ) always clobbers reg byte a
Statement [16] (byte*~) main::$8 ← (const byte*) main::screen + (word~) main::$2 [ main::line#10 main::c#2 main::$7 main::$8 ] ( [ main::line#10 main::c#2 main::$7 main::$8 ] { } ) always clobbers reg byte a
Statement [17] *((byte*~) main::$8) ← *((byte*~) main::$7) [ main::line#10 main::c#2 ] ( [ main::line#10 main::c#2 ] { } ) always clobbers reg byte a reg byte y
Statement [14] (byte*~) main::$7 ← (const byte*) main::screen+(byte) $28 + (word~) main::$4 [ main::line#10 main::c#2 main::$4 main::$7 ] ( [ main::line#10 main::c#2 main::$4 main::$7 ] { } ) always clobbers reg byte a
Statement [15] (byte*~) main::$8 ← (const byte*) main::screen + (word~) main::$4 [ main::line#10 main::c#2 main::$7 main::$8 ] ( [ main::line#10 main::c#2 main::$7 main::$8 ] { } ) always clobbers reg byte a
Statement [16] *((byte*~) main::$8) ← *((byte*~) main::$7) [ main::line#10 main::c#2 ] ( [ main::line#10 main::c#2 ] { } ) always clobbers reg byte a reg byte y
Removing always clobbered register reg byte y as potential for zp[1]:5 [ main::c#2 main::c#1 ]
Statement [2] if((word) main::line#10<(word)(number) $28*(number) $18) goto main::@2 [ main::line#10 ] ( [ main::line#10 ] { } ) always clobbers reg byte a
Statement [6] (word~) main::$6 ← (word) main::line#10 + (byte) main::c1#2 [ main::line#10 main::c1#2 main::$6 ] ( [ main::line#10 main::c1#2 main::$6 ] { } ) always clobbers reg byte a
Statement [7] (byte*~) main::$9 ← (const byte*) main::screen + (word~) main::$6 [ main::line#10 main::c1#2 main::$9 ] ( [ main::line#10 main::c1#2 main::$9 ] { } ) always clobbers reg byte a
Statement [8] *((byte*~) main::$9) ← (byte) ' ' [ main::line#10 main::c1#2 ] ( [ main::line#10 main::c1#2 ] { } ) always clobbers reg byte a reg byte y
Statement [12] (word) main::line#2 ← (word) main::line#10 + (byte) $28 [ main::line#2 ] ( [ main::line#2 ] { } ) always clobbers reg byte a
Statement [13] (word~) main::$2 ← (word) main::line#10 + (byte) main::c#2 [ main::line#10 main::c#2 main::$2 ] ( [ main::line#10 main::c#2 main::$2 ] { } ) always clobbers reg byte a
Statement [14] (word~) main::$4 ← (word) main::line#10 + (byte) main::c#2 [ main::line#10 main::c#2 main::$2 main::$4 ] ( [ main::line#10 main::c#2 main::$2 main::$4 ] { } ) always clobbers reg byte a
Statement [15] (byte*~) main::$7 ← (const byte*) main::screen+(byte) $28 + (word~) main::$4 [ main::line#10 main::c#2 main::$2 main::$7 ] ( [ main::line#10 main::c#2 main::$2 main::$7 ] { } ) always clobbers reg byte a
Statement [16] (byte*~) main::$8 ← (const byte*) main::screen + (word~) main::$2 [ main::line#10 main::c#2 main::$7 main::$8 ] ( [ main::line#10 main::c#2 main::$7 main::$8 ] { } ) always clobbers reg byte a
Statement [17] *((byte*~) main::$8) ← *((byte*~) main::$7) [ main::line#10 main::c#2 ] ( [ main::line#10 main::c#2 ] { } ) always clobbers reg byte a reg byte y
Statement [13] (word~) main::$4 ← (word) main::line#10 + (byte) main::c#2 [ main::line#10 main::c#2 main::$4 ] ( [ main::line#10 main::c#2 main::$4 ] { } ) always clobbers reg byte a
Statement [14] (byte*~) main::$7 ← (const byte*) main::screen+(byte) $28 + (word~) main::$4 [ main::line#10 main::c#2 main::$4 main::$7 ] ( [ main::line#10 main::c#2 main::$4 main::$7 ] { } ) always clobbers reg byte a
Statement [15] (byte*~) main::$8 ← (const byte*) main::screen + (word~) main::$4 [ main::line#10 main::c#2 main::$7 main::$8 ] ( [ main::line#10 main::c#2 main::$7 main::$8 ] { } ) always clobbers reg byte a
Statement [16] *((byte*~) main::$8) ← *((byte*~) main::$7) [ main::line#10 main::c#2 ] ( [ main::line#10 main::c#2 ] { } ) always clobbers reg byte a reg byte y
Potential registers zp[2]:2 [ main::line#10 main::line#2 ] : zp[2]:2 ,
Potential registers zp[1]:4 [ main::c1#2 main::c1#1 ] : zp[1]:4 , reg byte x ,
Potential registers zp[1]:5 [ main::c#2 main::c#1 ] : zp[1]:5 , reg byte x ,
Potential registers zp[2]:6 [ main::$6 ] : zp[2]:6 ,
Potential registers zp[2]:8 [ main::$9 ] : zp[2]:8 ,
Potential registers zp[2]:10 [ main::$2 ] : zp[2]:10 ,
Potential registers zp[2]:12 [ main::$4 ] : zp[2]:12 ,
Potential registers zp[2]:14 [ main::$7 ] : zp[2]:14 ,
Potential registers zp[2]:16 [ main::$8 ] : zp[2]:16 ,
Potential registers zp[2]:10 [ main::$4 ] : zp[2]:10 ,
Potential registers zp[2]:12 [ main::$7 ] : zp[2]:12 ,
Potential registers zp[2]:14 [ main::$8 ] : zp[2]:14 ,
REGISTER UPLIFT SCOPES
Uplift Scope [main] 274.14: zp[1]:5 [ main::c#2 main::c#1 ] 202: zp[2]:12 [ main::$4 ] 202: zp[2]:16 [ main::$8 ] 101: zp[2]:14 [ main::$7 ] 67.33: zp[2]:10 [ main::$2 ] 37.38: zp[2]:2 [ main::line#10 main::line#2 ] 30.8: zp[1]:4 [ main::c1#2 main::c1#1 ] 22: zp[2]:6 [ main::$6 ] 22: zp[2]:8 [ main::$9 ]
Uplift Scope [main] 269.33: zp[1]:5 [ main::c#2 main::c#1 ] 202: zp[2]:14 [ main::$8 ] 151.5: zp[2]:10 [ main::$4 ] 101: zp[2]:12 [ main::$7 ] 31.67: zp[2]:2 [ main::line#10 main::line#2 ] 30.8: zp[1]:4 [ main::c1#2 main::c1#1 ] 22: zp[2]:6 [ main::$6 ] 22: zp[2]:8 [ main::$9 ]
Uplift Scope []
Uplifting [main] best 11651 combination reg byte x [ main::c#2 main::c#1 ] zp[2]:12 [ main::$4 ] zp[2]:16 [ main::$8 ] zp[2]:14 [ main::$7 ] zp[2]:10 [ main::$2 ] zp[2]:2 [ main::line#10 main::line#2 ] reg byte x [ main::c1#2 main::c1#1 ] zp[2]:6 [ main::$6 ] zp[2]:8 [ main::$9 ]
Uplifting [] best 11651 combination
Uplifting [main] best 9851 combination reg byte x [ main::c#2 main::c#1 ] zp[2]:14 [ main::$8 ] zp[2]:10 [ main::$4 ] zp[2]:12 [ main::$7 ] zp[2]:2 [ main::line#10 main::line#2 ] reg byte x [ main::c1#2 main::c1#1 ] zp[2]:6 [ main::$6 ] zp[2]:8 [ main::$9 ]
Uplifting [] best 9851 combination
Coalescing zero page register [ zp[2]:6 [ main::$6 ] ] with [ zp[2]:8 [ main::$9 ] ] - score: 1
Coalescing zero page register [ zp[2]:10 [ main::$2 ] ] with [ zp[2]:16 [ main::$8 ] ] - score: 1
Coalescing zero page register [ zp[2]:12 [ main::$4 ] ] with [ zp[2]:14 [ main::$7 ] ] - score: 1
Coalescing zero page register [ zp[2]:10 [ main::$4 ] ] with [ zp[2]:14 [ main::$8 ] ] - score: 1
Allocated (was zp[2]:6) zp[2]:4 [ main::$6 main::$9 ]
Allocated (was zp[2]:10) zp[2]:6 [ main::$2 main::$8 ]
Allocated (was zp[2]:12) zp[2]:8 [ main::$4 main::$7 ]
Allocated (was zp[2]:10) zp[2]:6 [ main::$4 main::$8 ]
Allocated (was zp[2]:12) zp[2]:8 [ main::$7 ]
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
@ -499,8 +485,7 @@ ASSEMBLER BEFORE OPTIMIZATION
// main
main: {
.label screen = $400
.label __2 = 6
.label __4 = 8
.label __4 = 6
.label __6 = 4
.label line = 2
.label __7 = 8
@ -596,15 +581,7 @@ main: {
jmp __b1
// main::@3
__b3:
// [13] (word~) main::$2 ← (word) main::line#10 + (byte) main::c#2 -- vwuz1=vwuz2_plus_vbuxx
txa
clc
adc.z line
sta.z __2
lda #0
adc.z line+1
sta.z __2+1
// [14] (word~) main::$4 ← (word) main::line#10 + (byte) main::c#2 -- vwuz1=vwuz2_plus_vbuxx
// [13] (word~) main::$4 ← (word) main::line#10 + (byte) main::c#2 -- vwuz1=vwuz2_plus_vbuxx
txa
clc
adc.z line
@ -612,15 +589,15 @@ main: {
lda #0
adc.z line+1
sta.z __4+1
// [15] (byte*~) main::$7 ← (const byte*) main::screen+(byte) $28 + (word~) main::$4 -- pbuz1=pbuc1_plus_vwuz1
// [14] (byte*~) main::$7 ← (const byte*) main::screen+(byte) $28 + (word~) main::$4 -- pbuz1=pbuc1_plus_vwuz2
lda.z __4
clc
lda.z __7
adc #<screen+$28
sta.z __7
lda.z __7+1
lda.z __4+1
adc #>screen+$28
sta.z __7+1
// [16] (byte*~) main::$8 ← (const byte*) main::screen + (word~) main::$2 -- pbuz1=pbuc1_plus_vwuz1
// [15] (byte*~) main::$8 ← (const byte*) main::screen + (word~) main::$4 -- pbuz1=pbuc1_plus_vwuz1
clc
lda.z __8
adc #<screen
@ -628,12 +605,12 @@ main: {
lda.z __8+1
adc #>screen
sta.z __8+1
// [17] *((byte*~) main::$8) ← *((byte*~) main::$7) -- _deref_pbuz1=_deref_pbuz2
// [16] *((byte*~) main::$8) ← *((byte*~) main::$7) -- _deref_pbuz1=_deref_pbuz2
ldy #0
lda (__7),y
ldy #0
sta (__8),y
// [18] (byte) main::c#1 ← ++ (byte) main::c#2 -- vbuxx=_inc_vbuxx
// [17] (byte) main::c#1 ← ++ (byte) main::c#2 -- vbuxx=_inc_vbuxx
inx
// [10] phi from main::@3 to main::@2 [phi:main::@3->main::@2]
__b2_from___b3:
@ -665,8 +642,7 @@ Succesful ASM optimization Pass5RelabelLongLabels
FINAL SYMBOL TABLE
(void()) main()
(word~) main::$2 zp[2]:6 67.33333333333333
(word~) main::$4 zp[2]:8 202.0
(word~) main::$4 zp[2]:6 151.5
(word~) main::$6 zp[2]:4 22.0
(byte*~) main::$7 zp[2]:8 101.0
(byte*~) main::$8 zp[2]:6 202.0
@ -680,12 +656,12 @@ FINAL SYMBOL TABLE
(label) main::@return
(byte) main::c
(byte) main::c#1 reg byte x 202.0
(byte) main::c#2 reg byte x 72.14285714285714
(byte) main::c#2 reg byte x 67.33333333333333
(byte) main::c1
(byte) main::c1#1 reg byte x 22.0
(byte) main::c1#2 reg byte x 8.8
(word) main::line
(word) main::line#10 line zp[2]:2 15.375
(word) main::line#10 line zp[2]:2 9.666666666666666
(word) main::line#2 line zp[2]:2 22.0
(const byte*) main::screen = (byte*) 1024
@ -693,12 +669,12 @@ zp[2]:2 [ main::line#10 main::line#2 ]
reg byte x [ main::c1#2 main::c1#1 ]
reg byte x [ main::c#2 main::c#1 ]
zp[2]:4 [ main::$6 main::$9 ]
zp[2]:6 [ main::$2 main::$8 ]
zp[2]:8 [ main::$4 main::$7 ]
zp[2]:6 [ main::$4 main::$8 ]
zp[2]:8 [ main::$7 ]
FINAL ASSEMBLER
Score: 10741
Score: 8941
// File Comments
// Upstart
@ -709,8 +685,7 @@ Score: 10741
// main
main: {
.label screen = $400
.label __2 = 6
.label __4 = 8
.label __4 = 6
.label __6 = 4
.label line = 2
.label __7 = 8
@ -803,16 +778,7 @@ main: {
// main::@3
__b3:
// line+c
// [13] (word~) main::$2 ← (word) main::line#10 + (byte) main::c#2 -- vwuz1=vwuz2_plus_vbuxx
txa
clc
adc.z line
sta.z __2
lda #0
adc.z line+1
sta.z __2+1
// line+c+40
// [14] (word~) main::$4 ← (word) main::line#10 + (byte) main::c#2 -- vwuz1=vwuz2_plus_vbuxx
// [13] (word~) main::$4 ← (word) main::line#10 + (byte) main::c#2 -- vwuz1=vwuz2_plus_vbuxx
txa
clc
adc.z line
@ -821,15 +787,15 @@ main: {
adc.z line+1
sta.z __4+1
// screen[line+c] = screen[line+c+40]
// [15] (byte*~) main::$7 ← (const byte*) main::screen+(byte) $28 + (word~) main::$4 -- pbuz1=pbuc1_plus_vwuz1
// [14] (byte*~) main::$7 ← (const byte*) main::screen+(byte) $28 + (word~) main::$4 -- pbuz1=pbuc1_plus_vwuz2
lda.z __4
clc
lda.z __7
adc #<screen+$28
sta.z __7
lda.z __7+1
lda.z __4+1
adc #>screen+$28
sta.z __7+1
// [16] (byte*~) main::$8 ← (const byte*) main::screen + (word~) main::$2 -- pbuz1=pbuc1_plus_vwuz1
// [15] (byte*~) main::$8 ← (const byte*) main::screen + (word~) main::$4 -- pbuz1=pbuc1_plus_vwuz1
clc
lda.z __8
adc #<screen
@ -837,12 +803,12 @@ main: {
lda.z __8+1
adc #>screen
sta.z __8+1
// [17] *((byte*~) main::$8) ← *((byte*~) main::$7) -- _deref_pbuz1=_deref_pbuz2
// [16] *((byte*~) main::$8) ← *((byte*~) main::$7) -- _deref_pbuz1=_deref_pbuz2
ldy #0
lda (__7),y
sta (__8),y
// for (byte c=0; c<40; ++c)
// [18] (byte) main::c#1 ← ++ (byte) main::c#2 -- vbuxx=_inc_vbuxx
// [17] (byte) main::c#1 ← ++ (byte) main::c#2 -- vbuxx=_inc_vbuxx
inx
// [10] phi from main::@3 to main::@2 [phi:main::@3->main::@2]
// [10] phi (byte) main::c#2 = (byte) main::c#1 [phi:main::@3->main::@2#0] -- register_copy

View File

@ -1,6 +1,5 @@
(void()) main()
(word~) main::$2 zp[2]:6 67.33333333333333
(word~) main::$4 zp[2]:8 202.0
(word~) main::$4 zp[2]:6 151.5
(word~) main::$6 zp[2]:4 22.0
(byte*~) main::$7 zp[2]:8 101.0
(byte*~) main::$8 zp[2]:6 202.0
@ -14,12 +13,12 @@
(label) main::@return
(byte) main::c
(byte) main::c#1 reg byte x 202.0
(byte) main::c#2 reg byte x 72.14285714285714
(byte) main::c#2 reg byte x 67.33333333333333
(byte) main::c1
(byte) main::c1#1 reg byte x 22.0
(byte) main::c1#2 reg byte x 8.8
(word) main::line
(word) main::line#10 line zp[2]:2 15.375
(word) main::line#10 line zp[2]:2 9.666666666666666
(word) main::line#2 line zp[2]:2 22.0
(const byte*) main::screen = (byte*) 1024
@ -27,5 +26,5 @@ zp[2]:2 [ main::line#10 main::line#2 ]
reg byte x [ main::c1#2 main::c1#1 ]
reg byte x [ main::c#2 main::c#1 ]
zp[2]:4 [ main::$6 main::$9 ]
zp[2]:6 [ main::$2 main::$8 ]
zp[2]:8 [ main::$4 main::$7 ]
zp[2]:6 [ main::$4 main::$8 ]
zp[2]:8 [ main::$7 ]