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 first one dominates the last one. Closes #525

This commit is contained in:
Jesper Gravgaard 2020-09-30 22:48:44 +02:00
parent a6a3aed144
commit e92f72e490
57 changed files with 11952 additions and 12609 deletions

View File

@ -1,4 +1,4 @@
//KICKC FRAGMENT CACHE 11e0585d5e 11e05876ff //KICKC FRAGMENT CACHE 12011d8c00 12011da5a7
//FRAGMENT vbuz1=vbuc1 //FRAGMENT vbuz1=vbuc1
lda #{c1} lda #{c1}
sta {z1} sta {z1}

View File

@ -1,19 +1,67 @@
//KICKC FRAGMENT CACHE 11e0585d5e 11e05876ff //KICKC FRAGMENT CACHE 12011d8c00 12011da5a7
//FRAGMENT vbuz1=vbuc1 //FRAGMENT _deref_pbuc1=vbuc2
lda #{c1} lda #{c2}
sta {z1} sta {c1}
//FRAGMENT _deref_pbuc1=_deref_pbuc1_bor_vbuc2
lda #{c2}
ora {c1}
sta {c1}
//FRAGMENT pbuz1=pbuc1 //FRAGMENT pbuz1=pbuc1
lda #<{c1} lda #<{c1}
sta {z1} sta {z1}
lda #>{c1} lda #>{c1}
sta {z1}+1 sta {z1}+1
//FRAGMENT _deref_pbuc1=_deref_pbuc1_bor_vbuc2 //FRAGMENT pbuz1_lt_pbuc1_then_la1
lda #{c2} lda {z1}+1
ora {c1} cmp #>{c1}
sta {c1} bcc {la1}
//FRAGMENT _deref_pbuc1=vbuc2 bne !+
lda #{c2} lda {z1}
cmp #<{c1}
bcc {la1}
!:
//FRAGMENT _deref_pbuc1=_deref_pbuc2
lda {c2}
sta {c1} sta {c1}
//FRAGMENT vbuz1=_lo_pbuz2
lda {z2}
sta {z1}
//FRAGMENT _deref_pbuz1=vbuz2
lda {z2}
ldy #0
sta ({z1}),y
//FRAGMENT pbuz1=_inc_pbuz1
inw {z1}
//FRAGMENT _deref_pbuz1=vbuc1
lda #{c1}
ldy #0
sta ({z1}),y
//FRAGMENT vbuaa=_lo_pbuz1
lda {z1}
//FRAGMENT vbuxx=_lo_pbuz1
ldx {z1}
//FRAGMENT _deref_pbuz1=vbuaa
ldy #0
sta ({z1}),y
//FRAGMENT _deref_pbuz1=vbuxx
txa
ldy #0
sta ({z1}),y
//FRAGMENT _deref_pbuz1=vbuyy
tya
ldy #0
sta ({z1}),y
//FRAGMENT _deref_pbuz1=vbuzz
tza
ldy #0
sta ({z1}),y
//FRAGMENT vbuyy=_lo_pbuz1
ldy {z1}
//FRAGMENT vbuzz=_lo_pbuz1
ldz {z1}
//FRAGMENT vbuz1=vbuc1
lda #{c1}
sta {z1}
//FRAGMENT vbuz1=_inc_vbuz1 //FRAGMENT vbuz1=_inc_vbuz1
inc {z1} inc {z1}
//FRAGMENT vbuz1=vbuz2 //FRAGMENT vbuz1=vbuz2
@ -40,8 +88,6 @@ dec {z1}
ldy #0 ldy #0
lda ({z2}),y lda ({z2}),y
sta {z1} sta {z1}
//FRAGMENT pbuz1=_inc_pbuz1
inw {z1}
//FRAGMENT vbuz1_neq_0_then_la1 //FRAGMENT vbuz1_neq_0_then_la1
lda {z1} lda {z1}
cmp #0 cmp #0
@ -134,10 +180,6 @@ bne {la1}
lda {z1} lda {z1}
cmp #<{c1} cmp #<{c1}
bne {la1} bne {la1}
//FRAGMENT _deref_pbuz1=vbuc1
lda #{c1}
ldy #0
sta ({z1}),y
//FRAGMENT vbuaa=vbuz1 //FRAGMENT vbuaa=vbuz1
lda {z1} lda {z1}
//FRAGMENT vbuxx=vbuz1 //FRAGMENT vbuxx=vbuz1
@ -1248,10 +1290,6 @@ sta {z1}
lda #0 lda #0
adc {z2}+1 adc {z2}+1
sta {z1}+1 sta {z1}+1
//FRAGMENT _deref_pbuz1=vbuz2
lda {z2}
ldy #0
sta ({z1}),y
//FRAGMENT vbuaa=_deref_pbuc1_plus_1 //FRAGMENT vbuaa=_deref_pbuc1_plus_1
lda {c1} lda {c1}
inc inc
@ -1287,18 +1325,6 @@ sta ({z1}),y
txa txa
ldz {z2} ldz {z2}
sta ({z1}),z sta ({z1}),z
//FRAGMENT _deref_pbuz1=vbuxx
txa
ldy #0
sta ({z1}),y
//FRAGMENT _deref_pbuz1=vbuyy
tya
ldy #0
sta ({z1}),y
//FRAGMENT _deref_pbuz1=vbuzz
tza
ldy #0
sta ({z1}),y
//FRAGMENT pbuz1_derefidx_vbuz2=vbuyy //FRAGMENT pbuz1_derefidx_vbuz2=vbuyy
tya tya
ldy {z2} ldy {z2}
@ -1510,9 +1536,6 @@ tay
tza tza
sty $ff sty $ff
ora $ff ora $ff
//FRAGMENT _deref_pbuc1=_deref_pbuc2
lda {c2}
sta {c1}
//FRAGMENT vduz1=vduc1 //FRAGMENT vduz1=vduc1
lda #<{c1} lda #<{c1}
sta {z1} sta {z1}

View File

@ -1,4 +1,4 @@
//KICKC FRAGMENT CACHE 11e0585d5e 11e05876ff //KICKC FRAGMENT CACHE 12011d8c00 12011da5a7
//FRAGMENT vbuz1=vbuc1 //FRAGMENT vbuz1=vbuc1
lda #{c1} lda #{c1}
sta {z1} sta {z1}

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
//KICKC FRAGMENT CACHE 11e0585d5e 11e05876ff //KICKC FRAGMENT CACHE 12011d8c00 12011da5a7
//FRAGMENT vbuz1=_deref_pbuc1 //FRAGMENT vbuz1=_deref_pbuc1
lda {c1} lda {c1}
sta {z1} sta {z1}

View File

@ -0,0 +1,7 @@
clc
lda {m2}
adc {c1},x
sta {m1}
lda {m2}+1
adc {c1}+1,x
sta {m1}+1

View File

@ -370,6 +370,7 @@ public class Compiler {
program.clearVariableReferenceInfos(); program.clearVariableReferenceInfos();
program.clearControlFlowBlockSuccessorClosure(); program.clearControlFlowBlockSuccessorClosure();
program.clearStatementInfos(); program.clearStatementInfos();
program.clearDominators();
return false; return false;
}); });
optimizations.add(new PassNStatementIndices(program)); optimizations.add(new PassNStatementIndices(program));

View File

@ -2,10 +2,7 @@ package dk.camelot64.kickc.model;
import dk.camelot64.kickc.model.values.LabelRef; import dk.camelot64.kickc.model.values.LabelRef;
import java.util.Collection; import java.util.*;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
/** /**
* The Dominators for a specific block. * The Dominators for a specific block.
@ -43,7 +40,6 @@ public class DominatorsBlock {
for(LabelRef dominator : dominators) { for(LabelRef dominator : dominators) {
add(dominator); add(dominator);
} }
} }
/** /**
@ -53,13 +49,7 @@ public class DominatorsBlock {
* @param other The dominator set to intersect with * @param other The dominator set to intersect with
*/ */
public void intersect(DominatorsBlock other) { public void intersect(DominatorsBlock other) {
Iterator<LabelRef> iterator = dominators.iterator(); dominators.removeIf(dominator -> !other.contains(dominator));
while(iterator.hasNext()) {
LabelRef dominator = iterator.next();
if(!other.contains(dominator)) {
iterator.remove();
}
}
} }
/** /**
@ -80,15 +70,13 @@ public class DominatorsBlock {
public boolean equals(Object o) { public boolean equals(Object o) {
if(this == o) return true; if(this == o) return true;
if(o == null || getClass() != o.getClass()) return false; if(o == null || getClass() != o.getClass()) return false;
DominatorsBlock that = (DominatorsBlock) o; DominatorsBlock that = (DominatorsBlock) o;
return Objects.equals(dominators, that.dominators);
return dominators != null ? dominators.equals(that.dominators) : that.dominators == null;
} }
@Override @Override
public int hashCode() { public int hashCode() {
return dominators != null ? dominators.hashCode() : 0; return Objects.hash(dominators);
} }
@Override @Override

View File

@ -1,6 +1,8 @@
package dk.camelot64.kickc.passes; package dk.camelot64.kickc.passes;
import dk.camelot64.kickc.model.ControlFlowBlock; import dk.camelot64.kickc.model.ControlFlowBlock;
import dk.camelot64.kickc.model.DominatorsBlock;
import dk.camelot64.kickc.model.DominatorsGraph;
import dk.camelot64.kickc.model.Program; import dk.camelot64.kickc.model.Program;
import dk.camelot64.kickc.model.iterator.ProgramValue; import dk.camelot64.kickc.model.iterator.ProgramValue;
import dk.camelot64.kickc.model.iterator.ProgramValueHandler; import dk.camelot64.kickc.model.iterator.ProgramValueHandler;
@ -13,9 +15,7 @@ import dk.camelot64.kickc.model.statements.StatementAssignment;
import dk.camelot64.kickc.model.symbols.Variable; import dk.camelot64.kickc.model.symbols.Variable;
import dk.camelot64.kickc.model.values.*; import dk.camelot64.kickc.model.values.*;
import java.util.HashSet; import java.util.*;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
/** /**
@ -31,47 +31,110 @@ public class Pass2DuplicateRValueIdentification extends Pass2SsaOptimization {
public boolean step() { public boolean step() {
boolean modified = false; boolean modified = false;
// Dominators are used for determining if one statement is guaranteed to be executed before another statement
DominatorsGraph dominators = getProgram().getDominators();
// All RValues in the program
Set<AssignmentWithRValue> rValues = new HashSet<>();
for(ControlFlowBlock block : getGraph().getAllBlocks()) { for(ControlFlowBlock block : getGraph().getAllBlocks()) {
Set<AssignmentRValue> rValues = new HashSet<>();
for(Statement statement : block.getStatements()) { for(Statement statement : block.getStatements()) {
if(statement instanceof StatementAssignment) { if(statement instanceof StatementAssignment) {
StatementAssignment assignment = (StatementAssignment) statement; StatementAssignment thisAssignment = (StatementAssignment) statement;
AssignmentRValue assignmentRValue = new AssignmentRValue(assignment, block); AssignmentWithRValue thisRValue = new AssignmentWithRValue(thisAssignment, block);
if(!assignmentRValue.isConstant() && !assignmentRValue.isTrivial() && !assignmentRValue.isVolatile()&& !assignmentRValue.isLoadStore()) { if(!thisRValue.isConstant() && !thisRValue.isTrivial() && !thisRValue.isVolatile() && !thisRValue.isLoadStore()) {
if(rValues.contains(assignmentRValue)) { boolean duplicate = false;
AssignmentRValue firstAssignment = rValues.stream().filter(assignmentRValue1 -> assignmentRValue1.equals(assignmentRValue)).findFirst().get(); for(AssignmentWithRValue otherRValue : rValues) {
if(firstAssignment.assignment.getlValue() instanceof VariableRef) { if(otherRValue.isSameRValue(thisRValue)) {
getLog().append("Identified duplicate assignment right side " + assignment.toString(getProgram(), false)); // Check if any of the statements is guaranteed to be executed before the other statement
assignment.setrValue1(null); DominatorsBlock thisDominators = dominators.getDominators(thisRValue.block.getLabel());
assignment.setOperator(null); DominatorsBlock otherDominators = dominators.getDominators(otherRValue.block.getLabel());
assignment.setrValue2(firstAssignment.assignment.getlValue()); if(otherRValue.block.getLabel().equals(thisRValue.block.getLabel())) {
modified = true; // The two assignments are in the same block
} else { // Since we are visiting statements sequentially the other other assignment is guaranteed to be executed before this assignment
throw new InternalError("Complex lValue for duplicate rvalue " + firstAssignment.assignment.toString(getProgram(), false)); 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))
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))
duplicate |= deduplicateRValue(thisRValue, otherRValue);
} }
} else {
rValues.add(assignmentRValue);
} }
} }
// If not a duplicate itself - add it to the candidate pool
if(!duplicate)
rValues.add(thisRValue);
// Determine if anything is modified
modified |= duplicate;
}
} }
} }
} }
return modified; return modified;
} }
/**
* 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 block The block to examine
* @return true if the scope match
*/
private boolean scopeMatch(RValue rValue, ControlFlowBlock block) {
if(rValue == null)
return true;
List<SymbolVariableRef> varRefs = new ArrayList<>();
ProgramValueIterator.execute(new ProgramValue.GenericValue(rValue),
(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()))
return false;
}
return true;
}
/**
* De-duplicates the RValues of two assignments, where the first one is guaranteed to be called before the second one.
* Modifies the second assignment to reference the result of the first.
*
* @param firstRValue The first assignment with the RValue - guaranteed to be called before the second assignment.
* @param secondRValue A second assignment with a duplicated RValue.
* @return true if the deduplication was successful.
*/
private boolean deduplicateRValue(AssignmentWithRValue firstRValue, AssignmentWithRValue secondRValue) {
if(firstRValue.assignment.getlValue() instanceof VariableRef) {
StatementAssignment secondAssignment = secondRValue.assignment;
getLog().append("Identified duplicate assignment right side " + secondAssignment.toString(getProgram(), false));
secondAssignment.setrValue1(null);
secondAssignment.setOperator(null);
secondAssignment.setrValue2(firstRValue.assignment.getlValue());
return true;
} else {
throw new InternalError("Complex lValue for duplicate rvalue " + firstRValue.assignment.toString(getProgram(), false));
}
}
/** /**
* Represents an RValue of an assignment. * Represents an RValue of an assignment.
* Implements equals() and hashcode() to allow identification of duplicate RValues
*/ */
private class AssignmentRValue { private class AssignmentWithRValue {
private ControlFlowBlock block; private ControlFlowBlock block;
private StatementAssignment assignment; private StatementAssignment assignment;
private RValue rValue1; private RValue rValue1;
private Operator operator; private Operator operator;
private RValue rValue2; private RValue rValue2;
public AssignmentRValue(StatementAssignment assignment, ControlFlowBlock block) { public AssignmentWithRValue(StatementAssignment assignment, ControlFlowBlock block) {
this.block = block; this.block = block;
this.assignment = assignment; this.assignment = assignment;
this.rValue1 = assignment.getrValue1(); this.rValue1 = assignment.getrValue1();
@ -134,24 +197,39 @@ public class Pass2DuplicateRValueIdentification extends Pass2SsaOptimization {
if(operator.equals(Operators.LOGIC_NOT)) return true; if(operator.equals(Operators.LOGIC_NOT)) return true;
if(operator.equals(Operators.LOGIC_AND)) return true; if(operator.equals(Operators.LOGIC_AND)) return true;
if(operator.equals(Operators.LOGIC_OR)) return true; if(operator.equals(Operators.LOGIC_OR)) return true;
if(operator.equals(Operators.HIBYTE)) return true;
if(operator.equals(Operators.LOWBYTE)) return true;
return false; return false;
} }
@Override /**
public boolean equals(Object o) { * Determines if two assignment RValues are duplicates.
if(this == o) return true; *
if(o == null || getClass() != o.getClass()) return false; * @param that The other assignment
AssignmentRValue that = (AssignmentRValue) o; * @return true if the RValues are duplicates
*/
public boolean isSameRValue(AssignmentWithRValue that) {
return Objects.equals(rValue1, that.rValue1) && return Objects.equals(rValue1, that.rValue1) &&
Objects.equals(operator, that.operator) && Objects.equals(operator, that.operator) &&
Objects.equals(rValue2, that.rValue2); Objects.equals(rValue2, that.rValue2);
} }
@Override @Override
public int hashCode() { public boolean equals(Object o) {
return Objects.hash(rValue1, operator, rValue2); if(this == o) return true;
if(o == null || getClass() != o.getClass()) return false;
AssignmentWithRValue that = (AssignmentWithRValue) o;
return block.equals(that.block) &&
assignment.equals(that.assignment) &&
Objects.equals(rValue1, that.rValue1) &&
Objects.equals(operator, that.operator) &&
Objects.equals(rValue2, that.rValue2);
} }
@Override
public int hashCode() {
return Objects.hash(block, assignment, rValue1, operator, rValue2);
}
} }
} }

View File

@ -289,13 +289,14 @@ main: {
} }
// Process any chars in the PROCESSING array // Process any chars in the PROCESSING array
processChars: { processChars: {
.label __12 = $1a .label __12 = $1b
.label __21 = $18 .label __13 = $15
.label processing = $15 .label __21 = $19
.label bitmask = $17 .label processing = $16
.label bitmask = $18
.label i = 7 .label i = 7
.label xpos = $18 .label xpos = $19
.label ypos = $1c .label ypos = $1d
.label numActive = 8 .label numActive = 8
lda #0 lda #0
sta.z numActive sta.z numActive
@ -304,6 +305,7 @@ processChars: {
// PROCESSING+i // PROCESSING+i
lda.z i lda.z i
asl asl
sta.z __13
clc clc
adc.z i adc.z i
asl asl
@ -413,13 +415,10 @@ processChars: {
and SPRITES_XMSB and SPRITES_XMSB
sta SPRITES_XMSB sta SPRITES_XMSB
__b5: __b5:
// i*2
lda.z i
asl
tax
// SPRITES_XPOS[i*2] = (char)xpos // SPRITES_XPOS[i*2] = (char)xpos
ldy.z __13
lda.z xpos lda.z xpos
sta SPRITES_XPOS,x sta SPRITES_XPOS,y
// processing->y>>4 // processing->y>>4
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y
lda (processing),y lda (processing),y
@ -439,7 +438,8 @@ processChars: {
lda.z __12 lda.z __12
sta.z ypos sta.z ypos
// SPRITES_YPOS[i*2] = ypos // SPRITES_YPOS[i*2] = ypos
sta SPRITES_YPOS,x ldy.z __13
sta SPRITES_YPOS,y
// if(processing->x < XPOS_LEFTMOST || processing->x > XPOS_RIGHTMOST || processing->y < YPOS_TOPMOST|| processing->y > YPOS_BOTTOMMOST ) // if(processing->x < XPOS_LEFTMOST || processing->x > XPOS_RIGHTMOST || processing->y < YPOS_TOPMOST|| processing->y > YPOS_BOTTOMMOST )
// Move sprite // Move sprite
ldy #1 ldy #1
@ -606,16 +606,16 @@ processChars: {
// Utilizes symmetry around the center // Utilizes symmetry around the center
// init_angle_screen(byte* zp($12) screen) // init_angle_screen(byte* zp($12) screen)
init_angle_screen: { init_angle_screen: {
.label __7 = $1e .label __7 = $1f
.label screen = $12 .label screen = $12
.label screen_topline = $a .label screen_topline = $a
.label screen_bottomline = $12 .label screen_bottomline = $12
.label xw = $24 .label xw = $25
.label yw = $27 .label yw = $28
.label angle_w = $1e .label angle_w = $1f
.label ang_w = $1d .label ang_w = $1e
.label x = $26 .label x = $27
.label xb = $2b .label xb = $2c
.label y = $14 .label y = $14
// screen_topline = screen+40*12 // screen_topline = screen+40*12
lda.z screen lda.z screen
@ -817,19 +817,19 @@ setupRasterIrq: {
// Find the non-space char closest to the center of the screen // Find the non-space char closest to the center of the screen
// If no non-space char is found the distance will be 0xffff // If no non-space char is found the distance will be 0xffff
getCharToProcess: { getCharToProcess: {
.label __8 = $29 .label __8 = $2a
.label __9 = $29 .label __9 = $2a
.label __11 = $29 .label __11 = $2a
.label screen_line = $12 .label screen_line = $12
.label dist_line = $a .label dist_line = $a
.label y = $14 .label y = $14
.label return_x = $2b .label return_x = $2c
.label return_y = 9 .label return_y = 9
.label closest_dist = $26 .label closest_dist = $27
.label closest_x = $2b .label closest_x = $2c
.label closest_y = 9 .label closest_y = 9
.label __12 = $1e .label __12 = $1f
.label __13 = $29 .label __13 = $2a
// screen_line = SCREEN_COPY // screen_line = SCREEN_COPY
lda.z SCREEN_COPY lda.z SCREEN_COPY
sta.z screen_line sta.z screen_line
@ -949,36 +949,36 @@ getCharToProcess: {
jmp __b3 jmp __b3
} }
// Start processing a char - by inserting it into the PROCESSING array // Start processing a char - by inserting it into the PROCESSING array
// startProcessing(byte zp($1d) center_x, byte zp($14) center_y) // startProcessing(byte zp($1e) center_x, byte zp($14) center_y)
startProcessing: { startProcessing: {
.label __0 = $20 .label __0 = $21
.label __4 = $c .label __4 = $c
.label __6 = $a .label __6 = $a
.label __8 = $27 .label __8 = $28
.label __9 = $27 .label __9 = $28
.label __11 = $29 .label __11 = $2a
.label __12 = $29 .label __12 = $2a
.label __23 = $20 .label __23 = $21
.label __24 = $c .label __24 = $c
.label __25 = $a .label __25 = $a
.label __26 = $27 .label __26 = $28
.label __27 = $29 .label __27 = $2a
.label center_x = $1d .label center_x = $1e
.label center_y = $14 .label center_y = $14
.label i = 9 .label i = 9
.label offset = $20 .label offset = $21
.label colPtr = $24 .label colPtr = $25
.label spriteCol = $26 .label spriteCol = $27
.label screenPtr = $20 .label screenPtr = $21
.label spriteData = $c .label spriteData = $c
.label chargenData = $a .label chargenData = $a
.label spriteX = $27 .label spriteX = $28
.label spriteY = $29 .label spriteY = $2a
.label spritePtr = $2b .label spritePtr = $2c
// Busy-wait while finding an empty slot in the PROCESSING array // Busy-wait while finding an empty slot in the PROCESSING array
.label freeIdx = 9 .label freeIdx = 9
.label __33 = $22 .label __33 = $23
.label __34 = $20 .label __34 = $21
ldx #$ff ldx #$ff
__b1: __b1:
lda #0 lda #0
@ -1262,18 +1262,18 @@ startProcessing: {
// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y)
// Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Finding the angle requires a binary search using CORDIC_ITERATIONS_16
// Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI)
// atan2_16(signed word zp($24) x, signed word zp($27) y) // atan2_16(signed word zp($25) x, signed word zp($28) y)
atan2_16: { atan2_16: {
.label __2 = $c .label __2 = $c
.label __7 = $29 .label __7 = $2a
.label yi = $c .label yi = $c
.label xi = $29 .label xi = $2a
.label angle = $1e .label angle = $1f
.label xd = $22 .label xd = $23
.label yd = $20 .label yd = $21
.label return = $1e .label return = $1f
.label x = $24 .label x = $25
.label y = $27 .label y = $28
// (y>=0)?y:-y // (y>=0)?y:-y
lda.z y+1 lda.z y+1
bmi !__b1+ bmi !__b1+

View File

@ -131,8 +131,8 @@ processChars: scope:[processChars] from irqBottom::@1
processChars::@1: scope:[processChars] from processChars processChars::@2 processChars::@1: scope:[processChars] from processChars processChars::@2
[61] (byte) processChars::numActive#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::numActive#3 ) [61] (byte) processChars::numActive#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::numActive#3 )
[61] (byte) processChars::i#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::i#1 ) [61] (byte) processChars::i#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::i#1 )
[62] (byte~) processChars::$86 ← (byte) processChars::i#10 << (byte) 1 [62] (byte~) processChars::$13 ← (byte) processChars::i#10 << (byte) 1
[63] (byte~) processChars::$87 ← (byte~) processChars::$86 + (byte) processChars::i#10 [63] (byte~) processChars::$87 ← (byte~) processChars::$13 + (byte) processChars::i#10
[64] (byte~) processChars::$88 ← (byte~) processChars::$87 << (byte) 1 [64] (byte~) processChars::$88 ← (byte~) processChars::$87 << (byte) 1
[65] (byte~) processChars::$89 ← (byte~) processChars::$88 + (byte) processChars::i#10 [65] (byte~) processChars::$89 ← (byte~) processChars::$88 + (byte) processChars::i#10
[66] (byte~) processChars::$28 ← (byte~) processChars::$89 << (byte) 1 [66] (byte~) processChars::$28 ← (byte~) processChars::$89 << (byte) 1
@ -160,406 +160,405 @@ processChars::@8: scope:[processChars] from processChars::@3
[80] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) processChars::$10 [80] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) processChars::$10
to:processChars::@5 to:processChars::@5
processChars::@5: scope:[processChars] from processChars::@4 processChars::@8 processChars::@5: scope:[processChars] from processChars::@4 processChars::@8
[81] (byte~) processChars::$13 ← (byte) processChars::i#10 << (byte) 1 [81] *((const nomodify byte*) SPRITES_XPOS + (byte~) processChars::$13) ← (byte)(word) processChars::xpos#0
[82] *((const nomodify byte*) SPRITES_XPOS + (byte~) processChars::$13) ← (byte)(word) processChars::xpos#0 [82] (word~) processChars::$12 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4
[83] (word~) processChars::$12 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4 [83] (byte) processChars::ypos#0 ← (byte)(word~) processChars::$12
[84] (byte) processChars::ypos#0 ← (byte)(word~) processChars::$12 [84] *((const nomodify byte*) SPRITES_YPOS + (byte~) processChars::$13) ← (byte) processChars::ypos#0
[85] *((const nomodify byte*) SPRITES_YPOS + (byte~) processChars::$13) ← (byte) processChars::ypos#0 [85] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const nomodify word) XPOS_LEFTMOST) goto processChars::@6
[86] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const nomodify word) XPOS_LEFTMOST) goto processChars::@6
to:processChars::@14 to:processChars::@14
processChars::@14: scope:[processChars] from processChars::@5 processChars::@14: scope:[processChars] from processChars::@5
[87] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const nomodify word) XPOS_RIGHTMOST) goto processChars::@6 [86] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const nomodify word) XPOS_RIGHTMOST) goto processChars::@6
to:processChars::@13 to:processChars::@13
processChars::@13: scope:[processChars] from processChars::@14 processChars::@13: scope:[processChars] from processChars::@14
[88] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const nomodify word) YPOS_TOPMOST) goto processChars::@6 [87] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const nomodify word) YPOS_TOPMOST) goto processChars::@6
to:processChars::@12 to:processChars::@12
processChars::@12: scope:[processChars] from processChars::@13 processChars::@12: scope:[processChars] from processChars::@13
[89] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const nomodify word) YPOS_BOTTOMMOST) goto processChars::@6 [88] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const nomodify word) YPOS_BOTTOMMOST) goto processChars::@6
to:processChars::@9 to:processChars::@9
processChars::@9: scope:[processChars] from processChars::@12 processChars::@9: scope:[processChars] from processChars::@12
[90] (word~) processChars::$21 ← (word) processChars::xpos#0 >> (byte) 3 [89] (word~) processChars::$21 ← (word) processChars::xpos#0 >> (byte) 3
[91] (byte~) processChars::$73 ← (byte)(word~) processChars::$21 [90] (byte~) processChars::$73 ← (byte)(word~) processChars::$21
[92] (byte) processChars::xchar#0 ← (byte~) processChars::$73 - (const nomodify byte) BORDER_XPOS_LEFT/(byte) 8 [91] (byte) processChars::xchar#0 ← (byte~) processChars::$73 - (const nomodify byte) BORDER_XPOS_LEFT/(byte) 8
[93] (byte~) processChars::$29 ← (byte) processChars::xchar#0 << (byte) 1 [92] (byte~) processChars::$29 ← (byte) processChars::xchar#0 << (byte) 1
[94] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const to_nomodify word*) VXSIN + (byte~) processChars::$29) [93] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const to_nomodify word*) VXSIN + (byte~) processChars::$29)
[95] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) [94] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX)
[96] (byte~) processChars::$79 ← (byte) processChars::ypos#0 >> (byte) 3 [95] (byte~) processChars::$79 ← (byte) processChars::ypos#0 >> (byte) 3
[97] (byte) processChars::ychar#0 ← (byte~) processChars::$79 - (const nomodify byte) BORDER_YPOS_TOP/(byte) 8 [96] (byte) processChars::ychar#0 ← (byte~) processChars::$79 - (const nomodify byte) BORDER_YPOS_TOP/(byte) 8
[98] (byte~) processChars::$30 ← (byte) processChars::ychar#0 << (byte) 1 [97] (byte~) processChars::$30 ← (byte) processChars::ychar#0 << (byte) 1
[99] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const to_nomodify word*) VYSIN + (byte~) processChars::$30) [98] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const to_nomodify word*) VYSIN + (byte~) processChars::$30)
[100] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) [99] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY)
to:processChars::@7 to:processChars::@7
processChars::@7: scope:[processChars] from processChars::@6 processChars::@9 processChars::@7: scope:[processChars] from processChars::@6 processChars::@9
[101] (byte) processChars::numActive#1 ← ++ (byte) processChars::numActive#10 [100] (byte) processChars::numActive#1 ← ++ (byte) processChars::numActive#10
to:processChars::@2 to:processChars::@2
processChars::@2: scope:[processChars] from processChars::@1 processChars::@7 processChars::@2: scope:[processChars] from processChars::@1 processChars::@7
[102] (byte) processChars::numActive#3 ← phi( processChars::@1/(byte) processChars::numActive#10 processChars::@7/(byte) processChars::numActive#1 ) [101] (byte) processChars::numActive#3 ← phi( processChars::@1/(byte) processChars::numActive#10 processChars::@7/(byte) processChars::numActive#1 )
[103] (byte) processChars::i#1 ← ++ (byte) processChars::i#10 [102] (byte) processChars::i#1 ← ++ (byte) processChars::i#10
[104] if((byte) processChars::i#1!=(const nomodify byte) NUM_PROCESSING-(byte) 1+(byte) 1) goto processChars::@1 [103] if((byte) processChars::i#1!=(const nomodify byte) NUM_PROCESSING-(byte) 1+(byte) 1) goto processChars::@1
to:processChars::@return to:processChars::@return
processChars::@return: scope:[processChars] from processChars::@2 processChars::@return: scope:[processChars] from processChars::@2
[105] return [104] return
to:@return to:@return
processChars::@6: scope:[processChars] from processChars::@12 processChars::@13 processChars::@14 processChars::@5 processChars::@6: scope:[processChars] from processChars::@12 processChars::@13 processChars::@14 processChars::@5
[106] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE [105] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE
[107] (byte~) processChars::$25 ← (byte) $ff ^ (byte) processChars::bitmask#0 [106] (byte~) processChars::$25 ← (byte) $ff ^ (byte) processChars::bitmask#0
[108] *((const nomodify byte*) SPRITES_ENABLE) ← *((const nomodify byte*) SPRITES_ENABLE) & (byte~) processChars::$25 [107] *((const nomodify byte*) SPRITES_ENABLE) ← *((const nomodify byte*) SPRITES_ENABLE) & (byte~) processChars::$25
to:processChars::@7 to:processChars::@7
processChars::@4: scope:[processChars] from processChars::@3 processChars::@4: scope:[processChars] from processChars::@3
[109] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (byte) processChars::bitmask#0 [108] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (byte) processChars::bitmask#0
to:processChars::@5 to:processChars::@5
(void()) init_angle_screen((byte*) init_angle_screen::screen) (void()) init_angle_screen((byte*) init_angle_screen::screen)
init_angle_screen: scope:[init_angle_screen] from main init_angle_screen: scope:[init_angle_screen] from main
[110] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [109] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c
[111] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c [110] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c
to:init_angle_screen::@1 to:init_angle_screen::@1
init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@4 init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@4
[112] (byte*) init_angle_screen::screen_bottomline#6 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_bottomline#0 init_angle_screen::@4/(byte*) init_angle_screen::screen_bottomline#1 ) [111] (byte*) init_angle_screen::screen_bottomline#6 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_bottomline#0 init_angle_screen::@4/(byte*) init_angle_screen::screen_bottomline#1 )
[112] (byte*) init_angle_screen::screen_topline#6 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_topline#0 init_angle_screen::@4/(byte*) init_angle_screen::screen_topline#1 ) [111] (byte*) init_angle_screen::screen_topline#6 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_topline#0 init_angle_screen::@4/(byte*) init_angle_screen::screen_topline#1 )
[112] (byte) init_angle_screen::y#5 ← phi( init_angle_screen/(byte) 0 init_angle_screen::@4/(byte) init_angle_screen::y#1 ) [111] (byte) init_angle_screen::y#5 ← phi( init_angle_screen/(byte) 0 init_angle_screen::@4/(byte) init_angle_screen::y#1 )
to:init_angle_screen::@2 to:init_angle_screen::@2
init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@5 init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@5
[113] (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@1/(byte) $27 init_angle_screen::@5/(byte) init_angle_screen::xb#1 ) [112] (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@1/(byte) $27 init_angle_screen::@5/(byte) init_angle_screen::xb#1 )
[113] (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(byte) 0 init_angle_screen::@5/(byte) init_angle_screen::x#1 ) [112] (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(byte) 0 init_angle_screen::@5/(byte) init_angle_screen::x#1 )
[114] if((byte) init_angle_screen::x#2<(byte) $13+(byte) 1) goto init_angle_screen::@3 [113] if((byte) init_angle_screen::x#2<(byte) $13+(byte) 1) goto init_angle_screen::@3
to:init_angle_screen::@4 to:init_angle_screen::@4
init_angle_screen::@4: scope:[init_angle_screen] from init_angle_screen::@2 init_angle_screen::@4: scope:[init_angle_screen] from init_angle_screen::@2
[115] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#6 - (byte) $28 [114] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#6 - (byte) $28
[116] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#6 + (byte) $28 [115] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#6 + (byte) $28
[117] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#5 [116] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#5
[118] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1 [117] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1
to:init_angle_screen::@return to:init_angle_screen::@return
init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@4 init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@4
[119] return [118] return
to:@return to:@return
init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@2 init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@2
[120] (byte~) init_angle_screen::$3 ← (byte) init_angle_screen::x#2 << (byte) 1 [119] (byte~) init_angle_screen::$3 ← (byte) init_angle_screen::x#2 << (byte) 1
[121] (byte~) init_angle_screen::$4 ← (byte) $27 - (byte~) init_angle_screen::$3 [120] (byte~) init_angle_screen::$4 ← (byte) $27 - (byte~) init_angle_screen::$3
[122] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$4 w= (byte) 0 [121] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$4 w= (byte) 0
[123] (byte~) init_angle_screen::$5 ← (byte) init_angle_screen::y#5 << (byte) 1 [122] (byte~) init_angle_screen::$5 ← (byte) init_angle_screen::y#5 << (byte) 1
[124] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$5 w= (byte) 0 [123] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$5 w= (byte) 0
[125] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0 [124] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0
[126] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0 [125] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0
[127] call atan2_16 [126] call atan2_16
[128] (word) atan2_16::return#2 ← (word) atan2_16::return#0 [127] (word) atan2_16::return#2 ← (word) atan2_16::return#0
to:init_angle_screen::@5 to:init_angle_screen::@5
init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@3 init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@3
[129] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2 [128] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2
[130] (word~) init_angle_screen::$7 ← (word) init_angle_screen::angle_w#0 + (byte) $80 [129] (word~) init_angle_screen::$7 ← (word) init_angle_screen::angle_w#0 + (byte) $80
[131] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$7 [130] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$7
[132] *((byte*) init_angle_screen::screen_bottomline#6 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0 [131] *((byte*) init_angle_screen::screen_bottomline#6 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0
[133] (byte~) init_angle_screen::$9 ← - (byte) init_angle_screen::ang_w#0 [132] (byte~) init_angle_screen::$9 ← - (byte) init_angle_screen::ang_w#0
[134] *((byte*) init_angle_screen::screen_topline#6 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$9 [133] *((byte*) init_angle_screen::screen_topline#6 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$9
[135] (byte~) init_angle_screen::$10 ← (byte) $80 + (byte) init_angle_screen::ang_w#0 [134] (byte~) init_angle_screen::$10 ← (byte) $80 + (byte) init_angle_screen::ang_w#0
[136] *((byte*) init_angle_screen::screen_topline#6 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$10 [135] *((byte*) init_angle_screen::screen_topline#6 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$10
[137] (byte~) init_angle_screen::$11 ← (byte) $80 - (byte) init_angle_screen::ang_w#0 [136] (byte~) init_angle_screen::$11 ← (byte) $80 - (byte) init_angle_screen::ang_w#0
[138] *((byte*) init_angle_screen::screen_bottomline#6 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$11 [137] *((byte*) init_angle_screen::screen_bottomline#6 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$11
[139] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2 [138] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2
[140] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2 [139] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2
to:init_angle_screen::@2 to:init_angle_screen::@2
(void()) initSprites() (void()) initSprites()
initSprites: scope:[initSprites] from main::@4 initSprites: scope:[initSprites] from main::@4
[141] phi() [140] phi()
to:initSprites::@1 to:initSprites::@1
initSprites::@1: scope:[initSprites] from initSprites initSprites::@2 initSprites::@1: scope:[initSprites] from initSprites initSprites::@2
[142] (byte*) initSprites::sp#2 ← phi( initSprites/(const nomodify byte*) SPRITE_DATA initSprites::@2/(byte*) initSprites::sp#1 ) [141] (byte*) initSprites::sp#2 ← phi( initSprites/(const nomodify byte*) SPRITE_DATA initSprites::@2/(byte*) initSprites::sp#1 )
[143] if((byte*) initSprites::sp#2<(const nomodify byte*) SPRITE_DATA+(const nomodify byte) NUM_PROCESSING*(byte) $40) goto initSprites::@2 [142] if((byte*) initSprites::sp#2<(const nomodify byte*) SPRITE_DATA+(const nomodify byte) NUM_PROCESSING*(byte) $40) goto initSprites::@2
to:initSprites::@3 to:initSprites::@3
initSprites::@3: scope:[initSprites] from initSprites::@1 initSprites::@3 initSprites::@3: scope:[initSprites] from initSprites::@1 initSprites::@3
[144] (byte) initSprites::i#2 ← phi( initSprites::@1/(byte) 0 initSprites::@3/(byte) initSprites::i#1 ) [143] (byte) initSprites::i#2 ← phi( initSprites::@1/(byte) 0 initSprites::@3/(byte) initSprites::i#1 )
[145] *((const nomodify byte*) SPRITES_COLOR + (byte) initSprites::i#2) ← (const nomodify byte) LIGHT_BLUE [144] *((const nomodify byte*) SPRITES_COLOR + (byte) initSprites::i#2) ← (const nomodify byte) LIGHT_BLUE
[146] (byte) initSprites::i#1 ← ++ (byte) initSprites::i#2 [145] (byte) initSprites::i#1 ← ++ (byte) initSprites::i#2
[147] if((byte) initSprites::i#1!=(byte) 8) goto initSprites::@3 [146] if((byte) initSprites::i#1!=(byte) 8) goto initSprites::@3
to:initSprites::@4 to:initSprites::@4
initSprites::@4: scope:[initSprites] from initSprites::@3 initSprites::@4: scope:[initSprites] from initSprites::@3
[148] *((const nomodify byte*) SPRITES_MC) ← (byte) 0 [147] *((const nomodify byte*) SPRITES_MC) ← (byte) 0
[149] *((const nomodify byte*) SPRITES_EXPAND_X) ← (byte) 0 [148] *((const nomodify byte*) SPRITES_EXPAND_X) ← (byte) 0
[150] *((const nomodify byte*) SPRITES_EXPAND_Y) ← (byte) 0 [149] *((const nomodify byte*) SPRITES_EXPAND_Y) ← (byte) 0
to:initSprites::@return to:initSprites::@return
initSprites::@return: scope:[initSprites] from initSprites::@4 initSprites::@return: scope:[initSprites] from initSprites::@4
[151] return [150] return
to:@return to:@return
initSprites::@2: scope:[initSprites] from initSprites::@1 initSprites::@2: scope:[initSprites] from initSprites::@1
[152] *((byte*) initSprites::sp#2) ← (byte) 0 [151] *((byte*) initSprites::sp#2) ← (byte) 0
[153] (byte*) initSprites::sp#1 ← ++ (byte*) initSprites::sp#2 [152] (byte*) initSprites::sp#1 ← ++ (byte*) initSprites::sp#2
to:initSprites::@1 to:initSprites::@1
(void()) setupRasterIrq((word) setupRasterIrq::raster , (void()*) setupRasterIrq::irqRoutine) (void()) setupRasterIrq((word) setupRasterIrq::raster , (void()*) setupRasterIrq::irqRoutine)
setupRasterIrq: scope:[setupRasterIrq] from main::@10 setupRasterIrq: scope:[setupRasterIrq] from main::@10
asm { sei } asm { sei }
[155] *((const nomodify byte*) PROCPORT_DDR) ← (const nomodify byte) PROCPORT_DDR_MEMORY_MASK [154] *((const nomodify byte*) PROCPORT_DDR) ← (const nomodify byte) PROCPORT_DDR_MEMORY_MASK
[156] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_IO [155] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_IO
[157] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1+(const byte) OFFSET_STRUCT_MOS6526_CIA_INTERRUPT) ← (const nomodify byte) CIA_INTERRUPT_CLEAR [156] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1+(const byte) OFFSET_STRUCT_MOS6526_CIA_INTERRUPT) ← (const nomodify byte) CIA_INTERRUPT_CLEAR
to:setupRasterIrq::@1 to:setupRasterIrq::@1
setupRasterIrq::@1: scope:[setupRasterIrq] from setupRasterIrq setupRasterIrq::@1: scope:[setupRasterIrq] from setupRasterIrq
[158] *((const nomodify byte*) VIC_CONTROL) ← *((const nomodify byte*) VIC_CONTROL) & (byte) $7f [157] *((const nomodify byte*) VIC_CONTROL) ← *((const nomodify byte*) VIC_CONTROL) & (byte) $7f
to:setupRasterIrq::@2 to:setupRasterIrq::@2
setupRasterIrq::@2: scope:[setupRasterIrq] from setupRasterIrq::@1 setupRasterIrq::@2: scope:[setupRasterIrq] from setupRasterIrq::@1
[159] *((const nomodify byte*) RASTER) ← <(const nomodify byte) RASTER_IRQ_TOP [158] *((const nomodify byte*) RASTER) ← <(const nomodify byte) RASTER_IRQ_TOP
[160] *((const nomodify byte*) IRQ_ENABLE) ← (const nomodify byte) IRQ_RASTER [159] *((const nomodify byte*) IRQ_ENABLE) ← (const nomodify byte) IRQ_RASTER
[161] *((const nomodify void()**) HARDWARE_IRQ) ← (const void()*) setupRasterIrq::irqRoutine#0 [160] *((const nomodify void()**) HARDWARE_IRQ) ← (const void()*) setupRasterIrq::irqRoutine#0
asm { cli } asm { cli }
to:setupRasterIrq::@return to:setupRasterIrq::@return
setupRasterIrq::@return: scope:[setupRasterIrq] from setupRasterIrq::@2 setupRasterIrq::@return: scope:[setupRasterIrq] from setupRasterIrq::@2
[163] return [162] return
to:@return to:@return
(struct ProcessingChar()) getCharToProcess() (struct ProcessingChar()) getCharToProcess()
getCharToProcess: scope:[getCharToProcess] from main::@5 getCharToProcess: scope:[getCharToProcess] from main::@5
[164] (byte*) getCharToProcess::screen_line#0 ← (byte*)(void*) SCREEN_COPY#0 [163] (byte*) getCharToProcess::screen_line#0 ← (byte*)(void*) SCREEN_COPY#0
[165] (byte*) getCharToProcess::dist_line#0 ← (byte*)(void*) SCREEN_DIST#0 [164] (byte*) getCharToProcess::dist_line#0 ← (byte*)(void*) SCREEN_DIST#0
to:getCharToProcess::@1 to:getCharToProcess::@1
getCharToProcess::@1: scope:[getCharToProcess] from getCharToProcess getCharToProcess::@9 getCharToProcess::@1: scope:[getCharToProcess] from getCharToProcess getCharToProcess::@9
[166] (byte) getCharToProcess::closest_y#9 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::return_y#1 ) [165] (byte) getCharToProcess::closest_y#9 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::return_y#1 )
[166] (byte) getCharToProcess::closest_x#9 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::return_x#1 ) [165] (byte) getCharToProcess::closest_x#9 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::return_x#1 )
[166] (byte) getCharToProcess::y#7 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::y#1 ) [165] (byte) getCharToProcess::y#7 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::y#1 )
[166] (byte) getCharToProcess::closest_dist#8 ← phi( getCharToProcess/(const nomodify byte) NOT_FOUND getCharToProcess::@9/(byte) getCharToProcess::closest_dist#10 ) [165] (byte) getCharToProcess::closest_dist#8 ← phi( getCharToProcess/(const nomodify byte) NOT_FOUND getCharToProcess::@9/(byte) getCharToProcess::closest_dist#10 )
[166] (byte*) getCharToProcess::dist_line#6 ← phi( getCharToProcess/(byte*) getCharToProcess::dist_line#0 getCharToProcess::@9/(byte*) getCharToProcess::dist_line#1 ) [165] (byte*) getCharToProcess::dist_line#6 ← phi( getCharToProcess/(byte*) getCharToProcess::dist_line#0 getCharToProcess::@9/(byte*) getCharToProcess::dist_line#1 )
[166] (byte*) getCharToProcess::screen_line#4 ← phi( getCharToProcess/(byte*) getCharToProcess::screen_line#0 getCharToProcess::@9/(byte*) getCharToProcess::screen_line#1 ) [165] (byte*) getCharToProcess::screen_line#4 ← phi( getCharToProcess/(byte*) getCharToProcess::screen_line#0 getCharToProcess::@9/(byte*) getCharToProcess::screen_line#1 )
to:getCharToProcess::@2 to:getCharToProcess::@2
getCharToProcess::@2: scope:[getCharToProcess] from getCharToProcess::@1 getCharToProcess::@10 getCharToProcess::@2: scope:[getCharToProcess] from getCharToProcess::@1 getCharToProcess::@10
[167] (byte) getCharToProcess::closest_y#7 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_y#9 getCharToProcess::@10/(byte) getCharToProcess::return_y#1 ) [166] (byte) getCharToProcess::closest_y#7 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_y#9 getCharToProcess::@10/(byte) getCharToProcess::return_y#1 )
[167] (byte) getCharToProcess::closest_x#7 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_x#9 getCharToProcess::@10/(byte) getCharToProcess::return_x#1 ) [166] (byte) getCharToProcess::closest_x#7 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_x#9 getCharToProcess::@10/(byte) getCharToProcess::return_x#1 )
[167] (byte) getCharToProcess::closest_dist#2 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_dist#8 getCharToProcess::@10/(byte) getCharToProcess::closest_dist#12 ) [166] (byte) getCharToProcess::closest_dist#2 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_dist#8 getCharToProcess::@10/(byte) getCharToProcess::closest_dist#12 )
[167] (byte) getCharToProcess::x#2 ← phi( getCharToProcess::@1/(byte) 0 getCharToProcess::@10/(byte) getCharToProcess::x#1 ) [166] (byte) getCharToProcess::x#2 ← phi( getCharToProcess::@1/(byte) 0 getCharToProcess::@10/(byte) getCharToProcess::x#1 )
[168] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11 [167] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11
to:getCharToProcess::@4 to:getCharToProcess::@4
getCharToProcess::@4: scope:[getCharToProcess] from getCharToProcess::@2 getCharToProcess::@4: scope:[getCharToProcess] from getCharToProcess::@2
[169] (byte) getCharToProcess::dist#0 ← *((byte*) getCharToProcess::dist_line#6 + (byte) getCharToProcess::x#2) [168] (byte) getCharToProcess::dist#0 ← *((byte*) getCharToProcess::dist_line#6 + (byte) getCharToProcess::x#2)
[170] if((byte) getCharToProcess::dist#0>=(byte) getCharToProcess::closest_dist#2) goto getCharToProcess::@12 [169] if((byte) getCharToProcess::dist#0>=(byte) getCharToProcess::closest_dist#2) goto getCharToProcess::@12
to:getCharToProcess::@5 to:getCharToProcess::@5
getCharToProcess::@5: scope:[getCharToProcess] from getCharToProcess::@4 getCharToProcess::@5: scope:[getCharToProcess] from getCharToProcess::@4
[171] (byte) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2 [170] (byte) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2
[172] (byte) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7 [171] (byte) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7
to:getCharToProcess::@3 to:getCharToProcess::@3
getCharToProcess::@3: scope:[getCharToProcess] from getCharToProcess::@11 getCharToProcess::@12 getCharToProcess::@5 getCharToProcess::@3: scope:[getCharToProcess] from getCharToProcess::@11 getCharToProcess::@12 getCharToProcess::@5
[173] (byte) getCharToProcess::return_y#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::closest_y#7 getCharToProcess::@12/(byte) getCharToProcess::closest_y#7 getCharToProcess::@5/(byte) getCharToProcess::return_y#7 ) [172] (byte) getCharToProcess::return_y#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::closest_y#7 getCharToProcess::@12/(byte) getCharToProcess::closest_y#7 getCharToProcess::@5/(byte) getCharToProcess::return_y#7 )
[173] (byte) getCharToProcess::return_x#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::closest_x#7 getCharToProcess::@12/(byte) getCharToProcess::closest_x#7 getCharToProcess::@5/(byte) getCharToProcess::return_x#7 ) [172] (byte) getCharToProcess::return_x#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::closest_x#7 getCharToProcess::@12/(byte) getCharToProcess::closest_x#7 getCharToProcess::@5/(byte) getCharToProcess::return_x#7 )
[173] (byte) getCharToProcess::return_dist#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::return_dist#5 getCharToProcess::@12/(byte) getCharToProcess::return_dist#6 getCharToProcess::@5/(byte) getCharToProcess::dist#0 ) [172] (byte) getCharToProcess::return_dist#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::return_dist#5 getCharToProcess::@12/(byte) getCharToProcess::return_dist#6 getCharToProcess::@5/(byte) getCharToProcess::dist#0 )
[174] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2 [173] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2
[175] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10 [174] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10
to:getCharToProcess::@6 to:getCharToProcess::@6
getCharToProcess::@6: scope:[getCharToProcess] from getCharToProcess::@3 getCharToProcess::@6: scope:[getCharToProcess] from getCharToProcess::@3
[176] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28 [175] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28
[177] (byte*) getCharToProcess::dist_line#1 ← (byte*) getCharToProcess::dist_line#6 + (byte) $28 [176] (byte*) getCharToProcess::dist_line#1 ← (byte*) getCharToProcess::dist_line#6 + (byte) $28
[178] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7 [177] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7
[179] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9 [178] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9
to:getCharToProcess::@7 to:getCharToProcess::@7
getCharToProcess::@7: scope:[getCharToProcess] from getCharToProcess::@6 getCharToProcess::@7: scope:[getCharToProcess] from getCharToProcess::@6
[180] if((byte) getCharToProcess::return_dist#1==(const nomodify byte) NOT_FOUND) goto getCharToProcess::@return [179] if((byte) getCharToProcess::return_dist#1==(const nomodify byte) NOT_FOUND) goto getCharToProcess::@return
to:getCharToProcess::@8 to:getCharToProcess::@8
getCharToProcess::@8: scope:[getCharToProcess] from getCharToProcess::@7 getCharToProcess::@8: scope:[getCharToProcess] from getCharToProcess::@7
[181] (word~) getCharToProcess::$11 ← (word)(byte) getCharToProcess::return_y#1 [180] (word~) getCharToProcess::$11 ← (word)(byte) getCharToProcess::return_y#1
[182] (word~) getCharToProcess::$12 ← (word~) getCharToProcess::$11 << (byte) 2 [181] (word~) getCharToProcess::$12 ← (word~) getCharToProcess::$11 << (byte) 2
[183] (word~) getCharToProcess::$13 ← (word~) getCharToProcess::$12 + (word~) getCharToProcess::$11 [182] (word~) getCharToProcess::$13 ← (word~) getCharToProcess::$12 + (word~) getCharToProcess::$11
[184] (word~) getCharToProcess::$8 ← (word~) getCharToProcess::$13 << (byte) 3 [183] (word~) getCharToProcess::$8 ← (word~) getCharToProcess::$13 << (byte) 3
[185] (byte*~) getCharToProcess::$9 ← (byte*)(void*) SCREEN_COPY#0 + (word~) getCharToProcess::$8 [184] (byte*~) getCharToProcess::$9 ← (byte*)(void*) SCREEN_COPY#0 + (word~) getCharToProcess::$8
[186] *((byte*~) getCharToProcess::$9 + (byte) getCharToProcess::return_x#1) ← (byte) ' ' [185] *((byte*~) getCharToProcess::$9 + (byte) getCharToProcess::return_x#1) ← (byte) ' '
to:getCharToProcess::@return to:getCharToProcess::@return
getCharToProcess::@return: scope:[getCharToProcess] from getCharToProcess::@7 getCharToProcess::@8 getCharToProcess::@return: scope:[getCharToProcess] from getCharToProcess::@7 getCharToProcess::@8
[187] return [186] return
to:@return to:@return
getCharToProcess::@9: scope:[getCharToProcess] from getCharToProcess::@6 getCharToProcess::@9: scope:[getCharToProcess] from getCharToProcess::@6
[188] (byte) getCharToProcess::closest_dist#10 ← (byte) getCharToProcess::return_dist#1 [187] (byte) getCharToProcess::closest_dist#10 ← (byte) getCharToProcess::return_dist#1
to:getCharToProcess::@1 to:getCharToProcess::@1
getCharToProcess::@10: scope:[getCharToProcess] from getCharToProcess::@3 getCharToProcess::@10: scope:[getCharToProcess] from getCharToProcess::@3
[189] (byte) getCharToProcess::closest_dist#12 ← (byte) getCharToProcess::return_dist#1 [188] (byte) getCharToProcess::closest_dist#12 ← (byte) getCharToProcess::return_dist#1
to:getCharToProcess::@2 to:getCharToProcess::@2
getCharToProcess::@12: scope:[getCharToProcess] from getCharToProcess::@4 getCharToProcess::@12: scope:[getCharToProcess] from getCharToProcess::@4
[190] (byte) getCharToProcess::return_dist#6 ← (byte) getCharToProcess::closest_dist#2 [189] (byte) getCharToProcess::return_dist#6 ← (byte) getCharToProcess::closest_dist#2
to:getCharToProcess::@3 to:getCharToProcess::@3
getCharToProcess::@11: scope:[getCharToProcess] from getCharToProcess::@2 getCharToProcess::@11: scope:[getCharToProcess] from getCharToProcess::@2
[191] (byte) getCharToProcess::return_dist#5 ← (byte) getCharToProcess::closest_dist#2 [190] (byte) getCharToProcess::return_dist#5 ← (byte) getCharToProcess::closest_dist#2
to:getCharToProcess::@3 to:getCharToProcess::@3
(void()) startProcessing((byte) startProcessing::center_x , (byte) startProcessing::center_y , (byte) startProcessing::center_dist) (void()) startProcessing((byte) startProcessing::center_x , (byte) startProcessing::center_y , (byte) startProcessing::center_dist)
startProcessing: scope:[startProcessing] from main::@6 startProcessing: scope:[startProcessing] from main::@6
[192] phi() [191] phi()
to:startProcessing::@1 to:startProcessing::@1
startProcessing::@1: scope:[startProcessing] from startProcessing startProcessing::@8 startProcessing::@1: scope:[startProcessing] from startProcessing startProcessing::@8
[193] (byte) startProcessing::freeIdx#6 ← phi( startProcessing/(byte) $ff startProcessing::@8/(byte) startProcessing::freeIdx#7 ) [192] (byte) startProcessing::freeIdx#6 ← phi( startProcessing/(byte) $ff startProcessing::@8/(byte) startProcessing::freeIdx#7 )
to:startProcessing::@2 to:startProcessing::@2
startProcessing::@2: scope:[startProcessing] from startProcessing::@1 startProcessing::@3 startProcessing::@2: scope:[startProcessing] from startProcessing::@1 startProcessing::@3
[194] (byte) startProcessing::i#2 ← phi( startProcessing::@1/(byte) 0 startProcessing::@3/(byte) startProcessing::i#1 ) [193] (byte) startProcessing::i#2 ← phi( startProcessing::@1/(byte) 0 startProcessing::@3/(byte) startProcessing::i#1 )
[195] (byte~) startProcessing::$28 ← (byte) startProcessing::i#2 << (byte) 1 [194] (byte~) startProcessing::$28 ← (byte) startProcessing::i#2 << (byte) 1
[196] (byte~) startProcessing::$29 ← (byte~) startProcessing::$28 + (byte) startProcessing::i#2 [195] (byte~) startProcessing::$29 ← (byte~) startProcessing::$28 + (byte) startProcessing::i#2
[197] (byte~) startProcessing::$30 ← (byte~) startProcessing::$29 << (byte) 1 [196] (byte~) startProcessing::$30 ← (byte~) startProcessing::$29 << (byte) 1
[198] (byte~) startProcessing::$31 ← (byte~) startProcessing::$30 + (byte) startProcessing::i#2 [197] (byte~) startProcessing::$31 ← (byte~) startProcessing::$30 + (byte) startProcessing::i#2
[199] (byte~) startProcessing::$21 ← (byte~) startProcessing::$31 << (byte) 1 [198] (byte~) startProcessing::$21 ← (byte~) startProcessing::$31 << (byte) 1
[200] if(*((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$21)!=(const byte) STATUS_FREE) goto startProcessing::@3 [199] if(*((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$21)!=(const byte) STATUS_FREE) goto startProcessing::@3
to:startProcessing::@4 to:startProcessing::@4
startProcessing::@4: scope:[startProcessing] from startProcessing::@2 startProcessing::@9 startProcessing::@4: scope:[startProcessing] from startProcessing::@2 startProcessing::@9
[201] (byte) startProcessing::freeIdx#2 ← phi( startProcessing::@9/(byte) startProcessing::freeIdx#8 startProcessing::@2/(byte) startProcessing::i#2 ) [200] (byte) startProcessing::freeIdx#2 ← phi( startProcessing::@9/(byte) startProcessing::freeIdx#8 startProcessing::@2/(byte) startProcessing::i#2 )
[202] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8 [201] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8
to:startProcessing::@5 to:startProcessing::@5
startProcessing::@5: scope:[startProcessing] from startProcessing::@4 startProcessing::@5: scope:[startProcessing] from startProcessing::@4
[203] (word~) startProcessing::$23 ← (word)(byte) startProcessing::center_y#0 [202] (word~) startProcessing::$23 ← (word)(byte) startProcessing::center_y#0
[204] (word~) startProcessing::$33 ← (word~) startProcessing::$23 << (byte) 2 [203] (word~) startProcessing::$33 ← (word~) startProcessing::$23 << (byte) 2
[205] (word~) startProcessing::$34 ← (word~) startProcessing::$33 + (word~) startProcessing::$23 [204] (word~) startProcessing::$34 ← (word~) startProcessing::$33 + (word~) startProcessing::$23
[206] (word~) startProcessing::$0 ← (word~) startProcessing::$34 << (byte) 3 [205] (word~) startProcessing::$0 ← (word~) startProcessing::$34 << (byte) 3
[207] (word) startProcessing::offset#0 ← (word~) startProcessing::$0 + (byte) startProcessing::center_x#0 [206] (word) startProcessing::offset#0 ← (word~) startProcessing::$0 + (byte) startProcessing::center_x#0
[208] (byte*) startProcessing::colPtr#0 ← (const nomodify byte*) COLS + (word) startProcessing::offset#0 [207] (byte*) startProcessing::colPtr#0 ← (const nomodify byte*) COLS + (word) startProcessing::offset#0
[209] (byte) startProcessing::spriteCol#0 ← *((byte*) startProcessing::colPtr#0) [208] (byte) startProcessing::spriteCol#0 ← *((byte*) startProcessing::colPtr#0)
[210] (byte*) startProcessing::screenPtr#0 ← (const nomodify byte*) SCREEN + (word) startProcessing::offset#0 [209] (byte*) startProcessing::screenPtr#0 ← (const nomodify byte*) SCREEN + (word) startProcessing::offset#0
[211] (word~) startProcessing::$24 ← (word)(byte) startProcessing::freeIdx#2 [210] (word~) startProcessing::$24 ← (word)(byte) startProcessing::freeIdx#2
[212] (word~) startProcessing::$4 ← (word~) startProcessing::$24 << (byte) 6 [211] (word~) startProcessing::$4 ← (word~) startProcessing::$24 << (byte) 6
[213] (byte*) startProcessing::spriteData#0 ← (const nomodify byte*) SPRITE_DATA + (word~) startProcessing::$4 [212] (byte*) startProcessing::spriteData#0 ← (const nomodify byte*) SPRITE_DATA + (word~) startProcessing::$4
[214] (byte) startProcessing::ch#0 ← *((byte*) startProcessing::screenPtr#0) [213] (byte) startProcessing::ch#0 ← *((byte*) startProcessing::screenPtr#0)
[215] (word~) startProcessing::$25 ← (word)(byte) startProcessing::ch#0 [214] (word~) startProcessing::$25 ← (word)(byte) startProcessing::ch#0
[216] (word~) startProcessing::$6 ← (word~) startProcessing::$25 << (byte) 3 [215] (word~) startProcessing::$6 ← (word~) startProcessing::$25 << (byte) 3
[217] (byte*) startProcessing::chargenData#0 ← (const nomodify byte*) CHARGEN + (word~) startProcessing::$6 [216] (byte*) startProcessing::chargenData#0 ← (const nomodify byte*) CHARGEN + (word~) startProcessing::$6
asm { sei } asm { sei }
[219] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_CHARROM [218] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_CHARROM
to:startProcessing::@6 to:startProcessing::@6
startProcessing::@6: scope:[startProcessing] from startProcessing::@5 startProcessing::@6 startProcessing::@6: scope:[startProcessing] from startProcessing::@5 startProcessing::@6
[220] (byte) startProcessing::i1#2 ← phi( startProcessing::@5/(byte) 0 startProcessing::@6/(byte) startProcessing::i1#1 ) [219] (byte) startProcessing::i1#2 ← phi( startProcessing::@5/(byte) 0 startProcessing::@6/(byte) startProcessing::i1#1 )
[220] (byte*) startProcessing::spriteData#2 ← phi( startProcessing::@5/(byte*) startProcessing::spriteData#0 startProcessing::@6/(byte*) startProcessing::spriteData#1 ) [219] (byte*) startProcessing::spriteData#2 ← phi( startProcessing::@5/(byte*) startProcessing::spriteData#0 startProcessing::@6/(byte*) startProcessing::spriteData#1 )
[220] (byte*) startProcessing::chargenData#2 ← phi( startProcessing::@5/(byte*) startProcessing::chargenData#0 startProcessing::@6/(byte*) startProcessing::chargenData#1 ) [219] (byte*) startProcessing::chargenData#2 ← phi( startProcessing::@5/(byte*) startProcessing::chargenData#0 startProcessing::@6/(byte*) startProcessing::chargenData#1 )
[221] *((byte*) startProcessing::spriteData#2) ← *((byte*) startProcessing::chargenData#2) [220] *((byte*) startProcessing::spriteData#2) ← *((byte*) startProcessing::chargenData#2)
[222] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 [221] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3
[223] (byte*) startProcessing::chargenData#1 ← ++ (byte*) startProcessing::chargenData#2 [222] (byte*) startProcessing::chargenData#1 ← ++ (byte*) startProcessing::chargenData#2
[224] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2 [223] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2
[225] if((byte) startProcessing::i1#1!=(byte) 8) goto startProcessing::@6 [224] if((byte) startProcessing::i1#1!=(byte) 8) goto startProcessing::@6
to:startProcessing::@7 to:startProcessing::@7
startProcessing::@7: scope:[startProcessing] from startProcessing::@6 startProcessing::@7: scope:[startProcessing] from startProcessing::@6
[226] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_IO [225] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_IO
asm { cli } asm { cli }
[228] (word~) startProcessing::$26 ← (word)(byte) startProcessing::center_x#0 [227] (word~) startProcessing::$26 ← (word)(byte) startProcessing::center_x#0
[229] (word~) startProcessing::$8 ← (word~) startProcessing::$26 << (byte) 3 [228] (word~) startProcessing::$8 ← (word~) startProcessing::$26 << (byte) 3
[230] (word~) startProcessing::$9 ← (const nomodify byte) BORDER_XPOS_LEFT + (word~) startProcessing::$8 [229] (word~) startProcessing::$9 ← (const nomodify byte) BORDER_XPOS_LEFT + (word~) startProcessing::$8
[231] (word) startProcessing::spriteX#0 ← (word~) startProcessing::$9 << (byte) 4 [230] (word) startProcessing::spriteX#0 ← (word~) startProcessing::$9 << (byte) 4
[232] (word~) startProcessing::$27 ← (word)(byte) startProcessing::center_y#0 [231] (word~) startProcessing::$27 ← (word)(byte) startProcessing::center_y#0
[233] (word~) startProcessing::$11 ← (word~) startProcessing::$27 << (byte) 3 [232] (word~) startProcessing::$11 ← (word~) startProcessing::$27 << (byte) 3
[234] (word~) startProcessing::$12 ← (const nomodify byte) BORDER_YPOS_TOP + (word~) startProcessing::$11 [233] (word~) startProcessing::$12 ← (const nomodify byte) BORDER_YPOS_TOP + (word~) startProcessing::$11
[235] (word) startProcessing::spriteY#0 ← (word~) startProcessing::$12 << (byte) 4 [234] (word) startProcessing::spriteY#0 ← (word~) startProcessing::$12 << (byte) 4
[236] (byte) startProcessing::spritePtr#0 ← (byte)(const nomodify byte*) SPRITE_DATA/(byte) $40 + (byte) startProcessing::freeIdx#2 [235] (byte) startProcessing::spritePtr#0 ← (byte)(const nomodify byte*) SPRITE_DATA/(byte) $40 + (byte) startProcessing::freeIdx#2
[237] (byte~) startProcessing::$15 ← (byte) startProcessing::freeIdx#2 << (byte) 3 [236] (byte~) startProcessing::$15 ← (byte) startProcessing::freeIdx#2 << (byte) 3
[238] (byte~) startProcessing::$36 ← (byte) startProcessing::freeIdx#2 << (byte) 1 [237] (byte~) startProcessing::$36 ← (byte) startProcessing::freeIdx#2 << (byte) 1
[239] (byte~) startProcessing::$37 ← (byte~) startProcessing::$36 + (byte) startProcessing::freeIdx#2 [238] (byte~) startProcessing::$37 ← (byte~) startProcessing::$36 + (byte) startProcessing::freeIdx#2
[240] (byte~) startProcessing::$38 ← (byte~) startProcessing::$37 << (byte) 1 [239] (byte~) startProcessing::$38 ← (byte~) startProcessing::$37 << (byte) 1
[241] (byte~) startProcessing::$39 ← (byte~) startProcessing::$38 + (byte) startProcessing::freeIdx#2 [240] (byte~) startProcessing::$39 ← (byte~) startProcessing::$38 + (byte) startProcessing::freeIdx#2
[242] (byte~) startProcessing::$22 ← (byte~) startProcessing::$39 << (byte) 1 [241] (byte~) startProcessing::$22 ← (byte~) startProcessing::$39 << (byte) 1
[243] *((word*)(const struct ProcessingSprite*) PROCESSING + (byte~) startProcessing::$22) ← (word) startProcessing::spriteX#0 [242] *((word*)(const struct ProcessingSprite*) PROCESSING + (byte~) startProcessing::$22) ← (word) startProcessing::spriteX#0
[244] *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$22) ← (word) startProcessing::spriteY#0 [243] *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$22) ← (word) startProcessing::spriteY#0
[245] *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) startProcessing::$22) ← (word)(byte~) startProcessing::$15 [244] *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) startProcessing::$22) ← (word)(byte~) startProcessing::$15
[246] *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY + (byte~) startProcessing::$22) ← (word) $3c [245] *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY + (byte~) startProcessing::$22) ← (word) $3c
[247] *((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$22) ← (byte) startProcessing::freeIdx#2 [246] *((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$22) ← (byte) startProcessing::freeIdx#2
[248] *((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$22) ← (byte) startProcessing::spritePtr#0 [247] *((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$22) ← (byte) startProcessing::spritePtr#0
[249] *((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL + (byte~) startProcessing::$22) ← (byte) startProcessing::spriteCol#0 [248] *((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL + (byte~) startProcessing::$22) ← (byte) startProcessing::spriteCol#0
[250] *((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$22) ← (const byte) STATUS_NEW [249] *((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$22) ← (const byte) STATUS_NEW
[251] *((byte**)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$22) ← (byte*) startProcessing::screenPtr#0 [250] *((byte**)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$22) ← (byte*) startProcessing::screenPtr#0
to:startProcessing::@return to:startProcessing::@return
startProcessing::@return: scope:[startProcessing] from startProcessing::@7 startProcessing::@return: scope:[startProcessing] from startProcessing::@7
[252] return [251] return
to:@return to:@return
startProcessing::@8: scope:[startProcessing] from startProcessing::@4 startProcessing::@8: scope:[startProcessing] from startProcessing::@4
[253] (byte) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2 [252] (byte) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2
to:startProcessing::@1 to:startProcessing::@1
startProcessing::@3: scope:[startProcessing] from startProcessing::@2 startProcessing::@3: scope:[startProcessing] from startProcessing::@2
[254] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2 [253] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2
[255] if((byte) startProcessing::i#1!=(const nomodify byte) NUM_PROCESSING-(byte) 1+(byte) 1) goto startProcessing::@2 [254] if((byte) startProcessing::i#1!=(const nomodify byte) NUM_PROCESSING-(byte) 1+(byte) 1) goto startProcessing::@2
to:startProcessing::@9 to:startProcessing::@9
startProcessing::@9: scope:[startProcessing] from startProcessing::@3 startProcessing::@9: scope:[startProcessing] from startProcessing::@3
[256] (byte) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6 [255] (byte) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6
to:startProcessing::@4 to:startProcessing::@4
(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y) (word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y)
atan2_16: scope:[atan2_16] from init_angle_screen::@3 atan2_16: scope:[atan2_16] from init_angle_screen::@3
[257] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 [256] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1
to:atan2_16::@2 to:atan2_16::@2
atan2_16::@2: scope:[atan2_16] from atan2_16 atan2_16::@2: scope:[atan2_16] from atan2_16
[258] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 [257] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0
to:atan2_16::@3 to:atan2_16::@3
atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2 atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2
[259] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word) atan2_16::yi#16 atan2_16::@2/(signed word~) atan2_16::$2 ) [258] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word) atan2_16::yi#16 atan2_16::@2/(signed word~) atan2_16::$2 )
[260] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 [259] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
to:atan2_16::@5 to:atan2_16::@5
atan2_16::@5: scope:[atan2_16] from atan2_16::@3 atan2_16::@5: scope:[atan2_16] from atan2_16::@3
[261] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 [260] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0
to:atan2_16::@6 to:atan2_16::@6
atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5
[262] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word) atan2_16::xi#13 atan2_16::@5/(signed word~) atan2_16::$7 ) [261] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word) atan2_16::xi#13 atan2_16::@5/(signed word~) atan2_16::$7 )
to:atan2_16::@10 to:atan2_16::@10
atan2_16::@10: scope:[atan2_16] from atan2_16::@19 atan2_16::@6 atan2_16::@10: scope:[atan2_16] from atan2_16::@19 atan2_16::@6
[263] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(word) 0 ) [262] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(word) 0 )
[263] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 ) [262] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 )
[263] (signed word) atan2_16::xi#3 ← phi( atan2_16::@19/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 ) [262] (signed word) atan2_16::xi#3 ← phi( atan2_16::@19/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 )
[263] (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 ) [262] (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 )
[264] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 [263] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11
to:atan2_16::@12 to:atan2_16::@12
atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@19 atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@19
[265] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 ) [264] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 )
[266] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [265] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1
[267] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 [266] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7
to:atan2_16::@21 to:atan2_16::@21
atan2_16::@21: scope:[atan2_16] from atan2_16::@12 atan2_16::@21: scope:[atan2_16] from atan2_16::@12
[268] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 [267] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1
to:atan2_16::@7 to:atan2_16::@7
atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@21 atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@21
[269] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 ) [268] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 )
[270] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 [269] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8
to:atan2_16::@9 to:atan2_16::@9
atan2_16::@9: scope:[atan2_16] from atan2_16::@7 atan2_16::@9: scope:[atan2_16] from atan2_16::@7
[271] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [270] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11
to:atan2_16::@8 to:atan2_16::@8
atan2_16::@8: scope:[atan2_16] from atan2_16::@7 atan2_16::@9 atan2_16::@8: scope:[atan2_16] from atan2_16::@7 atan2_16::@9
[272] (word) atan2_16::return#0 ← phi( atan2_16::@7/(word) atan2_16::angle#11 atan2_16::@9/(word) atan2_16::angle#5 ) [271] (word) atan2_16::return#0 ← phi( atan2_16::@7/(word) atan2_16::angle#11 atan2_16::@9/(word) atan2_16::angle#5 )
to:atan2_16::@return to:atan2_16::@return
atan2_16::@return: scope:[atan2_16] from atan2_16::@8 atan2_16::@return: scope:[atan2_16] from atan2_16::@8
[273] return [272] return
to:@return to:@return
atan2_16::@11: scope:[atan2_16] from atan2_16::@10 atan2_16::@11: scope:[atan2_16] from atan2_16::@10
[274] (byte) atan2_16::shift#5 ← (byte) atan2_16::i#2 [273] (byte) atan2_16::shift#5 ← (byte) atan2_16::i#2
[275] (signed word) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 [274] (signed word) atan2_16::xd#10 ← (signed word) atan2_16::xi#3
[276] (signed word) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 [275] (signed word) atan2_16::yd#10 ← (signed word) atan2_16::yi#3
to:atan2_16::@13 to:atan2_16::@13
atan2_16::@13: scope:[atan2_16] from atan2_16::@11 atan2_16::@14 atan2_16::@13: scope:[atan2_16] from atan2_16::@11 atan2_16::@14
[277] (signed word) atan2_16::yd#3 ← phi( atan2_16::@11/(signed word) atan2_16::yd#10 atan2_16::@14/(signed word) atan2_16::yd#1 ) [276] (signed word) atan2_16::yd#3 ← phi( atan2_16::@11/(signed word) atan2_16::yd#10 atan2_16::@14/(signed word) atan2_16::yd#1 )
[277] (signed word) atan2_16::xd#3 ← phi( atan2_16::@11/(signed word) atan2_16::xd#10 atan2_16::@14/(signed word) atan2_16::xd#1 ) [276] (signed word) atan2_16::xd#3 ← phi( atan2_16::@11/(signed word) atan2_16::xd#10 atan2_16::@14/(signed word) atan2_16::xd#1 )
[277] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 ) [276] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 )
[278] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 [277] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14
to:atan2_16::@15 to:atan2_16::@15
atan2_16::@15: scope:[atan2_16] from atan2_16::@13 atan2_16::@15: scope:[atan2_16] from atan2_16::@13
[279] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 [278] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17
to:atan2_16::@16 to:atan2_16::@16
atan2_16::@16: scope:[atan2_16] from atan2_16::@15 atan2_16::@16: scope:[atan2_16] from atan2_16::@15
[280] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 [279] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1
[281] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 [280] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1
to:atan2_16::@17 to:atan2_16::@17
atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@16 atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@16
[282] (signed word) atan2_16::xd#5 ← phi( atan2_16::@15/(signed word) atan2_16::xd#3 atan2_16::@16/(signed word) atan2_16::xd#2 ) [281] (signed word) atan2_16::xd#5 ← phi( atan2_16::@15/(signed word) atan2_16::xd#3 atan2_16::@16/(signed word) atan2_16::xd#2 )
[282] (signed word) atan2_16::yd#5 ← phi( atan2_16::@15/(signed word) atan2_16::yd#3 atan2_16::@16/(signed word) atan2_16::yd#2 ) [281] (signed word) atan2_16::yd#5 ← phi( atan2_16::@15/(signed word) atan2_16::yd#3 atan2_16::@16/(signed word) atan2_16::yd#2 )
[283] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 [282] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18
to:atan2_16::@20 to:atan2_16::@20
atan2_16::@20: scope:[atan2_16] from atan2_16::@17 atan2_16::@20: scope:[atan2_16] from atan2_16::@17
[284] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 [283] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5
[285] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 [284] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5
[286] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 [285] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1
[287] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word*) CORDIC_ATAN2_ANGLES_16 + (byte~) atan2_16::$23) [286] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word*) CORDIC_ATAN2_ANGLES_16 + (byte~) atan2_16::$23)
to:atan2_16::@19 to:atan2_16::@19
atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@20 atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@20
[288] (signed word) atan2_16::xi#8 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@20/(signed word) atan2_16::xi#2 ) [287] (signed word) atan2_16::xi#8 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@20/(signed word) atan2_16::xi#2 )
[288] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 ) [287] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 )
[288] (signed word) atan2_16::yi#8 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@20/(signed word) atan2_16::yi#2 ) [287] (signed word) atan2_16::yi#8 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@20/(signed word) atan2_16::yi#2 )
[289] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 [288] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2
[290] if((byte) atan2_16::i#1==(const nomodify byte) CORDIC_ITERATIONS_16-(byte) 1+(byte) 1) goto atan2_16::@12 [289] if((byte) atan2_16::i#1==(const nomodify byte) CORDIC_ITERATIONS_16-(byte) 1+(byte) 1) goto atan2_16::@12
to:atan2_16::@10 to:atan2_16::@10
atan2_16::@18: scope:[atan2_16] from atan2_16::@17 atan2_16::@18: scope:[atan2_16] from atan2_16::@17
[291] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 [290] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5
[292] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 [291] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5
[293] (byte~) atan2_16::$22 ← (byte) atan2_16::i#2 << (byte) 1 [292] (byte~) atan2_16::$22 ← (byte) atan2_16::i#2 << (byte) 1
[294] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word*) CORDIC_ATAN2_ANGLES_16 + (byte~) atan2_16::$22) [293] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word*) CORDIC_ATAN2_ANGLES_16 + (byte~) atan2_16::$22)
to:atan2_16::@19 to:atan2_16::@19
atan2_16::@14: scope:[atan2_16] from atan2_16::@13 atan2_16::@14: scope:[atan2_16] from atan2_16::@13
[295] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 [294] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2
[296] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 [295] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2
[297] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 [296] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2
to:atan2_16::@13 to:atan2_16::@13
atan2_16::@4: scope:[atan2_16] from atan2_16::@3 atan2_16::@4: scope:[atan2_16] from atan2_16::@3
[298] (signed word) atan2_16::xi#13 ← (signed word) atan2_16::x#0 [297] (signed word) atan2_16::xi#13 ← (signed word) atan2_16::x#0
to:atan2_16::@6 to:atan2_16::@6
atan2_16::@1: scope:[atan2_16] from atan2_16 atan2_16::@1: scope:[atan2_16] from atan2_16
[299] (signed word) atan2_16::yi#16 ← (signed word) atan2_16::y#0 [298] (signed word) atan2_16::yi#16 ← (signed word) atan2_16::y#0
to:atan2_16::@3 to:atan2_16::@3

File diff suppressed because it is too large Load Diff

View File

@ -179,7 +179,7 @@
(signed word~) atan2_16::$2 zp[2]:12 200002.0 (signed word~) atan2_16::$2 zp[2]:12 200002.0
(byte~) atan2_16::$22 reg byte a 2.00000002E8 (byte~) atan2_16::$22 reg byte a 2.00000002E8
(byte~) atan2_16::$23 reg byte a 2.00000002E8 (byte~) atan2_16::$23 reg byte a 2.00000002E8
(signed word~) atan2_16::$7 zp[2]:41 200002.0 (signed word~) atan2_16::$7 zp[2]:42 200002.0
(label) atan2_16::@1 (label) atan2_16::@1
(label) atan2_16::@10 (label) atan2_16::@10
(label) atan2_16::@11 (label) atan2_16::@11
@ -203,48 +203,48 @@
(label) atan2_16::@9 (label) atan2_16::@9
(label) atan2_16::@return (label) atan2_16::@return
(word) atan2_16::angle (word) atan2_16::angle
(word) atan2_16::angle#1 angle zp[2]:30 150001.5 (word) atan2_16::angle#1 angle zp[2]:31 150001.5
(word) atan2_16::angle#11 angle zp[2]:30 200002.0 (word) atan2_16::angle#11 angle zp[2]:31 200002.0
(word) atan2_16::angle#12 angle zp[2]:30 1.904761923809524E7 (word) atan2_16::angle#12 angle zp[2]:31 1.904761923809524E7
(word) atan2_16::angle#13 angle zp[2]:30 1.3333333466666667E8 (word) atan2_16::angle#13 angle zp[2]:31 1.3333333466666667E8
(word) atan2_16::angle#2 angle zp[2]:30 2.00000002E8 (word) atan2_16::angle#2 angle zp[2]:31 2.00000002E8
(word) atan2_16::angle#3 angle zp[2]:30 2.00000002E8 (word) atan2_16::angle#3 angle zp[2]:31 2.00000002E8
(word) atan2_16::angle#4 angle zp[2]:30 200002.0 (word) atan2_16::angle#4 angle zp[2]:31 200002.0
(word) atan2_16::angle#5 angle zp[2]:30 200002.0 (word) atan2_16::angle#5 angle zp[2]:31 200002.0
(word) atan2_16::angle#6 angle zp[2]:30 2.00100003E8 (word) atan2_16::angle#6 angle zp[2]:31 2.00100003E8
(byte) atan2_16::i (byte) atan2_16::i
(byte) atan2_16::i#1 reg byte x 1.500000015E8 (byte) atan2_16::i#1 reg byte x 1.500000015E8
(byte) atan2_16::i#2 reg byte x 2.0833333541666668E7 (byte) atan2_16::i#2 reg byte x 2.0833333541666668E7
(word) atan2_16::return (word) atan2_16::return
(word) atan2_16::return#0 return zp[2]:30 70001.0 (word) atan2_16::return#0 return zp[2]:31 70001.0
(word) atan2_16::return#2 return zp[2]:30 20002.0 (word) atan2_16::return#2 return zp[2]:31 20002.0
(byte) atan2_16::shift (byte) atan2_16::shift
(byte) atan2_16::shift#1 reg byte y 2.000000002E9 (byte) atan2_16::shift#1 reg byte y 2.000000002E9
(byte) atan2_16::shift#2 reg byte y 8.0000000125E8 (byte) atan2_16::shift#2 reg byte y 8.0000000125E8
(byte) atan2_16::shift#5 reg byte y 6.6666667333333336E7 (byte) atan2_16::shift#5 reg byte y 6.6666667333333336E7
(signed word) atan2_16::x (signed word) atan2_16::x
(signed word) atan2_16::x#0 x zp[2]:36 10789.605263157895 (signed word) atan2_16::x#0 x zp[2]:37 10789.605263157895
(signed word) atan2_16::xd (signed word) atan2_16::xd
(signed word) atan2_16::xd#1 xd zp[2]:34 6.666666673333334E8 (signed word) atan2_16::xd#1 xd zp[2]:35 6.666666673333334E8
(signed word) atan2_16::xd#10 xd zp[2]:34 1.00000001E8 (signed word) atan2_16::xd#10 xd zp[2]:35 1.00000001E8
(signed word) atan2_16::xd#2 xd zp[2]:34 1.00000001E8 (signed word) atan2_16::xd#2 xd zp[2]:35 1.00000001E8
(signed word) atan2_16::xd#3 xd zp[2]:34 7.666666683333335E8 (signed word) atan2_16::xd#3 xd zp[2]:35 7.666666683333335E8
(signed word) atan2_16::xd#5 xd zp[2]:34 1.00000001E8 (signed word) atan2_16::xd#5 xd zp[2]:35 1.00000001E8
(signed word) atan2_16::xi (signed word) atan2_16::xi
(signed word) atan2_16::xi#0 xi zp[2]:41 300003.0 (signed word) atan2_16::xi#0 xi zp[2]:42 300003.0
(signed word) atan2_16::xi#1 xi zp[2]:41 5.00000005E7 (signed word) atan2_16::xi#1 xi zp[2]:42 5.00000005E7
(signed word) atan2_16::xi#13 xi zp[2]:41 200002.0 (signed word) atan2_16::xi#13 xi zp[2]:42 200002.0
(signed word) atan2_16::xi#2 xi zp[2]:41 5.00000005E7 (signed word) atan2_16::xi#2 xi zp[2]:42 5.00000005E7
(signed word) atan2_16::xi#3 xi zp[2]:41 2.6673333666666668E7 (signed word) atan2_16::xi#3 xi zp[2]:42 2.6673333666666668E7
(signed word) atan2_16::xi#8 xi zp[2]:41 1.00000001E8 (signed word) atan2_16::xi#8 xi zp[2]:42 1.00000001E8
(signed word) atan2_16::y (signed word) atan2_16::y
(signed word) atan2_16::y#0 y zp[2]:39 10250.125 (signed word) atan2_16::y#0 y zp[2]:40 10250.125
(signed word) atan2_16::yd (signed word) atan2_16::yd
(signed word) atan2_16::yd#1 yd zp[2]:32 1.000000001E9 (signed word) atan2_16::yd#1 yd zp[2]:33 1.000000001E9
(signed word) atan2_16::yd#10 yd zp[2]:32 2.00000002E8 (signed word) atan2_16::yd#10 yd zp[2]:33 2.00000002E8
(signed word) atan2_16::yd#2 yd zp[2]:32 2.00000002E8 (signed word) atan2_16::yd#2 yd zp[2]:33 2.00000002E8
(signed word) atan2_16::yd#3 yd zp[2]:32 4.6000000099999994E8 (signed word) atan2_16::yd#3 yd zp[2]:33 4.6000000099999994E8
(signed word) atan2_16::yd#5 yd zp[2]:32 2.00000002E8 (signed word) atan2_16::yd#5 yd zp[2]:33 2.00000002E8
(signed word) atan2_16::yi (signed word) atan2_16::yi
(signed word) atan2_16::yi#0 yi zp[2]:12 60000.600000000006 (signed word) atan2_16::yi#0 yi zp[2]:12 60000.600000000006
(signed word) atan2_16::yi#1 yi zp[2]:12 6.6666667333333336E7 (signed word) atan2_16::yi#1 yi zp[2]:12 6.6666667333333336E7
@ -253,11 +253,11 @@
(signed word) atan2_16::yi#3 yi zp[2]:12 3.53000004117647E7 (signed word) atan2_16::yi#3 yi zp[2]:12 3.53000004117647E7
(signed word) atan2_16::yi#8 yi zp[2]:12 1.00000001E8 (signed word) atan2_16::yi#8 yi zp[2]:12 1.00000001E8
(struct ProcessingChar()) getCharToProcess() (struct ProcessingChar()) getCharToProcess()
(word~) getCharToProcess::$11 zp[2]:41 1501.5 (word~) getCharToProcess::$11 zp[2]:42 1501.5
(word~) getCharToProcess::$12 zp[2]:30 2002.0 (word~) getCharToProcess::$12 zp[2]:31 2002.0
(word~) getCharToProcess::$13 zp[2]:41 2002.0 (word~) getCharToProcess::$13 zp[2]:42 2002.0
(word~) getCharToProcess::$8 zp[2]:41 2002.0 (word~) getCharToProcess::$8 zp[2]:42 2002.0
(byte*~) getCharToProcess::$9 zp[2]:41 2002.0 (byte*~) getCharToProcess::$9 zp[2]:42 2002.0
(label) getCharToProcess::@1 (label) getCharToProcess::@1
(label) getCharToProcess::@10 (label) getCharToProcess::@10
(label) getCharToProcess::@11 (label) getCharToProcess::@11
@ -272,13 +272,13 @@
(label) getCharToProcess::@9 (label) getCharToProcess::@9
(label) getCharToProcess::@return (label) getCharToProcess::@return
(byte) getCharToProcess::closest_dist (byte) getCharToProcess::closest_dist
(byte) getCharToProcess::closest_dist#10 closest_dist zp[1]:38 200002.0 (byte) getCharToProcess::closest_dist#10 closest_dist zp[1]:39 200002.0
(byte) getCharToProcess::closest_dist#12 closest_dist zp[1]:38 2000002.0 (byte) getCharToProcess::closest_dist#12 closest_dist zp[1]:39 2000002.0
(byte) getCharToProcess::closest_dist#2 closest_dist zp[1]:38 1025001.25 (byte) getCharToProcess::closest_dist#2 closest_dist zp[1]:39 1025001.25
(byte) getCharToProcess::closest_dist#8 closest_dist zp[1]:38 200002.0 (byte) getCharToProcess::closest_dist#8 closest_dist zp[1]:39 200002.0
(byte) getCharToProcess::closest_x (byte) getCharToProcess::closest_x
(byte) getCharToProcess::closest_x#7 closest_x zp[1]:43 516667.3333333334 (byte) getCharToProcess::closest_x#7 closest_x zp[1]:44 516667.3333333334
(byte) getCharToProcess::closest_x#9 closest_x zp[1]:43 200002.0 (byte) getCharToProcess::closest_x#9 closest_x zp[1]:44 200002.0
(byte) getCharToProcess::closest_y (byte) getCharToProcess::closest_y
(byte) getCharToProcess::closest_y#7 closest_y zp[1]:9 516667.3333333334 (byte) getCharToProcess::closest_y#7 closest_y zp[1]:9 516667.3333333334
(byte) getCharToProcess::closest_y#9 closest_y zp[1]:9 200002.0 (byte) getCharToProcess::closest_y#9 closest_y zp[1]:9 200002.0
@ -296,8 +296,8 @@
(byte) getCharToProcess::return_dist#6 reg byte x 2000002.0 (byte) getCharToProcess::return_dist#6 reg byte x 2000002.0
(byte) getCharToProcess::return_x (byte) getCharToProcess::return_x
(byte) getCharToProcess::return_x#0 reg byte y 67.33333333333333 (byte) getCharToProcess::return_x#0 reg byte y 67.33333333333333
(byte) getCharToProcess::return_x#1 return_x zp[1]:43 227839.2777777778 (byte) getCharToProcess::return_x#1 return_x zp[1]:44 227839.2777777778
(byte) getCharToProcess::return_x#7 return_x zp[1]:43 1000001.0 (byte) getCharToProcess::return_x#7 return_x zp[1]:44 1000001.0
(byte) getCharToProcess::return_y (byte) getCharToProcess::return_y
(byte) getCharToProcess::return_y#0 reg byte a 67.33333333333333 (byte) getCharToProcess::return_y#0 reg byte a 67.33333333333333
(byte) getCharToProcess::return_y#1 return_y zp[1]:9 215795.05263157893 (byte) getCharToProcess::return_y#1 return_y zp[1]:9 215795.05263157893
@ -333,7 +333,7 @@
(byte~) init_angle_screen::$3 reg byte a 20002.0 (byte~) init_angle_screen::$3 reg byte a 20002.0
(byte~) init_angle_screen::$4 reg byte a 20002.0 (byte~) init_angle_screen::$4 reg byte a 20002.0
(byte~) init_angle_screen::$5 reg byte a 20002.0 (byte~) init_angle_screen::$5 reg byte a 20002.0
(word~) init_angle_screen::$7 zp[2]:30 20002.0 (word~) init_angle_screen::$7 zp[2]:31 20002.0
(byte~) init_angle_screen::$9 reg byte a 20002.0 (byte~) init_angle_screen::$9 reg byte a 20002.0
(label) init_angle_screen::@1 (label) init_angle_screen::@1
(label) init_angle_screen::@2 (label) init_angle_screen::@2
@ -342,9 +342,9 @@
(label) init_angle_screen::@5 (label) init_angle_screen::@5
(label) init_angle_screen::@return (label) init_angle_screen::@return
(byte) init_angle_screen::ang_w (byte) init_angle_screen::ang_w
(byte) init_angle_screen::ang_w#0 ang_w zp[1]:29 8334.166666666666 (byte) init_angle_screen::ang_w#0 ang_w zp[1]:30 8334.166666666666
(word) init_angle_screen::angle_w (word) init_angle_screen::angle_w
(word) init_angle_screen::angle_w#0 angle_w zp[2]:30 20002.0 (word) init_angle_screen::angle_w#0 angle_w zp[2]:31 20002.0
(byte*) init_angle_screen::screen (byte*) init_angle_screen::screen
(byte*) init_angle_screen::screen#0 screen zp[2]:18 106.5 (byte*) init_angle_screen::screen#0 screen zp[2]:18 106.5
(byte*) init_angle_screen::screen_bottomline (byte*) init_angle_screen::screen_bottomline
@ -356,18 +356,18 @@
(byte*) init_angle_screen::screen_topline#1 screen_topline zp[2]:10 500.5 (byte*) init_angle_screen::screen_topline#1 screen_topline zp[2]:10 500.5
(byte*) init_angle_screen::screen_topline#6 screen_topline zp[2]:10 921.0416666666666 (byte*) init_angle_screen::screen_topline#6 screen_topline zp[2]:10 921.0416666666666
(byte) init_angle_screen::x (byte) init_angle_screen::x
(byte) init_angle_screen::x#1 x zp[1]:38 10001.0 (byte) init_angle_screen::x#1 x zp[1]:39 10001.0
(byte) init_angle_screen::x#2 x zp[1]:38 2857.4285714285716 (byte) init_angle_screen::x#2 x zp[1]:39 2857.4285714285716
(byte) init_angle_screen::xb (byte) init_angle_screen::xb
(byte) init_angle_screen::xb#1 xb zp[1]:43 20002.0 (byte) init_angle_screen::xb#1 xb zp[1]:44 20002.0
(byte) init_angle_screen::xb#2 xb zp[1]:43 1818.3636363636363 (byte) init_angle_screen::xb#2 xb zp[1]:44 1818.3636363636363
(signed word) init_angle_screen::xw (signed word) init_angle_screen::xw
(word) init_angle_screen::xw#0 xw zp[2]:36 3333.6666666666665 (word) init_angle_screen::xw#0 xw zp[2]:37 3333.6666666666665
(byte) init_angle_screen::y (byte) init_angle_screen::y
(byte) init_angle_screen::y#1 y zp[1]:20 1501.5 (byte) init_angle_screen::y#1 y zp[1]:20 1501.5
(byte) init_angle_screen::y#5 y zp[1]:20 461.65384615384613 (byte) init_angle_screen::y#5 y zp[1]:20 461.65384615384613
(signed word) init_angle_screen::yw (signed word) init_angle_screen::yw
(word) init_angle_screen::yw#0 yw zp[2]:39 5000.5 (word) init_angle_screen::yw#0 yw zp[2]:40 5000.5
interrupt(HARDWARE_ALL)(void()) irqBottom() interrupt(HARDWARE_ALL)(void()) irqBottom()
(label) irqBottom::@1 (label) irqBottom::@1
(label) irqBottom::@2 (label) irqBottom::@2
@ -419,16 +419,15 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(word) malloc::size (word) malloc::size
(void()) processChars() (void()) processChars()
(byte~) processChars::$10 reg byte a 202.0 (byte~) processChars::$10 reg byte a 202.0
(word~) processChars::$12 zp[2]:26 101.0 (word~) processChars::$12 zp[2]:27 101.0
(byte~) processChars::$13 reg byte x 75.75 (byte~) processChars::$13 zp[1]:21 17.565217391304348
(word~) processChars::$21 zp[2]:24 101.0 (word~) processChars::$21 zp[2]:25 101.0
(byte~) processChars::$25 reg byte a 202.0 (byte~) processChars::$25 reg byte a 202.0
(byte~) processChars::$28 reg byte a 202.0 (byte~) processChars::$28 reg byte a 202.0
(byte~) processChars::$29 reg byte a 202.0 (byte~) processChars::$29 reg byte a 202.0
(byte~) processChars::$30 reg byte a 202.0 (byte~) processChars::$30 reg byte a 202.0
(byte~) processChars::$73 reg byte a 202.0 (byte~) processChars::$73 reg byte a 202.0
(byte~) processChars::$79 reg byte a 202.0 (byte~) processChars::$79 reg byte a 202.0
(byte~) processChars::$86 reg byte a 202.0
(byte~) processChars::$87 reg byte a 202.0 (byte~) processChars::$87 reg byte a 202.0
(byte~) processChars::$88 reg byte a 202.0 (byte~) processChars::$88 reg byte a 202.0
(byte~) processChars::$89 reg byte a 202.0 (byte~) processChars::$89 reg byte a 202.0
@ -449,24 +448,24 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(label) processChars::@9 (label) processChars::@9
(label) processChars::@return (label) processChars::@return
(byte) processChars::bitmask (byte) processChars::bitmask
(byte) processChars::bitmask#0 bitmask zp[1]:23 21.041666666666664 (byte) processChars::bitmask#0 bitmask zp[1]:24 21.956521739130434
(byte) processChars::i (byte) processChars::i
(byte) processChars::i#1 i zp[1]:7 151.5 (byte) processChars::i#1 i zp[1]:7 151.5
(byte) processChars::i#10 i zp[1]:7 13.17391304347826 (byte) processChars::i#10 i zp[1]:7 11.222222222222221
(byte) processChars::numActive (byte) processChars::numActive
(byte) processChars::numActive#1 numActive zp[1]:8 202.0 (byte) processChars::numActive#1 numActive zp[1]:8 202.0
(byte) processChars::numActive#10 numActive zp[1]:8 6.886363636363637 (byte) processChars::numActive#10 numActive zp[1]:8 7.046511627906977
(byte) processChars::numActive#3 numActive zp[1]:8 101.0 (byte) processChars::numActive#3 numActive zp[1]:8 101.0
(struct ProcessingSprite*) processChars::processing (struct ProcessingSprite*) processChars::processing
(struct ProcessingSprite*) processChars::processing#0 processing zp[2]:21 2.9705882352941178 (struct ProcessingSprite*) processChars::processing#0 processing zp[2]:22 3.0606060606060606
(byte) processChars::xchar (byte) processChars::xchar
(byte) processChars::xchar#0 reg byte a 202.0 (byte) processChars::xchar#0 reg byte a 202.0
(word) processChars::xpos (word) processChars::xpos
(word) processChars::xpos#0 xpos zp[2]:24 20.2 (word) processChars::xpos#0 xpos zp[2]:25 21.642857142857142
(byte) processChars::ychar (byte) processChars::ychar
(byte) processChars::ychar#0 reg byte a 202.0 (byte) processChars::ychar#0 reg byte a 202.0
(byte) processChars::ypos (byte) processChars::ypos
(byte) processChars::ypos#0 ypos zp[1]:28 25.25 (byte) processChars::ypos#0 ypos zp[1]:29 25.25
(void()) setupRasterIrq((word) setupRasterIrq::raster , (void()*) setupRasterIrq::irqRoutine) (void()) setupRasterIrq((word) setupRasterIrq::raster , (void()*) setupRasterIrq::irqRoutine)
(label) setupRasterIrq::@1 (label) setupRasterIrq::@1
(label) setupRasterIrq::@2 (label) setupRasterIrq::@2
@ -475,31 +474,31 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(const void()*) setupRasterIrq::irqRoutine#0 irqRoutine = &interrupt(HARDWARE_ALL)(void()) irqTop() (const void()*) setupRasterIrq::irqRoutine#0 irqRoutine = &interrupt(HARDWARE_ALL)(void()) irqTop()
(word) setupRasterIrq::raster (word) setupRasterIrq::raster
(void()) startProcessing((byte) startProcessing::center_x , (byte) startProcessing::center_y , (byte) startProcessing::center_dist) (void()) startProcessing((byte) startProcessing::center_x , (byte) startProcessing::center_y , (byte) startProcessing::center_dist)
(word~) startProcessing::$0 zp[2]:32 2002.0 (word~) startProcessing::$0 zp[2]:33 2002.0
(word~) startProcessing::$11 zp[2]:41 2002.0 (word~) startProcessing::$11 zp[2]:42 2002.0
(word~) startProcessing::$12 zp[2]:41 2002.0 (word~) startProcessing::$12 zp[2]:42 2002.0
(byte~) startProcessing::$15 reg byte y 125.125 (byte~) startProcessing::$15 reg byte y 125.125
(byte~) startProcessing::$21 reg byte a 2000002.0 (byte~) startProcessing::$21 reg byte a 2000002.0
(byte~) startProcessing::$22 reg byte x 1112.222222222222 (byte~) startProcessing::$22 reg byte x 1112.222222222222
(word~) startProcessing::$23 zp[2]:32 1501.5 (word~) startProcessing::$23 zp[2]:33 1501.5
(word~) startProcessing::$24 zp[2]:12 2002.0 (word~) startProcessing::$24 zp[2]:12 2002.0
(word~) startProcessing::$25 zp[2]:10 2002.0 (word~) startProcessing::$25 zp[2]:10 2002.0
(word~) startProcessing::$26 zp[2]:39 2002.0 (word~) startProcessing::$26 zp[2]:40 2002.0
(word~) startProcessing::$27 zp[2]:41 2002.0 (word~) startProcessing::$27 zp[2]:42 2002.0
(byte~) startProcessing::$28 reg byte a 2000002.0 (byte~) startProcessing::$28 reg byte a 2000002.0
(byte~) startProcessing::$29 reg byte a 2000002.0 (byte~) startProcessing::$29 reg byte a 2000002.0
(byte~) startProcessing::$30 reg byte a 2000002.0 (byte~) startProcessing::$30 reg byte a 2000002.0
(byte~) startProcessing::$31 reg byte a 2000002.0 (byte~) startProcessing::$31 reg byte a 2000002.0
(word~) startProcessing::$33 zp[2]:34 2002.0 (word~) startProcessing::$33 zp[2]:35 2002.0
(word~) startProcessing::$34 zp[2]:32 2002.0 (word~) startProcessing::$34 zp[2]:33 2002.0
(byte~) startProcessing::$36 reg byte a 2002.0 (byte~) startProcessing::$36 reg byte a 2002.0
(byte~) startProcessing::$37 reg byte a 2002.0 (byte~) startProcessing::$37 reg byte a 2002.0
(byte~) startProcessing::$38 reg byte a 2002.0 (byte~) startProcessing::$38 reg byte a 2002.0
(byte~) startProcessing::$39 reg byte a 2002.0 (byte~) startProcessing::$39 reg byte a 2002.0
(word~) startProcessing::$4 zp[2]:12 2002.0 (word~) startProcessing::$4 zp[2]:12 2002.0
(word~) startProcessing::$6 zp[2]:10 2002.0 (word~) startProcessing::$6 zp[2]:10 2002.0
(word~) startProcessing::$8 zp[2]:39 2002.0 (word~) startProcessing::$8 zp[2]:40 2002.0
(word~) startProcessing::$9 zp[2]:39 2002.0 (word~) startProcessing::$9 zp[2]:40 2002.0
(label) startProcessing::@1 (label) startProcessing::@1
(label) startProcessing::@2 (label) startProcessing::@2
(label) startProcessing::@3 (label) startProcessing::@3
@ -513,7 +512,7 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(struct ProcessingChar) startProcessing::center (struct ProcessingChar) startProcessing::center
(byte) startProcessing::center_dist (byte) startProcessing::center_dist
(byte) startProcessing::center_x (byte) startProcessing::center_x
(byte) startProcessing::center_x#0 center_x zp[1]:29 26.238095238095237 (byte) startProcessing::center_x#0 center_x zp[1]:30 26.238095238095237
(byte) startProcessing::center_y (byte) startProcessing::center_y
(byte) startProcessing::center_y#0 center_y zp[1]:20 2.2444444444444445 (byte) startProcessing::center_y#0 center_y zp[1]:20 2.2444444444444445
(byte) startProcessing::ch (byte) startProcessing::ch
@ -523,7 +522,7 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(byte*) startProcessing::chargenData#1 chargenData zp[2]:10 66667.33333333333 (byte*) startProcessing::chargenData#1 chargenData zp[2]:10 66667.33333333333
(byte*) startProcessing::chargenData#2 chargenData zp[2]:10 100334.66666666666 (byte*) startProcessing::chargenData#2 chargenData zp[2]:10 100334.66666666666
(byte*) startProcessing::colPtr (byte*) startProcessing::colPtr
(byte*) startProcessing::colPtr#0 colPtr zp[2]:36 2002.0 (byte*) startProcessing::colPtr#0 colPtr zp[2]:37 2002.0
(byte) startProcessing::freeIdx (byte) startProcessing::freeIdx
(byte) startProcessing::freeIdx#2 freeIdx zp[1]:9 28391.52173913043 (byte) startProcessing::freeIdx#2 freeIdx zp[1]:9 28391.52173913043
(byte) startProcessing::freeIdx#6 reg byte x 20000.2 (byte) startProcessing::freeIdx#6 reg byte x 20000.2
@ -536,22 +535,22 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(byte) startProcessing::i1#1 reg byte x 150001.5 (byte) startProcessing::i1#1 reg byte x 150001.5
(byte) startProcessing::i1#2 reg byte x 50000.5 (byte) startProcessing::i1#2 reg byte x 50000.5
(word) startProcessing::offset (word) startProcessing::offset
(word) startProcessing::offset#0 offset zp[2]:32 1001.0 (word) startProcessing::offset#0 offset zp[2]:33 1001.0
(byte*) startProcessing::screenPtr (byte*) startProcessing::screenPtr
(byte*) startProcessing::screenPtr#0 screenPtr zp[2]:32 73.2439024390244 (byte*) startProcessing::screenPtr#0 screenPtr zp[2]:33 73.2439024390244
(byte) startProcessing::spriteCol (byte) startProcessing::spriteCol
(byte) startProcessing::spriteCol#0 spriteCol zp[1]:38 50.05 (byte) startProcessing::spriteCol#0 spriteCol zp[1]:39 50.05
(byte*) startProcessing::spriteData (byte*) startProcessing::spriteData
(byte*) startProcessing::spriteData#0 spriteData zp[2]:12 286.0 (byte*) startProcessing::spriteData#0 spriteData zp[2]:12 286.0
(byte*) startProcessing::spriteData#1 spriteData zp[2]:12 50000.5 (byte*) startProcessing::spriteData#1 spriteData zp[2]:12 50000.5
(byte*) startProcessing::spriteData#2 spriteData zp[2]:12 150502.0 (byte*) startProcessing::spriteData#2 spriteData zp[2]:12 150502.0
(byte) startProcessing::spriteIdx (byte) startProcessing::spriteIdx
(byte) startProcessing::spritePtr (byte) startProcessing::spritePtr
(byte) startProcessing::spritePtr#0 spritePtr zp[1]:43 166.83333333333334 (byte) startProcessing::spritePtr#0 spritePtr zp[1]:44 166.83333333333334
(word) startProcessing::spriteX (word) startProcessing::spriteX
(word) startProcessing::spriteX#0 spriteX zp[2]:39 166.83333333333334 (word) startProcessing::spriteX#0 spriteX zp[2]:40 166.83333333333334
(word) startProcessing::spriteY (word) startProcessing::spriteY
(word) startProcessing::spriteY#0 spriteY zp[2]:41 222.44444444444446 (word) startProcessing::spriteY#0 spriteY zp[2]:42 222.44444444444446
zp[2]:2 [ heap_head#6 heap_head#0 ] zp[2]:2 [ heap_head#6 heap_head#0 ]
zp[2]:4 [ main::dst#2 main::dst#0 main::dst#1 ] zp[2]:4 [ main::dst#2 main::dst#0 main::dst#1 ]
@ -582,19 +581,18 @@ reg byte x [ getCharToProcess::return_dist#0 ]
reg byte y [ main::center_x#0 ] reg byte y [ main::center_x#0 ]
zp[1]:20 [ main::center_y#0 startProcessing::center_y#0 getCharToProcess::y#7 getCharToProcess::y#1 init_angle_screen::y#5 init_angle_screen::y#1 ] zp[1]:20 [ main::center_y#0 startProcessing::center_y#0 getCharToProcess::y#7 getCharToProcess::y#1 init_angle_screen::y#5 init_angle_screen::y#1 ]
reg byte a [ main::center_dist#0 ] reg byte a [ main::center_dist#0 ]
reg byte a [ processChars::$86 ] zp[1]:21 [ processChars::$13 ]
reg byte a [ processChars::$87 ] reg byte a [ processChars::$87 ]
reg byte a [ processChars::$88 ] reg byte a [ processChars::$88 ]
reg byte a [ processChars::$89 ] reg byte a [ processChars::$89 ]
reg byte a [ processChars::$28 ] reg byte a [ processChars::$28 ]
zp[2]:21 [ processChars::processing#0 ] zp[2]:22 [ processChars::processing#0 ]
zp[1]:23 [ processChars::bitmask#0 ] zp[1]:24 [ processChars::bitmask#0 ]
zp[2]:24 [ processChars::xpos#0 processChars::$21 ] zp[2]:25 [ processChars::xpos#0 processChars::$21 ]
reg byte a [ processChars::$9 ] reg byte a [ processChars::$9 ]
reg byte a [ processChars::$10 ] reg byte a [ processChars::$10 ]
reg byte x [ processChars::$13 ] zp[2]:27 [ processChars::$12 ]
zp[2]:26 [ processChars::$12 ] zp[1]:29 [ processChars::ypos#0 ]
zp[1]:28 [ processChars::ypos#0 ]
reg byte a [ processChars::$73 ] reg byte a [ processChars::$73 ]
reg byte a [ processChars::xchar#0 ] reg byte a [ processChars::xchar#0 ]
reg byte a [ processChars::$29 ] reg byte a [ processChars::$29 ]
@ -605,24 +603,24 @@ reg byte a [ processChars::$25 ]
reg byte a [ init_angle_screen::$3 ] reg byte a [ init_angle_screen::$3 ]
reg byte a [ init_angle_screen::$4 ] reg byte a [ init_angle_screen::$4 ]
reg byte a [ init_angle_screen::$5 ] reg byte a [ init_angle_screen::$5 ]
zp[1]:29 [ init_angle_screen::ang_w#0 startProcessing::center_x#0 ] zp[1]:30 [ init_angle_screen::ang_w#0 startProcessing::center_x#0 ]
reg byte a [ init_angle_screen::$9 ] reg byte a [ init_angle_screen::$9 ]
reg byte a [ init_angle_screen::$10 ] reg byte a [ init_angle_screen::$10 ]
reg byte a [ init_angle_screen::$11 ] reg byte a [ init_angle_screen::$11 ]
zp[2]:30 [ getCharToProcess::$12 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$7 ] zp[2]:31 [ getCharToProcess::$12 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$7 ]
reg byte a [ startProcessing::$28 ] reg byte a [ startProcessing::$28 ]
reg byte a [ startProcessing::$29 ] reg byte a [ startProcessing::$29 ]
reg byte a [ startProcessing::$30 ] reg byte a [ startProcessing::$30 ]
reg byte a [ startProcessing::$31 ] reg byte a [ startProcessing::$31 ]
reg byte a [ startProcessing::$21 ] reg byte a [ startProcessing::$21 ]
zp[2]:32 [ startProcessing::$23 startProcessing::$34 startProcessing::$0 startProcessing::offset#0 startProcessing::screenPtr#0 atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] zp[2]:33 [ startProcessing::$23 startProcessing::$34 startProcessing::$0 startProcessing::offset#0 startProcessing::screenPtr#0 atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ]
zp[2]:34 [ startProcessing::$33 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] zp[2]:35 [ startProcessing::$33 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ]
zp[2]:36 [ startProcessing::colPtr#0 init_angle_screen::xw#0 atan2_16::x#0 ] zp[2]:37 [ startProcessing::colPtr#0 init_angle_screen::xw#0 atan2_16::x#0 ]
zp[1]:38 [ startProcessing::spriteCol#0 getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 init_angle_screen::x#2 init_angle_screen::x#1 ] zp[1]:39 [ startProcessing::spriteCol#0 getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 init_angle_screen::x#2 init_angle_screen::x#1 ]
reg byte a [ startProcessing::ch#0 ] reg byte a [ startProcessing::ch#0 ]
zp[2]:39 [ startProcessing::$26 startProcessing::$8 startProcessing::$9 startProcessing::spriteX#0 init_angle_screen::yw#0 atan2_16::y#0 ] zp[2]:40 [ startProcessing::$26 startProcessing::$8 startProcessing::$9 startProcessing::spriteX#0 init_angle_screen::yw#0 atan2_16::y#0 ]
zp[2]:41 [ startProcessing::$27 startProcessing::$11 startProcessing::$12 startProcessing::spriteY#0 getCharToProcess::$11 getCharToProcess::$13 getCharToProcess::$8 getCharToProcess::$9 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] zp[2]:42 [ startProcessing::$27 startProcessing::$11 startProcessing::$12 startProcessing::spriteY#0 getCharToProcess::$11 getCharToProcess::$13 getCharToProcess::$8 getCharToProcess::$9 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ]
zp[1]:43 [ startProcessing::spritePtr#0 getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 init_angle_screen::xb#2 init_angle_screen::xb#1 ] zp[1]:44 [ startProcessing::spritePtr#0 getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 init_angle_screen::xb#2 init_angle_screen::xb#1 ]
reg byte y [ startProcessing::$15 ] reg byte y [ startProcessing::$15 ]
reg byte a [ startProcessing::$36 ] reg byte a [ startProcessing::$36 ]
reg byte a [ startProcessing::$37 ] reg byte a [ startProcessing::$37 ]

View File

@ -124,7 +124,6 @@ main: {
.label __9 = $19 .label __9 = $19
.label __10 = $19 .label __10 = $19
.label __11 = $19 .label __11 = $19
.label __12 = $1b
.label __20 = $c .label __20 = $c
.label __23 = $e .label __23 = $e
.label __25 = $10 .label __25 = $10
@ -369,11 +368,6 @@ main: {
bcs __b9 bcs __b9
!: !:
// balls[i].x_velocity ^= 0xFFFF // balls[i].x_velocity ^= 0xFFFF
lda.z i
asl
asl
asl
tay
lda balls+4,y lda balls+4,y
eor #<$ffff eor #<$ffff
sta balls+4,y sta balls+4,y
@ -382,11 +376,6 @@ main: {
sta balls+4+1,y sta balls+4+1,y
__b9: __b9:
// balls[i].y_position >> 8 // balls[i].y_position >> 8
lda.z i
asl
asl
asl
tay
lda #0 lda #0
sta.z __23+1 sta.z __23+1
lda balls+2+1,y lda balls+2+1,y
@ -413,11 +402,6 @@ main: {
bcs __b10 bcs __b10
!: !:
// balls[i].y_velocity ^= 0xFFFF // balls[i].y_velocity ^= 0xFFFF
lda.z i
asl
asl
asl
tay
lda balls+6,y lda balls+6,y
eor #<$ffff eor #<$ffff
sta balls+6,y sta balls+6,y
@ -442,11 +426,6 @@ main: {
sta balls+2+1,y sta balls+2+1,y
__b10: __b10:
// balls[i].y_position >> 8 // balls[i].y_position >> 8
lda.z i
asl
asl
asl
tay
lda #0 lda #0
sta.z __32+1 sta.z __32+1
lda balls+2+1,y lda balls+2+1,y
@ -506,14 +485,7 @@ main: {
// rand() & 0x0FF // rand() & 0x0FF
lda #$ff lda #$ff
and.z __11 and.z __11
sta.z __12
// balls[i].y_velocity = rand() & 0x0FF // balls[i].y_velocity = rand() & 0x0FF
txa
asl
asl
asl
tay
lda.z __12
sta balls+6,y sta balls+6,y
lda #0 lda #0
sta balls+6+1,y sta balls+6+1,y
@ -618,9 +590,9 @@ ppuDataFill: {
// Information https://en.wikipedia.org/wiki/Xorshift // Information https://en.wikipedia.org/wiki/Xorshift
// Source http://www.retroprogramming.com/2017/07/xorshift-pseudorandom-numbers-in-z80.html // Source http://www.retroprogramming.com/2017/07/xorshift-pseudorandom-numbers-in-z80.html
rand: { rand: {
.label __0 = $1c .label __0 = $1b
.label __1 = $1e .label __1 = $1d
.label __2 = $20 .label __2 = $1f
.label return = $19 .label return = $19
// rand_state << 7 // rand_state << 7
lda.z rand_state+1 lda.z rand_state+1

View File

@ -149,140 +149,135 @@ main::@14: scope:[main] from main::@13
[68] *((byte*) 8193) ← (byte) $18 [68] *((byte*) 8193) ← (byte) $18
to:main::@3 to:main::@3
main::@7: scope:[main] from main::@6 main::@7: scope:[main] from main::@6
[69] (byte~) main::$40 ← (byte) main::i#10 << (byte) 3 [69] (byte~) main::$44 ← (byte) main::i#10 << (byte) 3
[70] *((word*)(const struct $0*) balls + (byte~) main::$40) ← *((word*)(const struct $0*) balls + (byte~) main::$40) + *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$40) [70] *((word*)(const struct $0*) balls + (byte~) main::$44) ← *((word*)(const struct $0*) balls + (byte~) main::$44) + *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$44)
[71] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) ← *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) + (byte) $10 [71] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$44) ← *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$44) + (byte) $10
[72] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$40) ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$40) + *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) [72] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$44) ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$44) + *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$44)
[73] (word~) main::$20 ← *((word*)(const struct $0*) balls + (byte~) main::$40) >> (byte) 8 [73] (word~) main::$20 ← *((word*)(const struct $0*) balls + (byte~) main::$44) >> (byte) 8
[74] if((word~) main::$20>=(byte) 8) goto main::@9 [74] if((word~) main::$20>=(byte) 8) goto main::@9
to:main::@11 to:main::@11
main::@11: scope:[main] from main::@7 main::@11: scope:[main] from main::@7
[75] (byte~) main::$45 ← (byte) main::i#10 << (byte) 3 [75] *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$44) ← *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$44) ^ (word) $ffff
[76] *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$45) ← *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$45) ^ (word) $ffff
to:main::@9 to:main::@9
main::@9: scope:[main] from main::@11 main::@7 main::@9: scope:[main] from main::@11 main::@7
[77] (byte~) main::$44 ← (byte) main::i#10 << (byte) 3 [76] (word~) main::$23 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$44) >> (byte) 8
[78] (word~) main::$23 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$44) >> (byte) 8 [77] (word~) main::$25 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$44) >> (byte) 8
[79] (word~) main::$25 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$44) >> (byte) 8 [78] (byte~) main::$26 ← (byte) main::h_bar#1 + (byte) 8
[80] (byte~) main::$26 ← (byte) main::h_bar#1 + (byte) 8 [79] if((word~) main::$23<(byte) main::h_bar#1) goto main::@10
[81] if((word~) main::$23<(byte) main::h_bar#1) goto main::@10
to:main::@24 to:main::@24
main::@24: scope:[main] from main::@9 main::@24: scope:[main] from main::@9
[82] if((word~) main::$25>=(byte~) main::$26) goto main::@10 [80] if((word~) main::$25>=(byte~) main::$26) goto main::@10
to:main::@12 to:main::@12
main::@12: scope:[main] from main::@24 main::@12: scope:[main] from main::@24
[83] (byte~) main::$53 ← (byte) main::i#10 << (byte) 3 [81] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$44) ← *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$44) ^ (word) $ffff
[84] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$53) ← *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$53) ^ (word) $ffff [82] (byte~) main::$30 ← (byte) main::h_bar#1 - (byte) 2
[85] (byte~) main::$30 ← (byte) main::h_bar#1 - (byte) 2 [83] (word~) main::$56 ← (word)(byte~) main::$30
[86] (word~) main::$56 ← (word)(byte~) main::$30 [84] (word~) main::$31 ← (word~) main::$56 << (byte) 8
[87] (word~) main::$31 ← (word~) main::$56 << (byte) 8 [85] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$44) ← (word~) main::$31
[88] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$53) ← (word~) main::$31
to:main::@10 to:main::@10
main::@10: scope:[main] from main::@12 main::@24 main::@9 main::@10: scope:[main] from main::@12 main::@24 main::@9
[89] (byte~) main::$50 ← (byte) main::i#10 << (byte) 3 [86] (word~) main::$32 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$44) >> (byte) 8
[90] (word~) main::$32 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$50) >> (byte) 8 [87] (byte~) main::$48 ← (byte) main::sprite_idx#3 << (byte) 2
[91] (byte~) main::$48 ← (byte) main::sprite_idx#3 << (byte) 2 [88] *((byte*)(const struct SpriteData*) SPRITE_BUFFER + (byte~) main::$48) ← (byte)(word~) main::$32
[92] *((byte*)(const struct SpriteData*) SPRITE_BUFFER + (byte~) main::$48) ← (byte)(word~) main::$32 [89] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_TILE + (byte~) main::$48) ← (byte) $a
[93] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_TILE + (byte~) main::$48) ← (byte) $a [90] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_ATTRIBUTES + (byte~) main::$48) ← (byte) 3
[94] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_ATTRIBUTES + (byte~) main::$48) ← (byte) 3 [91] (word~) main::$33 ← *((word*)(const struct $0*) balls + (byte~) main::$44) >> (byte) 8
[95] (word~) main::$33 ← *((word*)(const struct $0*) balls + (byte~) main::$50) >> (byte) 8 [92] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_X + (byte~) main::$48) ← (byte)(word~) main::$33
[96] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_X + (byte~) main::$48) ← (byte)(word~) main::$33 [93] (byte) main::sprite_idx#2 ← ++ (byte) main::sprite_idx#3
[97] (byte) main::sprite_idx#2 ← ++ (byte) main::sprite_idx#3 [94] (byte) main::i#4 ← ++ (byte) main::i#10
[98] (byte) main::i#4 ← ++ (byte) main::i#10
to:main::@6 to:main::@6
main::@25: scope:[main] from main::@15 main::@25: scope:[main] from main::@15
[99] (byte) main::timer#21 ← (byte) main::timer#1 [95] (byte) main::timer#21 ← (byte) main::timer#1
to:main::@5 to:main::@5
main::@2: scope:[main] from main::@1 main::@2: scope:[main] from main::@1
[100] phi() [96] phi()
[101] call rand [97] call rand
[102] (word) rand::return#2 ← (word) rand::return#0 [98] (word) rand::return#2 ← (word) rand::return#0
to:main::@22 to:main::@22
main::@22: scope:[main] from main::@2 main::@22: scope:[main] from main::@2
[103] (word~) main::$9 ← (word) rand::return#2 [99] (word~) main::$9 ← (word) rand::return#2
[104] (word~) main::$10 ← (word~) main::$9 & (word) $3ff [100] (word~) main::$10 ← (word~) main::$9 & (word) $3ff
[105] (byte~) main::$35 ← (byte) main::i#14 << (byte) 3 [101] (byte~) main::$36 ← (byte) main::i#14 << (byte) 3
[106] *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$35) ← (word~) main::$10 [102] *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$36) ← (word~) main::$10
[107] call rand [103] call rand
[108] (word) rand::return#3 ← (word) rand::return#0 [104] (word) rand::return#3 ← (word) rand::return#0
to:main::@23 to:main::@23
main::@23: scope:[main] from main::@22 main::@23: scope:[main] from main::@22
[109] (word~) main::$11 ← (word) rand::return#3 [105] (word~) main::$11 ← (word) rand::return#3
[110] (byte~) main::$12 ← (word~) main::$11 & (byte) $ff [106] (byte~) main::$12 ← (word~) main::$11 & (byte) $ff
[111] (byte~) main::$36 ← (byte) main::i#14 << (byte) 3 [107] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$36) ← (byte~) main::$12
[112] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$36) ← (byte~) main::$12 [108] (byte) main::i#2 ← ++ (byte) main::i#14
[113] (byte) main::i#2 ← ++ (byte) main::i#14
to:main::@1 to:main::@1
(void()) ppuDataTransfer((nomodify void*) ppuDataTransfer::ppuData , (nomodify void*) ppuDataTransfer::cpuData , (word) ppuDataTransfer::size) (void()) ppuDataTransfer((nomodify void*) ppuDataTransfer::ppuData , (nomodify void*) ppuDataTransfer::cpuData , (word) ppuDataTransfer::size)
ppuDataTransfer: scope:[ppuDataTransfer] from main::@17 main::@21 ppuDataTransfer: scope:[ppuDataTransfer] from main::@17 main::@21
[114] (nomodify void*) ppuDataTransfer::cpuData#2 ← phi( main::@17/(void*)(const to_nomodify byte*) palette main::@21/(void*)(const to_nomodify byte*) h_bar_tilemap ) [109] (nomodify void*) ppuDataTransfer::cpuData#2 ← phi( main::@17/(void*)(const to_nomodify byte*) palette main::@21/(void*)(const to_nomodify byte*) h_bar_tilemap )
[114] (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 ← phi( main::@17/(void*)(const nomodify byte*) PPU_PALETTE main::@21/(void*) 8256 ) [109] (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 ← phi( main::@17/(void*)(const nomodify byte*) PPU_PALETTE main::@21/(void*) 8256 )
to:ppuDataTransfer::ppuDataPrepare1 to:ppuDataTransfer::ppuDataPrepare1
ppuDataTransfer::ppuDataPrepare1: scope:[ppuDataTransfer] from ppuDataTransfer ppuDataTransfer::ppuDataPrepare1: scope:[ppuDataTransfer] from ppuDataTransfer
[115] (byte~) ppuDataTransfer::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 [110] (byte~) ppuDataTransfer::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0
[116] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$0 [111] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$0
[117] (byte~) ppuDataTransfer::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 [112] (byte~) ppuDataTransfer::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0
[118] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$1 [113] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$1
to:ppuDataTransfer::@3 to:ppuDataTransfer::@3
ppuDataTransfer::@3: scope:[ppuDataTransfer] from ppuDataTransfer::ppuDataPrepare1 ppuDataTransfer::@3: scope:[ppuDataTransfer] from ppuDataTransfer::ppuDataPrepare1
[119] (byte*) ppuDataTransfer::cpuSrc#6 ← (byte*)(nomodify void*) ppuDataTransfer::cpuData#2 [114] (byte*) ppuDataTransfer::cpuSrc#6 ← (byte*)(nomodify void*) ppuDataTransfer::cpuData#2
to:ppuDataTransfer::@1 to:ppuDataTransfer::@1
ppuDataTransfer::@1: scope:[ppuDataTransfer] from ppuDataTransfer::@3 ppuDataTransfer::@4 ppuDataTransfer::@1: scope:[ppuDataTransfer] from ppuDataTransfer::@3 ppuDataTransfer::@4
[120] (byte*) ppuDataTransfer::cpuSrc#2 ← phi( ppuDataTransfer::@3/(byte*) ppuDataTransfer::cpuSrc#6 ppuDataTransfer::@4/(byte*) ppuDataTransfer::cpuSrc#1 ) [115] (byte*) ppuDataTransfer::cpuSrc#2 ← phi( ppuDataTransfer::@3/(byte*) ppuDataTransfer::cpuSrc#6 ppuDataTransfer::@4/(byte*) ppuDataTransfer::cpuSrc#1 )
[120] (word) ppuDataTransfer::i#2 ← phi( ppuDataTransfer::@3/(word) 0 ppuDataTransfer::@4/(word) ppuDataTransfer::i#1 ) [115] (word) ppuDataTransfer::i#2 ← phi( ppuDataTransfer::@3/(word) 0 ppuDataTransfer::@4/(word) ppuDataTransfer::i#1 )
[121] if((word) ppuDataTransfer::i#2<(byte) $20*(const byte) SIZEOF_BYTE) goto ppuDataTransfer::@2 [116] if((word) ppuDataTransfer::i#2<(byte) $20*(const byte) SIZEOF_BYTE) goto ppuDataTransfer::@2
to:ppuDataTransfer::@return to:ppuDataTransfer::@return
ppuDataTransfer::@return: scope:[ppuDataTransfer] from ppuDataTransfer::@1 ppuDataTransfer::@return: scope:[ppuDataTransfer] from ppuDataTransfer::@1
[122] return [117] return
to:@return to:@return
ppuDataTransfer::@2: scope:[ppuDataTransfer] from ppuDataTransfer::@1 ppuDataTransfer::@2: scope:[ppuDataTransfer] from ppuDataTransfer::@1
[123] (byte) ppuDataTransfer::ppuDataPut1_val#0 ← *((byte*) ppuDataTransfer::cpuSrc#2) [118] (byte) ppuDataTransfer::ppuDataPut1_val#0 ← *((byte*) ppuDataTransfer::cpuSrc#2)
to:ppuDataTransfer::ppuDataPut1 to:ppuDataTransfer::ppuDataPut1
ppuDataTransfer::ppuDataPut1: scope:[ppuDataTransfer] from ppuDataTransfer::@2 ppuDataTransfer::ppuDataPut1: scope:[ppuDataTransfer] from ppuDataTransfer::@2
[124] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataTransfer::ppuDataPut1_val#0 [119] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataTransfer::ppuDataPut1_val#0
to:ppuDataTransfer::@4 to:ppuDataTransfer::@4
ppuDataTransfer::@4: scope:[ppuDataTransfer] from ppuDataTransfer::ppuDataPut1 ppuDataTransfer::@4: scope:[ppuDataTransfer] from ppuDataTransfer::ppuDataPut1
[125] (byte*) ppuDataTransfer::cpuSrc#1 ← ++ (byte*) ppuDataTransfer::cpuSrc#2 [120] (byte*) ppuDataTransfer::cpuSrc#1 ← ++ (byte*) ppuDataTransfer::cpuSrc#2
[126] (word) ppuDataTransfer::i#1 ← ++ (word) ppuDataTransfer::i#2 [121] (word) ppuDataTransfer::i#1 ← ++ (word) ppuDataTransfer::i#2
to:ppuDataTransfer::@1 to:ppuDataTransfer::@1
(void()) ppuDataFill((nomodify void*) ppuDataFill::ppuData , (byte) ppuDataFill::val , (word) ppuDataFill::size) (void()) ppuDataFill((nomodify void*) ppuDataFill::ppuData , (byte) ppuDataFill::val , (word) ppuDataFill::size)
ppuDataFill: scope:[ppuDataFill] from main::@19 main::@20 ppuDataFill: scope:[ppuDataFill] from main::@19 main::@20
[127] (word) ppuDataFill::size#3 ← phi( main::@19/(word)(number) $20*(number) $1e main::@20/(byte) $40 ) [122] (word) ppuDataFill::size#3 ← phi( main::@19/(word)(number) $20*(number) $1e main::@20/(byte) $40 )
[127] (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 ← phi( main::@19/(void*)(const nomodify byte*) PPU_NAME_TABLE_0 main::@20/(void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 ) [122] (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 ← phi( main::@19/(void*)(const nomodify byte*) PPU_NAME_TABLE_0 main::@20/(void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 )
to:ppuDataFill::ppuDataPrepare1 to:ppuDataFill::ppuDataPrepare1
ppuDataFill::ppuDataPrepare1: scope:[ppuDataFill] from ppuDataFill ppuDataFill::ppuDataPrepare1: scope:[ppuDataFill] from ppuDataFill
[128] (byte~) ppuDataFill::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 [123] (byte~) ppuDataFill::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0
[129] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$0 [124] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$0
[130] (byte~) ppuDataFill::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 [125] (byte~) ppuDataFill::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0
[131] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$1 [126] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$1
to:ppuDataFill::@1 to:ppuDataFill::@1
ppuDataFill::@1: scope:[ppuDataFill] from ppuDataFill::@2 ppuDataFill::ppuDataPrepare1 ppuDataFill::@1: scope:[ppuDataFill] from ppuDataFill::@2 ppuDataFill::ppuDataPrepare1
[132] (word) ppuDataFill::i#2 ← phi( ppuDataFill::ppuDataPrepare1/(word) 0 ppuDataFill::@2/(word) ppuDataFill::i#1 ) [127] (word) ppuDataFill::i#2 ← phi( ppuDataFill::ppuDataPrepare1/(word) 0 ppuDataFill::@2/(word) ppuDataFill::i#1 )
[133] if((word) ppuDataFill::i#2<(word) ppuDataFill::size#3) goto ppuDataFill::ppuDataPut1 [128] if((word) ppuDataFill::i#2<(word) ppuDataFill::size#3) goto ppuDataFill::ppuDataPut1
to:ppuDataFill::@return to:ppuDataFill::@return
ppuDataFill::@return: scope:[ppuDataFill] from ppuDataFill::@1 ppuDataFill::@return: scope:[ppuDataFill] from ppuDataFill::@1
[134] return [129] return
to:@return to:@return
ppuDataFill::ppuDataPut1: scope:[ppuDataFill] from ppuDataFill::@1 ppuDataFill::ppuDataPut1: scope:[ppuDataFill] from ppuDataFill::@1
[135] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) 0 [130] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) 0
to:ppuDataFill::@2 to:ppuDataFill::@2
ppuDataFill::@2: scope:[ppuDataFill] from ppuDataFill::ppuDataPut1 ppuDataFill::@2: scope:[ppuDataFill] from ppuDataFill::ppuDataPut1
[136] (word) ppuDataFill::i#1 ← ++ (word) ppuDataFill::i#2 [131] (word) ppuDataFill::i#1 ← ++ (word) ppuDataFill::i#2
to:ppuDataFill::@1 to:ppuDataFill::@1
(word()) rand() (word()) rand()
rand: scope:[rand] from main::@2 main::@22 rand: scope:[rand] from main::@2 main::@22
[137] (word) rand_state#10 ← phi( main::@2/(word) rand_state#17 main::@22/(word) rand_state#11 ) [132] (word) rand_state#10 ← phi( main::@2/(word) rand_state#17 main::@22/(word) rand_state#11 )
[138] (word~) rand::$0 ← (word) rand_state#10 << (byte) 7 [133] (word~) rand::$0 ← (word) rand_state#10 << (byte) 7
[139] (word) rand_state#0 ← (word) rand_state#10 ^ (word~) rand::$0 [134] (word) rand_state#0 ← (word) rand_state#10 ^ (word~) rand::$0
[140] (word~) rand::$1 ← (word) rand_state#0 >> (byte) 9 [135] (word~) rand::$1 ← (word) rand_state#0 >> (byte) 9
[141] (word) rand_state#1 ← (word) rand_state#0 ^ (word~) rand::$1 [136] (word) rand_state#1 ← (word) rand_state#0 ^ (word~) rand::$1
[142] (word~) rand::$2 ← (word) rand_state#1 << (byte) 8 [137] (word~) rand::$2 ← (word) rand_state#1 << (byte) 8
[143] (word) rand_state#11 ← (word) rand_state#1 ^ (word~) rand::$2 [138] (word) rand_state#11 ← (word) rand_state#1 ^ (word~) rand::$2
[144] (word) rand::return#0 ← (word) rand_state#11 [139] (word) rand::return#0 ← (word) rand_state#11
to:rand::@return to:rand::@return
rand::@return: scope:[rand] from rand rand::@return: scope:[rand] from rand
[145] return [140] return
to:@return to:@return

File diff suppressed because it is too large Load Diff

View File

@ -75,7 +75,7 @@
(signed word()) main() (signed word()) main()
(word~) main::$10 zp[2]:25 101.0 (word~) main::$10 zp[2]:25 101.0
(word~) main::$11 zp[2]:25 202.0 (word~) main::$11 zp[2]:25 202.0
(byte~) main::$12 zp[1]:27 101.0 (byte~) main::$12 reg byte a 202.0
(byte~) main::$14 reg byte a 202.0 (byte~) main::$14 reg byte a 202.0
(word~) main::$20 zp[2]:12 2002.0 (word~) main::$20 zp[2]:12 2002.0
(word~) main::$23 zp[2]:14 667.3333333333334 (word~) main::$23 zp[2]:14 667.3333333333334
@ -85,15 +85,10 @@
(word~) main::$31 zp[2]:19 2002.0 (word~) main::$31 zp[2]:19 2002.0
(word~) main::$32 zp[2]:21 500.5 (word~) main::$32 zp[2]:21 500.5
(word~) main::$33 zp[2]:23 1001.0 (word~) main::$33 zp[2]:23 1001.0
(byte~) main::$35 reg byte a 202.0 (byte~) main::$36 reg byte y 50.5
(byte~) main::$36 reg byte a 202.0
(byte~) main::$38 reg byte x 151.5 (byte~) main::$38 reg byte x 151.5
(byte~) main::$40 reg byte y 2502.5 (byte~) main::$44 reg byte y 864.5
(byte~) main::$44 reg byte y 1501.5
(byte~) main::$45 reg byte a 3003.0
(byte~) main::$48 reg byte x 1001.0 (byte~) main::$48 reg byte x 1001.0
(byte~) main::$50 reg byte y 500.5
(byte~) main::$53 reg byte y 800.8
(word~) main::$56 zp[2]:19 2002.0 (word~) main::$56 zp[2]:19 2002.0
(word~) main::$9 zp[2]:25 202.0 (word~) main::$9 zp[2]:25 202.0
(label) main::@1 (label) main::@1
@ -124,13 +119,13 @@
(byte) main::active_balls (byte) main::active_balls
(byte) main::active_balls#1 active_balls zp[1]:3 75.75 (byte) main::active_balls#1 active_balls zp[1]:3 75.75
(byte) main::active_balls#2 active_balls zp[1]:3 56.11111111111111 (byte) main::active_balls#2 active_balls zp[1]:3 56.11111111111111
(byte) main::active_balls#8 active_balls zp[1]:3 37.97297297297297 (byte) main::active_balls#8 active_balls zp[1]:3 42.57575757575758
(label) main::enableVideoOutput1 (label) main::enableVideoOutput1
(byte) main::h_bar (byte) main::h_bar
(byte) main::h_bar#1 h_bar zp[1]:11 72.8409090909091 (byte) main::h_bar#1 h_bar zp[1]:11 80.125
(byte) main::i (byte) main::i
(byte) main::i#10 i zp[1]:5 258.3225806451613 (byte) main::i#10 i zp[1]:5 148.2962962962963
(byte) main::i#14 reg byte x 33.666666666666664 (byte) main::i#14 reg byte x 28.857142857142858
(byte) main::i#2 reg byte x 202.0 (byte) main::i#2 reg byte x 202.0
(byte) main::i#4 i zp[1]:5 2002.0 (byte) main::i#4 i zp[1]:5 2002.0
(label) main::initNES1 (label) main::initNES1
@ -151,14 +146,14 @@
(signed word) main::return (signed word) main::return
(byte) main::sprite_idx (byte) main::sprite_idx
(byte) main::sprite_idx#2 sprite_idx zp[1]:6 1001.0 (byte) main::sprite_idx#2 sprite_idx zp[1]:6 1001.0
(byte) main::sprite_idx#3 sprite_idx zp[1]:6 100.1 (byte) main::sprite_idx#3 sprite_idx zp[1]:6 115.5
(byte) main::timer (byte) main::timer
(byte) main::timer#1 reg byte x 101.0 (byte) main::timer#1 reg byte x 101.0
(byte) main::timer#15 timer zp[1]:4 8.18918918918919 (byte) main::timer#15 timer zp[1]:4 9.181818181818182
(byte) main::timer#21 timer zp[1]:4 202.0 (byte) main::timer#21 timer zp[1]:4 202.0
(byte) main::timer#3 timer zp[1]:4 57.714285714285715 (byte) main::timer#3 timer zp[1]:4 57.714285714285715
(byte) main::timer_2 (byte) main::timer_2
(byte) main::timer_2#1 timer_2 zp[1]:2 6.183673469387754 (byte) main::timer_2#1 timer_2 zp[1]:2 6.733333333333333
(byte) main::timer_2#2 timer_2 zp[1]:2 202.0 (byte) main::timer_2#2 timer_2 zp[1]:2 202.0
(const to_nomodify byte*) palette[] = { (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4 } (const to_nomodify byte*) palette[] = { (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4 }
(void()) ppuDataFill((nomodify void*) ppuDataFill::ppuData , (byte) ppuDataFill::val , (word) ppuDataFill::size) (void()) ppuDataFill((nomodify void*) ppuDataFill::ppuData , (byte) ppuDataFill::val , (word) ppuDataFill::size)
@ -215,9 +210,9 @@
(byte) printf_format_string::justify_left (byte) printf_format_string::justify_left
(byte) printf_format_string::min_length (byte) printf_format_string::min_length
(word()) rand() (word()) rand()
(word~) rand::$0 zp[2]:28 2002.0 (word~) rand::$0 zp[2]:27 2002.0
(word~) rand::$1 zp[2]:30 2002.0 (word~) rand::$1 zp[2]:29 2002.0
(word~) rand::$2 zp[2]:32 2002.0 (word~) rand::$2 zp[2]:31 2002.0
(label) rand::@return (label) rand::@return
(word) rand::return (word) rand::return
(word) rand::return#0 return zp[2]:25 300.75 (word) rand::return#0 return zp[2]:25 300.75
@ -227,7 +222,7 @@
(word) rand_state#0 rand_state zp[2]:7 1501.5 (word) rand_state#0 rand_state zp[2]:7 1501.5
(word) rand_state#1 rand_state zp[2]:7 1501.5 (word) rand_state#1 rand_state zp[2]:7 1501.5
(word) rand_state#10 rand_state zp[2]:7 1102.0 (word) rand_state#10 rand_state zp[2]:7 1102.0
(word) rand_state#11 rand_state zp[2]:7 137.75 (word) rand_state#11 rand_state zp[2]:7 146.93333333333334
(word) rand_state#17 rand_state zp[2]:7 67.33333333333333 (word) rand_state#17 rand_state zp[2]:7 67.33333333333333
(volatile byte) scroll_y loadstore zp[1]:9 105.0 (volatile byte) scroll_y loadstore zp[1]:9 105.0
(const to_nomodify byte*) sine_table[(number) $100] = { (byte) $40, (byte) $42, (byte) $43, (byte) $45, (byte) $46, (byte) $48, (byte) $49, (byte) $4b, (byte) $4c, (byte) $4e, (byte) $50, (byte) $51, (byte) $53, (byte) $54, (byte) $56, (byte) $57, (byte) $58, (byte) $5a, (byte) $5b, (byte) $5d, (byte) $5e, (byte) $60, (byte) $61, (byte) $62, (byte) $64, (byte) $65, (byte) $66, (byte) $67, (byte) $69, (byte) $6a, (byte) $6b, (byte) $6c, (byte) $6d, (byte) $6e, (byte) $6f, (byte) $70, (byte) $71, (byte) $72, (byte) $73, (byte) $74, (byte) $75, (byte) $76, (byte) $77, (byte) $78, (byte) $78, (byte) $79, (byte) $7a, (byte) $7b, (byte) $7b, (byte) $7c, (byte) $7c, (byte) $7d, (byte) $7d, (byte) $7e, (byte) $7e, (byte) $7e, (byte) $7f, (byte) $7f, (byte) $7f, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $7f, (byte) $7f, (byte) $7f, (byte) $7e, (byte) $7e, (byte) $7e, (byte) $7d, (byte) $7d, (byte) $7c, (byte) $7c, (byte) $7b, (byte) $7b, (byte) $7a, (byte) $79, (byte) $78, (byte) $78, (byte) $77, (byte) $76, (byte) $75, (byte) $74, (byte) $73, (byte) $72, (byte) $71, (byte) $70, (byte) $6f, (byte) $6e, (byte) $6d, (byte) $6c, (byte) $6b, (byte) $6a, (byte) $69, (byte) $67, (byte) $66, (byte) $65, (byte) $64, (byte) $62, (byte) $61, (byte) $60, (byte) $5e, (byte) $5d, (byte) $5b, (byte) $5a, (byte) $58, (byte) $57, (byte) $56, (byte) $54, (byte) $53, (byte) $51, (byte) $50, (byte) $4e, (byte) $4c, (byte) $4b, (byte) $49, (byte) $48, (byte) $46, (byte) $45, (byte) $43, (byte) $42, (byte) $40, (byte) $3e, (byte) $3d, (byte) $3b, (byte) $3a, (byte) $38, (byte) $37, (byte) $35, (byte) $34, (byte) $32, (byte) $30, (byte) $2f, (byte) $2d, (byte) $2c, (byte) $2a, (byte) $29, (byte) $28, (byte) $26, (byte) $25, (byte) $23, (byte) $22, (byte) $20, (byte) $1f, (byte) $1e, (byte) $1c, (byte) $1b, (byte) $1a, (byte) $19, (byte) $17, (byte) $16, (byte) $15, (byte) $14, (byte) $13, (byte) $12, (byte) $11, (byte) $10, (byte) $f, (byte) $e, (byte) $d, (byte) $c, (byte) $b, (byte) $a, (byte) 9, (byte) 8, (byte) 8, (byte) 7, (byte) 6, (byte) 5, (byte) 5, (byte) 4, (byte) 4, (byte) 3, (byte) 3, (byte) 2, (byte) 2, (byte) 2, (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) 0, (byte) 0, (byte) 1, (byte) 1, (byte) 1, (byte) 2, (byte) 2, (byte) 2, (byte) 3, (byte) 3, (byte) 4, (byte) 4, (byte) 5, (byte) 5, (byte) 6, (byte) 7, (byte) 8, (byte) 8, (byte) 9, (byte) $a, (byte) $b, (byte) $c, (byte) $d, (byte) $e, (byte) $f, (byte) $10, (byte) $11, (byte) $12, (byte) $13, (byte) $14, (byte) $15, (byte) $16, (byte) $17, (byte) $19, (byte) $1a, (byte) $1b, (byte) $1c, (byte) $1e, (byte) $1f, (byte) $20, (byte) $22, (byte) $23, (byte) $25, (byte) $26, (byte) $28, (byte) $29, (byte) $2a, (byte) $2c, (byte) $2d, (byte) $2f, (byte) $30, (byte) $32, (byte) $34, (byte) $35, (byte) $37, (byte) $38, (byte) $3a, (byte) $3b, (byte) $3d, (byte) $3e } (const to_nomodify byte*) sine_table[(number) $100] = { (byte) $40, (byte) $42, (byte) $43, (byte) $45, (byte) $46, (byte) $48, (byte) $49, (byte) $4b, (byte) $4c, (byte) $4e, (byte) $50, (byte) $51, (byte) $53, (byte) $54, (byte) $56, (byte) $57, (byte) $58, (byte) $5a, (byte) $5b, (byte) $5d, (byte) $5e, (byte) $60, (byte) $61, (byte) $62, (byte) $64, (byte) $65, (byte) $66, (byte) $67, (byte) $69, (byte) $6a, (byte) $6b, (byte) $6c, (byte) $6d, (byte) $6e, (byte) $6f, (byte) $70, (byte) $71, (byte) $72, (byte) $73, (byte) $74, (byte) $75, (byte) $76, (byte) $77, (byte) $78, (byte) $78, (byte) $79, (byte) $7a, (byte) $7b, (byte) $7b, (byte) $7c, (byte) $7c, (byte) $7d, (byte) $7d, (byte) $7e, (byte) $7e, (byte) $7e, (byte) $7f, (byte) $7f, (byte) $7f, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $7f, (byte) $7f, (byte) $7f, (byte) $7e, (byte) $7e, (byte) $7e, (byte) $7d, (byte) $7d, (byte) $7c, (byte) $7c, (byte) $7b, (byte) $7b, (byte) $7a, (byte) $79, (byte) $78, (byte) $78, (byte) $77, (byte) $76, (byte) $75, (byte) $74, (byte) $73, (byte) $72, (byte) $71, (byte) $70, (byte) $6f, (byte) $6e, (byte) $6d, (byte) $6c, (byte) $6b, (byte) $6a, (byte) $69, (byte) $67, (byte) $66, (byte) $65, (byte) $64, (byte) $62, (byte) $61, (byte) $60, (byte) $5e, (byte) $5d, (byte) $5b, (byte) $5a, (byte) $58, (byte) $57, (byte) $56, (byte) $54, (byte) $53, (byte) $51, (byte) $50, (byte) $4e, (byte) $4c, (byte) $4b, (byte) $49, (byte) $48, (byte) $46, (byte) $45, (byte) $43, (byte) $42, (byte) $40, (byte) $3e, (byte) $3d, (byte) $3b, (byte) $3a, (byte) $38, (byte) $37, (byte) $35, (byte) $34, (byte) $32, (byte) $30, (byte) $2f, (byte) $2d, (byte) $2c, (byte) $2a, (byte) $29, (byte) $28, (byte) $26, (byte) $25, (byte) $23, (byte) $22, (byte) $20, (byte) $1f, (byte) $1e, (byte) $1c, (byte) $1b, (byte) $1a, (byte) $19, (byte) $17, (byte) $16, (byte) $15, (byte) $14, (byte) $13, (byte) $12, (byte) $11, (byte) $10, (byte) $f, (byte) $e, (byte) $d, (byte) $c, (byte) $b, (byte) $a, (byte) 9, (byte) 8, (byte) 8, (byte) 7, (byte) 6, (byte) 5, (byte) 5, (byte) 4, (byte) 4, (byte) 3, (byte) 3, (byte) 2, (byte) 2, (byte) 2, (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) 0, (byte) 0, (byte) 1, (byte) 1, (byte) 1, (byte) 2, (byte) 2, (byte) 2, (byte) 3, (byte) 3, (byte) 4, (byte) 4, (byte) 5, (byte) 5, (byte) 6, (byte) 7, (byte) 8, (byte) 8, (byte) 9, (byte) $a, (byte) $b, (byte) $c, (byte) $d, (byte) $e, (byte) $f, (byte) $10, (byte) $11, (byte) $12, (byte) $13, (byte) $14, (byte) $15, (byte) $16, (byte) $17, (byte) $19, (byte) $1a, (byte) $1b, (byte) $1c, (byte) $1e, (byte) $1f, (byte) $20, (byte) $22, (byte) $23, (byte) $25, (byte) $26, (byte) $28, (byte) $29, (byte) $2a, (byte) $2c, (byte) $2d, (byte) $2f, (byte) $30, (byte) $32, (byte) $34, (byte) $35, (byte) $37, (byte) $38, (byte) $3a, (byte) $3b, (byte) $3d, (byte) $3e }
@ -236,7 +231,7 @@ interrupt(HARDWARE_STACK)(void()) vblank()
(label) vblank::@return (label) vblank::@return
(label) vblank::ppuSpriteBufferDmaTransfer1 (label) vblank::ppuSpriteBufferDmaTransfer1
(struct SpriteData*) vblank::ppuSpriteBufferDmaTransfer1_spriteBuffer (struct SpriteData*) vblank::ppuSpriteBufferDmaTransfer1_spriteBuffer
(volatile byte) vblank_hit loadstore zp[1]:10 10.25925925925926 (volatile byte) vblank_hit loadstore zp[1]:10 10.757281553398059
reg byte x [ main::initNES1_i#2 main::initNES1_i#1 ] reg byte x [ main::initNES1_i#2 main::initNES1_i#1 ]
reg byte x [ main::i#14 main::i#2 ] reg byte x [ main::i#14 main::i#2 ]
@ -254,29 +249,24 @@ zp[1]:11 [ main::h_bar#1 ]
reg byte a [ main::$14 ] reg byte a [ main::$14 ]
reg byte x [ main::timer#1 ] reg byte x [ main::timer#1 ]
reg byte x [ main::$38 ] reg byte x [ main::$38 ]
reg byte y [ main::$40 ]
zp[2]:12 [ main::$20 ppuDataFill::ppuDataPrepare1_ppuData#0 ppuDataTransfer::ppuDataPrepare1_ppuData#0 ]
reg byte a [ main::$45 ]
reg byte y [ main::$44 ] reg byte y [ main::$44 ]
zp[2]:12 [ main::$20 ppuDataFill::ppuDataPrepare1_ppuData#0 ppuDataTransfer::ppuDataPrepare1_ppuData#0 ]
zp[2]:14 [ main::$23 ppuDataFill::size#3 ppuDataTransfer::cpuData#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] zp[2]:14 [ main::$23 ppuDataFill::size#3 ppuDataTransfer::cpuData#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ]
zp[2]:16 [ main::$25 ppuDataFill::i#2 ppuDataFill::i#1 ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] zp[2]:16 [ main::$25 ppuDataFill::i#2 ppuDataFill::i#1 ppuDataTransfer::i#2 ppuDataTransfer::i#1 ]
zp[1]:18 [ main::$26 ] zp[1]:18 [ main::$26 ]
reg byte y [ main::$53 ]
reg byte a [ main::$30 ] reg byte a [ main::$30 ]
zp[2]:19 [ main::$56 main::$31 ] zp[2]:19 [ main::$56 main::$31 ]
reg byte y [ main::$50 ]
zp[2]:21 [ main::$32 ] zp[2]:21 [ main::$32 ]
reg byte x [ main::$48 ] reg byte x [ main::$48 ]
zp[2]:23 [ main::$33 ] zp[2]:23 [ main::$33 ]
zp[2]:25 [ rand::return#2 main::$9 rand::return#0 main::$10 rand::return#3 main::$11 ] zp[2]:25 [ rand::return#2 main::$9 rand::return#0 main::$10 rand::return#3 main::$11 ]
reg byte a [ main::$35 ] reg byte y [ main::$36 ]
zp[1]:27 [ main::$12 ] reg byte a [ main::$12 ]
reg byte a [ main::$36 ]
reg byte a [ ppuDataTransfer::ppuDataPrepare1_$0 ] reg byte a [ ppuDataTransfer::ppuDataPrepare1_$0 ]
reg byte a [ ppuDataTransfer::ppuDataPrepare1_$1 ] reg byte a [ ppuDataTransfer::ppuDataPrepare1_$1 ]
reg byte a [ ppuDataTransfer::ppuDataPut1_val#0 ] reg byte a [ ppuDataTransfer::ppuDataPut1_val#0 ]
reg byte a [ ppuDataFill::ppuDataPrepare1_$0 ] reg byte a [ ppuDataFill::ppuDataPrepare1_$0 ]
reg byte a [ ppuDataFill::ppuDataPrepare1_$1 ] reg byte a [ ppuDataFill::ppuDataPrepare1_$1 ]
zp[2]:28 [ rand::$0 ] zp[2]:27 [ rand::$0 ]
zp[2]:30 [ rand::$1 ] zp[2]:29 [ rand::$1 ]
zp[2]:32 [ rand::$2 ] zp[2]:31 [ rand::$2 ]

View File

@ -75,17 +75,17 @@ main: {
// Initialize the mulf_sqr multiplication tables with f(x)=int(x*x/4) // Initialize the mulf_sqr multiplication tables with f(x)=int(x*x/4)
mulf_init: { mulf_init: {
// x/2 // x/2
.label c = $18 .label c = 3
// Counter used for determining x%2==0 // Counter used for determining x%2==0
.label sqr1_hi = 3 .label sqr1_hi = 4
// Fill mulf_sqr1 = f(x) = int(x*x/4): If f(x) = x*x/4 then f(x+1) = f(x) + x/2 + 1/4 // Fill mulf_sqr1 = f(x) = int(x*x/4): If f(x) = x*x/4 then f(x+1) = f(x) + x/2 + 1/4
.label sqr = $b .label sqr = $c
.label sqr1_lo = 7 .label sqr1_lo = 8
// Decrease or increase x_255 - initially we decrease // Decrease or increase x_255 - initially we decrease
.label sqr2_hi = 9 .label sqr2_hi = $a
.label sqr2_lo = 5 .label sqr2_lo = 6
//Start with g(0)=f(255) //Start with g(0)=f(255)
.label dir = $f .label dir = $18
ldx #0 ldx #0
lda #<mulf_sqr1_hi+1 lda #<mulf_sqr1_hi+1
sta.z sqr1_hi sta.z sqr1_hi
@ -214,7 +214,7 @@ mulf_init: {
// Initialize bitmap plotting tables // Initialize bitmap plotting tables
bitmap_init: { bitmap_init: {
.label __7 = $18 .label __7 = $18
.label yoffs = 7 .label yoffs = 8
ldx #0 ldx #0
lda #$80 lda #$80
__b1: __b1:
@ -303,21 +303,22 @@ bitmap_clear: {
// show_letter(byte zp(2) angle) // show_letter(byte zp(2) angle)
show_letter: { show_letter: {
.label angle = 2 .label angle = 2
.label to_x = 7 .label to_x = 8
.label to_y = 9 .label to_y = $a
.label to_x_1 = $b .label to_x_1 = $c
.label to_y_1 = $d .label to_y_1 = $e
.label via_x = 7 .label via_x = 8
.label via_y = 9 .label via_y = $a
.label via_x_1 = $b .label via_x_1 = $c
.label via_y_1 = $d .label via_y_1 = $e
.label segment_via_x = $b .label segment_via_x = $c
.label segment_via_y = $d .label segment_via_y = $e
.label i = $18 .label i = 3
.label current_x = 3 .label current_x = 4
.label current_y = 5 .label current_y = 6
.label current_x_1 = $19 .label current_x_1 = $19
.label current_y_1 = $1b .label current_y_1 = $1b
.label __21 = $18
lda #<0 lda #<0
sta.z current_y sta.z current_y
sta.z current_y+1 sta.z current_y+1
@ -330,6 +331,7 @@ show_letter: {
asl asl
asl asl
asl asl
sta.z __21
clc clc
adc.z i adc.z i
tax tax
@ -377,10 +379,7 @@ show_letter: {
adc #>$64 adc #>$64
sta.z current_y_1+1 sta.z current_y_1+1
// via = letter_c[i].via // via = letter_c[i].via
lda.z i lda.z __21
asl
asl
asl
clc clc
adc.z i adc.z i
tax tax
@ -428,10 +427,7 @@ show_letter: {
adc #>$64 adc #>$64
sta.z segment_via_y+1 sta.z segment_via_y+1
// segment = { letter_c[i].type, to, via} // segment = { letter_c[i].type, to, via}
lda.z i lda.z __21
asl
asl
asl
clc clc
adc.z i adc.z i
tay tay
@ -478,12 +474,12 @@ show_letter: {
jmp __b3 jmp __b3
} }
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
// memset(void* zp($b) str, byte register(X) c, word zp(9) num) // memset(void* zp($c) str, byte register(X) c, word zp($a) num)
memset: { memset: {
.label end = 9 .label end = $a
.label dst = $b .label dst = $c
.label num = 9 .label num = $a
.label str = $b .label str = $c
// if(num>0) // if(num>0)
lda.z num lda.z num
bne !+ bne !+
@ -522,7 +518,7 @@ memset: {
jmp __b2 jmp __b2
} }
// 2D-rotate a vector by an angle // 2D-rotate a vector by an angle
// rotate(signed word zp(7) vector_x, signed word zp(9) vector_y, byte register(Y) angle) // rotate(signed word zp(8) vector_x, signed word zp($a) vector_y, byte register(Y) angle)
rotate: { rotate: {
.label __0 = $14 .label __0 = $14
.label __2 = $14 .label __2 = $14
@ -531,16 +527,16 @@ rotate: {
.label __6 = $14 .label __6 = $14
.label __7 = $21 .label __7 = $21
.label __10 = $1d .label __10 = $1d
.label __11 = $2b .label __11 = $2c
.label __12 = $1f .label __12 = $1f
.label __13 = $21 .label __13 = $21
.label vector_x = 7 .label vector_x = 8
.label vector_y = 9 .label vector_y = $a
.label return_x = $b .label return_x = $c
.label return_y = $d .label return_y = $e
.label cos_a = $10 .label cos_a = $10
.label xr = $1d .label xr = $1d
.label yr = $2b .label yr = $2c
.label sin_a = $10 .label sin_a = $10
// cos_a = (signed int) COS[angle] // cos_a = (signed int) COS[angle]
lda COS,y lda COS,y
@ -657,20 +653,20 @@ rotate: {
rts rts
} }
// Draw a line on the bitmap using bresenhams algorithm // Draw a line on the bitmap using bresenhams algorithm
// bitmap_line(word zp(3) x1, word zp(5) y1, word zp($b) x2, word zp($d) y2) // bitmap_line(word zp(4) x1, word zp(6) y1, word zp($c) x2, word zp($e) y2)
bitmap_line: { bitmap_line: {
.label x = 3 .label x = 4
.label y = 5 .label y = 6
.label dx = $21 .label dx = $21
.label dy = $1d .label dy = $1d
.label sx = $23 .label sx = $23
.label sy = $1f .label sy = $1f
.label e1 = $12 .label e1 = $12
.label e = $10 .label e = $10
.label x1 = 3 .label x1 = 4
.label y1 = 5 .label y1 = 6
.label x2 = $b .label x2 = $c
.label y2 = $d .label y2 = $e
// abs_u16(x2-x1) // abs_u16(x2-x1)
lda.z x2 lda.z x2
sec sec
@ -882,38 +878,38 @@ bitmap_line: {
// Point values must be within [-200 ; 1ff] for the calculation to not overflow. // Point values must be within [-200 ; 1ff] for the calculation to not overflow.
// A quadratic spline is a curve defined by 3 points: P0, P1 and P2. // A quadratic spline is a curve defined by 3 points: P0, P1 and P2.
// The curve connects P0 to P2 through a smooth curve that moves towards P1, but does usually not touch it. // The curve connects P0 to P2 through a smooth curve that moves towards P1, but does usually not touch it.
// spline_8segB(signed word zp(3) p0_x, signed word zp(5) p0_y, signed word zp($b) p1_x, signed word zp($d) p1_y, signed word zp($19) p2_x, signed word zp($1b) p2_y) // spline_8segB(signed word zp(4) p0_x, signed word zp(6) p0_y, signed word zp($c) p1_x, signed word zp($e) p1_y, signed word zp($19) p2_x, signed word zp($1b) p2_y)
spline_8segB: { spline_8segB: {
.label __0 = $23 .label __0 = $23
.label __1 = $23 .label __1 = $23
.label __3 = $29 .label __3 = $2a
.label __4 = $29 .label __4 = $2a
.label __6 = $b .label __6 = $c
.label __8 = $d .label __8 = $e
.label __10 = $b .label __10 = $c
.label __12 = $d .label __12 = $e
.label __18 = 3 .label __18 = 4
.label __19 = 3 .label __19 = 4
.label __20 = 5 .label __20 = 6
.label __21 = 5 .label __21 = 6
.label __22 = $25 .label __22 = $26
.label __23 = $25 .label __23 = $26
.label __24 = $27 .label __24 = $28
.label __25 = $27 .label __25 = $28
.label a_x = $23 .label a_x = $23
.label a_y = $29 .label a_y = $2a
.label b_x = $b .label b_x = $c
.label b_y = $d .label b_y = $e
.label i_x = $b .label i_x = $c
.label i_y = $d .label i_y = $e
.label j_x = $23 .label j_x = $23
.label j_y = $29 .label j_y = $2a
.label p_x = 3 .label p_x = 4
.label p_y = 5 .label p_y = 6
.label p0_x = 3 .label p0_x = 4
.label p0_y = 5 .label p0_y = 6
.label p1_x = $b .label p1_x = $c
.label p1_y = $d .label p1_y = $e
.label p2_x = $19 .label p2_x = $19
.label p2_y = $1b .label p2_y = $1b
// p1.x*2 // p1.x*2
@ -1209,9 +1205,10 @@ spline_8segB: {
} }
// Plot the spline in the SPLINE_8SEG array // Plot the spline in the SPLINE_8SEG array
bitmap_plot_spline_8seg: { bitmap_plot_spline_8seg: {
.label current_x = 3 .label __4 = $25
.label current_y = 5 .label current_x = 4
.label n = $f .label current_y = 6
.label n = $18
// current = SPLINE_8SEG[0] // current = SPLINE_8SEG[0]
lda SPLINE_8SEG lda SPLINE_8SEG
sta.z current_x sta.z current_x
@ -1228,29 +1225,27 @@ bitmap_plot_spline_8seg: {
lda.z n lda.z n
asl asl
asl asl
tax sta.z __4
lda SPLINE_8SEG,x tay
lda SPLINE_8SEG,y
sta.z bitmap_line.x2 sta.z bitmap_line.x2
lda SPLINE_8SEG+1,x lda SPLINE_8SEG+1,y
sta.z bitmap_line.x2+1 sta.z bitmap_line.x2+1
lda SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_Y,x lda SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_Y,y
sta.z bitmap_line.y2 sta.z bitmap_line.y2
lda SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_Y+1,x lda SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_Y+1,y
sta.z bitmap_line.y2+1 sta.z bitmap_line.y2+1
// bitmap_line((unsigned int)current.x, (unsigned int)current.y, (unsigned int)SPLINE_8SEG[n].x, (unsigned int)SPLINE_8SEG[n].y) // bitmap_line((unsigned int)current.x, (unsigned int)current.y, (unsigned int)SPLINE_8SEG[n].x, (unsigned int)SPLINE_8SEG[n].y)
jsr bitmap_line jsr bitmap_line
// current = SPLINE_8SEG[n] // current = SPLINE_8SEG[n]
lda.z n ldy.z __4
asl lda SPLINE_8SEG,y
asl
tax
lda SPLINE_8SEG,x
sta.z current_x sta.z current_x
lda SPLINE_8SEG+1,x lda SPLINE_8SEG+1,y
sta.z current_x+1 sta.z current_x+1
lda SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_Y,x lda SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_Y,y
sta.z current_y sta.z current_y
lda SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_Y+1,x lda SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_Y+1,y
sta.z current_y+1 sta.z current_y+1
// for(char n:1..8) // for(char n:1..8)
inc.z n inc.z n
@ -1264,10 +1259,10 @@ bitmap_plot_spline_8seg: {
// Fixes offsets introduced by using unsigned multiplication // Fixes offsets introduced by using unsigned multiplication
// mulf16s(signed word zp($10) a, signed word zp($12) b) // mulf16s(signed word zp($10) a, signed word zp($12) b)
mulf16s: { mulf16s: {
.label __6 = $27 .label __6 = $28
.label __9 = $29 .label __9 = $2a
.label __11 = $27 .label __11 = $28
.label __12 = $29 .label __12 = $2a
.label m = $14 .label m = $14
.label return = $14 .label return = $14
.label a = $10 .label a = $10
@ -1356,9 +1351,9 @@ abs_u16: {
} }
// Get the sign of a 16-bit unsigned number treated as a signed number. // Get the sign of a 16-bit unsigned number treated as a signed number.
// Returns unsigned -1 if the number is // Returns unsigned -1 if the number is
// sgn_u16(word zp($2b) w) // sgn_u16(word zp($2c) w)
sgn_u16: { sgn_u16: {
.label w = $2b .label w = $2c
.label return = $1f .label return = $1f
// >w // >w
lda.z w+1 lda.z w+1
@ -1380,11 +1375,11 @@ sgn_u16: {
rts rts
} }
// Plot a single dot in the bitmap // Plot a single dot in the bitmap
// bitmap_plot(word zp(3) x, byte register(A) y) // bitmap_plot(word zp(4) x, byte register(A) y)
bitmap_plot: { bitmap_plot: {
.label __0 = $2b .label __0 = $2c
.label plotter = $29 .label plotter = $2a
.label x = 3 .label x = 4
// plotter = (char*) { bitmap_plot_yhi[y], bitmap_plot_ylo[y] } // plotter = (char*) { bitmap_plot_yhi[y], bitmap_plot_ylo[y] }
tay tay
lda bitmap_plot_yhi,y lda bitmap_plot_yhi,y
@ -1418,14 +1413,14 @@ bitmap_plot: {
} }
// Fast multiply two unsigned ints to a double unsigned int result // Fast multiply two unsigned ints to a double unsigned int result
// Done in assembler to utilize fast addition A+X // Done in assembler to utilize fast addition A+X
// mulf16u(word zp($29) a, word zp($25) b) // mulf16u(word zp($2a) a, word zp($26) b)
mulf16u: { mulf16u: {
.label memA = $f8 .label memA = $f8
.label memB = $fa .label memB = $fa
.label memR = $fc .label memR = $fc
.label return = $14 .label return = $14
.label a = $29 .label a = $2a
.label b = $25 .label b = $26
// *memA = a // *memA = a
lda.z a lda.z a
sta memA sta memA

View File

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

File diff suppressed because one or more lines are too long

View File

@ -166,9 +166,9 @@
(byte) bitmap_init::y#1 reg byte x 151.5 (byte) bitmap_init::y#1 reg byte x 151.5
(byte) bitmap_init::y#2 reg byte x 50.5 (byte) bitmap_init::y#2 reg byte x 50.5
(byte*) bitmap_init::yoffs (byte*) bitmap_init::yoffs
(byte*) bitmap_init::yoffs#1 yoffs zp[2]:7 202.0 (byte*) bitmap_init::yoffs#1 yoffs zp[2]:8 202.0
(byte*) bitmap_init::yoffs#2 yoffs zp[2]:7 63.125 (byte*) bitmap_init::yoffs#2 yoffs zp[2]:8 63.125
(byte*) bitmap_init::yoffs#4 yoffs zp[2]:7 101.0 (byte*) bitmap_init::yoffs#4 yoffs zp[2]:8 101.0
(void()) bitmap_line((word) bitmap_line::x1 , (word) bitmap_line::y1 , (word) bitmap_line::x2 , (word) bitmap_line::y2) (void()) bitmap_line((word) bitmap_line::x1 , (word) bitmap_line::y1 , (word) bitmap_line::x2 , (word) bitmap_line::y2)
(label) bitmap_line::@1 (label) bitmap_line::@1
(label) bitmap_line::@10 (label) bitmap_line::@10
@ -210,48 +210,48 @@
(word) bitmap_line::sy (word) bitmap_line::sy
(word) bitmap_line::sy#0 sy zp[2]:31 7.696153846165384E10 (word) bitmap_line::sy#0 sy zp[2]:31 7.696153846165384E10
(word) bitmap_line::x (word) bitmap_line::x
(word) bitmap_line::x#0 x zp[2]:3 2.318186366818182E8 (word) bitmap_line::x#0 x zp[2]:4 2.318186366818182E8
(word) bitmap_line::x#1 x zp[2]:3 1.000000000001E12 (word) bitmap_line::x#1 x zp[2]:4 1.000000000001E12
(word) bitmap_line::x#12 x zp[2]:3 2.000000000002E12 (word) bitmap_line::x#12 x zp[2]:4 2.000000000002E12
(word) bitmap_line::x#13 x zp[2]:3 5.715714285721428E11 (word) bitmap_line::x#13 x zp[2]:4 5.715714285721428E11
(word) bitmap_line::x#15 x zp[2]:3 5.714285714291428E11 (word) bitmap_line::x#15 x zp[2]:4 5.714285714291428E11
(word) bitmap_line::x#6 x zp[2]:3 2.001000000003E12 (word) bitmap_line::x#6 x zp[2]:4 2.001000000003E12
(word) bitmap_line::x#7 x zp[2]:3 7.50250000001E11 (word) bitmap_line::x#7 x zp[2]:4 7.50250000001E11
(word) bitmap_line::x1 (word) bitmap_line::x1
(word) bitmap_line::x1#0 x1 zp[2]:3 5000.5 (word) bitmap_line::x1#0 x1 zp[2]:4 5000.5
(word) bitmap_line::x1#1 x1 zp[2]:3 5.00000005E7 (word) bitmap_line::x1#1 x1 zp[2]:4 5.00000005E7
(word) bitmap_line::x2 (word) bitmap_line::x2
(word) bitmap_line::x2#0 x2 zp[2]:11 10001.0 (word) bitmap_line::x2#0 x2 zp[2]:12 10001.0
(word) bitmap_line::x2#10 x2 zp[2]:11 3.131562531265625E10 (word) bitmap_line::x2#10 x2 zp[2]:12 3.131562531265625E10
(word) bitmap_line::x2#13 x2 zp[2]:11 1.00000001E8 (word) bitmap_line::x2#13 x2 zp[2]:12 1.00000001E8
(word) bitmap_line::y (word) bitmap_line::y
(word) bitmap_line::y#0 y zp[2]:5 1.7826130460869563E8 (word) bitmap_line::y#0 y zp[2]:6 1.7826130460869563E8
(word) bitmap_line::y#1 y zp[2]:5 5.714285714291428E11 (word) bitmap_line::y#1 y zp[2]:6 5.714285714291428E11
(word) bitmap_line::y#13 y zp[2]:5 2.000000000002E12 (word) bitmap_line::y#13 y zp[2]:6 2.000000000002E12
(word) bitmap_line::y#15 y zp[2]:5 4.287142857148571E11 (word) bitmap_line::y#15 y zp[2]:6 4.287142857148571E11
(word) bitmap_line::y#2 y zp[2]:5 1.000000000001E12 (word) bitmap_line::y#2 y zp[2]:6 1.000000000001E12
(word) bitmap_line::y#4 y zp[2]:5 5.0025000000075E11 (word) bitmap_line::y#4 y zp[2]:6 5.0025000000075E11
(word) bitmap_line::y#7 y zp[2]:5 1.000000000001E12 (word) bitmap_line::y#7 y zp[2]:6 1.000000000001E12
(word) bitmap_line::y1 (word) bitmap_line::y1
(word) bitmap_line::y1#0 y1 zp[2]:5 6667.333333333333 (word) bitmap_line::y1#0 y1 zp[2]:6 6667.333333333333
(word) bitmap_line::y1#1 y1 zp[2]:5 6.6666667333333336E7 (word) bitmap_line::y1#1 y1 zp[2]:6 6.6666667333333336E7
(word) bitmap_line::y2 (word) bitmap_line::y2
(word) bitmap_line::y2#0 y2 zp[2]:13 20002.0 (word) bitmap_line::y2#0 y2 zp[2]:14 20002.0
(word) bitmap_line::y2#11 y2 zp[2]:13 3.131562531265625E10 (word) bitmap_line::y2#11 y2 zp[2]:14 3.131562531265625E10
(word) bitmap_line::y2#13 y2 zp[2]:13 2.00000002E8 (word) bitmap_line::y2#13 y2 zp[2]:14 2.00000002E8
(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) (void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y)
(word~) bitmap_plot::$0 zp[2]:43 2.0000000000002E13 (word~) bitmap_plot::$0 zp[2]:44 2.0000000000002E13
(byte~) bitmap_plot::$1 reg byte x 2.0000000000002E13 (byte~) bitmap_plot::$1 reg byte x 2.0000000000002E13
(label) bitmap_plot::@return (label) bitmap_plot::@return
(byte*) bitmap_plot::plotter (byte*) bitmap_plot::plotter
(word) bitmap_plot::plotter#0 plotter zp[2]:41 5.0000000000005E12 (word) bitmap_plot::plotter#0 plotter zp[2]:42 5.0000000000005E12
(byte*) bitmap_plot::plotter#1 plotter zp[2]:41 1.50000000000015E13 (byte*) bitmap_plot::plotter#1 plotter zp[2]:42 1.50000000000015E13
(word) bitmap_plot::x (word) bitmap_plot::x
(word) bitmap_plot::x#0 x zp[2]:3 1.000000001E9 (word) bitmap_plot::x#0 x zp[2]:4 1.000000001E9
(word) bitmap_plot::x#1 x zp[2]:3 1.000000000001E12 (word) bitmap_plot::x#1 x zp[2]:4 1.000000000001E12
(word) bitmap_plot::x#2 x zp[2]:3 1.000000001E9 (word) bitmap_plot::x#2 x zp[2]:4 1.000000001E9
(word) bitmap_plot::x#3 x zp[2]:3 1.000000000001E12 (word) bitmap_plot::x#3 x zp[2]:4 1.000000000001E12
(word) bitmap_plot::x#4 x zp[2]:3 5.5005000000015E12 (word) bitmap_plot::x#4 x zp[2]:4 5.5005000000015E12
(byte) bitmap_plot::y (byte) bitmap_plot::y
(byte) bitmap_plot::y#0 reg byte a 2.000000002E9 (byte) bitmap_plot::y#0 reg byte a 2.000000002E9
(byte) bitmap_plot::y#1 reg byte a 2.000000000002E12 (byte) bitmap_plot::y#1 reg byte a 2.000000000002E12
@ -260,22 +260,21 @@
(byte) bitmap_plot::y#4 reg byte a 2.2002000000006E13 (byte) bitmap_plot::y#4 reg byte a 2.2002000000006E13
(const to_nomodify byte*) bitmap_plot_bit[(number) $100] = { fill( $100, 0) } (const to_nomodify byte*) bitmap_plot_bit[(number) $100] = { fill( $100, 0) }
(void()) bitmap_plot_spline_8seg() (void()) bitmap_plot_spline_8seg()
(byte~) bitmap_plot_spline_8seg::$3 reg byte x 2.500000025E7 (byte~) bitmap_plot_spline_8seg::$4 zp[1]:37 4.285714328571428E7
(byte~) bitmap_plot_spline_8seg::$4 reg byte x 1.500000015E8
(label) bitmap_plot_spline_8seg::@1 (label) bitmap_plot_spline_8seg::@1
(label) bitmap_plot_spline_8seg::@2 (label) bitmap_plot_spline_8seg::@2
(label) bitmap_plot_spline_8seg::@return (label) bitmap_plot_spline_8seg::@return
(signed word) bitmap_plot_spline_8seg::current_x (signed word) bitmap_plot_spline_8seg::current_x
(signed word) bitmap_plot_spline_8seg::current_x#0 current_x zp[2]:3 100001.0 (signed word) bitmap_plot_spline_8seg::current_x#0 current_x zp[2]:4 100001.0
(signed word) bitmap_plot_spline_8seg::current_x#1 current_x zp[2]:3 5.00000005E7 (signed word) bitmap_plot_spline_8seg::current_x#1 current_x zp[2]:4 5.00000005E7
(signed word) bitmap_plot_spline_8seg::current_x#2 current_x zp[2]:3 5.0050001E7 (signed word) bitmap_plot_spline_8seg::current_x#2 current_x zp[2]:4 5.0050001E7
(signed word) bitmap_plot_spline_8seg::current_y (signed word) bitmap_plot_spline_8seg::current_y
(signed word) bitmap_plot_spline_8seg::current_y#0 current_y zp[2]:5 200002.0 (signed word) bitmap_plot_spline_8seg::current_y#0 current_y zp[2]:6 200002.0
(signed word) bitmap_plot_spline_8seg::current_y#1 current_y zp[2]:5 6.6666667333333336E7 (signed word) bitmap_plot_spline_8seg::current_y#1 current_y zp[2]:6 6.6666667333333336E7
(signed word) bitmap_plot_spline_8seg::current_y#2 current_y zp[2]:5 3.3366667333333336E7 (signed word) bitmap_plot_spline_8seg::current_y#2 current_y zp[2]:6 3.3366667333333336E7
(byte) bitmap_plot_spline_8seg::n (byte) bitmap_plot_spline_8seg::n
(byte) bitmap_plot_spline_8seg::n#1 n zp[1]:15 1.500000015E8 (byte) bitmap_plot_spline_8seg::n#1 n zp[1]:24 1.500000015E8
(byte) bitmap_plot_spline_8seg::n#2 n zp[1]:15 4.00000004E7 (byte) bitmap_plot_spline_8seg::n#2 n zp[1]:24 3.3333333666666664E7
(const to_nomodify byte*) bitmap_plot_yhi[(number) $100] = { fill( $100, 0) } (const to_nomodify byte*) bitmap_plot_yhi[(number) $100] = { fill( $100, 0) }
(const to_nomodify byte*) bitmap_plot_ylo[(number) $100] = { fill( $100, 0) } (const to_nomodify byte*) bitmap_plot_ylo[(number) $100] = { fill( $100, 0) }
(byte*) bitmap_screen (byte*) bitmap_screen
@ -317,21 +316,21 @@
(byte) memset::c (byte) memset::c
(byte) memset::c#4 reg byte x 12500.125 (byte) memset::c#4 reg byte x 12500.125
(byte*) memset::dst (byte*) memset::dst
(byte*) memset::dst#1 dst zp[2]:11 200002.0 (byte*) memset::dst#1 dst zp[2]:12 200002.0
(byte*) memset::dst#2 dst zp[2]:11 133668.3333333333 (byte*) memset::dst#2 dst zp[2]:12 133668.3333333333
(byte*) memset::dst#4 dst zp[2]:11 2002.0 (byte*) memset::dst#4 dst zp[2]:12 2002.0
(byte*) memset::end (byte*) memset::end
(byte*) memset::end#0 end zp[2]:9 16833.666666666664 (byte*) memset::end#0 end zp[2]:10 16833.666666666664
(word) memset::num (word) memset::num
(word) memset::num#2 num zp[2]:9 1001.0 (word) memset::num#2 num zp[2]:10 1001.0
(void*) memset::return (void*) memset::return
(void*) memset::str (void*) memset::str
(void*) memset::str#3 str zp[2]:11 (void*) memset::str#3 str zp[2]:12
(signed dword()) mulf16s((signed word) mulf16s::a , (signed word) mulf16s::b) (signed dword()) mulf16s((signed word) mulf16s::a , (signed word) mulf16s::b)
(word~) mulf16s::$11 zp[2]:39 2000002.0 (word~) mulf16s::$11 zp[2]:40 2000002.0
(word~) mulf16s::$12 zp[2]:41 2000002.0 (word~) mulf16s::$12 zp[2]:42 2000002.0
(word~) mulf16s::$6 zp[2]:39 2000002.0 (word~) mulf16s::$6 zp[2]:40 2000002.0
(word~) mulf16s::$9 zp[2]:41 2000002.0 (word~) mulf16s::$9 zp[2]:42 2000002.0
(label) mulf16s::@1 (label) mulf16s::@1
(label) mulf16s::@2 (label) mulf16s::@2
(label) mulf16s::@3 (label) mulf16s::@3
@ -365,9 +364,9 @@
(dword()) mulf16u((word) mulf16u::a , (word) mulf16u::b) (dword()) mulf16u((word) mulf16u::a , (word) mulf16u::b)
(label) mulf16u::@return (label) mulf16u::@return
(word) mulf16u::a (word) mulf16u::a
(word) mulf16u::a#0 a zp[2]:41 5500001.0 (word) mulf16u::a#0 a zp[2]:42 5500001.0
(word) mulf16u::b (word) mulf16u::b
(word) mulf16u::b#0 b zp[2]:37 5500001.0 (word) mulf16u::b#0 b zp[2]:38 5500001.0
(const nomodify word*) mulf16u::memA = (word*) 248 (const nomodify word*) mulf16u::memA = (word*) 248
(const nomodify word*) mulf16u::memB = (word*) 250 (const nomodify word*) mulf16u::memB = (word*) 250
(const nomodify dword*) mulf16u::memR = (dword*) 252 (const nomodify dword*) mulf16u::memR = (dword*) 252
@ -389,28 +388,28 @@
(label) mulf_init::@9 (label) mulf_init::@9
(label) mulf_init::@return (label) mulf_init::@return
(byte) mulf_init::c (byte) mulf_init::c
(byte) mulf_init::c#1 c zp[1]:24 23.307692307692307 (byte) mulf_init::c#1 c zp[1]:3 23.307692307692307
(byte) mulf_init::c#2 c zp[1]:24 101.0 (byte) mulf_init::c#2 c zp[1]:3 101.0
(byte) mulf_init::dir (byte) mulf_init::dir
(byte) mulf_init::dir#2 dir zp[1]:15 37.875 (byte) mulf_init::dir#2 dir zp[1]:24 37.875
(byte) mulf_init::dir#4 dir zp[1]:15 101.0 (byte) mulf_init::dir#4 dir zp[1]:24 101.0
(word) mulf_init::sqr (word) mulf_init::sqr
(word) mulf_init::sqr#1 sqr zp[2]:11 101.0 (word) mulf_init::sqr#1 sqr zp[2]:12 101.0
(word) mulf_init::sqr#2 sqr zp[2]:11 202.0 (word) mulf_init::sqr#2 sqr zp[2]:12 202.0
(word) mulf_init::sqr#3 sqr zp[2]:11 84.16666666666666 (word) mulf_init::sqr#3 sqr zp[2]:12 84.16666666666666
(word) mulf_init::sqr#4 sqr zp[2]:11 50.5 (word) mulf_init::sqr#4 sqr zp[2]:12 50.5
(byte*) mulf_init::sqr1_hi (byte*) mulf_init::sqr1_hi
(byte*) mulf_init::sqr1_hi#1 sqr1_hi zp[2]:3 67.33333333333333 (byte*) mulf_init::sqr1_hi#1 sqr1_hi zp[2]:4 67.33333333333333
(byte*) mulf_init::sqr1_hi#2 sqr1_hi zp[2]:3 25.25 (byte*) mulf_init::sqr1_hi#2 sqr1_hi zp[2]:4 25.25
(byte*) mulf_init::sqr1_lo (byte*) mulf_init::sqr1_lo
(byte*) mulf_init::sqr1_lo#1 sqr1_lo zp[2]:7 202.0 (byte*) mulf_init::sqr1_lo#1 sqr1_lo zp[2]:8 202.0
(byte*) mulf_init::sqr1_lo#2 sqr1_lo zp[2]:7 28.857142857142858 (byte*) mulf_init::sqr1_lo#2 sqr1_lo zp[2]:8 28.857142857142858
(byte*) mulf_init::sqr2_hi (byte*) mulf_init::sqr2_hi
(byte*) mulf_init::sqr2_hi#1 sqr2_hi zp[2]:9 33.666666666666664 (byte*) mulf_init::sqr2_hi#1 sqr2_hi zp[2]:10 33.666666666666664
(byte*) mulf_init::sqr2_hi#2 sqr2_hi zp[2]:9 75.75 (byte*) mulf_init::sqr2_hi#2 sqr2_hi zp[2]:10 75.75
(byte*) mulf_init::sqr2_lo (byte*) mulf_init::sqr2_lo
(byte*) mulf_init::sqr2_lo#1 sqr2_lo zp[2]:5 202.0 (byte*) mulf_init::sqr2_lo#1 sqr2_lo zp[2]:6 202.0
(byte*) mulf_init::sqr2_lo#2 sqr2_lo zp[2]:5 44.888888888888886 (byte*) mulf_init::sqr2_lo#2 sqr2_lo zp[2]:6 44.888888888888886
(byte) mulf_init::x_2 (byte) mulf_init::x_2
(byte) mulf_init::x_2#1 reg byte x 101.0 (byte) mulf_init::x_2#1 reg byte x 101.0
(byte) mulf_init::x_2#2 reg byte x 50.5 (byte) mulf_init::x_2#2 reg byte x 50.5
@ -425,7 +424,7 @@
(struct SplineVector16()) rotate((signed word) rotate::vector_x , (signed word) rotate::vector_y , (byte) rotate::angle) (struct SplineVector16()) rotate((signed word) rotate::vector_x , (signed word) rotate::vector_y , (byte) rotate::angle)
(signed dword~) rotate::$0 zp[4]:20 100001.0 (signed dword~) rotate::$0 zp[4]:20 100001.0
(signed word~) rotate::$10 zp[2]:29 200002.0 (signed word~) rotate::$10 zp[2]:29 200002.0
(signed word~) rotate::$11 zp[2]:43 200002.0 (signed word~) rotate::$11 zp[2]:44 200002.0
(signed word~) rotate::$12 zp[2]:31 200002.0 (signed word~) rotate::$12 zp[2]:31 200002.0
(signed word~) rotate::$13 zp[2]:33 200002.0 (signed word~) rotate::$13 zp[2]:33 200002.0
(signed dword~) rotate::$2 zp[4]:20 100001.0 (signed dword~) rotate::$2 zp[4]:20 100001.0
@ -448,32 +447,32 @@
(signed word) rotate::cos_a#0 cos_a zp[2]:16 37500.375 (signed word) rotate::cos_a#0 cos_a zp[2]:16 37500.375
(struct SplineVector16) rotate::return (struct SplineVector16) rotate::return
(signed word) rotate::return_x (signed word) rotate::return_x
(signed word) rotate::return_x#0 return_x zp[2]:11 10001.0 (signed word) rotate::return_x#0 return_x zp[2]:12 10001.0
(signed word) rotate::return_x#1 return_x zp[2]:11 10001.0 (signed word) rotate::return_x#1 return_x zp[2]:12 10001.0
(signed word) rotate::return_x#2 return_x zp[2]:11 24000.600000000002 (signed word) rotate::return_x#2 return_x zp[2]:12 24000.600000000002
(signed word) rotate::return_y (signed word) rotate::return_y
(signed word) rotate::return_y#0 return_y zp[2]:13 10001.0 (signed word) rotate::return_y#0 return_y zp[2]:14 10001.0
(signed word) rotate::return_y#1 return_y zp[2]:13 10001.0 (signed word) rotate::return_y#1 return_y zp[2]:14 10001.0
(signed word) rotate::return_y#2 return_y zp[2]:13 20000.5 (signed word) rotate::return_y#2 return_y zp[2]:14 20000.5
(signed word) rotate::rotated_x (signed word) rotate::rotated_x
(signed word) rotate::rotated_y (signed word) rotate::rotated_y
(signed word) rotate::sin_a (signed word) rotate::sin_a
(signed word) rotate::sin_a#0 sin_a zp[2]:16 33333.66666666667 (signed word) rotate::sin_a#0 sin_a zp[2]:16 33333.66666666667
(struct SplineVector16) rotate::vector (struct SplineVector16) rotate::vector
(signed word) rotate::vector_x (signed word) rotate::vector_x
(signed word) rotate::vector_x#0 vector_x zp[2]:7 6667.333333333333 (signed word) rotate::vector_x#0 vector_x zp[2]:8 6667.333333333333
(signed word) rotate::vector_x#1 vector_x zp[2]:7 6667.333333333333 (signed word) rotate::vector_x#1 vector_x zp[2]:8 6667.333333333333
(signed word) rotate::vector_x#2 vector_x zp[2]:7 8461.692307692309 (signed word) rotate::vector_x#2 vector_x zp[2]:8 8461.692307692309
(signed word) rotate::vector_y (signed word) rotate::vector_y
(signed word) rotate::vector_y#0 vector_y zp[2]:9 10001.0 (signed word) rotate::vector_y#0 vector_y zp[2]:10 10001.0
(signed word) rotate::vector_y#1 vector_y zp[2]:9 10001.0 (signed word) rotate::vector_y#1 vector_y zp[2]:10 10001.0
(signed word) rotate::vector_y#2 vector_y zp[2]:9 12222.444444444445 (signed word) rotate::vector_y#2 vector_y zp[2]:10 12222.444444444445
(signed word) rotate::xr (signed word) rotate::xr
(signed word) rotate::xr#0 xr zp[2]:29 12500.125 (signed word) rotate::xr#0 xr zp[2]:29 12500.125
(signed word) rotate::xr#1 xr zp[2]:29 22222.444444444445 (signed word) rotate::xr#1 xr zp[2]:29 22222.444444444445
(signed word) rotate::yr (signed word) rotate::yr
(signed word) rotate::yr#0 yr zp[2]:43 11764.823529411764 (signed word) rotate::yr#0 yr zp[2]:44 11764.823529411764
(signed word) rotate::yr#1 yr zp[2]:43 100001.0 (signed word) rotate::yr#1 yr zp[2]:44 100001.0
(word()) sgn_u16((word) sgn_u16::w) (word()) sgn_u16((word) sgn_u16::w)
(byte~) sgn_u16::$0 reg byte a 2.0000000002E10 (byte~) sgn_u16::$0 reg byte a 2.0000000002E10
(byte~) sgn_u16::$1 reg byte a 2.0000000002E10 (byte~) sgn_u16::$1 reg byte a 2.0000000002E10
@ -484,16 +483,14 @@
(word) sgn_u16::return#1 return zp[2]:31 2.000000002E9 (word) sgn_u16::return#1 return zp[2]:31 2.000000002E9
(word) sgn_u16::return#4 return zp[2]:31 5.000000005E8 (word) sgn_u16::return#4 return zp[2]:31 5.000000005E8
(word) sgn_u16::w (word) sgn_u16::w
(word) sgn_u16::w#0 w zp[2]:43 2.000000002E9 (word) sgn_u16::w#0 w zp[2]:44 2.000000002E9
(word) sgn_u16::w#1 w zp[2]:43 2.000000002E9 (word) sgn_u16::w#1 w zp[2]:44 2.000000002E9
(word) sgn_u16::w#2 w zp[2]:43 1.2000000003E10 (word) sgn_u16::w#2 w zp[2]:44 1.2000000003E10
(void()) show_letter((byte) show_letter::angle) (void()) show_letter((byte) show_letter::angle)
(byte~) show_letter::$16 reg byte x 15001.5 (byte~) show_letter::$16 reg byte x 15001.5
(byte~) show_letter::$17 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::$18 reg byte a 20002.0
(byte~) show_letter::$19 reg byte a 20002.0 (byte~) show_letter::$21 zp[1]:24 1290.4516129032259
(byte~) show_letter::$21 reg byte a 20002.0
(byte~) show_letter::$23 reg byte a 20002.0
(label) show_letter::@1 (label) show_letter::@1
(label) show_letter::@2 (label) show_letter::@2
(label) show_letter::@3 (label) show_letter::@3
@ -505,18 +502,18 @@
(label) show_letter::@9 (label) show_letter::@9
(label) show_letter::@return (label) show_letter::@return
(byte) show_letter::angle (byte) show_letter::angle
(byte) show_letter::angle#0 angle zp[1]:2 345.05172413793105 (byte) show_letter::angle#0 angle zp[1]:2 357.375
(signed word) show_letter::current_x (signed word) show_letter::current_x
(signed word) show_letter::current_x#10 current_x_1 zp[2]:25 769.3076923076924 (signed word) show_letter::current_x#10 current_x_1 zp[2]:25 810.8918918918919
(signed word) show_letter::current_x#11 current_x zp[2]:3 10001.0 (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]:3 526.3684210526316 (signed word) show_letter::current_x#4 current_x zp[2]:4 555.6111111111111
(signed word) show_letter::current_y (signed word) show_letter::current_y
(signed word) show_letter::current_y#10 current_y_1 zp[2]:27 769.3076923076924 (signed word) show_letter::current_y#10 current_y_1 zp[2]:27 810.8918918918919
(signed word) show_letter::current_y#11 current_y zp[2]:5 20002.0 (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]:5 500.05 (signed word) show_letter::current_y#4 current_y zp[2]:6 526.3684210526316
(byte) show_letter::i (byte) show_letter::i
(byte) show_letter::i#1 i zp[1]:24 7500.75 (byte) show_letter::i#1 i zp[1]:3 7500.75
(byte) show_letter::i#10 i zp[1]:24 1538.6153846153845 (byte) show_letter::i#10 i zp[1]:3 1200.1200000000001
(struct SplineVector16) show_letter::segment_to (struct SplineVector16) show_letter::segment_to
(signed word) show_letter::segment_to_x (signed word) show_letter::segment_to_x
(signed word) show_letter::segment_to_y (signed word) show_letter::segment_to_y
@ -524,92 +521,92 @@
(byte) show_letter::segment_type#0 reg byte a 15001.5 (byte) show_letter::segment_type#0 reg byte a 15001.5
(struct SplineVector16) show_letter::segment_via (struct SplineVector16) show_letter::segment_via
(signed word) show_letter::segment_via_x (signed word) show_letter::segment_via_x
(signed word) show_letter::segment_via_x#0 segment_via_x zp[2]:11 2222.4444444444443 (signed word) show_letter::segment_via_x#0 segment_via_x zp[2]:12 2500.25
(signed word) show_letter::segment_via_y (signed word) show_letter::segment_via_y
(signed word) show_letter::segment_via_y#0 segment_via_y zp[2]:13 2222.4444444444443 (signed word) show_letter::segment_via_y#0 segment_via_y zp[2]:14 2500.25
(signed word) show_letter::to_x (signed word) show_letter::to_x
(signed word) show_letter::to_x#0 to_x zp[2]:7 10001.0 (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]:7 10001.0 (signed word) show_letter::to_x#1 to_x zp[2]:8 10001.0
(signed word) show_letter::to_x#2 to_x_1 zp[2]:11 10001.0 (signed word) show_letter::to_x#2 to_x_1 zp[2]:12 10001.0
(signed word) show_letter::to_y (signed word) show_letter::to_y
(signed word) show_letter::to_y#0 to_y zp[2]:9 10001.0 (signed word) show_letter::to_y#0 to_y zp[2]:10 10001.0
(signed word) show_letter::to_y#1 to_y zp[2]:9 10001.0 (signed word) show_letter::to_y#1 to_y zp[2]:10 10001.0
(signed word) show_letter::to_y#2 to_y_1 zp[2]:13 10001.0 (signed word) show_letter::to_y#2 to_y_1 zp[2]:14 10001.0
(signed word) show_letter::via_x (signed word) show_letter::via_x
(signed word) show_letter::via_x#0 via_x zp[2]:7 10001.0 (signed word) show_letter::via_x#0 via_x zp[2]:8 10001.0
(signed word) show_letter::via_x#1 via_x zp[2]:7 10001.0 (signed word) show_letter::via_x#1 via_x zp[2]:8 10001.0
(signed word) show_letter::via_x#2 via_x_1 zp[2]:11 10001.0 (signed word) show_letter::via_x#2 via_x_1 zp[2]:12 10001.0
(signed word) show_letter::via_y (signed word) show_letter::via_y
(signed word) show_letter::via_y#0 via_y zp[2]:9 10001.0 (signed word) show_letter::via_y#0 via_y zp[2]:10 10001.0
(signed word) show_letter::via_y#1 via_y zp[2]:9 10001.0 (signed word) show_letter::via_y#1 via_y zp[2]:10 10001.0
(signed word) show_letter::via_y#2 via_y_1 zp[2]:13 10001.0 (signed word) show_letter::via_y#2 via_y_1 zp[2]:14 10001.0
(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) (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)
(signed word~) spline_8segB::$0 zp[2]:35 200002.0 (signed word~) spline_8segB::$0 zp[2]:35 200002.0
(signed word~) spline_8segB::$1 zp[2]:35 200002.0 (signed word~) spline_8segB::$1 zp[2]:35 200002.0
(signed word~) spline_8segB::$10 zp[2]:11 200002.0 (signed word~) spline_8segB::$10 zp[2]:12 200002.0
(signed word~) spline_8segB::$12 zp[2]:13 200002.0 (signed word~) spline_8segB::$12 zp[2]:14 200002.0
(signed word~) spline_8segB::$18 zp[2]:3 200002.0 (signed word~) spline_8segB::$18 zp[2]:4 200002.0
(signed word~) spline_8segB::$19 zp[2]:3 66667.33333333333 (signed word~) spline_8segB::$19 zp[2]:4 66667.33333333333
(signed word~) spline_8segB::$20 zp[2]:5 200002.0 (signed word~) spline_8segB::$20 zp[2]:6 200002.0
(signed word~) spline_8segB::$21 zp[2]:5 100001.0 (signed word~) spline_8segB::$21 zp[2]:6 100001.0
(signed word~) spline_8segB::$22 zp[2]:37 2.00000002E8 (signed word~) spline_8segB::$22 zp[2]:38 2.00000002E8
(signed word~) spline_8segB::$23 zp[2]:37 5.00000005E7 (signed word~) spline_8segB::$23 zp[2]:38 5.00000005E7
(signed word~) spline_8segB::$24 zp[2]:39 2.00000002E8 (signed word~) spline_8segB::$24 zp[2]:40 2.00000002E8
(signed word~) spline_8segB::$25 zp[2]:39 6.6666667333333336E7 (signed word~) spline_8segB::$25 zp[2]:40 6.6666667333333336E7
(signed word~) spline_8segB::$3 zp[2]:41 200002.0 (signed word~) spline_8segB::$3 zp[2]:42 200002.0
(byte~) spline_8segB::$31 reg byte x 1.500000015E8 (byte~) spline_8segB::$31 reg byte x 1.500000015E8
(signed word~) spline_8segB::$4 zp[2]:41 200002.0 (signed word~) spline_8segB::$4 zp[2]:42 200002.0
(signed word~) spline_8segB::$6 zp[2]:11 200002.0 (signed word~) spline_8segB::$6 zp[2]:12 200002.0
(signed word~) spline_8segB::$8 zp[2]:13 200002.0 (signed word~) spline_8segB::$8 zp[2]:14 200002.0
(label) spline_8segB::@1 (label) spline_8segB::@1
(label) spline_8segB::@2 (label) spline_8segB::@2
(label) spline_8segB::@return (label) spline_8segB::@return
(signed word) spline_8segB::a_x (signed word) spline_8segB::a_x
(signed word) spline_8segB::a_x#0 a_x zp[2]:35 25000.25 (signed word) spline_8segB::a_x#0 a_x zp[2]:35 25000.25
(signed word) spline_8segB::a_y (signed word) spline_8segB::a_y
(signed word) spline_8segB::a_y#0 a_y zp[2]:41 30000.300000000003 (signed word) spline_8segB::a_y#0 a_y zp[2]:42 30000.300000000003
(signed word) spline_8segB::b_x (signed word) spline_8segB::b_x
(signed word) spline_8segB::b_x#0 b_x zp[2]:11 66667.33333333333 (signed word) spline_8segB::b_x#0 b_x zp[2]:12 66667.33333333333
(signed word) spline_8segB::b_y (signed word) spline_8segB::b_y
(signed word) spline_8segB::b_y#0 b_y zp[2]:13 66667.33333333333 (signed word) spline_8segB::b_y#0 b_y zp[2]:14 66667.33333333333
(signed word) spline_8segB::i_x (signed word) spline_8segB::i_x
(signed word) spline_8segB::i_x#0 i_x zp[2]:11 28571.714285714286 (signed word) spline_8segB::i_x#0 i_x zp[2]:12 28571.714285714286
(signed word) spline_8segB::i_x#1 i_x zp[2]:11 5.00000005E7 (signed word) spline_8segB::i_x#1 i_x zp[2]:12 5.00000005E7
(signed word) spline_8segB::i_x#2 i_x zp[2]:11 3.00100004E7 (signed word) spline_8segB::i_x#2 i_x zp[2]:12 3.00100004E7
(signed word) spline_8segB::i_y (signed word) spline_8segB::i_y
(signed word) spline_8segB::i_y#0 i_y zp[2]:13 40000.4 (signed word) spline_8segB::i_y#0 i_y zp[2]:14 40000.4
(signed word) spline_8segB::i_y#1 i_y zp[2]:13 6.6666667333333336E7 (signed word) spline_8segB::i_y#1 i_y zp[2]:14 6.6666667333333336E7
(signed word) spline_8segB::i_y#2 i_y zp[2]:13 2.7281818545454547E7 (signed word) spline_8segB::i_y#2 i_y zp[2]:14 2.7281818545454547E7
(signed word) spline_8segB::j_x (signed word) spline_8segB::j_x
(signed word) spline_8segB::j_x#0 j_x zp[2]:35 5561111.222222222 (signed word) spline_8segB::j_x#0 j_x zp[2]:35 5561111.222222222
(signed word) spline_8segB::j_y (signed word) spline_8segB::j_y
(signed word) spline_8segB::j_y#0 j_y zp[2]:41 5888235.411764706 (signed word) spline_8segB::j_y#0 j_y zp[2]:42 5888235.411764706
(byte) spline_8segB::n (byte) spline_8segB::n
(byte) spline_8segB::n#1 reg byte y 1.500000015E8 (byte) spline_8segB::n#1 reg byte y 1.500000015E8
(byte) spline_8segB::n#2 reg byte y 2.500000025E7 (byte) spline_8segB::n#2 reg byte y 2.500000025E7
(struct SplineVector16) spline_8segB::p0 (struct SplineVector16) spline_8segB::p0
(signed word) spline_8segB::p0_x (signed word) spline_8segB::p0_x
(signed word) spline_8segB::p0_x#0 p0_x zp[2]:3 14091.090909090908 (signed word) spline_8segB::p0_x#0 p0_x zp[2]:4 14091.090909090908
(signed word) spline_8segB::p0_y (signed word) spline_8segB::p0_y
(signed word) spline_8segB::p0_y#0 p0_y zp[2]:5 14091.090909090908 (signed word) spline_8segB::p0_y#0 p0_y zp[2]:6 14091.090909090908
(struct SplineVector16) spline_8segB::p1 (struct SplineVector16) spline_8segB::p1
(signed word) spline_8segB::p1_x (signed word) spline_8segB::p1_x
(signed word) spline_8segB::p1_x#0 p1_x zp[2]:11 21000.300000000003 (signed word) spline_8segB::p1_x#0 p1_x zp[2]:12 21000.300000000003
(signed word) spline_8segB::p1_y (signed word) spline_8segB::p1_y
(signed word) spline_8segB::p1_y#0 p1_y zp[2]:13 19091.181818181816 (signed word) spline_8segB::p1_y#0 p1_y zp[2]:14 19091.181818181816
(struct SplineVector16) spline_8segB::p2 (struct SplineVector16) spline_8segB::p2
(signed word) spline_8segB::p2_x (signed word) spline_8segB::p2_x
(signed word) spline_8segB::p2_x#0 p2_x zp[2]:25 36667.33333333333 (signed word) spline_8segB::p2_x#0 p2_x zp[2]:25 36667.33333333333
(signed word) spline_8segB::p2_y (signed word) spline_8segB::p2_y
(signed word) spline_8segB::p2_y#0 p2_y zp[2]:27 22000.4 (signed word) spline_8segB::p2_y#0 p2_y zp[2]:27 22000.4
(signed word) spline_8segB::p_x (signed word) spline_8segB::p_x
(signed word) spline_8segB::p_x#0 p_x zp[2]:3 100001.0 (signed word) spline_8segB::p_x#0 p_x zp[2]:4 100001.0
(signed word) spline_8segB::p_x#1 p_x zp[2]:3 3.33500005E7 (signed word) spline_8segB::p_x#1 p_x zp[2]:4 3.33500005E7
(signed word) spline_8segB::p_x#2 p_x zp[2]:3 3.75125005E7 (signed word) spline_8segB::p_x#2 p_x zp[2]:4 3.75125005E7
(signed word) spline_8segB::p_y (signed word) spline_8segB::p_y
(signed word) spline_8segB::p_y#0 p_y zp[2]:5 200002.0 (signed word) spline_8segB::p_y#0 p_y zp[2]:6 200002.0
(signed word) spline_8segB::p_y#1 p_y zp[2]:5 2.8585714714285716E7 (signed word) spline_8segB::p_y#1 p_y zp[2]:6 2.8585714714285716E7
(signed word) spline_8segB::p_y#2 p_y zp[2]:5 3.3344444888888888E7 (signed word) spline_8segB::p_y#2 p_y zp[2]:6 3.3344444888888888E7
zp[1]:2 [ main::angle#2 main::angle#1 show_letter::angle#0 ] zp[1]:2 [ main::angle#2 main::angle#1 show_letter::angle#0 ]
reg byte x [ main::w#4 main::w#1 ] reg byte x [ main::w#4 main::w#1 ]
@ -618,16 +615,16 @@ reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ]
reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ]
reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ]
reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ]
zp[2]:3 [ show_letter::current_x#4 show_letter::current_x#11 bitmap_line::x#7 bitmap_line::x#6 bitmap_line::x#15 bitmap_line::x#13 bitmap_line::x#0 bitmap_line::x1#1 bitmap_line::x1#0 bitmap_line::x#12 bitmap_line::x#1 bitmap_plot::x#4 bitmap_plot::x#2 bitmap_plot::x#0 bitmap_plot::x#1 bitmap_plot::x#3 spline_8segB::p0_x#0 spline_8segB::p_x#2 spline_8segB::p_x#0 spline_8segB::p_x#1 spline_8segB::$18 bitmap_plot_spline_8seg::current_x#2 bitmap_plot_spline_8seg::current_x#0 bitmap_plot_spline_8seg::current_x#1 spline_8segB::$19 mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] zp[1]:3 [ show_letter::i#10 show_letter::i#1 mulf_init::c#2 mulf_init::c#1 ]
zp[2]:5 [ show_letter::current_y#4 show_letter::current_y#11 bitmap_line::y#15 bitmap_line::y#7 bitmap_line::y#13 bitmap_line::y#4 bitmap_line::y#0 bitmap_line::y1#1 bitmap_line::y1#0 bitmap_line::y#1 bitmap_line::y#2 spline_8segB::p0_y#0 spline_8segB::p_y#2 spline_8segB::p_y#0 spline_8segB::p_y#1 spline_8segB::$20 bitmap_plot_spline_8seg::current_y#2 bitmap_plot_spline_8seg::current_y#0 bitmap_plot_spline_8seg::current_y#1 spline_8segB::$21 mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] zp[2]:4 [ show_letter::current_x#4 show_letter::current_x#11 bitmap_line::x#7 bitmap_line::x#6 bitmap_line::x#15 bitmap_line::x#13 bitmap_line::x#0 bitmap_line::x1#1 bitmap_line::x1#0 bitmap_line::x#12 bitmap_line::x#1 bitmap_plot::x#4 bitmap_plot::x#2 bitmap_plot::x#0 bitmap_plot::x#1 bitmap_plot::x#3 spline_8segB::p0_x#0 spline_8segB::p_x#2 spline_8segB::p_x#0 spline_8segB::p_x#1 spline_8segB::$18 bitmap_plot_spline_8seg::current_x#2 bitmap_plot_spline_8seg::current_x#0 bitmap_plot_spline_8seg::current_x#1 spline_8segB::$19 mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ]
zp[2]:6 [ show_letter::current_y#4 show_letter::current_y#11 bitmap_line::y#15 bitmap_line::y#7 bitmap_line::y#13 bitmap_line::y#4 bitmap_line::y#0 bitmap_line::y1#1 bitmap_line::y1#0 bitmap_line::y#1 bitmap_line::y#2 spline_8segB::p0_y#0 spline_8segB::p_y#2 spline_8segB::p_y#0 spline_8segB::p_y#1 spline_8segB::$20 bitmap_plot_spline_8seg::current_y#2 bitmap_plot_spline_8seg::current_y#0 bitmap_plot_spline_8seg::current_y#1 spline_8segB::$21 mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ]
reg byte x [ memset::c#4 ] reg byte x [ memset::c#4 ]
reg byte y [ rotate::angle#2 rotate::angle#0 rotate::angle#1 ] reg byte y [ rotate::angle#2 rotate::angle#0 rotate::angle#1 ]
zp[2]:7 [ rotate::vector_x#2 rotate::vector_x#0 rotate::vector_x#1 show_letter::to_x#1 show_letter::via_x#1 show_letter::to_x#0 show_letter::via_x#0 bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] zp[2]:8 [ rotate::vector_x#2 rotate::vector_x#0 rotate::vector_x#1 show_letter::to_x#1 show_letter::via_x#1 show_letter::to_x#0 show_letter::via_x#0 bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ]
zp[2]:9 [ rotate::vector_y#2 rotate::vector_y#0 rotate::vector_y#1 show_letter::to_y#1 show_letter::via_y#1 show_letter::to_y#0 show_letter::via_y#0 memset::num#2 memset::end#0 mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] zp[2]:10 [ rotate::vector_y#2 rotate::vector_y#0 rotate::vector_y#1 show_letter::to_y#1 show_letter::via_y#1 show_letter::to_y#0 show_letter::via_y#0 memset::num#2 memset::end#0 mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ]
reg byte y [ spline_8segB::n#2 spline_8segB::n#1 ] reg byte y [ spline_8segB::n#2 spline_8segB::n#1 ]
zp[2]:11 [ spline_8segB::i_x#2 spline_8segB::i_x#0 spline_8segB::i_x#1 spline_8segB::$10 spline_8segB::$6 spline_8segB::b_x#0 show_letter::segment_via_x#0 spline_8segB::p1_x#0 rotate::return_x#0 show_letter::to_x#2 rotate::return_x#2 rotate::return_x#1 show_letter::via_x#2 bitmap_line::x2#10 bitmap_line::x2#13 bitmap_line::x2#0 memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] zp[2]:12 [ spline_8segB::i_x#2 spline_8segB::i_x#0 spline_8segB::i_x#1 spline_8segB::$10 spline_8segB::$6 spline_8segB::b_x#0 show_letter::segment_via_x#0 spline_8segB::p1_x#0 rotate::return_x#0 show_letter::to_x#2 rotate::return_x#2 rotate::return_x#1 show_letter::via_x#2 bitmap_line::x2#10 bitmap_line::x2#13 bitmap_line::x2#0 memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ]
zp[2]:13 [ spline_8segB::i_y#2 spline_8segB::i_y#0 spline_8segB::i_y#1 spline_8segB::$12 spline_8segB::$8 spline_8segB::b_y#0 show_letter::segment_via_y#0 spline_8segB::p1_y#0 rotate::return_y#0 show_letter::to_y#2 rotate::return_y#2 rotate::return_y#1 show_letter::via_y#2 bitmap_line::y2#11 bitmap_line::y2#13 bitmap_line::y2#0 ] zp[2]:14 [ spline_8segB::i_y#2 spline_8segB::i_y#0 spline_8segB::i_y#1 spline_8segB::$12 spline_8segB::$8 spline_8segB::b_y#0 show_letter::segment_via_y#0 spline_8segB::p1_y#0 rotate::return_y#0 show_letter::to_y#2 rotate::return_y#2 rotate::return_y#1 show_letter::via_y#2 bitmap_line::y2#11 bitmap_line::y2#13 bitmap_line::y2#0 ]
zp[1]:15 [ bitmap_plot_spline_8seg::n#2 bitmap_plot_spline_8seg::n#1 mulf_init::dir#2 mulf_init::dir#4 ]
zp[2]:16 [ mulf16s::a#4 mulf16s::a#0 mulf16s::a#1 mulf16s::a#2 mulf16s::a#3 rotate::cos_a#0 rotate::sin_a#0 bitmap_line::e#3 bitmap_line::e#0 bitmap_line::e#6 bitmap_line::e#1 bitmap_line::e#2 ] zp[2]:16 [ mulf16s::a#4 mulf16s::a#0 mulf16s::a#1 mulf16s::a#2 mulf16s::a#3 rotate::cos_a#0 rotate::sin_a#0 bitmap_line::e#3 bitmap_line::e#0 bitmap_line::e#6 bitmap_line::e#1 bitmap_line::e#2 ]
zp[2]:18 [ mulf16s::b#4 mulf16s::b#0 mulf16s::b#1 mulf16s::b#2 mulf16s::b#3 bitmap_line::e1#3 bitmap_line::e1#6 bitmap_line::e1#0 bitmap_line::e1#2 bitmap_line::e1#1 ] zp[2]:18 [ mulf16s::b#4 mulf16s::b#0 mulf16s::b#1 mulf16s::b#2 mulf16s::b#3 bitmap_line::e1#3 bitmap_line::e1#6 bitmap_line::e1#0 bitmap_line::e1#2 bitmap_line::e1#1 ]
zp[4]:20 [ mulf16s::m#4 mulf16s::m#5 mulf16s::m#1 mulf16s::m#0 mulf16s::m#2 mulf16u::return#2 mulf16s::return#0 mulf16s::return#2 rotate::$0 mulf16s::return#3 rotate::$2 mulf16s::return#4 rotate::$4 mulf16s::return#10 rotate::$6 mulf16u::return#0 ] zp[4]:20 [ mulf16s::m#4 mulf16s::m#5 mulf16s::m#1 mulf16s::m#0 mulf16s::m#2 mulf16u::return#2 mulf16s::return#0 mulf16s::return#2 rotate::$0 mulf16s::return#3 rotate::$2 mulf16s::return#4 rotate::$4 mulf16s::return#10 rotate::$6 mulf16u::return#0 ]
@ -635,17 +632,14 @@ reg byte a [ bitmap_plot::y#4 bitmap_plot::y#2 bitmap_plot::y#0 bitmap_plot::y#1
reg byte a [ mulf_init::$1 ] reg byte a [ mulf_init::$1 ]
reg byte a [ mulf_init::$4 ] reg byte a [ mulf_init::$4 ]
reg byte a [ mulf_init::$5 ] reg byte a [ mulf_init::$5 ]
zp[1]:24 [ bitmap_init::$7 show_letter::i#10 show_letter::i#1 mulf_init::c#2 mulf_init::c#1 ]
reg byte a [ bitmap_init::$4 ] reg byte a [ bitmap_init::$4 ]
reg byte a [ bitmap_init::$5 ] reg byte a [ bitmap_init::$5 ]
reg byte a [ bitmap_init::$6 ] reg byte a [ bitmap_init::$6 ]
reg byte a [ show_letter::$19 ] 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 x [ show_letter::$16 ]
zp[2]:25 [ show_letter::current_x#10 spline_8segB::p2_x#0 ] 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 ] zp[2]:27 [ show_letter::current_y#10 spline_8segB::p2_y#0 ]
reg byte a [ show_letter::$21 ]
reg byte x [ show_letter::$17 ] reg byte x [ show_letter::$17 ]
reg byte a [ show_letter::$23 ]
reg byte a [ show_letter::$18 ] reg byte a [ show_letter::$18 ]
reg byte a [ show_letter::segment_type#0 ] 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]: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 ]
@ -655,14 +649,13 @@ reg byte x [ rotate::$9 ]
zp[2]:33 [ bitmap_line::dx#0 rotate::$13 rotate::$7 ] zp[2]:33 [ bitmap_line::dx#0 rotate::$13 rotate::$7 ]
zp[2]:35 [ spline_8segB::$0 spline_8segB::$1 spline_8segB::a_x#0 spline_8segB::j_x#0 bitmap_line::sx#0 ] zp[2]:35 [ spline_8segB::$0 spline_8segB::$1 spline_8segB::a_x#0 spline_8segB::j_x#0 bitmap_line::sx#0 ]
reg byte x [ spline_8segB::$31 ] reg byte x [ spline_8segB::$31 ]
reg byte x [ bitmap_plot_spline_8seg::$3 ] zp[1]:37 [ bitmap_plot_spline_8seg::$4 ]
reg byte x [ bitmap_plot_spline_8seg::$4 ] zp[2]:38 [ mulf16u::b#0 spline_8segB::$22 spline_8segB::$23 ]
zp[2]:37 [ mulf16u::b#0 spline_8segB::$22 spline_8segB::$23 ] zp[2]:40 [ mulf16s::$6 mulf16s::$11 spline_8segB::$24 spline_8segB::$25 ]
zp[2]:39 [ mulf16s::$6 mulf16s::$11 spline_8segB::$24 spline_8segB::$25 ]
reg byte a [ abs_u16::$0 ] reg byte a [ abs_u16::$0 ]
reg byte a [ abs_u16::$1 ] reg byte a [ abs_u16::$1 ]
reg byte a [ sgn_u16::$0 ] reg byte a [ sgn_u16::$0 ]
reg byte a [ sgn_u16::$1 ] reg byte a [ sgn_u16::$1 ]
zp[2]:41 [ bitmap_plot::plotter#0 bitmap_plot::plotter#1 mulf16s::$9 mulf16s::$12 mulf16u::a#0 spline_8segB::$3 spline_8segB::$4 spline_8segB::a_y#0 spline_8segB::j_y#0 ] zp[2]:42 [ bitmap_plot::plotter#0 bitmap_plot::plotter#1 mulf16s::$9 mulf16s::$12 mulf16u::a#0 spline_8segB::$3 spline_8segB::$4 spline_8segB::a_y#0 spline_8segB::j_y#0 ]
zp[2]:43 [ bitmap_plot::$0 rotate::$11 rotate::yr#0 rotate::yr#1 sgn_u16::w#2 sgn_u16::w#0 sgn_u16::w#1 ] zp[2]:44 [ bitmap_plot::$0 rotate::$11 rotate::yr#0 rotate::yr#1 sgn_u16::w#2 sgn_u16::w#0 sgn_u16::w#1 ]
reg byte x [ bitmap_plot::$1 ] reg byte x [ bitmap_plot::$1 ]

View File

@ -7,39 +7,31 @@
main: { main: {
.label __4 = 2 .label __4 = 2
.label __5 = 3 .label __5 = 3
.label __8 = 4
.label __9 = 5
ldx #0
ldy #0 ldy #0
ldx #0
__b1: __b1:
// i&1 // i&1
tya lda #1
and #1 sax.z __4
// if(i&1) // if(i&1)
cmp #0 lda #0
cmp.z __4
beq __b2 beq __b2
// (SCREEN+40*0)[idx] = '+' // (SCREEN+40*0)[idx] = '+'
lda #'+' lda #'+'
sta SCREEN,x sta SCREEN,y
__b2: __b2:
// i&2 // i&2
tya lda #2
and #2 sax.z __5
// if(i&2) // if(i&2)
cmp #0 lda #0
cmp.z __5
beq __b3 beq __b3
// (SCREEN+40*1)[idx] = '+' // (SCREEN+40*1)[idx] = '+'
lda #'+' lda #'+'
sta SCREEN+$28*1,x sta SCREEN+$28*1,y
__b3: __b3:
// i&1
tya
and #1
sta.z __4
// i&2
tya
and #2
sta.z __5
// if(i&1 && i&2) // if(i&1 && i&2)
lda #0 lda #0
cmp.z __4 cmp.z __4
@ -48,32 +40,24 @@ main: {
beq __b4 beq __b4
// (SCREEN+40*2)[idx] = '+' // (SCREEN+40*2)[idx] = '+'
lda #'+' lda #'+'
sta SCREEN+$28*2,x sta SCREEN+$28*2,y
__b4: __b4:
// i&1
tya
and #1
sta.z __8
// i&2
tya
and #2
sta.z __9
// if(i&1 || i&2) // if(i&1 || i&2)
lda #0 lda #0
cmp.z __8 cmp.z __4
bne __b9 bne __b9
cmp.z __9 cmp.z __5
beq __b5 beq __b5
__b9: __b9:
// (SCREEN+40*3)[idx] = '+' // (SCREEN+40*3)[idx] = '+'
lda #'+' lda #'+'
sta SCREEN+$28*3,x sta SCREEN+$28*3,y
__b5: __b5:
// idx++; // idx++;
inx
// for( byte i:0..7)
iny iny
cpy #8 // for( byte i:0..7)
inx
cpx #8
bne __b1 bne __b1
// } // }
rts rts

View File

@ -6,46 +6,42 @@ main: scope:[main] from
main::@1: scope:[main] from main main::@5 main::@1: scope:[main] from main main::@5
[1] (byte) main::idx#10 ← phi( main/(byte) 0 main::@5/(byte) main::idx#1 ) [1] (byte) main::idx#10 ← phi( main/(byte) 0 main::@5/(byte) main::idx#1 )
[1] (byte) main::i#10 ← phi( main/(byte) 0 main::@5/(byte) main::i#1 ) [1] (byte) main::i#10 ← phi( main/(byte) 0 main::@5/(byte) main::i#1 )
[2] (byte~) main::$0 ← (byte) main::i#10 & (byte) 1 [2] (byte~) main::$4 ← (byte) main::i#10 & (byte) 1
[3] if((byte) 0==(byte~) main::$0) goto main::@2 [3] if((byte) 0==(byte~) main::$4) goto main::@2
to:main::@6 to:main::@6
main::@6: scope:[main] from main::@1 main::@6: scope:[main] from main::@1
[4] *((const nomodify byte*) SCREEN + (byte) main::idx#10) ← (byte) '+' [4] *((const nomodify byte*) SCREEN + (byte) main::idx#10) ← (byte) '+'
to:main::@2 to:main::@2
main::@2: scope:[main] from main::@1 main::@6 main::@2: scope:[main] from main::@1 main::@6
[5] (byte~) main::$2 ← (byte) main::i#10 & (byte) 2 [5] (byte~) main::$5 ← (byte) main::i#10 & (byte) 2
[6] if((byte) 0==(byte~) main::$2) goto main::@3 [6] if((byte) 0==(byte~) main::$5) goto main::@3
to:main::@7 to:main::@7
main::@7: scope:[main] from main::@2 main::@7: scope:[main] from main::@2
[7] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 1 + (byte) main::idx#10) ← (byte) '+' [7] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 1 + (byte) main::idx#10) ← (byte) '+'
to:main::@3 to:main::@3
main::@3: scope:[main] from main::@2 main::@7 main::@3: scope:[main] from main::@2 main::@7
[8] (byte~) main::$4 ← (byte) main::i#10 & (byte) 1 [8] if((byte) 0==(byte~) main::$4) goto main::@4
[9] (byte~) main::$5 ← (byte) main::i#10 & (byte) 2
[10] if((byte) 0==(byte~) main::$4) goto main::@4
to:main::@10 to:main::@10
main::@10: scope:[main] from main::@3 main::@10: scope:[main] from main::@3
[11] if((byte) 0==(byte~) main::$5) goto main::@4 [9] if((byte) 0==(byte~) main::$5) goto main::@4
to:main::@8 to:main::@8
main::@8: scope:[main] from main::@10 main::@8: scope:[main] from main::@10
[12] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 2 + (byte) main::idx#10) ← (byte) '+' [10] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 2 + (byte) main::idx#10) ← (byte) '+'
to:main::@4 to:main::@4
main::@4: scope:[main] from main::@10 main::@3 main::@8 main::@4: scope:[main] from main::@10 main::@3 main::@8
[13] (byte~) main::$8 ← (byte) main::i#10 & (byte) 1 [11] if((byte) 0!=(byte~) main::$4) goto main::@9
[14] (byte~) main::$9 ← (byte) main::i#10 & (byte) 2
[15] if((byte) 0!=(byte~) main::$8) goto main::@9
to:main::@11 to:main::@11
main::@11: scope:[main] from main::@4 main::@11: scope:[main] from main::@4
[16] if((byte) 0==(byte~) main::$9) goto main::@5 [12] if((byte) 0==(byte~) main::$5) goto main::@5
to:main::@9 to:main::@9
main::@9: scope:[main] from main::@11 main::@4 main::@9: scope:[main] from main::@11 main::@4
[17] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 3 + (byte) main::idx#10) ← (byte) '+' [13] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 3 + (byte) main::idx#10) ← (byte) '+'
to:main::@5 to:main::@5
main::@5: scope:[main] from main::@11 main::@9 main::@5: scope:[main] from main::@11 main::@9
[18] (byte) main::idx#1 ← ++ (byte) main::idx#10 [14] (byte) main::idx#1 ← ++ (byte) main::idx#10
[19] (byte) main::i#1 ← ++ (byte) main::i#10 [15] (byte) main::i#1 ← ++ (byte) main::i#10
[20] if((byte) main::i#1!=(byte) 8) goto main::@1 [16] if((byte) main::i#1!=(byte) 8) goto main::@1
to:main::@return to:main::@return
main::@return: scope:[main] from main::@5 main::@return: scope:[main] from main::@5
[21] return [17] return
to:@return to:@return

View File

@ -197,6 +197,11 @@ Successful SSA optimization Pass2AliasElimination
Alias main::i#10 = main::i#3 main::i#2 main::i#4 main::i#6 Alias main::i#10 = main::i#3 main::i#2 main::i#4 main::i#6
Alias main::idx#10 = main::idx#3 main::idx#2 main::idx#4 main::idx#5 Alias main::idx#10 = main::idx#3 main::idx#2 main::idx#4 main::idx#5
Successful SSA optimization Pass2AliasElimination Successful SSA optimization Pass2AliasElimination
Identified duplicate assignment right side [15] (byte~) main::$4 ← (byte) main::i#10 & (byte) 1
Identified duplicate assignment right side [16] (byte~) main::$5 ← (byte) main::i#10 & (byte) 2
Identified duplicate assignment right side [23] (byte~) main::$8 ← (byte) main::i#10 & (byte) 1
Identified duplicate assignment right side [24] (byte~) main::$9 ← (byte) main::i#10 & (byte) 2
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition (bool~) main::$1 [5] if((byte) 0==(byte~) main::$0) goto main::@2 Simple Condition (bool~) main::$1 [5] if((byte) 0==(byte~) main::$0) goto main::@2
Simple Condition (bool~) main::$3 [8] if((byte) 0==(byte~) main::$2) goto main::@3 Simple Condition (bool~) main::$3 [8] if((byte) 0==(byte~) main::$2) goto main::@3
Simple Condition (bool~) main::$12 [25] if((byte) main::i#1!=rangelast(0,7)) goto main::@1 Simple Condition (bool~) main::$12 [25] if((byte) main::i#1!=rangelast(0,7)) goto main::@1
@ -242,14 +247,17 @@ Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions Successful SSA optimization PassNFinalizeNumberTypeConversions
Simple Condition (bool~) main::$15 [9] if((byte) 0!=(byte~) main::$4) goto main::@10 Alias main::$4 = main::$0 main::$8
Simple Condition (bool~) main::$16 [14] if((byte) 0!=(byte~) main::$8) goto main::@9 Alias main::$5 = main::$2 main::$9
Simple Condition (bool~) main::$17 [22] if((byte) 0!=(byte~) main::$5) goto main::@8 Successful SSA optimization Pass2AliasElimination
Simple Condition (bool~) main::$18 [24] if((byte) 0!=(byte~) main::$9) goto main::@9 Simple Condition (bool~) main::$15 [7] if((byte) 0!=(byte~) main::$4) goto main::@10
Simple Condition (bool~) main::$16 [10] if((byte) 0!=(byte~) main::$4) goto main::@9
Simple Condition (bool~) main::$17 [18] if((byte) 0!=(byte~) main::$5) goto main::@8
Simple Condition (bool~) main::$18 [20] if((byte) 0!=(byte~) main::$5) goto main::@9
Successful SSA optimization Pass2ConditionalJumpSimplification Successful SSA optimization Pass2ConditionalJumpSimplification
Negating conditional jump and destination [9] if((byte) 0==(byte~) main::$4) goto main::@4 Negating conditional jump and destination [7] if((byte) 0==(byte~) main::$4) goto main::@4
Negating conditional jump and destination [22] if((byte) 0==(byte~) main::$5) goto main::@4 Negating conditional jump and destination [18] if((byte) 0==(byte~) main::$5) goto main::@4
Negating conditional jump and destination [24] if((byte) 0==(byte~) main::$9) goto main::@5 Negating conditional jump and destination [20] if((byte) 0==(byte~) main::$5) goto main::@5
Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Successful SSA optimization Pass2ConditionalJumpSequenceImprovement
Inlining constant with var siblings (const byte) main::idx#0 Inlining constant with var siblings (const byte) main::idx#0
Inlining constant with var siblings (const byte) main::i#0 Inlining constant with var siblings (const byte) main::i#0
@ -261,8 +269,8 @@ Adding NOP phi() at start of main
CALL GRAPH CALL GRAPH
Created 2 initial phi equivalence classes Created 2 initial phi equivalence classes
Coalesced [22] main::i#11 ← main::i#1 Coalesced [18] main::i#11 ← main::i#1
Coalesced [23] main::idx#11 ← main::idx#1 Coalesced [19] main::idx#11 ← main::idx#1
Coalesced down to 2 phi equivalence classes Coalesced down to 2 phi equivalence classes
Culled Empty Block (label) main::@12 Culled Empty Block (label) main::@12
Adding NOP phi() at start of main Adding NOP phi() at start of main
@ -276,92 +284,72 @@ main: scope:[main] from
main::@1: scope:[main] from main main::@5 main::@1: scope:[main] from main main::@5
[1] (byte) main::idx#10 ← phi( main/(byte) 0 main::@5/(byte) main::idx#1 ) [1] (byte) main::idx#10 ← phi( main/(byte) 0 main::@5/(byte) main::idx#1 )
[1] (byte) main::i#10 ← phi( main/(byte) 0 main::@5/(byte) main::i#1 ) [1] (byte) main::i#10 ← phi( main/(byte) 0 main::@5/(byte) main::i#1 )
[2] (byte~) main::$0 ← (byte) main::i#10 & (byte) 1 [2] (byte~) main::$4 ← (byte) main::i#10 & (byte) 1
[3] if((byte) 0==(byte~) main::$0) goto main::@2 [3] if((byte) 0==(byte~) main::$4) goto main::@2
to:main::@6 to:main::@6
main::@6: scope:[main] from main::@1 main::@6: scope:[main] from main::@1
[4] *((const nomodify byte*) SCREEN + (byte) main::idx#10) ← (byte) '+' [4] *((const nomodify byte*) SCREEN + (byte) main::idx#10) ← (byte) '+'
to:main::@2 to:main::@2
main::@2: scope:[main] from main::@1 main::@6 main::@2: scope:[main] from main::@1 main::@6
[5] (byte~) main::$2 ← (byte) main::i#10 & (byte) 2 [5] (byte~) main::$5 ← (byte) main::i#10 & (byte) 2
[6] if((byte) 0==(byte~) main::$2) goto main::@3 [6] if((byte) 0==(byte~) main::$5) goto main::@3
to:main::@7 to:main::@7
main::@7: scope:[main] from main::@2 main::@7: scope:[main] from main::@2
[7] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 1 + (byte) main::idx#10) ← (byte) '+' [7] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 1 + (byte) main::idx#10) ← (byte) '+'
to:main::@3 to:main::@3
main::@3: scope:[main] from main::@2 main::@7 main::@3: scope:[main] from main::@2 main::@7
[8] (byte~) main::$4 ← (byte) main::i#10 & (byte) 1 [8] if((byte) 0==(byte~) main::$4) goto main::@4
[9] (byte~) main::$5 ← (byte) main::i#10 & (byte) 2
[10] if((byte) 0==(byte~) main::$4) goto main::@4
to:main::@10 to:main::@10
main::@10: scope:[main] from main::@3 main::@10: scope:[main] from main::@3
[11] if((byte) 0==(byte~) main::$5) goto main::@4 [9] if((byte) 0==(byte~) main::$5) goto main::@4
to:main::@8 to:main::@8
main::@8: scope:[main] from main::@10 main::@8: scope:[main] from main::@10
[12] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 2 + (byte) main::idx#10) ← (byte) '+' [10] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 2 + (byte) main::idx#10) ← (byte) '+'
to:main::@4 to:main::@4
main::@4: scope:[main] from main::@10 main::@3 main::@8 main::@4: scope:[main] from main::@10 main::@3 main::@8
[13] (byte~) main::$8 ← (byte) main::i#10 & (byte) 1 [11] if((byte) 0!=(byte~) main::$4) goto main::@9
[14] (byte~) main::$9 ← (byte) main::i#10 & (byte) 2
[15] if((byte) 0!=(byte~) main::$8) goto main::@9
to:main::@11 to:main::@11
main::@11: scope:[main] from main::@4 main::@11: scope:[main] from main::@4
[16] if((byte) 0==(byte~) main::$9) goto main::@5 [12] if((byte) 0==(byte~) main::$5) goto main::@5
to:main::@9 to:main::@9
main::@9: scope:[main] from main::@11 main::@4 main::@9: scope:[main] from main::@11 main::@4
[17] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 3 + (byte) main::idx#10) ← (byte) '+' [13] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 3 + (byte) main::idx#10) ← (byte) '+'
to:main::@5 to:main::@5
main::@5: scope:[main] from main::@11 main::@9 main::@5: scope:[main] from main::@11 main::@9
[18] (byte) main::idx#1 ← ++ (byte) main::idx#10 [14] (byte) main::idx#1 ← ++ (byte) main::idx#10
[19] (byte) main::i#1 ← ++ (byte) main::i#10 [15] (byte) main::i#1 ← ++ (byte) main::i#10
[20] if((byte) main::i#1!=(byte) 8) goto main::@1 [16] if((byte) main::i#1!=(byte) 8) goto main::@1
to:main::@return to:main::@return
main::@return: scope:[main] from main::@5 main::@return: scope:[main] from main::@5
[21] return [17] return
to:@return to:@return
VARIABLE REGISTER WEIGHTS VARIABLE REGISTER WEIGHTS
(void()) main() (void()) main()
(byte~) main::$0 22.0 (byte~) main::$4 4.888888888888889
(byte~) main::$2 22.0 (byte~) main::$5 6.285714285714286
(byte~) main::$4 11.0
(byte~) main::$5 11.0
(byte~) main::$8 11.0
(byte~) main::$9 11.0
(byte) main::i (byte) main::i
(byte) main::i#1 16.5 (byte) main::i#1 16.5
(byte) main::i#10 4.888888888888889 (byte) main::i#10 3.142857142857143
(byte) main::idx (byte) main::idx
(byte) main::idx#1 7.333333333333333 (byte) main::idx#1 7.333333333333333
(byte) main::idx#10 3.8823529411764706 (byte) main::idx#10 5.076923076923077
Initial phi equivalence classes Initial phi equivalence classes
[ main::i#10 main::i#1 ] [ main::i#10 main::i#1 ]
[ main::idx#10 main::idx#1 ] [ main::idx#10 main::idx#1 ]
Added variable main::$0 to live range equivalence class [ main::$0 ]
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::$4 to live range equivalence class [ main::$4 ]
Added variable main::$5 to live range equivalence class [ main::$5 ] Added variable main::$5 to live range equivalence class [ main::$5 ]
Added variable main::$8 to live range equivalence class [ main::$8 ]
Added variable main::$9 to live range equivalence class [ main::$9 ]
Complete equivalence classes Complete equivalence classes
[ main::i#10 main::i#1 ] [ main::i#10 main::i#1 ]
[ main::idx#10 main::idx#1 ] [ main::idx#10 main::idx#1 ]
[ main::$0 ]
[ main::$2 ]
[ main::$4 ] [ main::$4 ]
[ main::$5 ] [ main::$5 ]
[ main::$8 ]
[ main::$9 ]
Allocated zp[1]:2 [ main::i#10 main::i#1 ] Allocated zp[1]:2 [ main::i#10 main::i#1 ]
Allocated zp[1]:3 [ main::idx#10 main::idx#1 ] Allocated zp[1]:3 [ main::idx#10 main::idx#1 ]
Allocated zp[1]:4 [ main::$0 ] Allocated zp[1]:4 [ main::$4 ]
Allocated zp[1]:5 [ main::$2 ] Allocated zp[1]:5 [ main::$5 ]
Allocated zp[1]:6 [ main::$4 ]
Allocated zp[1]:7 [ main::$5 ]
Allocated zp[1]:8 [ main::$8 ]
Allocated zp[1]:9 [ main::$9 ]
INITIAL ASM INITIAL ASM
Target platform is c64basic / MOS6502X Target platform is c64basic / MOS6502X
@ -376,12 +364,8 @@ Target platform is c64basic / MOS6502X
.label SCREEN = $400 .label SCREEN = $400
// main // main
main: { main: {
.label __0 = 4 .label __4 = 4
.label __2 = 5 .label __5 = 5
.label __4 = 6
.label __5 = 7
.label __8 = 8
.label __9 = 9
.label idx = 3 .label idx = 3
.label i = 2 .label i = 2
// [1] phi from main to main::@1 [phi:main->main::@1] // [1] phi from main to main::@1 [phi:main->main::@1]
@ -400,13 +384,13 @@ main: {
jmp __b1 jmp __b1
// main::@1 // main::@1
__b1: __b1:
// [2] (byte~) main::$0 ← (byte) main::i#10 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1 // [2] (byte~) main::$4 ← (byte) main::i#10 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1
lda #1 lda #1
and.z i and.z i
sta.z __0 sta.z __4
// [3] if((byte) 0==(byte~) main::$0) goto main::@2 -- vbuc1_eq_vbuz1_then_la1 // [3] if((byte) 0==(byte~) main::$4) goto main::@2 -- vbuc1_eq_vbuz1_then_la1
lda #0 lda #0
cmp.z __0 cmp.z __4
beq __b2 beq __b2
jmp __b6 jmp __b6
// main::@6 // main::@6
@ -418,13 +402,13 @@ main: {
jmp __b2 jmp __b2
// main::@2 // main::@2
__b2: __b2:
// [5] (byte~) main::$2 ← (byte) main::i#10 & (byte) 2 -- vbuz1=vbuz2_band_vbuc1 // [5] (byte~) main::$5 ← (byte) main::i#10 & (byte) 2 -- vbuz1=vbuz2_band_vbuc1
lda #2 lda #2
and.z i and.z i
sta.z __2 sta.z __5
// [6] if((byte) 0==(byte~) main::$2) goto main::@3 -- vbuc1_eq_vbuz1_then_la1 // [6] if((byte) 0==(byte~) main::$5) goto main::@3 -- vbuc1_eq_vbuz1_then_la1
lda #0 lda #0
cmp.z __2 cmp.z __5
beq __b3 beq __b3
jmp __b7 jmp __b7
// main::@7 // main::@7
@ -436,132 +420,97 @@ main: {
jmp __b3 jmp __b3
// main::@3 // main::@3
__b3: __b3:
// [8] (byte~) main::$4 ← (byte) main::i#10 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1 // [8] if((byte) 0==(byte~) main::$4) goto main::@4 -- vbuc1_eq_vbuz1_then_la1
lda #1
and.z i
sta.z __4
// [9] (byte~) main::$5 ← (byte) main::i#10 & (byte) 2 -- vbuz1=vbuz2_band_vbuc1
lda #2
and.z i
sta.z __5
// [10] if((byte) 0==(byte~) main::$4) goto main::@4 -- vbuc1_eq_vbuz1_then_la1
lda #0 lda #0
cmp.z __4 cmp.z __4
beq __b4 beq __b4
jmp __b10 jmp __b10
// main::@10 // main::@10
__b10: __b10:
// [11] if((byte) 0==(byte~) main::$5) goto main::@4 -- vbuc1_eq_vbuz1_then_la1 // [9] if((byte) 0==(byte~) main::$5) goto main::@4 -- vbuc1_eq_vbuz1_then_la1
lda #0 lda #0
cmp.z __5 cmp.z __5
beq __b4 beq __b4
jmp __b8 jmp __b8
// main::@8 // main::@8
__b8: __b8:
// [12] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 2 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuz1=vbuc2 // [10] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 2 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuz1=vbuc2
lda #'+' lda #'+'
ldy.z idx ldy.z idx
sta SCREEN+$28*2,y sta SCREEN+$28*2,y
jmp __b4 jmp __b4
// main::@4 // main::@4
__b4: __b4:
// [13] (byte~) main::$8 ← (byte) main::i#10 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1 // [11] if((byte) 0!=(byte~) main::$4) goto main::@9 -- vbuc1_neq_vbuz1_then_la1
lda #1
and.z i
sta.z __8
// [14] (byte~) main::$9 ← (byte) main::i#10 & (byte) 2 -- vbuz1=vbuz2_band_vbuc1
lda #2
and.z i
sta.z __9
// [15] if((byte) 0!=(byte~) main::$8) goto main::@9 -- vbuc1_neq_vbuz1_then_la1
lda #0 lda #0
cmp.z __8 cmp.z __4
bne __b9 bne __b9
jmp __b11 jmp __b11
// main::@11 // main::@11
__b11: __b11:
// [16] if((byte) 0==(byte~) main::$9) goto main::@5 -- vbuc1_eq_vbuz1_then_la1 // [12] if((byte) 0==(byte~) main::$5) goto main::@5 -- vbuc1_eq_vbuz1_then_la1
lda #0 lda #0
cmp.z __9 cmp.z __5
beq __b5 beq __b5
jmp __b9 jmp __b9
// main::@9 // main::@9
__b9: __b9:
// [17] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 3 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuz1=vbuc2 // [13] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 3 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuz1=vbuc2
lda #'+' lda #'+'
ldy.z idx ldy.z idx
sta SCREEN+$28*3,y sta SCREEN+$28*3,y
jmp __b5 jmp __b5
// main::@5 // main::@5
__b5: __b5:
// [18] (byte) main::idx#1 ← ++ (byte) main::idx#10 -- vbuz1=_inc_vbuz1 // [14] (byte) main::idx#1 ← ++ (byte) main::idx#10 -- vbuz1=_inc_vbuz1
inc.z idx inc.z idx
// [19] (byte) main::i#1 ← ++ (byte) main::i#10 -- vbuz1=_inc_vbuz1 // [15] (byte) main::i#1 ← ++ (byte) main::i#10 -- vbuz1=_inc_vbuz1
inc.z i inc.z i
// [20] if((byte) main::i#1!=(byte) 8) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 // [16] if((byte) main::i#1!=(byte) 8) goto main::@1 -- vbuz1_neq_vbuc1_then_la1
lda #8 lda #8
cmp.z i cmp.z i
bne __b1_from___b5 bne __b1_from___b5
jmp __breturn jmp __breturn
// main::@return // main::@return
__breturn: __breturn:
// [21] return // [17] return
rts rts
} }
// File Data // File Data
REGISTER UPLIFT POTENTIAL REGISTERS REGISTER UPLIFT POTENTIAL REGISTERS
Statement [4] *((const nomodify byte*) SCREEN + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 ] ( [ main::i#10 main::idx#10 ] { } ) always clobbers reg byte a Statement [4] *((const nomodify byte*) SCREEN + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 main::$4 ] ( [ main::i#10 main::idx#10 main::$4 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::i#10 main::i#1 ] Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::i#10 main::i#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:3 [ main::idx#10 main::idx#1 ] Removing always clobbered register reg byte a as potential for zp[1]:3 [ main::idx#10 main::idx#1 ]
Statement [5] (byte~) main::$2 ← (byte) main::i#10 & (byte) 2 [ main::i#10 main::idx#10 main::$2 ] ( [ main::i#10 main::idx#10 main::$2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:4 [ main::$4 ]
Statement [7] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 1 + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 ] ( [ main::i#10 main::idx#10 ] { } ) always clobbers reg byte a Statement [5] (byte~) main::$5 ← (byte) main::i#10 & (byte) 2 [ main::i#10 main::idx#10 main::$4 main::$5 ] ( [ main::i#10 main::idx#10 main::$4 main::$5 ] { } ) always clobbers reg byte a
Statement [8] (byte~) main::$4 ← (byte) main::i#10 & (byte) 1 [ main::i#10 main::idx#10 main::$4 ] ( [ main::i#10 main::idx#10 main::$4 ] { } ) always clobbers reg byte a Statement [7] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 1 + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 main::$4 main::$5 ] ( [ main::i#10 main::idx#10 main::$4 main::$5 ] { } ) always clobbers reg byte a
Statement [9] (byte~) main::$5 ← (byte) main::i#10 & (byte) 2 [ main::i#10 main::idx#10 main::$4 main::$5 ] ( [ main::i#10 main::idx#10 main::$4 main::$5 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:5 [ main::$5 ]
Removing always clobbered register reg byte a as potential for zp[1]:6 [ main::$4 ] Statement [10] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 2 + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 main::$4 main::$5 ] ( [ main::i#10 main::idx#10 main::$4 main::$5 ] { } ) always clobbers reg byte a
Statement [12] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 2 + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 ] ( [ main::i#10 main::idx#10 ] { } ) always clobbers reg byte a Statement [13] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 3 + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 ] ( [ main::i#10 main::idx#10 ] { } ) always clobbers reg byte a
Statement [13] (byte~) main::$8 ← (byte) main::i#10 & (byte) 1 [ main::i#10 main::idx#10 main::$8 ] ( [ main::i#10 main::idx#10 main::$8 ] { } ) always clobbers reg byte a Statement [2] (byte~) main::$4 ← (byte) main::i#10 & (byte) 1 [ main::i#10 main::idx#10 main::$4 ] ( [ main::i#10 main::idx#10 main::$4 ] { } ) always clobbers reg byte a
Statement [14] (byte~) main::$9 ← (byte) main::i#10 & (byte) 2 [ main::i#10 main::idx#10 main::$8 main::$9 ] ( [ main::i#10 main::idx#10 main::$8 main::$9 ] { } ) always clobbers reg byte a Statement [4] *((const nomodify byte*) SCREEN + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 main::$4 ] ( [ main::i#10 main::idx#10 main::$4 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:8 [ main::$8 ] Statement [5] (byte~) main::$5 ← (byte) main::i#10 & (byte) 2 [ main::i#10 main::idx#10 main::$4 main::$5 ] ( [ main::i#10 main::idx#10 main::$4 main::$5 ] { } ) always clobbers reg byte a
Statement [17] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 3 + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 ] ( [ main::i#10 main::idx#10 ] { } ) always clobbers reg byte a Statement [7] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 1 + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 main::$4 main::$5 ] ( [ main::i#10 main::idx#10 main::$4 main::$5 ] { } ) always clobbers reg byte a
Statement [2] (byte~) main::$0 ← (byte) main::i#10 & (byte) 1 [ main::i#10 main::idx#10 main::$0 ] ( [ main::i#10 main::idx#10 main::$0 ] { } ) always clobbers reg byte a Statement [10] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 2 + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 main::$4 main::$5 ] ( [ main::i#10 main::idx#10 main::$4 main::$5 ] { } ) always clobbers reg byte a
Statement [4] *((const nomodify byte*) SCREEN + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 ] ( [ main::i#10 main::idx#10 ] { } ) always clobbers reg byte a Statement [13] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 3 + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 ] ( [ main::i#10 main::idx#10 ] { } ) always clobbers reg byte a
Statement [5] (byte~) main::$2 ← (byte) main::i#10 & (byte) 2 [ main::i#10 main::idx#10 main::$2 ] ( [ main::i#10 main::idx#10 main::$2 ] { } ) always clobbers reg byte a
Statement [7] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 1 + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 ] ( [ main::i#10 main::idx#10 ] { } ) always clobbers reg byte a
Statement [8] (byte~) main::$4 ← (byte) main::i#10 & (byte) 1 [ main::i#10 main::idx#10 main::$4 ] ( [ main::i#10 main::idx#10 main::$4 ] { } ) always clobbers reg byte a
Statement [9] (byte~) main::$5 ← (byte) main::i#10 & (byte) 2 [ main::i#10 main::idx#10 main::$4 main::$5 ] ( [ main::i#10 main::idx#10 main::$4 main::$5 ] { } ) always clobbers reg byte a
Statement [12] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 2 + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 ] ( [ main::i#10 main::idx#10 ] { } ) always clobbers reg byte a
Statement [13] (byte~) main::$8 ← (byte) main::i#10 & (byte) 1 [ main::i#10 main::idx#10 main::$8 ] ( [ main::i#10 main::idx#10 main::$8 ] { } ) always clobbers reg byte a
Statement [14] (byte~) main::$9 ← (byte) main::i#10 & (byte) 2 [ main::i#10 main::idx#10 main::$8 main::$9 ] ( [ main::i#10 main::idx#10 main::$8 main::$9 ] { } ) always clobbers reg byte a
Statement [17] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 3 + (byte) main::idx#10) ← (byte) '+' [ main::i#10 main::idx#10 ] ( [ main::i#10 main::idx#10 ] { } ) always clobbers reg byte a
Potential registers zp[1]:2 [ main::i#10 main::i#1 ] : zp[1]:2 , reg byte x , reg byte y , Potential registers zp[1]:2 [ main::i#10 main::i#1 ] : zp[1]:2 , reg byte x , reg byte y ,
Potential registers zp[1]:3 [ main::idx#10 main::idx#1 ] : zp[1]:3 , reg byte x , reg byte y , Potential registers zp[1]:3 [ main::idx#10 main::idx#1 ] : zp[1]:3 , reg byte x , reg byte y ,
Potential registers zp[1]:4 [ main::$0 ] : zp[1]:4 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:4 [ main::$4 ] : zp[1]:4 , reg byte x , reg byte y ,
Potential registers zp[1]:5 [ main::$2 ] : zp[1]:5 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:5 [ main::$5 ] : zp[1]:5 , reg byte x , reg byte y ,
Potential registers zp[1]:6 [ main::$4 ] : zp[1]:6 , reg byte x , reg byte y ,
Potential registers zp[1]:7 [ main::$5 ] : zp[1]:7 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:8 [ main::$8 ] : zp[1]:8 , reg byte x , reg byte y ,
Potential registers zp[1]:9 [ main::$9 ] : zp[1]:9 , reg byte a , reg byte x , reg byte y ,
REGISTER UPLIFT SCOPES REGISTER UPLIFT SCOPES
Uplift Scope [main] 22: zp[1]:4 [ main::$0 ] 22: zp[1]:5 [ main::$2 ] 21.39: zp[1]:2 [ main::i#10 main::i#1 ] 11.22: zp[1]:3 [ main::idx#10 main::idx#1 ] 11: zp[1]:6 [ main::$4 ] 11: zp[1]:7 [ main::$5 ] 11: zp[1]:8 [ main::$8 ] 11: zp[1]:9 [ main::$9 ] Uplift Scope [main] 19.64: zp[1]:2 [ main::i#10 main::i#1 ] 12.41: zp[1]:3 [ main::idx#10 main::idx#1 ] 6.29: zp[1]:5 [ main::$5 ] 4.89: zp[1]:4 [ main::$4 ]
Uplift Scope [] Uplift Scope []
Uplifting [main] best 1551 combination reg byte a [ main::$0 ] reg byte a [ main::$2 ] reg byte y [ main::i#10 main::i#1 ] reg byte x [ main::idx#10 main::idx#1 ] zp[1]:6 [ main::$4 ] zp[1]:7 [ main::$5 ] zp[1]:8 [ main::$8 ] zp[1]:9 [ main::$9 ] Uplifting [main] best 1351 combination reg byte x [ main::i#10 main::i#1 ] reg byte y [ main::idx#10 main::idx#1 ] zp[1]:5 [ main::$5 ] zp[1]:4 [ main::$4 ]
Limited combination testing to 100 combinations of 20736 possible. Uplifting [] best 1351 combination
Uplifting [] best 1551 combination Attempting to uplift remaining variables inzp[1]:5 [ main::$5 ]
Attempting to uplift remaining variables inzp[1]:6 [ main::$4 ] Uplifting [main] best 1351 combination zp[1]:5 [ main::$5 ]
Uplifting [main] best 1551 combination zp[1]:6 [ main::$4 ] Attempting to uplift remaining variables inzp[1]:4 [ main::$4 ]
Attempting to uplift remaining variables inzp[1]:7 [ main::$5 ] Uplifting [main] best 1351 combination zp[1]:4 [ main::$4 ]
Uplifting [main] best 1551 combination zp[1]:7 [ main::$5 ] Allocated (was zp[1]:4) zp[1]:2 [ main::$4 ]
Attempting to uplift remaining variables inzp[1]:8 [ main::$8 ] Allocated (was zp[1]:5) zp[1]:3 [ main::$5 ]
Uplifting [main] best 1551 combination zp[1]:8 [ main::$8 ]
Attempting to uplift remaining variables inzp[1]:9 [ main::$9 ]
Uplifting [main] best 1551 combination zp[1]:9 [ main::$9 ]
Allocated (was zp[1]:6) zp[1]:2 [ main::$4 ]
Allocated (was zp[1]:7) zp[1]:3 [ main::$5 ]
Allocated (was zp[1]:8) zp[1]:4 [ main::$8 ]
Allocated (was zp[1]:9) zp[1]:5 [ main::$9 ]
ASSEMBLER BEFORE OPTIMIZATION ASSEMBLER BEFORE OPTIMIZATION
// File Comments // File Comments
@ -577,14 +526,12 @@ ASSEMBLER BEFORE OPTIMIZATION
main: { main: {
.label __4 = 2 .label __4 = 2
.label __5 = 3 .label __5 = 3
.label __8 = 4
.label __9 = 5
// [1] phi from main to main::@1 [phi:main->main::@1] // [1] phi from main to main::@1 [phi:main->main::@1]
__b1_from_main: __b1_from_main:
// [1] phi (byte) main::idx#10 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 // [1] phi (byte) main::idx#10 = (byte) 0 [phi:main->main::@1#0] -- vbuyy=vbuc1
ldx #0
// [1] phi (byte) main::i#10 = (byte) 0 [phi:main->main::@1#1] -- vbuyy=vbuc1
ldy #0 ldy #0
// [1] phi (byte) main::i#10 = (byte) 0 [phi:main->main::@1#1] -- vbuxx=vbuc1
ldx #0
jmp __b1 jmp __b1
// [1] phi from main::@5 to main::@1 [phi:main::@5->main::@1] // [1] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
__b1_from___b5: __b1_from___b5:
@ -593,103 +540,89 @@ main: {
jmp __b1 jmp __b1
// main::@1 // main::@1
__b1: __b1:
// [2] (byte~) main::$0 ← (byte) main::i#10 & (byte) 1 -- vbuaa=vbuyy_band_vbuc1 // [2] (byte~) main::$4 ← (byte) main::i#10 & (byte) 1 -- vbuz1=vbuxx_band_vbuc1
tya lda #1
and #1 sax.z __4
// [3] if((byte) 0==(byte~) main::$0) goto main::@2 -- vbuc1_eq_vbuaa_then_la1 // [3] if((byte) 0==(byte~) main::$4) goto main::@2 -- vbuc1_eq_vbuz1_then_la1
cmp #0 lda #0
cmp.z __4
beq __b2 beq __b2
jmp __b6 jmp __b6
// main::@6 // main::@6
__b6: __b6:
// [4] *((const nomodify byte*) SCREEN + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuxx=vbuc2 // [4] *((const nomodify byte*) SCREEN + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuyy=vbuc2
lda #'+' lda #'+'
sta SCREEN,x sta SCREEN,y
jmp __b2 jmp __b2
// main::@2 // main::@2
__b2: __b2:
// [5] (byte~) main::$2 ← (byte) main::i#10 & (byte) 2 -- vbuaa=vbuyy_band_vbuc1 // [5] (byte~) main::$5 ← (byte) main::i#10 & (byte) 2 -- vbuz1=vbuxx_band_vbuc1
tya lda #2
and #2 sax.z __5
// [6] if((byte) 0==(byte~) main::$2) goto main::@3 -- vbuc1_eq_vbuaa_then_la1 // [6] if((byte) 0==(byte~) main::$5) goto main::@3 -- vbuc1_eq_vbuz1_then_la1
cmp #0 lda #0
cmp.z __5
beq __b3 beq __b3
jmp __b7 jmp __b7
// main::@7 // main::@7
__b7: __b7:
// [7] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 1 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuxx=vbuc2 // [7] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 1 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuyy=vbuc2
lda #'+' lda #'+'
sta SCREEN+$28*1,x sta SCREEN+$28*1,y
jmp __b3 jmp __b3
// main::@3 // main::@3
__b3: __b3:
// [8] (byte~) main::$4 ← (byte) main::i#10 & (byte) 1 -- vbuz1=vbuyy_band_vbuc1 // [8] if((byte) 0==(byte~) main::$4) goto main::@4 -- vbuc1_eq_vbuz1_then_la1
tya
and #1
sta.z __4
// [9] (byte~) main::$5 ← (byte) main::i#10 & (byte) 2 -- vbuz1=vbuyy_band_vbuc1
tya
and #2
sta.z __5
// [10] if((byte) 0==(byte~) main::$4) goto main::@4 -- vbuc1_eq_vbuz1_then_la1
lda #0 lda #0
cmp.z __4 cmp.z __4
beq __b4 beq __b4
jmp __b10 jmp __b10
// main::@10 // main::@10
__b10: __b10:
// [11] if((byte) 0==(byte~) main::$5) goto main::@4 -- vbuc1_eq_vbuz1_then_la1 // [9] if((byte) 0==(byte~) main::$5) goto main::@4 -- vbuc1_eq_vbuz1_then_la1
lda #0 lda #0
cmp.z __5 cmp.z __5
beq __b4 beq __b4
jmp __b8 jmp __b8
// main::@8 // main::@8
__b8: __b8:
// [12] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 2 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuxx=vbuc2 // [10] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 2 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuyy=vbuc2
lda #'+' lda #'+'
sta SCREEN+$28*2,x sta SCREEN+$28*2,y
jmp __b4 jmp __b4
// main::@4 // main::@4
__b4: __b4:
// [13] (byte~) main::$8 ← (byte) main::i#10 & (byte) 1 -- vbuz1=vbuyy_band_vbuc1 // [11] if((byte) 0!=(byte~) main::$4) goto main::@9 -- vbuc1_neq_vbuz1_then_la1
tya
and #1
sta.z __8
// [14] (byte~) main::$9 ← (byte) main::i#10 & (byte) 2 -- vbuz1=vbuyy_band_vbuc1
tya
and #2
sta.z __9
// [15] if((byte) 0!=(byte~) main::$8) goto main::@9 -- vbuc1_neq_vbuz1_then_la1
lda #0 lda #0
cmp.z __8 cmp.z __4
bne __b9 bne __b9
jmp __b11 jmp __b11
// main::@11 // main::@11
__b11: __b11:
// [16] if((byte) 0==(byte~) main::$9) goto main::@5 -- vbuc1_eq_vbuz1_then_la1 // [12] if((byte) 0==(byte~) main::$5) goto main::@5 -- vbuc1_eq_vbuz1_then_la1
lda #0 lda #0
cmp.z __9 cmp.z __5
beq __b5 beq __b5
jmp __b9 jmp __b9
// main::@9 // main::@9
__b9: __b9:
// [17] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 3 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuxx=vbuc2 // [13] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 3 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuyy=vbuc2
lda #'+' lda #'+'
sta SCREEN+$28*3,x sta SCREEN+$28*3,y
jmp __b5 jmp __b5
// main::@5 // main::@5
__b5: __b5:
// [18] (byte) main::idx#1 ← ++ (byte) main::idx#10 -- vbuxx=_inc_vbuxx // [14] (byte) main::idx#1 ← ++ (byte) main::idx#10 -- vbuyy=_inc_vbuyy
inx
// [19] (byte) main::i#1 ← ++ (byte) main::i#10 -- vbuyy=_inc_vbuyy
iny iny
// [20] if((byte) main::i#1!=(byte) 8) goto main::@1 -- vbuyy_neq_vbuc1_then_la1 // [15] (byte) main::i#1 ← ++ (byte) main::i#10 -- vbuxx=_inc_vbuxx
cpy #8 inx
// [16] if((byte) main::i#1!=(byte) 8) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
cpx #8
bne __b1_from___b5 bne __b1_from___b5
jmp __breturn jmp __breturn
// main::@return // main::@return
__breturn: __breturn:
// [21] return // [17] return
rts rts
} }
// File Data // File Data
@ -728,12 +661,8 @@ Succesful ASM optimization Pass5UnnecesaryLoadElimination
FINAL SYMBOL TABLE FINAL SYMBOL TABLE
(const nomodify byte*) SCREEN = (byte*) 1024 (const nomodify byte*) SCREEN = (byte*) 1024
(void()) main() (void()) main()
(byte~) main::$0 reg byte a 22.0 (byte~) main::$4 zp[1]:2 4.888888888888889
(byte~) main::$2 reg byte a 22.0 (byte~) main::$5 zp[1]:3 6.285714285714286
(byte~) main::$4 zp[1]:2 11.0
(byte~) main::$5 zp[1]:3 11.0
(byte~) main::$8 zp[1]:4 11.0
(byte~) main::$9 zp[1]:5 11.0
(label) main::@1 (label) main::@1
(label) main::@10 (label) main::@10
(label) main::@11 (label) main::@11
@ -747,24 +676,20 @@ FINAL SYMBOL TABLE
(label) main::@9 (label) main::@9
(label) main::@return (label) main::@return
(byte) main::i (byte) main::i
(byte) main::i#1 reg byte y 16.5 (byte) main::i#1 reg byte x 16.5
(byte) main::i#10 reg byte y 4.888888888888889 (byte) main::i#10 reg byte x 3.142857142857143
(byte) main::idx (byte) main::idx
(byte) main::idx#1 reg byte x 7.333333333333333 (byte) main::idx#1 reg byte y 7.333333333333333
(byte) main::idx#10 reg byte x 3.8823529411764706 (byte) main::idx#10 reg byte y 5.076923076923077
reg byte y [ main::i#10 main::i#1 ] reg byte x [ main::i#10 main::i#1 ]
reg byte x [ main::idx#10 main::idx#1 ] reg byte y [ main::idx#10 main::idx#1 ]
reg byte a [ main::$0 ]
reg byte a [ main::$2 ]
zp[1]:2 [ main::$4 ] zp[1]:2 [ main::$4 ]
zp[1]:3 [ main::$5 ] zp[1]:3 [ main::$5 ]
zp[1]:4 [ main::$8 ]
zp[1]:5 [ main::$9 ]
FINAL ASSEMBLER FINAL ASSEMBLER
Score: 1121 Score: 921
// File Comments // File Comments
// Tests using integer conditions in && and || operator // Tests using integer conditions in && and || operator
@ -779,113 +704,93 @@ Score: 1121
main: { main: {
.label __4 = 2 .label __4 = 2
.label __5 = 3 .label __5 = 3
.label __8 = 4
.label __9 = 5
// [1] phi from main to main::@1 [phi:main->main::@1] // [1] phi from main to main::@1 [phi:main->main::@1]
// [1] phi (byte) main::idx#10 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 // [1] phi (byte) main::idx#10 = (byte) 0 [phi:main->main::@1#0] -- vbuyy=vbuc1
ldx #0
// [1] phi (byte) main::i#10 = (byte) 0 [phi:main->main::@1#1] -- vbuyy=vbuc1
ldy #0 ldy #0
// [1] phi (byte) main::i#10 = (byte) 0 [phi:main->main::@1#1] -- vbuxx=vbuc1
ldx #0
// [1] phi from main::@5 to main::@1 [phi:main::@5->main::@1] // [1] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
// [1] phi (byte) main::idx#10 = (byte) main::idx#1 [phi:main::@5->main::@1#0] -- register_copy // [1] phi (byte) main::idx#10 = (byte) main::idx#1 [phi:main::@5->main::@1#0] -- register_copy
// [1] phi (byte) main::i#10 = (byte) main::i#1 [phi:main::@5->main::@1#1] -- register_copy // [1] phi (byte) main::i#10 = (byte) main::i#1 [phi:main::@5->main::@1#1] -- register_copy
// main::@1 // main::@1
__b1: __b1:
// i&1 // i&1
// [2] (byte~) main::$0 ← (byte) main::i#10 & (byte) 1 -- vbuaa=vbuyy_band_vbuc1 // [2] (byte~) main::$4 ← (byte) main::i#10 & (byte) 1 -- vbuz1=vbuxx_band_vbuc1
tya lda #1
and #1 sax.z __4
// if(i&1) // if(i&1)
// [3] if((byte) 0==(byte~) main::$0) goto main::@2 -- vbuc1_eq_vbuaa_then_la1 // [3] if((byte) 0==(byte~) main::$4) goto main::@2 -- vbuc1_eq_vbuz1_then_la1
cmp #0 lda #0
cmp.z __4
beq __b2 beq __b2
// main::@6 // main::@6
// (SCREEN+40*0)[idx] = '+' // (SCREEN+40*0)[idx] = '+'
// [4] *((const nomodify byte*) SCREEN + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuxx=vbuc2 // [4] *((const nomodify byte*) SCREEN + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuyy=vbuc2
lda #'+' lda #'+'
sta SCREEN,x sta SCREEN,y
// main::@2 // main::@2
__b2: __b2:
// i&2 // i&2
// [5] (byte~) main::$2 ← (byte) main::i#10 & (byte) 2 -- vbuaa=vbuyy_band_vbuc1 // [5] (byte~) main::$5 ← (byte) main::i#10 & (byte) 2 -- vbuz1=vbuxx_band_vbuc1
tya lda #2
and #2 sax.z __5
// if(i&2) // if(i&2)
// [6] if((byte) 0==(byte~) main::$2) goto main::@3 -- vbuc1_eq_vbuaa_then_la1 // [6] if((byte) 0==(byte~) main::$5) goto main::@3 -- vbuc1_eq_vbuz1_then_la1
cmp #0 lda #0
cmp.z __5
beq __b3 beq __b3
// main::@7 // main::@7
// (SCREEN+40*1)[idx] = '+' // (SCREEN+40*1)[idx] = '+'
// [7] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 1 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuxx=vbuc2 // [7] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 1 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuyy=vbuc2
lda #'+' lda #'+'
sta SCREEN+$28*1,x sta SCREEN+$28*1,y
// main::@3 // main::@3
__b3: __b3:
// i&1
// [8] (byte~) main::$4 ← (byte) main::i#10 & (byte) 1 -- vbuz1=vbuyy_band_vbuc1
tya
and #1
sta.z __4
// i&2
// [9] (byte~) main::$5 ← (byte) main::i#10 & (byte) 2 -- vbuz1=vbuyy_band_vbuc1
tya
and #2
sta.z __5
// if(i&1 && i&2) // if(i&1 && i&2)
// [10] if((byte) 0==(byte~) main::$4) goto main::@4 -- vbuc1_eq_vbuz1_then_la1 // [8] if((byte) 0==(byte~) main::$4) goto main::@4 -- vbuc1_eq_vbuz1_then_la1
lda #0 lda #0
cmp.z __4 cmp.z __4
beq __b4 beq __b4
// main::@10 // main::@10
// [11] if((byte) 0==(byte~) main::$5) goto main::@4 -- vbuc1_eq_vbuz1_then_la1 // [9] if((byte) 0==(byte~) main::$5) goto main::@4 -- vbuc1_eq_vbuz1_then_la1
cmp.z __5 cmp.z __5
beq __b4 beq __b4
// main::@8 // main::@8
// (SCREEN+40*2)[idx] = '+' // (SCREEN+40*2)[idx] = '+'
// [12] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 2 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuxx=vbuc2 // [10] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 2 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuyy=vbuc2
lda #'+' lda #'+'
sta SCREEN+$28*2,x sta SCREEN+$28*2,y
// main::@4 // main::@4
__b4: __b4:
// i&1
// [13] (byte~) main::$8 ← (byte) main::i#10 & (byte) 1 -- vbuz1=vbuyy_band_vbuc1
tya
and #1
sta.z __8
// i&2
// [14] (byte~) main::$9 ← (byte) main::i#10 & (byte) 2 -- vbuz1=vbuyy_band_vbuc1
tya
and #2
sta.z __9
// if(i&1 || i&2) // if(i&1 || i&2)
// [15] if((byte) 0!=(byte~) main::$8) goto main::@9 -- vbuc1_neq_vbuz1_then_la1 // [11] if((byte) 0!=(byte~) main::$4) goto main::@9 -- vbuc1_neq_vbuz1_then_la1
lda #0 lda #0
cmp.z __8 cmp.z __4
bne __b9 bne __b9
// main::@11 // main::@11
// [16] if((byte) 0==(byte~) main::$9) goto main::@5 -- vbuc1_eq_vbuz1_then_la1 // [12] if((byte) 0==(byte~) main::$5) goto main::@5 -- vbuc1_eq_vbuz1_then_la1
cmp.z __9 cmp.z __5
beq __b5 beq __b5
// main::@9 // main::@9
__b9: __b9:
// (SCREEN+40*3)[idx] = '+' // (SCREEN+40*3)[idx] = '+'
// [17] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 3 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuxx=vbuc2 // [13] *((const nomodify byte*) SCREEN+(byte)(number) $28*(number) 3 + (byte) main::idx#10) ← (byte) '+' -- pbuc1_derefidx_vbuyy=vbuc2
lda #'+' lda #'+'
sta SCREEN+$28*3,x sta SCREEN+$28*3,y
// main::@5 // main::@5
__b5: __b5:
// idx++; // idx++;
// [18] (byte) main::idx#1 ← ++ (byte) main::idx#10 -- vbuxx=_inc_vbuxx // [14] (byte) main::idx#1 ← ++ (byte) main::idx#10 -- vbuyy=_inc_vbuyy
inx
// for( byte i:0..7)
// [19] (byte) main::i#1 ← ++ (byte) main::i#10 -- vbuyy=_inc_vbuyy
iny iny
// [20] if((byte) main::i#1!=(byte) 8) goto main::@1 -- vbuyy_neq_vbuc1_then_la1 // for( byte i:0..7)
cpy #8 // [15] (byte) main::i#1 ← ++ (byte) main::i#10 -- vbuxx=_inc_vbuxx
inx
// [16] if((byte) main::i#1!=(byte) 8) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
cpx #8
bne __b1 bne __b1
// main::@return // main::@return
// } // }
// [21] return // [17] return
rts rts
} }
// File Data // File Data

View File

@ -1,11 +1,7 @@
(const nomodify byte*) SCREEN = (byte*) 1024 (const nomodify byte*) SCREEN = (byte*) 1024
(void()) main() (void()) main()
(byte~) main::$0 reg byte a 22.0 (byte~) main::$4 zp[1]:2 4.888888888888889
(byte~) main::$2 reg byte a 22.0 (byte~) main::$5 zp[1]:3 6.285714285714286
(byte~) main::$4 zp[1]:2 11.0
(byte~) main::$5 zp[1]:3 11.0
(byte~) main::$8 zp[1]:4 11.0
(byte~) main::$9 zp[1]:5 11.0
(label) main::@1 (label) main::@1
(label) main::@10 (label) main::@10
(label) main::@11 (label) main::@11
@ -19,17 +15,13 @@
(label) main::@9 (label) main::@9
(label) main::@return (label) main::@return
(byte) main::i (byte) main::i
(byte) main::i#1 reg byte y 16.5 (byte) main::i#1 reg byte x 16.5
(byte) main::i#10 reg byte y 4.888888888888889 (byte) main::i#10 reg byte x 3.142857142857143
(byte) main::idx (byte) main::idx
(byte) main::idx#1 reg byte x 7.333333333333333 (byte) main::idx#1 reg byte y 7.333333333333333
(byte) main::idx#10 reg byte x 3.8823529411764706 (byte) main::idx#10 reg byte y 5.076923076923077
reg byte y [ main::i#10 main::i#1 ] reg byte x [ main::i#10 main::i#1 ]
reg byte x [ main::idx#10 main::idx#1 ] reg byte y [ main::idx#10 main::idx#1 ]
reg byte a [ main::$0 ]
reg byte a [ main::$2 ]
zp[1]:2 [ main::$4 ] zp[1]:2 [ main::$4 ]
zp[1]:3 [ main::$5 ] zp[1]:3 [ main::$5 ]
zp[1]:4 [ main::$8 ]
zp[1]:5 [ main::$9 ]

View File

@ -79,7 +79,7 @@ main: {
} }
// Initialize bitmap plotting tables // Initialize bitmap plotting tables
bitmap_init: { bitmap_init: {
.label __7 = $14 .label __7 = $16
.label yoffs = 8 .label yoffs = 8
ldx #0 ldx #0
lda #$80 lda #$80
@ -175,8 +175,8 @@ sin16s_gen2: {
.const max = $140 .const max = $140
.label ampl = max-min .label ampl = max-min
.label __6 = $e .label __6 = $e
.label __8 = $19 .label __8 = $1b
.label step = $15 .label step = $17
.label sintab = 6 .label sintab = 6
// u[4.28] // u[4.28]
// Iterate over the table // Iterate over the table
@ -269,9 +269,8 @@ sin16s_gen2: {
} }
render_sine: { render_sine: {
.label __1 = $12 .label __1 = $12
.label __4 = $12 .label __4 = $21
.label __10 = $12 .label __11 = $21
.label __11 = $12
.label sin_val = $12 .label sin_val = $12
.label sin2_val = $12 .label sin2_val = $12
.label xpos = 8 .label xpos = 8
@ -297,15 +296,15 @@ render_sine: {
// sin+sin_idx // sin+sin_idx
lda.z sin_idx lda.z sin_idx
asl asl
sta.z __10 sta.z __11
lda.z sin_idx+1 lda.z sin_idx+1
rol rol
sta.z __10+1 sta.z __11+1
lda.z __11
clc clc
lda.z __1
adc #<sin adc #<sin
sta.z __1 sta.z __1
lda.z __1+1 lda.z __11+1
adc #>sin adc #>sin
sta.z __1+1 sta.z __1+1
// sin_val = *(sin+sin_idx) // sin_val = *(sin+sin_idx)
@ -325,12 +324,6 @@ render_sine: {
// bitmap_plot(xpos,ypos) // bitmap_plot(xpos,ypos)
jsr bitmap_plot jsr bitmap_plot
// sin2+sin_idx // sin2+sin_idx
lda.z sin_idx
asl
sta.z __11
lda.z sin_idx+1
rol
sta.z __11+1
clc clc
lda.z __4 lda.z __4
adc #<sin2 adc #<sin2
@ -340,13 +333,11 @@ render_sine: {
sta.z __4+1 sta.z __4+1
// sin2_val = *(sin2+sin_idx) // sin2_val = *(sin2+sin_idx)
ldy #0 ldy #0
lda (sin2_val),y lda (__4),y
pha
iny
lda (sin2_val),y
sta.z sin2_val+1
pla
sta.z sin2_val sta.z sin2_val
iny
lda (__4),y
sta.z sin2_val+1
// wrap_y(sin2_val+10) // wrap_y(sin2_val+10)
lda.z wrap_y.y lda.z wrap_y.y
clc clc
@ -431,9 +422,9 @@ memset: {
// Divide unsigned 32-bit unsigned long dividend with a 16-bit unsigned int divisor // Divide unsigned 32-bit unsigned long dividend with a 16-bit unsigned int divisor
// The 16-bit unsigned int remainder can be found in rem16u after the division // The 16-bit unsigned int remainder can be found in rem16u after the division
div32u16u: { div32u16u: {
.label quotient_hi = $1f .label quotient_hi = $21
.label quotient_lo = $25 .label quotient_lo = $14
.label return = $15 .label return = $17
// divr16u(>dividend, divisor, 0) // divr16u(>dividend, divisor, 0)
lda #<PI2_u4f28>>$10 lda #<PI2_u4f28>>$10
sta.z divr16u.dividend sta.z divr16u.dividend
@ -474,17 +465,17 @@ div32u16u: {
// result: signed int sin(x) s[0.15] - using the full range -$7fff - $7fff // result: signed int sin(x) s[0.15] - using the full range -$7fff - $7fff
// sin16s(dword zp($a) x) // sin16s(dword zp($a) x)
sin16s: { sin16s: {
.label __4 = $1b .label __4 = $1d
.label x = $a .label x = $a
.label return = $12 .label return = $12
.label x1 = $1f .label x1 = $21
.label x2 = $23 .label x2 = $25
.label x3 = $23 .label x3 = $25
.label x3_6 = $21 .label x3_6 = $23
.label usinx = $12 .label usinx = $12
.label x4 = $23 .label x4 = $25
.label x5 = $21 .label x5 = $23
.label x5_128 = $21 .label x5_128 = $23
.label sinx = $12 .label sinx = $12
// if(x >= PI_u4f28 ) // if(x >= PI_u4f28 )
lda.z x+3 lda.z x+3
@ -809,12 +800,12 @@ bitmap_plot: {
// Returns the quotient dividend/divisor. // Returns the quotient dividend/divisor.
// The final remainder will be set into the global variable rem16u // The final remainder will be set into the global variable rem16u
// Implemented using simple binary division // Implemented using simple binary division
// divr16u(word zp($23) dividend, word zp($12) rem) // divr16u(word zp($25) dividend, word zp($12) rem)
divr16u: { divr16u: {
.label rem = $12 .label rem = $12
.label dividend = $23 .label dividend = $25
.label quotient = $25 .label quotient = $14
.label return = $25 .label return = $14
ldx #0 ldx #0
txa txa
sta.z quotient sta.z quotient
@ -874,14 +865,14 @@ divr16u: {
} }
// Calculate val*val for two unsigned int values - the result is 16 selected bits of the 32-bit result. // Calculate val*val for two unsigned int values - the result is 16 selected bits of the 32-bit result.
// The select parameter indicates how many of the highest bits of the 32-bit result to skip // The select parameter indicates how many of the highest bits of the 32-bit result to skip
// mulu16_sel(word zp($23) v1, word zp($25) v2, byte register(X) select) // mulu16_sel(word zp($25) v1, word zp($14) v2, byte register(X) select)
mulu16_sel: { mulu16_sel: {
.label __0 = $e .label __0 = $e
.label __1 = $e .label __1 = $e
.label v1 = $23 .label v1 = $25
.label v2 = $25 .label v2 = $14
.label return = $21 .label return = $23
.label return_1 = $23 .label return_1 = $25
// mul16u(v1, v2) // mul16u(v1, v2)
lda.z v1 lda.z v1
sta.z mul16u.a sta.z mul16u.a
@ -909,13 +900,13 @@ mulu16_sel: {
rts rts
} }
// Perform binary multiplication of two unsigned 16-bit unsigned ints into a 32-bit unsigned long // Perform binary multiplication of two unsigned 16-bit unsigned ints into a 32-bit unsigned long
// mul16u(word zp($19) a, word zp($25) b) // mul16u(word zp($1b) a, word zp($14) b)
mul16u: { mul16u: {
.label mb = $1b .label mb = $1d
.label a = $19 .label a = $1b
.label res = $e .label res = $e
.label return = $e .label return = $e
.label b = $25 .label b = $14
// mb = b // mb = b
lda.z b lda.z b
sta.z mb sta.z mb

View File

@ -146,8 +146,8 @@ render_sine::@return: scope:[render_sine] from render_sine::@1
[67] return [67] return
to:@return to:@return
render_sine::@2: scope:[render_sine] from render_sine::@1 render_sine::@2: scope:[render_sine] from render_sine::@1
[68] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 << (byte) 1 [68] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 << (byte) 1
[69] (signed word*~) render_sine::$1 ← (const signed word*) sin + (word~) render_sine::$10 [69] (signed word*~) render_sine::$1 ← (const signed word*) sin + (word~) render_sine::$11
[70] (signed word) render_sine::sin_val#0 ← *((signed word*~) render_sine::$1) [70] (signed word) render_sine::sin_val#0 ← *((signed word*~) render_sine::$1)
[71] (signed word) wrap_y::y#0 ← (signed word) render_sine::sin_val#0 [71] (signed word) wrap_y::y#0 ← (signed word) render_sine::sin_val#0
[72] call wrap_y [72] call wrap_y
@ -160,293 +160,292 @@ render_sine::@4: scope:[render_sine] from render_sine::@2
[77] call bitmap_plot [77] call bitmap_plot
to:render_sine::@5 to:render_sine::@5
render_sine::@5: scope:[render_sine] from render_sine::@4 render_sine::@5: scope:[render_sine] from render_sine::@4
[78] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 << (byte) 1 [78] (signed word*~) render_sine::$4 ← (const signed word*) sin2 + (word~) render_sine::$11
[79] (signed word*~) render_sine::$4 ← (const signed word*) sin2 + (word~) render_sine::$11 [79] (signed word) render_sine::sin2_val#0 ← *((signed word*~) render_sine::$4)
[80] (signed word) render_sine::sin2_val#0 ← *((signed word*~) render_sine::$4) [80] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a
[81] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a [81] call wrap_y
[82] call wrap_y [82] (byte) wrap_y::return#1 ← (byte) wrap_y::return#2
[83] (byte) wrap_y::return#1 ← (byte) wrap_y::return#2
to:render_sine::@6 to:render_sine::@6
render_sine::@6: scope:[render_sine] from render_sine::@5 render_sine::@6: scope:[render_sine] from render_sine::@5
[84] (byte) render_sine::ypos2#0 ← (byte) wrap_y::return#1 [83] (byte) render_sine::ypos2#0 ← (byte) wrap_y::return#1
[85] (word) bitmap_plot::x#1 ← (word) render_sine::xpos#3 [84] (word) bitmap_plot::x#1 ← (word) render_sine::xpos#3
[86] (byte) bitmap_plot::y#1 ← (byte) render_sine::ypos2#0 [85] (byte) bitmap_plot::y#1 ← (byte) render_sine::ypos2#0
[87] call bitmap_plot [86] call bitmap_plot
to:render_sine::@7 to:render_sine::@7
render_sine::@7: scope:[render_sine] from render_sine::@6 render_sine::@7: scope:[render_sine] from render_sine::@6
[88] (word) render_sine::xpos#1 ← ++ (word) render_sine::xpos#3 [87] (word) render_sine::xpos#1 ← ++ (word) render_sine::xpos#3
[89] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@8 [88] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@8
to:render_sine::@3 to:render_sine::@3
render_sine::@8: scope:[render_sine] from render_sine::@7 render_sine::@8: scope:[render_sine] from render_sine::@7
[90] phi() [89] phi()
to:render_sine::@3 to:render_sine::@3
render_sine::@3: scope:[render_sine] from render_sine::@7 render_sine::@8 render_sine::@3: scope:[render_sine] from render_sine::@7 render_sine::@8
[91] (word) render_sine::xpos#9 ← phi( render_sine::@7/(byte) 0 render_sine::@8/(word) render_sine::xpos#1 ) [90] (word) render_sine::xpos#9 ← phi( render_sine::@7/(byte) 0 render_sine::@8/(word) render_sine::xpos#1 )
[92] (word) render_sine::sin_idx#1 ← ++ (word) render_sine::sin_idx#2 [91] (word) render_sine::sin_idx#1 ← ++ (word) render_sine::sin_idx#2
to:render_sine::@1 to:render_sine::@1
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from bitmap_clear bitmap_clear::@1 memset: scope:[memset] from bitmap_clear bitmap_clear::@1
[93] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) [92] (byte) memset::c#4 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 )
[93] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN bitmap_clear::@1/(void*)(const byte*) BITMAP ) [92] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN bitmap_clear::@1/(void*)(const byte*) BITMAP )
[93] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 ) [92] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 )
[94] if((word) memset::num#2<=(byte) 0) goto memset::@return [93] if((word) memset::num#2<=(byte) 0) goto memset::@return
to:memset::@1 to:memset::@1
memset::@1: scope:[memset] from memset memset::@1: scope:[memset] from memset
[95] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 [94] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
[96] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3 [95] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
to:memset::@2 to:memset::@2
memset::@2: scope:[memset] from memset::@1 memset::@3 memset::@2: scope:[memset] from memset::@1 memset::@3
[97] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 ) [96] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
[98] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 [97] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
to:memset::@return to:memset::@return
memset::@return: scope:[memset] from memset memset::@2 memset::@return: scope:[memset] from memset memset::@2
[99] return [98] return
to:@return to:@return
memset::@3: scope:[memset] from memset::@2 memset::@3: scope:[memset] from memset::@2
[100] *((byte*) memset::dst#2) ← (byte) memset::c#4 [99] *((byte*) memset::dst#2) ← (byte) memset::c#4
[101] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 [100] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
to:memset::@2 to:memset::@2
(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) (dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor)
div32u16u: scope:[div32u16u] from sin16s_gen2 div32u16u: scope:[div32u16u] from sin16s_gen2
[102] phi() [101] phi()
[103] call divr16u [102] call divr16u
[104] (word) divr16u::return#2 ← (word) divr16u::return#0 [103] (word) divr16u::return#2 ← (word) divr16u::return#0
to:div32u16u::@1 to:div32u16u::@1
div32u16u::@1: scope:[div32u16u] from div32u16u div32u16u::@1: scope:[div32u16u] from div32u16u
[105] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [104] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2
[106] (word) divr16u::rem#4 ← (word) rem16u#0 [105] (word) divr16u::rem#4 ← (word) rem16u#0
[107] call divr16u [106] call divr16u
[108] (word) divr16u::return#3 ← (word) divr16u::return#0 [107] (word) divr16u::return#3 ← (word) divr16u::return#0
to:div32u16u::@2 to:div32u16u::@2
div32u16u::@2: scope:[div32u16u] from div32u16u::@1 div32u16u::@2: scope:[div32u16u] from div32u16u::@1
[109] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [108] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3
[110] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [109] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0
to:div32u16u::@return to:div32u16u::@return
div32u16u::@return: scope:[div32u16u] from div32u16u::@2 div32u16u::@return: scope:[div32u16u] from div32u16u::@2
[111] return [110] return
to:@return to:@return
(signed word()) sin16s((dword) sin16s::x) (signed word()) sin16s((dword) sin16s::x)
sin16s: scope:[sin16s] from sin16s_gen2::@2 sin16s: scope:[sin16s] from sin16s_gen2::@2
[112] if((dword) sin16s::x#0<(const nomodify dword) PI_u4f28) goto sin16s::@1 [111] if((dword) sin16s::x#0<(const nomodify dword) PI_u4f28) goto sin16s::@1
to:sin16s::@4 to:sin16s::@4
sin16s::@4: scope:[sin16s] from sin16s sin16s::@4: scope:[sin16s] from sin16s
[113] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const nomodify dword) PI_u4f28 [112] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const nomodify dword) PI_u4f28
to:sin16s::@1 to:sin16s::@1
sin16s::@1: scope:[sin16s] from sin16s sin16s::@4 sin16s::@1: scope:[sin16s] from sin16s sin16s::@4
[114] (byte) sin16s::isUpper#2 ← phi( sin16s/(byte) 0 sin16s::@4/(byte) 1 ) [113] (byte) sin16s::isUpper#2 ← phi( sin16s/(byte) 0 sin16s::@4/(byte) 1 )
[114] (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#0 sin16s::@4/(dword) sin16s::x#1 ) [113] (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#0 sin16s::@4/(dword) sin16s::x#1 )
[115] if((dword) sin16s::x#4<(const nomodify dword) PI_HALF_u4f28) goto sin16s::@2 [114] if((dword) sin16s::x#4<(const nomodify dword) PI_HALF_u4f28) goto sin16s::@2
to:sin16s::@5 to:sin16s::@5
sin16s::@5: scope:[sin16s] from sin16s::@1 sin16s::@5: scope:[sin16s] from sin16s::@1
[116] (dword) sin16s::x#2 ← (const nomodify dword) PI_u4f28 - (dword) sin16s::x#4 [115] (dword) sin16s::x#2 ← (const nomodify dword) PI_u4f28 - (dword) sin16s::x#4
to:sin16s::@2 to:sin16s::@2
sin16s::@2: scope:[sin16s] from sin16s::@1 sin16s::@5 sin16s::@2: scope:[sin16s] from sin16s::@1 sin16s::@5
[117] (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 ) [116] (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 )
[118] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 [117] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3
[119] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 [118] (word) sin16s::x1#0 ← > (dword~) sin16s::$4
[120] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 [119] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0
[121] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 [120] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0
[122] call mulu16_sel [121] call mulu16_sel
[123] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 [122] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12
to:sin16s::@7 to:sin16s::@7
sin16s::@7: scope:[sin16s] from sin16s::@2 sin16s::@7: scope:[sin16s] from sin16s::@2
[124] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 [123] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0
[125] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 [124] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0
[126] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 [125] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0
[127] call mulu16_sel [126] call mulu16_sel
[128] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 [127] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12
to:sin16s::@8 to:sin16s::@8
sin16s::@8: scope:[sin16s] from sin16s::@7 sin16s::@8: scope:[sin16s] from sin16s::@7
[129] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 [128] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1
[130] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 [129] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0
[131] call mulu16_sel [130] call mulu16_sel
[132] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 [131] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12
to:sin16s::@9 to:sin16s::@9
sin16s::@9: scope:[sin16s] from sin16s::@8 sin16s::@9: scope:[sin16s] from sin16s::@8
[133] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 [132] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2
[134] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 [133] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0
[135] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 [134] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0
[136] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 [135] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0
[137] call mulu16_sel [136] call mulu16_sel
[138] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 [137] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12
to:sin16s::@10 to:sin16s::@10
sin16s::@10: scope:[sin16s] from sin16s::@9 sin16s::@10: scope:[sin16s] from sin16s::@9
[139] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 [138] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10
[140] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [139] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0
[141] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [140] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0
[142] call mulu16_sel [141] call mulu16_sel
[143] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [142] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12
to:sin16s::@11 to:sin16s::@11
sin16s::@11: scope:[sin16s] from sin16s::@10 sin16s::@11: scope:[sin16s] from sin16s::@10
[144] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [143] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11
[145] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [144] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4
[146] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [145] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0
[147] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 [146] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12
to:sin16s::@6 to:sin16s::@6
sin16s::@6: scope:[sin16s] from sin16s::@11 sin16s::@6: scope:[sin16s] from sin16s::@11
[148] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [147] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1
to:sin16s::@3 to:sin16s::@3
sin16s::@3: scope:[sin16s] from sin16s::@12 sin16s::@6 sin16s::@3: scope:[sin16s] from sin16s::@12 sin16s::@6
[149] (signed word) sin16s::return#1 ← phi( sin16s::@12/(signed word) sin16s::return#5 sin16s::@6/(signed word) sin16s::sinx#1 ) [148] (signed word) sin16s::return#1 ← phi( sin16s::@12/(signed word) sin16s::return#5 sin16s::@6/(signed word) sin16s::sinx#1 )
to:sin16s::@return to:sin16s::@return
sin16s::@return: scope:[sin16s] from sin16s::@3 sin16s::@return: scope:[sin16s] from sin16s::@3
[150] return [149] return
to:@return to:@return
sin16s::@12: scope:[sin16s] from sin16s::@11 sin16s::@12: scope:[sin16s] from sin16s::@11
[151] (signed word) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [150] (signed word) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1
to:sin16s::@3 to:sin16s::@3
(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) (signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b)
mul16s: scope:[mul16s] from sin16s_gen2::@4 mul16s: scope:[mul16s] from sin16s_gen2::@4
[152] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#0 [151] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#0
[153] call mul16u [152] call mul16u
[154] (dword) mul16u::return#2 ← (dword) mul16u::res#2 [153] (dword) mul16u::return#2 ← (dword) mul16u::res#2
to:mul16s::@4 to:mul16s::@4
mul16s::@4: scope:[mul16s] from mul16s mul16s::@4: scope:[mul16s] from mul16s
[155] (dword) mul16s::m#0 ← (dword) mul16u::return#2 [154] (dword) mul16s::m#0 ← (dword) mul16u::return#2
[156] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 [155] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1
to:mul16s::@3 to:mul16s::@3
mul16s::@3: scope:[mul16s] from mul16s::@4 mul16s::@3: scope:[mul16s] from mul16s::@4
[157] (word~) mul16s::$6 ← > (dword) mul16s::m#0 [156] (word~) mul16s::$6 ← > (dword) mul16s::m#0
[158] (word~) mul16s::$11 ← (word~) mul16s::$6 - (word)(const signed word) sin16s_gen2::ampl#0 [157] (word~) mul16s::$11 ← (word~) mul16s::$6 - (word)(const signed word) sin16s_gen2::ampl#0
[159] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$11 [158] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$11
to:mul16s::@1 to:mul16s::@1
mul16s::@1: scope:[mul16s] from mul16s::@3 mul16s::@4 mul16s::@1: scope:[mul16s] from mul16s::@3 mul16s::@4
[160] (dword) mul16s::m#4 ← phi( mul16s::@3/(dword) mul16s::m#1 mul16s::@4/(dword) mul16s::m#0 ) [159] (dword) mul16s::m#4 ← phi( mul16s::@3/(dword) mul16s::m#1 mul16s::@4/(dword) mul16s::m#0 )
to:mul16s::@2 to:mul16s::@2
mul16s::@2: scope:[mul16s] from mul16s::@1 mul16s::@2: scope:[mul16s] from mul16s::@1
[161] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 [160] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4
to:mul16s::@return to:mul16s::@return
mul16s::@return: scope:[mul16s] from mul16s::@2 mul16s::@return: scope:[mul16s] from mul16s::@2
[162] return [161] return
to:@return to:@return
(byte()) wrap_y((signed word) wrap_y::y) (byte()) wrap_y((signed word) wrap_y::y)
wrap_y: scope:[wrap_y] from render_sine::@2 render_sine::@5 wrap_y: scope:[wrap_y] from render_sine::@2 render_sine::@5
[163] (signed word) wrap_y::y#9 ← phi( render_sine::@2/(signed word) wrap_y::y#0 render_sine::@5/(signed word) wrap_y::y#1 ) [162] (signed word) wrap_y::y#9 ← phi( render_sine::@2/(signed word) wrap_y::y#0 render_sine::@5/(signed word) wrap_y::y#1 )
to:wrap_y::@1 to:wrap_y::@1
wrap_y::@1: scope:[wrap_y] from wrap_y wrap_y::@2 wrap_y::@1: scope:[wrap_y] from wrap_y wrap_y::@2
[164] (signed word) wrap_y::y#4 ← phi( wrap_y/(signed word) wrap_y::y#9 wrap_y::@2/(signed word) wrap_y::y#2 ) [163] (signed word) wrap_y::y#4 ← phi( wrap_y/(signed word) wrap_y::y#9 wrap_y::@2/(signed word) wrap_y::y#2 )
[165] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 [164] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2
to:wrap_y::@3 to:wrap_y::@3
wrap_y::@3: scope:[wrap_y] from wrap_y::@1 wrap_y::@4 wrap_y::@3: scope:[wrap_y] from wrap_y::@1 wrap_y::@4
[166] (signed word) wrap_y::y#6 ← phi( wrap_y::@1/(signed word) wrap_y::y#4 wrap_y::@4/(signed word) wrap_y::y#3 ) [165] (signed word) wrap_y::y#6 ← phi( wrap_y::@1/(signed word) wrap_y::y#4 wrap_y::@4/(signed word) wrap_y::y#3 )
[167] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4 [166] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4
to:wrap_y::@5 to:wrap_y::@5
wrap_y::@5: scope:[wrap_y] from wrap_y::@3 wrap_y::@5: scope:[wrap_y] from wrap_y::@3
[168] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6 [167] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6
to:wrap_y::@return to:wrap_y::@return
wrap_y::@return: scope:[wrap_y] from wrap_y::@5 wrap_y::@return: scope:[wrap_y] from wrap_y::@5
[169] return [168] return
to:@return to:@return
wrap_y::@4: scope:[wrap_y] from wrap_y::@3 wrap_y::@4: scope:[wrap_y] from wrap_y::@3
[170] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8 [169] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8
to:wrap_y::@3 to:wrap_y::@3
wrap_y::@2: scope:[wrap_y] from wrap_y::@1 wrap_y::@2: scope:[wrap_y] from wrap_y::@1
[171] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8 [170] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8
to:wrap_y::@1 to:wrap_y::@1
(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) (void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y)
bitmap_plot: scope:[bitmap_plot] from render_sine::@4 render_sine::@6 bitmap_plot: scope:[bitmap_plot] from render_sine::@4 render_sine::@6
[172] (word) bitmap_plot::x#2 ← phi( render_sine::@4/(word) bitmap_plot::x#0 render_sine::@6/(word) bitmap_plot::x#1 ) [171] (word) bitmap_plot::x#2 ← phi( render_sine::@4/(word) bitmap_plot::x#0 render_sine::@6/(word) bitmap_plot::x#1 )
[172] (byte) bitmap_plot::y#2 ← phi( render_sine::@4/(byte) bitmap_plot::y#0 render_sine::@6/(byte) bitmap_plot::y#1 ) [171] (byte) bitmap_plot::y#2 ← phi( render_sine::@4/(byte) bitmap_plot::y#0 render_sine::@6/(byte) bitmap_plot::y#1 )
[173] (word) bitmap_plot::plotter#0 ← *((const to_nomodify byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#2) w= *((const to_nomodify byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#2) [172] (word) bitmap_plot::plotter#0 ← *((const to_nomodify byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#2) w= *((const to_nomodify byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#2)
[174] (word~) bitmap_plot::$0 ← (word) bitmap_plot::x#2 & (word) $fff8 [173] (word~) bitmap_plot::$0 ← (word) bitmap_plot::x#2 & (word) $fff8
[175] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$0 [174] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$0
[176] (byte~) bitmap_plot::$1 ← < (word) bitmap_plot::x#2 [175] (byte~) bitmap_plot::$1 ← < (word) bitmap_plot::x#2
[177] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const to_nomodify byte*) bitmap_plot_bit + (byte~) bitmap_plot::$1) [176] *((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 to:bitmap_plot::@return
bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot
[178] return [177] return
to:@return to:@return
(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) (word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem)
divr16u: scope:[divr16u] from div32u16u div32u16u::@1 divr16u: scope:[divr16u] from div32u16u div32u16u::@1
[179] (word) divr16u::dividend#5 ← phi( div32u16u/>(const nomodify dword) PI2_u4f28 div32u16u::@1/<(const nomodify dword) PI2_u4f28 ) [178] (word) divr16u::dividend#5 ← phi( div32u16u/>(const nomodify dword) PI2_u4f28 div32u16u::@1/<(const nomodify dword) PI2_u4f28 )
[179] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) [178] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 )
to:divr16u::@1 to:divr16u::@1
divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 divr16u::@1: scope:[divr16u] from divr16u divr16u::@3
[180] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) [179] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 )
[180] (word) divr16u::quotient#3 ← phi( divr16u/(word) 0 divr16u::@3/(word) divr16u::return#0 ) [179] (word) divr16u::quotient#3 ← phi( divr16u/(word) 0 divr16u::@3/(word) divr16u::return#0 )
[180] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) [179] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 )
[180] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) [179] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 )
[181] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 [180] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1
[182] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [181] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3
[183] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 [182] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80
[184] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 [183] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2
to:divr16u::@4 to:divr16u::@4
divr16u::@4: scope:[divr16u] from divr16u::@1 divr16u::@4: scope:[divr16u] from divr16u::@1
[185] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [184] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1
to:divr16u::@2 to:divr16u::@2
divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4
[186] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) [185] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 )
[187] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 [186] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1
[188] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 [187] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1
[189] if((word) divr16u::rem#6<(const nomodify word) SIN_SIZE) goto divr16u::@3 [188] if((word) divr16u::rem#6<(const nomodify word) SIN_SIZE) goto divr16u::@3
to:divr16u::@5 to:divr16u::@5
divr16u::@5: scope:[divr16u] from divr16u::@2 divr16u::@5: scope:[divr16u] from divr16u::@2
[190] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 [189] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1
[191] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const nomodify word) SIN_SIZE [190] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const nomodify word) SIN_SIZE
to:divr16u::@3 to:divr16u::@3
divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5
[192] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) [191] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 )
[192] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) [191] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 )
[193] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 [192] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2
[194] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 [193] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1
to:divr16u::@6 to:divr16u::@6
divr16u::@6: scope:[divr16u] from divr16u::@3 divr16u::@6: scope:[divr16u] from divr16u::@3
[195] (word) rem16u#0 ← (word) divr16u::rem#11 [194] (word) rem16u#0 ← (word) divr16u::rem#11
to:divr16u::@return to:divr16u::@return
divr16u::@return: scope:[divr16u] from divr16u::@6 divr16u::@return: scope:[divr16u] from divr16u::@6
[196] return [195] return
to:@return to:@return
(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) (word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select)
mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9
[197] (byte) mulu16_sel::select#5 ← phi( sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 sin16s::@9/(byte) 0 ) [196] (byte) mulu16_sel::select#5 ← phi( sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 sin16s::@9/(byte) 0 )
[197] (word) mulu16_sel::v2#5 ← phi( sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 sin16s::@9/(word) mulu16_sel::v2#3 ) [196] (word) mulu16_sel::v2#5 ← phi( sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 sin16s::@9/(word) mulu16_sel::v2#3 )
[197] (word) mulu16_sel::v1#5 ← phi( sin16s::@10/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@7/(word) mulu16_sel::v1#1 sin16s::@8/(word) mulu16_sel::v1#2 sin16s::@9/(word) mulu16_sel::v1#3 ) [196] (word) mulu16_sel::v1#5 ← phi( sin16s::@10/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@7/(word) mulu16_sel::v1#1 sin16s::@8/(word) mulu16_sel::v1#2 sin16s::@9/(word) mulu16_sel::v1#3 )
[198] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 [197] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5
[199] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 [198] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5
[200] call mul16u [199] call mul16u
[201] (dword) mul16u::return#3 ← (dword) mul16u::res#2 [200] (dword) mul16u::return#3 ← (dword) mul16u::res#2
to:mulu16_sel::@1 to:mulu16_sel::@1
mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel
[202] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 [201] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3
[203] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 [202] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5
[204] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 [203] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1
to:mulu16_sel::@return to:mulu16_sel::@return
mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1
[205] return [204] return
to:@return to:@return
(dword()) mul16u((word) mul16u::a , (word) mul16u::b) (dword()) mul16u((word) mul16u::a , (word) mul16u::b)
mul16u: scope:[mul16u] from mul16s mulu16_sel mul16u: scope:[mul16u] from mul16s mulu16_sel
[206] (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mulu16_sel/(word) mul16u::a#2 ) [205] (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mulu16_sel/(word) mul16u::a#2 )
[206] (word) mul16u::b#2 ← phi( mul16s/(word)(const signed word) sin16s_gen2::ampl#0 mulu16_sel/(word) mul16u::b#1 ) [205] (word) mul16u::b#2 ← phi( mul16s/(word)(const signed word) sin16s_gen2::ampl#0 mulu16_sel/(word) mul16u::b#1 )
[207] (dword) mul16u::mb#0 ← (dword)(word) mul16u::b#2 [206] (dword) mul16u::mb#0 ← (dword)(word) mul16u::b#2
to:mul16u::@1 to:mul16u::@1
mul16u::@1: scope:[mul16u] from mul16u mul16u::@3 mul16u::@1: scope:[mul16u] from mul16u mul16u::@3
[208] (dword) mul16u::mb#2 ← phi( mul16u/(dword) mul16u::mb#0 mul16u::@3/(dword) mul16u::mb#1 ) [207] (dword) mul16u::mb#2 ← phi( mul16u/(dword) mul16u::mb#0 mul16u::@3/(dword) mul16u::mb#1 )
[208] (dword) mul16u::res#2 ← phi( mul16u/(dword) 0 mul16u::@3/(dword) mul16u::res#6 ) [207] (dword) mul16u::res#2 ← phi( mul16u/(dword) 0 mul16u::@3/(dword) mul16u::res#6 )
[208] (word) mul16u::a#3 ← phi( mul16u/(word) mul16u::a#6 mul16u::@3/(word) mul16u::a#0 ) [207] (word) mul16u::a#3 ← phi( mul16u/(word) mul16u::a#6 mul16u::@3/(word) mul16u::a#0 )
[209] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 [208] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2
to:mul16u::@return to:mul16u::@return
mul16u::@return: scope:[mul16u] from mul16u::@1 mul16u::@return: scope:[mul16u] from mul16u::@1
[210] return [209] return
to:@return to:@return
mul16u::@2: scope:[mul16u] from mul16u::@1 mul16u::@2: scope:[mul16u] from mul16u::@1
[211] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 [210] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1
[212] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 [211] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3
to:mul16u::@4 to:mul16u::@4
mul16u::@4: scope:[mul16u] from mul16u::@2 mul16u::@4: scope:[mul16u] from mul16u::@2
[213] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [212] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2
to:mul16u::@3 to:mul16u::@3
mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4 mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4
[214] (dword) mul16u::res#6 ← phi( mul16u::@2/(dword) mul16u::res#2 mul16u::@4/(dword) mul16u::res#1 ) [213] (dword) mul16u::res#6 ← phi( mul16u::@2/(dword) mul16u::res#2 mul16u::@4/(dword) mul16u::res#1 )
[215] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 [214] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1
[216] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 [215] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1
to:mul16u::@1 to:mul16u::@1

File diff suppressed because it is too large Load Diff

View File

@ -117,7 +117,7 @@
(byte~) bitmap_init::$4 reg byte a 202.0 (byte~) bitmap_init::$4 reg byte a 202.0
(byte~) bitmap_init::$5 reg byte a 202.0 (byte~) bitmap_init::$5 reg byte a 202.0
(byte~) bitmap_init::$6 reg byte a 202.0 (byte~) bitmap_init::$6 reg byte a 202.0
(byte~) bitmap_init::$7 zp[1]:20 50.5 (byte~) bitmap_init::$7 zp[1]:22 50.5
(label) bitmap_init::@1 (label) bitmap_init::@1
(label) bitmap_init::@2 (label) bitmap_init::@2
(label) bitmap_init::@3 (label) bitmap_init::@3
@ -168,12 +168,12 @@
(word) div32u16u::divisor (word) div32u16u::divisor
(dword) div32u16u::quotient (dword) div32u16u::quotient
(word) div32u16u::quotient_hi (word) div32u16u::quotient_hi
(word) div32u16u::quotient_hi#0 quotient_hi zp[2]:31 40.4 (word) div32u16u::quotient_hi#0 quotient_hi zp[2]:33 40.4
(word) div32u16u::quotient_lo (word) div32u16u::quotient_lo
(word) div32u16u::quotient_lo#0 quotient_lo zp[2]:37 202.0 (word) div32u16u::quotient_lo#0 quotient_lo zp[2]:20 202.0
(dword) div32u16u::return (dword) div32u16u::return
(dword) div32u16u::return#0 return zp[4]:21 37.33333333333333 (dword) div32u16u::return#0 return zp[4]:23 37.33333333333333
(dword) div32u16u::return#2 return zp[4]:21 22.0 (dword) div32u16u::return#2 return zp[4]:23 22.0
(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) (word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem)
(byte~) divr16u::$1 reg byte a 20002.0 (byte~) divr16u::$1 reg byte a 20002.0
(byte~) divr16u::$2 reg byte a 20002.0 (byte~) divr16u::$2 reg byte a 20002.0
@ -185,17 +185,17 @@
(label) divr16u::@6 (label) divr16u::@6
(label) divr16u::@return (label) divr16u::@return
(word) divr16u::dividend (word) divr16u::dividend
(word) divr16u::dividend#0 dividend zp[2]:35 2500.25 (word) divr16u::dividend#0 dividend zp[2]:37 2500.25
(word) divr16u::dividend#3 dividend zp[2]:35 4429.142857142857 (word) divr16u::dividend#3 dividend zp[2]:37 4429.142857142857
(word) divr16u::dividend#5 dividend zp[2]:35 1001.0 (word) divr16u::dividend#5 dividend zp[2]:37 1001.0
(word) divr16u::divisor (word) divr16u::divisor
(byte) divr16u::i (byte) divr16u::i
(byte) divr16u::i#1 reg byte x 15001.5 (byte) divr16u::i#1 reg byte x 15001.5
(byte) divr16u::i#2 reg byte x 1538.6153846153845 (byte) divr16u::i#2 reg byte x 1538.6153846153845
(word) divr16u::quotient (word) divr16u::quotient
(word) divr16u::quotient#1 quotient zp[2]:37 15001.5 (word) divr16u::quotient#1 quotient zp[2]:20 15001.5
(word) divr16u::quotient#2 quotient zp[2]:37 10001.0 (word) divr16u::quotient#2 quotient zp[2]:20 10001.0
(word) divr16u::quotient#3 quotient zp[2]:37 2500.25 (word) divr16u::quotient#3 quotient zp[2]:20 2500.25
(word) divr16u::rem (word) divr16u::rem
(word) divr16u::rem#0 rem zp[2]:18 7500.75 (word) divr16u::rem#0 rem zp[2]:18 7500.75
(word) divr16u::rem#1 rem zp[2]:18 20002.0 (word) divr16u::rem#1 rem zp[2]:18 20002.0
@ -206,9 +206,9 @@
(word) divr16u::rem#5 rem zp[2]:18 21003.0 (word) divr16u::rem#5 rem zp[2]:18 21003.0
(word) divr16u::rem#6 rem zp[2]:18 10001.0 (word) divr16u::rem#6 rem zp[2]:18 10001.0
(word) divr16u::return (word) divr16u::return
(word) divr16u::return#0 return zp[2]:37 4315.0 (word) divr16u::return#0 return zp[2]:20 4315.0
(word) divr16u::return#2 return zp[2]:37 202.0 (word) divr16u::return#2 return zp[2]:20 202.0
(word) divr16u::return#3 return zp[2]:37 202.0 (word) divr16u::return#3 return zp[2]:20 202.0
(void()) main() (void()) main()
(label) main::@1 (label) main::@1
(label) main::@2 (label) main::@2
@ -272,18 +272,18 @@
(label) mul16u::@4 (label) mul16u::@4
(label) mul16u::@return (label) mul16u::@return
(word) mul16u::a (word) mul16u::a
(word) mul16u::a#0 a zp[2]:25 1.0000001E7 (word) mul16u::a#0 a zp[2]:27 1.0000001E7
(word) mul16u::a#1 a zp[2]:25 2002.0 (word) mul16u::a#1 a zp[2]:27 2002.0
(word) mul16u::a#2 a zp[2]:25 10001.0 (word) mul16u::a#2 a zp[2]:27 10001.0
(word) mul16u::a#3 a zp[2]:25 6683334.166666666 (word) mul16u::a#3 a zp[2]:27 6683334.166666666
(word) mul16u::a#6 a zp[2]:25 55501.5 (word) mul16u::a#6 a zp[2]:27 55501.5
(word) mul16u::b (word) mul16u::b
(word) mul16u::b#1 b zp[2]:37 20002.0 (word) mul16u::b#1 b zp[2]:20 20002.0
(word) mul16u::b#2 b zp[2]:37 10001.0 (word) mul16u::b#2 b zp[2]:20 10001.0
(dword) mul16u::mb (dword) mul16u::mb
(dword) mul16u::mb#0 mb zp[4]:27 200002.0 (dword) mul16u::mb#0 mb zp[4]:29 200002.0
(dword) mul16u::mb#1 mb zp[4]:27 2.0000002E7 (dword) mul16u::mb#1 mb zp[4]:29 2.0000002E7
(dword) mul16u::mb#2 mb zp[4]:27 4300000.571428571 (dword) mul16u::mb#2 mb zp[4]:29 4300000.571428571
(dword) mul16u::res (dword) mul16u::res
(dword) mul16u::res#1 res zp[4]:14 2.0000002E7 (dword) mul16u::res#1 res zp[4]:14 2.0000002E7
(dword) mul16u::res#2 res zp[4]:14 4287286.428571429 (dword) mul16u::res#2 res zp[4]:14 4287286.428571429
@ -297,34 +297,33 @@
(label) mulu16_sel::@1 (label) mulu16_sel::@1
(label) mulu16_sel::@return (label) mulu16_sel::@return
(word) mulu16_sel::return (word) mulu16_sel::return
(word) mulu16_sel::return#0 return zp[2]:33 2002.0 (word) mulu16_sel::return#0 return zp[2]:35 2002.0
(word) mulu16_sel::return#1 return_1 zp[2]:35 2002.0 (word) mulu16_sel::return#1 return_1 zp[2]:37 2002.0
(word) mulu16_sel::return#10 return_1 zp[2]:35 2002.0 (word) mulu16_sel::return#10 return_1 zp[2]:37 2002.0
(word) mulu16_sel::return#11 return zp[2]:33 2002.0 (word) mulu16_sel::return#11 return zp[2]:35 2002.0
(word) mulu16_sel::return#12 return zp[2]:33 2143.714285714286 (word) mulu16_sel::return#12 return zp[2]:35 2143.714285714286
(word) mulu16_sel::return#2 return zp[2]:33 2002.0 (word) mulu16_sel::return#2 return zp[2]:35 2002.0
(byte) mulu16_sel::select (byte) mulu16_sel::select
(byte) mulu16_sel::select#5 reg byte x 1666.8333333333333 (byte) mulu16_sel::select#5 reg byte x 1666.8333333333333
(word) mulu16_sel::v1 (word) mulu16_sel::v1
(word) mulu16_sel::v1#0 v1 zp[2]:35 1001.0 (word) mulu16_sel::v1#0 v1 zp[2]:37 1001.0
(word) mulu16_sel::v1#1 v1 zp[2]:35 1001.0 (word) mulu16_sel::v1#1 v1 zp[2]:37 1001.0
(word) mulu16_sel::v1#2 v1 zp[2]:35 2002.0 (word) mulu16_sel::v1#2 v1 zp[2]:37 2002.0
(word) mulu16_sel::v1#3 v1 zp[2]:35 1001.0 (word) mulu16_sel::v1#3 v1 zp[2]:37 1001.0
(word) mulu16_sel::v1#4 v1 zp[2]:35 1001.0 (word) mulu16_sel::v1#4 v1 zp[2]:37 1001.0
(word) mulu16_sel::v1#5 v1 zp[2]:35 15006.0 (word) mulu16_sel::v1#5 v1 zp[2]:37 15006.0
(word) mulu16_sel::v2 (word) mulu16_sel::v2
(word) mulu16_sel::v2#0 v2 zp[2]:37 2002.0 (word) mulu16_sel::v2#0 v2 zp[2]:20 2002.0
(word) mulu16_sel::v2#1 v2 zp[2]:37 2002.0 (word) mulu16_sel::v2#1 v2 zp[2]:20 2002.0
(word) mulu16_sel::v2#3 v2 zp[2]:37 2002.0 (word) mulu16_sel::v2#3 v2 zp[2]:20 2002.0
(word) mulu16_sel::v2#4 v2 zp[2]:37 2002.0 (word) mulu16_sel::v2#4 v2 zp[2]:20 2002.0
(word) mulu16_sel::v2#5 v2 zp[2]:37 7002.5 (word) mulu16_sel::v2#5 v2 zp[2]:20 7002.5
(word) rem16u (word) rem16u
(word) rem16u#0 rem16u zp[2]:18 220.39999999999998 (word) rem16u#0 rem16u zp[2]:18 220.39999999999998
(void()) render_sine() (void()) render_sine()
(signed word*~) render_sine::$1 zp[2]:18 202.0 (signed word*~) render_sine::$1 zp[2]:18 202.0
(word~) render_sine::$10 zp[2]:18 202.0 (word~) render_sine::$11 zp[2]:33 30.299999999999997
(word~) render_sine::$11 zp[2]:18 202.0 (signed word*~) render_sine::$4 zp[2]:33 202.0
(signed word*~) render_sine::$4 zp[2]:18 202.0
(label) render_sine::@1 (label) render_sine::@1
(label) render_sine::@2 (label) render_sine::@2
(label) render_sine::@3 (label) render_sine::@3
@ -338,12 +337,12 @@
(signed word) render_sine::sin2_val#0 sin2_val zp[2]:18 202.0 (signed word) render_sine::sin2_val#0 sin2_val zp[2]:18 202.0
(word) render_sine::sin_idx (word) render_sine::sin_idx
(word) render_sine::sin_idx#1 sin_idx zp[2]:6 202.0 (word) render_sine::sin_idx#1 sin_idx zp[2]:6 202.0
(word) render_sine::sin_idx#2 sin_idx zp[2]:6 19.423076923076923 (word) render_sine::sin_idx#2 sin_idx zp[2]:6 16.16
(signed word) render_sine::sin_val (signed word) render_sine::sin_val
(signed word) render_sine::sin_val#0 sin_val zp[2]:18 202.0 (signed word) render_sine::sin_val#0 sin_val zp[2]:18 202.0
(word) render_sine::xpos (word) render_sine::xpos
(word) render_sine::xpos#1 xpos zp[2]:8 101.0 (word) render_sine::xpos#1 xpos zp[2]:8 101.0
(word) render_sine::xpos#3 xpos zp[2]:8 18.363636363636363 (word) render_sine::xpos#3 xpos zp[2]:8 19.238095238095237
(word) render_sine::xpos#9 xpos zp[2]:8 101.0 (word) render_sine::xpos#9 xpos zp[2]:8 101.0
(byte) render_sine::ypos (byte) render_sine::ypos
(byte) render_sine::ypos#0 reg byte x 101.0 (byte) render_sine::ypos#0 reg byte x 101.0
@ -351,7 +350,7 @@
(byte) render_sine::ypos2#0 reg byte x 101.0 (byte) render_sine::ypos2#0 reg byte x 101.0
(const signed word*) sin[(number) $200] = { fill( $200, 0) } (const signed word*) sin[(number) $200] = { fill( $200, 0) }
(signed word()) sin16s((dword) sin16s::x) (signed word()) sin16s((dword) sin16s::x)
(dword~) sin16s::$4 zp[4]:27 2002.0 (dword~) sin16s::$4 zp[4]:29 2002.0
(label) sin16s::@1 (label) sin16s::@1
(label) sin16s::@10 (label) sin16s::@10
(label) sin16s::@11 (label) sin16s::@11
@ -383,22 +382,22 @@
(dword) sin16s::x#4 x zp[4]:10 2502.5 (dword) sin16s::x#4 x zp[4]:10 2502.5
(dword) sin16s::x#6 x zp[4]:10 3003.0 (dword) sin16s::x#6 x zp[4]:10 3003.0
(word) sin16s::x1 (word) sin16s::x1
(word) sin16s::x1#0 x1 zp[2]:31 318.5 (word) sin16s::x1#0 x1 zp[2]:33 318.5
(word) sin16s::x2 (word) sin16s::x2
(word) sin16s::x2#0 x2 zp[2]:35 2002.0 (word) sin16s::x2#0 x2 zp[2]:37 2002.0
(word) sin16s::x3 (word) sin16s::x3
(word) sin16s::x3#0 x3 zp[2]:35 500.5 (word) sin16s::x3#0 x3 zp[2]:37 500.5
(word) sin16s::x3_6 (word) sin16s::x3_6
(word) sin16s::x3_6#0 x3_6 zp[2]:33 2002.0 (word) sin16s::x3_6#0 x3_6 zp[2]:35 2002.0
(word) sin16s::x4 (word) sin16s::x4
(word) sin16s::x4#0 x4 zp[2]:35 2002.0 (word) sin16s::x4#0 x4 zp[2]:37 2002.0
(word) sin16s::x5 (word) sin16s::x5
(word) sin16s::x5#0 x5 zp[2]:33 2002.0 (word) sin16s::x5#0 x5 zp[2]:35 2002.0
(word) sin16s::x5_128 (word) sin16s::x5_128
(word) sin16s::x5_128#0 x5_128 zp[2]:33 2002.0 (word) sin16s::x5_128#0 x5_128 zp[2]:35 2002.0
(void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max) (void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max)
(signed dword~) sin16s_gen2::$6 zp[4]:14 202.0 (signed dword~) sin16s_gen2::$6 zp[4]:14 202.0
(word~) sin16s_gen2::$8 zp[2]:25 101.0 (word~) sin16s_gen2::$8 zp[2]:27 101.0
(label) sin16s_gen2::@1 (label) sin16s_gen2::@1
(label) sin16s_gen2::@2 (label) sin16s_gen2::@2
(label) sin16s_gen2::@3 (label) sin16s_gen2::@3
@ -419,7 +418,7 @@
(signed word*) sin16s_gen2::sintab#0 sintab zp[2]:6 67.33333333333333 (signed word*) sin16s_gen2::sintab#0 sintab zp[2]:6 67.33333333333333
(signed word*) sin16s_gen2::sintab#2 sintab zp[2]:6 27.545454545454547 (signed word*) sin16s_gen2::sintab#2 sintab zp[2]:6 27.545454545454547
(dword) sin16s_gen2::step (dword) sin16s_gen2::step
(dword) sin16s_gen2::step#0 step zp[4]:21 7.466666666666667 (dword) sin16s_gen2::step#0 step zp[4]:23 7.466666666666667
(word) sin16s_gen2::wavelength (word) sin16s_gen2::wavelength
(dword) sin16s_gen2::x (dword) sin16s_gen2::x
(dword) sin16s_gen2::x#1 x zp[4]:2 101.0 (dword) sin16s_gen2::x#1 x zp[4]:2 101.0
@ -459,25 +458,25 @@ reg byte y [ sin16s::isUpper#2 ]
zp[4]:10 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp[4]:10 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ]
zp[4]:14 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#2 sin16s_gen2::$6 mulu16_sel::$0 mulu16_sel::$1 ] zp[4]:14 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#2 sin16s_gen2::$6 mulu16_sel::$0 mulu16_sel::$1 ]
reg byte x [ bitmap_plot::y#2 bitmap_plot::y#0 bitmap_plot::y#1 ] reg byte x [ bitmap_plot::y#2 bitmap_plot::y#0 bitmap_plot::y#1 ]
zp[2]:18 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#0 wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#0 wrap_y::y#1 wrap_y::y#2 wrap_y::y#3 render_sine::sin_val#0 render_sine::sin2_val#0 render_sine::$10 render_sine::$1 render_sine::$11 render_sine::$4 sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 mul16s::a#0 sin16s::usinx#0 memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 ] zp[2]:18 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#0 wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#0 wrap_y::y#1 wrap_y::y#2 wrap_y::y#3 render_sine::sin_val#0 render_sine::sin2_val#0 render_sine::$1 sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 mul16s::a#0 sin16s::usinx#0 memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 ]
reg byte x [ divr16u::i#2 divr16u::i#1 ] reg byte x [ divr16u::i#2 divr16u::i#1 ]
zp[2]:20 [ mulu16_sel::v2#5 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 mulu16_sel::v2#3 mul16u::b#2 mul16u::b#1 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ]
reg byte x [ mulu16_sel::select#5 ] reg byte x [ mulu16_sel::select#5 ]
zp[1]:20 [ bitmap_init::$7 ] zp[1]:22 [ bitmap_init::$7 ]
reg byte a [ bitmap_init::$4 ] reg byte a [ bitmap_init::$4 ]
reg byte a [ bitmap_init::$5 ] reg byte a [ bitmap_init::$5 ]
reg byte a [ bitmap_init::$6 ] reg byte a [ bitmap_init::$6 ]
zp[4]:21 [ div32u16u::return#2 sin16s_gen2::step#0 div32u16u::return#0 ] zp[4]:23 [ div32u16u::return#2 sin16s_gen2::step#0 div32u16u::return#0 ]
zp[2]:25 [ sin16s_gen2::$8 mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ] zp[2]:27 [ sin16s_gen2::$8 mul16u::a#3 mul16u::a#6 mul16u::a#1 mul16u::a#2 mul16u::a#0 ]
reg byte a [ wrap_y::return#0 ] reg byte a [ wrap_y::return#0 ]
reg byte x [ render_sine::ypos#0 ] reg byte x [ render_sine::ypos#0 ]
reg byte a [ wrap_y::return#1 ] reg byte a [ wrap_y::return#1 ]
reg byte x [ render_sine::ypos2#0 ] reg byte x [ render_sine::ypos2#0 ]
zp[4]:27 [ sin16s::$4 mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] zp[4]:29 [ sin16s::$4 mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ]
zp[2]:31 [ sin16s::x1#0 div32u16u::quotient_hi#0 ] zp[2]:33 [ mul16s::$6 mul16s::$11 sin16s::x1#0 div32u16u::quotient_hi#0 render_sine::$11 render_sine::$4 ]
zp[2]:33 [ mul16s::$6 mul16s::$11 mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 sin16s::x5_128#0 ]
reg byte a [ wrap_y::return#2 ] reg byte a [ wrap_y::return#2 ]
zp[2]:35 [ bitmap_plot::plotter#0 bitmap_plot::plotter#1 mulu16_sel::v1#5 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 mulu16_sel::v1#3 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#1 mulu16_sel::return#10 divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp[2]:35 [ bitmap_plot::plotter#0 bitmap_plot::plotter#1 mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 sin16s::x5_128#0 ]
zp[2]:37 [ bitmap_plot::$0 mulu16_sel::v2#5 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 mulu16_sel::v2#3 mul16u::b#2 mul16u::b#1 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] zp[2]:37 [ bitmap_plot::$0 mulu16_sel::v1#5 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 mulu16_sel::v1#3 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#1 mulu16_sel::return#10 divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ]
reg byte x [ bitmap_plot::$1 ] reg byte x [ bitmap_plot::$1 ]
reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$1 ]
reg byte a [ divr16u::$2 ] reg byte a [ divr16u::$2 ]

View File

@ -208,8 +208,8 @@ utoa10w: {
// value>=UTOA10_SUB[i] // value>=UTOA10_SUB[i]
txa txa
asl asl
// while(value>=UTOA10_SUB[i])
tay tay
// while(value>=UTOA10_SUB[i])
lda UTOA10_SUB+1,y lda UTOA10_SUB+1,y
cmp.z value+1 cmp.z value+1
bne !+ bne !+
@ -270,9 +270,6 @@ utoa10w: {
adc.z digit adc.z digit
sta.z digit sta.z digit
// value -= UTOA10_SUB[i] // value -= UTOA10_SUB[i]
txa
asl
tay
sec sec
lda.z value lda.z value
sbc UTOA10_SUB,y sbc UTOA10_SUB,y

View File

@ -111,8 +111,8 @@ utoa10w::@1: scope:[utoa10w] from utoa10w utoa10w::@2 utoa10w::@6
[59] (byte) utoa10w::digit#3 ← phi( utoa10w/(byte) 0 utoa10w::@2/(byte) utoa10w::digit#1 utoa10w::@6/(byte) utoa10w::digit#7 ) [59] (byte) utoa10w::digit#3 ← phi( utoa10w/(byte) 0 utoa10w::@2/(byte) utoa10w::digit#1 utoa10w::@6/(byte) utoa10w::digit#7 )
[59] (word) utoa10w::value#10 ← phi( utoa10w/(word) utoa10w::value#0 utoa10w::@2/(word) utoa10w::value#1 utoa10w::@6/(word) utoa10w::value#10 ) [59] (word) utoa10w::value#10 ← phi( utoa10w/(word) utoa10w::value#0 utoa10w::@2/(word) utoa10w::value#1 utoa10w::@6/(word) utoa10w::value#10 )
[59] (byte) utoa10w::i#2 ← phi( utoa10w/(byte) 0 utoa10w::@2/(byte) utoa10w::i#2 utoa10w::@6/(byte) utoa10w::i#1 ) [59] (byte) utoa10w::i#2 ← phi( utoa10w/(byte) 0 utoa10w::@2/(byte) utoa10w::i#2 utoa10w::@6/(byte) utoa10w::i#1 )
[60] (byte~) utoa10w::$7 ← (byte) utoa10w::i#2 << (byte) 1 [60] (byte~) utoa10w::$8 ← (byte) utoa10w::i#2 << (byte) 1
[61] if((word) utoa10w::value#10>=*((const word*) UTOA10_SUB + (byte~) utoa10w::$7)) goto utoa10w::@2 [61] if((word) utoa10w::value#10>=*((const word*) UTOA10_SUB + (byte~) utoa10w::$8)) goto utoa10w::@2
to:utoa10w::@3 to:utoa10w::@3
utoa10w::@3: scope:[utoa10w] from utoa10w::@1 utoa10w::@3: scope:[utoa10w] from utoa10w::@1
[62] (byte~) utoa10w::$1 ← (byte) utoa10w::i#2 & (byte) 1 [62] (byte~) utoa10w::$1 ← (byte) utoa10w::i#2 & (byte) 1
@ -145,27 +145,26 @@ utoa10w::@return: scope:[utoa10w] from utoa10w::@8
to:@return to:@return
utoa10w::@2: scope:[utoa10w] from utoa10w::@1 utoa10w::@2: scope:[utoa10w] from utoa10w::@1
[76] (byte) utoa10w::digit#1 ← (byte) utoa10w::digit#3 + *((const byte*) UTOA10_VAL + (byte) utoa10w::i#2) [76] (byte) utoa10w::digit#1 ← (byte) utoa10w::digit#3 + *((const byte*) UTOA10_VAL + (byte) utoa10w::i#2)
[77] (byte~) utoa10w::$8 ← (byte) utoa10w::i#2 << (byte) 1 [77] (word) utoa10w::value#1 ← (word) utoa10w::value#10 - *((const word*) UTOA10_SUB + (byte~) utoa10w::$8)
[78] (word) utoa10w::value#1 ← (word) utoa10w::value#10 - *((const word*) UTOA10_SUB + (byte~) utoa10w::$8)
to:utoa10w::@1 to:utoa10w::@1
(byte()) utoa16n((byte) utoa16n::nybble , (word**) utoa16n::dst , (byte) utoa16n::started) (byte()) utoa16n((byte) utoa16n::nybble , (word**) utoa16n::dst , (byte) utoa16n::started)
utoa16n: scope:[utoa16n] from utoa16w utoa16w::@1 utoa16w::@2 utoa16w::@3 utoa16n: scope:[utoa16n] from utoa16w utoa16w::@1 utoa16w::@2 utoa16w::@3
[79] (byte) utoa16n::started#7 ← phi( utoa16w/(byte) 0 utoa16w::@1/(byte) utoa16n::started#1 utoa16w::@2/(byte) utoa16n::started#2 utoa16w::@3/(byte) 1 ) [78] (byte) utoa16n::started#7 ← phi( utoa16w/(byte) 0 utoa16w::@1/(byte) utoa16n::started#1 utoa16w::@2/(byte) utoa16n::started#2 utoa16w::@3/(byte) 1 )
[79] (byte) utoa16n::nybble#4 ← phi( utoa16w/(byte) utoa16n::nybble#0 utoa16w::@1/(byte) utoa16n::nybble#1 utoa16w::@2/(byte) utoa16n::nybble#2 utoa16w::@3/(byte) utoa16n::nybble#3 ) [78] (byte) utoa16n::nybble#4 ← phi( utoa16w/(byte) utoa16n::nybble#0 utoa16w::@1/(byte) utoa16n::nybble#1 utoa16w::@2/(byte) utoa16n::nybble#2 utoa16w::@3/(byte) utoa16n::nybble#3 )
[80] if((byte) utoa16n::nybble#4==(byte) 0) goto utoa16n::@3 [79] if((byte) utoa16n::nybble#4==(byte) 0) goto utoa16n::@3
to:utoa16n::@1 to:utoa16n::@1
utoa16n::@3: scope:[utoa16n] from utoa16n utoa16n::@3: scope:[utoa16n] from utoa16n
[81] phi() [80] phi()
to:utoa16n::@1 to:utoa16n::@1
utoa16n::@1: scope:[utoa16n] from utoa16n utoa16n::@3 utoa16n::@1: scope:[utoa16n] from utoa16n utoa16n::@3
[82] (byte) utoa16n::return#4 ← phi( utoa16n::@3/(byte) utoa16n::started#7 utoa16n/(byte) 1 ) [81] (byte) utoa16n::return#4 ← phi( utoa16n::@3/(byte) utoa16n::started#7 utoa16n/(byte) 1 )
[83] if((byte) utoa16n::return#4==(byte) 0) goto utoa16n::@return [82] if((byte) utoa16n::return#4==(byte) 0) goto utoa16n::@return
to:utoa16n::@2 to:utoa16n::@2
utoa16n::@2: scope:[utoa16n] from utoa16n::@1 utoa16n::@2: scope:[utoa16n] from utoa16n::@1
[84] *(*(&(volatile byte*) utoa16w::dst)) ← *((const byte*) DIGITS + (byte) utoa16n::nybble#4) [83] *(*(&(volatile byte*) utoa16w::dst)) ← *((const byte*) DIGITS + (byte) utoa16n::nybble#4)
[85] *(&(volatile byte*) utoa16w::dst) ← ++ *(&(volatile byte*) utoa16w::dst) [84] *(&(volatile byte*) utoa16w::dst) ← ++ *(&(volatile byte*) utoa16w::dst)
to:utoa16n::@return to:utoa16n::@return
utoa16n::@return: scope:[utoa16n] from utoa16n::@1 utoa16n::@2 utoa16n::@return: scope:[utoa16n] from utoa16n::@1 utoa16n::@2
[86] return [85] return
to:@return to:@return

View File

@ -886,8 +886,12 @@ Constant inlined utoa10w::digit#2 = (byte) 0
Successful SSA optimization Pass2ConstantInlining Successful SSA optimization Pass2ConstantInlining
Identical Phi Values (word**) utoa16n::dst#4 &(volatile byte*) utoa16w::dst Identical Phi Values (word**) utoa16n::dst#4 &(volatile byte*) utoa16w::dst
Successful SSA optimization Pass2IdenticalPhiElimination Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [40] (byte~) utoa10w::$8 ← (byte) utoa10w::i#2 << (byte) 1
Successful SSA optimization Pass2DuplicateRValueIdentification
Eliminating unused constant (const byte) SIZEOF_WORD Eliminating unused constant (const byte) SIZEOF_WORD
Successful SSA optimization PassNEliminateUnusedVars Successful SSA optimization PassNEliminateUnusedVars
Alias utoa10w::$8 = utoa10w::$7
Successful SSA optimization Pass2AliasElimination
Added new block during phi lifting cls::@2(between cls::@1 and cls::@1) Added new block during phi lifting cls::@2(between cls::@1 and cls::@1)
Added new block during phi lifting utoa10w::@9(between utoa10w::@6 and utoa10w::@1) Added new block during phi lifting utoa10w::@9(between utoa10w::@6 and utoa10w::@1)
Added new block during phi lifting utoa10w::@10(between utoa10w::@3 and utoa10w::@6) Added new block during phi lifting utoa10w::@10(between utoa10w::@3 and utoa10w::@6)
@ -923,11 +927,11 @@ Coalesced [93] utoa10w::dst#13 ← utoa10w::dst#4
Coalesced (already) [94] utoa10w::dst#16 ← utoa10w::dst#11 Coalesced (already) [94] utoa10w::dst#16 ← utoa10w::dst#11
Coalesced (already) [95] utoa10w::dst#14 ← utoa10w::dst#11 Coalesced (already) [95] utoa10w::dst#14 ← utoa10w::dst#11
Coalesced (already) [96] utoa10w::digit#11 ← utoa10w::digit#3 Coalesced (already) [96] utoa10w::digit#11 ← utoa10w::digit#3
Coalesced (already) [100] utoa10w::i#9 ← utoa10w::i#2 Coalesced (already) [99] utoa10w::i#9 ← utoa10w::i#2
Coalesced [101] utoa10w::value#12 ← utoa10w::value#1 Coalesced [100] utoa10w::value#12 ← utoa10w::value#1
Coalesced [102] utoa10w::digit#9 ← utoa10w::digit#1 Coalesced [101] utoa10w::digit#9 ← utoa10w::digit#1
Coalesced (already) [103] utoa10w::dst#12 ← utoa10w::dst#11 Coalesced (already) [102] utoa10w::dst#12 ← utoa10w::dst#11
Coalesced [113] utoa16n::return#10 ← utoa16n::started#7 Coalesced [112] utoa16n::return#10 ← utoa16n::started#7
Coalesced down to 10 phi equivalence classes Coalesced down to 10 phi equivalence classes
Culled Empty Block (label) main::@6 Culled Empty Block (label) main::@6
Culled Empty Block (label) main::@1 Culled Empty Block (label) main::@1
@ -1067,8 +1071,8 @@ utoa10w::@1: scope:[utoa10w] from utoa10w utoa10w::@2 utoa10w::@6
[59] (byte) utoa10w::digit#3 ← phi( utoa10w/(byte) 0 utoa10w::@2/(byte) utoa10w::digit#1 utoa10w::@6/(byte) utoa10w::digit#7 ) [59] (byte) utoa10w::digit#3 ← phi( utoa10w/(byte) 0 utoa10w::@2/(byte) utoa10w::digit#1 utoa10w::@6/(byte) utoa10w::digit#7 )
[59] (word) utoa10w::value#10 ← phi( utoa10w/(word) utoa10w::value#0 utoa10w::@2/(word) utoa10w::value#1 utoa10w::@6/(word) utoa10w::value#10 ) [59] (word) utoa10w::value#10 ← phi( utoa10w/(word) utoa10w::value#0 utoa10w::@2/(word) utoa10w::value#1 utoa10w::@6/(word) utoa10w::value#10 )
[59] (byte) utoa10w::i#2 ← phi( utoa10w/(byte) 0 utoa10w::@2/(byte) utoa10w::i#2 utoa10w::@6/(byte) utoa10w::i#1 ) [59] (byte) utoa10w::i#2 ← phi( utoa10w/(byte) 0 utoa10w::@2/(byte) utoa10w::i#2 utoa10w::@6/(byte) utoa10w::i#1 )
[60] (byte~) utoa10w::$7 ← (byte) utoa10w::i#2 << (byte) 1 [60] (byte~) utoa10w::$8 ← (byte) utoa10w::i#2 << (byte) 1
[61] if((word) utoa10w::value#10>=*((const word*) UTOA10_SUB + (byte~) utoa10w::$7)) goto utoa10w::@2 [61] if((word) utoa10w::value#10>=*((const word*) UTOA10_SUB + (byte~) utoa10w::$8)) goto utoa10w::@2
to:utoa10w::@3 to:utoa10w::@3
utoa10w::@3: scope:[utoa10w] from utoa10w::@1 utoa10w::@3: scope:[utoa10w] from utoa10w::@1
[62] (byte~) utoa10w::$1 ← (byte) utoa10w::i#2 & (byte) 1 [62] (byte~) utoa10w::$1 ← (byte) utoa10w::i#2 & (byte) 1
@ -1101,29 +1105,28 @@ utoa10w::@return: scope:[utoa10w] from utoa10w::@8
to:@return to:@return
utoa10w::@2: scope:[utoa10w] from utoa10w::@1 utoa10w::@2: scope:[utoa10w] from utoa10w::@1
[76] (byte) utoa10w::digit#1 ← (byte) utoa10w::digit#3 + *((const byte*) UTOA10_VAL + (byte) utoa10w::i#2) [76] (byte) utoa10w::digit#1 ← (byte) utoa10w::digit#3 + *((const byte*) UTOA10_VAL + (byte) utoa10w::i#2)
[77] (byte~) utoa10w::$8 ← (byte) utoa10w::i#2 << (byte) 1 [77] (word) utoa10w::value#1 ← (word) utoa10w::value#10 - *((const word*) UTOA10_SUB + (byte~) utoa10w::$8)
[78] (word) utoa10w::value#1 ← (word) utoa10w::value#10 - *((const word*) UTOA10_SUB + (byte~) utoa10w::$8)
to:utoa10w::@1 to:utoa10w::@1
(byte()) utoa16n((byte) utoa16n::nybble , (word**) utoa16n::dst , (byte) utoa16n::started) (byte()) utoa16n((byte) utoa16n::nybble , (word**) utoa16n::dst , (byte) utoa16n::started)
utoa16n: scope:[utoa16n] from utoa16w utoa16w::@1 utoa16w::@2 utoa16w::@3 utoa16n: scope:[utoa16n] from utoa16w utoa16w::@1 utoa16w::@2 utoa16w::@3
[79] (byte) utoa16n::started#7 ← phi( utoa16w/(byte) 0 utoa16w::@1/(byte) utoa16n::started#1 utoa16w::@2/(byte) utoa16n::started#2 utoa16w::@3/(byte) 1 ) [78] (byte) utoa16n::started#7 ← phi( utoa16w/(byte) 0 utoa16w::@1/(byte) utoa16n::started#1 utoa16w::@2/(byte) utoa16n::started#2 utoa16w::@3/(byte) 1 )
[79] (byte) utoa16n::nybble#4 ← phi( utoa16w/(byte) utoa16n::nybble#0 utoa16w::@1/(byte) utoa16n::nybble#1 utoa16w::@2/(byte) utoa16n::nybble#2 utoa16w::@3/(byte) utoa16n::nybble#3 ) [78] (byte) utoa16n::nybble#4 ← phi( utoa16w/(byte) utoa16n::nybble#0 utoa16w::@1/(byte) utoa16n::nybble#1 utoa16w::@2/(byte) utoa16n::nybble#2 utoa16w::@3/(byte) utoa16n::nybble#3 )
[80] if((byte) utoa16n::nybble#4==(byte) 0) goto utoa16n::@3 [79] if((byte) utoa16n::nybble#4==(byte) 0) goto utoa16n::@3
to:utoa16n::@1 to:utoa16n::@1
utoa16n::@3: scope:[utoa16n] from utoa16n utoa16n::@3: scope:[utoa16n] from utoa16n
[81] phi() [80] phi()
to:utoa16n::@1 to:utoa16n::@1
utoa16n::@1: scope:[utoa16n] from utoa16n utoa16n::@3 utoa16n::@1: scope:[utoa16n] from utoa16n utoa16n::@3
[82] (byte) utoa16n::return#4 ← phi( utoa16n::@3/(byte) utoa16n::started#7 utoa16n/(byte) 1 ) [81] (byte) utoa16n::return#4 ← phi( utoa16n::@3/(byte) utoa16n::started#7 utoa16n/(byte) 1 )
[83] if((byte) utoa16n::return#4==(byte) 0) goto utoa16n::@return [82] if((byte) utoa16n::return#4==(byte) 0) goto utoa16n::@return
to:utoa16n::@2 to:utoa16n::@2
utoa16n::@2: scope:[utoa16n] from utoa16n::@1 utoa16n::@2: scope:[utoa16n] from utoa16n::@1
[84] *(*(&(volatile byte*) utoa16w::dst)) ← *((const byte*) DIGITS + (byte) utoa16n::nybble#4) [83] *(*(&(volatile byte*) utoa16w::dst)) ← *((const byte*) DIGITS + (byte) utoa16n::nybble#4)
[85] *(&(volatile byte*) utoa16w::dst) ← ++ *(&(volatile byte*) utoa16w::dst) [84] *(&(volatile byte*) utoa16w::dst) ← ++ *(&(volatile byte*) utoa16w::dst)
to:utoa16n::@return to:utoa16n::@return
utoa16n::@return: scope:[utoa16n] from utoa16n::@1 utoa16n::@2 utoa16n::@return: scope:[utoa16n] from utoa16n::@1 utoa16n::@2
[86] return [85] return
to:@return to:@return
@ -1149,28 +1152,27 @@ VARIABLE REGISTER WEIGHTS
(byte) main::time_start#0 1.2941176470588236 (byte) main::time_start#0 1.2941176470588236
(void()) utoa10w((word) utoa10w::value , (byte*) utoa10w::dst) (void()) utoa10w((word) utoa10w::value , (byte*) utoa10w::dst)
(byte~) utoa10w::$1 20002.0 (byte~) utoa10w::$1 20002.0
(byte~) utoa10w::$7 20002.0 (byte~) utoa10w::$8 10001.0
(byte~) utoa10w::$8 20002.0
(byte~) utoa10w::$9 202.0 (byte~) utoa10w::$9 202.0
(byte) utoa10w::bStarted (byte) utoa10w::bStarted
(byte) utoa10w::bStarted#2 2500.25 (byte) utoa10w::bStarted#2 2500.25
(byte) utoa10w::digit (byte) utoa10w::digit
(byte) utoa10w::digit#1 6667.333333333333 (byte) utoa10w::digit#1 10001.0
(byte) utoa10w::digit#3 8334.166666666666 (byte) utoa10w::digit#3 8334.166666666666
(byte) utoa10w::digit#7 6667.333333333333 (byte) utoa10w::digit#7 6667.333333333333
(byte*) utoa10w::dst (byte*) utoa10w::dst
(byte*) utoa10w::dst#1 20002.0 (byte*) utoa10w::dst#1 20002.0
(byte*) utoa10w::dst#11 7000.700000000001 (byte*) utoa10w::dst#11 7778.555555555557
(byte*) utoa10w::dst#2 202.0 (byte*) utoa10w::dst#2 202.0
(byte*) utoa10w::dst#4 6041.0 (byte*) utoa10w::dst#4 6041.0
(byte*) utoa10w::dst#8 30003.0 (byte*) utoa10w::dst#8 30003.0
(byte) utoa10w::i (byte) utoa10w::i
(byte) utoa10w::i#1 15001.5 (byte) utoa10w::i#1 15001.5
(byte) utoa10w::i#2 6154.461538461538 (byte) utoa10w::i#2 5833.916666666667
(word) utoa10w::value (word) utoa10w::value
(word) utoa10w::value#0 56.0 (word) utoa10w::value#0 56.0
(word) utoa10w::value#1 20002.0 (word) utoa10w::value#1 20002.0
(word) utoa10w::value#10 3579.000000000001 (word) utoa10w::value#10 3854.3076923076924
(byte()) utoa16n((byte) utoa16n::nybble , (word**) utoa16n::dst , (byte) utoa16n::started) (byte()) utoa16n((byte) utoa16n::nybble , (word**) utoa16n::dst , (byte) utoa16n::started)
(word**) utoa16n::dst (word**) utoa16n::dst
(byte) utoa16n::nybble (byte) utoa16n::nybble
@ -1225,11 +1227,10 @@ Added variable utoa16n::return#1 to live range equivalence class [ utoa16n::retu
Added variable utoa16w::started#2 to live range equivalence class [ utoa16w::started#2 ] Added variable utoa16w::started#2 to live range equivalence class [ utoa16w::started#2 ]
Added variable utoa16w::$6 to live range equivalence class [ utoa16w::$6 ] Added variable utoa16w::$6 to live range equivalence class [ utoa16w::$6 ]
Added variable utoa16w::$9 to live range equivalence class [ utoa16w::$9 ] Added variable utoa16w::$9 to live range equivalence class [ utoa16w::$9 ]
Added variable utoa10w::$7 to live range equivalence class [ utoa10w::$7 ] Added variable utoa10w::$8 to live range equivalence class [ utoa10w::$8 ]
Added variable utoa10w::$1 to live range equivalence class [ utoa10w::$1 ] Added variable utoa10w::$1 to live range equivalence class [ utoa10w::$1 ]
Added variable utoa10w::$9 to live range equivalence class [ utoa10w::$9 ] Added variable utoa10w::$9 to live range equivalence class [ utoa10w::$9 ]
Added variable utoa10w::dst#2 to live range equivalence class [ utoa10w::dst#2 ] Added variable utoa10w::dst#2 to live range equivalence class [ utoa10w::dst#2 ]
Added variable utoa10w::$8 to live range equivalence class [ utoa10w::$8 ]
Complete equivalence classes Complete equivalence classes
[ main::i#2 main::i#1 ] [ main::i#2 main::i#1 ]
[ cls::sc#2 cls::sc#1 ] [ cls::sc#2 cls::sc#1 ]
@ -1256,11 +1257,10 @@ Complete equivalence classes
[ utoa16w::started#2 ] [ utoa16w::started#2 ]
[ utoa16w::$6 ] [ utoa16w::$6 ]
[ utoa16w::$9 ] [ utoa16w::$9 ]
[ utoa10w::$7 ] [ utoa10w::$8 ]
[ utoa10w::$1 ] [ utoa10w::$1 ]
[ utoa10w::$9 ] [ utoa10w::$9 ]
[ utoa10w::dst#2 ] [ utoa10w::dst#2 ]
[ utoa10w::$8 ]
Allocated zp[1]:2 [ main::i#2 main::i#1 ] Allocated zp[1]:2 [ main::i#2 main::i#1 ]
Allocated zp[2]:3 [ cls::sc#2 cls::sc#1 ] Allocated zp[2]:3 [ cls::sc#2 cls::sc#1 ]
Allocated zp[2]:5 [ utoa16w::value#5 ] Allocated zp[2]:5 [ utoa16w::value#5 ]
@ -1286,11 +1286,10 @@ Allocated zp[1]:28 [ utoa16n::return#1 ]
Allocated zp[1]:29 [ utoa16w::started#2 ] Allocated zp[1]:29 [ utoa16w::started#2 ]
Allocated zp[1]:30 [ utoa16w::$6 ] Allocated zp[1]:30 [ utoa16w::$6 ]
Allocated zp[1]:31 [ utoa16w::$9 ] Allocated zp[1]:31 [ utoa16w::$9 ]
Allocated zp[1]:32 [ utoa10w::$7 ] Allocated zp[1]:32 [ utoa10w::$8 ]
Allocated zp[1]:33 [ utoa10w::$1 ] Allocated zp[1]:33 [ utoa10w::$1 ]
Allocated zp[1]:34 [ utoa10w::$9 ] Allocated zp[1]:34 [ utoa10w::$9 ]
Allocated zp[2]:35 [ utoa10w::dst#2 ] Allocated zp[2]:35 [ utoa10w::dst#2 ]
Allocated zp[1]:37 [ utoa10w::$8 ]
INITIAL ASM INITIAL ASM
Target platform is c64basic / MOS6502X Target platform is c64basic / MOS6502X
@ -1552,12 +1551,12 @@ utoa16w: {
lsr lsr
sta.z utoa16n.nybble sta.z utoa16n.nybble
// [40] call utoa16n // [40] call utoa16n
// [79] phi from utoa16w to utoa16n [phi:utoa16w->utoa16n] // [78] phi from utoa16w to utoa16n [phi:utoa16w->utoa16n]
utoa16n_from_utoa16w: utoa16n_from_utoa16w:
// [79] phi (byte) utoa16n::started#7 = (byte) 0 [phi:utoa16w->utoa16n#0] -- vbuz1=vbuc1 // [78] phi (byte) utoa16n::started#7 = (byte) 0 [phi:utoa16w->utoa16n#0] -- vbuz1=vbuc1
lda #0 lda #0
sta.z utoa16n.started sta.z utoa16n.started
// [79] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#0 [phi:utoa16w->utoa16n#1] -- register_copy // [78] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#0 [phi:utoa16w->utoa16n#1] -- register_copy
jsr utoa16n jsr utoa16n
// [41] (byte) utoa16n::return#0 ← (byte) utoa16n::return#4 -- vbuz1=vbuz2 // [41] (byte) utoa16n::return#0 ← (byte) utoa16n::return#4 -- vbuz1=vbuz2
lda.z utoa16n.return_2 lda.z utoa16n.return_2
@ -1579,10 +1578,10 @@ utoa16w: {
lda.z started lda.z started
sta.z utoa16n.started sta.z utoa16n.started
// [46] call utoa16n // [46] call utoa16n
// [79] phi from utoa16w::@1 to utoa16n [phi:utoa16w::@1->utoa16n] // [78] phi from utoa16w::@1 to utoa16n [phi:utoa16w::@1->utoa16n]
utoa16n_from___b1: utoa16n_from___b1:
// [79] phi (byte) utoa16n::started#7 = (byte) utoa16n::started#1 [phi:utoa16w::@1->utoa16n#0] -- register_copy // [78] phi (byte) utoa16n::started#7 = (byte) utoa16n::started#1 [phi:utoa16w::@1->utoa16n#0] -- register_copy
// [79] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#1 [phi:utoa16w::@1->utoa16n#1] -- register_copy // [78] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#1 [phi:utoa16w::@1->utoa16n#1] -- register_copy
jsr utoa16n jsr utoa16n
// [47] (byte) utoa16n::return#1 ← (byte) utoa16n::return#4 -- vbuz1=vbuz2 // [47] (byte) utoa16n::return#1 ← (byte) utoa16n::return#4 -- vbuz1=vbuz2
lda.z utoa16n.return_2 lda.z utoa16n.return_2
@ -1607,10 +1606,10 @@ utoa16w: {
lda.z started_1 lda.z started_1
sta.z utoa16n.started sta.z utoa16n.started
// [52] call utoa16n // [52] call utoa16n
// [79] phi from utoa16w::@2 to utoa16n [phi:utoa16w::@2->utoa16n] // [78] phi from utoa16w::@2 to utoa16n [phi:utoa16w::@2->utoa16n]
utoa16n_from___b2: utoa16n_from___b2:
// [79] phi (byte) utoa16n::started#7 = (byte) utoa16n::started#2 [phi:utoa16w::@2->utoa16n#0] -- register_copy // [78] phi (byte) utoa16n::started#7 = (byte) utoa16n::started#2 [phi:utoa16w::@2->utoa16n#0] -- register_copy
// [79] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#2 [phi:utoa16w::@2->utoa16n#1] -- register_copy // [78] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#2 [phi:utoa16w::@2->utoa16n#1] -- register_copy
jsr utoa16n jsr utoa16n
jmp __b3 jmp __b3
// utoa16w::@3 // utoa16w::@3
@ -1623,12 +1622,12 @@ utoa16w: {
and.z __9 and.z __9
sta.z utoa16n.nybble sta.z utoa16n.nybble
// [55] call utoa16n // [55] call utoa16n
// [79] phi from utoa16w::@3 to utoa16n [phi:utoa16w::@3->utoa16n] // [78] phi from utoa16w::@3 to utoa16n [phi:utoa16w::@3->utoa16n]
utoa16n_from___b3: utoa16n_from___b3:
// [79] phi (byte) utoa16n::started#7 = (byte) 1 [phi:utoa16w::@3->utoa16n#0] -- vbuz1=vbuc1 // [78] phi (byte) utoa16n::started#7 = (byte) 1 [phi:utoa16w::@3->utoa16n#0] -- vbuz1=vbuc1
lda #1 lda #1
sta.z utoa16n.started sta.z utoa16n.started
// [79] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#3 [phi:utoa16w::@3->utoa16n#1] -- register_copy // [78] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#3 [phi:utoa16w::@3->utoa16n#1] -- register_copy
jsr utoa16n jsr utoa16n
jmp __b4 jmp __b4
// utoa16w::@4 // utoa16w::@4
@ -1648,8 +1647,7 @@ utoa16w: {
// utoa10w(word zp(8) value, byte* zp($c) dst) // utoa10w(word zp(8) value, byte* zp($c) dst)
utoa10w: { utoa10w: {
.label __1 = $21 .label __1 = $21
.label __7 = $20 .label __8 = $20
.label __8 = $25
.label __9 = $22 .label __9 = $22
.label value = 8 .label value = 8
.label digit = $a .label digit = $a
@ -1685,12 +1683,12 @@ utoa10w: {
jmp __b1 jmp __b1
// utoa10w::@1 // utoa10w::@1
__b1: __b1:
// [60] (byte~) utoa10w::$7 ← (byte) utoa10w::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 // [60] (byte~) utoa10w::$8 ← (byte) utoa10w::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1
lda.z i lda.z i
asl asl
sta.z __7 sta.z __8
// [61] if((word) utoa10w::value#10>=*((const word*) UTOA10_SUB + (byte~) utoa10w::$7)) goto utoa10w::@2 -- vwuz1_ge_pwuc1_derefidx_vbuz2_then_la1 // [61] if((word) utoa10w::value#10>=*((const word*) UTOA10_SUB + (byte~) utoa10w::$8)) goto utoa10w::@2 -- vwuz1_ge_pwuc1_derefidx_vbuz2_then_la1
ldy.z __7 ldy.z __8
lda UTOA10_SUB+1,y lda UTOA10_SUB+1,y
cmp.z value+1 cmp.z value+1
bne !+ bne !+
@ -1793,11 +1791,7 @@ utoa10w: {
clc clc
adc UTOA10_VAL,y adc UTOA10_VAL,y
sta.z digit sta.z digit
// [77] (byte~) utoa10w::$8 ← (byte) utoa10w::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 // [77] (word) utoa10w::value#1 ← (word) utoa10w::value#10 - *((const word*) UTOA10_SUB + (byte~) utoa10w::$8) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuz2
lda.z i
asl
sta.z __8
// [78] (word) utoa10w::value#1 ← (word) utoa10w::value#10 - *((const word*) UTOA10_SUB + (byte~) utoa10w::$8) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuz2
ldy.z __8 ldy.z __8
sec sec
lda.z value lda.z value
@ -1826,35 +1820,35 @@ utoa16n: {
.label started = $f .label started = $f
.label return_1 = $1c .label return_1 = $1c
.label return_2 = $f .label return_2 = $f
// [80] if((byte) utoa16n::nybble#4==(byte) 0) goto utoa16n::@3 -- vbuz1_eq_0_then_la1 // [79] if((byte) utoa16n::nybble#4==(byte) 0) goto utoa16n::@3 -- vbuz1_eq_0_then_la1
lda.z nybble lda.z nybble
cmp #0 cmp #0
beq __b3_from_utoa16n beq __b3_from_utoa16n
// [82] phi from utoa16n to utoa16n::@1 [phi:utoa16n->utoa16n::@1] // [81] phi from utoa16n to utoa16n::@1 [phi:utoa16n->utoa16n::@1]
__b1_from_utoa16n: __b1_from_utoa16n:
// [82] phi (byte) utoa16n::return#4 = (byte) 1 [phi:utoa16n->utoa16n::@1#0] -- vbuz1=vbuc1 // [81] phi (byte) utoa16n::return#4 = (byte) 1 [phi:utoa16n->utoa16n::@1#0] -- vbuz1=vbuc1
lda #1 lda #1
sta.z return_2 sta.z return_2
jmp __b1 jmp __b1
// [81] phi from utoa16n to utoa16n::@3 [phi:utoa16n->utoa16n::@3] // [80] phi from utoa16n to utoa16n::@3 [phi:utoa16n->utoa16n::@3]
__b3_from_utoa16n: __b3_from_utoa16n:
jmp __b3 jmp __b3
// utoa16n::@3 // utoa16n::@3
__b3: __b3:
// [82] phi from utoa16n::@3 to utoa16n::@1 [phi:utoa16n::@3->utoa16n::@1] // [81] phi from utoa16n::@3 to utoa16n::@1 [phi:utoa16n::@3->utoa16n::@1]
__b1_from___b3: __b1_from___b3:
// [82] phi (byte) utoa16n::return#4 = (byte) utoa16n::started#7 [phi:utoa16n::@3->utoa16n::@1#0] -- register_copy // [81] phi (byte) utoa16n::return#4 = (byte) utoa16n::started#7 [phi:utoa16n::@3->utoa16n::@1#0] -- register_copy
jmp __b1 jmp __b1
// utoa16n::@1 // utoa16n::@1
__b1: __b1:
// [83] if((byte) utoa16n::return#4==(byte) 0) goto utoa16n::@return -- vbuz1_eq_0_then_la1 // [82] if((byte) utoa16n::return#4==(byte) 0) goto utoa16n::@return -- vbuz1_eq_0_then_la1
lda.z return_2 lda.z return_2
cmp #0 cmp #0
beq __breturn beq __breturn
jmp __b2 jmp __b2
// utoa16n::@2 // utoa16n::@2
__b2: __b2:
// [84] *(*(&(volatile byte*) utoa16w::dst)) ← *((const byte*) DIGITS + (byte) utoa16n::nybble#4) -- _deref_(_deref_qbuc1)=pbuc2_derefidx_vbuz1 // [83] *(*(&(volatile byte*) utoa16w::dst)) ← *((const byte*) DIGITS + (byte) utoa16n::nybble#4) -- _deref_(_deref_qbuc1)=pbuc2_derefidx_vbuz1
ldy.z nybble ldy.z nybble
lda DIGITS,y lda DIGITS,y
ldy.z utoa16w.dst ldy.z utoa16w.dst
@ -1863,7 +1857,7 @@ utoa16n: {
sty.z $ff sty.z $ff
ldy #0 ldy #0
sta ($fe),y sta ($fe),y
// [85] *(&(volatile byte*) utoa16w::dst) ← ++ *(&(volatile byte*) utoa16w::dst) -- _deref_qbuc1=_inc__deref_qbuc1 // [84] *(&(volatile byte*) utoa16w::dst) ← ++ *(&(volatile byte*) utoa16w::dst) -- _deref_qbuc1=_inc__deref_qbuc1
inc.z utoa16w.dst inc.z utoa16w.dst
bne !+ bne !+
inc.z utoa16w.dst+1 inc.z utoa16w.dst+1
@ -1871,7 +1865,7 @@ utoa16n: {
jmp __breturn jmp __breturn
// utoa16n::@return // utoa16n::@return
__breturn: __breturn:
// [86] return // [85] return
rts rts
} }
// File Data // File Data
@ -1908,11 +1902,12 @@ Statement [50] (byte) utoa16n::nybble#2 ← (byte~) utoa16w::$6 >> (byte) 4 [ ut
Removing always clobbered register reg byte a as potential for zp[1]:29 [ utoa16w::started#2 ] Removing always clobbered register reg byte a as potential for zp[1]:29 [ utoa16w::started#2 ]
Statement [56] *((volatile byte*) utoa16w::dst) ← (byte) 0 [ ] ( utoa16w:9 [ main::time_start#0 ] { } utoa16w:12 [ main::time_start#0 ] { } utoa16w:15 [ main::time_start#0 ] { } utoa16w:18 [ main::time_start#0 ] { } utoa16w:21 [ main::time_start#0 ] { } ) always clobbers reg byte a reg byte y Statement [56] *((volatile byte*) utoa16w::dst) ← (byte) 0 [ ] ( utoa16w:9 [ main::time_start#0 ] { } utoa16w:12 [ main::time_start#0 ] { } utoa16w:15 [ main::time_start#0 ] { } utoa16w:18 [ main::time_start#0 ] { } utoa16w:21 [ main::time_start#0 ] { } ) always clobbers reg byte a reg byte y
Removing always clobbered register reg byte y as potential for zp[1]:19 [ main::time_start#0 ] Removing always clobbered register reg byte y as potential for zp[1]:19 [ main::time_start#0 ]
Statement [60] (byte~) utoa10w::$7 ← (byte) utoa10w::i#2 << (byte) 1 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 utoa10w::$7 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 utoa10w::$7 ] { } ) always clobbers reg byte a Statement [60] (byte~) utoa10w::$8 ← (byte) utoa10w::i#2 << (byte) 1 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 utoa10w::$8 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 utoa10w::$8 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:7 [ utoa10w::i#2 utoa10w::i#1 ] Removing always clobbered register reg byte a as potential for zp[1]:7 [ utoa10w::i#2 utoa10w::i#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:10 [ utoa10w::digit#3 utoa10w::digit#1 utoa10w::digit#7 ] Removing always clobbered register reg byte a as potential for zp[1]:10 [ utoa10w::digit#3 utoa10w::digit#1 utoa10w::digit#7 ]
Removing always clobbered register reg byte a as potential for zp[1]:11 [ utoa10w::bStarted#2 ] Removing always clobbered register reg byte a as potential for zp[1]:11 [ utoa10w::bStarted#2 ]
Statement [61] if((word) utoa10w::value#10>=*((const word*) UTOA10_SUB + (byte~) utoa10w::$7)) goto utoa10w::@2 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 ] { } ) always clobbers reg byte a Statement [61] if((word) utoa10w::value#10>=*((const word*) UTOA10_SUB + (byte~) utoa10w::$8)) goto utoa10w::@2 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 utoa10w::$8 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 utoa10w::$8 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:32 [ utoa10w::$8 ]
Statement [62] (byte~) utoa10w::$1 ← (byte) utoa10w::i#2 & (byte) 1 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 utoa10w::$1 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 utoa10w::$1 ] { } ) always clobbers reg byte a Statement [62] (byte~) utoa10w::$1 ← (byte) utoa10w::i#2 & (byte) 1 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 utoa10w::$1 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 utoa10w::$1 ] { } ) always clobbers reg byte a
Statement [65] *((byte*) utoa10w::dst#11) ← *((const byte*) DIGITS + (byte) utoa10w::digit#3) [ utoa10w::i#2 utoa10w::value#10 utoa10w::bStarted#2 utoa10w::dst#11 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::value#10 utoa10w::bStarted#2 utoa10w::dst#11 ] { } ) always clobbers reg byte a reg byte y Statement [65] *((byte*) utoa10w::dst#11) ← *((const byte*) DIGITS + (byte) utoa10w::digit#3) [ utoa10w::i#2 utoa10w::value#10 utoa10w::bStarted#2 utoa10w::dst#11 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::value#10 utoa10w::bStarted#2 utoa10w::dst#11 ] { } ) always clobbers reg byte a reg byte y
Removing always clobbered register reg byte y as potential for zp[1]:7 [ utoa10w::i#2 utoa10w::i#1 ] Removing always clobbered register reg byte y as potential for zp[1]:7 [ utoa10w::i#2 utoa10w::i#1 ]
@ -1921,10 +1916,9 @@ Statement [71] (byte~) utoa10w::$9 ← (byte)(word) utoa10w::value#10 [ utoa10w:
Statement [72] *((byte*) utoa10w::dst#4) ← *((const byte*) DIGITS + (byte~) utoa10w::$9) [ utoa10w::dst#4 ] ( utoa10w:26 [ utoa10w::dst#4 ] { } ) always clobbers reg byte a reg byte y Statement [72] *((byte*) utoa10w::dst#4) ← *((const byte*) DIGITS + (byte~) utoa10w::$9) [ utoa10w::dst#4 ] ( utoa10w:26 [ utoa10w::dst#4 ] { } ) always clobbers reg byte a reg byte y
Statement [73] (byte*) utoa10w::dst#2 ← ++ (byte*) utoa10w::dst#4 [ utoa10w::dst#2 ] ( utoa10w:26 [ utoa10w::dst#2 ] { } ) always clobbers reg byte a Statement [73] (byte*) utoa10w::dst#2 ← ++ (byte*) utoa10w::dst#4 [ utoa10w::dst#2 ] ( utoa10w:26 [ utoa10w::dst#2 ] { } ) always clobbers reg byte a
Statement [74] *((byte*) utoa10w::dst#2) ← (byte) 0 [ ] ( utoa10w:26 [ ] { } ) always clobbers reg byte a reg byte y Statement [74] *((byte*) utoa10w::dst#2) ← (byte) 0 [ ] ( utoa10w:26 [ ] { } ) always clobbers reg byte a reg byte y
Statement [76] (byte) utoa10w::digit#1 ← (byte) utoa10w::digit#3 + *((const byte*) UTOA10_VAL + (byte) utoa10w::i#2) [ utoa10w::i#2 utoa10w::value#10 utoa10w::dst#11 utoa10w::digit#1 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::value#10 utoa10w::dst#11 utoa10w::digit#1 ] { } ) always clobbers reg byte a Statement [76] (byte) utoa10w::digit#1 ← (byte) utoa10w::digit#3 + *((const byte*) UTOA10_VAL + (byte) utoa10w::i#2) [ utoa10w::i#2 utoa10w::value#10 utoa10w::dst#11 utoa10w::digit#1 utoa10w::$8 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::value#10 utoa10w::dst#11 utoa10w::digit#1 utoa10w::$8 ] { } ) always clobbers reg byte a
Statement [77] (byte~) utoa10w::$8 ← (byte) utoa10w::i#2 << (byte) 1 [ utoa10w::i#2 utoa10w::value#10 utoa10w::dst#11 utoa10w::digit#1 utoa10w::$8 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::value#10 utoa10w::dst#11 utoa10w::digit#1 utoa10w::$8 ] { } ) always clobbers reg byte a Statement [77] (word) utoa10w::value#1 ← (word) utoa10w::value#10 - *((const word*) UTOA10_SUB + (byte~) utoa10w::$8) [ utoa10w::i#2 utoa10w::dst#11 utoa10w::value#1 utoa10w::digit#1 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::dst#11 utoa10w::value#1 utoa10w::digit#1 ] { } ) always clobbers reg byte a
Statement [78] (word) utoa10w::value#1 ← (word) utoa10w::value#10 - *((const word*) UTOA10_SUB + (byte~) utoa10w::$8) [ utoa10w::i#2 utoa10w::dst#11 utoa10w::value#1 utoa10w::digit#1 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::dst#11 utoa10w::value#1 utoa10w::digit#1 ] { } ) always clobbers reg byte a Statement [83] *(*(&(volatile byte*) utoa16w::dst)) ← *((const byte*) DIGITS + (byte) utoa16n::nybble#4) [ utoa16w::dst utoa16n::return#4 ] ( utoa16w:9::utoa16n:40 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:12::utoa16n:40 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:15::utoa16n:40 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:18::utoa16n:40 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:21::utoa16n:40 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:9::utoa16n:46 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#1 = utoa16n::nybble#4 } { utoa16n::started#1 = utoa16n::started#7 utoa16w::started#1 } { utoa16n::return#1 = utoa16n::return#4 } } utoa16w:12::utoa16n:46 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#1 = utoa16n::nybble#4 } { utoa16n::started#1 = utoa16n::started#7 utoa16w::started#1 } { utoa16n::return#1 = utoa16n::return#4 } } utoa16w:15::utoa16n:46 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#1 = utoa16n::nybble#4 } { utoa16n::started#1 = utoa16n::started#7 utoa16w::started#1 } { utoa16n::return#1 = utoa16n::return#4 } } utoa16w:18::utoa16n:46 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#1 = utoa16n::nybble#4 } { utoa16n::started#1 = utoa16n::started#7 utoa16w::started#1 } { utoa16n::return#1 = utoa16n::return#4 } } utoa16w:21::utoa16n:46 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#1 = utoa16n::nybble#4 } { utoa16n::started#1 = utoa16n::started#7 utoa16w::started#1 } { utoa16n::return#1 = utoa16n::return#4 } } utoa16w:9::utoa16n:52 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:12::utoa16n:52 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:15::utoa16n:52 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:18::utoa16n:52 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:21::utoa16n:52 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:9::utoa16n:55 [ main::time_start#0 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#3 = utoa16n::nybble#4 } } utoa16w:12::utoa16n:55 [ main::time_start#0 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#3 = utoa16n::nybble#4 } } utoa16w:15::utoa16n:55 [ main::time_start#0 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#3 = utoa16n::nybble#4 } } utoa16w:18::utoa16n:55 [ main::time_start#0 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#3 = utoa16n::nybble#4 } } utoa16w:21::utoa16n:55 [ main::time_start#0 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#3 = utoa16n::nybble#4 } } ) always clobbers reg byte a reg byte y
Statement [84] *(*(&(volatile byte*) utoa16w::dst)) ← *((const byte*) DIGITS + (byte) utoa16n::nybble#4) [ utoa16w::dst utoa16n::return#4 ] ( utoa16w:9::utoa16n:40 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:12::utoa16n:40 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:15::utoa16n:40 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:18::utoa16n:40 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:21::utoa16n:40 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:9::utoa16n:46 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#1 = utoa16n::nybble#4 } { utoa16n::started#1 = utoa16n::started#7 utoa16w::started#1 } { utoa16n::return#1 = utoa16n::return#4 } } utoa16w:12::utoa16n:46 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#1 = utoa16n::nybble#4 } { utoa16n::started#1 = utoa16n::started#7 utoa16w::started#1 } { utoa16n::return#1 = utoa16n::return#4 } } utoa16w:15::utoa16n:46 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#1 = utoa16n::nybble#4 } { utoa16n::started#1 = utoa16n::started#7 utoa16w::started#1 } { utoa16n::return#1 = utoa16n::return#4 } } utoa16w:18::utoa16n:46 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#1 = utoa16n::nybble#4 } { utoa16n::started#1 = utoa16n::started#7 utoa16w::started#1 } { utoa16n::return#1 = utoa16n::return#4 } } utoa16w:21::utoa16n:46 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#1 = utoa16n::nybble#4 } { utoa16n::started#1 = utoa16n::started#7 utoa16w::started#1 } { utoa16n::return#1 = utoa16n::return#4 } } utoa16w:9::utoa16n:52 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:12::utoa16n:52 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:15::utoa16n:52 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:18::utoa16n:52 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:21::utoa16n:52 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:9::utoa16n:55 [ main::time_start#0 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#3 = utoa16n::nybble#4 } } utoa16w:12::utoa16n:55 [ main::time_start#0 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#3 = utoa16n::nybble#4 } } utoa16w:15::utoa16n:55 [ main::time_start#0 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#3 = utoa16n::nybble#4 } } utoa16w:18::utoa16n:55 [ main::time_start#0 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#3 = utoa16n::nybble#4 } } utoa16w:21::utoa16n:55 [ main::time_start#0 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#3 = utoa16n::nybble#4 } } ) always clobbers reg byte a reg byte y
Removing always clobbered register reg byte a as potential for zp[1]:15 [ utoa16n::return#4 utoa16n::started#7 utoa16n::started#1 utoa16n::started#2 ] Removing always clobbered register reg byte a as potential for zp[1]:15 [ utoa16n::return#4 utoa16n::started#7 utoa16n::started#1 utoa16n::started#2 ]
Removing always clobbered register reg byte y as potential for zp[1]:15 [ utoa16n::return#4 utoa16n::started#7 utoa16n::started#1 utoa16n::started#2 ] Removing always clobbered register reg byte y as potential for zp[1]:15 [ utoa16n::return#4 utoa16n::started#7 utoa16n::started#1 utoa16n::started#2 ]
Statement [2] (byte~) main::$1 ← *((const nomodify byte*) control) & (byte) $80 [ main::$1 ] ( [ main::$1 ] { } ) always clobbers reg byte a Statement [2] (byte~) main::$1 ← *((const nomodify byte*) control) & (byte) $80 [ main::$1 ] ( [ main::$1 ] { } ) always clobbers reg byte a
@ -1945,18 +1939,17 @@ Statement [35] if((byte*) cls::sc#1!=(const byte*) cls::screen+(word) $3e7+(byte
Statement [39] (byte) utoa16n::nybble#0 ← (byte~) utoa16w::$0 >> (byte) 4 [ utoa16w::dst utoa16w::value#5 utoa16n::nybble#0 ] ( utoa16w:9 [ main::time_start#0 utoa16w::dst utoa16w::value#5 utoa16n::nybble#0 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:12 [ main::time_start#0 utoa16w::dst utoa16w::value#5 utoa16n::nybble#0 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:15 [ main::time_start#0 utoa16w::dst utoa16w::value#5 utoa16n::nybble#0 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:18 [ main::time_start#0 utoa16w::dst utoa16w::value#5 utoa16n::nybble#0 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:21 [ main::time_start#0 utoa16w::dst utoa16w::value#5 utoa16n::nybble#0 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } ) always clobbers reg byte a Statement [39] (byte) utoa16n::nybble#0 ← (byte~) utoa16w::$0 >> (byte) 4 [ utoa16w::dst utoa16w::value#5 utoa16n::nybble#0 ] ( utoa16w:9 [ main::time_start#0 utoa16w::dst utoa16w::value#5 utoa16n::nybble#0 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:12 [ main::time_start#0 utoa16w::dst utoa16w::value#5 utoa16n::nybble#0 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:15 [ main::time_start#0 utoa16w::dst utoa16w::value#5 utoa16n::nybble#0 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:18 [ main::time_start#0 utoa16w::dst utoa16w::value#5 utoa16n::nybble#0 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:21 [ main::time_start#0 utoa16w::dst utoa16w::value#5 utoa16n::nybble#0 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } ) always clobbers reg byte a
Statement [50] (byte) utoa16n::nybble#2 ← (byte~) utoa16w::$6 >> (byte) 4 [ utoa16w::dst utoa16w::value#5 utoa16w::started#2 utoa16n::nybble#2 ] ( utoa16w:9 [ main::time_start#0 utoa16w::dst utoa16w::value#5 utoa16w::started#2 utoa16n::nybble#2 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:12 [ main::time_start#0 utoa16w::dst utoa16w::value#5 utoa16w::started#2 utoa16n::nybble#2 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:15 [ main::time_start#0 utoa16w::dst utoa16w::value#5 utoa16w::started#2 utoa16n::nybble#2 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:18 [ main::time_start#0 utoa16w::dst utoa16w::value#5 utoa16w::started#2 utoa16n::nybble#2 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:21 [ main::time_start#0 utoa16w::dst utoa16w::value#5 utoa16w::started#2 utoa16n::nybble#2 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } ) always clobbers reg byte a Statement [50] (byte) utoa16n::nybble#2 ← (byte~) utoa16w::$6 >> (byte) 4 [ utoa16w::dst utoa16w::value#5 utoa16w::started#2 utoa16n::nybble#2 ] ( utoa16w:9 [ main::time_start#0 utoa16w::dst utoa16w::value#5 utoa16w::started#2 utoa16n::nybble#2 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:12 [ main::time_start#0 utoa16w::dst utoa16w::value#5 utoa16w::started#2 utoa16n::nybble#2 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:15 [ main::time_start#0 utoa16w::dst utoa16w::value#5 utoa16w::started#2 utoa16n::nybble#2 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:18 [ main::time_start#0 utoa16w::dst utoa16w::value#5 utoa16w::started#2 utoa16n::nybble#2 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:21 [ main::time_start#0 utoa16w::dst utoa16w::value#5 utoa16w::started#2 utoa16n::nybble#2 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } ) always clobbers reg byte a
Statement [56] *((volatile byte*) utoa16w::dst) ← (byte) 0 [ ] ( utoa16w:9 [ main::time_start#0 ] { } utoa16w:12 [ main::time_start#0 ] { } utoa16w:15 [ main::time_start#0 ] { } utoa16w:18 [ main::time_start#0 ] { } utoa16w:21 [ main::time_start#0 ] { } ) always clobbers reg byte a reg byte y Statement [56] *((volatile byte*) utoa16w::dst) ← (byte) 0 [ ] ( utoa16w:9 [ main::time_start#0 ] { } utoa16w:12 [ main::time_start#0 ] { } utoa16w:15 [ main::time_start#0 ] { } utoa16w:18 [ main::time_start#0 ] { } utoa16w:21 [ main::time_start#0 ] { } ) always clobbers reg byte a reg byte y
Statement [60] (byte~) utoa10w::$7 ← (byte) utoa10w::i#2 << (byte) 1 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 utoa10w::$7 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 utoa10w::$7 ] { } ) always clobbers reg byte a Statement [60] (byte~) utoa10w::$8 ← (byte) utoa10w::i#2 << (byte) 1 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 utoa10w::$8 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 utoa10w::$8 ] { } ) always clobbers reg byte a
Statement [61] if((word) utoa10w::value#10>=*((const word*) UTOA10_SUB + (byte~) utoa10w::$7)) goto utoa10w::@2 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 ] { } ) always clobbers reg byte a Statement [61] if((word) utoa10w::value#10>=*((const word*) UTOA10_SUB + (byte~) utoa10w::$8)) goto utoa10w::@2 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 utoa10w::$8 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 utoa10w::$8 ] { } ) always clobbers reg byte a
Statement [62] (byte~) utoa10w::$1 ← (byte) utoa10w::i#2 & (byte) 1 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 utoa10w::$1 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 utoa10w::$1 ] { } ) always clobbers reg byte a Statement [62] (byte~) utoa10w::$1 ← (byte) utoa10w::i#2 & (byte) 1 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 utoa10w::$1 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::value#10 utoa10w::digit#3 utoa10w::bStarted#2 utoa10w::dst#11 utoa10w::$1 ] { } ) always clobbers reg byte a
Statement [65] *((byte*) utoa10w::dst#11) ← *((const byte*) DIGITS + (byte) utoa10w::digit#3) [ utoa10w::i#2 utoa10w::value#10 utoa10w::bStarted#2 utoa10w::dst#11 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::value#10 utoa10w::bStarted#2 utoa10w::dst#11 ] { } ) always clobbers reg byte a reg byte y Statement [65] *((byte*) utoa10w::dst#11) ← *((const byte*) DIGITS + (byte) utoa10w::digit#3) [ utoa10w::i#2 utoa10w::value#10 utoa10w::bStarted#2 utoa10w::dst#11 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::value#10 utoa10w::bStarted#2 utoa10w::dst#11 ] { } ) always clobbers reg byte a reg byte y
Statement [71] (byte~) utoa10w::$9 ← (byte)(word) utoa10w::value#10 [ utoa10w::dst#4 utoa10w::$9 ] ( utoa10w:26 [ utoa10w::dst#4 utoa10w::$9 ] { } ) always clobbers reg byte a Statement [71] (byte~) utoa10w::$9 ← (byte)(word) utoa10w::value#10 [ utoa10w::dst#4 utoa10w::$9 ] ( utoa10w:26 [ utoa10w::dst#4 utoa10w::$9 ] { } ) always clobbers reg byte a
Statement [72] *((byte*) utoa10w::dst#4) ← *((const byte*) DIGITS + (byte~) utoa10w::$9) [ utoa10w::dst#4 ] ( utoa10w:26 [ utoa10w::dst#4 ] { } ) always clobbers reg byte a reg byte y Statement [72] *((byte*) utoa10w::dst#4) ← *((const byte*) DIGITS + (byte~) utoa10w::$9) [ utoa10w::dst#4 ] ( utoa10w:26 [ utoa10w::dst#4 ] { } ) always clobbers reg byte a reg byte y
Statement [73] (byte*) utoa10w::dst#2 ← ++ (byte*) utoa10w::dst#4 [ utoa10w::dst#2 ] ( utoa10w:26 [ utoa10w::dst#2 ] { } ) always clobbers reg byte a Statement [73] (byte*) utoa10w::dst#2 ← ++ (byte*) utoa10w::dst#4 [ utoa10w::dst#2 ] ( utoa10w:26 [ utoa10w::dst#2 ] { } ) always clobbers reg byte a
Statement [74] *((byte*) utoa10w::dst#2) ← (byte) 0 [ ] ( utoa10w:26 [ ] { } ) always clobbers reg byte a reg byte y Statement [74] *((byte*) utoa10w::dst#2) ← (byte) 0 [ ] ( utoa10w:26 [ ] { } ) always clobbers reg byte a reg byte y
Statement [76] (byte) utoa10w::digit#1 ← (byte) utoa10w::digit#3 + *((const byte*) UTOA10_VAL + (byte) utoa10w::i#2) [ utoa10w::i#2 utoa10w::value#10 utoa10w::dst#11 utoa10w::digit#1 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::value#10 utoa10w::dst#11 utoa10w::digit#1 ] { } ) always clobbers reg byte a Statement [76] (byte) utoa10w::digit#1 ← (byte) utoa10w::digit#3 + *((const byte*) UTOA10_VAL + (byte) utoa10w::i#2) [ utoa10w::i#2 utoa10w::value#10 utoa10w::dst#11 utoa10w::digit#1 utoa10w::$8 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::value#10 utoa10w::dst#11 utoa10w::digit#1 utoa10w::$8 ] { } ) always clobbers reg byte a
Statement [77] (byte~) utoa10w::$8 ← (byte) utoa10w::i#2 << (byte) 1 [ utoa10w::i#2 utoa10w::value#10 utoa10w::dst#11 utoa10w::digit#1 utoa10w::$8 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::value#10 utoa10w::dst#11 utoa10w::digit#1 utoa10w::$8 ] { } ) always clobbers reg byte a Statement [77] (word) utoa10w::value#1 ← (word) utoa10w::value#10 - *((const word*) UTOA10_SUB + (byte~) utoa10w::$8) [ utoa10w::i#2 utoa10w::dst#11 utoa10w::value#1 utoa10w::digit#1 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::dst#11 utoa10w::value#1 utoa10w::digit#1 ] { } ) always clobbers reg byte a
Statement [78] (word) utoa10w::value#1 ← (word) utoa10w::value#10 - *((const word*) UTOA10_SUB + (byte~) utoa10w::$8) [ utoa10w::i#2 utoa10w::dst#11 utoa10w::value#1 utoa10w::digit#1 ] ( utoa10w:26 [ utoa10w::i#2 utoa10w::dst#11 utoa10w::value#1 utoa10w::digit#1 ] { } ) always clobbers reg byte a Statement [83] *(*(&(volatile byte*) utoa16w::dst)) ← *((const byte*) DIGITS + (byte) utoa16n::nybble#4) [ utoa16w::dst utoa16n::return#4 ] ( utoa16w:9::utoa16n:40 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:12::utoa16n:40 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:15::utoa16n:40 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:18::utoa16n:40 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:21::utoa16n:40 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:9::utoa16n:46 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#1 = utoa16n::nybble#4 } { utoa16n::started#1 = utoa16n::started#7 utoa16w::started#1 } { utoa16n::return#1 = utoa16n::return#4 } } utoa16w:12::utoa16n:46 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#1 = utoa16n::nybble#4 } { utoa16n::started#1 = utoa16n::started#7 utoa16w::started#1 } { utoa16n::return#1 = utoa16n::return#4 } } utoa16w:15::utoa16n:46 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#1 = utoa16n::nybble#4 } { utoa16n::started#1 = utoa16n::started#7 utoa16w::started#1 } { utoa16n::return#1 = utoa16n::return#4 } } utoa16w:18::utoa16n:46 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#1 = utoa16n::nybble#4 } { utoa16n::started#1 = utoa16n::started#7 utoa16w::started#1 } { utoa16n::return#1 = utoa16n::return#4 } } utoa16w:21::utoa16n:46 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#1 = utoa16n::nybble#4 } { utoa16n::started#1 = utoa16n::started#7 utoa16w::started#1 } { utoa16n::return#1 = utoa16n::return#4 } } utoa16w:9::utoa16n:52 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:12::utoa16n:52 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:15::utoa16n:52 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:18::utoa16n:52 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:21::utoa16n:52 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:9::utoa16n:55 [ main::time_start#0 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#3 = utoa16n::nybble#4 } } utoa16w:12::utoa16n:55 [ main::time_start#0 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#3 = utoa16n::nybble#4 } } utoa16w:15::utoa16n:55 [ main::time_start#0 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#3 = utoa16n::nybble#4 } } utoa16w:18::utoa16n:55 [ main::time_start#0 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#3 = utoa16n::nybble#4 } } utoa16w:21::utoa16n:55 [ main::time_start#0 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#3 = utoa16n::nybble#4 } } ) always clobbers reg byte a reg byte y
Statement [84] *(*(&(volatile byte*) utoa16w::dst)) ← *((const byte*) DIGITS + (byte) utoa16n::nybble#4) [ utoa16w::dst utoa16n::return#4 ] ( utoa16w:9::utoa16n:40 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:12::utoa16n:40 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:15::utoa16n:40 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:18::utoa16n:40 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:21::utoa16n:40 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#0 = utoa16n::nybble#4 } { utoa16n::return#0 = utoa16n::return#4 } } utoa16w:9::utoa16n:46 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#1 = utoa16n::nybble#4 } { utoa16n::started#1 = utoa16n::started#7 utoa16w::started#1 } { utoa16n::return#1 = utoa16n::return#4 } } utoa16w:12::utoa16n:46 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#1 = utoa16n::nybble#4 } { utoa16n::started#1 = utoa16n::started#7 utoa16w::started#1 } { utoa16n::return#1 = utoa16n::return#4 } } utoa16w:15::utoa16n:46 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#1 = utoa16n::nybble#4 } { utoa16n::started#1 = utoa16n::started#7 utoa16w::started#1 } { utoa16n::return#1 = utoa16n::return#4 } } utoa16w:18::utoa16n:46 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#1 = utoa16n::nybble#4 } { utoa16n::started#1 = utoa16n::started#7 utoa16w::started#1 } { utoa16n::return#1 = utoa16n::return#4 } } utoa16w:21::utoa16n:46 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#1 = utoa16n::nybble#4 } { utoa16n::started#1 = utoa16n::started#7 utoa16w::started#1 } { utoa16n::return#1 = utoa16n::return#4 } } utoa16w:9::utoa16n:52 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:12::utoa16n:52 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:15::utoa16n:52 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:18::utoa16n:52 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:21::utoa16n:52 [ main::time_start#0 utoa16w::value#5 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#2 = utoa16n::nybble#4 } { utoa16n::started#2 = utoa16n::started#7 utoa16w::started#2 } } utoa16w:9::utoa16n:55 [ main::time_start#0 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#3 = utoa16n::nybble#4 } } utoa16w:12::utoa16n:55 [ main::time_start#0 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#3 = utoa16n::nybble#4 } } utoa16w:15::utoa16n:55 [ main::time_start#0 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#3 = utoa16n::nybble#4 } } utoa16w:18::utoa16n:55 [ main::time_start#0 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#3 = utoa16n::nybble#4 } } utoa16w:21::utoa16n:55 [ main::time_start#0 utoa16w::dst utoa16n::return#4 ] { { utoa16n::nybble#3 = utoa16n::nybble#4 } } ) always clobbers reg byte a reg byte y
Potential registers zp[1]:2 [ main::i#2 main::i#1 ] : zp[1]:2 , reg byte x , reg byte y , Potential registers zp[1]:2 [ main::i#2 main::i#1 ] : zp[1]:2 , reg byte x , reg byte y ,
Potential registers zp[2]:3 [ cls::sc#2 cls::sc#1 ] : zp[2]:3 , Potential registers zp[2]:3 [ cls::sc#2 cls::sc#1 ] : zp[2]:3 ,
Potential registers zp[2]:5 [ utoa16w::value#5 ] : zp[2]:5 , Potential registers zp[2]:5 [ utoa16w::value#5 ] : zp[2]:5 ,
@ -1982,50 +1975,47 @@ Potential registers zp[1]:28 [ utoa16n::return#1 ] : zp[1]:28 , reg byte a , reg
Potential registers zp[1]:29 [ utoa16w::started#2 ] : zp[1]:29 , reg byte x , reg byte y , Potential registers zp[1]:29 [ utoa16w::started#2 ] : zp[1]:29 , reg byte x , reg byte y ,
Potential registers zp[1]:30 [ utoa16w::$6 ] : zp[1]:30 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:30 [ utoa16w::$6 ] : zp[1]:30 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:31 [ utoa16w::$9 ] : zp[1]:31 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:31 [ utoa16w::$9 ] : zp[1]:31 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:32 [ utoa10w::$7 ] : zp[1]:32 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:32 [ utoa10w::$8 ] : zp[1]:32 , reg byte x , reg byte y ,
Potential registers zp[1]:33 [ utoa10w::$1 ] : zp[1]:33 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:33 [ utoa10w::$1 ] : zp[1]:33 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:34 [ utoa10w::$9 ] : zp[1]:34 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:34 [ utoa10w::$9 ] : zp[1]:34 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[2]:35 [ utoa10w::dst#2 ] : zp[2]:35 , Potential registers zp[2]:35 [ utoa10w::dst#2 ] : zp[2]:35 ,
Potential registers zp[1]:37 [ utoa10w::$8 ] : zp[1]:37 , reg byte a , reg byte x , reg byte y ,
REGISTER UPLIFT SCOPES REGISTER UPLIFT SCOPES
Uplift Scope [utoa10w] 63,046.7: zp[2]:12 [ utoa10w::dst#8 utoa10w::dst#11 utoa10w::dst#4 utoa10w::dst#1 ] 23,637: zp[2]:8 [ utoa10w::value#10 utoa10w::value#0 utoa10w::value#1 ] 21,668.83: zp[1]:10 [ utoa10w::digit#3 utoa10w::digit#1 utoa10w::digit#7 ] 21,155.96: zp[1]:7 [ utoa10w::i#2 utoa10w::i#1 ] 20,002: zp[1]:32 [ utoa10w::$7 ] 20,002: zp[1]:33 [ utoa10w::$1 ] 20,002: zp[1]:37 [ utoa10w::$8 ] 2,500.25: zp[1]:11 [ utoa10w::bStarted#2 ] 202: zp[1]:34 [ utoa10w::$9 ] 202: zp[2]:35 [ utoa10w::dst#2 ] Uplift Scope [utoa10w] 63,824.56: zp[2]:12 [ utoa10w::dst#8 utoa10w::dst#11 utoa10w::dst#4 utoa10w::dst#1 ] 25,002.5: zp[1]:10 [ utoa10w::digit#3 utoa10w::digit#1 utoa10w::digit#7 ] 23,912.31: zp[2]:8 [ utoa10w::value#10 utoa10w::value#0 utoa10w::value#1 ] 20,835.42: zp[1]:7 [ utoa10w::i#2 utoa10w::i#1 ] 20,002: zp[1]:33 [ utoa10w::$1 ] 10,001: zp[1]:32 [ utoa10w::$8 ] 2,500.25: zp[1]:11 [ utoa10w::bStarted#2 ] 202: zp[1]:34 [ utoa10w::$9 ] 202: zp[2]:35 [ utoa10w::dst#2 ]
Uplift Scope [utoa16n] 1,119.86: zp[1]:15 [ utoa16n::return#4 utoa16n::started#7 utoa16n::started#1 utoa16n::started#2 ] 1,087.2: zp[1]:14 [ utoa16n::nybble#4 utoa16n::nybble#0 utoa16n::nybble#1 utoa16n::nybble#2 utoa16n::nybble#3 ] 202: zp[1]:25 [ utoa16n::return#0 ] 202: zp[1]:28 [ utoa16n::return#1 ] Uplift Scope [utoa16n] 1,119.86: zp[1]:15 [ utoa16n::return#4 utoa16n::started#7 utoa16n::started#1 utoa16n::started#2 ] 1,087.2: zp[1]:14 [ utoa16n::nybble#4 utoa16n::nybble#0 utoa16n::nybble#1 utoa16n::nybble#2 utoa16n::nybble#3 ] 202: zp[1]:25 [ utoa16n::return#0 ] 202: zp[1]:28 [ utoa16n::return#1 ]
Uplift Scope [utoa16w] 202: zp[1]:24 [ utoa16w::$0 ] 202: zp[1]:27 [ utoa16w::$3 ] 202: zp[1]:30 [ utoa16w::$6 ] 202: zp[1]:31 [ utoa16w::$9 ] 67.33: zp[1]:26 [ utoa16w::started#1 ] 67.33: zp[1]:29 [ utoa16w::started#2 ] 25.25: zp[2]:5 [ utoa16w::value#5 ] 4.88: zp[2]:20 [ utoa16w::dst ] Uplift Scope [utoa16w] 202: zp[1]:24 [ utoa16w::$0 ] 202: zp[1]:27 [ utoa16w::$3 ] 202: zp[1]:30 [ utoa16w::$6 ] 202: zp[1]:31 [ utoa16w::$9 ] 67.33: zp[1]:26 [ utoa16w::started#1 ] 67.33: zp[1]:29 [ utoa16w::started#2 ] 25.25: zp[2]:5 [ utoa16w::value#5 ] 4.88: zp[2]:20 [ utoa16w::dst ]
Uplift Scope [main] 370.33: zp[1]:2 [ main::i#2 main::i#1 ] 202: zp[1]:17 [ main::$2 ] 202: zp[1]:18 [ main::rst#0 ] 101: zp[1]:16 [ main::$1 ] 11: zp[1]:22 [ main::time_end#0 ] 11: zp[1]:23 [ main::time#0 ] 1.29: zp[1]:19 [ main::time_start#0 ] Uplift Scope [main] 370.33: zp[1]:2 [ main::i#2 main::i#1 ] 202: zp[1]:17 [ main::$2 ] 202: zp[1]:18 [ main::rst#0 ] 101: zp[1]:16 [ main::$1 ] 11: zp[1]:22 [ main::time_end#0 ] 11: zp[1]:23 [ main::time#0 ] 1.29: zp[1]:19 [ main::time_start#0 ]
Uplift Scope [cls] 303: zp[2]:3 [ cls::sc#2 cls::sc#1 ] Uplift Scope [cls] 303: zp[2]:3 [ cls::sc#2 cls::sc#1 ]
Uplift Scope [] Uplift Scope []
Uplifting [utoa10w] best 28959 combination zp[2]:12 [ utoa10w::dst#8 utoa10w::dst#11 utoa10w::dst#4 utoa10w::dst#1 ] zp[2]:8 [ utoa10w::value#10 utoa10w::value#0 utoa10w::value#1 ] zp[1]:10 [ utoa10w::digit#3 utoa10w::digit#1 utoa10w::digit#7 ] reg byte x [ utoa10w::i#2 utoa10w::i#1 ] reg byte a [ utoa10w::$7 ] reg byte a [ utoa10w::$1 ] zp[1]:37 [ utoa10w::$8 ] zp[1]:11 [ utoa10w::bStarted#2 ] zp[1]:34 [ utoa10w::$9 ] zp[2]:35 [ utoa10w::dst#2 ] Uplifting [utoa10w] best 27959 combination zp[2]:12 [ utoa10w::dst#8 utoa10w::dst#11 utoa10w::dst#4 utoa10w::dst#1 ] zp[1]:10 [ utoa10w::digit#3 utoa10w::digit#1 utoa10w::digit#7 ] zp[2]:8 [ utoa10w::value#10 utoa10w::value#0 utoa10w::value#1 ] reg byte x [ utoa10w::i#2 utoa10w::i#1 ] reg byte a [ utoa10w::$1 ] reg byte y [ utoa10w::$8 ] zp[1]:11 [ utoa10w::bStarted#2 ] zp[1]:34 [ utoa10w::$9 ] zp[2]:35 [ utoa10w::dst#2 ]
Limited combination testing to 100 combinations of 3072 possible. Limited combination testing to 100 combinations of 576 possible.
Uplifting [utoa16n] best 28907 combination reg byte x [ utoa16n::return#4 utoa16n::started#7 utoa16n::started#1 utoa16n::started#2 ] reg byte a [ utoa16n::nybble#4 utoa16n::nybble#0 utoa16n::nybble#1 utoa16n::nybble#2 utoa16n::nybble#3 ] reg byte x [ utoa16n::return#0 ] reg byte x [ utoa16n::return#1 ] Uplifting [utoa16n] best 27907 combination reg byte x [ utoa16n::return#4 utoa16n::started#7 utoa16n::started#1 utoa16n::started#2 ] reg byte a [ utoa16n::nybble#4 utoa16n::nybble#0 utoa16n::nybble#1 utoa16n::nybble#2 utoa16n::nybble#3 ] reg byte x [ utoa16n::return#0 ] reg byte x [ utoa16n::return#1 ]
Limited combination testing to 100 combinations of 128 possible. Limited combination testing to 100 combinations of 128 possible.
Uplifting [utoa16w] best 28883 combination reg byte a [ utoa16w::$0 ] reg byte a [ utoa16w::$3 ] reg byte a [ utoa16w::$6 ] reg byte a [ utoa16w::$9 ] zp[1]:26 [ utoa16w::started#1 ] zp[1]:29 [ utoa16w::started#2 ] zp[2]:5 [ utoa16w::value#5 ] zp[2]:20 [ utoa16w::dst ] Uplifting [utoa16w] best 27883 combination reg byte a [ utoa16w::$0 ] reg byte a [ utoa16w::$3 ] reg byte a [ utoa16w::$6 ] reg byte a [ utoa16w::$9 ] zp[1]:26 [ utoa16w::started#1 ] zp[1]:29 [ utoa16w::started#2 ] zp[2]:5 [ utoa16w::value#5 ] zp[2]:20 [ utoa16w::dst ]
Limited combination testing to 100 combinations of 3072 possible. Limited combination testing to 100 combinations of 3072 possible.
Uplifting [main] best 26483 combination reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::$2 ] reg byte a [ main::rst#0 ] zp[1]:16 [ main::$1 ] zp[1]:22 [ main::time_end#0 ] zp[1]:23 [ main::time#0 ] zp[1]:19 [ main::time_start#0 ] Uplifting [main] best 25483 combination reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::$2 ] reg byte a [ main::rst#0 ] zp[1]:16 [ main::$1 ] zp[1]:22 [ main::time_end#0 ] zp[1]:23 [ main::time#0 ] zp[1]:19 [ main::time_start#0 ]
Limited combination testing to 100 combinations of 3456 possible. Limited combination testing to 100 combinations of 3456 possible.
Uplifting [cls] best 26483 combination zp[2]:3 [ cls::sc#2 cls::sc#1 ] Uplifting [cls] best 25483 combination zp[2]:3 [ cls::sc#2 cls::sc#1 ]
Uplifting [] best 26483 combination Uplifting [] best 25483 combination
Attempting to uplift remaining variables inzp[1]:10 [ utoa10w::digit#3 utoa10w::digit#1 utoa10w::digit#7 ] Attempting to uplift remaining variables inzp[1]:10 [ utoa10w::digit#3 utoa10w::digit#1 utoa10w::digit#7 ]
Uplifting [utoa10w] best 26483 combination zp[1]:10 [ utoa10w::digit#3 utoa10w::digit#1 utoa10w::digit#7 ] Uplifting [utoa10w] best 25483 combination zp[1]:10 [ utoa10w::digit#3 utoa10w::digit#1 utoa10w::digit#7 ]
Attempting to uplift remaining variables inzp[1]:37 [ utoa10w::$8 ]
Uplifting [utoa10w] best 26083 combination reg byte a [ utoa10w::$8 ]
Attempting to uplift remaining variables inzp[1]:11 [ utoa10w::bStarted#2 ] Attempting to uplift remaining variables inzp[1]:11 [ utoa10w::bStarted#2 ]
Uplifting [utoa10w] best 26083 combination zp[1]:11 [ utoa10w::bStarted#2 ] Uplifting [utoa10w] best 25483 combination zp[1]:11 [ utoa10w::bStarted#2 ]
Attempting to uplift remaining variables inzp[1]:34 [ utoa10w::$9 ] Attempting to uplift remaining variables inzp[1]:34 [ utoa10w::$9 ]
Uplifting [utoa10w] best 26079 combination reg byte a [ utoa10w::$9 ] Uplifting [utoa10w] best 25479 combination reg byte a [ utoa10w::$9 ]
Attempting to uplift remaining variables inzp[1]:16 [ main::$1 ] Attempting to uplift remaining variables inzp[1]:16 [ main::$1 ]
Uplifting [main] best 26079 combination zp[1]:16 [ main::$1 ] Uplifting [main] best 25479 combination zp[1]:16 [ main::$1 ]
Attempting to uplift remaining variables inzp[1]:26 [ utoa16w::started#1 ] Attempting to uplift remaining variables inzp[1]:26 [ utoa16w::started#1 ]
Uplifting [utoa16w] best 26073 combination reg byte x [ utoa16w::started#1 ] Uplifting [utoa16w] best 25473 combination reg byte x [ utoa16w::started#1 ]
Attempting to uplift remaining variables inzp[1]:29 [ utoa16w::started#2 ] Attempting to uplift remaining variables inzp[1]:29 [ utoa16w::started#2 ]
Uplifting [utoa16w] best 26067 combination reg byte x [ utoa16w::started#2 ] Uplifting [utoa16w] best 25467 combination reg byte x [ utoa16w::started#2 ]
Attempting to uplift remaining variables inzp[1]:22 [ main::time_end#0 ] Attempting to uplift remaining variables inzp[1]:22 [ main::time_end#0 ]
Uplifting [main] best 26027 combination reg byte x [ main::time_end#0 ] Uplifting [main] best 25427 combination reg byte x [ main::time_end#0 ]
Attempting to uplift remaining variables inzp[1]:23 [ main::time#0 ] Attempting to uplift remaining variables inzp[1]:23 [ main::time#0 ]
Uplifting [main] best 25967 combination reg byte a [ main::time#0 ] Uplifting [main] best 25367 combination reg byte a [ main::time#0 ]
Attempting to uplift remaining variables inzp[1]:19 [ main::time_start#0 ] Attempting to uplift remaining variables inzp[1]:19 [ main::time_start#0 ]
Uplifting [main] best 25967 combination zp[1]:19 [ main::time_start#0 ] Uplifting [main] best 25367 combination zp[1]:19 [ main::time_start#0 ]
Coalescing zero page register [ zp[2]:12 [ utoa10w::dst#8 utoa10w::dst#11 utoa10w::dst#4 utoa10w::dst#1 ] ] with [ zp[2]:35 [ utoa10w::dst#2 ] ] - score: 1 Coalescing zero page register [ zp[2]:12 [ utoa10w::dst#8 utoa10w::dst#11 utoa10w::dst#4 utoa10w::dst#1 ] ] with [ zp[2]:35 [ utoa10w::dst#2 ] ] - score: 1
Coalescing zero page register [ zp[2]:5 [ utoa16w::value#5 ] ] with [ zp[2]:3 [ cls::sc#2 cls::sc#1 ] ] Coalescing zero page register [ zp[2]:5 [ utoa16w::value#5 ] ] with [ zp[2]:3 [ cls::sc#2 cls::sc#1 ] ]
Coalescing zero page register [ zp[1]:16 [ main::$1 ] ] with [ zp[1]:10 [ utoa10w::digit#3 utoa10w::digit#1 utoa10w::digit#7 ] ] Coalescing zero page register [ zp[1]:16 [ main::$1 ] ] with [ zp[1]:10 [ utoa10w::digit#3 utoa10w::digit#1 utoa10w::digit#7 ] ]
@ -2272,11 +2262,11 @@ utoa16w: {
lsr lsr
lsr lsr
// [40] call utoa16n // [40] call utoa16n
// [79] phi from utoa16w to utoa16n [phi:utoa16w->utoa16n] // [78] phi from utoa16w to utoa16n [phi:utoa16w->utoa16n]
utoa16n_from_utoa16w: utoa16n_from_utoa16w:
// [79] phi (byte) utoa16n::started#7 = (byte) 0 [phi:utoa16w->utoa16n#0] -- vbuxx=vbuc1 // [78] phi (byte) utoa16n::started#7 = (byte) 0 [phi:utoa16w->utoa16n#0] -- vbuxx=vbuc1
ldx #0 ldx #0
// [79] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#0 [phi:utoa16w->utoa16n#1] -- register_copy // [78] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#0 [phi:utoa16w->utoa16n#1] -- register_copy
jsr utoa16n jsr utoa16n
// [41] (byte) utoa16n::return#0 ← (byte) utoa16n::return#4 // [41] (byte) utoa16n::return#0 ← (byte) utoa16n::return#4
jmp __b1 jmp __b1
@ -2289,10 +2279,10 @@ utoa16w: {
and #$f and #$f
// [45] (byte) utoa16n::started#1 ← (byte) utoa16w::started#1 // [45] (byte) utoa16n::started#1 ← (byte) utoa16w::started#1
// [46] call utoa16n // [46] call utoa16n
// [79] phi from utoa16w::@1 to utoa16n [phi:utoa16w::@1->utoa16n] // [78] phi from utoa16w::@1 to utoa16n [phi:utoa16w::@1->utoa16n]
utoa16n_from___b1: utoa16n_from___b1:
// [79] phi (byte) utoa16n::started#7 = (byte) utoa16n::started#1 [phi:utoa16w::@1->utoa16n#0] -- register_copy // [78] phi (byte) utoa16n::started#7 = (byte) utoa16n::started#1 [phi:utoa16w::@1->utoa16n#0] -- register_copy
// [79] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#1 [phi:utoa16w::@1->utoa16n#1] -- register_copy // [78] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#1 [phi:utoa16w::@1->utoa16n#1] -- register_copy
jsr utoa16n jsr utoa16n
// [47] (byte) utoa16n::return#1 ← (byte) utoa16n::return#4 // [47] (byte) utoa16n::return#1 ← (byte) utoa16n::return#4
jmp __b2 jmp __b2
@ -2308,10 +2298,10 @@ utoa16w: {
lsr lsr
// [51] (byte) utoa16n::started#2 ← (byte) utoa16w::started#2 // [51] (byte) utoa16n::started#2 ← (byte) utoa16w::started#2
// [52] call utoa16n // [52] call utoa16n
// [79] phi from utoa16w::@2 to utoa16n [phi:utoa16w::@2->utoa16n] // [78] phi from utoa16w::@2 to utoa16n [phi:utoa16w::@2->utoa16n]
utoa16n_from___b2: utoa16n_from___b2:
// [79] phi (byte) utoa16n::started#7 = (byte) utoa16n::started#2 [phi:utoa16w::@2->utoa16n#0] -- register_copy // [78] phi (byte) utoa16n::started#7 = (byte) utoa16n::started#2 [phi:utoa16w::@2->utoa16n#0] -- register_copy
// [79] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#2 [phi:utoa16w::@2->utoa16n#1] -- register_copy // [78] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#2 [phi:utoa16w::@2->utoa16n#1] -- register_copy
jsr utoa16n jsr utoa16n
jmp __b3 jmp __b3
// utoa16w::@3 // utoa16w::@3
@ -2321,11 +2311,11 @@ utoa16w: {
// [54] (byte) utoa16n::nybble#3 ← (byte~) utoa16w::$9 & (byte) $f -- vbuaa=vbuaa_band_vbuc1 // [54] (byte) utoa16n::nybble#3 ← (byte~) utoa16w::$9 & (byte) $f -- vbuaa=vbuaa_band_vbuc1
and #$f and #$f
// [55] call utoa16n // [55] call utoa16n
// [79] phi from utoa16w::@3 to utoa16n [phi:utoa16w::@3->utoa16n] // [78] phi from utoa16w::@3 to utoa16n [phi:utoa16w::@3->utoa16n]
utoa16n_from___b3: utoa16n_from___b3:
// [79] phi (byte) utoa16n::started#7 = (byte) 1 [phi:utoa16w::@3->utoa16n#0] -- vbuxx=vbuc1 // [78] phi (byte) utoa16n::started#7 = (byte) 1 [phi:utoa16w::@3->utoa16n#0] -- vbuxx=vbuc1
ldx #1 ldx #1
// [79] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#3 [phi:utoa16w::@3->utoa16n#1] -- register_copy // [78] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#3 [phi:utoa16w::@3->utoa16n#1] -- register_copy
jsr utoa16n jsr utoa16n
jmp __b4 jmp __b4
// utoa16w::@4 // utoa16w::@4
@ -2375,11 +2365,11 @@ utoa10w: {
jmp __b1 jmp __b1
// utoa10w::@1 // utoa10w::@1
__b1: __b1:
// [60] (byte~) utoa10w::$7 ← (byte) utoa10w::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 // [60] (byte~) utoa10w::$8 ← (byte) utoa10w::i#2 << (byte) 1 -- vbuyy=vbuxx_rol_1
txa txa
asl asl
// [61] if((word) utoa10w::value#10>=*((const word*) UTOA10_SUB + (byte~) utoa10w::$7)) goto utoa10w::@2 -- vwuz1_ge_pwuc1_derefidx_vbuaa_then_la1
tay tay
// [61] if((word) utoa10w::value#10>=*((const word*) UTOA10_SUB + (byte~) utoa10w::$8)) goto utoa10w::@2 -- vwuz1_ge_pwuc1_derefidx_vbuyy_then_la1
lda UTOA10_SUB+1,y lda UTOA10_SUB+1,y
cmp.z value+1 cmp.z value+1
bne !+ bne !+
@ -2474,11 +2464,7 @@ utoa10w: {
clc clc
adc.z digit adc.z digit
sta.z digit sta.z digit
// [77] (byte~) utoa10w::$8 ← (byte) utoa10w::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 // [77] (word) utoa10w::value#1 ← (word) utoa10w::value#10 - *((const word*) UTOA10_SUB + (byte~) utoa10w::$8) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuyy
txa
asl
// [78] (word) utoa10w::value#1 ← (word) utoa10w::value#10 - *((const word*) UTOA10_SUB + (byte~) utoa10w::$8) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa
tay
sec sec
lda.z value lda.z value
sbc UTOA10_SUB,y sbc UTOA10_SUB,y
@ -2501,32 +2487,32 @@ utoa10w: {
// Hexadecimal utoa() for a single nybble // Hexadecimal utoa() for a single nybble
// utoa16n(byte register(A) nybble, byte register(X) started) // utoa16n(byte register(A) nybble, byte register(X) started)
utoa16n: { utoa16n: {
// [80] if((byte) utoa16n::nybble#4==(byte) 0) goto utoa16n::@3 -- vbuaa_eq_0_then_la1 // [79] if((byte) utoa16n::nybble#4==(byte) 0) goto utoa16n::@3 -- vbuaa_eq_0_then_la1
cmp #0 cmp #0
beq __b3_from_utoa16n beq __b3_from_utoa16n
// [82] phi from utoa16n to utoa16n::@1 [phi:utoa16n->utoa16n::@1] // [81] phi from utoa16n to utoa16n::@1 [phi:utoa16n->utoa16n::@1]
__b1_from_utoa16n: __b1_from_utoa16n:
// [82] phi (byte) utoa16n::return#4 = (byte) 1 [phi:utoa16n->utoa16n::@1#0] -- vbuxx=vbuc1 // [81] phi (byte) utoa16n::return#4 = (byte) 1 [phi:utoa16n->utoa16n::@1#0] -- vbuxx=vbuc1
ldx #1 ldx #1
jmp __b1 jmp __b1
// [81] phi from utoa16n to utoa16n::@3 [phi:utoa16n->utoa16n::@3] // [80] phi from utoa16n to utoa16n::@3 [phi:utoa16n->utoa16n::@3]
__b3_from_utoa16n: __b3_from_utoa16n:
jmp __b3 jmp __b3
// utoa16n::@3 // utoa16n::@3
__b3: __b3:
// [82] phi from utoa16n::@3 to utoa16n::@1 [phi:utoa16n::@3->utoa16n::@1] // [81] phi from utoa16n::@3 to utoa16n::@1 [phi:utoa16n::@3->utoa16n::@1]
__b1_from___b3: __b1_from___b3:
// [82] phi (byte) utoa16n::return#4 = (byte) utoa16n::started#7 [phi:utoa16n::@3->utoa16n::@1#0] -- register_copy // [81] phi (byte) utoa16n::return#4 = (byte) utoa16n::started#7 [phi:utoa16n::@3->utoa16n::@1#0] -- register_copy
jmp __b1 jmp __b1
// utoa16n::@1 // utoa16n::@1
__b1: __b1:
// [83] if((byte) utoa16n::return#4==(byte) 0) goto utoa16n::@return -- vbuxx_eq_0_then_la1 // [82] if((byte) utoa16n::return#4==(byte) 0) goto utoa16n::@return -- vbuxx_eq_0_then_la1
cpx #0 cpx #0
beq __breturn beq __breturn
jmp __b2 jmp __b2
// utoa16n::@2 // utoa16n::@2
__b2: __b2:
// [84] *(*(&(volatile byte*) utoa16w::dst)) ← *((const byte*) DIGITS + (byte) utoa16n::nybble#4) -- _deref_(_deref_qbuc1)=pbuc2_derefidx_vbuaa // [83] *(*(&(volatile byte*) utoa16w::dst)) ← *((const byte*) DIGITS + (byte) utoa16n::nybble#4) -- _deref_(_deref_qbuc1)=pbuc2_derefidx_vbuaa
tay tay
lda DIGITS,y lda DIGITS,y
ldy.z utoa16w.dst ldy.z utoa16w.dst
@ -2535,7 +2521,7 @@ utoa16n: {
sty.z $ff sty.z $ff
ldy #0 ldy #0
sta ($fe),y sta ($fe),y
// [85] *(&(volatile byte*) utoa16w::dst) ← ++ *(&(volatile byte*) utoa16w::dst) -- _deref_qbuc1=_inc__deref_qbuc1 // [84] *(&(volatile byte*) utoa16w::dst) ← ++ *(&(volatile byte*) utoa16w::dst) -- _deref_qbuc1=_inc__deref_qbuc1
inc.z utoa16w.dst inc.z utoa16w.dst
bne !+ bne !+
inc.z utoa16w.dst+1 inc.z utoa16w.dst+1
@ -2543,7 +2529,7 @@ utoa16n: {
jmp __breturn jmp __breturn
// utoa16n::@return // utoa16n::@return
__breturn: __breturn:
// [86] return // [85] return
rts rts
} }
// File Data // File Data
@ -2689,8 +2675,7 @@ FINAL SYMBOL TABLE
(const nomodify byte*) raster = (byte*) 53266 (const nomodify byte*) raster = (byte*) 53266
(void()) utoa10w((word) utoa10w::value , (byte*) utoa10w::dst) (void()) utoa10w((word) utoa10w::value , (byte*) utoa10w::dst)
(byte~) utoa10w::$1 reg byte a 20002.0 (byte~) utoa10w::$1 reg byte a 20002.0
(byte~) utoa10w::$7 reg byte a 20002.0 (byte~) utoa10w::$8 reg byte y 10001.0
(byte~) utoa10w::$8 reg byte a 20002.0
(byte~) utoa10w::$9 reg byte a 202.0 (byte~) utoa10w::$9 reg byte a 202.0
(label) utoa10w::@1 (label) utoa10w::@1
(label) utoa10w::@2 (label) utoa10w::@2
@ -2704,22 +2689,22 @@ FINAL SYMBOL TABLE
(byte) utoa10w::bStarted (byte) utoa10w::bStarted
(byte) utoa10w::bStarted#2 bStarted zp[1]:7 2500.25 (byte) utoa10w::bStarted#2 bStarted zp[1]:7 2500.25
(byte) utoa10w::digit (byte) utoa10w::digit
(byte) utoa10w::digit#1 digit zp[1]:6 6667.333333333333 (byte) utoa10w::digit#1 digit zp[1]:6 10001.0
(byte) utoa10w::digit#3 digit zp[1]:6 8334.166666666666 (byte) utoa10w::digit#3 digit zp[1]:6 8334.166666666666
(byte) utoa10w::digit#7 digit zp[1]:6 6667.333333333333 (byte) utoa10w::digit#7 digit zp[1]:6 6667.333333333333
(byte*) utoa10w::dst (byte*) utoa10w::dst
(byte*) utoa10w::dst#1 dst zp[2]:4 20002.0 (byte*) utoa10w::dst#1 dst zp[2]:4 20002.0
(byte*) utoa10w::dst#11 dst zp[2]:4 7000.700000000001 (byte*) utoa10w::dst#11 dst zp[2]:4 7778.555555555557
(byte*) utoa10w::dst#2 dst zp[2]:4 202.0 (byte*) utoa10w::dst#2 dst zp[2]:4 202.0
(byte*) utoa10w::dst#4 dst zp[2]:4 6041.0 (byte*) utoa10w::dst#4 dst zp[2]:4 6041.0
(byte*) utoa10w::dst#8 dst zp[2]:4 30003.0 (byte*) utoa10w::dst#8 dst zp[2]:4 30003.0
(byte) utoa10w::i (byte) utoa10w::i
(byte) utoa10w::i#1 reg byte x 15001.5 (byte) utoa10w::i#1 reg byte x 15001.5
(byte) utoa10w::i#2 reg byte x 6154.461538461538 (byte) utoa10w::i#2 reg byte x 5833.916666666667
(word) utoa10w::value (word) utoa10w::value
(word) utoa10w::value#0 value zp[2]:2 56.0 (word) utoa10w::value#0 value zp[2]:2 56.0
(word) utoa10w::value#1 value zp[2]:2 20002.0 (word) utoa10w::value#1 value zp[2]:2 20002.0
(word) utoa10w::value#10 value zp[2]:2 3579.000000000001 (word) utoa10w::value#10 value zp[2]:2 3854.3076923076924
(byte()) utoa16n((byte) utoa16n::nybble , (word**) utoa16n::dst , (byte) utoa16n::started) (byte()) utoa16n((byte) utoa16n::nybble , (word**) utoa16n::dst , (byte) utoa16n::started)
(label) utoa16n::@1 (label) utoa16n::@1
(label) utoa16n::@2 (label) utoa16n::@2
@ -2778,14 +2763,13 @@ reg byte x [ utoa16n::return#1 ]
reg byte x [ utoa16w::started#2 ] reg byte x [ utoa16w::started#2 ]
reg byte a [ utoa16w::$6 ] reg byte a [ utoa16w::$6 ]
reg byte a [ utoa16w::$9 ] reg byte a [ utoa16w::$9 ]
reg byte a [ utoa10w::$7 ] reg byte y [ utoa10w::$8 ]
reg byte a [ utoa10w::$1 ] reg byte a [ utoa10w::$1 ]
reg byte a [ utoa10w::$9 ] reg byte a [ utoa10w::$9 ]
reg byte a [ utoa10w::$8 ]
FINAL ASSEMBLER FINAL ASSEMBLER
Score: 22318 Score: 21718
// File Comments // File Comments
// Testing hex to decimal conversion // Testing hex to decimal conversion
@ -3020,10 +3004,10 @@ utoa16w: {
lsr lsr
lsr lsr
// [40] call utoa16n // [40] call utoa16n
// [79] phi from utoa16w to utoa16n [phi:utoa16w->utoa16n] // [78] phi from utoa16w to utoa16n [phi:utoa16w->utoa16n]
// [79] phi (byte) utoa16n::started#7 = (byte) 0 [phi:utoa16w->utoa16n#0] -- vbuxx=vbuc1 // [78] phi (byte) utoa16n::started#7 = (byte) 0 [phi:utoa16w->utoa16n#0] -- vbuxx=vbuc1
ldx #0 ldx #0
// [79] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#0 [phi:utoa16w->utoa16n#1] -- register_copy // [78] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#0 [phi:utoa16w->utoa16n#1] -- register_copy
jsr utoa16n jsr utoa16n
// utoa16n((>value)>>4, &dst, started) // utoa16n((>value)>>4, &dst, started)
// [41] (byte) utoa16n::return#0 ← (byte) utoa16n::return#4 // [41] (byte) utoa16n::return#0 ← (byte) utoa16n::return#4
@ -3038,9 +3022,9 @@ utoa16w: {
and #$f and #$f
// [45] (byte) utoa16n::started#1 ← (byte) utoa16w::started#1 // [45] (byte) utoa16n::started#1 ← (byte) utoa16w::started#1
// [46] call utoa16n // [46] call utoa16n
// [79] phi from utoa16w::@1 to utoa16n [phi:utoa16w::@1->utoa16n] // [78] phi from utoa16w::@1 to utoa16n [phi:utoa16w::@1->utoa16n]
// [79] phi (byte) utoa16n::started#7 = (byte) utoa16n::started#1 [phi:utoa16w::@1->utoa16n#0] -- register_copy // [78] phi (byte) utoa16n::started#7 = (byte) utoa16n::started#1 [phi:utoa16w::@1->utoa16n#0] -- register_copy
// [79] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#1 [phi:utoa16w::@1->utoa16n#1] -- register_copy // [78] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#1 [phi:utoa16w::@1->utoa16n#1] -- register_copy
jsr utoa16n jsr utoa16n
// utoa16n((>value)&0x0f, &dst, started) // utoa16n((>value)&0x0f, &dst, started)
// [47] (byte) utoa16n::return#1 ← (byte) utoa16n::return#4 // [47] (byte) utoa16n::return#1 ← (byte) utoa16n::return#4
@ -3058,9 +3042,9 @@ utoa16w: {
lsr lsr
// [51] (byte) utoa16n::started#2 ← (byte) utoa16w::started#2 // [51] (byte) utoa16n::started#2 ← (byte) utoa16w::started#2
// [52] call utoa16n // [52] call utoa16n
// [79] phi from utoa16w::@2 to utoa16n [phi:utoa16w::@2->utoa16n] // [78] phi from utoa16w::@2 to utoa16n [phi:utoa16w::@2->utoa16n]
// [79] phi (byte) utoa16n::started#7 = (byte) utoa16n::started#2 [phi:utoa16w::@2->utoa16n#0] -- register_copy // [78] phi (byte) utoa16n::started#7 = (byte) utoa16n::started#2 [phi:utoa16w::@2->utoa16n#0] -- register_copy
// [79] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#2 [phi:utoa16w::@2->utoa16n#1] -- register_copy // [78] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#2 [phi:utoa16w::@2->utoa16n#1] -- register_copy
jsr utoa16n jsr utoa16n
// utoa16w::@3 // utoa16w::@3
// <value // <value
@ -3070,10 +3054,10 @@ utoa16w: {
// [54] (byte) utoa16n::nybble#3 ← (byte~) utoa16w::$9 & (byte) $f -- vbuaa=vbuaa_band_vbuc1 // [54] (byte) utoa16n::nybble#3 ← (byte~) utoa16w::$9 & (byte) $f -- vbuaa=vbuaa_band_vbuc1
and #$f and #$f
// [55] call utoa16n // [55] call utoa16n
// [79] phi from utoa16w::@3 to utoa16n [phi:utoa16w::@3->utoa16n] // [78] phi from utoa16w::@3 to utoa16n [phi:utoa16w::@3->utoa16n]
// [79] phi (byte) utoa16n::started#7 = (byte) 1 [phi:utoa16w::@3->utoa16n#0] -- vbuxx=vbuc1 // [78] phi (byte) utoa16n::started#7 = (byte) 1 [phi:utoa16w::@3->utoa16n#0] -- vbuxx=vbuc1
ldx #1 ldx #1
// [79] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#3 [phi:utoa16w::@3->utoa16n#1] -- register_copy // [78] phi (byte) utoa16n::nybble#4 = (byte) utoa16n::nybble#3 [phi:utoa16w::@3->utoa16n#1] -- register_copy
jsr utoa16n jsr utoa16n
// utoa16w::@4 // utoa16w::@4
// *dst = 0 // *dst = 0
@ -3117,12 +3101,12 @@ utoa10w: {
// utoa10w::@1 // utoa10w::@1
__b1: __b1:
// value>=UTOA10_SUB[i] // value>=UTOA10_SUB[i]
// [60] (byte~) utoa10w::$7 ← (byte) utoa10w::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 // [60] (byte~) utoa10w::$8 ← (byte) utoa10w::i#2 << (byte) 1 -- vbuyy=vbuxx_rol_1
txa txa
asl asl
// while(value>=UTOA10_SUB[i])
// [61] if((word) utoa10w::value#10>=*((const word*) UTOA10_SUB + (byte~) utoa10w::$7)) goto utoa10w::@2 -- vwuz1_ge_pwuc1_derefidx_vbuaa_then_la1
tay tay
// while(value>=UTOA10_SUB[i])
// [61] if((word) utoa10w::value#10>=*((const word*) UTOA10_SUB + (byte~) utoa10w::$8)) goto utoa10w::@2 -- vwuz1_ge_pwuc1_derefidx_vbuyy_then_la1
lda UTOA10_SUB+1,y lda UTOA10_SUB+1,y
cmp.z value+1 cmp.z value+1
bne !+ bne !+
@ -3212,11 +3196,7 @@ utoa10w: {
adc.z digit adc.z digit
sta.z digit sta.z digit
// value -= UTOA10_SUB[i] // value -= UTOA10_SUB[i]
// [77] (byte~) utoa10w::$8 ← (byte) utoa10w::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 // [77] (word) utoa10w::value#1 ← (word) utoa10w::value#10 - *((const word*) UTOA10_SUB + (byte~) utoa10w::$8) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuyy
txa
asl
// [78] (word) utoa10w::value#1 ← (word) utoa10w::value#10 - *((const word*) UTOA10_SUB + (byte~) utoa10w::$8) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa
tay
sec sec
lda.z value lda.z value
sbc UTOA10_SUB,y sbc UTOA10_SUB,y
@ -3239,25 +3219,25 @@ utoa10w: {
// utoa16n(byte register(A) nybble, byte register(X) started) // utoa16n(byte register(A) nybble, byte register(X) started)
utoa16n: { utoa16n: {
// if(nybble!=0) // if(nybble!=0)
// [80] if((byte) utoa16n::nybble#4==(byte) 0) goto utoa16n::@3 -- vbuaa_eq_0_then_la1 // [79] if((byte) utoa16n::nybble#4==(byte) 0) goto utoa16n::@3 -- vbuaa_eq_0_then_la1
cmp #0 cmp #0
beq __b1 beq __b1
// [82] phi from utoa16n to utoa16n::@1 [phi:utoa16n->utoa16n::@1] // [81] phi from utoa16n to utoa16n::@1 [phi:utoa16n->utoa16n::@1]
// [82] phi (byte) utoa16n::return#4 = (byte) 1 [phi:utoa16n->utoa16n::@1#0] -- vbuxx=vbuc1 // [81] phi (byte) utoa16n::return#4 = (byte) 1 [phi:utoa16n->utoa16n::@1#0] -- vbuxx=vbuc1
ldx #1 ldx #1
// [81] phi from utoa16n to utoa16n::@3 [phi:utoa16n->utoa16n::@3] // [80] phi from utoa16n to utoa16n::@3 [phi:utoa16n->utoa16n::@3]
// utoa16n::@3 // utoa16n::@3
// [82] phi from utoa16n::@3 to utoa16n::@1 [phi:utoa16n::@3->utoa16n::@1] // [81] phi from utoa16n::@3 to utoa16n::@1 [phi:utoa16n::@3->utoa16n::@1]
// [82] phi (byte) utoa16n::return#4 = (byte) utoa16n::started#7 [phi:utoa16n::@3->utoa16n::@1#0] -- register_copy // [81] phi (byte) utoa16n::return#4 = (byte) utoa16n::started#7 [phi:utoa16n::@3->utoa16n::@1#0] -- register_copy
// utoa16n::@1 // utoa16n::@1
__b1: __b1:
// if(started!=0) // if(started!=0)
// [83] if((byte) utoa16n::return#4==(byte) 0) goto utoa16n::@return -- vbuxx_eq_0_then_la1 // [82] if((byte) utoa16n::return#4==(byte) 0) goto utoa16n::@return -- vbuxx_eq_0_then_la1
cpx #0 cpx #0
beq __breturn beq __breturn
// utoa16n::@2 // utoa16n::@2
// *(*dst)++ = DIGITS[nybble] // *(*dst)++ = DIGITS[nybble]
// [84] *(*(&(volatile byte*) utoa16w::dst)) ← *((const byte*) DIGITS + (byte) utoa16n::nybble#4) -- _deref_(_deref_qbuc1)=pbuc2_derefidx_vbuaa // [83] *(*(&(volatile byte*) utoa16w::dst)) ← *((const byte*) DIGITS + (byte) utoa16n::nybble#4) -- _deref_(_deref_qbuc1)=pbuc2_derefidx_vbuaa
tay tay
lda DIGITS,y lda DIGITS,y
ldy.z utoa16w.dst ldy.z utoa16w.dst
@ -3267,7 +3247,7 @@ utoa16n: {
ldy #0 ldy #0
sta ($fe),y sta ($fe),y
// *(*dst)++ = DIGITS[nybble]; // *(*dst)++ = DIGITS[nybble];
// [85] *(&(volatile byte*) utoa16w::dst) ← ++ *(&(volatile byte*) utoa16w::dst) -- _deref_qbuc1=_inc__deref_qbuc1 // [84] *(&(volatile byte*) utoa16w::dst) ← ++ *(&(volatile byte*) utoa16w::dst) -- _deref_qbuc1=_inc__deref_qbuc1
inc.z utoa16w.dst inc.z utoa16w.dst
bne !+ bne !+
inc.z utoa16w.dst+1 inc.z utoa16w.dst+1
@ -3275,7 +3255,7 @@ utoa16n: {
// utoa16n::@return // utoa16n::@return
__breturn: __breturn:
// } // }
// [86] return // [85] return
rts rts
} }
// File Data // File Data

View File

@ -38,8 +38,7 @@
(const nomodify byte*) raster = (byte*) 53266 (const nomodify byte*) raster = (byte*) 53266
(void()) utoa10w((word) utoa10w::value , (byte*) utoa10w::dst) (void()) utoa10w((word) utoa10w::value , (byte*) utoa10w::dst)
(byte~) utoa10w::$1 reg byte a 20002.0 (byte~) utoa10w::$1 reg byte a 20002.0
(byte~) utoa10w::$7 reg byte a 20002.0 (byte~) utoa10w::$8 reg byte y 10001.0
(byte~) utoa10w::$8 reg byte a 20002.0
(byte~) utoa10w::$9 reg byte a 202.0 (byte~) utoa10w::$9 reg byte a 202.0
(label) utoa10w::@1 (label) utoa10w::@1
(label) utoa10w::@2 (label) utoa10w::@2
@ -53,22 +52,22 @@
(byte) utoa10w::bStarted (byte) utoa10w::bStarted
(byte) utoa10w::bStarted#2 bStarted zp[1]:7 2500.25 (byte) utoa10w::bStarted#2 bStarted zp[1]:7 2500.25
(byte) utoa10w::digit (byte) utoa10w::digit
(byte) utoa10w::digit#1 digit zp[1]:6 6667.333333333333 (byte) utoa10w::digit#1 digit zp[1]:6 10001.0
(byte) utoa10w::digit#3 digit zp[1]:6 8334.166666666666 (byte) utoa10w::digit#3 digit zp[1]:6 8334.166666666666
(byte) utoa10w::digit#7 digit zp[1]:6 6667.333333333333 (byte) utoa10w::digit#7 digit zp[1]:6 6667.333333333333
(byte*) utoa10w::dst (byte*) utoa10w::dst
(byte*) utoa10w::dst#1 dst zp[2]:4 20002.0 (byte*) utoa10w::dst#1 dst zp[2]:4 20002.0
(byte*) utoa10w::dst#11 dst zp[2]:4 7000.700000000001 (byte*) utoa10w::dst#11 dst zp[2]:4 7778.555555555557
(byte*) utoa10w::dst#2 dst zp[2]:4 202.0 (byte*) utoa10w::dst#2 dst zp[2]:4 202.0
(byte*) utoa10w::dst#4 dst zp[2]:4 6041.0 (byte*) utoa10w::dst#4 dst zp[2]:4 6041.0
(byte*) utoa10w::dst#8 dst zp[2]:4 30003.0 (byte*) utoa10w::dst#8 dst zp[2]:4 30003.0
(byte) utoa10w::i (byte) utoa10w::i
(byte) utoa10w::i#1 reg byte x 15001.5 (byte) utoa10w::i#1 reg byte x 15001.5
(byte) utoa10w::i#2 reg byte x 6154.461538461538 (byte) utoa10w::i#2 reg byte x 5833.916666666667
(word) utoa10w::value (word) utoa10w::value
(word) utoa10w::value#0 value zp[2]:2 56.0 (word) utoa10w::value#0 value zp[2]:2 56.0
(word) utoa10w::value#1 value zp[2]:2 20002.0 (word) utoa10w::value#1 value zp[2]:2 20002.0
(word) utoa10w::value#10 value zp[2]:2 3579.000000000001 (word) utoa10w::value#10 value zp[2]:2 3854.3076923076924
(byte()) utoa16n((byte) utoa16n::nybble , (word**) utoa16n::dst , (byte) utoa16n::started) (byte()) utoa16n((byte) utoa16n::nybble , (word**) utoa16n::dst , (byte) utoa16n::started)
(label) utoa16n::@1 (label) utoa16n::@1
(label) utoa16n::@2 (label) utoa16n::@2
@ -127,7 +126,6 @@ reg byte x [ utoa16n::return#1 ]
reg byte x [ utoa16w::started#2 ] reg byte x [ utoa16w::started#2 ]
reg byte a [ utoa16w::$6 ] reg byte a [ utoa16w::$6 ]
reg byte a [ utoa16w::$9 ] reg byte a [ utoa16w::$9 ]
reg byte a [ utoa10w::$7 ] reg byte y [ utoa10w::$8 ]
reg byte a [ utoa10w::$1 ] reg byte a [ utoa10w::$1 ]
reg byte a [ utoa10w::$9 ] reg byte a [ utoa10w::$9 ]
reg byte a [ utoa10w::$8 ]

View File

@ -60,23 +60,17 @@ main: {
bcc __b6 bcc __b6
!: !:
// entities[i] =0 // entities[i] =0
lda.z i
asl
tay
lda #0 lda #0
sta entities,y sta entities,x
sta entities+1,y sta entities+1,x
__b6: __b6:
// line[entities[i]] = '*' // line[entities[i]] = '*'
lda.z i
asl
tay
clc clc
lda.z line lda.z line
adc entities,y adc entities,x
sta.z __11 sta.z __11
lda.z line+1 lda.z line+1
adc entities+1,y adc entities+1,x
sta.z __11+1 sta.z __11+1
// Draw symbol // Draw symbol
lda #'*' lda #'*'

View File

@ -18,20 +18,18 @@ main::@5: scope:[main] from main::@3
[5] *((const nomodify byte*) VIC_BG_COLOR) ← (byte) $f [5] *((const nomodify byte*) VIC_BG_COLOR) ← (byte) $f
to:main::@1 to:main::@1
main::@4: scope:[main] from main::@3 main::@4: scope:[main] from main::@3
[6] (byte~) main::$5 ← (byte) main::i#2 << (byte) 1 [6] (byte~) main::$7 ← (byte) main::i#2 << (byte) 1
[7] (byte~) main::$9 ← (byte)*((const word*) entities + (byte~) main::$5) [7] (byte~) main::$9 ← (byte)*((const word*) entities + (byte~) main::$7)
[8] *((byte*) main::line#2 + (byte~) main::$9) ← (byte) ' ' [8] *((byte*) main::line#2 + (byte~) main::$9) ← (byte) ' '
[9] *((const word*) entities + (byte~) main::$5) ← *((const word*) entities + (byte~) main::$5) + (byte) 1 [9] *((const word*) entities + (byte~) main::$7) ← *((const word*) entities + (byte~) main::$7) + (byte) 1
[10] if(*((const word*) entities + (byte~) main::$5)<(byte) $27+(byte) 1) goto main::@6 [10] if(*((const word*) entities + (byte~) main::$7)<(byte) $27+(byte) 1) goto main::@6
to:main::@7 to:main::@7
main::@7: scope:[main] from main::@4 main::@7: scope:[main] from main::@4
[11] (byte~) main::$8 ← (byte) main::i#2 << (byte) 1 [11] *((const word*) entities + (byte~) main::$7) ← (byte) 0
[12] *((const word*) entities + (byte~) main::$8) ← (byte) 0
to:main::@6 to:main::@6
main::@6: scope:[main] from main::@4 main::@7 main::@6: scope:[main] from main::@4 main::@7
[13] (byte~) main::$7 ← (byte) main::i#2 << (byte) 1 [12] (byte*~) main::$11 ← (byte*) main::line#2 + *((const word*) entities + (byte~) main::$7)
[14] (byte*~) main::$11 ← (byte*) main::line#2 + *((const word*) entities + (byte~) main::$7) [13] *((byte*~) main::$11) ← (byte) '*'
[15] *((byte*~) main::$11) ← (byte) '*' [14] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28
[16] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 [15] (byte) main::i#1 ← ++ (byte) main::i#2
[17] (byte) main::i#1 ← ++ (byte) main::i#2
to:main::@3 to:main::@3

View File

@ -197,14 +197,19 @@ Inlining constant with var siblings (const byte) main::i#0
Constant inlined main::line#0 = (const nomodify byte*) SCREEN Constant inlined main::line#0 = (const nomodify byte*) SCREEN
Constant inlined main::i#0 = (byte) 0 Constant inlined main::i#0 = (byte) 0
Successful SSA optimization Pass2ConstantInlining Successful SSA optimization Pass2ConstantInlining
Identified duplicate assignment right side [11] (byte~) main::$7 ← (byte) main::i#2 << (byte) 1
Identified duplicate assignment right side [16] (byte~) main::$8 ← (byte) main::i#2 << (byte) 1
Successful SSA optimization Pass2DuplicateRValueIdentification
Eliminating unused constant (const byte) SIZEOF_WORD Eliminating unused constant (const byte) SIZEOF_WORD
Successful SSA optimization PassNEliminateUnusedVars Successful SSA optimization PassNEliminateUnusedVars
Alias main::$7 = main::$5 main::$8
Successful SSA optimization Pass2AliasElimination
Adding NOP phi() at start of main::@1 Adding NOP phi() at start of main::@1
CALL GRAPH CALL GRAPH
Created 2 initial phi equivalence classes Created 2 initial phi equivalence classes
Coalesced [19] main::i#6 ← main::i#1 Coalesced [17] main::i#6 ← main::i#1
Coalesced [20] main::line#6 ← main::line#1 Coalesced [18] main::line#6 ← main::line#1
Coalesced down to 2 phi equivalence classes Coalesced down to 2 phi equivalence classes
Culled Empty Block (label) main::@1 Culled Empty Block (label) main::@1
Renumbering block main::@2 to main::@1 Renumbering block main::@2 to main::@1
@ -236,62 +241,52 @@ main::@5: scope:[main] from main::@3
[5] *((const nomodify byte*) VIC_BG_COLOR) ← (byte) $f [5] *((const nomodify byte*) VIC_BG_COLOR) ← (byte) $f
to:main::@1 to:main::@1
main::@4: scope:[main] from main::@3 main::@4: scope:[main] from main::@3
[6] (byte~) main::$5 ← (byte) main::i#2 << (byte) 1 [6] (byte~) main::$7 ← (byte) main::i#2 << (byte) 1
[7] (byte~) main::$9 ← (byte)*((const word*) entities + (byte~) main::$5) [7] (byte~) main::$9 ← (byte)*((const word*) entities + (byte~) main::$7)
[8] *((byte*) main::line#2 + (byte~) main::$9) ← (byte) ' ' [8] *((byte*) main::line#2 + (byte~) main::$9) ← (byte) ' '
[9] *((const word*) entities + (byte~) main::$5) ← *((const word*) entities + (byte~) main::$5) + (byte) 1 [9] *((const word*) entities + (byte~) main::$7) ← *((const word*) entities + (byte~) main::$7) + (byte) 1
[10] if(*((const word*) entities + (byte~) main::$5)<(byte) $27+(byte) 1) goto main::@6 [10] if(*((const word*) entities + (byte~) main::$7)<(byte) $27+(byte) 1) goto main::@6
to:main::@7 to:main::@7
main::@7: scope:[main] from main::@4 main::@7: scope:[main] from main::@4
[11] (byte~) main::$8 ← (byte) main::i#2 << (byte) 1 [11] *((const word*) entities + (byte~) main::$7) ← (byte) 0
[12] *((const word*) entities + (byte~) main::$8) ← (byte) 0
to:main::@6 to:main::@6
main::@6: scope:[main] from main::@4 main::@7 main::@6: scope:[main] from main::@4 main::@7
[13] (byte~) main::$7 ← (byte) main::i#2 << (byte) 1 [12] (byte*~) main::$11 ← (byte*) main::line#2 + *((const word*) entities + (byte~) main::$7)
[14] (byte*~) main::$11 ← (byte*) main::line#2 + *((const word*) entities + (byte~) main::$7) [13] *((byte*~) main::$11) ← (byte) '*'
[15] *((byte*~) main::$11) ← (byte) '*' [14] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28
[16] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 [15] (byte) main::i#1 ← ++ (byte) main::i#2
[17] (byte) main::i#1 ← ++ (byte) main::i#2
to:main::@3 to:main::@3
VARIABLE REGISTER WEIGHTS VARIABLE REGISTER WEIGHTS
(void()) main() (void()) main()
(byte*~) main::$11 202.0 (byte*~) main::$11 202.0
(byte~) main::$5 101.0 (byte~) main::$7 100.99999999999999
(byte~) main::$7 202.0
(byte~) main::$8 202.0
(byte~) main::$9 202.0 (byte~) main::$9 202.0
(byte) main::i (byte) main::i
(byte) main::i#1 202.0 (byte) main::i#1 202.0
(byte) main::i#2 46.61538461538461 (byte) main::i#2 36.72727272727273
(byte*) main::line (byte*) main::line
(byte*) main::line#1 101.0 (byte*) main::line#1 101.0
(byte*) main::line#2 33.666666666666664 (byte*) main::line#2 40.4
Initial phi equivalence classes Initial phi equivalence classes
[ main::i#2 main::i#1 ] [ main::i#2 main::i#1 ]
[ main::line#2 main::line#1 ] [ main::line#2 main::line#1 ]
Added variable main::$5 to live range equivalence class [ main::$5 ]
Added variable main::$9 to live range equivalence class [ main::$9 ]
Added variable main::$8 to live range equivalence class [ main::$8 ]
Added variable main::$7 to live range equivalence class [ main::$7 ] Added variable main::$7 to live range equivalence class [ main::$7 ]
Added variable main::$9 to live range equivalence class [ main::$9 ]
Added variable main::$11 to live range equivalence class [ main::$11 ] Added variable main::$11 to live range equivalence class [ main::$11 ]
Complete equivalence classes Complete equivalence classes
[ main::i#2 main::i#1 ] [ main::i#2 main::i#1 ]
[ main::line#2 main::line#1 ] [ main::line#2 main::line#1 ]
[ main::$5 ]
[ main::$9 ]
[ main::$8 ]
[ main::$7 ] [ main::$7 ]
[ main::$9 ]
[ main::$11 ] [ main::$11 ]
Allocated zp[1]:2 [ main::i#2 main::i#1 ] Allocated zp[1]:2 [ main::i#2 main::i#1 ]
Allocated zp[2]:3 [ main::line#2 main::line#1 ] Allocated zp[2]:3 [ main::line#2 main::line#1 ]
Allocated zp[1]:5 [ main::$5 ] Allocated zp[1]:5 [ main::$7 ]
Allocated zp[1]:6 [ main::$9 ] Allocated zp[1]:6 [ main::$9 ]
Allocated zp[1]:7 [ main::$8 ] Allocated zp[2]:7 [ main::$11 ]
Allocated zp[1]:8 [ main::$7 ]
Allocated zp[2]:9 [ main::$11 ]
INITIAL ASM INITIAL ASM
Target platform is c64basic / MOS6502X Target platform is c64basic / MOS6502X
@ -307,14 +302,12 @@ Target platform is c64basic / MOS6502X
.label SCREEN = $400 .label SCREEN = $400
// main // main
main: { main: {
.label __5 = 5 .label __7 = 5
.label __7 = 8
.label __8 = 7
.label __9 = 6 .label __9 = 6
// Move the entities // Move the entities
.label line = 3 .label line = 3
.label i = 2 .label i = 2
.label __11 = 9 .label __11 = 7
// asm { sei } // asm { sei }
sei sei
jmp __b1 jmp __b1
@ -357,12 +350,12 @@ main: {
jmp __b1 jmp __b1
// main::@4 // main::@4
__b4: __b4:
// [6] (byte~) main::$5 ← (byte) main::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 // [6] (byte~) main::$7 ← (byte) main::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1
lda.z i lda.z i
asl asl
sta.z __5 sta.z __7
// [7] (byte~) main::$9 ← (byte)*((const word*) entities + (byte~) main::$5) -- vbuz1=_byte_pwuc1_derefidx_vbuz2 // [7] (byte~) main::$9 ← (byte)*((const word*) entities + (byte~) main::$7) -- vbuz1=_byte_pwuc1_derefidx_vbuz2
ldy.z __5 ldy.z __7
lda entities,y lda entities,y
sta.z __9 sta.z __9
// [8] *((byte*) main::line#2 + (byte~) main::$9) ← (byte) ' ' -- pbuz1_derefidx_vbuz2=vbuc1 // [8] *((byte*) main::line#2 + (byte~) main::$9) ← (byte) ' ' -- pbuz1_derefidx_vbuz2=vbuc1
@ -370,15 +363,15 @@ main: {
lda #' ' lda #' '
ldy.z __9 ldy.z __9
sta (line),y sta (line),y
// [9] *((const word*) entities + (byte~) main::$5) ← *((const word*) entities + (byte~) main::$5) + (byte) 1 -- pwuc1_derefidx_vbuz1=pwuc1_derefidx_vbuz1_plus_1 // [9] *((const word*) entities + (byte~) main::$7) ← *((const word*) entities + (byte~) main::$7) + (byte) 1 -- pwuc1_derefidx_vbuz1=pwuc1_derefidx_vbuz1_plus_1
// Move by velocity // Move by velocity
ldx.z __5 ldx.z __7
inc entities,x inc entities,x
bne !+ bne !+
inc entities+1,x inc entities+1,x
!: !:
// [10] if(*((const word*) entities + (byte~) main::$5)<(byte) $27+(byte) 1) goto main::@6 -- pwuc1_derefidx_vbuz1_lt_vbuc2_then_la1 // [10] if(*((const word*) entities + (byte~) main::$7)<(byte) $27+(byte) 1) goto main::@6 -- pwuc1_derefidx_vbuz1_lt_vbuc2_then_la1
ldy.z __5 ldy.z __7
lda entities+1,y lda entities+1,y
bne !+ bne !+
lda entities,y lda entities,y
@ -388,24 +381,16 @@ main: {
jmp __b7 jmp __b7
// main::@7 // main::@7
__b7: __b7:
// [11] (byte~) main::$8 ← (byte) main::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 // [11] *((const word*) entities + (byte~) main::$7) ← (byte) 0 -- pwuc1_derefidx_vbuz1=vbuc2
lda.z i
asl
sta.z __8
// [12] *((const word*) entities + (byte~) main::$8) ← (byte) 0 -- pwuc1_derefidx_vbuz1=vbuc2
lda #0 lda #0
ldy.z __8 ldy.z __7
sta entities,y sta entities,y
lda #0 lda #0
sta entities+1,y sta entities+1,y
jmp __b6 jmp __b6
// main::@6 // main::@6
__b6: __b6:
// [13] (byte~) main::$7 ← (byte) main::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 // [12] (byte*~) main::$11 ← (byte*) main::line#2 + *((const word*) entities + (byte~) main::$7) -- pbuz1=pbuz2_plus_pwuc1_derefidx_vbuz3
lda.z i
asl
sta.z __7
// [14] (byte*~) main::$11 ← (byte*) main::line#2 + *((const word*) entities + (byte~) main::$7) -- pbuz1=pbuz2_plus_pwuc1_derefidx_vbuz3
ldy.z __7 ldy.z __7
clc clc
lda.z line lda.z line
@ -414,12 +399,12 @@ main: {
lda.z line+1 lda.z line+1
adc entities+1,y adc entities+1,y
sta.z __11+1 sta.z __11+1
// [15] *((byte*~) main::$11) ← (byte) '*' -- _deref_pbuz1=vbuc1 // [13] *((byte*~) main::$11) ← (byte) '*' -- _deref_pbuz1=vbuc1
// Draw symbol // Draw symbol
lda #'*' lda #'*'
ldy #0 ldy #0
sta (__11),y sta (__11),y
// [16] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 // [14] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1
// Next line // Next line
lda #$28 lda #$28
clc clc
@ -428,7 +413,7 @@ main: {
bcc !+ bcc !+
inc.z line+1 inc.z line+1
!: !:
// [17] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 // [15] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1
inc.z i inc.z i
// [3] phi from main::@6 to main::@3 [phi:main::@6->main::@3] // [3] phi from main::@6 to main::@3 [phi:main::@6->main::@3]
__b3_from___b6: __b3_from___b6:
@ -443,52 +428,43 @@ REGISTER UPLIFT POTENTIAL REGISTERS
Statement [1] if(*((const nomodify byte*) VIC_RASTER)!=(byte) $ff) goto main::@1 [ ] ( [ ] { } ) always clobbers reg byte a Statement [1] if(*((const nomodify byte*) VIC_RASTER)!=(byte) $ff) goto main::@1 [ ] ( [ ] { } ) always clobbers reg byte a
Statement [2] *((const nomodify byte*) VIC_BG_COLOR) ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a Statement [2] *((const nomodify byte*) VIC_BG_COLOR) ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a
Statement [5] *((const nomodify byte*) VIC_BG_COLOR) ← (byte) $f [ ] ( [ ] { } ) always clobbers reg byte a Statement [5] *((const nomodify byte*) VIC_BG_COLOR) ← (byte) $f [ ] ( [ ] { } ) always clobbers reg byte a
Statement [6] (byte~) main::$5 ← (byte) main::i#2 << (byte) 1 [ main::i#2 main::line#2 main::$5 ] ( [ main::i#2 main::line#2 main::$5 ] { } ) always clobbers reg byte a Statement [6] (byte~) main::$7 ← (byte) main::i#2 << (byte) 1 [ main::i#2 main::line#2 main::$7 ] ( [ main::i#2 main::line#2 main::$7 ] { } ) 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]:2 [ main::i#2 main::i#1 ]
Statement [7] (byte~) main::$9 ← (byte)*((const word*) entities + (byte~) main::$5) [ main::i#2 main::line#2 main::$5 main::$9 ] ( [ main::i#2 main::line#2 main::$5 main::$9 ] { } ) always clobbers reg byte a Statement [7] (byte~) main::$9 ← (byte)*((const word*) entities + (byte~) main::$7) [ main::i#2 main::line#2 main::$7 main::$9 ] ( [ main::i#2 main::line#2 main::$7 main::$9 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:5 [ main::$5 ] Removing always clobbered register reg byte a as potential for zp[1]:5 [ main::$7 ]
Statement [8] *((byte*) main::line#2 + (byte~) main::$9) ← (byte) ' ' [ main::i#2 main::line#2 main::$5 ] ( [ main::i#2 main::line#2 main::$5 ] { } ) always clobbers reg byte a Statement [8] *((byte*) main::line#2 + (byte~) main::$9) ← (byte) ' ' [ main::i#2 main::line#2 main::$7 ] ( [ main::i#2 main::line#2 main::$7 ] { } ) always clobbers reg byte a
Statement [10] if(*((const word*) entities + (byte~) main::$5)<(byte) $27+(byte) 1) goto main::@6 [ main::i#2 main::line#2 ] ( [ main::i#2 main::line#2 ] { } ) always clobbers reg byte a Statement [10] if(*((const word*) entities + (byte~) main::$7)<(byte) $27+(byte) 1) goto main::@6 [ main::i#2 main::line#2 main::$7 ] ( [ main::i#2 main::line#2 main::$7 ] { } ) always clobbers reg byte a
Statement [11] (byte~) main::$8 ← (byte) main::i#2 << (byte) 1 [ main::i#2 main::line#2 main::$8 ] ( [ main::i#2 main::line#2 main::$8 ] { } ) always clobbers reg byte a Statement [11] *((const word*) entities + (byte~) main::$7) ← (byte) 0 [ main::i#2 main::line#2 main::$7 ] ( [ main::i#2 main::line#2 main::$7 ] { } ) always clobbers reg byte a
Statement [12] *((const word*) entities + (byte~) main::$8) ← (byte) 0 [ main::i#2 main::line#2 ] ( [ main::i#2 main::line#2 ] { } ) always clobbers reg byte a Statement [12] (byte*~) main::$11 ← (byte*) main::line#2 + *((const word*) entities + (byte~) main::$7) [ main::i#2 main::line#2 main::$11 ] ( [ main::i#2 main::line#2 main::$11 ] { } ) always clobbers reg byte a
Statement [13] (byte~) main::$7 ← (byte) main::i#2 << (byte) 1 [ main::i#2 main::line#2 main::$7 ] ( [ main::i#2 main::line#2 main::$7 ] { } ) always clobbers reg byte a Statement [13] *((byte*~) main::$11) ← (byte) '*' [ main::i#2 main::line#2 ] ( [ main::i#2 main::line#2 ] { } ) always clobbers reg byte a reg byte y
Statement [14] (byte*~) main::$11 ← (byte*) main::line#2 + *((const word*) entities + (byte~) main::$7) [ main::i#2 main::line#2 main::$11 ] ( [ main::i#2 main::line#2 main::$11 ] { } ) always clobbers reg byte a
Statement [15] *((byte*~) main::$11) ← (byte) '*' [ main::i#2 main::line#2 ] ( [ main::i#2 main::line#2 ] { } ) always clobbers reg byte a 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]:2 [ main::i#2 main::i#1 ]
Statement [16] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 [ main::i#2 main::line#1 ] ( [ main::i#2 main::line#1 ] { } ) always clobbers reg byte a Statement [14] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 [ main::i#2 main::line#1 ] ( [ main::i#2 main::line#1 ] { } ) always clobbers reg byte a
Statement [1] if(*((const nomodify byte*) VIC_RASTER)!=(byte) $ff) goto main::@1 [ ] ( [ ] { } ) always clobbers reg byte a Statement [1] if(*((const nomodify byte*) VIC_RASTER)!=(byte) $ff) goto main::@1 [ ] ( [ ] { } ) always clobbers reg byte a
Statement [2] *((const nomodify byte*) VIC_BG_COLOR) ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a Statement [2] *((const nomodify byte*) VIC_BG_COLOR) ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a
Statement [5] *((const nomodify byte*) VIC_BG_COLOR) ← (byte) $f [ ] ( [ ] { } ) always clobbers reg byte a Statement [5] *((const nomodify byte*) VIC_BG_COLOR) ← (byte) $f [ ] ( [ ] { } ) always clobbers reg byte a
Statement [6] (byte~) main::$5 ← (byte) main::i#2 << (byte) 1 [ main::i#2 main::line#2 main::$5 ] ( [ main::i#2 main::line#2 main::$5 ] { } ) always clobbers reg byte a Statement [6] (byte~) main::$7 ← (byte) main::i#2 << (byte) 1 [ main::i#2 main::line#2 main::$7 ] ( [ main::i#2 main::line#2 main::$7 ] { } ) always clobbers reg byte a
Statement [7] (byte~) main::$9 ← (byte)*((const word*) entities + (byte~) main::$5) [ main::i#2 main::line#2 main::$5 main::$9 ] ( [ main::i#2 main::line#2 main::$5 main::$9 ] { } ) always clobbers reg byte a Statement [7] (byte~) main::$9 ← (byte)*((const word*) entities + (byte~) main::$7) [ main::i#2 main::line#2 main::$7 main::$9 ] ( [ main::i#2 main::line#2 main::$7 main::$9 ] { } ) always clobbers reg byte a
Statement [8] *((byte*) main::line#2 + (byte~) main::$9) ← (byte) ' ' [ main::i#2 main::line#2 main::$5 ] ( [ main::i#2 main::line#2 main::$5 ] { } ) always clobbers reg byte a Statement [8] *((byte*) main::line#2 + (byte~) main::$9) ← (byte) ' ' [ main::i#2 main::line#2 main::$7 ] ( [ main::i#2 main::line#2 main::$7 ] { } ) always clobbers reg byte a
Statement [10] if(*((const word*) entities + (byte~) main::$5)<(byte) $27+(byte) 1) goto main::@6 [ main::i#2 main::line#2 ] ( [ main::i#2 main::line#2 ] { } ) always clobbers reg byte a Statement [10] if(*((const word*) entities + (byte~) main::$7)<(byte) $27+(byte) 1) goto main::@6 [ main::i#2 main::line#2 main::$7 ] ( [ main::i#2 main::line#2 main::$7 ] { } ) always clobbers reg byte a
Statement [11] (byte~) main::$8 ← (byte) main::i#2 << (byte) 1 [ main::i#2 main::line#2 main::$8 ] ( [ main::i#2 main::line#2 main::$8 ] { } ) always clobbers reg byte a Statement [11] *((const word*) entities + (byte~) main::$7) ← (byte) 0 [ main::i#2 main::line#2 main::$7 ] ( [ main::i#2 main::line#2 main::$7 ] { } ) always clobbers reg byte a
Statement [12] *((const word*) entities + (byte~) main::$8) ← (byte) 0 [ main::i#2 main::line#2 ] ( [ main::i#2 main::line#2 ] { } ) always clobbers reg byte a Statement [12] (byte*~) main::$11 ← (byte*) main::line#2 + *((const word*) entities + (byte~) main::$7) [ main::i#2 main::line#2 main::$11 ] ( [ main::i#2 main::line#2 main::$11 ] { } ) always clobbers reg byte a
Statement [13] (byte~) main::$7 ← (byte) main::i#2 << (byte) 1 [ main::i#2 main::line#2 main::$7 ] ( [ main::i#2 main::line#2 main::$7 ] { } ) always clobbers reg byte a Statement [13] *((byte*~) main::$11) ← (byte) '*' [ main::i#2 main::line#2 ] ( [ main::i#2 main::line#2 ] { } ) always clobbers reg byte a reg byte y
Statement [14] (byte*~) main::$11 ← (byte*) main::line#2 + *((const word*) entities + (byte~) main::$7) [ main::i#2 main::line#2 main::$11 ] ( [ main::i#2 main::line#2 main::$11 ] { } ) always clobbers reg byte a Statement [14] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 [ main::i#2 main::line#1 ] ( [ main::i#2 main::line#1 ] { } ) always clobbers reg byte a
Statement [15] *((byte*~) main::$11) ← (byte) '*' [ main::i#2 main::line#2 ] ( [ main::i#2 main::line#2 ] { } ) always clobbers reg byte a reg byte y
Statement [16] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 [ main::i#2 main::line#1 ] ( [ main::i#2 main::line#1 ] { } ) 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[1]:2 [ main::i#2 main::i#1 ] : zp[1]:2 , reg byte x ,
Potential registers zp[2]:3 [ main::line#2 main::line#1 ] : zp[2]:3 , Potential registers zp[2]:3 [ main::line#2 main::line#1 ] : zp[2]:3 ,
Potential registers zp[1]:5 [ main::$5 ] : zp[1]:5 , reg byte x , reg byte y , Potential registers zp[1]:5 [ main::$7 ] : zp[1]:5 , reg byte x , reg byte y ,
Potential registers zp[1]:6 [ main::$9 ] : zp[1]:6 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:6 [ main::$9 ] : zp[1]:6 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:7 [ main::$8 ] : zp[1]:7 , reg byte a , reg byte x , reg byte y , Potential registers zp[2]:7 [ main::$11 ] : zp[2]:7 ,
Potential registers zp[1]:8 [ main::$7 ] : zp[1]:8 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[2]:9 [ main::$11 ] : zp[2]:9 ,
REGISTER UPLIFT SCOPES REGISTER UPLIFT SCOPES
Uplift Scope [main] 248.62: zp[1]:2 [ main::i#2 main::i#1 ] 202: zp[1]:6 [ main::$9 ] 202: zp[1]:7 [ main::$8 ] 202: zp[1]:8 [ main::$7 ] 202: zp[2]:9 [ main::$11 ] 134.67: zp[2]:3 [ main::line#2 main::line#1 ] 101: zp[1]:5 [ main::$5 ] Uplift Scope [main] 238.73: zp[1]:2 [ main::i#2 main::i#1 ] 202: zp[1]:6 [ main::$9 ] 202: zp[2]:7 [ main::$11 ] 141.4: zp[2]:3 [ main::line#2 main::line#1 ] 101: zp[1]:5 [ main::$7 ]
Uplift Scope [] Uplift Scope []
Uplifting [main] best 19805 combination zp[1]:2 [ main::i#2 main::i#1 ] reg byte a [ main::$9 ] reg byte a [ main::$8 ] reg byte a [ main::$7 ] zp[2]:9 [ main::$11 ] zp[2]:3 [ main::line#2 main::line#1 ] zp[1]:5 [ main::$5 ] Uplifting [main] best 17405 combination zp[1]:2 [ main::i#2 main::i#1 ] reg byte a [ main::$9 ] zp[2]:7 [ main::$11 ] zp[2]:3 [ main::line#2 main::line#1 ] reg byte x [ main::$7 ]
Limited combination testing to 100 combinations of 384 possible. Uplifting [] best 17405 combination
Uplifting [] best 19805 combination
Attempting to uplift remaining variables inzp[1]:2 [ main::i#2 main::i#1 ] Attempting to uplift remaining variables inzp[1]:2 [ main::i#2 main::i#1 ]
Uplifting [main] best 19805 combination zp[1]:2 [ main::i#2 main::i#1 ] Uplifting [main] best 17405 combination zp[1]:2 [ main::i#2 main::i#1 ]
Attempting to uplift remaining variables inzp[1]:5 [ main::$5 ] Allocated (was zp[2]:7) zp[2]:5 [ main::$11 ]
Uplifting [main] best 18805 combination reg byte x [ main::$5 ]
Allocated (was zp[2]:9) zp[2]:5 [ main::$11 ]
ASSEMBLER BEFORE OPTIMIZATION ASSEMBLER BEFORE OPTIMIZATION
// File Comments // File Comments
@ -549,24 +525,24 @@ main: {
jmp __b1 jmp __b1
// main::@4 // main::@4
__b4: __b4:
// [6] (byte~) main::$5 ← (byte) main::i#2 << (byte) 1 -- vbuxx=vbuz1_rol_1 // [6] (byte~) main::$7 ← (byte) main::i#2 << (byte) 1 -- vbuxx=vbuz1_rol_1
lda.z i lda.z i
asl asl
tax tax
// [7] (byte~) main::$9 ← (byte)*((const word*) entities + (byte~) main::$5) -- vbuaa=_byte_pwuc1_derefidx_vbuxx // [7] (byte~) main::$9 ← (byte)*((const word*) entities + (byte~) main::$7) -- vbuaa=_byte_pwuc1_derefidx_vbuxx
lda entities,x lda entities,x
// [8] *((byte*) main::line#2 + (byte~) main::$9) ← (byte) ' ' -- pbuz1_derefidx_vbuaa=vbuc1 // [8] *((byte*) main::line#2 + (byte~) main::$9) ← (byte) ' ' -- pbuz1_derefidx_vbuaa=vbuc1
// Delete old symbol // Delete old symbol
tay tay
lda #' ' lda #' '
sta (line),y sta (line),y
// [9] *((const word*) entities + (byte~) main::$5) ← *((const word*) entities + (byte~) main::$5) + (byte) 1 -- pwuc1_derefidx_vbuxx=pwuc1_derefidx_vbuxx_plus_1 // [9] *((const word*) entities + (byte~) main::$7) ← *((const word*) entities + (byte~) main::$7) + (byte) 1 -- pwuc1_derefidx_vbuxx=pwuc1_derefidx_vbuxx_plus_1
// Move by velocity // Move by velocity
inc entities,x inc entities,x
bne !+ bne !+
inc entities+1,x inc entities+1,x
!: !:
// [10] if(*((const word*) entities + (byte~) main::$5)<(byte) $27+(byte) 1) goto main::@6 -- pwuc1_derefidx_vbuxx_lt_vbuc2_then_la1 // [10] if(*((const word*) entities + (byte~) main::$7)<(byte) $27+(byte) 1) goto main::@6 -- pwuc1_derefidx_vbuxx_lt_vbuc2_then_la1
lda entities+1,x lda entities+1,x
bne !+ bne !+
lda entities,x lda entities,x
@ -576,36 +552,28 @@ main: {
jmp __b7 jmp __b7
// main::@7 // main::@7
__b7: __b7:
// [11] (byte~) main::$8 ← (byte) main::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 // [11] *((const word*) entities + (byte~) main::$7) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2
lda.z i
asl
// [12] *((const word*) entities + (byte~) main::$8) ← (byte) 0 -- pwuc1_derefidx_vbuaa=vbuc2
tay
lda #0 lda #0
sta entities,y sta entities,x
lda #0 lda #0
sta entities+1,y sta entities+1,x
jmp __b6 jmp __b6
// main::@6 // main::@6
__b6: __b6:
// [13] (byte~) main::$7 ← (byte) main::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 // [12] (byte*~) main::$11 ← (byte*) main::line#2 + *((const word*) entities + (byte~) main::$7) -- pbuz1=pbuz2_plus_pwuc1_derefidx_vbuxx
lda.z i
asl
// [14] (byte*~) main::$11 ← (byte*) main::line#2 + *((const word*) entities + (byte~) main::$7) -- pbuz1=pbuz2_plus_pwuc1_derefidx_vbuaa
tay
clc clc
lda.z line lda.z line
adc entities,y adc entities,x
sta.z __11 sta.z __11
lda.z line+1 lda.z line+1
adc entities+1,y adc entities+1,x
sta.z __11+1 sta.z __11+1
// [15] *((byte*~) main::$11) ← (byte) '*' -- _deref_pbuz1=vbuc1 // [13] *((byte*~) main::$11) ← (byte) '*' -- _deref_pbuz1=vbuc1
// Draw symbol // Draw symbol
lda #'*' lda #'*'
ldy #0 ldy #0
sta (__11),y sta (__11),y
// [16] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 // [14] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1
// Next line // Next line
lda #$28 lda #$28
clc clc
@ -614,7 +582,7 @@ main: {
bcc !+ bcc !+
inc.z line+1 inc.z line+1
!: !:
// [17] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 // [15] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1
inc.z i inc.z i
// [3] phi from main::@6 to main::@3 [phi:main::@6->main::@3] // [3] phi from main::@6 to main::@3 [phi:main::@6->main::@3]
__b3_from___b6: __b3_from___b6:
@ -649,9 +617,7 @@ FINAL SYMBOL TABLE
(const word*) entities[(number) $19] = { fill( $19, 0) } (const word*) entities[(number) $19] = { fill( $19, 0) }
(void()) main() (void()) main()
(byte*~) main::$11 zp[2]:5 202.0 (byte*~) main::$11 zp[2]:5 202.0
(byte~) main::$5 reg byte x 101.0 (byte~) main::$7 reg byte x 100.99999999999999
(byte~) main::$7 reg byte a 202.0
(byte~) main::$8 reg byte a 202.0
(byte~) main::$9 reg byte a 202.0 (byte~) main::$9 reg byte a 202.0
(label) main::@1 (label) main::@1
(label) main::@2 (label) main::@2
@ -662,22 +628,20 @@ FINAL SYMBOL TABLE
(label) main::@7 (label) main::@7
(byte) main::i (byte) main::i
(byte) main::i#1 i zp[1]:2 202.0 (byte) main::i#1 i zp[1]:2 202.0
(byte) main::i#2 i zp[1]:2 46.61538461538461 (byte) main::i#2 i zp[1]:2 36.72727272727273
(byte*) main::line (byte*) main::line
(byte*) main::line#1 line zp[2]:3 101.0 (byte*) main::line#1 line zp[2]:3 101.0
(byte*) main::line#2 line zp[2]:3 33.666666666666664 (byte*) main::line#2 line zp[2]:3 40.4
zp[1]:2 [ main::i#2 main::i#1 ] zp[1]:2 [ main::i#2 main::i#1 ]
zp[2]:3 [ main::line#2 main::line#1 ] zp[2]:3 [ main::line#2 main::line#1 ]
reg byte x [ main::$5 ] reg byte x [ main::$7 ]
reg byte a [ main::$9 ] reg byte a [ main::$9 ]
reg byte a [ main::$8 ]
reg byte a [ main::$7 ]
zp[2]:5 [ main::$11 ] zp[2]:5 [ main::$11 ]
FINAL ASSEMBLER FINAL ASSEMBLER
Score: 17102 Score: 15702
// File Comments // File Comments
// Test that the multiplication of a idx*sizeof(element) is reused inside loops // Test that the multiplication of a idx*sizeof(element) is reused inside loops
@ -736,11 +700,11 @@ main: {
// main::@4 // main::@4
__b4: __b4:
// line[(char)entities[i]] = ' ' // line[(char)entities[i]] = ' '
// [6] (byte~) main::$5 ← (byte) main::i#2 << (byte) 1 -- vbuxx=vbuz1_rol_1 // [6] (byte~) main::$7 ← (byte) main::i#2 << (byte) 1 -- vbuxx=vbuz1_rol_1
lda.z i lda.z i
asl asl
tax tax
// [7] (byte~) main::$9 ← (byte)*((const word*) entities + (byte~) main::$5) -- vbuaa=_byte_pwuc1_derefidx_vbuxx // [7] (byte~) main::$9 ← (byte)*((const word*) entities + (byte~) main::$7) -- vbuaa=_byte_pwuc1_derefidx_vbuxx
lda entities,x lda entities,x
// [8] *((byte*) main::line#2 + (byte~) main::$9) ← (byte) ' ' -- pbuz1_derefidx_vbuaa=vbuc1 // [8] *((byte*) main::line#2 + (byte~) main::$9) ← (byte) ' ' -- pbuz1_derefidx_vbuaa=vbuc1
// Delete old symbol // Delete old symbol
@ -748,14 +712,14 @@ main: {
lda #' ' lda #' '
sta (line),y sta (line),y
// entities[i] += 1 // entities[i] += 1
// [9] *((const word*) entities + (byte~) main::$5) ← *((const word*) entities + (byte~) main::$5) + (byte) 1 -- pwuc1_derefidx_vbuxx=pwuc1_derefidx_vbuxx_plus_1 // [9] *((const word*) entities + (byte~) main::$7) ← *((const word*) entities + (byte~) main::$7) + (byte) 1 -- pwuc1_derefidx_vbuxx=pwuc1_derefidx_vbuxx_plus_1
// Move by velocity // Move by velocity
inc entities,x inc entities,x
bne !+ bne !+
inc entities+1,x inc entities+1,x
!: !:
// if(entities[i]>39) // if(entities[i]>39)
// [10] if(*((const word*) entities + (byte~) main::$5)<(byte) $27+(byte) 1) goto main::@6 -- pwuc1_derefidx_vbuxx_lt_vbuc2_then_la1 // [10] if(*((const word*) entities + (byte~) main::$7)<(byte) $27+(byte) 1) goto main::@6 -- pwuc1_derefidx_vbuxx_lt_vbuc2_then_la1
lda entities+1,x lda entities+1,x
bne !+ bne !+
lda entities,x lda entities,x
@ -764,36 +728,28 @@ main: {
!: !:
// main::@7 // main::@7
// entities[i] =0 // entities[i] =0
// [11] (byte~) main::$8 ← (byte) main::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 // [11] *((const word*) entities + (byte~) main::$7) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2
lda.z i
asl
// [12] *((const word*) entities + (byte~) main::$8) ← (byte) 0 -- pwuc1_derefidx_vbuaa=vbuc2
tay
lda #0 lda #0
sta entities,y sta entities,x
sta entities+1,y sta entities+1,x
// main::@6 // main::@6
__b6: __b6:
// line[entities[i]] = '*' // line[entities[i]] = '*'
// [13] (byte~) main::$7 ← (byte) main::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 // [12] (byte*~) main::$11 ← (byte*) main::line#2 + *((const word*) entities + (byte~) main::$7) -- pbuz1=pbuz2_plus_pwuc1_derefidx_vbuxx
lda.z i
asl
// [14] (byte*~) main::$11 ← (byte*) main::line#2 + *((const word*) entities + (byte~) main::$7) -- pbuz1=pbuz2_plus_pwuc1_derefidx_vbuaa
tay
clc clc
lda.z line lda.z line
adc entities,y adc entities,x
sta.z __11 sta.z __11
lda.z line+1 lda.z line+1
adc entities+1,y adc entities+1,x
sta.z __11+1 sta.z __11+1
// [15] *((byte*~) main::$11) ← (byte) '*' -- _deref_pbuz1=vbuc1 // [13] *((byte*~) main::$11) ← (byte) '*' -- _deref_pbuz1=vbuc1
// Draw symbol // Draw symbol
lda #'*' lda #'*'
ldy #0 ldy #0
sta (__11),y sta (__11),y
// line +=40 // line +=40
// [16] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 // [14] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1
// Next line // Next line
lda #$28 lda #$28
clc clc
@ -803,7 +759,7 @@ main: {
inc.z line+1 inc.z line+1
!: !:
// for(char i=0;i<NUM_ENTITIES;i++) // for(char i=0;i<NUM_ENTITIES;i++)
// [17] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 // [15] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1
inc.z i inc.z i
// [3] phi from main::@6 to main::@3 [phi:main::@6->main::@3] // [3] phi from main::@6 to main::@3 [phi:main::@6->main::@3]
// [3] phi (byte*) main::line#2 = (byte*) main::line#1 [phi:main::@6->main::@3#0] -- register_copy // [3] phi (byte*) main::line#2 = (byte*) main::line#1 [phi:main::@6->main::@3#0] -- register_copy

View File

@ -4,9 +4,7 @@
(const word*) entities[(number) $19] = { fill( $19, 0) } (const word*) entities[(number) $19] = { fill( $19, 0) }
(void()) main() (void()) main()
(byte*~) main::$11 zp[2]:5 202.0 (byte*~) main::$11 zp[2]:5 202.0
(byte~) main::$5 reg byte x 101.0 (byte~) main::$7 reg byte x 100.99999999999999
(byte~) main::$7 reg byte a 202.0
(byte~) main::$8 reg byte a 202.0
(byte~) main::$9 reg byte a 202.0 (byte~) main::$9 reg byte a 202.0
(label) main::@1 (label) main::@1
(label) main::@2 (label) main::@2
@ -17,15 +15,13 @@
(label) main::@7 (label) main::@7
(byte) main::i (byte) main::i
(byte) main::i#1 i zp[1]:2 202.0 (byte) main::i#1 i zp[1]:2 202.0
(byte) main::i#2 i zp[1]:2 46.61538461538461 (byte) main::i#2 i zp[1]:2 36.72727272727273
(byte*) main::line (byte*) main::line
(byte*) main::line#1 line zp[2]:3 101.0 (byte*) main::line#1 line zp[2]:3 101.0
(byte*) main::line#2 line zp[2]:3 33.666666666666664 (byte*) main::line#2 line zp[2]:3 40.4
zp[1]:2 [ main::i#2 main::i#1 ] zp[1]:2 [ main::i#2 main::i#1 ]
zp[2]:3 [ main::line#2 main::line#1 ] zp[2]:3 [ main::line#2 main::line#1 ]
reg byte x [ main::$5 ] reg byte x [ main::$7 ]
reg byte a [ main::$9 ] reg byte a [ main::$9 ]
reg byte a [ main::$8 ]
reg byte a [ main::$7 ]
zp[2]:5 [ main::$11 ] zp[2]:5 [ main::$11 ]

View File

@ -13,6 +13,7 @@ main: {
// Move the entities // Move the entities
.label line = 4 .label line = 4
.label i1 = 3 .label i1 = 3
.label __25 = 6
// asm // asm
sei sei
lda #-1 lda #-1
@ -52,6 +53,7 @@ main: {
// line[entities[i].x_pos] = ' ' // line[entities[i].x_pos] = ' '
lda.z i1 lda.z i1
asl asl
sta.z __25
clc clc
adc.z i1 adc.z i1
tax tax
@ -78,8 +80,7 @@ main: {
bmi __b8 bmi __b8
__b9: __b9:
// -entities[i].x_vel // -entities[i].x_vel
lda.z i1 lda.z __25
asl
clc clc
adc.z i1 adc.z i1
tax tax
@ -96,8 +97,7 @@ main: {
sta entities,x sta entities,x
__b8: __b8:
// line[entities[i].x_pos] = entities[i].symbol // line[entities[i].x_pos] = entities[i].symbol
lda.z i1 lda.z __25
asl
clc clc
adc.z i1 adc.z i1
// Draw symbol // Draw symbol

View File

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

View File

@ -288,16 +288,21 @@ Alias main::$13 = main::$24
Alias main::$16 = main::$26 Alias main::$16 = main::$26
Alias main::$18 = main::$28 Alias main::$18 = main::$28
Successful SSA optimization Pass2AliasElimination Successful SSA optimization Pass2AliasElimination
Identified duplicate assignment right side [22] (byte~) main::$25 ← (byte) main::i1#2 << (byte) 1
Identified duplicate assignment right side [28] (byte~) main::$27 ← (byte) main::i1#2 << (byte) 1
Successful SSA optimization Pass2DuplicateRValueIdentification
Eliminating unused constant (const byte) SIZEOF_STRUCT_ENTITY Eliminating unused constant (const byte) SIZEOF_STRUCT_ENTITY
Successful SSA optimization PassNEliminateUnusedVars Successful SSA optimization PassNEliminateUnusedVars
Alias main::$25 = main::$23 main::$27
Successful SSA optimization Pass2AliasElimination
Adding NOP phi() at start of main::@3 Adding NOP phi() at start of main::@3
CALL GRAPH CALL GRAPH
Created 4 initial phi equivalence classes Created 4 initial phi equivalence classes
Coalesced [25] main::i1#6 ← main::i1#1 Coalesced [23] main::i1#6 ← main::i1#1
Coalesced [26] main::line#6 ← main::line#1 Coalesced [24] main::line#6 ← main::line#1
Coalesced [34] main::i#4 ← main::i#1 Coalesced [32] main::i#4 ← main::i#1
Coalesced [35] main::v#4 ← main::v#1 Coalesced [33] main::v#4 ← main::v#1
Coalesced down to 4 phi equivalence classes Coalesced down to 4 phi equivalence classes
Culled Empty Block (label) main::@3 Culled Empty Block (label) main::@3
Renumbering block main::@4 to main::@3 Renumbering block main::@4 to main::@3
@ -335,8 +340,8 @@ main::@7: scope:[main] from main::@5
[7] *((const nomodify byte*) VIC_BG_COLOR) ← (byte) $f [7] *((const nomodify byte*) VIC_BG_COLOR) ← (byte) $f
to:main::@3 to:main::@3
main::@6: scope:[main] from main::@5 main::@6: scope:[main] from main::@5
[8] (byte~) main::$23 ← (byte) main::i1#2 << (byte) 1 [8] (byte~) main::$25 ← (byte) main::i1#2 << (byte) 1
[9] (byte~) main::$13 ← (byte~) main::$23 + (byte) main::i1#2 [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) ' ' [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) [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 [12] if(*((signed byte*)(const struct Entity*) entities + (byte~) main::$13)<(signed byte) 0) goto main::@9
@ -345,27 +350,25 @@ 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::$13)<(signed byte) $27+(signed byte) 1) goto main::@8
to:main::@9 to:main::@9
main::@9: scope:[main] from main::@10 main::@6 main::@9: scope:[main] from main::@10 main::@6
[14] (byte~) main::$27 ← (byte) main::i1#2 << (byte) 1 [14] (byte~) main::$18 ← (byte~) main::$25 + (byte) main::i1#2
[15] (byte~) main::$18 ← (byte~) main::$27 + (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~) 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+(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)
[18] *((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)
to:main::@8 to:main::@8
main::@8: scope:[main] from main::@10 main::@9 main::@8: scope:[main] from main::@10 main::@9
[19] (byte~) main::$25 ← (byte) main::i1#2 << (byte) 1 [18] (byte~) main::$16 ← (byte~) main::$25 + (byte) main::i1#2
[20] (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)
[21] *((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
[22] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 [21] (byte) main::i1#1 ← ++ (byte) main::i1#2
[23] (byte) main::i1#1 ← ++ (byte) main::i1#2
to:main::@5 to:main::@5
main::@2: scope:[main] from main::@1 main::@2: scope:[main] from main::@1
[24] (byte~) main::$21 ← (byte) main::i#2 << (byte) 1 [22] (byte~) main::$21 ← (byte) main::i#2 << (byte) 1
[25] (byte~) main::$10 ← (byte~) main::$21 + (byte) main::i#2 [23] (byte~) main::$10 ← (byte~) main::$21 + (byte) main::i#2
[26] *((signed byte*)(const struct Entity*) entities + (byte~) main::$10) ← (signed byte)(byte) main::i#2 [24] *((signed byte*)(const struct Entity*) entities + (byte~) main::$10) ← (signed byte)(byte) main::i#2
[27] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$10) ← (signed byte) main::v#2 [25] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$10) ← (signed byte) main::v#2
[28] *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$10) ← (byte) main::i#2 [26] *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$10) ← (byte) main::i#2
[29] (signed byte) main::v#1 ← - (signed byte) main::v#2 [27] (signed byte) main::v#1 ← - (signed byte) main::v#2
[30] (byte) main::i#1 ← ++ (byte) main::i#2 [28] (byte) main::i#1 ← ++ (byte) main::i#2
to:main::@1 to:main::@1
@ -379,19 +382,17 @@ VARIABLE REGISTER WEIGHTS
(byte~) main::$16 303.0 (byte~) main::$16 303.0
(byte~) main::$18 201.99999999999997 (byte~) main::$18 201.99999999999997
(byte~) main::$21 22.0 (byte~) main::$21 22.0
(byte~) main::$23 202.0 (byte~) main::$25 40.4
(byte~) main::$25 202.0
(byte~) main::$27 202.0
(signed byte~) main::$8 202.0 (signed byte~) main::$8 202.0
(byte) main::i (byte) main::i
(byte) main::i#1 22.0 (byte) main::i#1 22.0
(byte) main::i#2 8.25 (byte) main::i#2 8.25
(byte) main::i1 (byte) main::i1
(byte) main::i1#1 202.0 (byte) main::i1#1 202.0
(byte) main::i1#2 53.470588235294116 (byte) main::i1#2 47.13333333333333
(byte*) main::line (byte*) main::line
(byte*) main::line#1 101.0 (byte*) main::line#1 101.0
(byte*) main::line#2 25.25 (byte*) main::line#2 28.857142857142858
(signed byte) main::v (signed byte) main::v
(signed byte) main::v#1 11.0 (signed byte) main::v#1 11.0
(signed byte) main::v#2 4.714285714285714 (signed byte) main::v#2 4.714285714285714
@ -401,12 +402,10 @@ Initial phi equivalence classes
[ main::v#2 main::v#1 ] [ main::v#2 main::v#1 ]
[ main::i1#2 main::i1#1 ] [ main::i1#2 main::i1#1 ]
[ main::line#2 main::line#1 ] [ main::line#2 main::line#1 ]
Added variable main::$23 to live range equivalence class [ main::$23 ] 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::$13 to live range equivalence class [ main::$13 ]
Added variable main::$27 to live range equivalence class [ main::$27 ]
Added variable main::$18 to live range equivalence class [ main::$18 ] 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::$8 to live range equivalence class [ main::$8 ]
Added variable main::$25 to live range equivalence class [ main::$25 ]
Added variable main::$16 to live range equivalence class [ main::$16 ] Added variable main::$16 to live range equivalence class [ main::$16 ]
Added variable main::$21 to live range equivalence class [ main::$21 ] Added variable main::$21 to live range equivalence class [ main::$21 ]
Added variable main::$10 to live range equivalence class [ main::$10 ] Added variable main::$10 to live range equivalence class [ main::$10 ]
@ -415,12 +414,10 @@ Complete equivalence classes
[ main::v#2 main::v#1 ] [ main::v#2 main::v#1 ]
[ main::i1#2 main::i1#1 ] [ main::i1#2 main::i1#1 ]
[ main::line#2 main::line#1 ] [ main::line#2 main::line#1 ]
[ main::$23 ] [ main::$25 ]
[ main::$13 ] [ main::$13 ]
[ main::$27 ]
[ main::$18 ] [ main::$18 ]
[ main::$8 ] [ main::$8 ]
[ main::$25 ]
[ main::$16 ] [ main::$16 ]
[ main::$21 ] [ main::$21 ]
[ main::$10 ] [ main::$10 ]
@ -428,15 +425,13 @@ Allocated zp[1]:2 [ main::i#2 main::i#1 ]
Allocated zp[1]:3 [ main::v#2 main::v#1 ] Allocated zp[1]:3 [ main::v#2 main::v#1 ]
Allocated zp[1]:4 [ main::i1#2 main::i1#1 ] Allocated zp[1]:4 [ main::i1#2 main::i1#1 ]
Allocated zp[2]:5 [ main::line#2 main::line#1 ] Allocated zp[2]:5 [ main::line#2 main::line#1 ]
Allocated zp[1]:7 [ main::$23 ] Allocated zp[1]:7 [ main::$25 ]
Allocated zp[1]:8 [ main::$13 ] Allocated zp[1]:8 [ main::$13 ]
Allocated zp[1]:9 [ main::$27 ] Allocated zp[1]:9 [ main::$18 ]
Allocated zp[1]:10 [ main::$18 ] Allocated zp[1]:10 [ main::$8 ]
Allocated zp[1]:11 [ main::$8 ] Allocated zp[1]:11 [ main::$16 ]
Allocated zp[1]:12 [ main::$25 ] Allocated zp[1]:12 [ main::$21 ]
Allocated zp[1]:13 [ main::$16 ] Allocated zp[1]:13 [ main::$10 ]
Allocated zp[1]:14 [ main::$21 ]
Allocated zp[1]:15 [ main::$10 ]
INITIAL ASM INITIAL ASM
Target platform is c64basic / MOS6502X Target platform is c64basic / MOS6502X
@ -454,21 +449,19 @@ Target platform is c64basic / MOS6502X
.label SCREEN = $400 .label SCREEN = $400
// main // main
main: { main: {
.label __8 = $b .label __8 = $a
.label __10 = $f .label __10 = $d
.label __13 = 8 .label __13 = 8
.label __16 = $d .label __16 = $b
.label __18 = $a .label __18 = 9
// Initialize velocities // Initialize velocities
.label v = 3 .label v = 3
.label i = 2 .label i = 2
// Move the entities // Move the entities
.label line = 5 .label line = 5
.label i1 = 4 .label i1 = 4
.label __21 = $e .label __21 = $c
.label __23 = 7 .label __25 = 7
.label __25 = $c
.label __27 = 9
// asm { sei } // asm { sei }
sei sei
// [1] phi from main to main::@1 [phi:main->main::@1] // [1] phi from main to main::@1 [phi:main->main::@1]
@ -526,12 +519,12 @@ main: {
jmp __b3 jmp __b3
// main::@6 // main::@6
__b6: __b6:
// [8] (byte~) main::$23 ← (byte) main::i1#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 // [8] (byte~) main::$25 ← (byte) main::i1#2 << (byte) 1 -- vbuz1=vbuz2_rol_1
lda.z i1 lda.z i1
asl asl
sta.z __23 sta.z __25
// [9] (byte~) main::$13 ← (byte~) main::$23 + (byte) main::i1#2 -- vbuz1=vbuz2_plus_vbuz3 // [9] (byte~) main::$13 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuz1=vbuz2_plus_vbuz3
lda.z __23 lda.z __25
clc clc
adc.z i1 adc.z i1
sta.z __13 sta.z __13
@ -568,27 +561,23 @@ main: {
jmp __b9 jmp __b9
// main::@9 // main::@9
__b9: __b9:
// [14] (byte~) main::$27 ← (byte) main::i1#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 // [14] (byte~) main::$18 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuz1=vbuz2_plus_vbuz3
lda.z i1 lda.z __25
asl
sta.z __27
// [15] (byte~) main::$18 ← (byte~) main::$27 + (byte) main::i1#2 -- vbuz1=vbuz2_plus_vbuz3
lda.z __27
clc clc
adc.z i1 adc.z i1
sta.z __18 sta.z __18
// [16] (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 // [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 ldy.z __18
lda entities+OFFSET_STRUCT_ENTITY_X_VEL,y lda entities+OFFSET_STRUCT_ENTITY_X_VEL,y
eor #$ff eor #$ff
clc clc
adc #1 adc #1
sta.z __8 sta.z __8
// [17] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$18) ← (signed byte~) main::$8 -- pbsc1_derefidx_vbuz1=vbsz2 // [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
lda.z __8 lda.z __8
ldy.z __18 ldy.z __18
sta entities+OFFSET_STRUCT_ENTITY_X_VEL,y sta entities+OFFSET_STRUCT_ENTITY_X_VEL,y
// [18] *((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 // [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 ldy.z __18
clc clc
lda entities,y lda entities,y
@ -597,22 +586,18 @@ main: {
jmp __b8 jmp __b8
// main::@8 // main::@8
__b8: __b8:
// [19] (byte~) main::$25 ← (byte) main::i1#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 // [18] (byte~) main::$16 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuz1=vbuz2_plus_vbuz3
lda.z i1
asl
sta.z __25
// [20] (byte~) main::$16 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuz1=vbuz2_plus_vbuz3
lda.z __25 lda.z __25
clc clc
adc.z i1 adc.z i1
sta.z __16 sta.z __16
// [21] *((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 // [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
// Draw symbol // Draw symbol
ldx.z __16 ldx.z __16
lda entities+OFFSET_STRUCT_ENTITY_SYMBOL,x lda entities+OFFSET_STRUCT_ENTITY_SYMBOL,x
ldy entities,x ldy entities,x
sta (line),y sta (line),y
// [22] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 // [20] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1
// Next line // Next line
lda #$28 lda #$28
clc clc
@ -621,7 +606,7 @@ main: {
bcc !+ bcc !+
inc.z line+1 inc.z line+1
!: !:
// [23] (byte) main::i1#1 ← ++ (byte) main::i1#2 -- vbuz1=_inc_vbuz1 // [21] (byte) main::i1#1 ← ++ (byte) main::i1#2 -- vbuz1=_inc_vbuz1
inc.z i1 inc.z i1
// [5] phi from main::@8 to main::@5 [phi:main::@8->main::@5] // [5] phi from main::@8 to main::@5 [phi:main::@8->main::@5]
__b5_from___b8: __b5_from___b8:
@ -630,34 +615,34 @@ main: {
jmp __b5 jmp __b5
// main::@2 // main::@2
__b2: __b2:
// [24] (byte~) main::$21 ← (byte) main::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 // [22] (byte~) main::$21 ← (byte) main::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1
lda.z i lda.z i
asl asl
sta.z __21 sta.z __21
// [25] (byte~) main::$10 ← (byte~) main::$21 + (byte) main::i#2 -- vbuz1=vbuz2_plus_vbuz3 // [23] (byte~) main::$10 ← (byte~) main::$21 + (byte) main::i#2 -- vbuz1=vbuz2_plus_vbuz3
lda.z __21 lda.z __21
clc clc
adc.z i adc.z i
sta.z __10 sta.z __10
// [26] *((signed byte*)(const struct Entity*) entities + (byte~) main::$10) ← (signed byte)(byte) main::i#2 -- pbsc1_derefidx_vbuz1=vbsz2 // [24] *((signed byte*)(const struct Entity*) entities + (byte~) main::$10) ← (signed byte)(byte) main::i#2 -- pbsc1_derefidx_vbuz1=vbsz2
lda.z i lda.z i
ldy.z __10 ldy.z __10
sta entities,y sta entities,y
// [27] *((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 // [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
lda.z v lda.z v
ldy.z __10 ldy.z __10
sta entities+OFFSET_STRUCT_ENTITY_X_VEL,y sta entities+OFFSET_STRUCT_ENTITY_X_VEL,y
// [28] *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$10) ← (byte) main::i#2 -- pbuc1_derefidx_vbuz1=vbuz2 // [26] *((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 lda.z i
ldy.z __10 ldy.z __10
sta entities+OFFSET_STRUCT_ENTITY_SYMBOL,y sta entities+OFFSET_STRUCT_ENTITY_SYMBOL,y
// [29] (signed byte) main::v#1 ← - (signed byte) main::v#2 -- vbsz1=_neg_vbsz1 // [27] (signed byte) main::v#1 ← - (signed byte) main::v#2 -- vbsz1=_neg_vbsz1
lda.z v lda.z v
eor #$ff eor #$ff
clc clc
adc #1 adc #1
sta.z v sta.z v
// [30] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 // [28] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1
inc.z i inc.z i
// [1] phi from main::@2 to main::@1 [phi:main::@2->main::@1] // [1] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
__b1_from___b2: __b1_from___b2:
@ -672,101 +657,94 @@ REGISTER UPLIFT POTENTIAL REGISTERS
Statement [3] if(*((const nomodify byte*) VIC_RASTER)!=(byte) $ff) goto main::@3 [ ] ( [ ] { } ) 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 [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 [7] *((const nomodify byte*) VIC_BG_COLOR) ← (byte) $f [ ] ( [ ] { } ) always clobbers reg byte a
Statement [8] (byte~) main::$23 ← (byte) main::i1#2 << (byte) 1 [ main::i1#2 main::line#2 main::$23 ] ( [ main::i1#2 main::line#2 main::$23 ] { } ) 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 ] 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::$23 + (byte) main::i1#2 [ main::i1#2 main::line#2 main::$13 ] ( [ main::i1#2 main::line#2 main::$13 ] { } ) 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::$13 ] ( [ main::i1#2 main::line#2 main::$13 ] { } ) always clobbers reg byte a reg byte y 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
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]: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 a as potential for zp[1]:8 [ main::$13 ]
Removing always clobbered register reg byte y 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::$13 ] ( [ main::i1#2 main::line#2 main::$13 ] { } ) always clobbers reg byte a 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::$13 ] ( [ main::i1#2 main::line#2 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::i1#2 main::line#2 ] { } ) 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::$27 ← (byte) main::i1#2 << (byte) 1 [ main::i1#2 main::line#2 main::$27 ] ( [ main::i1#2 main::line#2 main::$27 ] { } ) 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] (byte~) main::$18 ← (byte~) main::$27 + (byte) main::i1#2 [ main::i1#2 main::line#2 main::$18 ] ( [ main::i1#2 main::line#2 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 [16] (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::$18 main::$8 ] ( [ main::i1#2 main::line#2 main::$18 main::$8 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:9 [ main::$18 ]
Removing always clobbered register reg byte a as potential for zp[1]:10 [ 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] *((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::i1#2 main::line#2 ] { } ) 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::$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 [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::$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 [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 [21] *((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 [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 [22] (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 [24] (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]: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 ] Removing always clobbered register reg byte a as potential for zp[1]:3 [ main::v#2 main::v#1 ]
Statement [25] (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 [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 [26] *((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 [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]:15 [ main::$10 ] Removing always clobbered register reg byte a as potential for zp[1]:13 [ main::$10 ]
Statement [27] *((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 [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 [28] *((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 [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 [29] (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 [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 [3] if(*((const nomodify byte*) VIC_RASTER)!=(byte) $ff) goto main::@3 [ ] ( [ ] { } ) 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 [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 [7] *((const nomodify byte*) VIC_BG_COLOR) ← (byte) $f [ ] ( [ ] { } ) always clobbers reg byte a
Statement [8] (byte~) main::$23 ← (byte) main::i1#2 << (byte) 1 [ main::i1#2 main::line#2 main::$23 ] ( [ main::i1#2 main::line#2 main::$23 ] { } ) 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::$23 + (byte) main::i1#2 [ main::i1#2 main::line#2 main::$13 ] ( [ main::i1#2 main::line#2 main::$13 ] { } ) 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::$13 ] ( [ main::i1#2 main::line#2 main::$13 ] { } ) always clobbers reg byte a reg byte y 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::$13 ] ( [ main::i1#2 main::line#2 main::$13 ] { } ) always clobbers reg byte a 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::$13 ] ( [ main::i1#2 main::line#2 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::i1#2 main::line#2 ] { } ) 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::$27 ← (byte) main::i1#2 << (byte) 1 [ main::i1#2 main::line#2 main::$27 ] ( [ main::i1#2 main::line#2 main::$27 ] { } ) 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] (byte~) main::$18 ← (byte~) main::$27 + (byte) main::i1#2 [ main::i1#2 main::line#2 main::$18 ] ( [ main::i1#2 main::line#2 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 [16] (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::$18 main::$8 ] ( [ main::i1#2 main::line#2 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] *((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::i1#2 main::line#2 ] { } ) 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::$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 [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::$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 [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 [21] *((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 [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 [22] (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 [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] (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 [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] (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 [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] *((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 [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*)(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 [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 [28] *((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 [29] (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]: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]: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[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[2]:5 [ main::line#2 main::line#1 ] : zp[2]:5 ,
Potential registers zp[1]:7 [ main::$23 ] : zp[1]:7 , reg byte a , reg byte x , reg byte y , 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]:8 [ main::$13 ] : zp[1]:8 , reg byte x ,
Potential registers zp[1]:9 [ main::$27 ] : zp[1]:9 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:9 [ main::$18 ] : zp[1]:9 , reg byte x , reg byte y ,
Potential registers zp[1]:10 [ main::$18 ] : zp[1]:10 , 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::$8 ] : zp[1]:11 , 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::$25 ] : zp[1]:12 , 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::$16 ] : zp[1]:13 , 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]:14 [ main::$21 ] : zp[1]:14 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:15 [ main::$10 ] : zp[1]:15 , reg byte x , reg byte y ,
REGISTER UPLIFT SCOPES REGISTER UPLIFT SCOPES
Uplift Scope [main] 303: zp[1]:13 [ main::$16 ] 255.47: zp[1]:4 [ main::i1#2 main::i1#1 ] 202: zp[1]:7 [ main::$23 ] 202: zp[1]:9 [ main::$27 ] 202: zp[1]:11 [ main::$8 ] 202: zp[1]:12 [ main::$25 ] 202: zp[1]:10 [ main::$18 ] 176.75: zp[1]:8 [ main::$13 ] 126.25: zp[2]:5 [ main::line#2 main::line#1 ] 30.25: zp[1]:2 [ main::i#2 main::i#1 ] 22: zp[1]:14 [ main::$21 ] 15.71: zp[1]:3 [ main::v#2 main::v#1 ] 14.67: zp[1]:15 [ main::$10 ] 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 [Entity] Uplift Scope [Entity]
Uplift Scope [] Uplift Scope []
Uplifting [main] best 25607 combination reg byte a [ main::$16 ] zp[1]:4 [ main::i1#2 main::i1#1 ] reg byte a [ main::$23 ] reg byte a [ main::$27 ] zp[1]:11 [ main::$8 ] zp[1]:12 [ main::$25 ] zp[1]:10 [ main::$18 ] zp[1]:8 [ main::$13 ] zp[2]:5 [ main::line#2 main::line#1 ] zp[1]:2 [ main::i#2 main::i#1 ] zp[1]:14 [ main::$21 ] zp[1]:3 [ main::v#2 main::v#1 ] zp[1]:15 [ main::$10 ] 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 1327104 possible. Limited combination testing to 100 combinations of 41472 possible.
Uplifting [Entity] best 25607 combination Uplifting [Entity] best 23607 combination
Uplifting [] best 25607 combination Uplifting [] best 23607 combination
Attempting to uplift remaining variables inzp[1]:4 [ main::i1#2 main::i1#1 ] Attempting to uplift remaining variables inzp[1]:4 [ main::i1#2 main::i1#1 ]
Uplifting [main] best 25607 combination zp[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]:11 [ main::$8 ]
Uplifting [main] best 25007 combination reg byte a [ main::$8 ]
Attempting to uplift remaining variables inzp[1]:12 [ main::$25 ]
Uplifting [main] best 24407 combination reg byte a [ main::$25 ]
Attempting to uplift remaining variables inzp[1]:10 [ main::$18 ]
Uplifting [main] best 23407 combination reg byte x [ main::$18 ]
Attempting to uplift remaining variables inzp[1]:8 [ main::$13 ] Attempting to uplift remaining variables inzp[1]:8 [ main::$13 ]
Uplifting [main] best 22107 combination reg byte x [ 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 ]
Attempting to uplift remaining variables inzp[1]:2 [ main::i#2 main::i#1 ] Attempting to uplift remaining variables inzp[1]:2 [ main::i#2 main::i#1 ]
Uplifting [main] best 21977 combination reg byte x [ 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]:14 [ main::$21 ] Attempting to uplift remaining variables inzp[1]:12 [ main::$21 ]
Uplifting [main] best 21957 combination reg byte a [ main::$21 ] Uplifting [main] best 22157 combination reg byte a [ main::$21 ]
Attempting to uplift remaining variables inzp[1]:3 [ main::v#2 main::v#1 ] Attempting to uplift remaining variables inzp[1]:3 [ main::v#2 main::v#1 ]
Uplifting [main] best 21957 combination zp[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]:15 [ main::$10 ] Attempting to uplift remaining variables inzp[1]:13 [ main::$10 ]
Uplifting [main] best 21857 combination reg byte y [ main::$10 ] Uplifting [main] best 22057 combination reg byte y [ main::$10 ]
Allocated (was zp[1]:3) zp[1]:2 [ main::v#2 main::v#1 ] 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[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[2]:5) zp[2]:4 [ main::line#2 main::line#1 ]
Allocated (was zp[1]:7) zp[1]:6 [ main::$25 ]
ASSEMBLER BEFORE OPTIMIZATION ASSEMBLER BEFORE OPTIMIZATION
// File Comments // File Comments
@ -788,6 +766,7 @@ main: {
// Move the entities // Move the entities
.label line = 4 .label line = 4
.label i1 = 3 .label i1 = 3
.label __25 = 6
// asm { sei } // asm { sei }
sei sei
// [1] phi from main to main::@1 [phi:main->main::@1] // [1] phi from main to main::@1 [phi:main->main::@1]
@ -843,10 +822,12 @@ main: {
jmp __b3 jmp __b3
// main::@6 // main::@6
__b6: __b6:
// [8] (byte~) main::$23 ← (byte) main::i1#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 // [8] (byte~) main::$25 ← (byte) main::i1#2 << (byte) 1 -- vbuz1=vbuz2_rol_1
lda.z i1 lda.z i1
asl asl
// [9] (byte~) main::$13 ← (byte~) main::$23 + (byte) main::i1#2 -- vbuxx=vbuaa_plus_vbuz1 sta.z __25
// [9] (byte~) main::$13 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuxx=vbuz1_plus_vbuz2
lda.z __25
clc clc
adc.z i1 adc.z i1
tax tax
@ -879,21 +860,19 @@ main: {
jmp __b9 jmp __b9
// main::@9 // main::@9
__b9: __b9:
// [14] (byte~) main::$27 ← (byte) main::i1#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 // [14] (byte~) main::$18 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuxx=vbuz1_plus_vbuz2
lda.z i1 lda.z __25
asl
// [15] (byte~) main::$18 ← (byte~) main::$27 + (byte) main::i1#2 -- vbuxx=vbuaa_plus_vbuz1
clc clc
adc.z i1 adc.z i1
tax tax
// [16] (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 // [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
lda entities+OFFSET_STRUCT_ENTITY_X_VEL,x lda entities+OFFSET_STRUCT_ENTITY_X_VEL,x
eor #$ff eor #$ff
clc clc
adc #1 adc #1
// [17] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$18) ← (signed byte~) main::$8 -- pbsc1_derefidx_vbuxx=vbsaa // [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
sta entities+OFFSET_STRUCT_ENTITY_X_VEL,x sta entities+OFFSET_STRUCT_ENTITY_X_VEL,x
// [18] *((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 // [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
clc clc
lda entities,x lda entities,x
adc entities+OFFSET_STRUCT_ENTITY_X_VEL,x adc entities+OFFSET_STRUCT_ENTITY_X_VEL,x
@ -901,19 +880,17 @@ main: {
jmp __b8 jmp __b8
// main::@8 // main::@8
__b8: __b8:
// [19] (byte~) main::$25 ← (byte) main::i1#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 // [18] (byte~) main::$16 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuaa=vbuz1_plus_vbuz2
lda.z i1 lda.z __25
asl
// [20] (byte~) main::$16 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuaa=vbuaa_plus_vbuz1
clc clc
adc.z i1 adc.z i1
// [21] *((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 // [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
// Draw symbol // Draw symbol
tax tax
lda entities+OFFSET_STRUCT_ENTITY_SYMBOL,x lda entities+OFFSET_STRUCT_ENTITY_SYMBOL,x
ldy entities,x ldy entities,x
sta (line),y sta (line),y
// [22] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 // [20] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1
// Next line // Next line
lda #$28 lda #$28
clc clc
@ -922,7 +899,7 @@ main: {
bcc !+ bcc !+
inc.z line+1 inc.z line+1
!: !:
// [23] (byte) main::i1#1 ← ++ (byte) main::i1#2 -- vbuz1=_inc_vbuz1 // [21] (byte) main::i1#1 ← ++ (byte) main::i1#2 -- vbuz1=_inc_vbuz1
inc.z i1 inc.z i1
// [5] phi from main::@8 to main::@5 [phi:main::@8->main::@5] // [5] phi from main::@8 to main::@5 [phi:main::@8->main::@5]
__b5_from___b8: __b5_from___b8:
@ -931,30 +908,30 @@ main: {
jmp __b5 jmp __b5
// main::@2 // main::@2
__b2: __b2:
// [24] (byte~) main::$21 ← (byte) main::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 // [22] (byte~) main::$21 ← (byte) main::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1
txa txa
asl asl
// [25] (byte~) main::$10 ← (byte~) main::$21 + (byte) main::i#2 -- vbuyy=vbuaa_plus_vbuxx // [23] (byte~) main::$10 ← (byte~) main::$21 + (byte) main::i#2 -- vbuyy=vbuaa_plus_vbuxx
stx.z $ff stx.z $ff
clc clc
adc.z $ff adc.z $ff
tay tay
// [26] *((signed byte*)(const struct Entity*) entities + (byte~) main::$10) ← (signed byte)(byte) main::i#2 -- pbsc1_derefidx_vbuyy=vbsxx // [24] *((signed byte*)(const struct Entity*) entities + (byte~) main::$10) ← (signed byte)(byte) main::i#2 -- pbsc1_derefidx_vbuyy=vbsxx
txa txa
sta entities,y sta entities,y
// [27] *((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 // [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
lda.z v lda.z v
sta entities+OFFSET_STRUCT_ENTITY_X_VEL,y sta entities+OFFSET_STRUCT_ENTITY_X_VEL,y
// [28] *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$10) ← (byte) main::i#2 -- pbuc1_derefidx_vbuyy=vbuxx // [26] *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$10) ← (byte) main::i#2 -- pbuc1_derefidx_vbuyy=vbuxx
txa txa
sta entities+OFFSET_STRUCT_ENTITY_SYMBOL,y sta entities+OFFSET_STRUCT_ENTITY_SYMBOL,y
// [29] (signed byte) main::v#1 ← - (signed byte) main::v#2 -- vbsz1=_neg_vbsz1 // [27] (signed byte) main::v#1 ← - (signed byte) main::v#2 -- vbsz1=_neg_vbsz1
lda.z v lda.z v
eor #$ff eor #$ff
clc clc
adc #1 adc #1
sta.z v sta.z v
// [30] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx // [28] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx
inx inx
// [1] phi from main::@2 to main::@1 [phi:main::@2->main::@1] // [1] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
__b1_from___b2: __b1_from___b2:
@ -975,6 +952,8 @@ Removing instruction jmp __b10
Removing instruction jmp __b9 Removing instruction jmp __b9
Removing instruction jmp __b8 Removing instruction jmp __b8
Succesful ASM optimization Pass5NextJumpElimination Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda.z __25
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction __b1_from_main: Removing instruction __b1_from_main:
Removing instruction __b4: Removing instruction __b4:
Removing instruction __b5_from___b4: Removing instruction __b5_from___b4:
@ -983,7 +962,7 @@ Removing instruction __b10:
Removing instruction __b5_from___b8: Removing instruction __b5_from___b8:
Removing instruction __b1_from___b2: Removing instruction __b1_from___b2:
Succesful ASM optimization Pass5UnusedLabelElimination Succesful ASM optimization Pass5UnusedLabelElimination
Fixing long branch [21] bcc __b2 to bcs Fixing long branch [22] bcc __b2 to bcs
FINAL SYMBOL TABLE FINAL SYMBOL TABLE
(byte) Entity::symbol (byte) Entity::symbol
@ -1001,9 +980,7 @@ FINAL SYMBOL TABLE
(byte~) main::$16 reg byte a 303.0 (byte~) main::$16 reg byte a 303.0
(byte~) main::$18 reg byte x 201.99999999999997 (byte~) main::$18 reg byte x 201.99999999999997
(byte~) main::$21 reg byte a 22.0 (byte~) main::$21 reg byte a 22.0
(byte~) main::$23 reg byte a 202.0 (byte~) main::$25 zp[1]:6 40.4
(byte~) main::$25 reg byte a 202.0
(byte~) main::$27 reg byte a 202.0
(signed byte~) main::$8 reg byte a 202.0 (signed byte~) main::$8 reg byte a 202.0
(label) main::@1 (label) main::@1
(label) main::@10 (label) main::@10
@ -1020,10 +997,10 @@ FINAL SYMBOL TABLE
(byte) main::i#2 reg byte x 8.25 (byte) main::i#2 reg byte x 8.25
(byte) main::i1 (byte) main::i1
(byte) main::i1#1 i1 zp[1]:3 202.0 (byte) main::i1#1 i1 zp[1]:3 202.0
(byte) main::i1#2 i1 zp[1]:3 53.470588235294116 (byte) main::i1#2 i1 zp[1]:3 47.13333333333333
(byte*) main::line (byte*) main::line
(byte*) main::line#1 line zp[2]:4 101.0 (byte*) main::line#1 line zp[2]:4 101.0
(byte*) main::line#2 line zp[2]:4 25.25 (byte*) main::line#2 line zp[2]:4 28.857142857142858
(signed byte) main::v (signed byte) main::v
(signed byte) main::v#1 v zp[1]:2 11.0 (signed byte) main::v#1 v zp[1]:2 11.0
(signed byte) main::v#2 v zp[1]:2 4.714285714285714 (signed byte) main::v#2 v zp[1]:2 4.714285714285714
@ -1032,19 +1009,17 @@ reg byte x [ main::i#2 main::i#1 ]
zp[1]:2 [ main::v#2 main::v#1 ] zp[1]:2 [ main::v#2 main::v#1 ]
zp[1]:3 [ main::i1#2 main::i1#1 ] zp[1]:3 [ main::i1#2 main::i1#1 ]
zp[2]:4 [ main::line#2 main::line#1 ] zp[2]:4 [ main::line#2 main::line#1 ]
reg byte a [ main::$23 ] zp[1]:6 [ main::$25 ]
reg byte x [ main::$13 ] reg byte x [ main::$13 ]
reg byte a [ main::$27 ]
reg byte x [ main::$18 ] reg byte x [ main::$18 ]
reg byte a [ main::$8 ] reg byte a [ main::$8 ]
reg byte a [ main::$25 ]
reg byte a [ main::$16 ] reg byte a [ main::$16 ]
reg byte a [ main::$21 ] reg byte a [ main::$21 ]
reg byte y [ main::$10 ] reg byte y [ main::$10 ]
FINAL ASSEMBLER FINAL ASSEMBLER
Score: 20027 Score: 19927
// File Comments // File Comments
// Test that the multiplication of a idx*sizeof(element) is reused inside loops // Test that the multiplication of a idx*sizeof(element) is reused inside loops
@ -1065,6 +1040,7 @@ main: {
// Move the entities // Move the entities
.label line = 4 .label line = 4
.label i1 = 3 .label i1 = 3
.label __25 = 6
// asm // asm
// asm { sei } // asm { sei }
sei sei
@ -1120,10 +1096,11 @@ main: {
// main::@6 // main::@6
__b6: __b6:
// line[entities[i].x_pos] = ' ' // line[entities[i].x_pos] = ' '
// [8] (byte~) main::$23 ← (byte) main::i1#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 // [8] (byte~) main::$25 ← (byte) main::i1#2 << (byte) 1 -- vbuz1=vbuz2_rol_1
lda.z i1 lda.z i1
asl asl
// [9] (byte~) main::$13 ← (byte~) main::$23 + (byte) main::i1#2 -- vbuxx=vbuaa_plus_vbuz1 sta.z __25
// [9] (byte~) main::$13 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuxx=vbuz1_plus_vbuz2
clc clc
adc.z i1 adc.z i1
tax tax
@ -1156,23 +1133,21 @@ main: {
// main::@9 // main::@9
__b9: __b9:
// -entities[i].x_vel // -entities[i].x_vel
// [14] (byte~) main::$27 ← (byte) main::i1#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 // [14] (byte~) main::$18 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuxx=vbuz1_plus_vbuz2
lda.z i1 lda.z __25
asl
// [15] (byte~) main::$18 ← (byte~) main::$27 + (byte) main::i1#2 -- vbuxx=vbuaa_plus_vbuz1
clc clc
adc.z i1 adc.z i1
tax tax
// [16] (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 // [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
lda entities+OFFSET_STRUCT_ENTITY_X_VEL,x lda entities+OFFSET_STRUCT_ENTITY_X_VEL,x
eor #$ff eor #$ff
clc clc
adc #1 adc #1
// entities[i].x_vel = -entities[i].x_vel // entities[i].x_vel = -entities[i].x_vel
// [17] *((signed byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_X_VEL + (byte~) main::$18) ← (signed byte~) main::$8 -- pbsc1_derefidx_vbuxx=vbsaa // [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
sta entities+OFFSET_STRUCT_ENTITY_X_VEL,x sta entities+OFFSET_STRUCT_ENTITY_X_VEL,x
// entities[i].x_pos += entities[i].x_vel // entities[i].x_pos += entities[i].x_vel
// [18] *((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 // [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
clc clc
lda entities,x lda entities,x
adc entities+OFFSET_STRUCT_ENTITY_X_VEL,x adc entities+OFFSET_STRUCT_ENTITY_X_VEL,x
@ -1180,20 +1155,18 @@ main: {
// main::@8 // main::@8
__b8: __b8:
// line[entities[i].x_pos] = entities[i].symbol // line[entities[i].x_pos] = entities[i].symbol
// [19] (byte~) main::$25 ← (byte) main::i1#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 // [18] (byte~) main::$16 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuaa=vbuz1_plus_vbuz2
lda.z i1 lda.z __25
asl
// [20] (byte~) main::$16 ← (byte~) main::$25 + (byte) main::i1#2 -- vbuaa=vbuaa_plus_vbuz1
clc clc
adc.z i1 adc.z i1
// [21] *((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 // [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
// Draw symbol // Draw symbol
tax tax
lda entities+OFFSET_STRUCT_ENTITY_SYMBOL,x lda entities+OFFSET_STRUCT_ENTITY_SYMBOL,x
ldy entities,x ldy entities,x
sta (line),y sta (line),y
// line +=40 // line +=40
// [22] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 // [20] (byte*) main::line#1 ← (byte*) main::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1
// Next line // Next line
lda #$28 lda #$28
clc clc
@ -1203,7 +1176,7 @@ main: {
inc.z line+1 inc.z line+1
!: !:
// for(char i=0;i<NUM_ENTITIES;i++) // for(char i=0;i<NUM_ENTITIES;i++)
// [23] (byte) main::i1#1 ← ++ (byte) main::i1#2 -- vbuz1=_inc_vbuz1 // [21] (byte) main::i1#1 ← ++ (byte) main::i1#2 -- vbuz1=_inc_vbuz1
inc.z i1 inc.z i1
// [5] phi from main::@8 to main::@5 [phi:main::@8->main::@5] // [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 // [5] phi (byte*) main::line#2 = (byte*) main::line#1 [phi:main::@8->main::@5#0] -- register_copy
@ -1212,34 +1185,34 @@ main: {
// main::@2 // main::@2
__b2: __b2:
// entities[i].x_pos = (signed char)i // entities[i].x_pos = (signed char)i
// [24] (byte~) main::$21 ← (byte) main::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 // [22] (byte~) main::$21 ← (byte) main::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1
txa txa
asl asl
// [25] (byte~) main::$10 ← (byte~) main::$21 + (byte) main::i#2 -- vbuyy=vbuaa_plus_vbuxx // [23] (byte~) main::$10 ← (byte~) main::$21 + (byte) main::i#2 -- vbuyy=vbuaa_plus_vbuxx
stx.z $ff stx.z $ff
clc clc
adc.z $ff adc.z $ff
tay tay
// [26] *((signed byte*)(const struct Entity*) entities + (byte~) main::$10) ← (signed byte)(byte) main::i#2 -- pbsc1_derefidx_vbuyy=vbsxx // [24] *((signed byte*)(const struct Entity*) entities + (byte~) main::$10) ← (signed byte)(byte) main::i#2 -- pbsc1_derefidx_vbuyy=vbsxx
txa txa
sta entities,y sta entities,y
// entities[i].x_vel = v // entities[i].x_vel = v
// [27] *((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 // [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
lda.z v lda.z v
sta entities+OFFSET_STRUCT_ENTITY_X_VEL,y sta entities+OFFSET_STRUCT_ENTITY_X_VEL,y
// entities[i].symbol = i // entities[i].symbol = i
// [28] *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$10) ← (byte) main::i#2 -- pbuc1_derefidx_vbuyy=vbuxx // [26] *((byte*)(const struct Entity*) entities+(const byte) OFFSET_STRUCT_ENTITY_SYMBOL + (byte~) main::$10) ← (byte) main::i#2 -- pbuc1_derefidx_vbuyy=vbuxx
txa txa
sta entities+OFFSET_STRUCT_ENTITY_SYMBOL,y sta entities+OFFSET_STRUCT_ENTITY_SYMBOL,y
// v = -v // v = -v
// [29] (signed byte) main::v#1 ← - (signed byte) main::v#2 -- vbsz1=_neg_vbsz1 // [27] (signed byte) main::v#1 ← - (signed byte) main::v#2 -- vbsz1=_neg_vbsz1
lda.z v lda.z v
eor #$ff eor #$ff
clc clc
adc #1 adc #1
sta.z v sta.z v
// for(char i=0;i<NUM_ENTITIES;i++) // for(char i=0;i<NUM_ENTITIES;i++)
// [30] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx // [28] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx
inx inx
// [1] phi from main::@2 to main::@1 [phi:main::@2->main::@1] // [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 // [1] phi (signed byte) main::v#2 = (signed byte) main::v#1 [phi:main::@2->main::@1#0] -- register_copy

View File

@ -13,9 +13,7 @@
(byte~) main::$16 reg byte a 303.0 (byte~) main::$16 reg byte a 303.0
(byte~) main::$18 reg byte x 201.99999999999997 (byte~) main::$18 reg byte x 201.99999999999997
(byte~) main::$21 reg byte a 22.0 (byte~) main::$21 reg byte a 22.0
(byte~) main::$23 reg byte a 202.0 (byte~) main::$25 zp[1]:6 40.4
(byte~) main::$25 reg byte a 202.0
(byte~) main::$27 reg byte a 202.0
(signed byte~) main::$8 reg byte a 202.0 (signed byte~) main::$8 reg byte a 202.0
(label) main::@1 (label) main::@1
(label) main::@10 (label) main::@10
@ -32,10 +30,10 @@
(byte) main::i#2 reg byte x 8.25 (byte) main::i#2 reg byte x 8.25
(byte) main::i1 (byte) main::i1
(byte) main::i1#1 i1 zp[1]:3 202.0 (byte) main::i1#1 i1 zp[1]:3 202.0
(byte) main::i1#2 i1 zp[1]:3 53.470588235294116 (byte) main::i1#2 i1 zp[1]:3 47.13333333333333
(byte*) main::line (byte*) main::line
(byte*) main::line#1 line zp[2]:4 101.0 (byte*) main::line#1 line zp[2]:4 101.0
(byte*) main::line#2 line zp[2]:4 25.25 (byte*) main::line#2 line zp[2]:4 28.857142857142858
(signed byte) main::v (signed byte) main::v
(signed byte) main::v#1 v zp[1]:2 11.0 (signed byte) main::v#1 v zp[1]:2 11.0
(signed byte) main::v#2 v zp[1]:2 4.714285714285714 (signed byte) main::v#2 v zp[1]:2 4.714285714285714
@ -44,12 +42,10 @@ reg byte x [ main::i#2 main::i#1 ]
zp[1]:2 [ main::v#2 main::v#1 ] zp[1]:2 [ main::v#2 main::v#1 ]
zp[1]:3 [ main::i1#2 main::i1#1 ] zp[1]:3 [ main::i1#2 main::i1#1 ]
zp[2]:4 [ main::line#2 main::line#1 ] zp[2]:4 [ main::line#2 main::line#1 ]
reg byte a [ main::$23 ] zp[1]:6 [ main::$25 ]
reg byte x [ main::$13 ] reg byte x [ main::$13 ]
reg byte a [ main::$27 ]
reg byte x [ main::$18 ] reg byte x [ main::$18 ]
reg byte a [ main::$8 ] reg byte a [ main::$8 ]
reg byte a [ main::$25 ]
reg byte a [ main::$16 ] reg byte a [ main::$16 ]
reg byte a [ main::$21 ] reg byte a [ main::$21 ]
reg byte y [ main::$10 ] reg byte y [ main::$10 ]

View File

@ -225,6 +225,7 @@ screen_fill: {
point_init: { point_init: {
.label __5 = $c .label __5 = $c
.label __6 = $e .label __6 = $e
.label __13 = 9
.label __17 = $10 .label __17 = $10
.label __18 = $a .label __18 = $a
.label __19 = $e .label __19 = $e
@ -237,6 +238,7 @@ point_init: {
// ((signed word)x_end[point_idx])-((signed word)x_start[point_idx]) // ((signed word)x_end[point_idx])-((signed word)x_start[point_idx])
lda.z point_idx lda.z point_idx
asl asl
sta.z __13
tay tay
sec sec
lda x_end,y lda x_end,y
@ -294,13 +296,11 @@ point_init: {
!: !:
__b2: __b2:
// x_start[point_idx]*$10 // x_start[point_idx]*$10
lda.z point_idx ldy.z __13
asl lda x_start,y
tax
lda x_start,x
asl asl
sta.z __5 sta.z __5
lda x_start+1,x lda x_start+1,y
rol rol
sta.z __5+1 sta.z __5+1
asl.z __5 asl.z __5
@ -311,9 +311,9 @@ point_init: {
rol.z __5+1 rol.z __5+1
// x_cur[point_idx] = x_start[point_idx]*$10 // x_cur[point_idx] = x_start[point_idx]*$10
lda.z __5 lda.z __5
sta x_cur,x sta x_cur,y
lda.z __5+1 lda.z __5+1
sta x_cur+1,x sta x_cur+1,y
// ((word)y_start[point_idx])*$10 // ((word)y_start[point_idx])*$10
ldy.z point_idx ldy.z point_idx
lda y_start,y lda y_start,y
@ -329,12 +329,14 @@ point_init: {
asl.z __6 asl.z __6
rol.z __6+1 rol.z __6+1
// y_cur[point_idx] = ((word)y_start[point_idx])*$10 // y_cur[point_idx] = ((word)y_start[point_idx])*$10
ldy.z __13
lda.z __6 lda.z __6
sta y_cur,x sta y_cur,y
lda.z __6+1 lda.z __6+1
sta y_cur+1,x sta y_cur+1,y
// delay[point_idx] = DELAY // delay[point_idx] = DELAY
lda #DELAY lda #DELAY
ldy.z point_idx
sta delay,y sta delay,y
// } // }
rts rts

View File

@ -145,8 +145,8 @@ screen_fill::@return: scope:[screen_fill] from screen_fill::@3
(void()) point_init((byte) point_init::point_idx) (void()) point_init((byte) point_init::point_idx)
point_init: scope:[point_init] from main::@1 point_init: scope:[point_init] from main::@1
[68] (byte~) point_init::$11 ← (byte) point_init::point_idx#0 << (byte) 1 [68] (byte~) point_init::$13 ← (byte) point_init::point_idx#0 << (byte) 1
[69] (signed word) point_init::x_diff#1 ← (signed word)*((const word*) x_end + (byte~) point_init::$11) - (signed word)*((const word*) x_start + (byte~) point_init::$11) [69] (signed word) point_init::x_diff#1 ← (signed word)*((const word*) x_end + (byte~) point_init::$13) - (signed word)*((const word*) x_start + (byte~) point_init::$13)
[70] (signed word~) point_init::$17 ← (signed word)*((const byte*) y_end + (byte) point_init::point_idx#0) [70] (signed word~) point_init::$17 ← (signed word)*((const byte*) y_end + (byte) point_init::point_idx#0)
[71] (signed word~) point_init::$18 ← (signed word)*((const byte*) y_start + (byte) point_init::point_idx#0) [71] (signed word~) point_init::$18 ← (signed word)*((const byte*) y_start + (byte) point_init::point_idx#0)
[72] (signed word) point_init::y_diff#0 ← (signed word~) point_init::$17 - (signed word~) point_init::$18 [72] (signed word) point_init::y_diff#0 ← (signed word~) point_init::$17 - (signed word~) point_init::$18
@ -173,142 +173,141 @@ point_init::@6: scope:[point_init] from point_init::abs16s2_@return
[79] if((word) point_init::abs16s1_return#2>(word) point_init::abs16s2_return#2) goto point_init::@1 [79] if((word) point_init::abs16s1_return#2>(word) point_init::abs16s2_return#2) goto point_init::@1
to:point_init::@2 to:point_init::@2
point_init::@2: scope:[point_init] from point_init::@6 point_init::@7 point_init::@2: scope:[point_init] from point_init::@6 point_init::@7
[80] (byte~) point_init::$13 ← (byte) point_init::point_idx#0 << (byte) 1 [80] (word~) point_init::$5 ← *((const word*) x_start + (byte~) point_init::$13) << (byte) 4
[81] (word~) point_init::$5 ← *((const word*) x_start + (byte~) point_init::$13) << (byte) 4 [81] *((const word*) x_cur + (byte~) point_init::$13) ← (word~) point_init::$5
[82] *((const word*) x_cur + (byte~) point_init::$13) ← (word~) point_init::$5 [82] (word~) point_init::$19 ← (word)*((const byte*) y_start + (byte) point_init::point_idx#0)
[83] (word~) point_init::$19 ← (word)*((const byte*) y_start + (byte) point_init::point_idx#0) [83] (word~) point_init::$6 ← (word~) point_init::$19 << (byte) 4
[84] (word~) point_init::$6 ← (word~) point_init::$19 << (byte) 4 [84] *((const word*) y_cur + (byte~) point_init::$13) ← (word~) point_init::$6
[85] *((const word*) y_cur + (byte~) point_init::$13) ← (word~) point_init::$6 [85] *((const byte*) delay + (byte) point_init::point_idx#0) ← (const nomodify byte) DELAY
[86] *((const byte*) delay + (byte) point_init::point_idx#0) ← (const nomodify byte) DELAY
to:point_init::@return to:point_init::@return
point_init::@return: scope:[point_init] from point_init::@2 point_init::@return: scope:[point_init] from point_init::@2
[87] return [86] return
to:@return to:@return
point_init::@1: scope:[point_init] from point_init::@6 point_init::@1: scope:[point_init] from point_init::@6
[88] if((signed word) point_init::x_diff#1<(signed byte) 0) goto point_init::@4 [87] if((signed word) point_init::x_diff#1<(signed byte) 0) goto point_init::@4
to:point_init::@3 to:point_init::@3
point_init::@3: scope:[point_init] from point_init::@1 point_init::@3: scope:[point_init] from point_init::@1
[89] *((const signed byte*) x_add + (byte) point_init::point_idx#0) ← (signed byte) $10 [88] *((const signed byte*) x_add + (byte) point_init::point_idx#0) ← (signed byte) $10
to:point_init::@5 to:point_init::@5
point_init::@5: scope:[point_init] from point_init::@3 point_init::@4 point_init::@5: scope:[point_init] from point_init::@3 point_init::@4
[90] (signed word) divr16s::divisor#0 ← (signed word) point_init::x_diff#1 [89] (signed word) divr16s::divisor#0 ← (signed word) point_init::x_diff#1
[91] (signed word) divr16s::rem#0 ← (signed word) point_init::y_diff#0 [90] (signed word) divr16s::rem#0 ← (signed word) point_init::y_diff#0
[92] call divr16s [91] call divr16s
[93] (signed word) divr16s::return#3 ← (signed word) divr16s::return#2 [92] (signed word) divr16s::return#3 ← (signed word) divr16s::return#2
to:point_init::@7 to:point_init::@7
point_init::@7: scope:[point_init] from point_init::@5 point_init::@7: scope:[point_init] from point_init::@5
[94] (signed word) point_init::x_stepf#0 ← (signed word) divr16s::return#3 [93] (signed word) point_init::x_stepf#0 ← (signed word) divr16s::return#3
[95] (byte~) point_init::$9 ← > (signed word) point_init::x_stepf#0 [94] (byte~) point_init::$9 ← > (signed word) point_init::x_stepf#0
[96] (byte~) point_init::$10 ← (byte~) point_init::$9 >> (byte) 4 [95] (byte~) point_init::$10 ← (byte~) point_init::$9 >> (byte) 4
[97] *((const signed byte*) y_add + (byte) point_init::point_idx#0) ← (signed byte)(byte~) point_init::$10 [96] *((const signed byte*) y_add + (byte) point_init::point_idx#0) ← (signed byte)(byte~) point_init::$10
to:point_init::@2 to:point_init::@2
point_init::@4: scope:[point_init] from point_init::@1 point_init::@4: scope:[point_init] from point_init::@1
[98] *((const signed byte*) x_add + (byte) point_init::point_idx#0) ← (signed byte) -$10 [97] *((const signed byte*) x_add + (byte) point_init::point_idx#0) ← (signed byte) -$10
to:point_init::@5 to:point_init::@5
point_init::abs16s2_@1: scope:[point_init] from point_init::abs16s2 point_init::abs16s2_@1: scope:[point_init] from point_init::abs16s2
[99] (signed word) point_init::abs16s2_return#0 ← - (signed word) point_init::y_diff#0 [98] (signed word) point_init::abs16s2_return#0 ← - (signed word) point_init::y_diff#0
[100] (word) point_init::abs16s2_return#5 ← (word)(signed word) point_init::abs16s2_return#0 [99] (word) point_init::abs16s2_return#5 ← (word)(signed word) point_init::abs16s2_return#0
to:point_init::abs16s2_@return to:point_init::abs16s2_@return
point_init::abs16s1_@1: scope:[point_init] from point_init::abs16s1 point_init::abs16s1_@1: scope:[point_init] from point_init::abs16s1
[101] (signed word) point_init::abs16s1_return#0 ← - (signed word) point_init::x_diff#1 [100] (signed word) point_init::abs16s1_return#0 ← - (signed word) point_init::x_diff#1
[102] (word) point_init::abs16s1_return#5 ← (word)(signed word) point_init::abs16s1_return#0 [101] (word) point_init::abs16s1_return#5 ← (word)(signed word) point_init::abs16s1_return#0
to:point_init::abs16s1_@return to:point_init::abs16s1_@return
(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) (void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y)
bitmap_plot: scope:[bitmap_plot] from main::@7 bitmap_plot: scope:[bitmap_plot] from main::@7
[103] (word) bitmap_plot::plotter#0 ← *((const to_nomodify byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#0) w= *((const to_nomodify byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#0) [102] (word) bitmap_plot::plotter#0 ← *((const to_nomodify byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#0) w= *((const to_nomodify byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#0)
[104] (word~) bitmap_plot::$0 ← (word) bitmap_plot::x#0 & (word) $fff8 [103] (word~) bitmap_plot::$0 ← (word) bitmap_plot::x#0 & (word) $fff8
[105] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$0 [104] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$0
[106] (byte~) bitmap_plot::$1 ← < (word) bitmap_plot::x#0 [105] (byte~) bitmap_plot::$1 ← < (word) bitmap_plot::x#0
[107] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const to_nomodify byte*) bitmap_plot_bit + (byte~) bitmap_plot::$1) [106] *((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 to:bitmap_plot::@return
bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot
[108] return [107] return
to:@return to:@return
(signed word()) divr16s((signed word) divr16s::dividend , (signed word) divr16s::divisor , (signed word) divr16s::rem) (signed word()) divr16s((signed word) divr16s::dividend , (signed word) divr16s::divisor , (signed word) divr16s::rem)
divr16s: scope:[divr16s] from point_init::@5 divr16s: scope:[divr16s] from point_init::@5
[109] phi() [108] phi()
to:divr16s::@10 to:divr16s::@10
divr16s::@10: scope:[divr16s] from divr16s divr16s::@10: scope:[divr16s] from divr16s
[110] if((signed word) divr16s::rem#0<(signed byte) 0) goto divr16s::@1 [109] if((signed word) divr16s::rem#0<(signed byte) 0) goto divr16s::@1
to:divr16s::@6 to:divr16s::@6
divr16s::@6: scope:[divr16s] from divr16s::@10 divr16s::@6: scope:[divr16s] from divr16s::@10
[111] (word) divr16s::remu#8 ← (word)(signed word) divr16s::rem#0 [110] (word) divr16s::remu#8 ← (word)(signed word) divr16s::rem#0
to:divr16s::@2 to:divr16s::@2
divr16s::@2: scope:[divr16s] from divr16s::@1 divr16s::@6 divr16s::@2: scope:[divr16s] from divr16s::@1 divr16s::@6
[112] (word) divr16s::remu#3 ← phi( divr16s::@1/(word) divr16s::remu#7 divr16s::@6/(word) divr16s::remu#8 ) [111] (word) divr16s::remu#3 ← phi( divr16s::@1/(word) divr16s::remu#7 divr16s::@6/(word) divr16s::remu#8 )
[112] (byte) divr16s::neg#3 ← phi( divr16s::@1/(byte) 1 divr16s::@6/(byte) 0 ) [111] (byte) divr16s::neg#3 ← phi( divr16s::@1/(byte) 1 divr16s::@6/(byte) 0 )
[113] if((signed word) divr16s::divisor#0<(signed byte) 0) goto divr16s::@3 [112] if((signed word) divr16s::divisor#0<(signed byte) 0) goto divr16s::@3
to:divr16s::@7 to:divr16s::@7
divr16s::@7: scope:[divr16s] from divr16s::@2 divr16s::@7: scope:[divr16s] from divr16s::@2
[114] (word) divr16s::divisoru#5 ← (word)(signed word) divr16s::divisor#0 [113] (word) divr16s::divisoru#5 ← (word)(signed word) divr16s::divisor#0
to:divr16s::@4 to:divr16s::@4
divr16s::@4: scope:[divr16s] from divr16s::@3 divr16s::@7 divr16s::@4: scope:[divr16s] from divr16s::@3 divr16s::@7
[115] (byte) divr16s::neg#4 ← phi( divr16s::@3/(byte) divr16s::neg#2 divr16s::@7/(byte) divr16s::neg#3 ) [114] (byte) divr16s::neg#4 ← phi( divr16s::@3/(byte) divr16s::neg#2 divr16s::@7/(byte) divr16s::neg#3 )
[115] (word) divr16s::divisoru#3 ← phi( divr16s::@3/(word) divr16s::divisoru#4 divr16s::@7/(word) divr16s::divisoru#5 ) [114] (word) divr16s::divisoru#3 ← phi( divr16s::@3/(word) divr16s::divisoru#4 divr16s::@7/(word) divr16s::divisoru#5 )
[116] (word) divr16u::divisor#0 ← (word) divr16s::divisoru#3 [115] (word) divr16u::divisor#0 ← (word) divr16s::divisoru#3
[117] (word) divr16u::rem#3 ← (word) divr16s::remu#3 [116] (word) divr16u::rem#3 ← (word) divr16s::remu#3
[118] call divr16u [117] call divr16u
[119] (word) divr16u::return#2 ← (word) divr16u::return#0 [118] (word) divr16u::return#2 ← (word) divr16u::return#0
to:divr16s::@9 to:divr16s::@9
divr16s::@9: scope:[divr16s] from divr16s::@4 divr16s::@9: scope:[divr16s] from divr16s::@4
[120] (word) divr16s::resultu#0 ← (word) divr16u::return#2 [119] (word) divr16s::resultu#0 ← (word) divr16u::return#2
[121] if((byte) divr16s::neg#4==(byte) 0) goto divr16s::@5 [120] if((byte) divr16s::neg#4==(byte) 0) goto divr16s::@5
to:divr16s::@8 to:divr16s::@8
divr16s::@8: scope:[divr16s] from divr16s::@9 divr16s::@8: scope:[divr16s] from divr16s::@9
[122] (signed word) divr16s::return#1 ← - (signed word)(word) divr16s::resultu#0 [121] (signed word) divr16s::return#1 ← - (signed word)(word) divr16s::resultu#0
to:divr16s::@return to:divr16s::@return
divr16s::@return: scope:[divr16s] from divr16s::@5 divr16s::@8 divr16s::@return: scope:[divr16s] from divr16s::@5 divr16s::@8
[123] (signed word) divr16s::return#2 ← phi( divr16s::@5/(signed word) divr16s::return#6 divr16s::@8/(signed word) divr16s::return#1 ) [122] (signed word) divr16s::return#2 ← phi( divr16s::@5/(signed word) divr16s::return#6 divr16s::@8/(signed word) divr16s::return#1 )
[124] return [123] return
to:@return to:@return
divr16s::@5: scope:[divr16s] from divr16s::@9 divr16s::@5: scope:[divr16s] from divr16s::@9
[125] (signed word) divr16s::return#6 ← (signed word)(word) divr16s::resultu#0 [124] (signed word) divr16s::return#6 ← (signed word)(word) divr16s::resultu#0
to:divr16s::@return to:divr16s::@return
divr16s::@3: scope:[divr16s] from divr16s::@2 divr16s::@3: scope:[divr16s] from divr16s::@2
[126] (signed word) divr16s::divisoru#1 ← - (signed word) divr16s::divisor#0 [125] (signed word) divr16s::divisoru#1 ← - (signed word) divr16s::divisor#0
[127] (byte) divr16s::neg#2 ← (byte) divr16s::neg#3 ^ (byte) 1 [126] (byte) divr16s::neg#2 ← (byte) divr16s::neg#3 ^ (byte) 1
[128] (word) divr16s::divisoru#4 ← (word)(signed word) divr16s::divisoru#1 [127] (word) divr16s::divisoru#4 ← (word)(signed word) divr16s::divisoru#1
to:divr16s::@4 to:divr16s::@4
divr16s::@1: scope:[divr16s] from divr16s::@10 divr16s::@1: scope:[divr16s] from divr16s::@10
[129] (signed word) divr16s::remu#1 ← - (signed word) divr16s::rem#0 [128] (signed word) divr16s::remu#1 ← - (signed word) divr16s::rem#0
[130] (word) divr16s::remu#7 ← (word)(signed word) divr16s::remu#1 [129] (word) divr16s::remu#7 ← (word)(signed word) divr16s::remu#1
to:divr16s::@2 to:divr16s::@2
(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) (word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem)
divr16u: scope:[divr16u] from divr16s::@4 divr16u: scope:[divr16u] from divr16s::@4
[131] phi() [130] phi()
to:divr16u::@1 to:divr16u::@1
divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 divr16u::@1: scope:[divr16u] from divr16u divr16u::@3
[132] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) [131] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 )
[132] (word) divr16u::quotient#3 ← phi( divr16u/(word) 0 divr16u::@3/(word) divr16u::return#0 ) [131] (word) divr16u::quotient#3 ← phi( divr16u/(word) 0 divr16u::@3/(word) divr16u::return#0 )
[132] (word) divr16u::dividend#2 ← phi( divr16u/(word) 0 divr16u::@3/(word) divr16u::dividend#0 ) [131] (word) divr16u::dividend#2 ← phi( divr16u/(word) 0 divr16u::@3/(word) divr16u::dividend#0 )
[132] (word) divr16u::rem#4 ← phi( divr16u/(word) divr16u::rem#3 divr16u::@3/(word) divr16u::rem#9 ) [131] (word) divr16u::rem#4 ← phi( divr16u/(word) divr16u::rem#3 divr16u::@3/(word) divr16u::rem#9 )
[133] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte) 1 [132] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte) 1
[134] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 [133] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2
[135] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 [134] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80
[136] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 [135] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2
to:divr16u::@4 to:divr16u::@4
divr16u::@4: scope:[divr16u] from divr16u::@1 divr16u::@4: scope:[divr16u] from divr16u::@1
[137] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [136] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1
to:divr16u::@2 to:divr16u::@2
divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4
[138] (word) divr16u::rem#5 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) [137] (word) divr16u::rem#5 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 )
[139] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte) 1 [138] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte) 1
[140] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 [139] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1
[141] if((word) divr16u::rem#5<(word) divr16u::divisor#0) goto divr16u::@3 [140] if((word) divr16u::rem#5<(word) divr16u::divisor#0) goto divr16u::@3
to:divr16u::@5 to:divr16u::@5
divr16u::@5: scope:[divr16u] from divr16u::@2 divr16u::@5: scope:[divr16u] from divr16u::@2
[142] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 [141] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1
[143] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (word) divr16u::divisor#0 [142] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (word) divr16u::divisor#0
to:divr16u::@3 to:divr16u::@3
divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5
[144] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) [143] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 )
[144] (word) divr16u::rem#9 ← phi( divr16u::@2/(word) divr16u::rem#5 divr16u::@5/(word) divr16u::rem#2 ) [143] (word) divr16u::rem#9 ← phi( divr16u::@2/(word) divr16u::rem#5 divr16u::@5/(word) divr16u::rem#2 )
[145] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 [144] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2
[146] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 [145] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1
to:divr16u::@return to:divr16u::@return
divr16u::@return: scope:[divr16u] from divr16u::@3 divr16u::@return: scope:[divr16u] from divr16u::@3
[147] return [146] return
to:@return to:@return

File diff suppressed because it is too large Load Diff

View File

@ -256,8 +256,7 @@
(const byte) main::vicSelectGfxBank1_toDd001_return#0 vicSelectGfxBank1_toDd001_return = (byte) 3^>(word)(const byte*) SCREEN/(byte) $40 (const byte) main::vicSelectGfxBank1_toDd001_return#0 vicSelectGfxBank1_toDd001_return = (byte) 3^>(word)(const byte*) SCREEN/(byte) $40
(void()) point_init((byte) point_init::point_idx) (void()) point_init((byte) point_init::point_idx)
(byte~) point_init::$10 reg byte a 101.0 (byte~) point_init::$10 reg byte a 101.0
(byte~) point_init::$11 reg byte a 101.0 (byte~) point_init::$13 zp[1]:9 13.03225806451613
(byte~) point_init::$13 reg byte x 80.8
(signed word~) point_init::$17 zp[2]:16 101.0 (signed word~) point_init::$17 zp[2]:16 101.0
(signed word~) point_init::$18 zp[2]:10 202.0 (signed word~) point_init::$18 zp[2]:10 202.0
(word~) point_init::$19 zp[2]:14 202.0 (word~) point_init::$19 zp[2]:14 202.0
@ -293,7 +292,7 @@
(word) point_init::abs16s2_return#6 abs16s2_return zp[2]:7 202.0 (word) point_init::abs16s2_return#6 abs16s2_return zp[2]:7 202.0
(signed word) point_init::abs16s2_w (signed word) point_init::abs16s2_w
(byte) point_init::point_idx (byte) point_init::point_idx
(byte) point_init::point_idx#0 point_idx zp[1]:2 18.147058823529413 (byte) point_init::point_idx#0 point_idx zp[1]:2 15.636363636363637
(signed word) point_init::x_diff (signed word) point_init::x_diff
(signed word) point_init::x_diff#1 x_diff zp[2]:18 28.055555555555554 (signed word) point_init::x_diff#1 x_diff zp[2]:18 28.055555555555554
(signed word) point_init::x_stepf (signed word) point_init::x_stepf
@ -339,13 +338,11 @@ reg byte x [ divr16u::i#2 divr16u::i#1 ]
reg byte a [ main::$10 ] reg byte a [ main::$10 ]
zp[2]:7 [ bitmap_plot::x#0 point_init::abs16s2_return#2 point_init::abs16s2_return#5 point_init::abs16s2_return#6 point_init::abs16s2_return#0 ] zp[2]:7 [ bitmap_plot::x#0 point_init::abs16s2_return#2 point_init::abs16s2_return#5 point_init::abs16s2_return#6 point_init::abs16s2_return#0 ]
reg byte x [ bitmap_plot::y#0 ] reg byte x [ bitmap_plot::y#0 ]
zp[1]:9 [ bitmap_init::$7 screen_fill::y#4 screen_fill::y#1 bitmap_clear::y#4 bitmap_clear::y#1 ]
reg byte a [ bitmap_init::$4 ] reg byte a [ bitmap_init::$4 ]
reg byte a [ bitmap_init::$5 ] reg byte a [ bitmap_init::$5 ]
reg byte a [ bitmap_init::$6 ] reg byte a [ bitmap_init::$6 ]
reg byte a [ point_init::$11 ] zp[1]:9 [ point_init::$13 bitmap_init::$7 screen_fill::y#4 screen_fill::y#1 bitmap_clear::y#4 bitmap_clear::y#1 ]
zp[2]:10 [ point_init::$18 divr16u::dividend#2 divr16u::dividend#0 ] zp[2]:10 [ point_init::$18 divr16u::dividend#2 divr16u::dividend#0 ]
reg byte x [ point_init::$13 ]
zp[2]:12 [ point_init::$5 ] zp[2]:12 [ point_init::$5 ]
zp[2]:14 [ point_init::$19 point_init::$6 ] zp[2]:14 [ point_init::$19 point_init::$6 ]
reg byte a [ point_init::$9 ] reg byte a [ point_init::$9 ]

View File

@ -9,10 +9,11 @@
.const SIZEOF_WORD = 2 .const SIZEOF_WORD = 2
.label print_screen = $400 .label print_screen = $400
// Remainder after unsigned 16-bit division // Remainder after unsigned 16-bit division
.label rem16u = $17 .label rem16u = $18
.label print_char_cursor = $f .label print_char_cursor = $f
.label print_line_cursor = $b .label print_line_cursor = $b
main: { main: {
.label __28 = $11
.label i = 2 .label i = 2
// lin16u_gen(557, 29793, lintab1, 20) // lin16u_gen(557, 29793, lintab1, 20)
lda #<lintab1 lda #<lintab1
@ -171,6 +172,7 @@ main: {
// print_uint(lintab1[i]) // print_uint(lintab1[i])
lda.z i lda.z i
asl asl
sta.z __28
tay tay
lda lintab1,y lda lintab1,y
sta.z print_uint.w sta.z print_uint.w
@ -184,9 +186,7 @@ main: {
sta.z print_str.str+1 sta.z print_str.str+1
jsr print_str jsr print_str
// print_uint(lintab2[i]) // print_uint(lintab2[i])
lda.z i ldy.z __28
asl
tay
lda lintab2,y lda lintab2,y
sta.z print_uint.w sta.z print_uint.w
lda lintab2+1,y lda lintab2+1,y
@ -199,9 +199,7 @@ main: {
sta.z print_str.str+1 sta.z print_str.str+1
jsr print_str jsr print_str
// print_uint(lintab3[i]) // print_uint(lintab3[i])
lda.z i ldy.z __28
asl
tay
lda lintab3,y lda lintab3,y
sta.z print_uint.w sta.z print_uint.w
lda lintab3+1,y lda lintab3+1,y
@ -225,11 +223,11 @@ main: {
// length - the number of points in a total sinus wavelength (the size of the table) // length - the number of points in a total sinus wavelength (the size of the table)
// lin16u_gen(word zp(9) min, word zp(7) max, word* zp($d) lintab) // lin16u_gen(word zp(9) min, word zp(7) max, word* zp($d) lintab)
lin16u_gen: { lin16u_gen: {
.label __6 = $17 .label __6 = $18
.label ampl = 7 .label ampl = 7
.label stepi = $11 .label stepi = $12
.label stepf = $f .label stepf = $f
.label step = $13 .label step = $14
.label val = 3 .label val = 3
.label lintab = $d .label lintab = $d
.label i = $b .label i = $b
@ -427,9 +425,9 @@ print_uchar: {
// Returns the quotient dividend/divisor. // Returns the quotient dividend/divisor.
// The final remainder will be set into the global variable rem16u // The final remainder will be set into the global variable rem16u
// Implemented using simple binary division // Implemented using simple binary division
// divr16u(word zp(7) dividend, word zp($17) rem) // divr16u(word zp(7) dividend, word zp($18) rem)
divr16u: { divr16u: {
.label rem = $17 .label rem = $18
.label dividend = 7 .label dividend = 7
.label quotient = $f .label quotient = $f
.label return = $f .label return = $f

View File

@ -89,8 +89,8 @@ main::@14: scope:[main] from main::@2
[43] call print_str [43] call print_str
to:main::@15 to:main::@15
main::@15: scope:[main] from main::@14 main::@15: scope:[main] from main::@14
[44] (byte~) main::$27 ← (byte) main::i#10 << (byte) 1 [44] (byte~) main::$28 ← (byte) main::i#10 << (byte) 1
[45] (word) print_uint::w#3 ← *((const word*) main::lintab1 + (byte~) main::$27) [45] (word) print_uint::w#3 ← *((const word*) main::lintab1 + (byte~) main::$28)
[46] call print_uint [46] call print_uint
to:main::@16 to:main::@16
main::@16: scope:[main] from main::@15 main::@16: scope:[main] from main::@15
@ -98,203 +98,201 @@ main::@16: scope:[main] from main::@15
[48] call print_str [48] call print_str
to:main::@17 to:main::@17
main::@17: scope:[main] from main::@16 main::@17: scope:[main] from main::@16
[49] (byte~) main::$28 ← (byte) main::i#10 << (byte) 1 [49] (word) print_uint::w#4 ← *((const word*) main::lintab2 + (byte~) main::$28)
[50] (word) print_uint::w#4 ← *((const word*) main::lintab2 + (byte~) main::$28) [50] call print_uint
[51] call print_uint
to:main::@18 to:main::@18
main::@18: scope:[main] from main::@17 main::@18: scope:[main] from main::@17
[52] phi() [51] phi()
[53] call print_str [52] call print_str
to:main::@19 to:main::@19
main::@19: scope:[main] from main::@18 main::@19: scope:[main] from main::@18
[54] (byte~) main::$29 ← (byte) main::i#10 << (byte) 1 [53] (word) print_uint::w#5 ← *((const word*) main::lintab3 + (byte~) main::$28)
[55] (word) print_uint::w#5 ← *((const word*) main::lintab3 + (byte~) main::$29) [54] call print_uint
[56] call print_uint
to:main::@20 to:main::@20
main::@20: scope:[main] from main::@19 main::@20: scope:[main] from main::@19
[57] phi() [55] phi()
[58] call print_ln [56] call print_ln
to:main::@21 to:main::@21
main::@21: scope:[main] from main::@20 main::@21: scope:[main] from main::@20
[59] (byte) main::i#1 ← ++ (byte) main::i#10 [57] (byte) main::i#1 ← ++ (byte) main::i#10
to:main::@1 to:main::@1
(void()) lin16u_gen((word) lin16u_gen::min , (word) lin16u_gen::max , (word*) lin16u_gen::lintab , (word) lin16u_gen::length) (void()) lin16u_gen((word) lin16u_gen::min , (word) lin16u_gen::max , (word*) lin16u_gen::lintab , (word) lin16u_gen::length)
lin16u_gen: scope:[lin16u_gen] from main main::@4 main::@5 lin16u_gen: scope:[lin16u_gen] from main main::@4 main::@5
[60] (word*) lin16u_gen::lintab#6 ← phi( main/(const word*) main::lintab1 main::@4/(const word*) main::lintab2 main::@5/(const word*) main::lintab3 ) [58] (word*) lin16u_gen::lintab#6 ← phi( main/(const word*) main::lintab1 main::@4/(const word*) main::lintab2 main::@5/(const word*) main::lintab3 )
[60] (word) lin16u_gen::min#3 ← phi( main/(word) $22d main::@4/(word) $79cb main::@5/(byte) 0 ) [58] (word) lin16u_gen::min#3 ← phi( main/(word) $22d main::@4/(word) $79cb main::@5/(byte) 0 )
[60] (word) lin16u_gen::max#3 ← phi( main/(word) $7461 main::@4/(word) $f781 main::@5/(word) $6488 ) [58] (word) lin16u_gen::max#3 ← phi( main/(word) $7461 main::@4/(word) $f781 main::@5/(word) $6488 )
[61] (word) lin16u_gen::ampl#0 ← (word) lin16u_gen::max#3 - (word) lin16u_gen::min#3 [59] (word) lin16u_gen::ampl#0 ← (word) lin16u_gen::max#3 - (word) lin16u_gen::min#3
[62] (word) divr16u::dividend#1 ← (word) lin16u_gen::ampl#0 [60] (word) divr16u::dividend#1 ← (word) lin16u_gen::ampl#0
[63] call divr16u [61] call divr16u
[64] (word) divr16u::return#2 ← (word) divr16u::return#0 [62] (word) divr16u::return#2 ← (word) divr16u::return#0
to:lin16u_gen::@3 to:lin16u_gen::@3
lin16u_gen::@3: scope:[lin16u_gen] from lin16u_gen lin16u_gen::@3: scope:[lin16u_gen] from lin16u_gen
[65] (word) lin16u_gen::stepi#0 ← (word) divr16u::return#2 [63] (word) lin16u_gen::stepi#0 ← (word) divr16u::return#2
[66] (word) divr16u::rem#4 ← (word) rem16u#0 [64] (word) divr16u::rem#4 ← (word) rem16u#0
[67] call divr16u [65] call divr16u
[68] (word) divr16u::return#3 ← (word) divr16u::return#0 [66] (word) divr16u::return#3 ← (word) divr16u::return#0
to:lin16u_gen::@4 to:lin16u_gen::@4
lin16u_gen::@4: scope:[lin16u_gen] from lin16u_gen::@3 lin16u_gen::@4: scope:[lin16u_gen] from lin16u_gen::@3
[69] (word) lin16u_gen::stepf#0 ← (word) divr16u::return#3 [67] (word) lin16u_gen::stepf#0 ← (word) divr16u::return#3
[70] (dword) lin16u_gen::step#0 ← (word) lin16u_gen::stepi#0 dw= (word) lin16u_gen::stepf#0 [68] (dword) lin16u_gen::step#0 ← (word) lin16u_gen::stepi#0 dw= (word) lin16u_gen::stepf#0
[71] (dword) lin16u_gen::val#0 ← (word) lin16u_gen::min#3 dw= (word) 0 [69] (dword) lin16u_gen::val#0 ← (word) lin16u_gen::min#3 dw= (word) 0
to:lin16u_gen::@1 to:lin16u_gen::@1
lin16u_gen::@1: scope:[lin16u_gen] from lin16u_gen::@2 lin16u_gen::@4 lin16u_gen::@1: scope:[lin16u_gen] from lin16u_gen::@2 lin16u_gen::@4
[72] (word*) lin16u_gen::lintab#4 ← phi( lin16u_gen::@2/(word*) lin16u_gen::lintab#3 lin16u_gen::@4/(word*) lin16u_gen::lintab#6 ) [70] (word*) lin16u_gen::lintab#4 ← phi( lin16u_gen::@2/(word*) lin16u_gen::lintab#3 lin16u_gen::@4/(word*) lin16u_gen::lintab#6 )
[72] (dword) lin16u_gen::val#2 ← phi( lin16u_gen::@2/(dword) lin16u_gen::val#1 lin16u_gen::@4/(dword) lin16u_gen::val#0 ) [70] (dword) lin16u_gen::val#2 ← phi( lin16u_gen::@2/(dword) lin16u_gen::val#1 lin16u_gen::@4/(dword) lin16u_gen::val#0 )
[72] (word) lin16u_gen::i#2 ← phi( lin16u_gen::@2/(word) lin16u_gen::i#1 lin16u_gen::@4/(word) 0 ) [70] (word) lin16u_gen::i#2 ← phi( lin16u_gen::@2/(word) lin16u_gen::i#1 lin16u_gen::@4/(word) 0 )
[73] if((word) lin16u_gen::i#2<(byte) $14) goto lin16u_gen::@2 [71] if((word) lin16u_gen::i#2<(byte) $14) goto lin16u_gen::@2
to:lin16u_gen::@return to:lin16u_gen::@return
lin16u_gen::@return: scope:[lin16u_gen] from lin16u_gen::@1 lin16u_gen::@return: scope:[lin16u_gen] from lin16u_gen::@1
[74] return [72] return
to:@return to:@return
lin16u_gen::@2: scope:[lin16u_gen] from lin16u_gen::@1 lin16u_gen::@2: scope:[lin16u_gen] from lin16u_gen::@1
[75] (word~) lin16u_gen::$6 ← > (dword) lin16u_gen::val#2 [73] (word~) lin16u_gen::$6 ← > (dword) lin16u_gen::val#2
[76] *((word*) lin16u_gen::lintab#4) ← (word~) lin16u_gen::$6 [74] *((word*) lin16u_gen::lintab#4) ← (word~) lin16u_gen::$6
[77] (dword) lin16u_gen::val#1 ← (dword) lin16u_gen::val#2 + (dword) lin16u_gen::step#0 [75] (dword) lin16u_gen::val#1 ← (dword) lin16u_gen::val#2 + (dword) lin16u_gen::step#0
[78] (word*) lin16u_gen::lintab#3 ← (word*) lin16u_gen::lintab#4 + (const byte) SIZEOF_WORD [76] (word*) lin16u_gen::lintab#3 ← (word*) lin16u_gen::lintab#4 + (const byte) SIZEOF_WORD
[79] (word) lin16u_gen::i#1 ← ++ (word) lin16u_gen::i#2 [77] (word) lin16u_gen::i#1 ← ++ (word) lin16u_gen::i#2
to:lin16u_gen::@1 to:lin16u_gen::@1
(void()) print_cls() (void()) print_cls()
print_cls: scope:[print_cls] from main::@6 print_cls: scope:[print_cls] from main::@6
[80] phi() [78] phi()
[81] call memset [79] call memset
to:print_cls::@return to:print_cls::@return
print_cls::@return: scope:[print_cls] from print_cls print_cls::@return: scope:[print_cls] from print_cls
[82] return [80] return
to:@return to:@return
(void()) print_str((byte*) print_str::str) (void()) print_str((byte*) print_str::str)
print_str: scope:[print_str] from main::@11 main::@14 main::@16 main::@18 main::@23 main::@25 main::@3 main::@7 main::@9 print_str: scope:[print_str] from main::@11 main::@14 main::@16 main::@18 main::@23 main::@25 main::@3 main::@7 main::@9
[83] (byte*) print_char_cursor#89 ← phi( main::@11/(byte*) print_char_cursor#10 main::@14/(byte*) print_char_cursor#10 main::@16/(byte*) print_char_cursor#10 main::@18/(byte*) print_char_cursor#10 main::@23/(byte*) print_char_cursor#10 main::@25/(byte*) print_char_cursor#10 main::@3/(byte*) print_char_cursor#100 main::@7/(const byte*) print_screen#0 main::@9/(byte*) print_char_cursor#10 ) [81] (byte*) print_char_cursor#89 ← phi( main::@11/(byte*) print_char_cursor#10 main::@14/(byte*) print_char_cursor#10 main::@16/(byte*) print_char_cursor#10 main::@18/(byte*) print_char_cursor#10 main::@23/(byte*) print_char_cursor#10 main::@25/(byte*) print_char_cursor#10 main::@3/(byte*) print_char_cursor#100 main::@7/(const byte*) print_screen#0 main::@9/(byte*) print_char_cursor#10 )
[83] (byte*) print_str::str#13 ← phi( main::@11/(const byte*) main::str1 main::@14/(const byte*) main::str1 main::@16/(const byte*) main::str1 main::@18/(const byte*) main::str1 main::@23/(const byte*) main::str1 main::@25/(const byte*) main::str1 main::@3/(const byte*) main::str main::@7/(const byte*) main::str main::@9/(const byte*) main::str1 ) [81] (byte*) print_str::str#13 ← phi( main::@11/(const byte*) main::str1 main::@14/(const byte*) main::str1 main::@16/(const byte*) main::str1 main::@18/(const byte*) main::str1 main::@23/(const byte*) main::str1 main::@25/(const byte*) main::str1 main::@3/(const byte*) main::str main::@7/(const byte*) main::str main::@9/(const byte*) main::str1 )
to:print_str::@1 to:print_str::@1
print_str::@1: scope:[print_str] from print_str print_str::@3 print_str::@1: scope:[print_str] from print_str print_str::@3
[84] (byte*) print_char_cursor#1 ← phi( print_str/(byte*) print_char_cursor#89 print_str::@3/(byte*) print_char_cursor#10 ) [82] (byte*) print_char_cursor#1 ← phi( print_str/(byte*) print_char_cursor#89 print_str::@3/(byte*) print_char_cursor#10 )
[84] (byte*) print_str::str#10 ← phi( print_str/(byte*) print_str::str#13 print_str::@3/(byte*) print_str::str#0 ) [82] (byte*) print_str::str#10 ← phi( print_str/(byte*) print_str::str#13 print_str::@3/(byte*) print_str::str#0 )
[85] if((byte) 0!=*((byte*) print_str::str#10)) goto print_str::@2 [83] if((byte) 0!=*((byte*) print_str::str#10)) goto print_str::@2
to:print_str::@return to:print_str::@return
print_str::@return: scope:[print_str] from print_str::@1 print_str::@return: scope:[print_str] from print_str::@1
[86] return [84] return
to:@return to:@return
print_str::@2: scope:[print_str] from print_str::@1 print_str::@2: scope:[print_str] from print_str::@1
[87] (byte) print_char::ch#0 ← *((byte*) print_str::str#10) [85] (byte) print_char::ch#0 ← *((byte*) print_str::str#10)
[88] call print_char [86] call print_char
to:print_str::@3 to:print_str::@3
print_str::@3: scope:[print_str] from print_str::@2 print_str::@3: scope:[print_str] from print_str::@2
[89] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#10 [87] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#10
to:print_str::@1 to:print_str::@1
(void()) print_uint((word) print_uint::w) (void()) print_uint((word) print_uint::w)
print_uint: scope:[print_uint] from main::@10 main::@12 main::@15 main::@17 main::@19 main::@22 main::@24 main::@26 main::@8 print_uint: scope:[print_uint] from main::@10 main::@12 main::@15 main::@17 main::@19 main::@22 main::@24 main::@26 main::@8
[90] (word) print_uint::w#10 ← phi( main::@10/(word) $79cb main::@12/(byte) 0 main::@15/(word) print_uint::w#3 main::@17/(word) print_uint::w#4 main::@19/(word) print_uint::w#5 main::@22/(word) $7461 main::@24/(word) $f781 main::@26/(word) $6488 main::@8/(word) $22d ) [88] (word) print_uint::w#10 ← phi( main::@10/(word) $79cb main::@12/(byte) 0 main::@15/(word) print_uint::w#3 main::@17/(word) print_uint::w#4 main::@19/(word) print_uint::w#5 main::@22/(word) $7461 main::@24/(word) $f781 main::@26/(word) $6488 main::@8/(word) $22d )
[91] (byte) print_uchar::b#0 ← > (word) print_uint::w#10 [89] (byte) print_uchar::b#0 ← > (word) print_uint::w#10
[92] call print_uchar [90] call print_uchar
to:print_uint::@1 to:print_uint::@1
print_uint::@1: scope:[print_uint] from print_uint print_uint::@1: scope:[print_uint] from print_uint
[93] (byte) print_uchar::b#1 ← < (word) print_uint::w#10 [91] (byte) print_uchar::b#1 ← < (word) print_uint::w#10
[94] call print_uchar [92] call print_uchar
to:print_uint::@return to:print_uint::@return
print_uint::@return: scope:[print_uint] from print_uint::@1 print_uint::@return: scope:[print_uint] from print_uint::@1
[95] return [93] return
to:@return to:@return
(void()) print_ln() (void()) print_ln()
print_ln: scope:[print_ln] from main::@13 main::@20 main::@27 print_ln: scope:[print_ln] from main::@13 main::@20 main::@27
[96] (byte*) print_line_cursor#23 ← phi( main::@13/(const byte*) print_screen#0 main::@20/(byte*) print_line_cursor#0 main::@27/(byte*) print_line_cursor#0 ) [94] (byte*) print_line_cursor#23 ← phi( main::@13/(const byte*) print_screen#0 main::@20/(byte*) print_line_cursor#0 main::@27/(byte*) print_line_cursor#0 )
to:print_ln::@1 to:print_ln::@1
print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 print_ln::@1: scope:[print_ln] from print_ln print_ln::@1
[97] (byte*) print_line_cursor#12 ← phi( print_ln/(byte*) print_line_cursor#23 print_ln::@1/(byte*) print_line_cursor#0 ) [95] (byte*) print_line_cursor#12 ← phi( print_ln/(byte*) print_line_cursor#23 print_ln::@1/(byte*) print_line_cursor#0 )
[98] (byte*) print_line_cursor#0 ← (byte*) print_line_cursor#12 + (byte) $28 [96] (byte*) print_line_cursor#0 ← (byte*) print_line_cursor#12 + (byte) $28
[99] if((byte*) print_line_cursor#0<(byte*) print_char_cursor#10) goto print_ln::@1 [97] if((byte*) print_line_cursor#0<(byte*) print_char_cursor#10) goto print_ln::@1
to:print_ln::@return to:print_ln::@return
print_ln::@return: scope:[print_ln] from print_ln::@1 print_ln::@return: scope:[print_ln] from print_ln::@1
[100] return [98] return
to:@return to:@return
(void()) print_uchar((byte) print_uchar::b) (void()) print_uchar((byte) print_uchar::b)
print_uchar: scope:[print_uchar] from main::@2 print_uint print_uint::@1 print_uchar: scope:[print_uchar] from main::@2 print_uint print_uint::@1
[101] (byte*) print_char_cursor#84 ← phi( main::@2/(byte*) print_char_cursor#104 print_uint/(byte*) print_char_cursor#1 print_uint::@1/(byte*) print_char_cursor#10 ) [99] (byte*) print_char_cursor#84 ← phi( main::@2/(byte*) print_char_cursor#104 print_uint/(byte*) print_char_cursor#1 print_uint::@1/(byte*) print_char_cursor#10 )
[101] (byte) print_uchar::b#3 ← phi( main::@2/(byte) print_uchar::b#2 print_uint/(byte) print_uchar::b#0 print_uint::@1/(byte) print_uchar::b#1 ) [99] (byte) print_uchar::b#3 ← phi( main::@2/(byte) print_uchar::b#2 print_uint/(byte) print_uchar::b#0 print_uint::@1/(byte) print_uchar::b#1 )
[102] (byte~) print_uchar::$0 ← (byte) print_uchar::b#3 >> (byte) 4 [100] (byte~) print_uchar::$0 ← (byte) print_uchar::b#3 >> (byte) 4
[103] (byte) print_char::ch#1 ← *((const to_nomodify byte*) print_hextab + (byte~) print_uchar::$0) [101] (byte) print_char::ch#1 ← *((const to_nomodify byte*) print_hextab + (byte~) print_uchar::$0)
[104] call print_char [102] call print_char
to:print_uchar::@1 to:print_uchar::@1
print_uchar::@1: scope:[print_uchar] from print_uchar print_uchar::@1: scope:[print_uchar] from print_uchar
[105] (byte~) print_uchar::$2 ← (byte) print_uchar::b#3 & (byte) $f [103] (byte~) print_uchar::$2 ← (byte) print_uchar::b#3 & (byte) $f
[106] (byte) print_char::ch#2 ← *((const to_nomodify byte*) print_hextab + (byte~) print_uchar::$2) [104] (byte) print_char::ch#2 ← *((const to_nomodify byte*) print_hextab + (byte~) print_uchar::$2)
[107] call print_char [105] call print_char
to:print_uchar::@return to:print_uchar::@return
print_uchar::@return: scope:[print_uchar] from print_uchar::@1 print_uchar::@return: scope:[print_uchar] from print_uchar::@1
[108] return [106] return
to:@return to:@return
(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) (word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem)
divr16u: scope:[divr16u] from lin16u_gen lin16u_gen::@3 divr16u: scope:[divr16u] from lin16u_gen lin16u_gen::@3
[109] (word) divr16u::dividend#5 ← phi( lin16u_gen/(word) divr16u::dividend#1 lin16u_gen::@3/(byte) 0 ) [107] (word) divr16u::dividend#5 ← phi( lin16u_gen/(word) divr16u::dividend#1 lin16u_gen::@3/(byte) 0 )
[109] (word) divr16u::rem#10 ← phi( lin16u_gen/(byte) 0 lin16u_gen::@3/(word) divr16u::rem#4 ) [107] (word) divr16u::rem#10 ← phi( lin16u_gen/(byte) 0 lin16u_gen::@3/(word) divr16u::rem#4 )
to:divr16u::@1 to:divr16u::@1
divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 divr16u::@1: scope:[divr16u] from divr16u divr16u::@3
[110] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) [108] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 )
[110] (word) divr16u::quotient#3 ← phi( divr16u/(word) 0 divr16u::@3/(word) divr16u::return#0 ) [108] (word) divr16u::quotient#3 ← phi( divr16u/(word) 0 divr16u::@3/(word) divr16u::return#0 )
[110] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) [108] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 )
[110] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) [108] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 )
[111] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 [109] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1
[112] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [110] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3
[113] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 [111] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80
[114] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 [112] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2
to:divr16u::@4 to:divr16u::@4
divr16u::@4: scope:[divr16u] from divr16u::@1 divr16u::@4: scope:[divr16u] from divr16u::@1
[115] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [113] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1
to:divr16u::@2 to:divr16u::@2
divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4
[116] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) [114] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 )
[117] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 [115] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1
[118] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 [116] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1
[119] if((word) divr16u::rem#6<(byte) $14-(byte) 1) goto divr16u::@3 [117] if((word) divr16u::rem#6<(byte) $14-(byte) 1) goto divr16u::@3
to:divr16u::@5 to:divr16u::@5
divr16u::@5: scope:[divr16u] from divr16u::@2 divr16u::@5: scope:[divr16u] from divr16u::@2
[120] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 [118] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1
[121] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (byte) $14-(byte) 1 [119] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (byte) $14-(byte) 1
to:divr16u::@3 to:divr16u::@3
divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5
[122] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) [120] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 )
[122] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) [120] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 )
[123] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 [121] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2
[124] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 [122] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1
to:divr16u::@6 to:divr16u::@6
divr16u::@6: scope:[divr16u] from divr16u::@3 divr16u::@6: scope:[divr16u] from divr16u::@3
[125] (word) rem16u#0 ← (word) divr16u::rem#11 [123] (word) rem16u#0 ← (word) divr16u::rem#11
to:divr16u::@return to:divr16u::@return
divr16u::@return: scope:[divr16u] from divr16u::@6 divr16u::@return: scope:[divr16u] from divr16u::@6
[126] return [124] return
to:@return to:@return
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from print_cls memset: scope:[memset] from print_cls
[127] phi() [125] phi()
to:memset::@1 to:memset::@1
memset::@1: scope:[memset] from memset memset::@2 memset::@1: scope:[memset] from memset memset::@2
[128] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@2/(byte*) memset::dst#1 ) [126] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@2/(byte*) memset::dst#1 )
[129] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 [127] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2
to:memset::@return to:memset::@return
memset::@return: scope:[memset] from memset::@1 memset::@return: scope:[memset] from memset::@1
[130] return [128] return
to:@return to:@return
memset::@2: scope:[memset] from memset::@1 memset::@2: scope:[memset] from memset::@1
[131] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [129] *((byte*) memset::dst#2) ← (const byte) memset::c#0
[132] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 [130] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
to:memset::@1 to:memset::@1
(void()) print_char((byte) print_char::ch) (void()) print_char((byte) print_char::ch)
print_char: scope:[print_char] from print_str::@2 print_uchar print_uchar::@1 print_char: scope:[print_char] from print_str::@2 print_uchar print_uchar::@1
[133] (byte*) print_char_cursor#51 ← phi( print_str::@2/(byte*) print_char_cursor#1 print_uchar/(byte*) print_char_cursor#84 print_uchar::@1/(byte*) print_char_cursor#10 ) [131] (byte*) print_char_cursor#51 ← phi( print_str::@2/(byte*) print_char_cursor#1 print_uchar/(byte*) print_char_cursor#84 print_uchar::@1/(byte*) print_char_cursor#10 )
[133] (byte) print_char::ch#3 ← phi( print_str::@2/(byte) print_char::ch#0 print_uchar/(byte) print_char::ch#1 print_uchar::@1/(byte) print_char::ch#2 ) [131] (byte) print_char::ch#3 ← phi( print_str::@2/(byte) print_char::ch#0 print_uchar/(byte) print_char::ch#1 print_uchar::@1/(byte) print_char::ch#2 )
[134] *((byte*) print_char_cursor#51) ← (byte) print_char::ch#3 [132] *((byte*) print_char_cursor#51) ← (byte) print_char::ch#3
[135] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#51 [133] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#51
to:print_char::@return to:print_char::@return
print_char::@return: scope:[print_char] from print_char print_char::@return: scope:[print_char] from print_char
[136] return [134] return
to:@return to:@return

File diff suppressed because one or more lines are too long

View File

@ -27,20 +27,20 @@
(word) divr16u::quotient#2 quotient zp[2]:15 1001.0 (word) divr16u::quotient#2 quotient zp[2]:15 1001.0
(word) divr16u::quotient#3 quotient zp[2]:15 250.25 (word) divr16u::quotient#3 quotient zp[2]:15 250.25
(word) divr16u::rem (word) divr16u::rem
(word) divr16u::rem#0 rem zp[2]:23 750.75 (word) divr16u::rem#0 rem zp[2]:24 750.75
(word) divr16u::rem#1 rem zp[2]:23 2002.0 (word) divr16u::rem#1 rem zp[2]:24 2002.0
(word) divr16u::rem#10 rem zp[2]:23 112.0 (word) divr16u::rem#10 rem zp[2]:24 112.0
(word) divr16u::rem#11 rem zp[2]:23 1034.6666666666667 (word) divr16u::rem#11 rem zp[2]:24 1034.6666666666667
(word) divr16u::rem#2 rem zp[2]:23 2002.0 (word) divr16u::rem#2 rem zp[2]:24 2002.0
(word) divr16u::rem#4 rem zp[2]:23 22.0 (word) divr16u::rem#4 rem zp[2]:24 22.0
(word) divr16u::rem#5 rem zp[2]:23 2103.0 (word) divr16u::rem#5 rem zp[2]:24 2103.0
(word) divr16u::rem#6 rem zp[2]:23 1001.0 (word) divr16u::rem#6 rem zp[2]:24 1001.0
(word) divr16u::return (word) divr16u::return
(word) divr16u::return#0 return zp[2]:15 432.1428571428571 (word) divr16u::return#0 return zp[2]:15 432.1428571428571
(word) divr16u::return#2 return zp[2]:15 22.0 (word) divr16u::return#2 return zp[2]:15 22.0
(word) divr16u::return#3 return zp[2]:15 22.0 (word) divr16u::return#3 return zp[2]:15 22.0
(void()) lin16u_gen((word) lin16u_gen::min , (word) lin16u_gen::max , (word*) lin16u_gen::lintab , (word) lin16u_gen::length) (void()) lin16u_gen((word) lin16u_gen::min , (word) lin16u_gen::max , (word*) lin16u_gen::lintab , (word) lin16u_gen::length)
(word~) lin16u_gen::$6 zp[2]:23 202.0 (word~) lin16u_gen::$6 zp[2]:24 202.0
(label) lin16u_gen::@1 (label) lin16u_gen::@1
(label) lin16u_gen::@2 (label) lin16u_gen::@2
(label) lin16u_gen::@3 (label) lin16u_gen::@3
@ -61,19 +61,17 @@
(word) lin16u_gen::min (word) lin16u_gen::min
(word) lin16u_gen::min#3 min zp[2]:9 2.0 (word) lin16u_gen::min#3 min zp[2]:9 2.0
(dword) lin16u_gen::step (dword) lin16u_gen::step
(dword) lin16u_gen::step#0 step zp[4]:19 12.444444444444443 (dword) lin16u_gen::step#0 step zp[4]:20 12.444444444444443
(word) lin16u_gen::stepf (word) lin16u_gen::stepf
(word) lin16u_gen::stepf#0 stepf zp[2]:15 22.0 (word) lin16u_gen::stepf#0 stepf zp[2]:15 22.0
(word) lin16u_gen::stepi (word) lin16u_gen::stepi
(word) lin16u_gen::stepi#0 stepi zp[2]:17 4.4 (word) lin16u_gen::stepi#0 stepi zp[2]:18 4.4
(dword) lin16u_gen::val (dword) lin16u_gen::val
(dword) lin16u_gen::val#0 val zp[4]:3 22.0 (dword) lin16u_gen::val#0 val zp[4]:3 22.0
(dword) lin16u_gen::val#1 val zp[4]:3 67.33333333333333 (dword) lin16u_gen::val#1 val zp[4]:3 67.33333333333333
(dword) lin16u_gen::val#2 val zp[4]:3 78.5 (dword) lin16u_gen::val#2 val zp[4]:3 78.5
(void()) main() (void()) main()
(byte~) main::$27 reg byte a 22.0 (byte~) main::$28 zp[1]:17 4.888888888888889
(byte~) main::$28 reg byte a 22.0
(byte~) main::$29 reg byte a 22.0
(label) main::@1 (label) main::@1
(label) main::@10 (label) main::@10
(label) main::@11 (label) main::@11
@ -104,7 +102,7 @@
(label) main::@return (label) main::@return
(byte) main::i (byte) main::i
(byte) main::i#1 i zp[1]:2 22.0 (byte) main::i#1 i zp[1]:2 22.0
(byte) main::i#10 i zp[1]:2 3.5 (byte) main::i#10 i zp[1]:2 2.75
(const word*) main::lintab1[(number) $14] = { fill( $14, 0) } (const word*) main::lintab1[(number) $14] = { fill( $14, 0) }
(const word*) main::lintab2[(number) $14] = { fill( $14, 0) } (const word*) main::lintab2[(number) $14] = { fill( $14, 0) }
(const word*) main::lintab3[(number) $14] = { fill( $14, 0) } (const word*) main::lintab3[(number) $14] = { fill( $14, 0) }
@ -134,7 +132,7 @@
(byte) print_char::ch#2 reg byte a 2002.0 (byte) print_char::ch#2 reg byte a 2002.0
(byte) print_char::ch#3 reg byte a 112004.0 (byte) print_char::ch#3 reg byte a 112004.0
(byte*) print_char_cursor (byte*) print_char_cursor
(byte*) print_char_cursor#1 print_char_cursor zp[2]:15 748.2962962962963 (byte*) print_char_cursor#1 print_char_cursor zp[2]:15 808.1600000000001
(byte*) print_char_cursor#10 print_char_cursor zp[2]:15 3274.216216216216 (byte*) print_char_cursor#10 print_char_cursor zp[2]:15 3274.216216216216
(byte*) print_char_cursor#100 print_char_cursor zp[2]:15 4.0 (byte*) print_char_cursor#100 print_char_cursor zp[2]:15 4.0
(byte*) print_char_cursor#104 print_char_cursor zp[2]:15 22.0 (byte*) print_char_cursor#104 print_char_cursor zp[2]:15 22.0
@ -145,7 +143,7 @@
(label) print_cls::@return (label) print_cls::@return
(const to_nomodify byte*) print_hextab[] = (byte*) "0123456789abcdef"z (const to_nomodify byte*) print_hextab[] = (byte*) "0123456789abcdef"z
(byte*) print_line_cursor (byte*) print_line_cursor
(byte*) print_line_cursor#0 print_line_cursor zp[2]:11 750.725 (byte*) print_line_cursor#0 print_line_cursor zp[2]:11 790.2368421052631
(byte*) print_line_cursor#12 print_line_cursor zp[2]:11 20103.0 (byte*) print_line_cursor#12 print_line_cursor zp[2]:11 20103.0
(byte*) print_line_cursor#23 print_line_cursor zp[2]:11 114.0 (byte*) print_line_cursor#23 print_line_cursor zp[2]:11 114.0
(void()) print_ln() (void()) print_ln()
@ -181,7 +179,7 @@
(word) print_uint::w#4 w zp[2]:9 22.0 (word) print_uint::w#4 w zp[2]:9 22.0
(word) print_uint::w#5 w zp[2]:9 22.0 (word) print_uint::w#5 w zp[2]:9 22.0
(word) rem16u (word) rem16u
(word) rem16u#0 rem16u zp[2]:23 22.4 (word) rem16u#0 rem16u zp[2]:24 22.4
zp[1]:2 [ main::i#10 main::i#1 ] zp[1]:2 [ main::i#10 main::i#1 ]
zp[4]:3 [ lin16u_gen::val#2 lin16u_gen::val#1 lin16u_gen::val#0 ] zp[4]:3 [ lin16u_gen::val#2 lin16u_gen::val#1 lin16u_gen::val#0 ]
@ -193,12 +191,10 @@ reg byte x [ divr16u::i#2 divr16u::i#1 ]
zp[2]:13 [ memset::dst#2 memset::dst#1 lin16u_gen::lintab#4 lin16u_gen::lintab#3 lin16u_gen::lintab#6 ] zp[2]:13 [ memset::dst#2 memset::dst#1 lin16u_gen::lintab#4 lin16u_gen::lintab#3 lin16u_gen::lintab#6 ]
reg byte a [ print_char::ch#3 print_char::ch#0 print_char::ch#1 print_char::ch#2 ] reg byte a [ print_char::ch#3 print_char::ch#0 print_char::ch#1 print_char::ch#2 ]
zp[2]:15 [ print_char_cursor#51 print_char_cursor#84 print_char_cursor#104 print_char_cursor#1 print_char_cursor#89 print_char_cursor#10 print_char_cursor#100 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 lin16u_gen::stepf#0 ] zp[2]:15 [ print_char_cursor#51 print_char_cursor#84 print_char_cursor#104 print_char_cursor#1 print_char_cursor#89 print_char_cursor#10 print_char_cursor#100 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 lin16u_gen::stepf#0 ]
reg byte a [ main::$27 ] zp[1]:17 [ main::$28 ]
reg byte a [ main::$28 ] zp[2]:18 [ lin16u_gen::stepi#0 ]
reg byte a [ main::$29 ] zp[4]:20 [ lin16u_gen::step#0 ]
zp[2]:17 [ lin16u_gen::stepi#0 ] zp[2]:24 [ lin16u_gen::$6 divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#0 ]
zp[4]:19 [ lin16u_gen::step#0 ]
zp[2]:23 [ lin16u_gen::$6 divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#0 ]
reg byte a [ print_uchar::$0 ] reg byte a [ print_uchar::$0 ]
reg byte x [ print_uchar::$2 ] reg byte x [ print_uchar::$2 ]
reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$1 ]

View File

@ -35,39 +35,36 @@ scan_for_lowest: {
sta.z height sta.z height
lda #>$258 lda #>$258
sta.z height+1 sta.z height+1
ldx #0 ldy #0
__b1: __b1:
// for (char i=0;i<8;i++) // for (char i=0;i<8;i++)
cpx #8 cpy #8
bcc __b2 bcc __b2
// } // }
rts rts
__b2: __b2:
// ball_y[i]<height // ball_y[i]<height
txa tya
asl asl
tax
// if (ball_y[i]<height) // if (ball_y[i]<height)
tay lda ball_y,x
lda ball_y,y
cmp.z height cmp.z height
lda ball_y+1,y lda ball_y+1,x
sbc.z height+1 sbc.z height+1
bvc !+ bvc !+
eor #$80 eor #$80
!: !:
bpl __b3 bpl __b3
// height=ball_y[i] // height=ball_y[i]
txa lda ball_y,x
asl
tay
lda ball_y,y
sta.z height sta.z height
lda ball_y+1,y lda ball_y+1,x
sta.z height+1 sta.z height+1
stx.z lowest sty.z lowest
__b3: __b3:
// for (char i=0;i<8;i++) // for (char i=0;i<8;i++)
inx iny
jmp __b1 jmp __b1
} }
ball_y: .word $32, $64, -$c8, $c, -$64, $4b, 0, -$79 ball_y: .word $32, $64, -$c8, $c, -$64, $4b, 0, -$79

View File

@ -32,16 +32,15 @@ scan_for_lowest::@return: scope:[scan_for_lowest] from scan_for_lowest::@1
[14] return [14] return
to:@return to:@return
scan_for_lowest::@2: scope:[scan_for_lowest] from scan_for_lowest::@1 scan_for_lowest::@2: scope:[scan_for_lowest] from scan_for_lowest::@1
[15] (byte~) scan_for_lowest::$3 ← (byte) scan_for_lowest::i#2 << (byte) 1 [15] (byte~) scan_for_lowest::$4 ← (byte) scan_for_lowest::i#2 << (byte) 1
[16] if(*((const signed word*) ball_y + (byte~) scan_for_lowest::$3)>=(signed word) scan_for_lowest::height#2) goto scan_for_lowest::@3 [16] if(*((const signed word*) ball_y + (byte~) scan_for_lowest::$4)>=(signed word) scan_for_lowest::height#2) goto scan_for_lowest::@3
to:scan_for_lowest::@4 to:scan_for_lowest::@4
scan_for_lowest::@4: scope:[scan_for_lowest] from scan_for_lowest::@2 scan_for_lowest::@4: scope:[scan_for_lowest] from scan_for_lowest::@2
[17] (byte~) scan_for_lowest::$4 ← (byte) scan_for_lowest::i#2 << (byte) 1 [17] (signed word) scan_for_lowest::height#1 ← *((const signed word*) ball_y + (byte~) scan_for_lowest::$4)
[18] (signed word) scan_for_lowest::height#1 ← *((const signed word*) ball_y + (byte~) scan_for_lowest::$4) [18] (byte) scan_for_lowest::lowest#8 ← (byte) scan_for_lowest::i#2
[19] (byte) scan_for_lowest::lowest#8 ← (byte) scan_for_lowest::i#2
to:scan_for_lowest::@3 to:scan_for_lowest::@3
scan_for_lowest::@3: scope:[scan_for_lowest] from scan_for_lowest::@2 scan_for_lowest::@4 scan_for_lowest::@3: scope:[scan_for_lowest] from scan_for_lowest::@2 scan_for_lowest::@4
[20] (byte) scan_for_lowest::lowest#4 ← phi( scan_for_lowest::@2/(byte) scan_for_lowest::lowest#2 scan_for_lowest::@4/(byte) scan_for_lowest::lowest#8 ) [19] (byte) scan_for_lowest::lowest#4 ← phi( scan_for_lowest::@2/(byte) scan_for_lowest::lowest#2 scan_for_lowest::@4/(byte) scan_for_lowest::lowest#8 )
[20] (signed word) scan_for_lowest::height#4 ← phi( scan_for_lowest::@2/(signed word) scan_for_lowest::height#2 scan_for_lowest::@4/(signed word) scan_for_lowest::height#1 ) [19] (signed word) scan_for_lowest::height#4 ← phi( scan_for_lowest::@2/(signed word) scan_for_lowest::height#2 scan_for_lowest::@4/(signed word) scan_for_lowest::height#1 )
[21] (byte) scan_for_lowest::i#1 ← ++ (byte) scan_for_lowest::i#2 [20] (byte) scan_for_lowest::i#1 ← ++ (byte) scan_for_lowest::i#2
to:scan_for_lowest::@1 to:scan_for_lowest::@1

View File

@ -191,8 +191,12 @@ Successful SSA optimization Pass2ConstantInlining
Consolidated array index constant in *(main::screen+2) Consolidated array index constant in *(main::screen+2)
Consolidated array index constant in *(main::screen+3) Consolidated array index constant in *(main::screen+3)
Successful SSA optimization Pass2ConstantAdditionElimination Successful SSA optimization Pass2ConstantAdditionElimination
Identified duplicate assignment right side [16] (byte~) scan_for_lowest::$4 ← (byte) scan_for_lowest::i#2 << (byte) 1
Successful SSA optimization Pass2DuplicateRValueIdentification
Eliminating unused constant (const byte) SIZEOF_SIGNED_WORD Eliminating unused constant (const byte) SIZEOF_SIGNED_WORD
Successful SSA optimization PassNEliminateUnusedVars Successful SSA optimization PassNEliminateUnusedVars
Alias scan_for_lowest::$4 = scan_for_lowest::$3
Successful SSA optimization Pass2AliasElimination
Added new block during phi lifting scan_for_lowest::@6(between scan_for_lowest::@2 and scan_for_lowest::@4) Added new block during phi lifting scan_for_lowest::@6(between scan_for_lowest::@2 and scan_for_lowest::@4)
Adding NOP phi() at start of main Adding NOP phi() at start of main
Adding NOP phi() at start of scan_for_lowest Adding NOP phi() at start of scan_for_lowest
@ -201,13 +205,13 @@ CALL GRAPH
Calls in [main] to scan_for_lowest:1 Calls in [main] to scan_for_lowest:1
Created 5 initial phi equivalence classes Created 5 initial phi equivalence classes
Coalesced [20] scan_for_lowest::height#7 ← scan_for_lowest::height#1 Coalesced [19] scan_for_lowest::height#7 ← scan_for_lowest::height#1
Not coalescing [21] scan_for_lowest::lowest#8 ← scan_for_lowest::i#2 Not coalescing [20] scan_for_lowest::lowest#8 ← scan_for_lowest::i#2
Coalesced [24] scan_for_lowest::i#6 ← scan_for_lowest::i#1 Coalesced [23] scan_for_lowest::i#6 ← scan_for_lowest::i#1
Coalesced [25] scan_for_lowest::height#5 ← scan_for_lowest::height#4 Coalesced [24] scan_for_lowest::height#5 ← scan_for_lowest::height#4
Coalesced [26] scan_for_lowest::lowest#6 ← scan_for_lowest::lowest#4 Coalesced [25] scan_for_lowest::lowest#6 ← scan_for_lowest::lowest#4
Coalesced (already) [27] scan_for_lowest::height#6 ← scan_for_lowest::height#2 Coalesced (already) [26] scan_for_lowest::height#6 ← scan_for_lowest::height#2
Coalesced (already) [28] scan_for_lowest::lowest#7 ← scan_for_lowest::lowest#2 Coalesced (already) [27] scan_for_lowest::lowest#7 ← scan_for_lowest::lowest#2
Coalesced down to 3 phi equivalence classes Coalesced down to 3 phi equivalence classes
Culled Empty Block (label) scan_for_lowest::@3 Culled Empty Block (label) scan_for_lowest::@3
Culled Empty Block (label) scan_for_lowest::@6 Culled Empty Block (label) scan_for_lowest::@6
@ -251,18 +255,17 @@ scan_for_lowest::@return: scope:[scan_for_lowest] from scan_for_lowest::@1
[14] return [14] return
to:@return to:@return
scan_for_lowest::@2: scope:[scan_for_lowest] from scan_for_lowest::@1 scan_for_lowest::@2: scope:[scan_for_lowest] from scan_for_lowest::@1
[15] (byte~) scan_for_lowest::$3 ← (byte) scan_for_lowest::i#2 << (byte) 1 [15] (byte~) scan_for_lowest::$4 ← (byte) scan_for_lowest::i#2 << (byte) 1
[16] if(*((const signed word*) ball_y + (byte~) scan_for_lowest::$3)>=(signed word) scan_for_lowest::height#2) goto scan_for_lowest::@3 [16] if(*((const signed word*) ball_y + (byte~) scan_for_lowest::$4)>=(signed word) scan_for_lowest::height#2) goto scan_for_lowest::@3
to:scan_for_lowest::@4 to:scan_for_lowest::@4
scan_for_lowest::@4: scope:[scan_for_lowest] from scan_for_lowest::@2 scan_for_lowest::@4: scope:[scan_for_lowest] from scan_for_lowest::@2
[17] (byte~) scan_for_lowest::$4 ← (byte) scan_for_lowest::i#2 << (byte) 1 [17] (signed word) scan_for_lowest::height#1 ← *((const signed word*) ball_y + (byte~) scan_for_lowest::$4)
[18] (signed word) scan_for_lowest::height#1 ← *((const signed word*) ball_y + (byte~) scan_for_lowest::$4) [18] (byte) scan_for_lowest::lowest#8 ← (byte) scan_for_lowest::i#2
[19] (byte) scan_for_lowest::lowest#8 ← (byte) scan_for_lowest::i#2
to:scan_for_lowest::@3 to:scan_for_lowest::@3
scan_for_lowest::@3: scope:[scan_for_lowest] from scan_for_lowest::@2 scan_for_lowest::@4 scan_for_lowest::@3: scope:[scan_for_lowest] from scan_for_lowest::@2 scan_for_lowest::@4
[20] (byte) scan_for_lowest::lowest#4 ← phi( scan_for_lowest::@2/(byte) scan_for_lowest::lowest#2 scan_for_lowest::@4/(byte) scan_for_lowest::lowest#8 ) [19] (byte) scan_for_lowest::lowest#4 ← phi( scan_for_lowest::@2/(byte) scan_for_lowest::lowest#2 scan_for_lowest::@4/(byte) scan_for_lowest::lowest#8 )
[20] (signed word) scan_for_lowest::height#4 ← phi( scan_for_lowest::@2/(signed word) scan_for_lowest::height#2 scan_for_lowest::@4/(signed word) scan_for_lowest::height#1 ) [19] (signed word) scan_for_lowest::height#4 ← phi( scan_for_lowest::@2/(signed word) scan_for_lowest::height#2 scan_for_lowest::@4/(signed word) scan_for_lowest::height#1 )
[21] (byte) scan_for_lowest::i#1 ← ++ (byte) scan_for_lowest::i#2 [20] (byte) scan_for_lowest::i#1 ← ++ (byte) scan_for_lowest::i#2
to:scan_for_lowest::@1 to:scan_for_lowest::@1
@ -274,15 +277,14 @@ VARIABLE REGISTER WEIGHTS
(byte) main::hit_check (byte) main::hit_check
(byte) main::hit_check#0 3.0 (byte) main::hit_check#0 3.0
(byte()) scan_for_lowest() (byte()) scan_for_lowest()
(byte~) scan_for_lowest::$3 202.0 (byte~) scan_for_lowest::$4 151.5
(byte~) scan_for_lowest::$4 202.0
(signed word) scan_for_lowest::height (signed word) scan_for_lowest::height
(signed word) scan_for_lowest::height#1 101.0 (signed word) scan_for_lowest::height#1 101.0
(signed word) scan_for_lowest::height#2 75.75 (signed word) scan_for_lowest::height#2 75.75
(signed word) scan_for_lowest::height#4 151.5 (signed word) scan_for_lowest::height#4 151.5
(byte) scan_for_lowest::i (byte) scan_for_lowest::i
(byte) scan_for_lowest::i#1 202.0 (byte) scan_for_lowest::i#1 202.0
(byte) scan_for_lowest::i#2 75.75 (byte) scan_for_lowest::i#2 72.14285714285714
(byte) scan_for_lowest::lowest (byte) scan_for_lowest::lowest
(byte) scan_for_lowest::lowest#2 34.0 (byte) scan_for_lowest::lowest#2 34.0
(byte) scan_for_lowest::lowest#4 151.5 (byte) scan_for_lowest::lowest#4 151.5
@ -299,7 +301,6 @@ Added variable main::hit_check#0 to live range equivalence class [ main::hit_che
Added variable main::$4 to live range equivalence class [ main::$4 ] Added variable main::$4 to live range equivalence class [ main::$4 ]
Added variable main::$1 to live range equivalence class [ main::$1 ] Added variable main::$1 to live range equivalence class [ main::$1 ]
Added variable main::$2 to live range equivalence class [ main::$2 ] Added variable main::$2 to live range equivalence class [ main::$2 ]
Added variable scan_for_lowest::$3 to live range equivalence class [ scan_for_lowest::$3 ]
Added variable scan_for_lowest::$4 to live range equivalence class [ scan_for_lowest::$4 ] Added variable scan_for_lowest::$4 to live range equivalence class [ scan_for_lowest::$4 ]
Complete equivalence classes Complete equivalence classes
[ scan_for_lowest::i#2 scan_for_lowest::i#1 ] [ scan_for_lowest::i#2 scan_for_lowest::i#1 ]
@ -310,7 +311,6 @@ Complete equivalence classes
[ main::$4 ] [ main::$4 ]
[ main::$1 ] [ main::$1 ]
[ main::$2 ] [ main::$2 ]
[ scan_for_lowest::$3 ]
[ scan_for_lowest::$4 ] [ scan_for_lowest::$4 ]
Allocated zp[1]:2 [ scan_for_lowest::i#2 scan_for_lowest::i#1 ] Allocated zp[1]:2 [ scan_for_lowest::i#2 scan_for_lowest::i#1 ]
Allocated zp[2]:3 [ scan_for_lowest::height#2 scan_for_lowest::height#4 scan_for_lowest::height#1 ] Allocated zp[2]:3 [ scan_for_lowest::height#2 scan_for_lowest::height#4 scan_for_lowest::height#1 ]
@ -320,8 +320,7 @@ Allocated zp[1]:7 [ main::hit_check#0 ]
Allocated zp[1]:8 [ main::$4 ] Allocated zp[1]:8 [ main::$4 ]
Allocated zp[1]:9 [ main::$1 ] Allocated zp[1]:9 [ main::$1 ]
Allocated zp[1]:10 [ main::$2 ] Allocated zp[1]:10 [ main::$2 ]
Allocated zp[1]:11 [ scan_for_lowest::$3 ] Allocated zp[1]:11 [ scan_for_lowest::$4 ]
Allocated zp[1]:12 [ scan_for_lowest::$4 ]
INITIAL ASM INITIAL ASM
Target platform is c64basic / MOS6502X Target platform is c64basic / MOS6502X
@ -383,8 +382,7 @@ main: {
} }
// scan_for_lowest // scan_for_lowest
scan_for_lowest: { scan_for_lowest: {
.label __3 = $b .label __4 = $b
.label __4 = $c
.label return = 6 .label return = 6
.label i = 2 .label i = 2
.label height = 3 .label height = 3
@ -416,12 +414,12 @@ scan_for_lowest: {
rts rts
// scan_for_lowest::@2 // scan_for_lowest::@2
__b2: __b2:
// [15] (byte~) scan_for_lowest::$3 ← (byte) scan_for_lowest::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 // [15] (byte~) scan_for_lowest::$4 ← (byte) scan_for_lowest::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1
lda.z i lda.z i
asl asl
sta.z __3 sta.z __4
// [16] if(*((const signed word*) ball_y + (byte~) scan_for_lowest::$3)>=(signed word) scan_for_lowest::height#2) goto scan_for_lowest::@3 -- pwsc1_derefidx_vbuz1_ge_vwsz2_then_la1 // [16] if(*((const signed word*) ball_y + (byte~) scan_for_lowest::$4)>=(signed word) scan_for_lowest::height#2) goto scan_for_lowest::@3 -- pwsc1_derefidx_vbuz1_ge_vwsz2_then_la1
ldy.z __3 ldy.z __4
lda ball_y,y lda ball_y,y
cmp.z height cmp.z height
lda ball_y+1,y lda ball_y+1,y
@ -433,28 +431,24 @@ scan_for_lowest: {
jmp __b4 jmp __b4
// scan_for_lowest::@4 // scan_for_lowest::@4
__b4: __b4:
// [17] (byte~) scan_for_lowest::$4 ← (byte) scan_for_lowest::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 // [17] (signed word) scan_for_lowest::height#1 ← *((const signed word*) ball_y + (byte~) scan_for_lowest::$4) -- vwsz1=pwsc1_derefidx_vbuz2
lda.z i
asl
sta.z __4
// [18] (signed word) scan_for_lowest::height#1 ← *((const signed word*) ball_y + (byte~) scan_for_lowest::$4) -- vwsz1=pwsc1_derefidx_vbuz2
ldy.z __4 ldy.z __4
lda ball_y,y lda ball_y,y
sta.z height sta.z height
lda ball_y+1,y lda ball_y+1,y
sta.z height+1 sta.z height+1
// [19] (byte) scan_for_lowest::lowest#8 ← (byte) scan_for_lowest::i#2 -- vbuz1=vbuz2 // [18] (byte) scan_for_lowest::lowest#8 ← (byte) scan_for_lowest::i#2 -- vbuz1=vbuz2
lda.z i lda.z i
sta.z lowest sta.z lowest
// [20] phi from scan_for_lowest::@2 scan_for_lowest::@4 to scan_for_lowest::@3 [phi:scan_for_lowest::@2/scan_for_lowest::@4->scan_for_lowest::@3] // [19] phi from scan_for_lowest::@2 scan_for_lowest::@4 to scan_for_lowest::@3 [phi:scan_for_lowest::@2/scan_for_lowest::@4->scan_for_lowest::@3]
__b3_from___b2: __b3_from___b2:
__b3_from___b4: __b3_from___b4:
// [20] phi (byte) scan_for_lowest::lowest#4 = (byte) scan_for_lowest::lowest#2 [phi:scan_for_lowest::@2/scan_for_lowest::@4->scan_for_lowest::@3#0] -- register_copy // [19] phi (byte) scan_for_lowest::lowest#4 = (byte) scan_for_lowest::lowest#2 [phi:scan_for_lowest::@2/scan_for_lowest::@4->scan_for_lowest::@3#0] -- register_copy
// [20] phi (signed word) scan_for_lowest::height#4 = (signed word) scan_for_lowest::height#2 [phi:scan_for_lowest::@2/scan_for_lowest::@4->scan_for_lowest::@3#1] -- register_copy // [19] phi (signed word) scan_for_lowest::height#4 = (signed word) scan_for_lowest::height#2 [phi:scan_for_lowest::@2/scan_for_lowest::@4->scan_for_lowest::@3#1] -- register_copy
jmp __b3 jmp __b3
// scan_for_lowest::@3 // scan_for_lowest::@3
__b3: __b3:
// [21] (byte) scan_for_lowest::i#1 ← ++ (byte) scan_for_lowest::i#2 -- vbuz1=_inc_vbuz1 // [20] (byte) scan_for_lowest::i#1 ← ++ (byte) scan_for_lowest::i#2 -- vbuz1=_inc_vbuz1
inc.z i inc.z i
// [12] phi from scan_for_lowest::@3 to scan_for_lowest::@1 [phi:scan_for_lowest::@3->scan_for_lowest::@1] // [12] phi from scan_for_lowest::@3 to scan_for_lowest::@1 [phi:scan_for_lowest::@3->scan_for_lowest::@1]
__b1_from___b3: __b1_from___b3:
@ -471,19 +465,18 @@ Statement [5] (byte~) main::$4 ← (byte) main::hit_check#0 << (byte) 1 [ main::
Statement [6] (byte~) main::$1 ← < *((const signed word*) ball_y + (byte~) main::$4) [ main::$4 main::$1 ] ( [ main::$4 main::$1 ] { } ) always clobbers reg byte a Statement [6] (byte~) main::$1 ← < *((const signed word*) ball_y + (byte~) main::$4) [ main::$4 main::$1 ] ( [ main::$4 main::$1 ] { } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:8 [ main::$4 ] Removing always clobbered register reg byte a as potential for zp[1]:8 [ main::$4 ]
Statement [8] (byte~) main::$2 ← > *((const signed word*) ball_y + (byte~) main::$4) [ main::$2 ] ( [ main::$2 ] { } ) always clobbers reg byte a Statement [8] (byte~) main::$2 ← > *((const signed word*) ball_y + (byte~) main::$4) [ main::$2 ] ( [ main::$2 ] { } ) always clobbers reg byte a
Statement [15] (byte~) scan_for_lowest::$3 ← (byte) scan_for_lowest::i#2 << (byte) 1 [ scan_for_lowest::lowest#2 scan_for_lowest::i#2 scan_for_lowest::height#2 scan_for_lowest::$3 ] ( scan_for_lowest:1 [ scan_for_lowest::lowest#2 scan_for_lowest::i#2 scan_for_lowest::height#2 scan_for_lowest::$3 ] { { scan_for_lowest::return#0 = scan_for_lowest::lowest#2 } } ) always clobbers reg byte a Statement [15] (byte~) scan_for_lowest::$4 ← (byte) scan_for_lowest::i#2 << (byte) 1 [ scan_for_lowest::lowest#2 scan_for_lowest::i#2 scan_for_lowest::height#2 scan_for_lowest::$4 ] ( scan_for_lowest:1 [ scan_for_lowest::lowest#2 scan_for_lowest::i#2 scan_for_lowest::height#2 scan_for_lowest::$4 ] { { scan_for_lowest::return#0 = scan_for_lowest::lowest#2 } } ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp[1]:5 [ scan_for_lowest::lowest#2 scan_for_lowest::lowest#4 scan_for_lowest::lowest#8 ] Removing always clobbered register reg byte a as potential for zp[1]:5 [ scan_for_lowest::lowest#2 scan_for_lowest::lowest#4 scan_for_lowest::lowest#8 ]
Removing always clobbered register reg byte a as potential for zp[1]:2 [ scan_for_lowest::i#2 scan_for_lowest::i#1 ] Removing always clobbered register reg byte a as potential for zp[1]:2 [ scan_for_lowest::i#2 scan_for_lowest::i#1 ]
Statement [16] if(*((const signed word*) ball_y + (byte~) scan_for_lowest::$3)>=(signed word) scan_for_lowest::height#2) goto scan_for_lowest::@3 [ scan_for_lowest::lowest#2 scan_for_lowest::i#2 scan_for_lowest::height#2 ] ( scan_for_lowest:1 [ scan_for_lowest::lowest#2 scan_for_lowest::i#2 scan_for_lowest::height#2 ] { { scan_for_lowest::return#0 = scan_for_lowest::lowest#2 } } ) always clobbers reg byte a Statement [16] if(*((const signed word*) ball_y + (byte~) scan_for_lowest::$4)>=(signed word) scan_for_lowest::height#2) goto scan_for_lowest::@3 [ scan_for_lowest::lowest#2 scan_for_lowest::i#2 scan_for_lowest::height#2 scan_for_lowest::$4 ] ( scan_for_lowest:1 [ scan_for_lowest::lowest#2 scan_for_lowest::i#2 scan_for_lowest::height#2 scan_for_lowest::$4 ] { { scan_for_lowest::return#0 = scan_for_lowest::lowest#2 } } ) always clobbers reg byte a
Statement [17] (byte~) scan_for_lowest::$4 ← (byte) scan_for_lowest::i#2 << (byte) 1 [ scan_for_lowest::i#2 scan_for_lowest::$4 ] ( scan_for_lowest:1 [ scan_for_lowest::i#2 scan_for_lowest::$4 ] { { scan_for_lowest::return#0 = scan_for_lowest::lowest#2 } } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:11 [ scan_for_lowest::$4 ]
Statement [18] (signed word) scan_for_lowest::height#1 ← *((const signed word*) ball_y + (byte~) scan_for_lowest::$4) [ scan_for_lowest::i#2 scan_for_lowest::height#1 ] ( scan_for_lowest:1 [ scan_for_lowest::i#2 scan_for_lowest::height#1 ] { { scan_for_lowest::return#0 = scan_for_lowest::lowest#2 } } ) always clobbers reg byte a Statement [17] (signed word) scan_for_lowest::height#1 ← *((const signed word*) ball_y + (byte~) scan_for_lowest::$4) [ scan_for_lowest::i#2 scan_for_lowest::height#1 ] ( scan_for_lowest:1 [ scan_for_lowest::i#2 scan_for_lowest::height#1 ] { { scan_for_lowest::return#0 = scan_for_lowest::lowest#2 } } ) always clobbers reg byte a
Statement [5] (byte~) main::$4 ← (byte) main::hit_check#0 << (byte) 1 [ main::$4 ] ( [ main::$4 ] { } ) always clobbers reg byte a Statement [5] (byte~) main::$4 ← (byte) main::hit_check#0 << (byte) 1 [ main::$4 ] ( [ main::$4 ] { } ) always clobbers reg byte a
Statement [6] (byte~) main::$1 ← < *((const signed word*) ball_y + (byte~) main::$4) [ main::$4 main::$1 ] ( [ main::$4 main::$1 ] { } ) always clobbers reg byte a Statement [6] (byte~) main::$1 ← < *((const signed word*) ball_y + (byte~) main::$4) [ main::$4 main::$1 ] ( [ main::$4 main::$1 ] { } ) always clobbers reg byte a
Statement [8] (byte~) main::$2 ← > *((const signed word*) ball_y + (byte~) main::$4) [ main::$2 ] ( [ main::$2 ] { } ) always clobbers reg byte a Statement [8] (byte~) main::$2 ← > *((const signed word*) ball_y + (byte~) main::$4) [ main::$2 ] ( [ main::$2 ] { } ) always clobbers reg byte a
Statement [15] (byte~) scan_for_lowest::$3 ← (byte) scan_for_lowest::i#2 << (byte) 1 [ scan_for_lowest::lowest#2 scan_for_lowest::i#2 scan_for_lowest::height#2 scan_for_lowest::$3 ] ( scan_for_lowest:1 [ scan_for_lowest::lowest#2 scan_for_lowest::i#2 scan_for_lowest::height#2 scan_for_lowest::$3 ] { { scan_for_lowest::return#0 = scan_for_lowest::lowest#2 } } ) always clobbers reg byte a Statement [15] (byte~) scan_for_lowest::$4 ← (byte) scan_for_lowest::i#2 << (byte) 1 [ scan_for_lowest::lowest#2 scan_for_lowest::i#2 scan_for_lowest::height#2 scan_for_lowest::$4 ] ( scan_for_lowest:1 [ scan_for_lowest::lowest#2 scan_for_lowest::i#2 scan_for_lowest::height#2 scan_for_lowest::$4 ] { { scan_for_lowest::return#0 = scan_for_lowest::lowest#2 } } ) always clobbers reg byte a
Statement [16] if(*((const signed word*) ball_y + (byte~) scan_for_lowest::$3)>=(signed word) scan_for_lowest::height#2) goto scan_for_lowest::@3 [ scan_for_lowest::lowest#2 scan_for_lowest::i#2 scan_for_lowest::height#2 ] ( scan_for_lowest:1 [ scan_for_lowest::lowest#2 scan_for_lowest::i#2 scan_for_lowest::height#2 ] { { scan_for_lowest::return#0 = scan_for_lowest::lowest#2 } } ) always clobbers reg byte a Statement [16] if(*((const signed word*) ball_y + (byte~) scan_for_lowest::$4)>=(signed word) scan_for_lowest::height#2) goto scan_for_lowest::@3 [ scan_for_lowest::lowest#2 scan_for_lowest::i#2 scan_for_lowest::height#2 scan_for_lowest::$4 ] ( scan_for_lowest:1 [ scan_for_lowest::lowest#2 scan_for_lowest::i#2 scan_for_lowest::height#2 scan_for_lowest::$4 ] { { scan_for_lowest::return#0 = scan_for_lowest::lowest#2 } } ) always clobbers reg byte a
Statement [17] (byte~) scan_for_lowest::$4 ← (byte) scan_for_lowest::i#2 << (byte) 1 [ scan_for_lowest::i#2 scan_for_lowest::$4 ] ( scan_for_lowest:1 [ scan_for_lowest::i#2 scan_for_lowest::$4 ] { { scan_for_lowest::return#0 = scan_for_lowest::lowest#2 } } ) always clobbers reg byte a Statement [17] (signed word) scan_for_lowest::height#1 ← *((const signed word*) ball_y + (byte~) scan_for_lowest::$4) [ scan_for_lowest::i#2 scan_for_lowest::height#1 ] ( scan_for_lowest:1 [ scan_for_lowest::i#2 scan_for_lowest::height#1 ] { { scan_for_lowest::return#0 = scan_for_lowest::lowest#2 } } ) always clobbers reg byte a
Statement [18] (signed word) scan_for_lowest::height#1 ← *((const signed word*) ball_y + (byte~) scan_for_lowest::$4) [ scan_for_lowest::i#2 scan_for_lowest::height#1 ] ( scan_for_lowest:1 [ scan_for_lowest::i#2 scan_for_lowest::height#1 ] { { scan_for_lowest::return#0 = scan_for_lowest::lowest#2 } } ) always clobbers reg byte a
Potential registers zp[1]:2 [ scan_for_lowest::i#2 scan_for_lowest::i#1 ] : zp[1]:2 , reg byte x , reg byte y , Potential registers zp[1]:2 [ scan_for_lowest::i#2 scan_for_lowest::i#1 ] : zp[1]:2 , reg byte x , reg byte y ,
Potential registers zp[2]:3 [ scan_for_lowest::height#2 scan_for_lowest::height#4 scan_for_lowest::height#1 ] : zp[2]:3 , Potential registers zp[2]:3 [ scan_for_lowest::height#2 scan_for_lowest::height#4 scan_for_lowest::height#1 ] : zp[2]:3 ,
Potential registers zp[1]:5 [ scan_for_lowest::lowest#2 scan_for_lowest::lowest#4 scan_for_lowest::lowest#8 ] : zp[1]:5 , reg byte x , reg byte y , Potential registers zp[1]:5 [ scan_for_lowest::lowest#2 scan_for_lowest::lowest#4 scan_for_lowest::lowest#8 ] : zp[1]:5 , reg byte x , reg byte y ,
@ -492,23 +485,20 @@ Potential registers zp[1]:7 [ main::hit_check#0 ] : zp[1]:7 , reg byte a , reg b
Potential registers zp[1]:8 [ main::$4 ] : zp[1]:8 , reg byte x , reg byte y , Potential registers zp[1]:8 [ main::$4 ] : zp[1]:8 , reg byte x , reg byte y ,
Potential registers zp[1]:9 [ main::$1 ] : zp[1]:9 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:9 [ main::$1 ] : zp[1]:9 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:10 [ main::$2 ] : zp[1]:10 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:10 [ main::$2 ] : zp[1]:10 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:11 [ scan_for_lowest::$3 ] : zp[1]:11 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:11 [ scan_for_lowest::$4 ] : zp[1]:11 , reg byte x , reg byte y ,
Potential registers zp[1]:12 [ scan_for_lowest::$4 ] : zp[1]:12 , reg byte a , reg byte x , reg byte y ,
REGISTER UPLIFT SCOPES REGISTER UPLIFT SCOPES
Uplift Scope [scan_for_lowest] 387.5: zp[1]:5 [ scan_for_lowest::lowest#2 scan_for_lowest::lowest#4 scan_for_lowest::lowest#8 ] 328.25: zp[2]:3 [ scan_for_lowest::height#2 scan_for_lowest::height#4 scan_for_lowest::height#1 ] 277.75: zp[1]:2 [ scan_for_lowest::i#2 scan_for_lowest::i#1 ] 202: zp[1]:11 [ scan_for_lowest::$3 ] 202: zp[1]:12 [ scan_for_lowest::$4 ] 4: zp[1]:6 [ scan_for_lowest::return#0 ] Uplift Scope [scan_for_lowest] 387.5: zp[1]:5 [ scan_for_lowest::lowest#2 scan_for_lowest::lowest#4 scan_for_lowest::lowest#8 ] 328.25: zp[2]:3 [ scan_for_lowest::height#2 scan_for_lowest::height#4 scan_for_lowest::height#1 ] 274.14: zp[1]:2 [ scan_for_lowest::i#2 scan_for_lowest::i#1 ] 151.5: zp[1]:11 [ scan_for_lowest::$4 ] 4: zp[1]:6 [ scan_for_lowest::return#0 ]
Uplift Scope [main] 4: zp[1]:9 [ main::$1 ] 4: zp[1]:10 [ main::$2 ] 3: zp[1]:7 [ main::hit_check#0 ] 2: zp[1]:8 [ main::$4 ] Uplift Scope [main] 4: zp[1]:9 [ main::$1 ] 4: zp[1]:10 [ main::$2 ] 3: zp[1]:7 [ main::hit_check#0 ] 2: zp[1]:8 [ main::$4 ]
Uplift Scope [] Uplift Scope []
Uplifting [scan_for_lowest] best 990 combination zp[1]:5 [ scan_for_lowest::lowest#2 scan_for_lowest::lowest#4 scan_for_lowest::lowest#8 ] zp[2]:3 [ scan_for_lowest::height#2 scan_for_lowest::height#4 scan_for_lowest::height#1 ] reg byte x [ scan_for_lowest::i#2 scan_for_lowest::i#1 ] reg byte a [ scan_for_lowest::$3 ] reg byte a [ scan_for_lowest::$4 ] zp[1]:6 [ scan_for_lowest::return#0 ] Uplifting [scan_for_lowest] best 924 combination zp[1]:5 [ scan_for_lowest::lowest#2 scan_for_lowest::lowest#4 scan_for_lowest::lowest#8 ] zp[2]:3 [ scan_for_lowest::height#2 scan_for_lowest::height#4 scan_for_lowest::height#1 ] reg byte y [ scan_for_lowest::i#2 scan_for_lowest::i#1 ] reg byte x [ scan_for_lowest::$4 ] reg byte a [ scan_for_lowest::return#0 ]
Limited combination testing to 100 combinations of 576 possible. Limited combination testing to 100 combinations of 108 possible.
Uplifting [main] best 962 combination reg byte a [ main::$1 ] reg byte a [ main::$2 ] reg byte a [ main::hit_check#0 ] reg byte x [ main::$4 ] Uplifting [main] best 896 combination reg byte a [ main::$1 ] reg byte a [ main::$2 ] reg byte a [ main::hit_check#0 ] reg byte x [ main::$4 ]
Limited combination testing to 100 combinations of 192 possible. Limited combination testing to 100 combinations of 192 possible.
Uplifting [] best 962 combination Uplifting [] best 896 combination
Attempting to uplift remaining variables inzp[1]:5 [ scan_for_lowest::lowest#2 scan_for_lowest::lowest#4 scan_for_lowest::lowest#8 ] Attempting to uplift remaining variables inzp[1]:5 [ scan_for_lowest::lowest#2 scan_for_lowest::lowest#4 scan_for_lowest::lowest#8 ]
Uplifting [scan_for_lowest] best 962 combination zp[1]:5 [ scan_for_lowest::lowest#2 scan_for_lowest::lowest#4 scan_for_lowest::lowest#8 ] Uplifting [scan_for_lowest] best 896 combination zp[1]:5 [ scan_for_lowest::lowest#2 scan_for_lowest::lowest#4 scan_for_lowest::lowest#8 ]
Attempting to uplift remaining variables inzp[1]:6 [ scan_for_lowest::return#0 ]
Uplifting [scan_for_lowest] best 956 combination reg byte a [ scan_for_lowest::return#0 ]
Allocated (was zp[2]:3) zp[2]:2 [ scan_for_lowest::height#2 scan_for_lowest::height#4 scan_for_lowest::height#1 ] Allocated (was zp[2]:3) zp[2]:2 [ scan_for_lowest::height#2 scan_for_lowest::height#4 scan_for_lowest::height#1 ]
Allocated (was zp[1]:5) zp[1]:4 [ scan_for_lowest::lowest#2 scan_for_lowest::lowest#4 scan_for_lowest::lowest#8 ] Allocated (was zp[1]:5) zp[1]:4 [ scan_for_lowest::lowest#2 scan_for_lowest::lowest#4 scan_for_lowest::lowest#8 ]
@ -568,13 +558,13 @@ scan_for_lowest: {
sta.z height sta.z height
lda #>$258 lda #>$258
sta.z height+1 sta.z height+1
// [12] phi (byte) scan_for_lowest::i#2 = (byte) 0 [phi:scan_for_lowest->scan_for_lowest::@1#2] -- vbuxx=vbuc1 // [12] phi (byte) scan_for_lowest::i#2 = (byte) 0 [phi:scan_for_lowest->scan_for_lowest::@1#2] -- vbuyy=vbuc1
ldx #0 ldy #0
jmp __b1 jmp __b1
// scan_for_lowest::@1 // scan_for_lowest::@1
__b1: __b1:
// [13] if((byte) scan_for_lowest::i#2<(byte) 8) goto scan_for_lowest::@2 -- vbuxx_lt_vbuc1_then_la1 // [13] if((byte) scan_for_lowest::i#2<(byte) 8) goto scan_for_lowest::@2 -- vbuyy_lt_vbuc1_then_la1
cpx #8 cpy #8
bcc __b2 bcc __b2
jmp __breturn jmp __breturn
// scan_for_lowest::@return // scan_for_lowest::@return
@ -583,14 +573,14 @@ scan_for_lowest: {
rts rts
// scan_for_lowest::@2 // scan_for_lowest::@2
__b2: __b2:
// [15] (byte~) scan_for_lowest::$3 ← (byte) scan_for_lowest::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 // [15] (byte~) scan_for_lowest::$4 ← (byte) scan_for_lowest::i#2 << (byte) 1 -- vbuxx=vbuyy_rol_1
txa tya
asl asl
// [16] if(*((const signed word*) ball_y + (byte~) scan_for_lowest::$3)>=(signed word) scan_for_lowest::height#2) goto scan_for_lowest::@3 -- pwsc1_derefidx_vbuaa_ge_vwsz1_then_la1 tax
tay // [16] if(*((const signed word*) ball_y + (byte~) scan_for_lowest::$4)>=(signed word) scan_for_lowest::height#2) goto scan_for_lowest::@3 -- pwsc1_derefidx_vbuxx_ge_vwsz1_then_la1
lda ball_y,y lda ball_y,x
cmp.z height cmp.z height
lda ball_y+1,y lda ball_y+1,x
sbc.z height+1 sbc.z height+1
bvc !+ bvc !+
eor #$80 eor #$80
@ -599,27 +589,23 @@ scan_for_lowest: {
jmp __b4 jmp __b4
// scan_for_lowest::@4 // scan_for_lowest::@4
__b4: __b4:
// [17] (byte~) scan_for_lowest::$4 ← (byte) scan_for_lowest::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 // [17] (signed word) scan_for_lowest::height#1 ← *((const signed word*) ball_y + (byte~) scan_for_lowest::$4) -- vwsz1=pwsc1_derefidx_vbuxx
txa lda ball_y,x
asl
// [18] (signed word) scan_for_lowest::height#1 ← *((const signed word*) ball_y + (byte~) scan_for_lowest::$4) -- vwsz1=pwsc1_derefidx_vbuaa
tay
lda ball_y,y
sta.z height sta.z height
lda ball_y+1,y lda ball_y+1,x
sta.z height+1 sta.z height+1
// [19] (byte) scan_for_lowest::lowest#8 ← (byte) scan_for_lowest::i#2 -- vbuz1=vbuxx // [18] (byte) scan_for_lowest::lowest#8 ← (byte) scan_for_lowest::i#2 -- vbuz1=vbuyy
stx.z lowest sty.z lowest
// [20] phi from scan_for_lowest::@2 scan_for_lowest::@4 to scan_for_lowest::@3 [phi:scan_for_lowest::@2/scan_for_lowest::@4->scan_for_lowest::@3] // [19] phi from scan_for_lowest::@2 scan_for_lowest::@4 to scan_for_lowest::@3 [phi:scan_for_lowest::@2/scan_for_lowest::@4->scan_for_lowest::@3]
__b3_from___b2: __b3_from___b2:
__b3_from___b4: __b3_from___b4:
// [20] phi (byte) scan_for_lowest::lowest#4 = (byte) scan_for_lowest::lowest#2 [phi:scan_for_lowest::@2/scan_for_lowest::@4->scan_for_lowest::@3#0] -- register_copy // [19] phi (byte) scan_for_lowest::lowest#4 = (byte) scan_for_lowest::lowest#2 [phi:scan_for_lowest::@2/scan_for_lowest::@4->scan_for_lowest::@3#0] -- register_copy
// [20] phi (signed word) scan_for_lowest::height#4 = (signed word) scan_for_lowest::height#2 [phi:scan_for_lowest::@2/scan_for_lowest::@4->scan_for_lowest::@3#1] -- register_copy // [19] phi (signed word) scan_for_lowest::height#4 = (signed word) scan_for_lowest::height#2 [phi:scan_for_lowest::@2/scan_for_lowest::@4->scan_for_lowest::@3#1] -- register_copy
jmp __b3 jmp __b3
// scan_for_lowest::@3 // scan_for_lowest::@3
__b3: __b3:
// [21] (byte) scan_for_lowest::i#1 ← ++ (byte) scan_for_lowest::i#2 -- vbuxx=_inc_vbuxx // [20] (byte) scan_for_lowest::i#1 ← ++ (byte) scan_for_lowest::i#2 -- vbuyy=_inc_vbuyy
inx iny
// [12] phi from scan_for_lowest::@3 to scan_for_lowest::@1 [phi:scan_for_lowest::@3->scan_for_lowest::@1] // [12] phi from scan_for_lowest::@3 to scan_for_lowest::@1 [phi:scan_for_lowest::@3->scan_for_lowest::@1]
__b1_from___b3: __b1_from___b3:
// [12] phi (byte) scan_for_lowest::lowest#2 = (byte) scan_for_lowest::lowest#4 [phi:scan_for_lowest::@3->scan_for_lowest::@1#0] -- register_copy // [12] phi (byte) scan_for_lowest::lowest#2 = (byte) scan_for_lowest::lowest#4 [phi:scan_for_lowest::@3->scan_for_lowest::@1#0] -- register_copy
@ -663,8 +649,7 @@ FINAL SYMBOL TABLE
(byte) main::hit_check#0 reg byte a 3.0 (byte) main::hit_check#0 reg byte a 3.0
(const nomodify byte*) main::screen = (byte*) 1024 (const nomodify byte*) main::screen = (byte*) 1024
(byte()) scan_for_lowest() (byte()) scan_for_lowest()
(byte~) scan_for_lowest::$3 reg byte a 202.0 (byte~) scan_for_lowest::$4 reg byte x 151.5
(byte~) scan_for_lowest::$4 reg byte a 202.0
(label) scan_for_lowest::@1 (label) scan_for_lowest::@1
(label) scan_for_lowest::@2 (label) scan_for_lowest::@2
(label) scan_for_lowest::@3 (label) scan_for_lowest::@3
@ -675,8 +660,8 @@ FINAL SYMBOL TABLE
(signed word) scan_for_lowest::height#2 height zp[2]:2 75.75 (signed word) scan_for_lowest::height#2 height zp[2]:2 75.75
(signed word) scan_for_lowest::height#4 height zp[2]:2 151.5 (signed word) scan_for_lowest::height#4 height zp[2]:2 151.5
(byte) scan_for_lowest::i (byte) scan_for_lowest::i
(byte) scan_for_lowest::i#1 reg byte x 202.0 (byte) scan_for_lowest::i#1 reg byte y 202.0
(byte) scan_for_lowest::i#2 reg byte x 75.75 (byte) scan_for_lowest::i#2 reg byte y 72.14285714285714
(byte) scan_for_lowest::lowest (byte) scan_for_lowest::lowest
(byte) scan_for_lowest::lowest#2 lowest zp[1]:4 34.0 (byte) scan_for_lowest::lowest#2 lowest zp[1]:4 34.0
(byte) scan_for_lowest::lowest#4 lowest zp[1]:4 151.5 (byte) scan_for_lowest::lowest#4 lowest zp[1]:4 151.5
@ -684,7 +669,7 @@ FINAL SYMBOL TABLE
(byte) scan_for_lowest::return (byte) scan_for_lowest::return
(byte) scan_for_lowest::return#0 reg byte a 4.0 (byte) scan_for_lowest::return#0 reg byte a 4.0
reg byte x [ scan_for_lowest::i#2 scan_for_lowest::i#1 ] reg byte y [ scan_for_lowest::i#2 scan_for_lowest::i#1 ]
zp[2]:2 [ scan_for_lowest::height#2 scan_for_lowest::height#4 scan_for_lowest::height#1 ] zp[2]:2 [ scan_for_lowest::height#2 scan_for_lowest::height#4 scan_for_lowest::height#1 ]
zp[1]:4 [ scan_for_lowest::lowest#2 scan_for_lowest::lowest#4 scan_for_lowest::lowest#8 ] zp[1]:4 [ scan_for_lowest::lowest#2 scan_for_lowest::lowest#4 scan_for_lowest::lowest#8 ]
reg byte a [ scan_for_lowest::return#0 ] reg byte a [ scan_for_lowest::return#0 ]
@ -692,12 +677,11 @@ reg byte a [ main::hit_check#0 ]
reg byte x [ main::$4 ] reg byte x [ main::$4 ]
reg byte a [ main::$1 ] reg byte a [ main::$1 ]
reg byte a [ main::$2 ] reg byte a [ main::$2 ]
reg byte a [ scan_for_lowest::$3 ] reg byte x [ scan_for_lowest::$4 ]
reg byte a [ scan_for_lowest::$4 ]
FINAL ASSEMBLER FINAL ASSEMBLER
Score: 830 Score: 770
// File Comments // File Comments
// Call returns wrong value // Call returns wrong value
@ -757,13 +741,13 @@ scan_for_lowest: {
sta.z height sta.z height
lda #>$258 lda #>$258
sta.z height+1 sta.z height+1
// [12] phi (byte) scan_for_lowest::i#2 = (byte) 0 [phi:scan_for_lowest->scan_for_lowest::@1#2] -- vbuxx=vbuc1 // [12] phi (byte) scan_for_lowest::i#2 = (byte) 0 [phi:scan_for_lowest->scan_for_lowest::@1#2] -- vbuyy=vbuc1
ldx #0 ldy #0
// scan_for_lowest::@1 // scan_for_lowest::@1
__b1: __b1:
// for (char i=0;i<8;i++) // for (char i=0;i<8;i++)
// [13] if((byte) scan_for_lowest::i#2<(byte) 8) goto scan_for_lowest::@2 -- vbuxx_lt_vbuc1_then_la1 // [13] if((byte) scan_for_lowest::i#2<(byte) 8) goto scan_for_lowest::@2 -- vbuyy_lt_vbuc1_then_la1
cpx #8 cpy #8
bcc __b2 bcc __b2
// scan_for_lowest::@return // scan_for_lowest::@return
// } // }
@ -772,15 +756,15 @@ scan_for_lowest: {
// scan_for_lowest::@2 // scan_for_lowest::@2
__b2: __b2:
// ball_y[i]<height // ball_y[i]<height
// [15] (byte~) scan_for_lowest::$3 ← (byte) scan_for_lowest::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 // [15] (byte~) scan_for_lowest::$4 ← (byte) scan_for_lowest::i#2 << (byte) 1 -- vbuxx=vbuyy_rol_1
txa tya
asl asl
tax
// if (ball_y[i]<height) // if (ball_y[i]<height)
// [16] if(*((const signed word*) ball_y + (byte~) scan_for_lowest::$3)>=(signed word) scan_for_lowest::height#2) goto scan_for_lowest::@3 -- pwsc1_derefidx_vbuaa_ge_vwsz1_then_la1 // [16] if(*((const signed word*) ball_y + (byte~) scan_for_lowest::$4)>=(signed word) scan_for_lowest::height#2) goto scan_for_lowest::@3 -- pwsc1_derefidx_vbuxx_ge_vwsz1_then_la1
tay lda ball_y,x
lda ball_y,y
cmp.z height cmp.z height
lda ball_y+1,y lda ball_y+1,x
sbc.z height+1 sbc.z height+1
bvc !+ bvc !+
eor #$80 eor #$80
@ -788,25 +772,21 @@ scan_for_lowest: {
bpl __b3 bpl __b3
// scan_for_lowest::@4 // scan_for_lowest::@4
// height=ball_y[i] // height=ball_y[i]
// [17] (byte~) scan_for_lowest::$4 ← (byte) scan_for_lowest::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 // [17] (signed word) scan_for_lowest::height#1 ← *((const signed word*) ball_y + (byte~) scan_for_lowest::$4) -- vwsz1=pwsc1_derefidx_vbuxx
txa lda ball_y,x
asl
// [18] (signed word) scan_for_lowest::height#1 ← *((const signed word*) ball_y + (byte~) scan_for_lowest::$4) -- vwsz1=pwsc1_derefidx_vbuaa
tay
lda ball_y,y
sta.z height sta.z height
lda ball_y+1,y lda ball_y+1,x
sta.z height+1 sta.z height+1
// [19] (byte) scan_for_lowest::lowest#8 ← (byte) scan_for_lowest::i#2 -- vbuz1=vbuxx // [18] (byte) scan_for_lowest::lowest#8 ← (byte) scan_for_lowest::i#2 -- vbuz1=vbuyy
stx.z lowest sty.z lowest
// [20] phi from scan_for_lowest::@2 scan_for_lowest::@4 to scan_for_lowest::@3 [phi:scan_for_lowest::@2/scan_for_lowest::@4->scan_for_lowest::@3] // [19] phi from scan_for_lowest::@2 scan_for_lowest::@4 to scan_for_lowest::@3 [phi:scan_for_lowest::@2/scan_for_lowest::@4->scan_for_lowest::@3]
// [20] phi (byte) scan_for_lowest::lowest#4 = (byte) scan_for_lowest::lowest#2 [phi:scan_for_lowest::@2/scan_for_lowest::@4->scan_for_lowest::@3#0] -- register_copy // [19] phi (byte) scan_for_lowest::lowest#4 = (byte) scan_for_lowest::lowest#2 [phi:scan_for_lowest::@2/scan_for_lowest::@4->scan_for_lowest::@3#0] -- register_copy
// [20] phi (signed word) scan_for_lowest::height#4 = (signed word) scan_for_lowest::height#2 [phi:scan_for_lowest::@2/scan_for_lowest::@4->scan_for_lowest::@3#1] -- register_copy // [19] phi (signed word) scan_for_lowest::height#4 = (signed word) scan_for_lowest::height#2 [phi:scan_for_lowest::@2/scan_for_lowest::@4->scan_for_lowest::@3#1] -- register_copy
// scan_for_lowest::@3 // scan_for_lowest::@3
__b3: __b3:
// for (char i=0;i<8;i++) // for (char i=0;i<8;i++)
// [21] (byte) scan_for_lowest::i#1 ← ++ (byte) scan_for_lowest::i#2 -- vbuxx=_inc_vbuxx // [20] (byte) scan_for_lowest::i#1 ← ++ (byte) scan_for_lowest::i#2 -- vbuyy=_inc_vbuyy
inx iny
// [12] phi from scan_for_lowest::@3 to scan_for_lowest::@1 [phi:scan_for_lowest::@3->scan_for_lowest::@1] // [12] phi from scan_for_lowest::@3 to scan_for_lowest::@1 [phi:scan_for_lowest::@3->scan_for_lowest::@1]
// [12] phi (byte) scan_for_lowest::lowest#2 = (byte) scan_for_lowest::lowest#4 [phi:scan_for_lowest::@3->scan_for_lowest::@1#0] -- register_copy // [12] phi (byte) scan_for_lowest::lowest#2 = (byte) scan_for_lowest::lowest#4 [phi:scan_for_lowest::@3->scan_for_lowest::@1#0] -- register_copy
// [12] phi (signed word) scan_for_lowest::height#2 = (signed word) scan_for_lowest::height#4 [phi:scan_for_lowest::@3->scan_for_lowest::@1#1] -- register_copy // [12] phi (signed word) scan_for_lowest::height#2 = (signed word) scan_for_lowest::height#4 [phi:scan_for_lowest::@3->scan_for_lowest::@1#1] -- register_copy

View File

@ -9,8 +9,7 @@
(byte) main::hit_check#0 reg byte a 3.0 (byte) main::hit_check#0 reg byte a 3.0
(const nomodify byte*) main::screen = (byte*) 1024 (const nomodify byte*) main::screen = (byte*) 1024
(byte()) scan_for_lowest() (byte()) scan_for_lowest()
(byte~) scan_for_lowest::$3 reg byte a 202.0 (byte~) scan_for_lowest::$4 reg byte x 151.5
(byte~) scan_for_lowest::$4 reg byte a 202.0
(label) scan_for_lowest::@1 (label) scan_for_lowest::@1
(label) scan_for_lowest::@2 (label) scan_for_lowest::@2
(label) scan_for_lowest::@3 (label) scan_for_lowest::@3
@ -21,8 +20,8 @@
(signed word) scan_for_lowest::height#2 height zp[2]:2 75.75 (signed word) scan_for_lowest::height#2 height zp[2]:2 75.75
(signed word) scan_for_lowest::height#4 height zp[2]:2 151.5 (signed word) scan_for_lowest::height#4 height zp[2]:2 151.5
(byte) scan_for_lowest::i (byte) scan_for_lowest::i
(byte) scan_for_lowest::i#1 reg byte x 202.0 (byte) scan_for_lowest::i#1 reg byte y 202.0
(byte) scan_for_lowest::i#2 reg byte x 75.75 (byte) scan_for_lowest::i#2 reg byte y 72.14285714285714
(byte) scan_for_lowest::lowest (byte) scan_for_lowest::lowest
(byte) scan_for_lowest::lowest#2 lowest zp[1]:4 34.0 (byte) scan_for_lowest::lowest#2 lowest zp[1]:4 34.0
(byte) scan_for_lowest::lowest#4 lowest zp[1]:4 151.5 (byte) scan_for_lowest::lowest#4 lowest zp[1]:4 151.5
@ -30,7 +29,7 @@
(byte) scan_for_lowest::return (byte) scan_for_lowest::return
(byte) scan_for_lowest::return#0 reg byte a 4.0 (byte) scan_for_lowest::return#0 reg byte a 4.0
reg byte x [ scan_for_lowest::i#2 scan_for_lowest::i#1 ] reg byte y [ scan_for_lowest::i#2 scan_for_lowest::i#1 ]
zp[2]:2 [ scan_for_lowest::height#2 scan_for_lowest::height#4 scan_for_lowest::height#1 ] zp[2]:2 [ scan_for_lowest::height#2 scan_for_lowest::height#4 scan_for_lowest::height#1 ]
zp[1]:4 [ scan_for_lowest::lowest#2 scan_for_lowest::lowest#4 scan_for_lowest::lowest#8 ] zp[1]:4 [ scan_for_lowest::lowest#2 scan_for_lowest::lowest#4 scan_for_lowest::lowest#8 ]
reg byte a [ scan_for_lowest::return#0 ] reg byte a [ scan_for_lowest::return#0 ]
@ -38,5 +37,4 @@ reg byte a [ main::hit_check#0 ]
reg byte x [ main::$4 ] reg byte x [ main::$4 ]
reg byte a [ main::$1 ] reg byte a [ main::$1 ]
reg byte a [ main::$2 ] reg byte a [ main::$2 ]
reg byte a [ scan_for_lowest::$3 ] reg byte x [ scan_for_lowest::$4 ]
reg byte a [ scan_for_lowest::$4 ]

View File

@ -3,6 +3,7 @@
:BasicUpstart(main) :BasicUpstart(main)
.pc = $80d "Program" .pc = $80d "Program"
main: { main: {
.label __6 = 4
.label screen = 2 .label screen = 2
lda #<$400 lda #<$400
sta.z screen sta.z screen
@ -11,10 +12,11 @@ main: {
ldx #0 ldx #0
__b1: __b1:
// i&1 // i&1
txa lda #1
and #1 sax.z __6
// (i&1)?i+3:i*4 // (i&1)?i+3:i*4
cmp #0 lda #0
cmp.z __6
bne __b2 bne __b2
txa txa
asl asl
@ -28,11 +30,9 @@ main: {
bne !+ bne !+
inc.z screen+1 inc.z screen+1
!: !:
// i&1
txa
and #1
// (i&1)?i+3:i*4 // (i&1)?i+3:i*4
cmp #0 lda #0
cmp.z __6
bne __b5 bne __b5
txa txa
asl asl

View File

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

View File

@ -190,6 +190,8 @@ Alias main::screen#3 = main::screen#5
Alias main::i#2 = main::i#5 main::i#8 Alias main::i#2 = main::i#5 main::i#8
Alias main::screen#1 = main::screen#4 Alias main::screen#1 = main::screen#4
Successful SSA optimization Pass2AliasElimination Successful SSA optimization Pass2AliasElimination
Identified duplicate assignment right side [15] (byte~) main::$6 ← (byte) main::i#2 & (byte) 1
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition (bool~) main::$13 [5] if((byte) 0!=(byte~) main::$0) goto main::@2 Simple Condition (bool~) main::$13 [5] if((byte) 0!=(byte~) main::$0) goto main::@2
Simple Condition (bool~) main::$14 [13] if((byte) 0!=(byte~) main::$6) goto main::@5 Simple Condition (bool~) main::$14 [13] if((byte) 0!=(byte~) main::$6) goto main::@5
Simple Condition (bool~) main::$12 [21] if((byte) main::i#1!=rangelast(0,2)) goto main::@1 Simple Condition (bool~) main::$12 [21] if((byte) main::i#1!=rangelast(0,2)) goto main::@1
@ -210,8 +212,10 @@ Simplifying constant integer cast 3
Successful SSA optimization PassNCastSimplification Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 3 Finalized unsigned number type (byte) 3
Successful SSA optimization PassNFinalizeNumberTypeConversions Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias main::$6 = main::$0
Successful SSA optimization Pass2AliasElimination
Rewriting multiplication to use shift [4] (byte~) main::$2 ← (byte) main::i#2 * (byte) 4 Rewriting multiplication to use shift [4] (byte~) main::$2 ← (byte) main::i#2 * (byte) 4
Rewriting multiplication to use shift [11] (byte~) main::$8 ← (byte) main::i#2 * (byte) 4 Rewriting multiplication to use shift [10] (byte~) main::$8 ← (byte) main::i#2 * (byte) 4
Successful SSA optimization Pass2MultiplyToShiftRewriting Successful SSA optimization Pass2MultiplyToShiftRewriting
Inlining constant with var siblings (const byte*) main::screen#0 Inlining constant with var siblings (const byte*) main::screen#0
Inlining constant with var siblings (const byte) main::i#0 Inlining constant with var siblings (const byte) main::i#0
@ -224,11 +228,11 @@ CALL GRAPH
Created 4 initial phi equivalence classes Created 4 initial phi equivalence classes
Coalesced [5] main::$16 ← main::$2 Coalesced [5] main::$16 ← main::$2
Coalesced [12] main::$18 ← main::$8 Coalesced [11] main::$18 ← main::$8
Coalesced [19] main::i#9 ← main::i#1 Coalesced [18] main::i#9 ← main::i#1
Coalesced [20] main::screen#10 ← main::screen#2 Coalesced [19] main::screen#10 ← main::screen#2
Coalesced [22] main::$17 ← main::$10 Coalesced [21] main::$17 ← main::$10
Coalesced [24] main::$15 ← main::$4 Coalesced [23] main::$15 ← main::$4
Coalesced down to 4 phi equivalence classes Coalesced down to 4 phi equivalence classes
Culled Empty Block (label) main::@8 Culled Empty Block (label) main::@8
Adding NOP phi() at start of main Adding NOP phi() at start of main
@ -242,8 +246,8 @@ main: scope:[main] from
main::@1: scope:[main] from main main::@7 main::@1: scope:[main] from main main::@7
[1] (byte*) main::screen#3 ← phi( main/(byte*) 1024 main::@7/(byte*) main::screen#2 ) [1] (byte*) main::screen#3 ← phi( main/(byte*) 1024 main::@7/(byte*) main::screen#2 )
[1] (byte) main::i#2 ← phi( main/(byte) 0 main::@7/(byte) main::i#1 ) [1] (byte) main::i#2 ← phi( main/(byte) 0 main::@7/(byte) main::i#1 )
[2] (byte~) main::$0 ← (byte) main::i#2 & (byte) 1 [2] (byte~) main::$6 ← (byte) main::i#2 & (byte) 1
[3] if((byte) 0!=(byte~) main::$0) goto main::@2 [3] if((byte) 0!=(byte~) main::$6) goto main::@2
to:main::@3 to:main::@3
main::@3: scope:[main] from main::@1 main::@3: scope:[main] from main::@1
[4] (byte~) main::$2 ← (byte) main::i#2 << (byte) 2 [4] (byte~) main::$2 ← (byte) main::i#2 << (byte) 2
@ -252,45 +256,43 @@ main::@4: scope:[main] from main::@2 main::@3
[5] (byte~) main::$5 ← phi( main::@2/(byte~) main::$4 main::@3/(byte~) main::$2 ) [5] (byte~) main::$5 ← phi( main::@2/(byte~) main::$4 main::@3/(byte~) main::$2 )
[6] *((byte*) main::screen#3) ← (byte~) main::$5 [6] *((byte*) main::screen#3) ← (byte~) main::$5
[7] (byte*) main::screen#1 ← ++ (byte*) main::screen#3 [7] (byte*) main::screen#1 ← ++ (byte*) main::screen#3
[8] (byte~) main::$6 ← (byte) main::i#2 & (byte) 1 [8] if((byte) 0!=(byte~) main::$6) goto main::@5
[9] if((byte) 0!=(byte~) main::$6) goto main::@5
to:main::@6 to:main::@6
main::@6: scope:[main] from main::@4 main::@6: scope:[main] from main::@4
[10] (byte~) main::$8 ← (byte) main::i#2 << (byte) 2 [9] (byte~) main::$8 ← (byte) main::i#2 << (byte) 2
to:main::@7 to:main::@7
main::@7: scope:[main] from main::@5 main::@6 main::@7: scope:[main] from main::@5 main::@6
[11] (byte~) main::$11 ← phi( main::@5/(byte~) main::$10 main::@6/(byte~) main::$8 ) [10] (byte~) main::$11 ← phi( main::@5/(byte~) main::$10 main::@6/(byte~) main::$8 )
[12] *((byte*) main::screen#1) ← (byte~) main::$11 [11] *((byte*) main::screen#1) ← (byte~) main::$11
[13] (byte*) main::screen#2 ← ++ (byte*) main::screen#1 [12] (byte*) main::screen#2 ← ++ (byte*) main::screen#1
[14] (byte) main::i#1 ← ++ (byte) main::i#2 [13] (byte) main::i#1 ← ++ (byte) main::i#2
[15] if((byte) main::i#1!=(byte) 3) goto main::@1 [14] if((byte) main::i#1!=(byte) 3) goto main::@1
to:main::@return to:main::@return
main::@return: scope:[main] from main::@7 main::@return: scope:[main] from main::@7
[16] return [15] return
to:@return to:@return
main::@5: scope:[main] from main::@4 main::@5: scope:[main] from main::@4
[17] (byte~) main::$10 ← (byte) main::i#2 + (byte) 3 [16] (byte~) main::$10 ← (byte) main::i#2 + (byte) 3
to:main::@7 to:main::@7
main::@2: scope:[main] from main::@1 main::@2: scope:[main] from main::@1
[18] (byte~) main::$4 ← (byte) main::i#2 + (byte) 3 [17] (byte~) main::$4 ← (byte) main::i#2 + (byte) 3
to:main::@4 to:main::@4
VARIABLE REGISTER WEIGHTS VARIABLE REGISTER WEIGHTS
(void()) main() (void()) main()
(byte~) main::$0 22.0
(byte~) main::$10 22.0 (byte~) main::$10 22.0
(byte~) main::$11 33.0 (byte~) main::$11 33.0
(byte~) main::$2 22.0 (byte~) main::$2 22.0
(byte~) main::$4 22.0 (byte~) main::$4 22.0
(byte~) main::$5 33.0 (byte~) main::$5 33.0
(byte~) main::$6 22.0 (byte~) main::$6 4.714285714285714
(byte~) main::$8 22.0 (byte~) main::$8 22.0
(byte) main::i (byte) main::i
(byte) main::i#1 16.5 (byte) main::i#1 16.5
(byte) main::i#2 5.866666666666666 (byte) main::i#2 5.5
(byte*) main::screen (byte*) main::screen
(byte*) main::screen#1 4.714285714285714 (byte*) main::screen#1 5.5
(byte*) main::screen#2 7.333333333333333 (byte*) main::screen#2 7.333333333333333
(byte*) main::screen#3 4.714285714285714 (byte*) main::screen#3 4.714285714285714
@ -299,24 +301,21 @@ Initial phi equivalence classes
[ main::screen#3 main::screen#2 ] [ main::screen#3 main::screen#2 ]
[ main::$5 main::$4 main::$2 ] [ main::$5 main::$4 main::$2 ]
[ main::$11 main::$10 main::$8 ] [ main::$11 main::$10 main::$8 ]
Added variable main::$0 to live range equivalence class [ main::$0 ]
Added variable main::screen#1 to live range equivalence class [ main::screen#1 ]
Added variable main::$6 to live range equivalence class [ main::$6 ] Added variable main::$6 to live range equivalence class [ main::$6 ]
Added variable main::screen#1 to live range equivalence class [ main::screen#1 ]
Complete equivalence classes Complete equivalence classes
[ main::i#2 main::i#1 ] [ main::i#2 main::i#1 ]
[ main::screen#3 main::screen#2 ] [ main::screen#3 main::screen#2 ]
[ main::$5 main::$4 main::$2 ] [ main::$5 main::$4 main::$2 ]
[ main::$11 main::$10 main::$8 ] [ main::$11 main::$10 main::$8 ]
[ main::$0 ]
[ main::screen#1 ]
[ main::$6 ] [ main::$6 ]
[ main::screen#1 ]
Allocated zp[1]:2 [ main::i#2 main::i#1 ] Allocated zp[1]:2 [ main::i#2 main::i#1 ]
Allocated zp[2]:3 [ main::screen#3 main::screen#2 ] Allocated zp[2]:3 [ main::screen#3 main::screen#2 ]
Allocated zp[1]:5 [ main::$5 main::$4 main::$2 ] Allocated zp[1]:5 [ main::$5 main::$4 main::$2 ]
Allocated zp[1]:6 [ main::$11 main::$10 main::$8 ] Allocated zp[1]:6 [ main::$11 main::$10 main::$8 ]
Allocated zp[1]:7 [ main::$0 ] Allocated zp[1]:7 [ main::$6 ]
Allocated zp[2]:8 [ main::screen#1 ] Allocated zp[2]:8 [ main::screen#1 ]
Allocated zp[1]:10 [ main::$6 ]
INITIAL ASM INITIAL ASM
Target platform is c64basic / MOS6502X Target platform is c64basic / MOS6502X
@ -329,11 +328,10 @@ Target platform is c64basic / MOS6502X
// Global Constants & labels // Global Constants & labels
// main // main
main: { main: {
.label __0 = 7
.label __2 = 5 .label __2 = 5
.label __4 = 5 .label __4 = 5
.label __5 = 5 .label __5 = 5
.label __6 = $a .label __6 = 7
.label __8 = 6 .label __8 = 6
.label __10 = 6 .label __10 = 6
.label __11 = 6 .label __11 = 6
@ -358,13 +356,13 @@ main: {
jmp __b1 jmp __b1
// main::@1 // main::@1
__b1: __b1:
// [2] (byte~) main::$0 ← (byte) main::i#2 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1 // [2] (byte~) main::$6 ← (byte) main::i#2 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1
lda #1 lda #1
and.z i and.z i
sta.z __0 sta.z __6
// [3] if((byte) 0!=(byte~) main::$0) goto main::@2 -- vbuc1_neq_vbuz1_then_la1 // [3] if((byte) 0!=(byte~) main::$6) goto main::@2 -- vbuc1_neq_vbuz1_then_la1
lda #0 lda #0
cmp.z __0 cmp.z __6
bne __b2 bne __b2
jmp __b3 jmp __b3
// main::@3 // main::@3
@ -393,34 +391,30 @@ main: {
lda.z screen_1+1 lda.z screen_1+1
adc #0 adc #0
sta.z screen+1 sta.z screen+1
// [8] (byte~) main::$6 ← (byte) main::i#2 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1 // [8] if((byte) 0!=(byte~) main::$6) goto main::@5 -- vbuc1_neq_vbuz1_then_la1
lda #1
and.z i
sta.z __6
// [9] if((byte) 0!=(byte~) main::$6) goto main::@5 -- vbuc1_neq_vbuz1_then_la1
lda #0 lda #0
cmp.z __6 cmp.z __6
bne __b5 bne __b5
jmp __b6 jmp __b6
// main::@6 // main::@6
__b6: __b6:
// [10] (byte~) main::$8 ← (byte) main::i#2 << (byte) 2 -- vbuz1=vbuz2_rol_2 // [9] (byte~) main::$8 ← (byte) main::i#2 << (byte) 2 -- vbuz1=vbuz2_rol_2
lda.z i lda.z i
asl asl
asl asl
sta.z __8 sta.z __8
// [11] phi from main::@5 main::@6 to main::@7 [phi:main::@5/main::@6->main::@7] // [10] phi from main::@5 main::@6 to main::@7 [phi:main::@5/main::@6->main::@7]
__b7_from___b5: __b7_from___b5:
__b7_from___b6: __b7_from___b6:
// [11] phi (byte~) main::$11 = (byte~) main::$10 [phi:main::@5/main::@6->main::@7#0] -- register_copy // [10] phi (byte~) main::$11 = (byte~) main::$10 [phi:main::@5/main::@6->main::@7#0] -- register_copy
jmp __b7 jmp __b7
// main::@7 // main::@7
__b7: __b7:
// [12] *((byte*) main::screen#1) ← (byte~) main::$11 -- _deref_pbuz1=vbuz2 // [11] *((byte*) main::screen#1) ← (byte~) main::$11 -- _deref_pbuz1=vbuz2
lda.z __11 lda.z __11
ldy #0 ldy #0
sta (screen),y sta (screen),y
// [13] (byte*) main::screen#2 ← ++ (byte*) main::screen#1 -- pbuz1=_inc_pbuz2 // [12] (byte*) main::screen#2 ← ++ (byte*) main::screen#1 -- pbuz1=_inc_pbuz2
lda.z screen lda.z screen
clc clc
adc #1 adc #1
@ -428,27 +422,27 @@ main: {
lda.z screen+1 lda.z screen+1
adc #0 adc #0
sta.z screen_1+1 sta.z screen_1+1
// [14] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 // [13] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1
inc.z i inc.z i
// [15] if((byte) main::i#1!=(byte) 3) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 // [14] if((byte) main::i#1!=(byte) 3) goto main::@1 -- vbuz1_neq_vbuc1_then_la1
lda #3 lda #3
cmp.z i cmp.z i
bne __b1_from___b7 bne __b1_from___b7
jmp __breturn jmp __breturn
// main::@return // main::@return
__breturn: __breturn:
// [16] return // [15] return
rts rts
// main::@5 // main::@5
__b5: __b5:
// [17] (byte~) main::$10 ← (byte) main::i#2 + (byte) 3 -- vbuz1=vbuz2_plus_vbuc1 // [16] (byte~) main::$10 ← (byte) main::i#2 + (byte) 3 -- vbuz1=vbuz2_plus_vbuc1
lax.z i lax.z i
axs #-[3] axs #-[3]
stx.z __10 stx.z __10
jmp __b7_from___b5 jmp __b7_from___b5
// main::@2 // main::@2
__b2: __b2:
// [18] (byte~) main::$4 ← (byte) main::i#2 + (byte) 3 -- vbuz1=vbuz2_plus_vbuc1 // [17] (byte~) main::$4 ← (byte) main::i#2 + (byte) 3 -- vbuz1=vbuz2_plus_vbuc1
lax.z i lax.z i
axs #-[3] axs #-[3]
stx.z __4 stx.z __4
@ -457,46 +451,45 @@ main: {
// File Data // File Data
REGISTER UPLIFT POTENTIAL REGISTERS REGISTER UPLIFT POTENTIAL REGISTERS
Statement [4] (byte~) main::$2 ← (byte) main::i#2 << (byte) 2 [ main::i#2 main::screen#3 main::$2 ] ( [ main::i#2 main::screen#3 main::$2 ] { } ) always clobbers reg byte a Statement [4] (byte~) main::$2 ← (byte) main::i#2 << (byte) 2 [ main::i#2 main::screen#3 main::$6 main::$2 ] ( [ main::i#2 main::screen#3 main::$6 main::$2 ] { } ) 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]:2 [ main::i#2 main::i#1 ]
Statement [6] *((byte*) main::screen#3) ← (byte~) main::$5 [ main::i#2 main::screen#3 ] ( [ main::i#2 main::screen#3 ] { } ) always clobbers reg byte y Removing always clobbered register reg byte a as potential for zp[1]:7 [ main::$6 ]
Statement [6] *((byte*) main::screen#3) ← (byte~) main::$5 [ main::i#2 main::screen#3 main::$6 ] ( [ main::i#2 main::screen#3 main::$6 ] { } ) 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]:2 [ main::i#2 main::i#1 ]
Statement [7] (byte*) main::screen#1 ← ++ (byte*) main::screen#3 [ main::i#2 main::screen#1 ] ( [ main::i#2 main::screen#1 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte y as potential for zp[1]:7 [ main::$6 ]
Statement [8] (byte~) main::$6 ← (byte) main::i#2 & (byte) 1 [ main::i#2 main::screen#1 main::$6 ] ( [ main::i#2 main::screen#1 main::$6 ] { } ) always clobbers reg byte a Statement [7] (byte*) main::screen#1 ← ++ (byte*) main::screen#3 [ main::i#2 main::$6 main::screen#1 ] ( [ main::i#2 main::$6 main::screen#1 ] { } ) always clobbers reg byte a
Statement [10] (byte~) main::$8 ← (byte) main::i#2 << (byte) 2 [ main::i#2 main::screen#1 main::$8 ] ( [ main::i#2 main::screen#1 main::$8 ] { } ) always clobbers reg byte a Statement [9] (byte~) main::$8 ← (byte) main::i#2 << (byte) 2 [ main::i#2 main::screen#1 main::$8 ] ( [ main::i#2 main::screen#1 main::$8 ] { } ) always clobbers reg byte a
Statement [12] *((byte*) main::screen#1) ← (byte~) main::$11 [ main::i#2 main::screen#1 ] ( [ main::i#2 main::screen#1 ] { } ) always clobbers reg byte y Statement [11] *((byte*) main::screen#1) ← (byte~) main::$11 [ main::i#2 main::screen#1 ] ( [ main::i#2 main::screen#1 ] { } ) always clobbers reg byte y
Statement [13] (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 [12] (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 [17] (byte~) main::$10 ← (byte) main::i#2 + (byte) 3 [ main::i#2 main::screen#1 main::$10 ] ( [ main::i#2 main::screen#1 main::$10 ] { } ) always clobbers reg byte a Statement [16] (byte~) main::$10 ← (byte) main::i#2 + (byte) 3 [ main::i#2 main::screen#1 main::$10 ] ( [ main::i#2 main::screen#1 main::$10 ] { } ) always clobbers reg byte a
Statement [18] (byte~) main::$4 ← (byte) main::i#2 + (byte) 3 [ main::i#2 main::screen#3 main::$4 ] ( [ main::i#2 main::screen#3 main::$4 ] { } ) always clobbers reg byte a Statement [17] (byte~) main::$4 ← (byte) main::i#2 + (byte) 3 [ main::i#2 main::screen#3 main::$6 main::$4 ] ( [ main::i#2 main::screen#3 main::$6 main::$4 ] { } ) always clobbers reg byte a
Statement [2] (byte~) main::$0 ← (byte) main::i#2 & (byte) 1 [ main::i#2 main::screen#3 main::$0 ] ( [ main::i#2 main::screen#3 main::$0 ] { } ) always clobbers reg byte a Statement [2] (byte~) main::$6 ← (byte) main::i#2 & (byte) 1 [ main::i#2 main::screen#3 main::$6 ] ( [ main::i#2 main::screen#3 main::$6 ] { } ) always clobbers reg byte a
Statement [4] (byte~) main::$2 ← (byte) main::i#2 << (byte) 2 [ main::i#2 main::screen#3 main::$2 ] ( [ main::i#2 main::screen#3 main::$2 ] { } ) always clobbers reg byte a Statement [4] (byte~) main::$2 ← (byte) main::i#2 << (byte) 2 [ main::i#2 main::screen#3 main::$6 main::$2 ] ( [ main::i#2 main::screen#3 main::$6 main::$2 ] { } ) always clobbers reg byte a
Statement [6] *((byte*) main::screen#3) ← (byte~) main::$5 [ main::i#2 main::screen#3 ] ( [ main::i#2 main::screen#3 ] { } ) always clobbers reg byte y Statement [6] *((byte*) main::screen#3) ← (byte~) main::$5 [ main::i#2 main::screen#3 main::$6 ] ( [ main::i#2 main::screen#3 main::$6 ] { } ) always clobbers reg byte y
Statement [7] (byte*) main::screen#1 ← ++ (byte*) main::screen#3 [ main::i#2 main::screen#1 ] ( [ main::i#2 main::screen#1 ] { } ) always clobbers reg byte a Statement [7] (byte*) main::screen#1 ← ++ (byte*) main::screen#3 [ main::i#2 main::$6 main::screen#1 ] ( [ main::i#2 main::$6 main::screen#1 ] { } ) always clobbers reg byte a
Statement [8] (byte~) main::$6 ← (byte) main::i#2 & (byte) 1 [ main::i#2 main::screen#1 main::$6 ] ( [ main::i#2 main::screen#1 main::$6 ] { } ) always clobbers reg byte a Statement [9] (byte~) main::$8 ← (byte) main::i#2 << (byte) 2 [ main::i#2 main::screen#1 main::$8 ] ( [ main::i#2 main::screen#1 main::$8 ] { } ) always clobbers reg byte a
Statement [10] (byte~) main::$8 ← (byte) main::i#2 << (byte) 2 [ main::i#2 main::screen#1 main::$8 ] ( [ main::i#2 main::screen#1 main::$8 ] { } ) always clobbers reg byte a Statement [11] *((byte*) main::screen#1) ← (byte~) main::$11 [ main::i#2 main::screen#1 ] ( [ main::i#2 main::screen#1 ] { } ) always clobbers reg byte y
Statement [12] *((byte*) main::screen#1) ← (byte~) main::$11 [ main::i#2 main::screen#1 ] ( [ main::i#2 main::screen#1 ] { } ) always clobbers reg byte y Statement [12] (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 [13] (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 [16] (byte~) main::$10 ← (byte) main::i#2 + (byte) 3 [ main::i#2 main::screen#1 main::$10 ] ( [ main::i#2 main::screen#1 main::$10 ] { } ) always clobbers reg byte a
Statement [17] (byte~) main::$10 ← (byte) main::i#2 + (byte) 3 [ main::i#2 main::screen#1 main::$10 ] ( [ main::i#2 main::screen#1 main::$10 ] { } ) always clobbers reg byte a Statement [17] (byte~) main::$4 ← (byte) main::i#2 + (byte) 3 [ main::i#2 main::screen#3 main::$6 main::$4 ] ( [ main::i#2 main::screen#3 main::$6 main::$4 ] { } ) always clobbers reg byte a
Statement [18] (byte~) main::$4 ← (byte) main::i#2 + (byte) 3 [ main::i#2 main::screen#3 main::$4 ] ( [ main::i#2 main::screen#3 main::$4 ] { } ) 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[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[2]:3 [ main::screen#3 main::screen#2 ] : zp[2]:3 ,
Potential registers zp[1]:5 [ main::$5 main::$4 main::$2 ] : zp[1]:5 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:5 [ main::$5 main::$4 main::$2 ] : zp[1]:5 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:6 [ main::$11 main::$10 main::$8 ] : zp[1]:6 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:6 [ main::$11 main::$10 main::$8 ] : zp[1]:6 , reg byte a , reg byte x , reg byte y ,
Potential registers zp[1]:7 [ main::$0 ] : zp[1]:7 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:7 [ main::$6 ] : zp[1]:7 , reg byte x ,
Potential registers zp[2]:8 [ main::screen#1 ] : zp[2]:8 , Potential registers zp[2]:8 [ main::screen#1 ] : zp[2]:8 ,
Potential registers zp[1]:10 [ main::$6 ] : zp[1]:10 , reg byte a , reg byte x , reg byte y ,
REGISTER UPLIFT SCOPES REGISTER UPLIFT SCOPES
Uplift Scope [main] 77: zp[1]:5 [ main::$5 main::$4 main::$2 ] 77: zp[1]:6 [ main::$11 main::$10 main::$8 ] 22.37: zp[1]:2 [ main::i#2 main::i#1 ] 22: zp[1]:7 [ main::$0 ] 22: zp[1]:10 [ main::$6 ] 12.05: zp[2]:3 [ main::screen#3 main::screen#2 ] 4.71: zp[2]:8 [ main::screen#1 ] Uplift Scope [main] 77: zp[1]:5 [ main::$5 main::$4 main::$2 ] 77: zp[1]:6 [ main::$11 main::$10 main::$8 ] 22: zp[1]:2 [ main::i#2 main::i#1 ] 12.05: zp[2]:3 [ main::screen#3 main::screen#2 ] 5.5: zp[2]:8 [ main::screen#1 ] 4.71: zp[1]:7 [ main::$6 ]
Uplift Scope [] Uplift Scope []
Uplifting [main] best 1431 combination reg byte a [ main::$5 main::$4 main::$2 ] reg byte a [ main::$11 main::$10 main::$8 ] reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::$0 ] zp[1]:10 [ main::$6 ] zp[2]:3 [ main::screen#3 main::screen#2 ] zp[2]:8 [ main::screen#1 ] Uplifting [main] best 1421 combination reg byte a [ main::$5 main::$4 main::$2 ] reg byte a [ main::$11 main::$10 main::$8 ] 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]:7 [ main::$6 ]
Limited combination testing to 100 combinations of 512 possible. Uplifting [] best 1421 combination
Uplifting [] best 1431 combination Attempting to uplift remaining variables inzp[1]:7 [ main::$6 ]
Attempting to uplift remaining variables inzp[1]:10 [ main::$6 ] Uplifting [main] best 1421 combination zp[1]:7 [ main::$6 ]
Uplifting [main] best 1391 combination reg byte a [ main::$6 ]
Coalescing zero page register [ zp[2]:3 [ main::screen#3 main::screen#2 ] ] with [ zp[2]:8 [ main::screen#1 ] ] - score: 2 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[2]:3) zp[2]:2 [ main::screen#3 main::screen#2 main::screen#1 ]
Allocated (was zp[1]:7) zp[1]:4 [ main::$6 ]
ASSEMBLER BEFORE OPTIMIZATION ASSEMBLER BEFORE OPTIMIZATION
// File Comments // File Comments
@ -508,6 +501,7 @@ ASSEMBLER BEFORE OPTIMIZATION
// Global Constants & labels // Global Constants & labels
// main // main
main: { main: {
.label __6 = 4
.label screen = 2 .label screen = 2
// [1] phi from main to main::@1 [phi:main->main::@1] // [1] phi from main to main::@1 [phi:main->main::@1]
__b1_from_main: __b1_from_main:
@ -526,11 +520,12 @@ main: {
jmp __b1 jmp __b1
// main::@1 // main::@1
__b1: __b1:
// [2] (byte~) main::$0 ← (byte) main::i#2 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1 // [2] (byte~) main::$6 ← (byte) main::i#2 & (byte) 1 -- vbuz1=vbuxx_band_vbuc1
txa lda #1
and #1 sax.z __6
// [3] if((byte) 0!=(byte~) main::$0) goto main::@2 -- vbuc1_neq_vbuaa_then_la1 // [3] if((byte) 0!=(byte~) main::$6) goto main::@2 -- vbuc1_neq_vbuz1_then_la1
cmp #0 lda #0
cmp.z __6
bne __b2 bne __b2
jmp __b3 jmp __b3
// main::@3 // main::@3
@ -554,54 +549,52 @@ main: {
bne !+ bne !+
inc.z screen+1 inc.z screen+1
!: !:
// [8] (byte~) main::$6 ← (byte) main::i#2 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1 // [8] if((byte) 0!=(byte~) main::$6) goto main::@5 -- vbuc1_neq_vbuz1_then_la1
txa lda #0
and #1 cmp.z __6
// [9] if((byte) 0!=(byte~) main::$6) goto main::@5 -- vbuc1_neq_vbuaa_then_la1
cmp #0
bne __b5 bne __b5
jmp __b6 jmp __b6
// main::@6 // main::@6
__b6: __b6:
// [10] (byte~) main::$8 ← (byte) main::i#2 << (byte) 2 -- vbuaa=vbuxx_rol_2 // [9] (byte~) main::$8 ← (byte) main::i#2 << (byte) 2 -- vbuaa=vbuxx_rol_2
txa txa
asl asl
asl asl
// [11] phi from main::@5 main::@6 to main::@7 [phi:main::@5/main::@6->main::@7] // [10] phi from main::@5 main::@6 to main::@7 [phi:main::@5/main::@6->main::@7]
__b7_from___b5: __b7_from___b5:
__b7_from___b6: __b7_from___b6:
// [11] phi (byte~) main::$11 = (byte~) main::$10 [phi:main::@5/main::@6->main::@7#0] -- register_copy // [10] phi (byte~) main::$11 = (byte~) main::$10 [phi:main::@5/main::@6->main::@7#0] -- register_copy
jmp __b7 jmp __b7
// main::@7 // main::@7
__b7: __b7:
// [12] *((byte*) main::screen#1) ← (byte~) main::$11 -- _deref_pbuz1=vbuaa // [11] *((byte*) main::screen#1) ← (byte~) main::$11 -- _deref_pbuz1=vbuaa
ldy #0 ldy #0
sta (screen),y sta (screen),y
// [13] (byte*) main::screen#2 ← ++ (byte*) main::screen#1 -- pbuz1=_inc_pbuz1 // [12] (byte*) main::screen#2 ← ++ (byte*) main::screen#1 -- pbuz1=_inc_pbuz1
inc.z screen inc.z screen
bne !+ bne !+
inc.z screen+1 inc.z screen+1
!: !:
// [14] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx // [13] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx
inx inx
// [15] if((byte) main::i#1!=(byte) 3) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 // [14] if((byte) main::i#1!=(byte) 3) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
cpx #3 cpx #3
bne __b1_from___b7 bne __b1_from___b7
jmp __breturn jmp __breturn
// main::@return // main::@return
__breturn: __breturn:
// [16] return // [15] return
rts rts
// main::@5 // main::@5
__b5: __b5:
// [17] (byte~) main::$10 ← (byte) main::i#2 + (byte) 3 -- vbuaa=vbuxx_plus_vbuc1 // [16] (byte~) main::$10 ← (byte) main::i#2 + (byte) 3 -- vbuaa=vbuxx_plus_vbuc1
txa txa
clc clc
adc #3 adc #3
jmp __b7_from___b5 jmp __b7_from___b5
// main::@2 // main::@2
__b2: __b2:
// [18] (byte~) main::$4 ← (byte) main::i#2 + (byte) 3 -- vbuaa=vbuxx_plus_vbuc1 // [17] (byte~) main::$4 ← (byte) main::i#2 + (byte) 3 -- vbuaa=vbuxx_plus_vbuc1
txa txa
clc clc
adc #3 adc #3
@ -636,13 +629,12 @@ Succesful ASM optimization Pass5NextJumpElimination
FINAL SYMBOL TABLE FINAL SYMBOL TABLE
(void()) main() (void()) main()
(byte~) main::$0 reg byte a 22.0
(byte~) main::$10 reg byte a 22.0 (byte~) main::$10 reg byte a 22.0
(byte~) main::$11 reg byte a 33.0 (byte~) main::$11 reg byte a 33.0
(byte~) main::$2 reg byte a 22.0 (byte~) main::$2 reg byte a 22.0
(byte~) main::$4 reg byte a 22.0 (byte~) main::$4 reg byte a 22.0
(byte~) main::$5 reg byte a 33.0 (byte~) main::$5 reg byte a 33.0
(byte~) main::$6 reg byte a 22.0 (byte~) main::$6 zp[1]:4 4.714285714285714
(byte~) main::$8 reg byte a 22.0 (byte~) main::$8 reg byte a 22.0
(label) main::@1 (label) main::@1
(label) main::@2 (label) main::@2
@ -654,9 +646,9 @@ FINAL SYMBOL TABLE
(label) main::@return (label) main::@return
(byte) main::i (byte) main::i
(byte) main::i#1 reg byte x 16.5 (byte) main::i#1 reg byte x 16.5
(byte) main::i#2 reg byte x 5.866666666666666 (byte) main::i#2 reg byte x 5.5
(byte*) main::screen (byte*) main::screen
(byte*) main::screen#1 screen zp[2]:2 4.714285714285714 (byte*) main::screen#1 screen zp[2]:2 5.5
(byte*) main::screen#2 screen zp[2]:2 7.333333333333333 (byte*) main::screen#2 screen zp[2]:2 7.333333333333333
(byte*) main::screen#3 screen zp[2]:2 4.714285714285714 (byte*) main::screen#3 screen zp[2]:2 4.714285714285714
@ -664,12 +656,11 @@ reg byte x [ main::i#2 main::i#1 ]
zp[2]:2 [ main::screen#3 main::screen#2 main::screen#1 ] zp[2]:2 [ main::screen#3 main::screen#2 main::screen#1 ]
reg byte a [ main::$5 main::$4 main::$2 ] reg byte a [ main::$5 main::$4 main::$2 ]
reg byte a [ main::$11 main::$10 main::$8 ] reg byte a [ main::$11 main::$10 main::$8 ]
reg byte a [ main::$0 ] zp[1]:4 [ main::$6 ]
reg byte a [ main::$6 ]
FINAL ASSEMBLER FINAL ASSEMBLER
Score: 1071 Score: 1101
// File Comments // File Comments
// Tests optimization of identical sub-expressions // Tests optimization of identical sub-expressions
@ -680,6 +671,7 @@ Score: 1071
// Global Constants & labels // Global Constants & labels
// main // main
main: { main: {
.label __6 = 4
.label screen = 2 .label screen = 2
// [1] phi from main to main::@1 [phi:main->main::@1] // [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 // [1] phi (byte*) main::screen#3 = (byte*) 1024 [phi:main->main::@1#0] -- pbuz1=pbuc1
@ -695,12 +687,13 @@ main: {
// main::@1 // main::@1
__b1: __b1:
// i&1 // i&1
// [2] (byte~) main::$0 ← (byte) main::i#2 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1 // [2] (byte~) main::$6 ← (byte) main::i#2 & (byte) 1 -- vbuz1=vbuxx_band_vbuc1
txa lda #1
and #1 sax.z __6
// (i&1)?i+3:i*4 // (i&1)?i+3:i*4
// [3] if((byte) 0!=(byte~) main::$0) goto main::@2 -- vbuc1_neq_vbuaa_then_la1 // [3] if((byte) 0!=(byte~) main::$6) goto main::@2 -- vbuc1_neq_vbuz1_then_la1
cmp #0 lda #0
cmp.z __6
bne __b2 bne __b2
// main::@3 // main::@3
// [4] (byte~) main::$2 ← (byte) main::i#2 << (byte) 2 -- vbuaa=vbuxx_rol_2 // [4] (byte~) main::$2 ← (byte) main::i#2 << (byte) 2 -- vbuaa=vbuxx_rol_2
@ -721,54 +714,51 @@ main: {
bne !+ bne !+
inc.z screen+1 inc.z screen+1
!: !:
// i&1
// [8] (byte~) main::$6 ← (byte) main::i#2 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1
txa
and #1
// (i&1)?i+3:i*4 // (i&1)?i+3:i*4
// [9] if((byte) 0!=(byte~) main::$6) goto main::@5 -- vbuc1_neq_vbuaa_then_la1 // [8] if((byte) 0!=(byte~) main::$6) goto main::@5 -- vbuc1_neq_vbuz1_then_la1
cmp #0 lda #0
cmp.z __6
bne __b5 bne __b5
// main::@6 // main::@6
// [10] (byte~) main::$8 ← (byte) main::i#2 << (byte) 2 -- vbuaa=vbuxx_rol_2 // [9] (byte~) main::$8 ← (byte) main::i#2 << (byte) 2 -- vbuaa=vbuxx_rol_2
txa txa
asl asl
asl asl
// [11] phi from main::@5 main::@6 to main::@7 [phi:main::@5/main::@6->main::@7] // [10] phi from main::@5 main::@6 to main::@7 [phi:main::@5/main::@6->main::@7]
// [11] phi (byte~) main::$11 = (byte~) main::$10 [phi:main::@5/main::@6->main::@7#0] -- register_copy // [10] phi (byte~) main::$11 = (byte~) main::$10 [phi:main::@5/main::@6->main::@7#0] -- register_copy
// main::@7 // main::@7
__b7: __b7:
// *screen++ = (i&1)?i+3:i*4 // *screen++ = (i&1)?i+3:i*4
// [12] *((byte*) main::screen#1) ← (byte~) main::$11 -- _deref_pbuz1=vbuaa // [11] *((byte*) main::screen#1) ← (byte~) main::$11 -- _deref_pbuz1=vbuaa
ldy #0 ldy #0
sta (screen),y sta (screen),y
// *screen++ = (i&1)?i+3:i*4; // *screen++ = (i&1)?i+3:i*4;
// [13] (byte*) main::screen#2 ← ++ (byte*) main::screen#1 -- pbuz1=_inc_pbuz1 // [12] (byte*) main::screen#2 ← ++ (byte*) main::screen#1 -- pbuz1=_inc_pbuz1
inc.z screen inc.z screen
bne !+ bne !+
inc.z screen+1 inc.z screen+1
!: !:
// for( byte i: 0..2) // for( byte i: 0..2)
// [14] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx // [13] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx
inx inx
// [15] if((byte) main::i#1!=(byte) 3) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 // [14] if((byte) main::i#1!=(byte) 3) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
cpx #3 cpx #3
bne __b1 bne __b1
// main::@return // main::@return
// } // }
// [16] return // [15] return
rts rts
// main::@5 // main::@5
__b5: __b5:
// (i&1)?i+3:i*4 // (i&1)?i+3:i*4
// [17] (byte~) main::$10 ← (byte) main::i#2 + (byte) 3 -- vbuaa=vbuxx_plus_vbuc1 // [16] (byte~) main::$10 ← (byte) main::i#2 + (byte) 3 -- vbuaa=vbuxx_plus_vbuc1
txa txa
clc clc
adc #3 adc #3
jmp __b7 jmp __b7
// main::@2 // main::@2
__b2: __b2:
// [18] (byte~) main::$4 ← (byte) main::i#2 + (byte) 3 -- vbuaa=vbuxx_plus_vbuc1 // [17] (byte~) main::$4 ← (byte) main::i#2 + (byte) 3 -- vbuaa=vbuxx_plus_vbuc1
txa txa
clc clc
adc #3 adc #3

View File

@ -1,11 +1,10 @@
(void()) main() (void()) main()
(byte~) main::$0 reg byte a 22.0
(byte~) main::$10 reg byte a 22.0 (byte~) main::$10 reg byte a 22.0
(byte~) main::$11 reg byte a 33.0 (byte~) main::$11 reg byte a 33.0
(byte~) main::$2 reg byte a 22.0 (byte~) main::$2 reg byte a 22.0
(byte~) main::$4 reg byte a 22.0 (byte~) main::$4 reg byte a 22.0
(byte~) main::$5 reg byte a 33.0 (byte~) main::$5 reg byte a 33.0
(byte~) main::$6 reg byte a 22.0 (byte~) main::$6 zp[1]:4 4.714285714285714
(byte~) main::$8 reg byte a 22.0 (byte~) main::$8 reg byte a 22.0
(label) main::@1 (label) main::@1
(label) main::@2 (label) main::@2
@ -17,9 +16,9 @@
(label) main::@return (label) main::@return
(byte) main::i (byte) main::i
(byte) main::i#1 reg byte x 16.5 (byte) main::i#1 reg byte x 16.5
(byte) main::i#2 reg byte x 5.866666666666666 (byte) main::i#2 reg byte x 5.5
(byte*) main::screen (byte*) main::screen
(byte*) main::screen#1 screen zp[2]:2 4.714285714285714 (byte*) main::screen#1 screen zp[2]:2 5.5
(byte*) main::screen#2 screen zp[2]:2 7.333333333333333 (byte*) main::screen#2 screen zp[2]:2 7.333333333333333
(byte*) main::screen#3 screen zp[2]:2 4.714285714285714 (byte*) main::screen#3 screen zp[2]:2 4.714285714285714
@ -27,5 +26,4 @@ reg byte x [ main::i#2 main::i#1 ]
zp[2]:2 [ main::screen#3 main::screen#2 main::screen#1 ] zp[2]:2 [ main::screen#3 main::screen#2 main::screen#1 ]
reg byte a [ main::$5 main::$4 main::$2 ] reg byte a [ main::$5 main::$4 main::$2 ]
reg byte a [ main::$11 main::$10 main::$8 ] reg byte a [ main::$11 main::$10 main::$8 ]
reg byte a [ main::$0 ] zp[1]:4 [ main::$6 ]
reg byte a [ main::$6 ]