mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-04-08 14:37:40 +00:00
Fixed problem with post-increment sometimes happening to early when evaluating conditions. Closes #388
This commit is contained in:
parent
b4787eb45c
commit
2de71b4cd1
@ -1175,15 +1175,12 @@ public class Pass0GenerateStatementSequence extends KickCParserBaseVisitor<Objec
|
||||
public Void visitStmtIfElse(KickCParser.StmtIfElseContext ctx) {
|
||||
KickCParser.StmtContext ifStmt = ctx.stmt(0);
|
||||
KickCParser.StmtContext elseStmt = ctx.stmt(1);
|
||||
PrePostModifierHandler.addPreModifiers(this, ctx.commaExpr(), StatementSource.ifThen(ctx));
|
||||
RValue rValue = (RValue) this.visit(ctx.commaExpr());
|
||||
RValue rValue = addCondition(ctx.commaExpr(), StatementSource.ifThen(ctx));
|
||||
List<Comment> comments = ensureUnusedComments(getCommentsSymbol(ctx));
|
||||
|
||||
if(elseStmt == null) {
|
||||
// If without else - skip the entire section if condition not met
|
||||
SymbolVariableRef notExprVar = getCurrentScope().addVariableIntermediate().getRef();
|
||||
sequence.addStatement(new StatementAssignment((LValue) notExprVar, null, Operators.LOGIC_NOT, rValue, true, StatementSource.ifThen(ctx), comments));
|
||||
PrePostModifierHandler.addPostModifiers(this, ctx.commaExpr(), StatementSource.ifThen(ctx));
|
||||
Label endJumpLabel = getCurrentScope().addLabelIntermediate();
|
||||
sequence.addStatement(new StatementConditionalJump(notExprVar, endJumpLabel.getRef(), StatementSource.ifThen(ctx), Comment.NO_COMMENTS));
|
||||
this.visit(ifStmt);
|
||||
@ -1191,7 +1188,6 @@ public class Pass0GenerateStatementSequence extends KickCParserBaseVisitor<Objec
|
||||
sequence.addStatement(new StatementLabel(endJumpLabel.getRef(), StatementSource.ifThen(ctx), Comment.NO_COMMENTS));
|
||||
} else {
|
||||
// If with else - jump to if section if condition met - fall into else otherwise.
|
||||
PrePostModifierHandler.addPostModifiers(this, ctx.commaExpr(), StatementSource.ifThen(ctx));
|
||||
Label ifJumpLabel = getCurrentScope().addLabelIntermediate();
|
||||
sequence.addStatement(new StatementConditionalJump(rValue, ifJumpLabel.getRef(), StatementSource.ifThen(ctx), comments));
|
||||
// Add else body
|
||||
@ -1270,9 +1266,7 @@ public class Pass0GenerateStatementSequence extends KickCParserBaseVisitor<Objec
|
||||
List<Comment> comments = ensureUnusedComments(getCommentsSymbol(ctx));
|
||||
StatementLabel beginJumpTarget = new StatementLabel(beginJumpLabel.getRef(), StatementSource.whileDo(ctx), comments);
|
||||
sequence.addStatement(beginJumpTarget);
|
||||
PrePostModifierHandler.addPreModifiers(this, ctx.commaExpr(), StatementSource.whileDo(ctx));
|
||||
RValue rValue = (RValue) this.visit(ctx.commaExpr());
|
||||
PrePostModifierHandler.addPostModifiers(this, ctx.commaExpr(), StatementSource.whileDo(ctx));
|
||||
RValue rValue = addCondition(ctx.commaExpr(), StatementSource.whileDo(ctx));
|
||||
StatementConditionalJump doJmpStmt = new StatementConditionalJump(rValue, doJumpLabel.getRef(), StatementSource.whileDo(ctx), Comment.NO_COMMENTS);
|
||||
sequence.addStatement(doJmpStmt);
|
||||
Statement endJmpStmt = new StatementJump(endJumpLabel.getRef(), StatementSource.whileDo(ctx), Comment.NO_COMMENTS);
|
||||
@ -1293,6 +1287,31 @@ public class Pass0GenerateStatementSequence extends KickCParserBaseVisitor<Objec
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add code to evaluate a comma-expr condition (used in while/for/...).
|
||||
* @param conditionCtx The comma-expr condition to evaluate
|
||||
* @param statementSource The statement source used for errors
|
||||
* @return The RValue of the condition
|
||||
*/
|
||||
private RValue addCondition(KickCParser.CommaExprContext conditionCtx, StatementSource statementSource) {
|
||||
// Add any pre-modifiers
|
||||
PrePostModifierHandler.addPreModifiers(this, conditionCtx, statementSource);
|
||||
RValue rValue = (RValue) this.visit(conditionCtx);
|
||||
// Add any post-modifiers
|
||||
if(PrePostModifierHandler.hasPrePostModifiers(this, conditionCtx, statementSource)) {
|
||||
// If modifiers are present the RValue must be assigned before the post-modifier is executed
|
||||
if(!(rValue instanceof VariableRef)) {
|
||||
// Make a new temporary variable and assign that
|
||||
Variable tmpVar = getCurrentScope().addVariableIntermediate();
|
||||
Statement stmtExpr = new StatementAssignment(tmpVar.getVariableRef(), rValue, true, statementSource, Comment.NO_COMMENTS);
|
||||
sequence.addStatement(stmtExpr);
|
||||
rValue = tmpVar.getRef();
|
||||
}
|
||||
PrePostModifierHandler.addPostModifiers(this, conditionCtx, statementSource);
|
||||
}
|
||||
return rValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void visitStmtDoWhile(KickCParser.StmtDoWhileContext ctx) {
|
||||
// Create the block scope early - to keep all statements of the loop inside it
|
||||
@ -1305,9 +1324,7 @@ public class Pass0GenerateStatementSequence extends KickCParserBaseVisitor<Objec
|
||||
sequence.addStatement(beginJumpTarget);
|
||||
addLoopBody(ctx.stmt());
|
||||
addLoopContinueLabel(loopStack.peek(), ctx);
|
||||
PrePostModifierHandler.addPreModifiers(this, ctx.commaExpr(), StatementSource.doWhile(ctx));
|
||||
RValue rValue = (RValue) this.visit(ctx.commaExpr());
|
||||
PrePostModifierHandler.addPostModifiers(this, ctx.commaExpr(), StatementSource.doWhile(ctx));
|
||||
RValue rValue = addCondition(ctx.commaExpr(), StatementSource.doWhile(ctx));
|
||||
StatementConditionalJump doJmpStmt = new StatementConditionalJump(rValue, beginJumpLabel.getRef(), StatementSource.doWhile(ctx), Comment.NO_COMMENTS);
|
||||
sequence.addStatement(doJmpStmt);
|
||||
addDirectives(doJmpStmt, ctx.directive());
|
||||
@ -1333,9 +1350,7 @@ public class Pass0GenerateStatementSequence extends KickCParserBaseVisitor<Objec
|
||||
List<Comment> comments = ensureUnusedComments(getCommentsSymbol(ctx));
|
||||
// TODO: Add comments to next stmt
|
||||
// Evaluate the switch-expression
|
||||
PrePostModifierHandler.addPreModifiers(this, ctx.commaExpr(), StatementSource.switchExpr(ctx));
|
||||
RValue eValue = (RValue) this.visit(ctx.commaExpr());
|
||||
PrePostModifierHandler.addPostModifiers(this, ctx.commaExpr(), StatementSource.switchExpr(ctx));
|
||||
RValue eValue = addCondition(ctx.commaExpr(), StatementSource.switchExpr(ctx));
|
||||
// Add case conditional jumps
|
||||
List<SwitchCaseBody> caseBodies = new ArrayList<>();
|
||||
for(KickCParser.SwitchCaseContext caseContext : ctx.switchCases().switchCase()) {
|
||||
@ -1409,10 +1424,7 @@ public class Pass0GenerateStatementSequence extends KickCParserBaseVisitor<Objec
|
||||
StatementLabel repeatTarget = new StatementLabel(beginJumpLabel.getRef(), StatementSource.forClassic(ctx), comments);
|
||||
sequence.addStatement(repeatTarget);
|
||||
// Add condition
|
||||
KickCParser.CommaExprContext conditionCtx = ctx.commaExpr(0);
|
||||
PrePostModifierHandler.addPreModifiers(this, conditionCtx, StatementSource.forClassic(ctx));
|
||||
RValue rValue = (RValue) this.visit(conditionCtx);
|
||||
PrePostModifierHandler.addPostModifiers(this, conditionCtx, StatementSource.forClassic(ctx));
|
||||
RValue rValue = addCondition(ctx.commaExpr(0), StatementSource.forClassic(ctx));
|
||||
// Add jump if condition was met
|
||||
StatementConditionalJump doJmpStmt = new StatementConditionalJump(rValue, doJumpLabel.getRef(), StatementSource.forClassic(ctx), Comment.NO_COMMENTS);
|
||||
sequence.addStatement(doJmpStmt);
|
||||
@ -1426,9 +1438,7 @@ public class Pass0GenerateStatementSequence extends KickCParserBaseVisitor<Objec
|
||||
addLoopContinueLabel(loopStack.peek(), ctx);
|
||||
KickCParser.CommaExprContext incrementCtx = ctx.commaExpr(1);
|
||||
if(incrementCtx != null) {
|
||||
PrePostModifierHandler.addPreModifiers(this, incrementCtx, StatementSource.forClassic(ctx));
|
||||
this.visit(incrementCtx);
|
||||
PrePostModifierHandler.addPostModifiers(this, incrementCtx, StatementSource.forClassic(ctx));
|
||||
addCondition(incrementCtx, StatementSource.forClassic(ctx));
|
||||
}
|
||||
// Jump back to beginning
|
||||
Statement beginJmpStmt = new StatementJump(beginJumpLabel.getRef(), StatementSource.forClassic(ctx), Comment.NO_COMMENTS);
|
||||
|
@ -2116,8 +2116,8 @@ play_collision::@2: scope:[play_collision] from play_collision::@1 play_collisi
|
||||
(byte) play_collision::i#2 ← phi( play_collision::@1/(byte) play_collision::i#3 play_collision::@3/(byte) play_collision::i#4 )
|
||||
(byte*) play_collision::piece_gfx#1 ← phi( play_collision::@1/(byte*) play_collision::piece_gfx#2 play_collision::@3/(byte*) play_collision::piece_gfx#3 )
|
||||
(bool~) play_collision::$1 ← *((byte*) play_collision::piece_gfx#1 + (byte) play_collision::i#2) != (number) 0
|
||||
(bool~) play_collision::$2 ← ! (bool~) play_collision::$1
|
||||
(byte) play_collision::i#1 ← ++ (byte) play_collision::i#2
|
||||
(bool~) play_collision::$2 ← ! (bool~) play_collision::$1
|
||||
if((bool~) play_collision::$2) goto play_collision::@3
|
||||
to:play_collision::@14
|
||||
play_collision::@3: scope:[play_collision] from play_collision::@2 play_collision::@6
|
||||
@ -2252,8 +2252,8 @@ play_lock_current::@2: scope:[play_lock_current] from play_lock_current::@1 pla
|
||||
(byte) play_lock_current::i#2 ← phi( play_lock_current::@1/(byte) play_lock_current::i#3 play_lock_current::@3/(byte) play_lock_current::i#4 )
|
||||
(byte*) current_piece_gfx#22 ← phi( play_lock_current::@1/(byte*) current_piece_gfx#39 play_lock_current::@3/(byte*) current_piece_gfx#40 )
|
||||
(bool~) play_lock_current::$0 ← *((byte*) current_piece_gfx#22 + (byte) play_lock_current::i#2) != (number) 0
|
||||
(bool~) play_lock_current::$1 ← ! (bool~) play_lock_current::$0
|
||||
(byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2
|
||||
(bool~) play_lock_current::$1 ← ! (bool~) play_lock_current::$0
|
||||
if((bool~) play_lock_current::$1) goto play_lock_current::@3
|
||||
to:play_lock_current::@4
|
||||
play_lock_current::@3: scope:[play_lock_current] from play_lock_current::@2 play_lock_current::@4
|
||||
@ -6878,12 +6878,12 @@ Inversing boolean not [744] (bool~) play_move_leftright::$10 ← (byte~) play_mo
|
||||
Inversing boolean not [748] (bool~) play_move_leftright::$2 ← (byte) play_move_leftright::key_event#2 != (const nomodify byte) KEY_DOT from [747] (bool~) play_move_leftright::$1 ← (byte) play_move_leftright::key_event#2 == (const nomodify byte) KEY_DOT
|
||||
Inversing boolean not [760] (bool~) play_move_leftright::$6 ← (byte~) play_move_leftright::$4 != (const nomodify byte) COLLISION_NONE from [759] (bool~) play_move_leftright::$5 ← (byte~) play_move_leftright::$4 == (const nomodify byte) COLLISION_NONE
|
||||
Inversing boolean not [805] (bool~) play_move_rotate::$4 ← (byte~) play_move_rotate::$2 != (const nomodify byte) COLLISION_NONE from [804] (bool~) play_move_rotate::$3 ← (byte~) play_move_rotate::$2 == (const nomodify byte) COLLISION_NONE
|
||||
Inversing boolean not [827] (bool~) play_collision::$2 ← *((byte*) play_collision::piece_gfx#1 + (byte) play_collision::i#2) == (byte) 0 from [826] (bool~) play_collision::$1 ← *((byte*) play_collision::piece_gfx#1 + (byte) play_collision::i#2) != (byte) 0
|
||||
Inversing boolean not [828] (bool~) play_collision::$2 ← *((byte*) play_collision::piece_gfx#1 + (byte) play_collision::i#2) == (byte) 0 from [826] (bool~) play_collision::$1 ← *((byte*) play_collision::piece_gfx#1 + (byte) play_collision::i#2) != (byte) 0
|
||||
Inversing boolean not [837] (bool~) play_collision::$4 ← (byte) play_collision::yp#3 < (const nomodify byte) PLAYFIELD_LINES from [836] (bool~) play_collision::$3 ← (byte) play_collision::yp#3 >= (const nomodify byte) PLAYFIELD_LINES
|
||||
Inversing boolean not [842] (bool~) play_collision::$7 ← (byte~) play_collision::$5 == (byte) 0 from [841] (bool~) play_collision::$6 ← (byte~) play_collision::$5 != (byte) 0
|
||||
Inversing boolean not [850] (bool~) play_collision::$9 ← (byte) play_collision::xp#4 < (const nomodify byte) PLAYFIELD_COLS from [849] (bool~) play_collision::$8 ← (byte) play_collision::xp#4 >= (const nomodify byte) PLAYFIELD_COLS
|
||||
Inversing boolean not [855] (bool~) play_collision::$11 ← *((byte*) play_collision::playfield_line#1 + (byte) play_collision::xp#5) == (byte) 0 from [854] (bool~) play_collision::$10 ← *((byte*) play_collision::playfield_line#1 + (byte) play_collision::xp#5) != (byte) 0
|
||||
Inversing boolean not [876] (bool~) play_lock_current::$1 ← *((byte*) current_piece_gfx#22 + (byte) play_lock_current::i#2) == (byte) 0 from [875] (bool~) play_lock_current::$0 ← *((byte*) current_piece_gfx#22 + (byte) play_lock_current::i#2) != (byte) 0
|
||||
Inversing boolean not [877] (bool~) play_lock_current::$1 ← *((byte*) current_piece_gfx#22 + (byte) play_lock_current::i#2) == (byte) 0 from [875] (bool~) play_lock_current::$0 ← *((byte*) current_piece_gfx#22 + (byte) play_lock_current::i#2) != (byte) 0
|
||||
Inversing boolean not [910] (bool~) play_spawn_current::$3 ← (byte~) play_spawn_current::$1 != (const nomodify byte) COLLISION_PLAYFIELD from [909] (bool~) play_spawn_current::$2 ← (byte~) play_spawn_current::$1 == (const nomodify byte) COLLISION_PLAYFIELD
|
||||
Inversing boolean not [950] (bool~) play_remove_lines::$1 ← (byte) play_remove_lines::c#0 != (byte) 0 from [949] (bool~) play_remove_lines::$0 ← (byte) play_remove_lines::c#0 == (byte) 0
|
||||
Inversing boolean not [962] (bool~) play_remove_lines::$4 ← (byte) play_remove_lines::full#2 != (byte) 1 from [961] (bool~) play_remove_lines::$3 ← (byte) play_remove_lines::full#2 == (byte) 1
|
||||
|
@ -12,12 +12,12 @@ main: {
|
||||
// Error! The post-increment in the following loop is turned into a pre-increment by the compiler.
|
||||
__b1:
|
||||
// while(*msg++)
|
||||
ldy #0
|
||||
lda (msg),y
|
||||
inc.z msg
|
||||
bne !+
|
||||
inc.z msg+1
|
||||
!:
|
||||
ldy #0
|
||||
lda (msg),y
|
||||
cmp #0
|
||||
bne __b1
|
||||
// *--msg = 'x';
|
||||
|
@ -14,23 +14,24 @@ main: scope:[main] from @1
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
[5] (byte*) main::msg#4 ← phi( main/(const byte*) MESSAGE main::@1/(byte*) main::msg#1 )
|
||||
[6] (byte*) main::msg#1 ← ++ (byte*) main::msg#4
|
||||
[7] if((byte) 0!=*((byte*) main::msg#1)) goto main::@1
|
||||
[6] (byte~) main::$0 ← *((byte*) main::msg#4)
|
||||
[7] (byte*) main::msg#1 ← ++ (byte*) main::msg#4
|
||||
[8] if((byte) 0!=(byte~) main::$0) goto main::@1
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1
|
||||
[8] (byte*) main::msg#2 ← -- (byte*) main::msg#1
|
||||
[9] *((byte*) main::msg#2) ← (byte) 'x'
|
||||
[10] (byte*) main::msg#3 ← ++ (byte*) main::msg#2
|
||||
[11] *((byte*) main::msg#3) ← (byte) 0
|
||||
[9] (byte*) main::msg#2 ← -- (byte*) main::msg#1
|
||||
[10] *((byte*) main::msg#2) ← (byte) 'x'
|
||||
[11] (byte*) main::msg#3 ← ++ (byte*) main::msg#2
|
||||
[12] *((byte*) main::msg#3) ← (byte) 0
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@2 main::@4
|
||||
[12] (byte) main::i#2 ← phi( main::@2/(byte) 0 main::@4/(byte) main::i#1 )
|
||||
[13] if((byte) 0!=*((const byte*) MESSAGE + (byte) main::i#2)) goto main::@4
|
||||
[13] (byte) main::i#2 ← phi( main::@2/(byte) 0 main::@4/(byte) main::i#1 )
|
||||
[14] if((byte) 0!=*((const byte*) MESSAGE + (byte) main::i#2)) goto main::@4
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@3
|
||||
[14] return
|
||||
[15] return
|
||||
to:@return
|
||||
main::@4: scope:[main] from main::@3
|
||||
[15] *((const nomodify byte*) SCREEN + (byte) main::i#2) ← *((const byte*) MESSAGE + (byte) main::i#2)
|
||||
[16] (byte) main::i#1 ← ++ (byte) main::i#2
|
||||
[16] *((const nomodify byte*) SCREEN + (byte) main::i#2) ← *((const byte*) MESSAGE + (byte) main::i#2)
|
||||
[17] (byte) main::i#1 ← ++ (byte) main::i#2
|
||||
to:main::@3
|
||||
|
@ -1,4 +1,4 @@
|
||||
Warning! Adding boolean cast to non-boolean condition *((byte*) main::msg)
|
||||
Warning! Adding boolean cast to non-boolean condition (byte~) main::$0
|
||||
Warning! Adding boolean cast to non-boolean condition *((const byte*) MESSAGE + (byte) main::i)
|
||||
Culled Empty Block (label) main::@2
|
||||
Culled Empty Block (label) main::@4
|
||||
@ -19,9 +19,10 @@ main: scope:[main] from @1
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte*) main::msg#4 ← phi( main/(byte*) main::msg#0 main::@1/(byte*) main::msg#1 )
|
||||
(byte~) main::$0 ← *((byte*) main::msg#4)
|
||||
(byte*) main::msg#1 ← ++ (byte*) main::msg#4
|
||||
(bool~) main::$0 ← (number) 0 != *((byte*) main::msg#1)
|
||||
if((bool~) main::$0) goto main::@1
|
||||
(bool~) main::$1 ← (number) 0 != (byte~) main::$0
|
||||
if((bool~) main::$1) goto main::@1
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@1
|
||||
(byte*) main::msg#5 ← phi( main::@1/(byte*) main::msg#1 )
|
||||
@ -33,8 +34,8 @@ main::@3: scope:[main] from main::@1
|
||||
to:main::@7
|
||||
main::@7: scope:[main] from main::@3 main::@8
|
||||
(byte) main::i#2 ← phi( main::@3/(byte) main::i#0 main::@8/(byte) main::i#1 )
|
||||
(bool~) main::$1 ← (number) 0 != *((const byte*) MESSAGE + (byte) main::i#2)
|
||||
if((bool~) main::$1) goto main::@8
|
||||
(bool~) main::$2 ← (number) 0 != *((const byte*) MESSAGE + (byte) main::i#2)
|
||||
if((bool~) main::$2) goto main::@8
|
||||
to:main::@return
|
||||
main::@8: scope:[main] from main::@7
|
||||
(byte) main::i#3 ← phi( main::@7/(byte) main::i#2 )
|
||||
@ -59,8 +60,9 @@ SYMBOL TABLE SSA
|
||||
(const byte*) MESSAGE[(number) $14] = (byte*) "camelot"
|
||||
(const nomodify byte*) SCREEN = (byte*)(number) $400
|
||||
(void()) main()
|
||||
(bool~) main::$0
|
||||
(byte~) main::$0
|
||||
(bool~) main::$1
|
||||
(bool~) main::$2
|
||||
(label) main::@1
|
||||
(label) main::@3
|
||||
(label) main::@7
|
||||
@ -79,9 +81,9 @@ SYMBOL TABLE SSA
|
||||
(byte*) main::msg#4
|
||||
(byte*) main::msg#5
|
||||
|
||||
Adding number conversion cast (unumber) 0 in (bool~) main::$0 ← (number) 0 != *((byte*) main::msg#1)
|
||||
Adding number conversion cast (unumber) 0 in (bool~) main::$1 ← (number) 0 != (byte~) main::$0
|
||||
Adding number conversion cast (unumber) 0 in *((byte*) main::msg#3) ← (number) 0
|
||||
Adding number conversion cast (unumber) 0 in (bool~) main::$1 ← (number) 0 != *((const byte*) MESSAGE + (byte) main::i#2)
|
||||
Adding number conversion cast (unumber) 0 in (bool~) main::$2 ← (number) 0 != *((const byte*) MESSAGE + (byte) main::i#2)
|
||||
Successful SSA optimization PassNAddNumberTypeConversions
|
||||
Inlining cast *((byte*) main::msg#3) ← (unumber)(number) 0
|
||||
Successful SSA optimization Pass2InlineCast
|
||||
@ -97,8 +99,8 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions
|
||||
Alias main::msg#1 = main::msg#5
|
||||
Alias main::i#2 = main::i#3
|
||||
Successful SSA optimization Pass2AliasElimination
|
||||
Simple Condition (bool~) main::$0 [4] if((byte) 0!=*((byte*) main::msg#1)) goto main::@1
|
||||
Simple Condition (bool~) main::$1 [12] if((byte) 0!=*((const byte*) MESSAGE + (byte) main::i#2)) goto main::@8
|
||||
Simple Condition (bool~) main::$1 [5] if((byte) 0!=(byte~) main::$0) goto main::@1
|
||||
Simple Condition (bool~) main::$2 [13] if((byte) 0!=*((const byte*) MESSAGE + (byte) main::i#2)) goto main::@8
|
||||
Successful SSA optimization Pass2ConditionalJumpSimplification
|
||||
Constant (const byte*) main::msg#0 = MESSAGE
|
||||
Constant (const byte) main::i#0 = 0
|
||||
@ -118,8 +120,8 @@ CALL GRAPH
|
||||
Calls in [] to main:2
|
||||
|
||||
Created 2 initial phi equivalence classes
|
||||
Coalesced [18] main::i#4 ← main::i#1
|
||||
Coalesced [19] main::msg#6 ← main::msg#1
|
||||
Coalesced [19] main::i#4 ← main::i#1
|
||||
Coalesced [20] main::msg#6 ← main::msg#1
|
||||
Coalesced down to 2 phi equivalence classes
|
||||
Culled Empty Block (label) @2
|
||||
Culled Empty Block (label) main::@13
|
||||
@ -148,53 +150,58 @@ main: scope:[main] from @1
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
[5] (byte*) main::msg#4 ← phi( main/(const byte*) MESSAGE main::@1/(byte*) main::msg#1 )
|
||||
[6] (byte*) main::msg#1 ← ++ (byte*) main::msg#4
|
||||
[7] if((byte) 0!=*((byte*) main::msg#1)) goto main::@1
|
||||
[6] (byte~) main::$0 ← *((byte*) main::msg#4)
|
||||
[7] (byte*) main::msg#1 ← ++ (byte*) main::msg#4
|
||||
[8] if((byte) 0!=(byte~) main::$0) goto main::@1
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1
|
||||
[8] (byte*) main::msg#2 ← -- (byte*) main::msg#1
|
||||
[9] *((byte*) main::msg#2) ← (byte) 'x'
|
||||
[10] (byte*) main::msg#3 ← ++ (byte*) main::msg#2
|
||||
[11] *((byte*) main::msg#3) ← (byte) 0
|
||||
[9] (byte*) main::msg#2 ← -- (byte*) main::msg#1
|
||||
[10] *((byte*) main::msg#2) ← (byte) 'x'
|
||||
[11] (byte*) main::msg#3 ← ++ (byte*) main::msg#2
|
||||
[12] *((byte*) main::msg#3) ← (byte) 0
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@2 main::@4
|
||||
[12] (byte) main::i#2 ← phi( main::@2/(byte) 0 main::@4/(byte) main::i#1 )
|
||||
[13] if((byte) 0!=*((const byte*) MESSAGE + (byte) main::i#2)) goto main::@4
|
||||
[13] (byte) main::i#2 ← phi( main::@2/(byte) 0 main::@4/(byte) main::i#1 )
|
||||
[14] if((byte) 0!=*((const byte*) MESSAGE + (byte) main::i#2)) goto main::@4
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@3
|
||||
[14] return
|
||||
[15] return
|
||||
to:@return
|
||||
main::@4: scope:[main] from main::@3
|
||||
[15] *((const nomodify byte*) SCREEN + (byte) main::i#2) ← *((const byte*) MESSAGE + (byte) main::i#2)
|
||||
[16] (byte) main::i#1 ← ++ (byte) main::i#2
|
||||
[16] *((const nomodify byte*) SCREEN + (byte) main::i#2) ← *((const byte*) MESSAGE + (byte) main::i#2)
|
||||
[17] (byte) main::i#1 ← ++ (byte) main::i#2
|
||||
to:main::@3
|
||||
|
||||
|
||||
VARIABLE REGISTER WEIGHTS
|
||||
(void()) main()
|
||||
(byte~) main::$0 101.0
|
||||
(byte) main::i
|
||||
(byte) main::i#1 202.0
|
||||
(byte) main::i#2 168.33333333333331
|
||||
(byte*) main::msg
|
||||
(byte*) main::msg#1 157.0
|
||||
(byte*) main::msg#1 106.5
|
||||
(byte*) main::msg#2 16.5
|
||||
(byte*) main::msg#3 22.0
|
||||
(byte*) main::msg#4 202.0
|
||||
(byte*) main::msg#4 151.5
|
||||
|
||||
Initial phi equivalence classes
|
||||
[ main::msg#4 main::msg#1 ]
|
||||
[ main::i#2 main::i#1 ]
|
||||
Added variable main::$0 to live range equivalence class [ main::$0 ]
|
||||
Added variable main::msg#2 to live range equivalence class [ main::msg#2 ]
|
||||
Added variable main::msg#3 to live range equivalence class [ main::msg#3 ]
|
||||
Complete equivalence classes
|
||||
[ main::msg#4 main::msg#1 ]
|
||||
[ main::i#2 main::i#1 ]
|
||||
[ main::$0 ]
|
||||
[ main::msg#2 ]
|
||||
[ main::msg#3 ]
|
||||
Allocated zp[2]:2 [ main::msg#4 main::msg#1 ]
|
||||
Allocated zp[1]:4 [ main::i#2 main::i#1 ]
|
||||
Allocated zp[2]:5 [ main::msg#2 ]
|
||||
Allocated zp[2]:7 [ main::msg#3 ]
|
||||
Allocated zp[1]:5 [ main::$0 ]
|
||||
Allocated zp[2]:6 [ main::msg#2 ]
|
||||
Allocated zp[2]:8 [ main::msg#3 ]
|
||||
|
||||
INITIAL ASM
|
||||
Target platform is c64basic / MOS6502X
|
||||
@ -224,9 +231,10 @@ __bend_from___b1:
|
||||
__bend:
|
||||
// main
|
||||
main: {
|
||||
.label __0 = 5
|
||||
.label msg = 2
|
||||
.label msg_1 = 5
|
||||
.label msg_2 = 7
|
||||
.label msg_1 = 6
|
||||
.label msg_2 = 8
|
||||
// Print the resulting message - should be "camelotx" - but the error causes it to be "camelox"
|
||||
.label i = 4
|
||||
// [5] phi from main to main::@1 [phi:main->main::@1]
|
||||
@ -244,20 +252,23 @@ main: {
|
||||
jmp __b1
|
||||
// main::@1
|
||||
__b1:
|
||||
// [6] (byte*) main::msg#1 ← ++ (byte*) main::msg#4 -- pbuz1=_inc_pbuz1
|
||||
// [6] (byte~) main::$0 ← *((byte*) main::msg#4) -- vbuz1=_deref_pbuz2
|
||||
ldy #0
|
||||
lda (msg),y
|
||||
sta.z __0
|
||||
// [7] (byte*) main::msg#1 ← ++ (byte*) main::msg#4 -- pbuz1=_inc_pbuz1
|
||||
inc.z msg
|
||||
bne !+
|
||||
inc.z msg+1
|
||||
!:
|
||||
// [7] if((byte) 0!=*((byte*) main::msg#1)) goto main::@1 -- vbuc1_neq__deref_pbuz1_then_la1
|
||||
ldy #0
|
||||
lda (msg),y
|
||||
cmp #0
|
||||
// [8] if((byte) 0!=(byte~) main::$0) goto main::@1 -- vbuc1_neq_vbuz1_then_la1
|
||||
lda #0
|
||||
cmp.z __0
|
||||
bne __b1_from___b1
|
||||
jmp __b2
|
||||
// main::@2
|
||||
__b2:
|
||||
// [8] (byte*) main::msg#2 ← -- (byte*) main::msg#1 -- pbuz1=_dec_pbuz2
|
||||
// [9] (byte*) main::msg#2 ← -- (byte*) main::msg#1 -- pbuz1=_dec_pbuz2
|
||||
lda.z msg
|
||||
sec
|
||||
sbc #1
|
||||
@ -265,12 +276,12 @@ main: {
|
||||
lda.z msg+1
|
||||
sbc #0
|
||||
sta.z msg_1+1
|
||||
// [9] *((byte*) main::msg#2) ← (byte) 'x' -- _deref_pbuz1=vbuc1
|
||||
// [10] *((byte*) main::msg#2) ← (byte) 'x' -- _deref_pbuz1=vbuc1
|
||||
// Now msg should point right after the zero, since the post increment was executed in the last condition that evaluated to zero.
|
||||
lda #'x'
|
||||
ldy #0
|
||||
sta (msg_1),y
|
||||
// [10] (byte*) main::msg#3 ← ++ (byte*) main::msg#2 -- pbuz1=_inc_pbuz2
|
||||
// [11] (byte*) main::msg#3 ← ++ (byte*) main::msg#2 -- pbuz1=_inc_pbuz2
|
||||
lda.z msg_1
|
||||
clc
|
||||
adc #1
|
||||
@ -278,19 +289,19 @@ main: {
|
||||
lda.z msg_1+1
|
||||
adc #0
|
||||
sta.z msg_2+1
|
||||
// [11] *((byte*) main::msg#3) ← (byte) 0 -- _deref_pbuz1=vbuc1
|
||||
// [12] *((byte*) main::msg#3) ← (byte) 0 -- _deref_pbuz1=vbuc1
|
||||
lda #0
|
||||
ldy #0
|
||||
sta (msg_2),y
|
||||
// [12] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
|
||||
// [13] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
|
||||
__b3_from___b2:
|
||||
// [12] phi (byte) main::i#2 = (byte) 0 [phi:main::@2->main::@3#0] -- vbuz1=vbuc1
|
||||
// [13] phi (byte) main::i#2 = (byte) 0 [phi:main::@2->main::@3#0] -- vbuz1=vbuc1
|
||||
lda #0
|
||||
sta.z i
|
||||
jmp __b3
|
||||
// main::@3
|
||||
__b3:
|
||||
// [13] if((byte) 0!=*((const byte*) MESSAGE + (byte) main::i#2)) goto main::@4 -- vbuc1_neq_pbuc2_derefidx_vbuz1_then_la1
|
||||
// [14] if((byte) 0!=*((const byte*) MESSAGE + (byte) main::i#2)) goto main::@4 -- vbuc1_neq_pbuc2_derefidx_vbuz1_then_la1
|
||||
lda #0
|
||||
ldy.z i
|
||||
cmp MESSAGE,y
|
||||
@ -298,19 +309,19 @@ main: {
|
||||
jmp __breturn
|
||||
// main::@return
|
||||
__breturn:
|
||||
// [14] return
|
||||
// [15] return
|
||||
rts
|
||||
// main::@4
|
||||
__b4:
|
||||
// [15] *((const nomodify byte*) SCREEN + (byte) main::i#2) ← *((const byte*) MESSAGE + (byte) main::i#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1
|
||||
// [16] *((const nomodify byte*) SCREEN + (byte) main::i#2) ← *((const byte*) MESSAGE + (byte) main::i#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1
|
||||
ldy.z i
|
||||
lda MESSAGE,y
|
||||
sta SCREEN,y
|
||||
// [16] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1
|
||||
// [17] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1
|
||||
inc.z i
|
||||
// [12] phi from main::@4 to main::@3 [phi:main::@4->main::@3]
|
||||
// [13] phi from main::@4 to main::@3 [phi:main::@4->main::@3]
|
||||
__b3_from___b4:
|
||||
// [12] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@4->main::@3#0] -- register_copy
|
||||
// [13] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@4->main::@3#0] -- register_copy
|
||||
jmp __b3
|
||||
}
|
||||
// File Data
|
||||
@ -319,34 +330,35 @@ main: {
|
||||
.fill $c, 0
|
||||
|
||||
REGISTER UPLIFT POTENTIAL REGISTERS
|
||||
Statement [7] if((byte) 0!=*((byte*) main::msg#1)) goto main::@1 [ main::msg#1 ] ( main:2 [ main::msg#1 ] { } ) always clobbers reg byte a reg byte y
|
||||
Statement [8] (byte*) main::msg#2 ← -- (byte*) main::msg#1 [ main::msg#2 ] ( main:2 [ main::msg#2 ] { } ) always clobbers reg byte a
|
||||
Statement [9] *((byte*) main::msg#2) ← (byte) 'x' [ main::msg#2 ] ( main:2 [ main::msg#2 ] { } ) always clobbers reg byte a reg byte y
|
||||
Statement [10] (byte*) main::msg#3 ← ++ (byte*) main::msg#2 [ main::msg#3 ] ( main:2 [ main::msg#3 ] { } ) always clobbers reg byte a
|
||||
Statement [11] *((byte*) main::msg#3) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a reg byte y
|
||||
Statement [13] if((byte) 0!=*((const byte*) MESSAGE + (byte) main::i#2)) goto main::@4 [ main::i#2 ] ( main:2 [ main::i#2 ] { } ) always clobbers reg byte a
|
||||
Statement [6] (byte~) main::$0 ← *((byte*) main::msg#4) [ main::msg#4 main::$0 ] ( main:2 [ main::msg#4 main::$0 ] { } ) always clobbers reg byte a reg byte y
|
||||
Statement [9] (byte*) main::msg#2 ← -- (byte*) main::msg#1 [ main::msg#2 ] ( main:2 [ main::msg#2 ] { } ) always clobbers reg byte a
|
||||
Statement [10] *((byte*) main::msg#2) ← (byte) 'x' [ main::msg#2 ] ( main:2 [ main::msg#2 ] { } ) always clobbers reg byte a reg byte y
|
||||
Statement [11] (byte*) main::msg#3 ← ++ (byte*) main::msg#2 [ main::msg#3 ] ( main:2 [ main::msg#3 ] { } ) always clobbers reg byte a
|
||||
Statement [12] *((byte*) main::msg#3) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a reg byte y
|
||||
Statement [14] if((byte) 0!=*((const byte*) MESSAGE + (byte) main::i#2)) goto main::@4 [ main::i#2 ] ( main:2 [ main::i#2 ] { } ) always clobbers reg byte a
|
||||
Removing always clobbered register reg byte a as potential for zp[1]:4 [ main::i#2 main::i#1 ]
|
||||
Statement [15] *((const nomodify byte*) SCREEN + (byte) main::i#2) ← *((const byte*) MESSAGE + (byte) main::i#2) [ main::i#2 ] ( main:2 [ main::i#2 ] { } ) always clobbers reg byte a
|
||||
Statement [7] if((byte) 0!=*((byte*) main::msg#1)) goto main::@1 [ main::msg#1 ] ( main:2 [ main::msg#1 ] { } ) always clobbers reg byte a reg byte y
|
||||
Statement [8] (byte*) main::msg#2 ← -- (byte*) main::msg#1 [ main::msg#2 ] ( main:2 [ main::msg#2 ] { } ) always clobbers reg byte a
|
||||
Statement [9] *((byte*) main::msg#2) ← (byte) 'x' [ main::msg#2 ] ( main:2 [ main::msg#2 ] { } ) always clobbers reg byte a reg byte y
|
||||
Statement [10] (byte*) main::msg#3 ← ++ (byte*) main::msg#2 [ main::msg#3 ] ( main:2 [ main::msg#3 ] { } ) always clobbers reg byte a
|
||||
Statement [11] *((byte*) main::msg#3) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a reg byte y
|
||||
Statement [13] if((byte) 0!=*((const byte*) MESSAGE + (byte) main::i#2)) goto main::@4 [ main::i#2 ] ( main:2 [ main::i#2 ] { } ) always clobbers reg byte a
|
||||
Statement [15] *((const nomodify byte*) SCREEN + (byte) main::i#2) ← *((const byte*) MESSAGE + (byte) main::i#2) [ main::i#2 ] ( main:2 [ main::i#2 ] { } ) always clobbers reg byte a
|
||||
Statement [16] *((const nomodify byte*) SCREEN + (byte) main::i#2) ← *((const byte*) MESSAGE + (byte) main::i#2) [ main::i#2 ] ( main:2 [ main::i#2 ] { } ) always clobbers reg byte a
|
||||
Statement [6] (byte~) main::$0 ← *((byte*) main::msg#4) [ main::msg#4 main::$0 ] ( main:2 [ main::msg#4 main::$0 ] { } ) always clobbers reg byte a reg byte y
|
||||
Statement [9] (byte*) main::msg#2 ← -- (byte*) main::msg#1 [ main::msg#2 ] ( main:2 [ main::msg#2 ] { } ) always clobbers reg byte a
|
||||
Statement [10] *((byte*) main::msg#2) ← (byte) 'x' [ main::msg#2 ] ( main:2 [ main::msg#2 ] { } ) always clobbers reg byte a reg byte y
|
||||
Statement [11] (byte*) main::msg#3 ← ++ (byte*) main::msg#2 [ main::msg#3 ] ( main:2 [ main::msg#3 ] { } ) always clobbers reg byte a
|
||||
Statement [12] *((byte*) main::msg#3) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a reg byte y
|
||||
Statement [14] if((byte) 0!=*((const byte*) MESSAGE + (byte) main::i#2)) goto main::@4 [ main::i#2 ] ( main:2 [ main::i#2 ] { } ) always clobbers reg byte a
|
||||
Statement [16] *((const nomodify byte*) SCREEN + (byte) main::i#2) ← *((const byte*) MESSAGE + (byte) main::i#2) [ main::i#2 ] ( main:2 [ main::i#2 ] { } ) always clobbers reg byte a
|
||||
Potential registers zp[2]:2 [ main::msg#4 main::msg#1 ] : zp[2]:2 ,
|
||||
Potential registers zp[1]:4 [ main::i#2 main::i#1 ] : zp[1]:4 , reg byte x , reg byte y ,
|
||||
Potential registers zp[2]:5 [ main::msg#2 ] : zp[2]:5 ,
|
||||
Potential registers zp[2]:7 [ main::msg#3 ] : zp[2]:7 ,
|
||||
Potential registers zp[1]:5 [ main::$0 ] : zp[1]:5 , reg byte a , reg byte x , reg byte y ,
|
||||
Potential registers zp[2]:6 [ main::msg#2 ] : zp[2]:6 ,
|
||||
Potential registers zp[2]:8 [ main::msg#3 ] : zp[2]:8 ,
|
||||
|
||||
REGISTER UPLIFT SCOPES
|
||||
Uplift Scope [main] 370.33: zp[1]:4 [ main::i#2 main::i#1 ] 359: zp[2]:2 [ main::msg#4 main::msg#1 ] 22: zp[2]:7 [ main::msg#3 ] 16.5: zp[2]:5 [ main::msg#2 ]
|
||||
Uplift Scope [main] 370.33: zp[1]:4 [ main::i#2 main::i#1 ] 258: zp[2]:2 [ main::msg#4 main::msg#1 ] 101: zp[1]:5 [ main::$0 ] 22: zp[2]:8 [ main::msg#3 ] 16.5: zp[2]:6 [ main::msg#2 ]
|
||||
Uplift Scope []
|
||||
|
||||
Uplifting [main] best 824 combination reg byte x [ main::i#2 main::i#1 ] zp[2]:2 [ main::msg#4 main::msg#1 ] zp[2]:7 [ main::msg#3 ] zp[2]:5 [ main::msg#2 ]
|
||||
Uplifting [main] best 824 combination reg byte x [ main::i#2 main::i#1 ] zp[2]:2 [ main::msg#4 main::msg#1 ] reg byte a [ main::$0 ] zp[2]:8 [ main::msg#3 ] zp[2]:6 [ main::msg#2 ]
|
||||
Uplifting [] best 824 combination
|
||||
Coalescing zero page register [ zp[2]:2 [ main::msg#4 main::msg#1 ] ] with [ zp[2]:5 [ main::msg#2 ] ] - score: 1
|
||||
Coalescing zero page register [ zp[2]:2 [ main::msg#4 main::msg#1 main::msg#2 ] ] with [ zp[2]:7 [ main::msg#3 ] ] - score: 1
|
||||
Coalescing zero page register [ zp[2]:2 [ main::msg#4 main::msg#1 ] ] with [ zp[2]:6 [ main::msg#2 ] ] - score: 1
|
||||
Coalescing zero page register [ zp[2]:2 [ main::msg#4 main::msg#1 main::msg#2 ] ] with [ zp[2]:8 [ main::msg#3 ] ] - score: 1
|
||||
|
||||
ASSEMBLER BEFORE OPTIMIZATION
|
||||
// File Comments
|
||||
@ -391,65 +403,66 @@ main: {
|
||||
jmp __b1
|
||||
// main::@1
|
||||
__b1:
|
||||
// [6] (byte*) main::msg#1 ← ++ (byte*) main::msg#4 -- pbuz1=_inc_pbuz1
|
||||
// [6] (byte~) main::$0 ← *((byte*) main::msg#4) -- vbuaa=_deref_pbuz1
|
||||
ldy #0
|
||||
lda (msg),y
|
||||
// [7] (byte*) main::msg#1 ← ++ (byte*) main::msg#4 -- pbuz1=_inc_pbuz1
|
||||
inc.z msg
|
||||
bne !+
|
||||
inc.z msg+1
|
||||
!:
|
||||
// [7] if((byte) 0!=*((byte*) main::msg#1)) goto main::@1 -- vbuc1_neq__deref_pbuz1_then_la1
|
||||
ldy #0
|
||||
lda (msg),y
|
||||
// [8] if((byte) 0!=(byte~) main::$0) goto main::@1 -- vbuc1_neq_vbuaa_then_la1
|
||||
cmp #0
|
||||
bne __b1_from___b1
|
||||
jmp __b2
|
||||
// main::@2
|
||||
__b2:
|
||||
// [8] (byte*) main::msg#2 ← -- (byte*) main::msg#1 -- pbuz1=_dec_pbuz1
|
||||
// [9] (byte*) main::msg#2 ← -- (byte*) main::msg#1 -- pbuz1=_dec_pbuz1
|
||||
lda.z msg
|
||||
bne !+
|
||||
dec.z msg+1
|
||||
!:
|
||||
dec.z msg
|
||||
// [9] *((byte*) main::msg#2) ← (byte) 'x' -- _deref_pbuz1=vbuc1
|
||||
// [10] *((byte*) main::msg#2) ← (byte) 'x' -- _deref_pbuz1=vbuc1
|
||||
// Now msg should point right after the zero, since the post increment was executed in the last condition that evaluated to zero.
|
||||
lda #'x'
|
||||
ldy #0
|
||||
sta (msg),y
|
||||
// [10] (byte*) main::msg#3 ← ++ (byte*) main::msg#2 -- pbuz1=_inc_pbuz1
|
||||
// [11] (byte*) main::msg#3 ← ++ (byte*) main::msg#2 -- pbuz1=_inc_pbuz1
|
||||
inc.z msg
|
||||
bne !+
|
||||
inc.z msg+1
|
||||
!:
|
||||
// [11] *((byte*) main::msg#3) ← (byte) 0 -- _deref_pbuz1=vbuc1
|
||||
// [12] *((byte*) main::msg#3) ← (byte) 0 -- _deref_pbuz1=vbuc1
|
||||
lda #0
|
||||
ldy #0
|
||||
sta (msg),y
|
||||
// [12] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
|
||||
// [13] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
|
||||
__b3_from___b2:
|
||||
// [12] phi (byte) main::i#2 = (byte) 0 [phi:main::@2->main::@3#0] -- vbuxx=vbuc1
|
||||
// [13] phi (byte) main::i#2 = (byte) 0 [phi:main::@2->main::@3#0] -- vbuxx=vbuc1
|
||||
ldx #0
|
||||
jmp __b3
|
||||
// main::@3
|
||||
__b3:
|
||||
// [13] if((byte) 0!=*((const byte*) MESSAGE + (byte) main::i#2)) goto main::@4 -- vbuc1_neq_pbuc2_derefidx_vbuxx_then_la1
|
||||
// [14] if((byte) 0!=*((const byte*) MESSAGE + (byte) main::i#2)) goto main::@4 -- vbuc1_neq_pbuc2_derefidx_vbuxx_then_la1
|
||||
lda MESSAGE,x
|
||||
cmp #0
|
||||
bne __b4
|
||||
jmp __breturn
|
||||
// main::@return
|
||||
__breturn:
|
||||
// [14] return
|
||||
// [15] return
|
||||
rts
|
||||
// main::@4
|
||||
__b4:
|
||||
// [15] *((const nomodify byte*) SCREEN + (byte) main::i#2) ← *((const byte*) MESSAGE + (byte) main::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx
|
||||
// [16] *((const nomodify byte*) SCREEN + (byte) main::i#2) ← *((const byte*) MESSAGE + (byte) main::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx
|
||||
lda MESSAGE,x
|
||||
sta SCREEN,x
|
||||
// [16] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx
|
||||
// [17] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
// [12] phi from main::@4 to main::@3 [phi:main::@4->main::@3]
|
||||
// [13] phi from main::@4 to main::@3 [phi:main::@4->main::@3]
|
||||
__b3_from___b4:
|
||||
// [12] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@4->main::@3#0] -- register_copy
|
||||
// [13] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@4->main::@3#0] -- register_copy
|
||||
jmp __b3
|
||||
}
|
||||
// File Data
|
||||
@ -496,6 +509,7 @@ FINAL SYMBOL TABLE
|
||||
(const byte*) MESSAGE[(number) $14] = (byte*) "camelot"
|
||||
(const nomodify byte*) SCREEN = (byte*) 1024
|
||||
(void()) main()
|
||||
(byte~) main::$0 reg byte a 101.0
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@3
|
||||
@ -505,13 +519,14 @@ FINAL SYMBOL TABLE
|
||||
(byte) main::i#1 reg byte x 202.0
|
||||
(byte) main::i#2 reg byte x 168.33333333333331
|
||||
(byte*) main::msg
|
||||
(byte*) main::msg#1 msg zp[2]:2 157.0
|
||||
(byte*) main::msg#1 msg zp[2]:2 106.5
|
||||
(byte*) main::msg#2 msg zp[2]:2 16.5
|
||||
(byte*) main::msg#3 msg zp[2]:2 22.0
|
||||
(byte*) main::msg#4 msg zp[2]:2 202.0
|
||||
(byte*) main::msg#4 msg zp[2]:2 151.5
|
||||
|
||||
zp[2]:2 [ main::msg#4 main::msg#1 main::msg#2 main::msg#3 ]
|
||||
reg byte x [ main::i#2 main::i#1 ]
|
||||
reg byte a [ main::$0 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
@ -547,66 +562,67 @@ main: {
|
||||
// main::@1
|
||||
__b1:
|
||||
// while(*msg++)
|
||||
// [6] (byte*) main::msg#1 ← ++ (byte*) main::msg#4 -- pbuz1=_inc_pbuz1
|
||||
// [6] (byte~) main::$0 ← *((byte*) main::msg#4) -- vbuaa=_deref_pbuz1
|
||||
ldy #0
|
||||
lda (msg),y
|
||||
// [7] (byte*) main::msg#1 ← ++ (byte*) main::msg#4 -- pbuz1=_inc_pbuz1
|
||||
inc.z msg
|
||||
bne !+
|
||||
inc.z msg+1
|
||||
!:
|
||||
// [7] if((byte) 0!=*((byte*) main::msg#1)) goto main::@1 -- vbuc1_neq__deref_pbuz1_then_la1
|
||||
ldy #0
|
||||
lda (msg),y
|
||||
// [8] if((byte) 0!=(byte~) main::$0) goto main::@1 -- vbuc1_neq_vbuaa_then_la1
|
||||
cmp #0
|
||||
bne __b1
|
||||
// main::@2
|
||||
// *--msg = 'x';
|
||||
// [8] (byte*) main::msg#2 ← -- (byte*) main::msg#1 -- pbuz1=_dec_pbuz1
|
||||
// [9] (byte*) main::msg#2 ← -- (byte*) main::msg#1 -- pbuz1=_dec_pbuz1
|
||||
lda.z msg
|
||||
bne !+
|
||||
dec.z msg+1
|
||||
!:
|
||||
dec.z msg
|
||||
// *--msg = 'x'
|
||||
// [9] *((byte*) main::msg#2) ← (byte) 'x' -- _deref_pbuz1=vbuc1
|
||||
// [10] *((byte*) main::msg#2) ← (byte) 'x' -- _deref_pbuz1=vbuc1
|
||||
// Now msg should point right after the zero, since the post increment was executed in the last condition that evaluated to zero.
|
||||
lda #'x'
|
||||
ldy #0
|
||||
sta (msg),y
|
||||
// *++msg = 0;
|
||||
// [10] (byte*) main::msg#3 ← ++ (byte*) main::msg#2 -- pbuz1=_inc_pbuz1
|
||||
// [11] (byte*) main::msg#3 ← ++ (byte*) main::msg#2 -- pbuz1=_inc_pbuz1
|
||||
inc.z msg
|
||||
bne !+
|
||||
inc.z msg+1
|
||||
!:
|
||||
// *++msg = 0
|
||||
// [11] *((byte*) main::msg#3) ← (byte) 0 -- _deref_pbuz1=vbuc1
|
||||
// [12] *((byte*) main::msg#3) ← (byte) 0 -- _deref_pbuz1=vbuc1
|
||||
lda #0
|
||||
tay
|
||||
sta (msg),y
|
||||
// [12] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
|
||||
// [12] phi (byte) main::i#2 = (byte) 0 [phi:main::@2->main::@3#0] -- vbuxx=vbuc1
|
||||
// [13] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
|
||||
// [13] phi (byte) main::i#2 = (byte) 0 [phi:main::@2->main::@3#0] -- vbuxx=vbuc1
|
||||
tax
|
||||
// main::@3
|
||||
__b3:
|
||||
// while(MESSAGE[i])
|
||||
// [13] if((byte) 0!=*((const byte*) MESSAGE + (byte) main::i#2)) goto main::@4 -- vbuc1_neq_pbuc2_derefidx_vbuxx_then_la1
|
||||
// [14] if((byte) 0!=*((const byte*) MESSAGE + (byte) main::i#2)) goto main::@4 -- vbuc1_neq_pbuc2_derefidx_vbuxx_then_la1
|
||||
lda MESSAGE,x
|
||||
cmp #0
|
||||
bne __b4
|
||||
// main::@return
|
||||
// }
|
||||
// [14] return
|
||||
// [15] return
|
||||
rts
|
||||
// main::@4
|
||||
__b4:
|
||||
// SCREEN[i] = MESSAGE[i]
|
||||
// [15] *((const nomodify byte*) SCREEN + (byte) main::i#2) ← *((const byte*) MESSAGE + (byte) main::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx
|
||||
// [16] *((const nomodify byte*) SCREEN + (byte) main::i#2) ← *((const byte*) MESSAGE + (byte) main::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx
|
||||
lda MESSAGE,x
|
||||
sta SCREEN,x
|
||||
// i++;
|
||||
// [16] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx
|
||||
// [17] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
// [12] phi from main::@4 to main::@3 [phi:main::@4->main::@3]
|
||||
// [12] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@4->main::@3#0] -- register_copy
|
||||
// [13] phi from main::@4 to main::@3 [phi:main::@4->main::@3]
|
||||
// [13] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@4->main::@3#0] -- register_copy
|
||||
jmp __b3
|
||||
}
|
||||
// File Data
|
||||
|
@ -4,6 +4,7 @@
|
||||
(const byte*) MESSAGE[(number) $14] = (byte*) "camelot"
|
||||
(const nomodify byte*) SCREEN = (byte*) 1024
|
||||
(void()) main()
|
||||
(byte~) main::$0 reg byte a 101.0
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@3
|
||||
@ -13,10 +14,11 @@
|
||||
(byte) main::i#1 reg byte x 202.0
|
||||
(byte) main::i#2 reg byte x 168.33333333333331
|
||||
(byte*) main::msg
|
||||
(byte*) main::msg#1 msg zp[2]:2 157.0
|
||||
(byte*) main::msg#1 msg zp[2]:2 106.5
|
||||
(byte*) main::msg#2 msg zp[2]:2 16.5
|
||||
(byte*) main::msg#3 msg zp[2]:2 22.0
|
||||
(byte*) main::msg#4 msg zp[2]:2 202.0
|
||||
(byte*) main::msg#4 msg zp[2]:2 151.5
|
||||
|
||||
zp[2]:2 [ main::msg#4 main::msg#1 main::msg#2 main::msg#3 ]
|
||||
reg byte x [ main::i#2 main::i#1 ]
|
||||
reg byte a [ main::$0 ]
|
||||
|
@ -8,12 +8,12 @@
|
||||
.label TIMELO = $a2
|
||||
.label VICBANK = $d018
|
||||
main: {
|
||||
.label __3 = 6
|
||||
.label __4 = 6
|
||||
.label __5 = $11
|
||||
.label __12 = 6
|
||||
.label __13 = 6
|
||||
.label __14 = $f
|
||||
.label __5 = 6
|
||||
.label __6 = $11
|
||||
.label __15 = 6
|
||||
.label __16 = 6
|
||||
.label __17 = $f
|
||||
.label v = 4
|
||||
// test performance of 'div16u(10)'
|
||||
// test performance of 'div10'
|
||||
@ -64,26 +64,26 @@ main: {
|
||||
bcc __b10
|
||||
// (word)*TIMEHI
|
||||
lda TIMEHI
|
||||
sta.z __12
|
||||
sta.z __15
|
||||
lda #0
|
||||
sta.z __12+1
|
||||
sta.z __15+1
|
||||
// (word)*TIMEHI << 8
|
||||
lda.z __13
|
||||
sta.z __13+1
|
||||
lda.z __16
|
||||
sta.z __16+1
|
||||
lda #0
|
||||
sta.z __13
|
||||
sta.z __16
|
||||
// (word)*TIMELO
|
||||
lda TIMELO
|
||||
sta.z __14
|
||||
sta.z __17
|
||||
lda #0
|
||||
sta.z __14+1
|
||||
sta.z __17+1
|
||||
// myprintf(strTemp, "200 DIV10 : %5d,%4d IN %04d FRAMESm", u, v, ((word)*TIMEHI << 8) + (word)*TIMELO)
|
||||
lda.z myprintf.w3
|
||||
clc
|
||||
adc.z __14
|
||||
adc.z __17
|
||||
sta.z myprintf.w3
|
||||
lda.z myprintf.w3+1
|
||||
adc.z __14+1
|
||||
adc.z __17+1
|
||||
sta.z myprintf.w3+1
|
||||
lda #<str1
|
||||
sta.z myprintf.str
|
||||
@ -125,26 +125,26 @@ main: {
|
||||
bcc __b5
|
||||
// (word)*TIMEHI
|
||||
lda TIMEHI
|
||||
sta.z __3
|
||||
lda #0
|
||||
sta.z __3+1
|
||||
// (word)*TIMEHI << 8
|
||||
lda.z __4
|
||||
sta.z __4+1
|
||||
lda #0
|
||||
sta.z __4
|
||||
lda #0
|
||||
sta.z __4+1
|
||||
// (word)*TIMEHI << 8
|
||||
lda.z __5
|
||||
sta.z __5+1
|
||||
lda #0
|
||||
sta.z __5
|
||||
// (word)*TIMELO
|
||||
lda TIMELO
|
||||
sta.z __5
|
||||
sta.z __6
|
||||
lda #0
|
||||
sta.z __5+1
|
||||
sta.z __6+1
|
||||
// myprintf(strTemp, "200 DIV16U: %5d,%4d IN %04d FRAMESm", u, v, ((word)*TIMEHI << 8) + (word)*TIMELO)
|
||||
lda.z myprintf.w3
|
||||
clc
|
||||
adc.z __5
|
||||
adc.z __6
|
||||
sta.z myprintf.w3
|
||||
lda.z myprintf.w3+1
|
||||
adc.z __5+1
|
||||
adc.z __6+1
|
||||
sta.z myprintf.w3+1
|
||||
// lower case letters in string literal are placed in string as 0x01-0x1A, should be 0x61-0x7A
|
||||
// -- as a side-effect of above issue, we can use "m" for carriage return. The normal way is the escape code "\r" but that is not supported --
|
||||
|
@ -39,10 +39,10 @@ main::@9: scope:[main] from main::@15 main::@8
|
||||
[16] if(*((const nomodify byte*) zp2)<(byte) $c8) goto main::@10
|
||||
to:main::@11
|
||||
main::@11: scope:[main] from main::@9
|
||||
[17] (word~) main::$12 ← (word)*((const nomodify byte*) TIMEHI)
|
||||
[18] (word~) main::$13 ← (word~) main::$12 << (byte) 8
|
||||
[19] (word~) main::$14 ← (word)*((const nomodify byte*) TIMELO)
|
||||
[20] (word) myprintf::w3#1 ← (word~) main::$13 + (word~) main::$14
|
||||
[17] (word~) main::$15 ← (word)*((const nomodify byte*) TIMEHI)
|
||||
[18] (word~) main::$16 ← (word~) main::$15 << (byte) 8
|
||||
[19] (word~) main::$17 ← (word)*((const nomodify byte*) TIMELO)
|
||||
[20] (word) myprintf::w3#1 ← (word~) main::$16 + (word~) main::$17
|
||||
[21] (word) myprintf::w1#1 ← (word) main::u#17
|
||||
[22] (word) myprintf::w2#1 ← (word) main::v#13
|
||||
[23] call myprintf
|
||||
@ -74,10 +74,10 @@ main::@4: scope:[main] from main::@12 main::@2
|
||||
[37] if(*((const nomodify byte*) zp2)<(byte) $c8) goto main::@5
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main::@4
|
||||
[38] (word~) main::$3 ← (word)*((const nomodify byte*) TIMEHI)
|
||||
[39] (word~) main::$4 ← (word~) main::$3 << (byte) 8
|
||||
[40] (word~) main::$5 ← (word)*((const nomodify byte*) TIMELO)
|
||||
[41] (word) myprintf::w3#0 ← (word~) main::$4 + (word~) main::$5
|
||||
[38] (word~) main::$4 ← (word)*((const nomodify byte*) TIMEHI)
|
||||
[39] (word~) main::$5 ← (word~) main::$4 << (byte) 8
|
||||
[40] (word~) main::$6 ← (word)*((const nomodify byte*) TIMELO)
|
||||
[41] (word) myprintf::w3#0 ← (word~) main::$5 + (word~) main::$6
|
||||
[42] (word) myprintf::w1#0 ← (word) main::u#15
|
||||
[43] (word) myprintf::w2#0 ← (word) main::v#11
|
||||
[44] call myprintf
|
||||
|
@ -1201,15 +1201,15 @@ main::@26: scope:[main] from main::@5
|
||||
main::@6: scope:[main] from main::@4
|
||||
(word) main::v#3 ← phi( main::@4/(word) main::v#5 )
|
||||
(word) main::u#6 ← phi( main::@4/(word) main::u#11 )
|
||||
(word~) main::$3 ← ((word)) *((const nomodify byte*) TIMEHI)
|
||||
(word~) main::$4 ← (word~) main::$3 << (number) 8
|
||||
(word~) main::$5 ← ((word)) *((const nomodify byte*) TIMELO)
|
||||
(word~) main::$6 ← (word~) main::$4 + (word~) main::$5
|
||||
(word~) main::$4 ← ((word)) *((const nomodify byte*) TIMEHI)
|
||||
(word~) main::$5 ← (word~) main::$4 << (number) 8
|
||||
(word~) main::$6 ← ((word)) *((const nomodify byte*) TIMELO)
|
||||
(word~) main::$7 ← (word~) main::$5 + (word~) main::$6
|
||||
(byte*) myprintf::dst#0 ← (const byte*) strTemp
|
||||
(byte*) myprintf::str#1 ← (const byte*) main::str
|
||||
(word) myprintf::w1#0 ← (word) main::u#6
|
||||
(word) myprintf::w2#0 ← (word) main::v#3
|
||||
(word) myprintf::w3#0 ← (word~) main::$6
|
||||
(word) myprintf::w3#0 ← (word~) main::$7
|
||||
call myprintf
|
||||
(byte) myprintf::return#2 ← (byte) myprintf::return#1
|
||||
to:main::@27
|
||||
@ -1227,8 +1227,8 @@ main::@28: scope:[main] from main::@27
|
||||
main::@13: scope:[main] from main::@3 main::@31
|
||||
(word) main::v#10 ← phi( main::@3/(word) main::v#12 main::@31/(word) main::v#13 )
|
||||
(word) main::u#20 ← phi( main::@3/(word) main::u#2 main::@31/(word) main::u#4 )
|
||||
(bool~) main::$9 ← *((const nomodify byte*) zp1) < (number) $a
|
||||
if((bool~) main::$9) goto main::@14
|
||||
(bool~) main::$11 ← *((const nomodify byte*) zp1) < (number) $a
|
||||
if((bool~) main::$11) goto main::@14
|
||||
to:main::@15
|
||||
main::@14: scope:[main] from main::@13
|
||||
(word) main::v#8 ← phi( main::@13/(word) main::v#10 )
|
||||
@ -1243,8 +1243,8 @@ main::@15: scope:[main] from main::@13
|
||||
main::@16: scope:[main] from main::@14 main::@29
|
||||
(word) main::v#6 ← phi( main::@14/(word) main::v#8 main::@29/(word) main::v#2 )
|
||||
(word) main::u#13 ← phi( main::@14/(word) main::u#17 main::@29/(word) main::u#18 )
|
||||
(bool~) main::$10 ← *((const nomodify byte*) zp2) < (number) $c8
|
||||
if((bool~) main::$10) goto main::@17
|
||||
(bool~) main::$12 ← *((const nomodify byte*) zp2) < (number) $c8
|
||||
if((bool~) main::$12) goto main::@17
|
||||
to:main::@18
|
||||
main::@17: scope:[main] from main::@16
|
||||
(word) main::u#8 ← phi( main::@16/(word) main::u#13 )
|
||||
@ -1255,22 +1255,22 @@ main::@17: scope:[main] from main::@16
|
||||
main::@29: scope:[main] from main::@17
|
||||
(word) main::u#18 ← phi( main::@17/(word) main::u#8 )
|
||||
(word) div10::return#4 ← phi( main::@17/(word) div10::return#2 )
|
||||
(word~) main::$11 ← (word) div10::return#4
|
||||
(word) main::v#2 ← (word~) main::$11
|
||||
(word~) main::$13 ← (word) div10::return#4
|
||||
(word) main::v#2 ← (word~) main::$13
|
||||
*((const nomodify byte*) zp2) ← ++ *((const nomodify byte*) zp2)
|
||||
to:main::@16
|
||||
main::@18: scope:[main] from main::@16
|
||||
(word) main::v#4 ← phi( main::@16/(word) main::v#6 )
|
||||
(word) main::u#9 ← phi( main::@16/(word) main::u#13 )
|
||||
(word~) main::$12 ← ((word)) *((const nomodify byte*) TIMEHI)
|
||||
(word~) main::$13 ← (word~) main::$12 << (number) 8
|
||||
(word~) main::$14 ← ((word)) *((const nomodify byte*) TIMELO)
|
||||
(word~) main::$15 ← (word~) main::$13 + (word~) main::$14
|
||||
(word~) main::$15 ← ((word)) *((const nomodify byte*) TIMEHI)
|
||||
(word~) main::$16 ← (word~) main::$15 << (number) 8
|
||||
(word~) main::$17 ← ((word)) *((const nomodify byte*) TIMELO)
|
||||
(word~) main::$18 ← (word~) main::$16 + (word~) main::$17
|
||||
(byte*) myprintf::dst#1 ← (const byte*) strTemp
|
||||
(byte*) myprintf::str#2 ← (const byte*) main::str1
|
||||
(word) myprintf::w1#1 ← (word) main::u#9
|
||||
(word) myprintf::w2#1 ← (word) main::v#4
|
||||
(word) myprintf::w3#1 ← (word~) main::$15
|
||||
(word) myprintf::w3#1 ← (word~) main::$18
|
||||
call myprintf
|
||||
(byte) myprintf::return#3 ← (byte) myprintf::return#1
|
||||
to:main::@30
|
||||
@ -1464,18 +1464,18 @@ SYMBOL TABLE SSA
|
||||
(signed word()) main()
|
||||
(bool~) main::$0
|
||||
(bool~) main::$1
|
||||
(bool~) main::$10
|
||||
(word~) main::$11
|
||||
(word~) main::$12
|
||||
(bool~) main::$11
|
||||
(bool~) main::$12
|
||||
(word~) main::$13
|
||||
(word~) main::$14
|
||||
(word~) main::$15
|
||||
(word~) main::$16
|
||||
(word~) main::$17
|
||||
(word~) main::$18
|
||||
(word~) main::$2
|
||||
(word~) main::$3
|
||||
(word~) main::$4
|
||||
(word~) main::$5
|
||||
(word~) main::$6
|
||||
(bool~) main::$9
|
||||
(word~) main::$7
|
||||
(label) main::@1
|
||||
(label) main::@13
|
||||
(label) main::@14
|
||||
@ -2493,15 +2493,15 @@ Adding number conversion cast (unumber) $6e85 in (word) main::u#2 ← (number) $
|
||||
Adding number conversion cast (unumber) 0 in *((const nomodify byte*) zp1) ← (number) 0
|
||||
Adding number conversion cast (unumber) $c8 in (bool~) main::$1 ← *((const nomodify byte*) zp2) < (number) $c8
|
||||
Adding number conversion cast (unumber) $a in (word) div16u::divisor#0 ← (number) $a
|
||||
Adding number conversion cast (unumber) 8 in (word~) main::$4 ← (word~) main::$3 << (number) 8
|
||||
Adding number conversion cast (unumber) 8 in (word~) main::$5 ← (word~) main::$4 << (number) 8
|
||||
Adding number conversion cast (unumber) $4d2 in (word) main::u#3 ← (word) main::u#7 - (number) $4d2
|
||||
Adding number conversion cast (unumber) $a in (bool~) main::$9 ← *((const nomodify byte*) zp1) < (number) $a
|
||||
Adding number conversion cast (unumber) $a in (bool~) main::$11 ← *((const nomodify byte*) zp1) < (number) $a
|
||||
Adding number conversion cast (unumber) 0 in *((const nomodify byte*) TIMEHI) ← (number) 0
|
||||
Adding number conversion cast (unumber) 0 in *((const nomodify byte*) TIMELO) ← (number) 0
|
||||
Adding number conversion cast (unumber) 0 in *((const nomodify byte*) zp2) ← (number) 0
|
||||
Adding number conversion cast (snumber) 0 in (signed word) main::return#0 ← (number) 0
|
||||
Adding number conversion cast (unumber) $c8 in (bool~) main::$10 ← *((const nomodify byte*) zp2) < (number) $c8
|
||||
Adding number conversion cast (unumber) 8 in (word~) main::$13 ← (word~) main::$12 << (number) 8
|
||||
Adding number conversion cast (unumber) $c8 in (bool~) main::$12 ← *((const nomodify byte*) zp2) < (number) $c8
|
||||
Adding number conversion cast (unumber) 8 in (word~) main::$16 ← (word~) main::$15 << (number) 8
|
||||
Adding number conversion cast (unumber) $4d2 in (word) main::u#4 ← (word) main::u#10 - (number) $4d2
|
||||
Successful SSA optimization PassNAddNumberTypeConversions
|
||||
Adding number conversion cast (unumber) $57 in (unumber~) myprintf::$22 ← (number) $57
|
||||
@ -2542,14 +2542,14 @@ Inlining cast *((const nomodify byte*) zp2) ← (unumber)(number) 0
|
||||
Inlining cast (word) main::u#2 ← (unumber)(number) $6e85
|
||||
Inlining cast *((const nomodify byte*) zp1) ← (unumber)(number) 0
|
||||
Inlining cast (word) div16u::divisor#0 ← (unumber)(number) $a
|
||||
Inlining cast (word~) main::$3 ← (word)*((const nomodify byte*) TIMEHI)
|
||||
Inlining cast (word~) main::$5 ← (word)*((const nomodify byte*) TIMELO)
|
||||
Inlining cast (word~) main::$4 ← (word)*((const nomodify byte*) TIMEHI)
|
||||
Inlining cast (word~) main::$6 ← (word)*((const nomodify byte*) TIMELO)
|
||||
Inlining cast *((const nomodify byte*) TIMEHI) ← (unumber)(number) 0
|
||||
Inlining cast *((const nomodify byte*) TIMELO) ← (unumber)(number) 0
|
||||
Inlining cast *((const nomodify byte*) zp2) ← (unumber)(number) 0
|
||||
Inlining cast (signed word) main::return#0 ← (snumber)(number) 0
|
||||
Inlining cast (word~) main::$12 ← (word)*((const nomodify byte*) TIMEHI)
|
||||
Inlining cast (word~) main::$14 ← (word)*((const nomodify byte*) TIMELO)
|
||||
Inlining cast (word~) main::$15 ← (word)*((const nomodify byte*) TIMEHI)
|
||||
Inlining cast (word~) main::$17 ← (word)*((const nomodify byte*) TIMELO)
|
||||
Successful SSA optimization Pass2InlineCast
|
||||
Simplifying constant pointer cast (byte*) 97
|
||||
Simplifying constant pointer cast (byte*) 98
|
||||
@ -2856,14 +2856,14 @@ Alias main::u#11 = main::u#5 main::u#16 main::u#6 main::u#12 main::u#7
|
||||
Alias div16u::return#2 = div16u::return#4
|
||||
Alias main::v#1 = main::$2
|
||||
Alias main::v#11 = main::v#3 main::v#5 main::v#14
|
||||
Alias myprintf::w3#0 = main::$6
|
||||
Alias myprintf::w3#0 = main::$7
|
||||
Alias main::u#17 = main::u#20
|
||||
Alias main::v#10 = main::v#8
|
||||
Alias main::u#10 = main::u#8 main::u#13 main::u#18 main::u#9 main::u#14
|
||||
Alias div10::return#2 = div10::return#4
|
||||
Alias main::v#2 = main::$11
|
||||
Alias main::v#2 = main::$13
|
||||
Alias main::v#13 = main::v#4 main::v#6 main::v#15
|
||||
Alias myprintf::w3#1 = main::$15
|
||||
Alias myprintf::w3#1 = main::$18
|
||||
Alias main::return#0 = main::return#3 main::return#1
|
||||
Successful SSA optimization Pass2AliasElimination
|
||||
Alias candidate removed (phi-usage) myprintf::w1#10 = myprintf::w1#29 myprintf::w1#18 myprintf::w1#12 myprintf::w1#13
|
||||
@ -3028,8 +3028,8 @@ Simple Condition (bool~) myprintf::$53 [223] if((byte) myprintf::bArg#10==(byte)
|
||||
Simple Condition (bool~) myprintf::$54 [225] if((byte) myprintf::bArg#10==(byte) 1) goto myprintf::@69
|
||||
Simple Condition (bool~) main::$0 [253] if(*((const nomodify byte*) zp1)<(byte) $a) goto main::@2
|
||||
Simple Condition (bool~) main::$1 [261] if(*((const nomodify byte*) zp2)<(byte) $c8) goto main::@5
|
||||
Simple Condition (bool~) main::$9 [283] if(*((const nomodify byte*) zp1)<(byte) $a) goto main::@14
|
||||
Simple Condition (bool~) main::$10 [290] if(*((const nomodify byte*) zp2)<(byte) $c8) goto main::@17
|
||||
Simple Condition (bool~) main::$11 [283] if(*((const nomodify byte*) zp1)<(byte) $a) goto main::@14
|
||||
Simple Condition (bool~) main::$12 [290] if(*((const nomodify byte*) zp2)<(byte) $c8) goto main::@17
|
||||
Successful SSA optimization Pass2ConditionalJumpSimplification
|
||||
Rewriting ! if()-condition to reversed if() [43] (bool~) utoa::$3 ← ! (bool~) utoa::$2
|
||||
Rewriting || if()-condition to two if()s [42] (bool~) utoa::$2 ← (bool~) utoa::$0 || (bool~) utoa::$1
|
||||
@ -3544,10 +3544,10 @@ main::@9: scope:[main] from main::@15 main::@8
|
||||
[16] if(*((const nomodify byte*) zp2)<(byte) $c8) goto main::@10
|
||||
to:main::@11
|
||||
main::@11: scope:[main] from main::@9
|
||||
[17] (word~) main::$12 ← (word)*((const nomodify byte*) TIMEHI)
|
||||
[18] (word~) main::$13 ← (word~) main::$12 << (byte) 8
|
||||
[19] (word~) main::$14 ← (word)*((const nomodify byte*) TIMELO)
|
||||
[20] (word) myprintf::w3#1 ← (word~) main::$13 + (word~) main::$14
|
||||
[17] (word~) main::$15 ← (word)*((const nomodify byte*) TIMEHI)
|
||||
[18] (word~) main::$16 ← (word~) main::$15 << (byte) 8
|
||||
[19] (word~) main::$17 ← (word)*((const nomodify byte*) TIMELO)
|
||||
[20] (word) myprintf::w3#1 ← (word~) main::$16 + (word~) main::$17
|
||||
[21] (word) myprintf::w1#1 ← (word) main::u#17
|
||||
[22] (word) myprintf::w2#1 ← (word) main::v#13
|
||||
[23] call myprintf
|
||||
@ -3579,10 +3579,10 @@ main::@4: scope:[main] from main::@12 main::@2
|
||||
[37] if(*((const nomodify byte*) zp2)<(byte) $c8) goto main::@5
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main::@4
|
||||
[38] (word~) main::$3 ← (word)*((const nomodify byte*) TIMEHI)
|
||||
[39] (word~) main::$4 ← (word~) main::$3 << (byte) 8
|
||||
[40] (word~) main::$5 ← (word)*((const nomodify byte*) TIMELO)
|
||||
[41] (word) myprintf::w3#0 ← (word~) main::$4 + (word~) main::$5
|
||||
[38] (word~) main::$4 ← (word)*((const nomodify byte*) TIMEHI)
|
||||
[39] (word~) main::$5 ← (word~) main::$4 << (byte) 8
|
||||
[40] (word~) main::$6 ← (word)*((const nomodify byte*) TIMELO)
|
||||
[41] (word) myprintf::w3#0 ← (word~) main::$5 + (word~) main::$6
|
||||
[42] (word) myprintf::w1#0 ← (word) main::u#15
|
||||
[43] (word) myprintf::w2#0 ← (word) main::v#11
|
||||
[44] call myprintf
|
||||
@ -4056,12 +4056,12 @@ VARIABLE REGISTER WEIGHTS
|
||||
(word) divr16u::return#0 6.00020008E7
|
||||
(word) divr16u::return#2 20002.0
|
||||
(signed word()) main()
|
||||
(word~) main::$12 202.0
|
||||
(word~) main::$13 101.0
|
||||
(word~) main::$14 202.0
|
||||
(word~) main::$3 202.0
|
||||
(word~) main::$4 101.0
|
||||
(word~) main::$5 202.0
|
||||
(word~) main::$15 202.0
|
||||
(word~) main::$16 101.0
|
||||
(word~) main::$17 202.0
|
||||
(word~) main::$4 202.0
|
||||
(word~) main::$5 101.0
|
||||
(word~) main::$6 202.0
|
||||
(signed word) main::return
|
||||
(word) main::u
|
||||
(word) main::u#15 62.09523809523809
|
||||
@ -4217,14 +4217,14 @@ Initial phi equivalence classes
|
||||
[ append::dst#4 append::dst#1 append::dst#2 append::dst#3 ]
|
||||
[ append::sub#6 ]
|
||||
[ append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ]
|
||||
Added variable main::$12 to live range equivalence class [ main::$12 ]
|
||||
Added variable main::$13 to live range equivalence class [ main::$13 ]
|
||||
Added variable main::$14 to live range equivalence class [ main::$14 ]
|
||||
Added variable main::$15 to live range equivalence class [ main::$15 ]
|
||||
Added variable main::$16 to live range equivalence class [ main::$16 ]
|
||||
Added variable main::$17 to live range equivalence class [ main::$17 ]
|
||||
Added variable div10::val#4 to live range equivalence class [ div10::val#4 ]
|
||||
Added variable div10::return#2 to live range equivalence class [ div10::return#2 ]
|
||||
Added variable main::$3 to live range equivalence class [ main::$3 ]
|
||||
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::$6 to live range equivalence class [ main::$6 ]
|
||||
Added variable div16u::dividend#0 to live range equivalence class [ div16u::dividend#0 ]
|
||||
Added variable div16u::return#2 to live range equivalence class [ div16u::return#2 ]
|
||||
Added variable divr16u::return#2 to live range equivalence class [ divr16u::return#2 ]
|
||||
@ -4287,14 +4287,14 @@ Complete equivalence classes
|
||||
[ append::dst#4 append::dst#1 append::dst#2 append::dst#3 ]
|
||||
[ append::sub#6 ]
|
||||
[ append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ]
|
||||
[ main::$12 ]
|
||||
[ main::$13 ]
|
||||
[ main::$14 ]
|
||||
[ main::$15 ]
|
||||
[ main::$16 ]
|
||||
[ main::$17 ]
|
||||
[ div10::val#4 ]
|
||||
[ div10::return#2 ]
|
||||
[ main::$3 ]
|
||||
[ main::$4 ]
|
||||
[ main::$5 ]
|
||||
[ main::$6 ]
|
||||
[ div16u::dividend#0 ]
|
||||
[ div16u::return#2 ]
|
||||
[ divr16u::return#2 ]
|
||||
@ -4356,14 +4356,14 @@ Allocated zp[2]:40 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst
|
||||
Allocated zp[2]:42 [ append::dst#4 append::dst#1 append::dst#2 append::dst#3 ]
|
||||
Allocated zp[2]:44 [ append::sub#6 ]
|
||||
Allocated zp[2]:46 [ append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ]
|
||||
Allocated zp[2]:48 [ main::$12 ]
|
||||
Allocated zp[2]:50 [ main::$13 ]
|
||||
Allocated zp[2]:52 [ main::$14 ]
|
||||
Allocated zp[2]:48 [ main::$15 ]
|
||||
Allocated zp[2]:50 [ main::$16 ]
|
||||
Allocated zp[2]:52 [ main::$17 ]
|
||||
Allocated zp[2]:54 [ div10::val#4 ]
|
||||
Allocated zp[2]:56 [ div10::return#2 ]
|
||||
Allocated zp[2]:58 [ main::$3 ]
|
||||
Allocated zp[2]:60 [ main::$4 ]
|
||||
Allocated zp[2]:62 [ main::$5 ]
|
||||
Allocated zp[2]:58 [ main::$4 ]
|
||||
Allocated zp[2]:60 [ main::$5 ]
|
||||
Allocated zp[2]:62 [ main::$6 ]
|
||||
Allocated zp[2]:64 [ div16u::dividend#0 ]
|
||||
Allocated zp[2]:66 [ div16u::return#2 ]
|
||||
Allocated zp[2]:68 [ divr16u::return#2 ]
|
||||
@ -4426,12 +4426,12 @@ __bend_from___b1:
|
||||
__bend:
|
||||
// main
|
||||
main: {
|
||||
.label __3 = $3a
|
||||
.label __4 = $3c
|
||||
.label __5 = $3e
|
||||
.label __12 = $30
|
||||
.label __13 = $32
|
||||
.label __14 = $34
|
||||
.label __4 = $3a
|
||||
.label __5 = $3c
|
||||
.label __6 = $3e
|
||||
.label __15 = $30
|
||||
.label __16 = $32
|
||||
.label __17 = $34
|
||||
.label v = 6
|
||||
// test performance of 'div16u(10)'
|
||||
// test performance of 'div10'
|
||||
@ -4515,28 +4515,28 @@ main: {
|
||||
jmp __b11
|
||||
// main::@11
|
||||
__b11:
|
||||
// [17] (word~) main::$12 ← (word)*((const nomodify byte*) TIMEHI) -- vwuz1=_word__deref_pbuc1
|
||||
// [17] (word~) main::$15 ← (word)*((const nomodify byte*) TIMEHI) -- vwuz1=_word__deref_pbuc1
|
||||
lda TIMEHI
|
||||
sta.z __12
|
||||
sta.z __15
|
||||
lda #0
|
||||
sta.z __12+1
|
||||
// [18] (word~) main::$13 ← (word~) main::$12 << (byte) 8 -- vwuz1=vwuz2_rol_8
|
||||
lda.z __12
|
||||
sta.z __13+1
|
||||
sta.z __15+1
|
||||
// [18] (word~) main::$16 ← (word~) main::$15 << (byte) 8 -- vwuz1=vwuz2_rol_8
|
||||
lda.z __15
|
||||
sta.z __16+1
|
||||
lda #0
|
||||
sta.z __13
|
||||
// [19] (word~) main::$14 ← (word)*((const nomodify byte*) TIMELO) -- vwuz1=_word__deref_pbuc1
|
||||
sta.z __16
|
||||
// [19] (word~) main::$17 ← (word)*((const nomodify byte*) TIMELO) -- vwuz1=_word__deref_pbuc1
|
||||
lda TIMELO
|
||||
sta.z __14
|
||||
sta.z __17
|
||||
lda #0
|
||||
sta.z __14+1
|
||||
// [20] (word) myprintf::w3#1 ← (word~) main::$13 + (word~) main::$14 -- vwuz1=vwuz2_plus_vwuz3
|
||||
lda.z __13
|
||||
sta.z __17+1
|
||||
// [20] (word) myprintf::w3#1 ← (word~) main::$16 + (word~) main::$17 -- vwuz1=vwuz2_plus_vwuz3
|
||||
lda.z __16
|
||||
clc
|
||||
adc.z __14
|
||||
adc.z __17
|
||||
sta.z myprintf.w3
|
||||
lda.z __13+1
|
||||
adc.z __14+1
|
||||
lda.z __16+1
|
||||
adc.z __17+1
|
||||
sta.z myprintf.w3+1
|
||||
// [21] (word) myprintf::w1#1 ← (word) main::u#17 -- vwuz1=vwuz2
|
||||
lda.z u_1
|
||||
@ -4635,28 +4635,28 @@ main: {
|
||||
jmp __b6
|
||||
// main::@6
|
||||
__b6:
|
||||
// [38] (word~) main::$3 ← (word)*((const nomodify byte*) TIMEHI) -- vwuz1=_word__deref_pbuc1
|
||||
// [38] (word~) main::$4 ← (word)*((const nomodify byte*) TIMEHI) -- vwuz1=_word__deref_pbuc1
|
||||
lda TIMEHI
|
||||
sta.z __3
|
||||
lda #0
|
||||
sta.z __3+1
|
||||
// [39] (word~) main::$4 ← (word~) main::$3 << (byte) 8 -- vwuz1=vwuz2_rol_8
|
||||
lda.z __3
|
||||
sta.z __4+1
|
||||
lda #0
|
||||
sta.z __4
|
||||
// [40] (word~) main::$5 ← (word)*((const nomodify byte*) TIMELO) -- vwuz1=_word__deref_pbuc1
|
||||
lda TIMELO
|
||||
sta.z __5
|
||||
lda #0
|
||||
sta.z __5+1
|
||||
// [41] (word) myprintf::w3#0 ← (word~) main::$4 + (word~) main::$5 -- vwuz1=vwuz2_plus_vwuz3
|
||||
sta.z __4+1
|
||||
// [39] (word~) main::$5 ← (word~) main::$4 << (byte) 8 -- vwuz1=vwuz2_rol_8
|
||||
lda.z __4
|
||||
sta.z __5+1
|
||||
lda #0
|
||||
sta.z __5
|
||||
// [40] (word~) main::$6 ← (word)*((const nomodify byte*) TIMELO) -- vwuz1=_word__deref_pbuc1
|
||||
lda TIMELO
|
||||
sta.z __6
|
||||
lda #0
|
||||
sta.z __6+1
|
||||
// [41] (word) myprintf::w3#0 ← (word~) main::$5 + (word~) main::$6 -- vwuz1=vwuz2_plus_vwuz3
|
||||
lda.z __5
|
||||
clc
|
||||
adc.z __5
|
||||
adc.z __6
|
||||
sta.z myprintf.w3
|
||||
lda.z __4+1
|
||||
adc.z __5+1
|
||||
lda.z __5+1
|
||||
adc.z __6+1
|
||||
sta.z myprintf.w3+1
|
||||
// [42] (word) myprintf::w1#0 ← (word) main::u#15 -- vwuz1=vwuz2
|
||||
lda.z u
|
||||
@ -6020,10 +6020,10 @@ Statement [12] *((const nomodify byte*) TIMEHI) ← (byte) 0 [ main::u#17 main::
|
||||
Statement [13] *((const nomodify byte*) TIMELO) ← (byte) 0 [ main::u#17 main::v#10 ] ( main:2 [ main::u#17 main::v#10 ] { } ) always clobbers reg byte a
|
||||
Statement [14] *((const nomodify byte*) zp2) ← (byte) 0 [ main::u#17 main::v#10 ] ( main:2 [ main::u#17 main::v#10 ] { } ) always clobbers reg byte a
|
||||
Statement [16] if(*((const nomodify byte*) zp2)<(byte) $c8) goto main::@10 [ main::u#17 main::v#13 ] ( main:2 [ main::u#17 main::v#13 ] { } ) always clobbers reg byte a
|
||||
Statement [17] (word~) main::$12 ← (word)*((const nomodify byte*) TIMEHI) [ main::u#17 main::v#13 main::$12 ] ( main:2 [ main::u#17 main::v#13 main::$12 ] { { myprintf::w1#1 = myprintf::w1#7 main::u#17 } { myprintf::w2#1 = myprintf::w2#8 main::v#13 } { myprintf::w3#1 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [18] (word~) main::$13 ← (word~) main::$12 << (byte) 8 [ main::u#17 main::v#13 main::$13 ] ( main:2 [ main::u#17 main::v#13 main::$13 ] { { myprintf::w1#1 = myprintf::w1#7 main::u#17 } { myprintf::w2#1 = myprintf::w2#8 main::v#13 } { myprintf::w3#1 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [19] (word~) main::$14 ← (word)*((const nomodify byte*) TIMELO) [ main::u#17 main::v#13 main::$13 main::$14 ] ( main:2 [ main::u#17 main::v#13 main::$13 main::$14 ] { { myprintf::w1#1 = myprintf::w1#7 main::u#17 } { myprintf::w2#1 = myprintf::w2#8 main::v#13 } { myprintf::w3#1 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [20] (word) myprintf::w3#1 ← (word~) main::$13 + (word~) main::$14 [ main::u#17 main::v#13 myprintf::w3#1 ] ( main:2 [ main::u#17 main::v#13 myprintf::w3#1 ] { { myprintf::w1#1 = myprintf::w1#7 main::u#17 } { myprintf::w2#1 = myprintf::w2#8 main::v#13 } { myprintf::w3#1 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [17] (word~) main::$15 ← (word)*((const nomodify byte*) TIMEHI) [ main::u#17 main::v#13 main::$15 ] ( main:2 [ main::u#17 main::v#13 main::$15 ] { { myprintf::w1#1 = myprintf::w1#7 main::u#17 } { myprintf::w2#1 = myprintf::w2#8 main::v#13 } { myprintf::w3#1 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [18] (word~) main::$16 ← (word~) main::$15 << (byte) 8 [ main::u#17 main::v#13 main::$16 ] ( main:2 [ main::u#17 main::v#13 main::$16 ] { { myprintf::w1#1 = myprintf::w1#7 main::u#17 } { myprintf::w2#1 = myprintf::w2#8 main::v#13 } { myprintf::w3#1 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [19] (word~) main::$17 ← (word)*((const nomodify byte*) TIMELO) [ main::u#17 main::v#13 main::$16 main::$17 ] ( main:2 [ main::u#17 main::v#13 main::$16 main::$17 ] { { myprintf::w1#1 = myprintf::w1#7 main::u#17 } { myprintf::w2#1 = myprintf::w2#8 main::v#13 } { myprintf::w3#1 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [20] (word) myprintf::w3#1 ← (word~) main::$16 + (word~) main::$17 [ main::u#17 main::v#13 myprintf::w3#1 ] ( main:2 [ main::u#17 main::v#13 myprintf::w3#1 ] { { myprintf::w1#1 = myprintf::w1#7 main::u#17 } { myprintf::w2#1 = myprintf::w2#8 main::v#13 } { myprintf::w3#1 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [21] (word) myprintf::w1#1 ← (word) main::u#17 [ main::u#17 main::v#13 myprintf::w3#1 myprintf::w1#1 ] ( main:2 [ main::u#17 main::v#13 myprintf::w3#1 myprintf::w1#1 ] { { myprintf::w1#1 = myprintf::w1#7 main::u#17 } { myprintf::w2#1 = myprintf::w2#8 main::v#13 } { myprintf::w3#1 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [22] (word) myprintf::w2#1 ← (word) main::v#13 [ main::u#17 main::v#13 myprintf::w3#1 myprintf::w1#1 myprintf::w2#1 ] ( main:2 [ main::u#17 main::v#13 myprintf::w3#1 myprintf::w1#1 myprintf::w2#1 ] { { myprintf::w1#1 = myprintf::w1#7 main::u#17 } { myprintf::w2#1 = myprintf::w2#8 main::v#13 } { myprintf::w3#1 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [26] (word) main::u#4 ← (word) main::u#17 - (word) $4d2 [ main::u#4 main::v#13 ] ( main:2 [ main::u#4 main::v#13 ] { } ) always clobbers reg byte a
|
||||
@ -6034,10 +6034,10 @@ Statement [33] *((const nomodify byte*) TIMEHI) ← (byte) 0 [ main::u#15 main::
|
||||
Statement [34] *((const nomodify byte*) TIMELO) ← (byte) 0 [ main::u#15 main::v#12 ] ( main:2 [ main::u#15 main::v#12 ] { } ) always clobbers reg byte a
|
||||
Statement [35] *((const nomodify byte*) zp2) ← (byte) 0 [ main::u#15 main::v#12 ] ( main:2 [ main::u#15 main::v#12 ] { } ) always clobbers reg byte a
|
||||
Statement [37] if(*((const nomodify byte*) zp2)<(byte) $c8) goto main::@5 [ main::u#15 main::v#11 ] ( main:2 [ main::u#15 main::v#11 ] { } ) always clobbers reg byte a
|
||||
Statement [38] (word~) main::$3 ← (word)*((const nomodify byte*) TIMEHI) [ main::u#15 main::v#11 main::$3 ] ( main:2 [ main::u#15 main::v#11 main::$3 ] { { myprintf::w1#0 = myprintf::w1#7 main::u#15 } { myprintf::w2#0 = myprintf::w2#8 main::v#11 } { myprintf::w3#0 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [39] (word~) main::$4 ← (word~) main::$3 << (byte) 8 [ main::u#15 main::v#11 main::$4 ] ( main:2 [ main::u#15 main::v#11 main::$4 ] { { myprintf::w1#0 = myprintf::w1#7 main::u#15 } { myprintf::w2#0 = myprintf::w2#8 main::v#11 } { myprintf::w3#0 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [40] (word~) main::$5 ← (word)*((const nomodify byte*) TIMELO) [ main::u#15 main::v#11 main::$4 main::$5 ] ( main:2 [ main::u#15 main::v#11 main::$4 main::$5 ] { { myprintf::w1#0 = myprintf::w1#7 main::u#15 } { myprintf::w2#0 = myprintf::w2#8 main::v#11 } { myprintf::w3#0 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [41] (word) myprintf::w3#0 ← (word~) main::$4 + (word~) main::$5 [ main::u#15 main::v#11 myprintf::w3#0 ] ( main:2 [ main::u#15 main::v#11 myprintf::w3#0 ] { { myprintf::w1#0 = myprintf::w1#7 main::u#15 } { myprintf::w2#0 = myprintf::w2#8 main::v#11 } { myprintf::w3#0 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [38] (word~) main::$4 ← (word)*((const nomodify byte*) TIMEHI) [ main::u#15 main::v#11 main::$4 ] ( main:2 [ main::u#15 main::v#11 main::$4 ] { { myprintf::w1#0 = myprintf::w1#7 main::u#15 } { myprintf::w2#0 = myprintf::w2#8 main::v#11 } { myprintf::w3#0 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [39] (word~) main::$5 ← (word~) main::$4 << (byte) 8 [ main::u#15 main::v#11 main::$5 ] ( main:2 [ main::u#15 main::v#11 main::$5 ] { { myprintf::w1#0 = myprintf::w1#7 main::u#15 } { myprintf::w2#0 = myprintf::w2#8 main::v#11 } { myprintf::w3#0 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [40] (word~) main::$6 ← (word)*((const nomodify byte*) TIMELO) [ main::u#15 main::v#11 main::$5 main::$6 ] ( main:2 [ main::u#15 main::v#11 main::$5 main::$6 ] { { myprintf::w1#0 = myprintf::w1#7 main::u#15 } { myprintf::w2#0 = myprintf::w2#8 main::v#11 } { myprintf::w3#0 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [41] (word) myprintf::w3#0 ← (word~) main::$5 + (word~) main::$6 [ main::u#15 main::v#11 myprintf::w3#0 ] ( main:2 [ main::u#15 main::v#11 myprintf::w3#0 ] { { myprintf::w1#0 = myprintf::w1#7 main::u#15 } { myprintf::w2#0 = myprintf::w2#8 main::v#11 } { myprintf::w3#0 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [42] (word) myprintf::w1#0 ← (word) main::u#15 [ main::u#15 main::v#11 myprintf::w3#0 myprintf::w1#0 ] ( main:2 [ main::u#15 main::v#11 myprintf::w3#0 myprintf::w1#0 ] { { myprintf::w1#0 = myprintf::w1#7 main::u#15 } { myprintf::w2#0 = myprintf::w2#8 main::v#11 } { myprintf::w3#0 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [43] (word) myprintf::w2#0 ← (word) main::v#11 [ main::u#15 main::v#11 myprintf::w3#0 myprintf::w1#0 myprintf::w2#0 ] ( main:2 [ main::u#15 main::v#11 myprintf::w3#0 myprintf::w1#0 myprintf::w2#0 ] { { myprintf::w1#0 = myprintf::w1#7 main::u#15 } { myprintf::w2#0 = myprintf::w2#8 main::v#11 } { myprintf::w3#0 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [47] (word) main::u#3 ← (word) main::u#15 - (word) $4d2 [ main::u#3 main::v#11 ] ( main:2 [ main::u#3 main::v#11 ] { } ) always clobbers reg byte a
|
||||
@ -6130,10 +6130,10 @@ Statement [12] *((const nomodify byte*) TIMEHI) ← (byte) 0 [ main::u#17 main::
|
||||
Statement [13] *((const nomodify byte*) TIMELO) ← (byte) 0 [ main::u#17 main::v#10 ] ( main:2 [ main::u#17 main::v#10 ] { } ) always clobbers reg byte a
|
||||
Statement [14] *((const nomodify byte*) zp2) ← (byte) 0 [ main::u#17 main::v#10 ] ( main:2 [ main::u#17 main::v#10 ] { } ) always clobbers reg byte a
|
||||
Statement [16] if(*((const nomodify byte*) zp2)<(byte) $c8) goto main::@10 [ main::u#17 main::v#13 ] ( main:2 [ main::u#17 main::v#13 ] { } ) always clobbers reg byte a
|
||||
Statement [17] (word~) main::$12 ← (word)*((const nomodify byte*) TIMEHI) [ main::u#17 main::v#13 main::$12 ] ( main:2 [ main::u#17 main::v#13 main::$12 ] { { myprintf::w1#1 = myprintf::w1#7 main::u#17 } { myprintf::w2#1 = myprintf::w2#8 main::v#13 } { myprintf::w3#1 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [18] (word~) main::$13 ← (word~) main::$12 << (byte) 8 [ main::u#17 main::v#13 main::$13 ] ( main:2 [ main::u#17 main::v#13 main::$13 ] { { myprintf::w1#1 = myprintf::w1#7 main::u#17 } { myprintf::w2#1 = myprintf::w2#8 main::v#13 } { myprintf::w3#1 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [19] (word~) main::$14 ← (word)*((const nomodify byte*) TIMELO) [ main::u#17 main::v#13 main::$13 main::$14 ] ( main:2 [ main::u#17 main::v#13 main::$13 main::$14 ] { { myprintf::w1#1 = myprintf::w1#7 main::u#17 } { myprintf::w2#1 = myprintf::w2#8 main::v#13 } { myprintf::w3#1 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [20] (word) myprintf::w3#1 ← (word~) main::$13 + (word~) main::$14 [ main::u#17 main::v#13 myprintf::w3#1 ] ( main:2 [ main::u#17 main::v#13 myprintf::w3#1 ] { { myprintf::w1#1 = myprintf::w1#7 main::u#17 } { myprintf::w2#1 = myprintf::w2#8 main::v#13 } { myprintf::w3#1 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [17] (word~) main::$15 ← (word)*((const nomodify byte*) TIMEHI) [ main::u#17 main::v#13 main::$15 ] ( main:2 [ main::u#17 main::v#13 main::$15 ] { { myprintf::w1#1 = myprintf::w1#7 main::u#17 } { myprintf::w2#1 = myprintf::w2#8 main::v#13 } { myprintf::w3#1 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [18] (word~) main::$16 ← (word~) main::$15 << (byte) 8 [ main::u#17 main::v#13 main::$16 ] ( main:2 [ main::u#17 main::v#13 main::$16 ] { { myprintf::w1#1 = myprintf::w1#7 main::u#17 } { myprintf::w2#1 = myprintf::w2#8 main::v#13 } { myprintf::w3#1 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [19] (word~) main::$17 ← (word)*((const nomodify byte*) TIMELO) [ main::u#17 main::v#13 main::$16 main::$17 ] ( main:2 [ main::u#17 main::v#13 main::$16 main::$17 ] { { myprintf::w1#1 = myprintf::w1#7 main::u#17 } { myprintf::w2#1 = myprintf::w2#8 main::v#13 } { myprintf::w3#1 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [20] (word) myprintf::w3#1 ← (word~) main::$16 + (word~) main::$17 [ main::u#17 main::v#13 myprintf::w3#1 ] ( main:2 [ main::u#17 main::v#13 myprintf::w3#1 ] { { myprintf::w1#1 = myprintf::w1#7 main::u#17 } { myprintf::w2#1 = myprintf::w2#8 main::v#13 } { myprintf::w3#1 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [21] (word) myprintf::w1#1 ← (word) main::u#17 [ main::u#17 main::v#13 myprintf::w3#1 myprintf::w1#1 ] ( main:2 [ main::u#17 main::v#13 myprintf::w3#1 myprintf::w1#1 ] { { myprintf::w1#1 = myprintf::w1#7 main::u#17 } { myprintf::w2#1 = myprintf::w2#8 main::v#13 } { myprintf::w3#1 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [22] (word) myprintf::w2#1 ← (word) main::v#13 [ main::u#17 main::v#13 myprintf::w3#1 myprintf::w1#1 myprintf::w2#1 ] ( main:2 [ main::u#17 main::v#13 myprintf::w3#1 myprintf::w1#1 myprintf::w2#1 ] { { myprintf::w1#1 = myprintf::w1#7 main::u#17 } { myprintf::w2#1 = myprintf::w2#8 main::v#13 } { myprintf::w3#1 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [26] (word) main::u#4 ← (word) main::u#17 - (word) $4d2 [ main::u#4 main::v#13 ] ( main:2 [ main::u#4 main::v#13 ] { } ) always clobbers reg byte a
|
||||
@ -6144,10 +6144,10 @@ Statement [33] *((const nomodify byte*) TIMEHI) ← (byte) 0 [ main::u#15 main::
|
||||
Statement [34] *((const nomodify byte*) TIMELO) ← (byte) 0 [ main::u#15 main::v#12 ] ( main:2 [ main::u#15 main::v#12 ] { } ) always clobbers reg byte a
|
||||
Statement [35] *((const nomodify byte*) zp2) ← (byte) 0 [ main::u#15 main::v#12 ] ( main:2 [ main::u#15 main::v#12 ] { } ) always clobbers reg byte a
|
||||
Statement [37] if(*((const nomodify byte*) zp2)<(byte) $c8) goto main::@5 [ main::u#15 main::v#11 ] ( main:2 [ main::u#15 main::v#11 ] { } ) always clobbers reg byte a
|
||||
Statement [38] (word~) main::$3 ← (word)*((const nomodify byte*) TIMEHI) [ main::u#15 main::v#11 main::$3 ] ( main:2 [ main::u#15 main::v#11 main::$3 ] { { myprintf::w1#0 = myprintf::w1#7 main::u#15 } { myprintf::w2#0 = myprintf::w2#8 main::v#11 } { myprintf::w3#0 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [39] (word~) main::$4 ← (word~) main::$3 << (byte) 8 [ main::u#15 main::v#11 main::$4 ] ( main:2 [ main::u#15 main::v#11 main::$4 ] { { myprintf::w1#0 = myprintf::w1#7 main::u#15 } { myprintf::w2#0 = myprintf::w2#8 main::v#11 } { myprintf::w3#0 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [40] (word~) main::$5 ← (word)*((const nomodify byte*) TIMELO) [ main::u#15 main::v#11 main::$4 main::$5 ] ( main:2 [ main::u#15 main::v#11 main::$4 main::$5 ] { { myprintf::w1#0 = myprintf::w1#7 main::u#15 } { myprintf::w2#0 = myprintf::w2#8 main::v#11 } { myprintf::w3#0 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [41] (word) myprintf::w3#0 ← (word~) main::$4 + (word~) main::$5 [ main::u#15 main::v#11 myprintf::w3#0 ] ( main:2 [ main::u#15 main::v#11 myprintf::w3#0 ] { { myprintf::w1#0 = myprintf::w1#7 main::u#15 } { myprintf::w2#0 = myprintf::w2#8 main::v#11 } { myprintf::w3#0 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [38] (word~) main::$4 ← (word)*((const nomodify byte*) TIMEHI) [ main::u#15 main::v#11 main::$4 ] ( main:2 [ main::u#15 main::v#11 main::$4 ] { { myprintf::w1#0 = myprintf::w1#7 main::u#15 } { myprintf::w2#0 = myprintf::w2#8 main::v#11 } { myprintf::w3#0 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [39] (word~) main::$5 ← (word~) main::$4 << (byte) 8 [ main::u#15 main::v#11 main::$5 ] ( main:2 [ main::u#15 main::v#11 main::$5 ] { { myprintf::w1#0 = myprintf::w1#7 main::u#15 } { myprintf::w2#0 = myprintf::w2#8 main::v#11 } { myprintf::w3#0 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [40] (word~) main::$6 ← (word)*((const nomodify byte*) TIMELO) [ main::u#15 main::v#11 main::$5 main::$6 ] ( main:2 [ main::u#15 main::v#11 main::$5 main::$6 ] { { myprintf::w1#0 = myprintf::w1#7 main::u#15 } { myprintf::w2#0 = myprintf::w2#8 main::v#11 } { myprintf::w3#0 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [41] (word) myprintf::w3#0 ← (word~) main::$5 + (word~) main::$6 [ main::u#15 main::v#11 myprintf::w3#0 ] ( main:2 [ main::u#15 main::v#11 myprintf::w3#0 ] { { myprintf::w1#0 = myprintf::w1#7 main::u#15 } { myprintf::w2#0 = myprintf::w2#8 main::v#11 } { myprintf::w3#0 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [42] (word) myprintf::w1#0 ← (word) main::u#15 [ main::u#15 main::v#11 myprintf::w3#0 myprintf::w1#0 ] ( main:2 [ main::u#15 main::v#11 myprintf::w3#0 myprintf::w1#0 ] { { myprintf::w1#0 = myprintf::w1#7 main::u#15 } { myprintf::w2#0 = myprintf::w2#8 main::v#11 } { myprintf::w3#0 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [43] (word) myprintf::w2#0 ← (word) main::v#11 [ main::u#15 main::v#11 myprintf::w3#0 myprintf::w1#0 myprintf::w2#0 ] ( main:2 [ main::u#15 main::v#11 myprintf::w3#0 myprintf::w1#0 myprintf::w2#0 ] { { myprintf::w1#0 = myprintf::w1#7 main::u#15 } { myprintf::w2#0 = myprintf::w2#8 main::v#11 } { myprintf::w3#0 = myprintf::w3#8 } } ) always clobbers reg byte a
|
||||
Statement [47] (word) main::u#3 ← (word) main::u#15 - (word) $4d2 [ main::u#3 main::v#11 ] ( main:2 [ main::u#3 main::v#11 ] { } ) always clobbers reg byte a
|
||||
@ -6244,14 +6244,14 @@ Potential registers zp[2]:40 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2
|
||||
Potential registers zp[2]:42 [ append::dst#4 append::dst#1 append::dst#2 append::dst#3 ] : zp[2]:42 ,
|
||||
Potential registers zp[2]:44 [ append::sub#6 ] : zp[2]:44 ,
|
||||
Potential registers zp[2]:46 [ append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ] : zp[2]:46 ,
|
||||
Potential registers zp[2]:48 [ main::$12 ] : zp[2]:48 ,
|
||||
Potential registers zp[2]:50 [ main::$13 ] : zp[2]:50 ,
|
||||
Potential registers zp[2]:52 [ main::$14 ] : zp[2]:52 ,
|
||||
Potential registers zp[2]:48 [ main::$15 ] : zp[2]:48 ,
|
||||
Potential registers zp[2]:50 [ main::$16 ] : zp[2]:50 ,
|
||||
Potential registers zp[2]:52 [ main::$17 ] : zp[2]:52 ,
|
||||
Potential registers zp[2]:54 [ div10::val#4 ] : zp[2]:54 ,
|
||||
Potential registers zp[2]:56 [ div10::return#2 ] : zp[2]:56 ,
|
||||
Potential registers zp[2]:58 [ main::$3 ] : zp[2]:58 ,
|
||||
Potential registers zp[2]:60 [ main::$4 ] : zp[2]:60 ,
|
||||
Potential registers zp[2]:62 [ main::$5 ] : zp[2]:62 ,
|
||||
Potential registers zp[2]:58 [ main::$4 ] : zp[2]:58 ,
|
||||
Potential registers zp[2]:60 [ main::$5 ] : zp[2]:60 ,
|
||||
Potential registers zp[2]:62 [ main::$6 ] : zp[2]:62 ,
|
||||
Potential registers zp[2]:64 [ div16u::dividend#0 ] : zp[2]:64 ,
|
||||
Potential registers zp[2]:66 [ div16u::return#2 ] : zp[2]:66 ,
|
||||
Potential registers zp[2]:68 [ divr16u::return#2 ] : zp[2]:68 ,
|
||||
@ -6291,7 +6291,7 @@ Uplift Scope [utoa] 11,783,345.42: zp[2]:38 [ utoa::value#12 utoa::value#3 utoa:
|
||||
Uplift Scope [myprintf] 9,392,606.94: zp[1]:33 [ myprintf::bLen#32 myprintf::bLen#12 myprintf::bLen#10 myprintf::bLen#28 myprintf::bLen#36 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#13 myprintf::bLen#14 myprintf::bLen#1 myprintf::bLen#4 myprintf::bLen#5 myprintf::bLen#6 ] 7,807,471.22: zp[1]:32 [ myprintf::bDigits#12 myprintf::bDigits#16 myprintf::bDigits#28 myprintf::bDigits#29 myprintf::bDigits#1 myprintf::bDigits#18 myprintf::bDigits#10 myprintf::bDigits#2 myprintf::bDigits#3 ] 3,000,003: zp[1]:34 [ myprintf::digit#3 myprintf::digit#2 ] 2,248,002.32: zp[1]:31 [ myprintf::b#17 myprintf::b#5 ] 1,160,156.53: zp[2]:25 [ myprintf::w#10 myprintf::w#18 myprintf::w#22 myprintf::w#53 myprintf::w#54 myprintf::w#55 ] 1,000,001: zp[1]:35 [ myprintf::$43 ] 625,006.25: zp[1]:36 [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ] 562,005.62: zp[1]:24 [ myprintf::bArg#10 myprintf::bArg#11 myprintf::bArg#1 ] 287,502.88: zp[1]:23 [ myprintf::bFormat#10 myprintf::bFormat#5 ] 271,741.72: zp[1]:28 [ myprintf::bLeadZero#11 myprintf::bLeadZero#20 ] 260,147.53: zp[1]:27 [ myprintf::bTrailing#11 myprintf::bTrailing#24 ] 206,210.86: zp[2]:21 [ myprintf::str#10 myprintf::str#6 myprintf::str#0 ] 200,002: zp[1]:74 [ myprintf::$18 ] 200,002: zp[1]:75 [ myprintf::$19 ] 200,002: zp[1]:77 [ myprintf::$25 ] 200,002: zp[1]:79 [ myprintf::$26 ] 200,002: zp[1]:81 [ myprintf::$32 ] 200,002: zp[1]:82 [ myprintf::$50 ] 100,001: zp[1]:29 [ myprintf::$24 ] 100,001: zp[1]:30 [ myprintf::$31 ] 75,000.75: zp[1]:76 [ myprintf::b#15 ] 75,000.75: zp[1]:80 [ myprintf::b#16 ] 37,500.38: zp[1]:78 [ myprintf::bLen#11 ] 1,672.39: zp[2]:17 [ myprintf::w2#8 myprintf::w2#1 myprintf::w2#0 ] 1,470.39: zp[2]:15 [ myprintf::w1#7 myprintf::w1#1 myprintf::w1#0 ] 1,403.06: zp[2]:19 [ myprintf::w3#8 myprintf::w3#1 myprintf::w3#0 ]
|
||||
Uplift Scope [div10] 20,002: zp[2]:95 [ div10::$0 ] 20,002: zp[2]:99 [ div10::$2 ] 20,002: zp[2]:103 [ div10::$3 ] 20,002: zp[2]:107 [ div10::$4 ] 20,002: zp[2]:109 [ div10::val#3 ] 15,001.5: zp[2]:97 [ div10::val#0 ] 15,001.5: zp[2]:101 [ div10::val#1 ] 15,001.5: zp[2]:105 [ div10::val#2 ] 11,002: zp[2]:54 [ div10::val#4 ] 3,667.33: zp[2]:111 [ div10::return#0 ] 2,002: zp[2]:56 [ div10::return#2 ]
|
||||
Uplift Scope [div16u] 11,002: zp[2]:64 [ div16u::dividend#0 ] 3,667.33: zp[2]:70 [ div16u::return#0 ] 2,002: zp[2]:66 [ div16u::return#2 ]
|
||||
Uplift Scope [main] 2,280.72: zp[2]:6 [ main::v#10 main::v#12 main::v#11 main::v#13 main::v#2 main::v#1 ] 202: zp[2]:48 [ main::$12 ] 202: zp[2]:52 [ main::$14 ] 202: zp[2]:58 [ main::$3 ] 202: zp[2]:62 [ main::$5 ] 163.1: zp[2]:2 [ main::u#15 main::u#3 ] 163.1: zp[2]:4 [ main::u#17 main::u#4 ] 101: zp[2]:50 [ main::$13 ] 101: zp[2]:60 [ main::$4 ]
|
||||
Uplift Scope [main] 2,280.72: zp[2]:6 [ main::v#10 main::v#12 main::v#11 main::v#13 main::v#2 main::v#1 ] 202: zp[2]:48 [ main::$15 ] 202: zp[2]:52 [ main::$17 ] 202: zp[2]:58 [ main::$4 ] 202: zp[2]:62 [ main::$6 ] 163.1: zp[2]:2 [ main::u#15 main::u#3 ] 163.1: zp[2]:4 [ main::u#17 main::u#4 ] 101: zp[2]:50 [ main::$16 ] 101: zp[2]:60 [ main::$5 ]
|
||||
Uplift Scope [Print]
|
||||
Uplift Scope []
|
||||
|
||||
@ -6300,7 +6300,7 @@ Uplifting [divr16u] best 470278 combination zp[2]:8 [ divr16u::rem#4 divr16u::re
|
||||
Uplifting [utoa] best 470247 combination zp[2]:38 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 ] zp[2]:40 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 ] reg byte x [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] reg byte a [ utoa::$16 ] reg byte a [ utoa::$17 ] zp[2]:85 [ utoa::dst#3 ]
|
||||
Uplifting [div10] best 470247 combination zp[2]:95 [ div10::$0 ] zp[2]:99 [ div10::$2 ] zp[2]:103 [ div10::$3 ] zp[2]:107 [ div10::$4 ] zp[2]:109 [ div10::val#3 ] zp[2]:97 [ div10::val#0 ] zp[2]:101 [ div10::val#1 ] zp[2]:105 [ div10::val#2 ] zp[2]:54 [ div10::val#4 ] zp[2]:111 [ div10::return#0 ] zp[2]:56 [ div10::return#2 ]
|
||||
Uplifting [div16u] best 470247 combination zp[2]:64 [ div16u::dividend#0 ] zp[2]:70 [ div16u::return#0 ] zp[2]:66 [ div16u::return#2 ]
|
||||
Uplifting [main] best 470247 combination zp[2]:6 [ main::v#10 main::v#12 main::v#11 main::v#13 main::v#2 main::v#1 ] zp[2]:48 [ main::$12 ] zp[2]:52 [ main::$14 ] zp[2]:58 [ main::$3 ] zp[2]:62 [ main::$5 ] zp[2]:2 [ main::u#15 main::u#3 ] zp[2]:4 [ main::u#17 main::u#4 ] zp[2]:50 [ main::$13 ] zp[2]:60 [ main::$4 ]
|
||||
Uplifting [main] best 470247 combination zp[2]:6 [ main::v#10 main::v#12 main::v#11 main::v#13 main::v#2 main::v#1 ] zp[2]:48 [ main::$15 ] zp[2]:52 [ main::$17 ] zp[2]:58 [ main::$4 ] zp[2]:62 [ main::$6 ] zp[2]:2 [ main::u#15 main::u#3 ] zp[2]:4 [ main::u#17 main::u#4 ] zp[2]:50 [ main::$16 ] zp[2]:60 [ main::$5 ]
|
||||
Uplifting [Print] best 470247 combination
|
||||
Uplifting [] best 470247 combination
|
||||
Attempting to uplift remaining variables inzp[1]:33 [ myprintf::bLen#32 myprintf::bLen#12 myprintf::bLen#10 myprintf::bLen#28 myprintf::bLen#36 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#13 myprintf::bLen#14 myprintf::bLen#1 myprintf::bLen#4 myprintf::bLen#5 myprintf::bLen#6 ]
|
||||
@ -6354,8 +6354,8 @@ Coalescing zero page register [ zp[2]:4 [ main::u#17 main::u#4 ] ] with [ zp[2]:
|
||||
Coalescing zero page register [ zp[2]:6 [ main::v#10 main::v#12 main::v#11 main::v#13 main::v#2 main::v#1 myprintf::w2#8 myprintf::w2#1 myprintf::w2#0 ] ] with [ zp[2]:56 [ div10::return#2 ] ] - score: 1
|
||||
Coalescing zero page register [ zp[2]:6 [ main::v#10 main::v#12 main::v#11 main::v#13 main::v#2 main::v#1 myprintf::w2#8 myprintf::w2#1 myprintf::w2#0 div10::return#2 ] ] with [ zp[2]:66 [ div16u::return#2 ] ] - score: 1
|
||||
Coalescing zero page register [ zp[2]:12 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] ] with [ zp[2]:68 [ divr16u::return#2 ] ] - score: 1
|
||||
Coalescing zero page register [ zp[2]:19 [ myprintf::w3#8 myprintf::w3#1 myprintf::w3#0 ] ] with [ zp[2]:50 [ main::$13 ] ] - score: 1
|
||||
Coalescing zero page register [ zp[2]:19 [ myprintf::w3#8 myprintf::w3#1 myprintf::w3#0 main::$13 ] ] with [ zp[2]:60 [ main::$4 ] ] - score: 1
|
||||
Coalescing zero page register [ zp[2]:19 [ myprintf::w3#8 myprintf::w3#1 myprintf::w3#0 ] ] with [ zp[2]:50 [ main::$16 ] ] - score: 1
|
||||
Coalescing zero page register [ zp[2]:19 [ myprintf::w3#8 myprintf::w3#1 myprintf::w3#0 main::$16 ] ] with [ zp[2]:60 [ main::$5 ] ] - score: 1
|
||||
Coalescing zero page register [ zp[2]:38 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ] ] with [ zp[2]:87 [ append::return#10 ] ] - score: 1
|
||||
Coalescing zero page register [ zp[2]:38 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 append::return#10 ] ] with [ zp[2]:89 [ append::return#4 ] ] - score: 1
|
||||
Coalescing zero page register [ zp[2]:38 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 append::return#10 append::return#4 ] ] with [ zp[2]:91 [ append::return#3 ] ] - score: 1
|
||||
@ -6368,19 +6368,19 @@ Coalescing zero page register [ zp[2]:107 [ div10::$4 ] ] with [ zp[2]:109 [ div
|
||||
Coalescing zero page register [ zp[2]:2 [ main::u#15 main::u#3 myprintf::w1#7 myprintf::w1#1 myprintf::w1#0 div16u::dividend#0 ] ] with [ zp[2]:4 [ main::u#17 main::u#4 div10::val#4 ] ] - score: 1
|
||||
Coalescing zero page register [ zp[2]:6 [ main::v#10 main::v#12 main::v#11 main::v#13 main::v#2 main::v#1 myprintf::w2#8 myprintf::w2#1 myprintf::w2#0 div10::return#2 div16u::return#2 ] ] with [ zp[2]:70 [ div16u::return#0 ] ] - score: 1
|
||||
Coalescing zero page register [ zp[2]:6 [ main::v#10 main::v#12 main::v#11 main::v#13 main::v#2 main::v#1 myprintf::w2#8 myprintf::w2#1 myprintf::w2#0 div10::return#2 div16u::return#2 div16u::return#0 ] ] with [ zp[2]:111 [ div10::return#0 ] ] - score: 1
|
||||
Coalescing zero page register [ zp[2]:19 [ myprintf::w3#8 myprintf::w3#1 myprintf::w3#0 main::$13 main::$4 ] ] with [ zp[2]:48 [ main::$12 ] ] - score: 1
|
||||
Coalescing zero page register [ zp[2]:19 [ myprintf::w3#8 myprintf::w3#1 myprintf::w3#0 main::$13 main::$4 main::$12 ] ] with [ zp[2]:58 [ main::$3 ] ] - score: 1
|
||||
Coalescing zero page register [ zp[2]:19 [ myprintf::w3#8 myprintf::w3#1 myprintf::w3#0 main::$16 main::$5 ] ] with [ zp[2]:48 [ main::$15 ] ] - score: 1
|
||||
Coalescing zero page register [ zp[2]:19 [ myprintf::w3#8 myprintf::w3#1 myprintf::w3#0 main::$16 main::$5 main::$15 ] ] with [ zp[2]:58 [ main::$4 ] ] - score: 1
|
||||
Coalescing zero page register [ zp[2]:6 [ main::v#10 main::v#12 main::v#11 main::v#13 main::v#2 main::v#1 myprintf::w2#8 myprintf::w2#1 myprintf::w2#0 div10::return#2 div16u::return#2 div16u::return#0 div10::return#0 ] ] with [ zp[2]:12 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 ] ] - score: 1
|
||||
Coalescing zero page register [ zp[2]:6 [ main::v#10 main::v#12 main::v#11 main::v#13 main::v#2 main::v#1 myprintf::w2#8 myprintf::w2#1 myprintf::w2#0 div10::return#2 div16u::return#2 div16u::return#0 div10::return#0 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 ] ] with [ zp[2]:107 [ div10::$4 div10::val#3 ] ] - score: 1
|
||||
Coalescing zero page register [ zp[2]:19 [ myprintf::w3#8 myprintf::w3#1 myprintf::w3#0 main::$13 main::$4 main::$12 main::$3 ] ] with [ zp[2]:8 [ divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] ]
|
||||
Coalescing zero page register [ zp[2]:19 [ myprintf::w3#8 myprintf::w3#1 myprintf::w3#0 main::$16 main::$5 main::$15 main::$4 ] ] with [ zp[2]:8 [ divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] ]
|
||||
Coalescing zero page register [ zp[2]:21 [ myprintf::str#10 myprintf::str#6 myprintf::str#0 ] ] with [ zp[2]:10 [ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 ] ]
|
||||
Coalescing zero page register [ zp[2]:52 [ main::$14 ] ] with [ zp[2]:25 [ myprintf::w#10 myprintf::w#18 myprintf::w#22 myprintf::w#53 myprintf::w#54 myprintf::w#55 ] ]
|
||||
Coalescing zero page register [ zp[2]:62 [ main::$5 ] ] with [ zp[2]:38 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 append::return#10 append::return#4 append::return#3 append::return#2 ] ]
|
||||
Coalescing zero page register [ zp[2]:52 [ main::$17 ] ] with [ zp[2]:25 [ myprintf::w#10 myprintf::w#18 myprintf::w#22 myprintf::w#53 myprintf::w#54 myprintf::w#55 ] ]
|
||||
Coalescing zero page register [ zp[2]:62 [ main::$6 ] ] with [ zp[2]:38 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 append::return#10 append::return#4 append::return#3 append::return#2 ] ]
|
||||
Coalescing zero page register [ zp[2]:95 [ div10::$0 div10::val#0 ] ] with [ zp[2]:40 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 append::dst#4 append::dst#1 append::dst#2 append::dst#3 utoa::dst#3 ] ]
|
||||
Coalescing zero page register [ zp[2]:99 [ div10::$2 div10::val#1 ] ] with [ zp[2]:44 [ append::sub#6 ] ]
|
||||
Coalescing zero page register [ zp[2]:103 [ div10::$3 div10::val#2 ] ] with [ zp[2]:21 [ myprintf::str#10 myprintf::str#6 myprintf::str#0 divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 ] ]
|
||||
Allocated (was zp[2]:6) zp[2]:4 [ main::v#10 main::v#12 main::v#11 main::v#13 main::v#2 main::v#1 myprintf::w2#8 myprintf::w2#1 myprintf::w2#0 div10::return#2 div16u::return#2 div16u::return#0 div10::return#0 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 div10::$4 div10::val#3 ]
|
||||
Allocated (was zp[2]:19) zp[2]:6 [ myprintf::w3#8 myprintf::w3#1 myprintf::w3#0 main::$13 main::$4 main::$12 main::$3 divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ]
|
||||
Allocated (was zp[2]:19) zp[2]:6 [ myprintf::w3#8 myprintf::w3#1 myprintf::w3#0 main::$16 main::$5 main::$15 main::$4 divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ]
|
||||
Allocated (was zp[1]:23) zp[1]:8 [ myprintf::bFormat#10 myprintf::bFormat#5 ]
|
||||
Allocated (was zp[1]:24) zp[1]:9 [ myprintf::bArg#10 myprintf::bArg#11 myprintf::bArg#1 ]
|
||||
Allocated (was zp[1]:27) zp[1]:10 [ myprintf::bTrailing#11 myprintf::bTrailing#24 ]
|
||||
@ -6388,8 +6388,8 @@ Allocated (was zp[1]:28) zp[1]:11 [ myprintf::bLeadZero#11 myprintf::bLeadZero#2
|
||||
Allocated (was zp[1]:31) zp[1]:12 [ myprintf::b#17 myprintf::b#5 ]
|
||||
Allocated (was zp[1]:32) zp[1]:13 [ myprintf::bDigits#12 myprintf::bDigits#16 myprintf::bDigits#28 myprintf::bDigits#29 myprintf::bDigits#1 myprintf::bDigits#18 myprintf::bDigits#10 myprintf::bDigits#2 myprintf::bDigits#3 ]
|
||||
Allocated (was zp[1]:33) zp[1]:14 [ myprintf::bLen#32 myprintf::bLen#12 myprintf::bLen#10 myprintf::bLen#28 myprintf::bLen#36 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#13 myprintf::bLen#14 myprintf::bLen#1 myprintf::bLen#4 myprintf::bLen#5 myprintf::bLen#6 ]
|
||||
Allocated (was zp[2]:52) zp[2]:15 [ main::$14 myprintf::w#10 myprintf::w#18 myprintf::w#22 myprintf::w#53 myprintf::w#54 myprintf::w#55 ]
|
||||
Allocated (was zp[2]:62) zp[2]:17 [ main::$5 utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 append::return#10 append::return#4 append::return#3 append::return#2 ]
|
||||
Allocated (was zp[2]:52) zp[2]:15 [ main::$17 myprintf::w#10 myprintf::w#18 myprintf::w#22 myprintf::w#53 myprintf::w#54 myprintf::w#55 ]
|
||||
Allocated (was zp[2]:62) zp[2]:17 [ main::$6 utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 append::return#10 append::return#4 append::return#3 append::return#2 ]
|
||||
Allocated (was zp[2]:95) zp[2]:19 [ div10::$0 div10::val#0 utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 append::dst#4 append::dst#1 append::dst#2 append::dst#3 utoa::dst#3 ]
|
||||
Allocated (was zp[2]:99) zp[2]:21 [ div10::$2 div10::val#1 append::sub#6 ]
|
||||
Allocated (was zp[2]:103) zp[2]:23 [ div10::$3 div10::val#2 myprintf::str#10 myprintf::str#6 myprintf::str#0 divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 ]
|
||||
@ -6423,12 +6423,12 @@ __bend_from___b1:
|
||||
__bend:
|
||||
// main
|
||||
main: {
|
||||
.label __3 = 6
|
||||
.label __4 = 6
|
||||
.label __5 = $11
|
||||
.label __12 = 6
|
||||
.label __13 = 6
|
||||
.label __14 = $f
|
||||
.label __5 = 6
|
||||
.label __6 = $11
|
||||
.label __15 = 6
|
||||
.label __16 = 6
|
||||
.label __17 = $f
|
||||
.label v = 4
|
||||
// test performance of 'div16u(10)'
|
||||
// test performance of 'div10'
|
||||
@ -6509,28 +6509,28 @@ main: {
|
||||
jmp __b11
|
||||
// main::@11
|
||||
__b11:
|
||||
// [17] (word~) main::$12 ← (word)*((const nomodify byte*) TIMEHI) -- vwuz1=_word__deref_pbuc1
|
||||
// [17] (word~) main::$15 ← (word)*((const nomodify byte*) TIMEHI) -- vwuz1=_word__deref_pbuc1
|
||||
lda TIMEHI
|
||||
sta.z __12
|
||||
sta.z __15
|
||||
lda #0
|
||||
sta.z __12+1
|
||||
// [18] (word~) main::$13 ← (word~) main::$12 << (byte) 8 -- vwuz1=vwuz1_rol_8
|
||||
lda.z __13
|
||||
sta.z __13+1
|
||||
sta.z __15+1
|
||||
// [18] (word~) main::$16 ← (word~) main::$15 << (byte) 8 -- vwuz1=vwuz1_rol_8
|
||||
lda.z __16
|
||||
sta.z __16+1
|
||||
lda #0
|
||||
sta.z __13
|
||||
// [19] (word~) main::$14 ← (word)*((const nomodify byte*) TIMELO) -- vwuz1=_word__deref_pbuc1
|
||||
sta.z __16
|
||||
// [19] (word~) main::$17 ← (word)*((const nomodify byte*) TIMELO) -- vwuz1=_word__deref_pbuc1
|
||||
lda TIMELO
|
||||
sta.z __14
|
||||
sta.z __17
|
||||
lda #0
|
||||
sta.z __14+1
|
||||
// [20] (word) myprintf::w3#1 ← (word~) main::$13 + (word~) main::$14 -- vwuz1=vwuz1_plus_vwuz2
|
||||
sta.z __17+1
|
||||
// [20] (word) myprintf::w3#1 ← (word~) main::$16 + (word~) main::$17 -- vwuz1=vwuz1_plus_vwuz2
|
||||
lda.z myprintf.w3
|
||||
clc
|
||||
adc.z __14
|
||||
adc.z __17
|
||||
sta.z myprintf.w3
|
||||
lda.z myprintf.w3+1
|
||||
adc.z __14+1
|
||||
adc.z __17+1
|
||||
sta.z myprintf.w3+1
|
||||
// [21] (word) myprintf::w1#1 ← (word) main::u#17
|
||||
// [22] (word) myprintf::w2#1 ← (word) main::v#13
|
||||
@ -6609,28 +6609,28 @@ main: {
|
||||
jmp __b6
|
||||
// main::@6
|
||||
__b6:
|
||||
// [38] (word~) main::$3 ← (word)*((const nomodify byte*) TIMEHI) -- vwuz1=_word__deref_pbuc1
|
||||
// [38] (word~) main::$4 ← (word)*((const nomodify byte*) TIMEHI) -- vwuz1=_word__deref_pbuc1
|
||||
lda TIMEHI
|
||||
sta.z __3
|
||||
lda #0
|
||||
sta.z __3+1
|
||||
// [39] (word~) main::$4 ← (word~) main::$3 << (byte) 8 -- vwuz1=vwuz1_rol_8
|
||||
lda.z __4
|
||||
sta.z __4+1
|
||||
lda #0
|
||||
sta.z __4
|
||||
// [40] (word~) main::$5 ← (word)*((const nomodify byte*) TIMELO) -- vwuz1=_word__deref_pbuc1
|
||||
lda TIMELO
|
||||
sta.z __5
|
||||
lda #0
|
||||
sta.z __4+1
|
||||
// [39] (word~) main::$5 ← (word~) main::$4 << (byte) 8 -- vwuz1=vwuz1_rol_8
|
||||
lda.z __5
|
||||
sta.z __5+1
|
||||
// [41] (word) myprintf::w3#0 ← (word~) main::$4 + (word~) main::$5 -- vwuz1=vwuz1_plus_vwuz2
|
||||
lda #0
|
||||
sta.z __5
|
||||
// [40] (word~) main::$6 ← (word)*((const nomodify byte*) TIMELO) -- vwuz1=_word__deref_pbuc1
|
||||
lda TIMELO
|
||||
sta.z __6
|
||||
lda #0
|
||||
sta.z __6+1
|
||||
// [41] (word) myprintf::w3#0 ← (word~) main::$5 + (word~) main::$6 -- vwuz1=vwuz1_plus_vwuz2
|
||||
lda.z myprintf.w3
|
||||
clc
|
||||
adc.z __5
|
||||
adc.z __6
|
||||
sta.z myprintf.w3
|
||||
lda.z myprintf.w3+1
|
||||
adc.z __5+1
|
||||
adc.z __6+1
|
||||
sta.z myprintf.w3+1
|
||||
// [42] (word) myprintf::w1#0 ← (word) main::u#15
|
||||
// [43] (word) myprintf::w2#0 ← (word) main::v#11
|
||||
@ -8177,12 +8177,12 @@ FINAL SYMBOL TABLE
|
||||
(word) divr16u::return#0 return zp[2]:4 6.00020008E7
|
||||
(word) divr16u::return#2 return zp[2]:4 20002.0
|
||||
(signed word()) main()
|
||||
(word~) main::$12 zp[2]:6 202.0
|
||||
(word~) main::$13 zp[2]:6 101.0
|
||||
(word~) main::$14 zp[2]:15 202.0
|
||||
(word~) main::$3 zp[2]:6 202.0
|
||||
(word~) main::$4 zp[2]:6 101.0
|
||||
(word~) main::$5 zp[2]:17 202.0
|
||||
(word~) main::$15 zp[2]:6 202.0
|
||||
(word~) main::$16 zp[2]:6 101.0
|
||||
(word~) main::$17 zp[2]:15 202.0
|
||||
(word~) main::$4 zp[2]:6 202.0
|
||||
(word~) main::$5 zp[2]:6 101.0
|
||||
(word~) main::$6 zp[2]:17 202.0
|
||||
(label) main::@1
|
||||
(label) main::@10
|
||||
(label) main::@11
|
||||
@ -8399,7 +8399,7 @@ FINAL SYMBOL TABLE
|
||||
zp[2]:2 [ main::u#15 main::u#3 myprintf::w1#7 myprintf::w1#1 myprintf::w1#0 div16u::dividend#0 main::u#17 main::u#4 div10::val#4 ]
|
||||
zp[2]:4 [ main::v#10 main::v#12 main::v#11 main::v#13 main::v#2 main::v#1 myprintf::w2#8 myprintf::w2#1 myprintf::w2#0 div10::return#2 div16u::return#2 div16u::return#0 div10::return#0 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 div10::$4 div10::val#3 ]
|
||||
reg byte x [ divr16u::i#2 divr16u::i#1 ]
|
||||
zp[2]:6 [ myprintf::w3#8 myprintf::w3#1 myprintf::w3#0 main::$13 main::$4 main::$12 main::$3 divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ]
|
||||
zp[2]:6 [ myprintf::w3#8 myprintf::w3#1 myprintf::w3#0 main::$16 main::$5 main::$15 main::$4 divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ]
|
||||
zp[1]:8 [ myprintf::bFormat#10 myprintf::bFormat#5 ]
|
||||
zp[1]:9 [ myprintf::bArg#10 myprintf::bArg#11 myprintf::bArg#1 ]
|
||||
zp[1]:10 [ myprintf::bTrailing#11 myprintf::bTrailing#24 ]
|
||||
@ -8413,8 +8413,8 @@ reg byte x [ myprintf::digit#3 myprintf::digit#2 ]
|
||||
reg byte a [ myprintf::$43 ]
|
||||
reg byte x [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ]
|
||||
reg byte x [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ]
|
||||
zp[2]:15 [ main::$14 myprintf::w#10 myprintf::w#18 myprintf::w#22 myprintf::w#53 myprintf::w#54 myprintf::w#55 ]
|
||||
zp[2]:17 [ main::$5 utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 append::return#10 append::return#4 append::return#3 append::return#2 ]
|
||||
zp[2]:15 [ main::$17 myprintf::w#10 myprintf::w#18 myprintf::w#22 myprintf::w#53 myprintf::w#54 myprintf::w#55 ]
|
||||
zp[2]:17 [ main::$6 utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 append::return#10 append::return#4 append::return#3 append::return#2 ]
|
||||
reg byte a [ divr16u::$1 ]
|
||||
reg byte a [ divr16u::$2 ]
|
||||
reg byte a [ myprintf::$18 ]
|
||||
@ -8456,12 +8456,12 @@ Score: 361442
|
||||
// @end
|
||||
// main
|
||||
main: {
|
||||
.label __3 = 6
|
||||
.label __4 = 6
|
||||
.label __5 = $11
|
||||
.label __12 = 6
|
||||
.label __13 = 6
|
||||
.label __14 = $f
|
||||
.label __5 = 6
|
||||
.label __6 = $11
|
||||
.label __15 = 6
|
||||
.label __16 = 6
|
||||
.label __17 = $f
|
||||
.label v = 4
|
||||
// test performance of 'div16u(10)'
|
||||
// test performance of 'div10'
|
||||
@ -8536,31 +8536,31 @@ main: {
|
||||
bcc __b10
|
||||
// main::@11
|
||||
// (word)*TIMEHI
|
||||
// [17] (word~) main::$12 ← (word)*((const nomodify byte*) TIMEHI) -- vwuz1=_word__deref_pbuc1
|
||||
// [17] (word~) main::$15 ← (word)*((const nomodify byte*) TIMEHI) -- vwuz1=_word__deref_pbuc1
|
||||
lda TIMEHI
|
||||
sta.z __12
|
||||
sta.z __15
|
||||
lda #0
|
||||
sta.z __12+1
|
||||
sta.z __15+1
|
||||
// (word)*TIMEHI << 8
|
||||
// [18] (word~) main::$13 ← (word~) main::$12 << (byte) 8 -- vwuz1=vwuz1_rol_8
|
||||
lda.z __13
|
||||
sta.z __13+1
|
||||
// [18] (word~) main::$16 ← (word~) main::$15 << (byte) 8 -- vwuz1=vwuz1_rol_8
|
||||
lda.z __16
|
||||
sta.z __16+1
|
||||
lda #0
|
||||
sta.z __13
|
||||
sta.z __16
|
||||
// (word)*TIMELO
|
||||
// [19] (word~) main::$14 ← (word)*((const nomodify byte*) TIMELO) -- vwuz1=_word__deref_pbuc1
|
||||
// [19] (word~) main::$17 ← (word)*((const nomodify byte*) TIMELO) -- vwuz1=_word__deref_pbuc1
|
||||
lda TIMELO
|
||||
sta.z __14
|
||||
sta.z __17
|
||||
lda #0
|
||||
sta.z __14+1
|
||||
sta.z __17+1
|
||||
// myprintf(strTemp, "200 DIV10 : %5d,%4d IN %04d FRAMESm", u, v, ((word)*TIMEHI << 8) + (word)*TIMELO)
|
||||
// [20] (word) myprintf::w3#1 ← (word~) main::$13 + (word~) main::$14 -- vwuz1=vwuz1_plus_vwuz2
|
||||
// [20] (word) myprintf::w3#1 ← (word~) main::$16 + (word~) main::$17 -- vwuz1=vwuz1_plus_vwuz2
|
||||
lda.z myprintf.w3
|
||||
clc
|
||||
adc.z __14
|
||||
adc.z __17
|
||||
sta.z myprintf.w3
|
||||
lda.z myprintf.w3+1
|
||||
adc.z __14+1
|
||||
adc.z __17+1
|
||||
sta.z myprintf.w3+1
|
||||
// [21] (word) myprintf::w1#1 ← (word) main::u#17
|
||||
// [22] (word) myprintf::w2#1 ← (word) main::v#13
|
||||
@ -8634,31 +8634,31 @@ main: {
|
||||
bcc __b5
|
||||
// main::@6
|
||||
// (word)*TIMEHI
|
||||
// [38] (word~) main::$3 ← (word)*((const nomodify byte*) TIMEHI) -- vwuz1=_word__deref_pbuc1
|
||||
// [38] (word~) main::$4 ← (word)*((const nomodify byte*) TIMEHI) -- vwuz1=_word__deref_pbuc1
|
||||
lda TIMEHI
|
||||
sta.z __3
|
||||
lda #0
|
||||
sta.z __3+1
|
||||
// (word)*TIMEHI << 8
|
||||
// [39] (word~) main::$4 ← (word~) main::$3 << (byte) 8 -- vwuz1=vwuz1_rol_8
|
||||
lda.z __4
|
||||
sta.z __4+1
|
||||
lda #0
|
||||
sta.z __4
|
||||
// (word)*TIMELO
|
||||
// [40] (word~) main::$5 ← (word)*((const nomodify byte*) TIMELO) -- vwuz1=_word__deref_pbuc1
|
||||
lda TIMELO
|
||||
sta.z __5
|
||||
lda #0
|
||||
sta.z __4+1
|
||||
// (word)*TIMEHI << 8
|
||||
// [39] (word~) main::$5 ← (word~) main::$4 << (byte) 8 -- vwuz1=vwuz1_rol_8
|
||||
lda.z __5
|
||||
sta.z __5+1
|
||||
lda #0
|
||||
sta.z __5
|
||||
// (word)*TIMELO
|
||||
// [40] (word~) main::$6 ← (word)*((const nomodify byte*) TIMELO) -- vwuz1=_word__deref_pbuc1
|
||||
lda TIMELO
|
||||
sta.z __6
|
||||
lda #0
|
||||
sta.z __6+1
|
||||
// myprintf(strTemp, "200 DIV16U: %5d,%4d IN %04d FRAMESm", u, v, ((word)*TIMEHI << 8) + (word)*TIMELO)
|
||||
// [41] (word) myprintf::w3#0 ← (word~) main::$4 + (word~) main::$5 -- vwuz1=vwuz1_plus_vwuz2
|
||||
// [41] (word) myprintf::w3#0 ← (word~) main::$5 + (word~) main::$6 -- vwuz1=vwuz1_plus_vwuz2
|
||||
lda.z myprintf.w3
|
||||
clc
|
||||
adc.z __5
|
||||
adc.z __6
|
||||
sta.z myprintf.w3
|
||||
lda.z myprintf.w3+1
|
||||
adc.z __5+1
|
||||
adc.z __6+1
|
||||
sta.z myprintf.w3+1
|
||||
// [42] (word) myprintf::w1#0 ← (word) main::u#15
|
||||
// [43] (word) myprintf::w2#0 ← (word) main::v#11
|
||||
|
@ -87,12 +87,12 @@
|
||||
(word) divr16u::return#0 return zp[2]:4 6.00020008E7
|
||||
(word) divr16u::return#2 return zp[2]:4 20002.0
|
||||
(signed word()) main()
|
||||
(word~) main::$12 zp[2]:6 202.0
|
||||
(word~) main::$13 zp[2]:6 101.0
|
||||
(word~) main::$14 zp[2]:15 202.0
|
||||
(word~) main::$3 zp[2]:6 202.0
|
||||
(word~) main::$4 zp[2]:6 101.0
|
||||
(word~) main::$5 zp[2]:17 202.0
|
||||
(word~) main::$15 zp[2]:6 202.0
|
||||
(word~) main::$16 zp[2]:6 101.0
|
||||
(word~) main::$17 zp[2]:15 202.0
|
||||
(word~) main::$4 zp[2]:6 202.0
|
||||
(word~) main::$5 zp[2]:6 101.0
|
||||
(word~) main::$6 zp[2]:17 202.0
|
||||
(label) main::@1
|
||||
(label) main::@10
|
||||
(label) main::@11
|
||||
@ -309,7 +309,7 @@
|
||||
zp[2]:2 [ main::u#15 main::u#3 myprintf::w1#7 myprintf::w1#1 myprintf::w1#0 div16u::dividend#0 main::u#17 main::u#4 div10::val#4 ]
|
||||
zp[2]:4 [ main::v#10 main::v#12 main::v#11 main::v#13 main::v#2 main::v#1 myprintf::w2#8 myprintf::w2#1 myprintf::w2#0 div10::return#2 div16u::return#2 div16u::return#0 div10::return#0 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 div10::$4 div10::val#3 ]
|
||||
reg byte x [ divr16u::i#2 divr16u::i#1 ]
|
||||
zp[2]:6 [ myprintf::w3#8 myprintf::w3#1 myprintf::w3#0 main::$13 main::$4 main::$12 main::$3 divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ]
|
||||
zp[2]:6 [ myprintf::w3#8 myprintf::w3#1 myprintf::w3#0 main::$16 main::$5 main::$15 main::$4 divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ]
|
||||
zp[1]:8 [ myprintf::bFormat#10 myprintf::bFormat#5 ]
|
||||
zp[1]:9 [ myprintf::bArg#10 myprintf::bArg#11 myprintf::bArg#1 ]
|
||||
zp[1]:10 [ myprintf::bTrailing#11 myprintf::bTrailing#24 ]
|
||||
@ -323,8 +323,8 @@ reg byte x [ myprintf::digit#3 myprintf::digit#2 ]
|
||||
reg byte a [ myprintf::$43 ]
|
||||
reg byte x [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ]
|
||||
reg byte x [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ]
|
||||
zp[2]:15 [ main::$14 myprintf::w#10 myprintf::w#18 myprintf::w#22 myprintf::w#53 myprintf::w#54 myprintf::w#55 ]
|
||||
zp[2]:17 [ main::$5 utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 append::return#10 append::return#4 append::return#3 append::return#2 ]
|
||||
zp[2]:15 [ main::$17 myprintf::w#10 myprintf::w#18 myprintf::w#22 myprintf::w#53 myprintf::w#54 myprintf::w#55 ]
|
||||
zp[2]:17 [ main::$6 utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 append::return#10 append::return#4 append::return#3 append::return#2 ]
|
||||
reg byte a [ divr16u::$1 ]
|
||||
reg byte a [ divr16u::$2 ]
|
||||
reg byte a [ myprintf::$18 ]
|
||||
|
Loading…
x
Reference in New Issue
Block a user